1 2018-08-04 Martin Sebor <msebor@redhat.com>
3 PR tree-optimization/86571
4 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
9 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12 2018-08-03 Jeff Law <law@redhat.com>
15 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
16 Define to speculation_safe_value_not_needed.
18 2018-08-03 David Malcolm <dmalcolm@redhat.com>
20 * doc/gcov.texi (-x): Remove duplicate "to".
21 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
22 (-Wif-not-aligned): Remove duplicate "is".
23 (-flto): Remove duplicate "the".
24 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
26 (MSP430 Options): Remove duplicate "and" from the description
27 of "-mgprel-sec=regexp".
28 (x86 Options): Remove duplicate copies of "vmldLog102" and
29 vmlsLog104 from description of "-mveclibabi=type".
31 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
33 * internal-fn.h (first_commutative_argument): Declare.
34 * internal-fn.c (first_commutative_argument): New function.
35 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
36 restrictions for pattern statements. Use first_commutative_argument
37 to look for commutative operands in calls to internal functions.
39 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
41 * Makefile.in (wide-int-range.o): New.
42 * tree-vrp.c: Move all the wide_int_* functions to...
43 * wide-int-range.cc: ...here.
44 * tree-vrp.h: Move all the wide_int_* prototypes to...
45 * wide-int-range.h: ...here.
47 2018-08-03 Tom de Vries <tdevries@suse.de>
49 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
51 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
52 * except.c (output_function_exception_table): Do early exit if
53 targetm_common.except_unwind_info (&global_options) == UI_NONE.
55 2018-08-03 Martin Liska <mliska@suse.cz>
57 * predict.c (dump_prediction): Change to 2 digits
60 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
62 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
64 (falkor_am_1_gtov_gtov): ... a new insn reservation.
66 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
68 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
69 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
70 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
71 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
72 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
74 2018-08-02 David Malcolm <dmalcolm@redhat.com>
76 * diagnostic-show-locus.c (diagnostic_show_locus): Use
77 pp_take_prefix when saving the existing prefix.
78 * diagnostic.c (diagnostic_append_note): Likewise.
79 * langhooks.c (lhd_print_error_function): Likewise.
80 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
81 param's type. Free the existing prefix.
82 (pp_take_prefix): New function.
83 (pretty_printer::pretty_printer): Drop the prefix parameter.
84 Rename the length parameter to match the comment.
85 (pretty_printer::~pretty_printer): Free the prefix.
86 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
88 (struct pretty_printer): Drop the "const" from "prefix" field's
89 type and clarify memory management.
90 (pp_set_prefix): Drop the "const" from the 2nd param.
91 (pp_take_prefix): New decl.
93 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
95 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
96 for word_mode_ok here instead of passing as argument.
97 (expand_block_compare): Change select_block_compare_mode() call.
98 (expand_strncmp_gpr_sequence): New function.
99 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
101 2018-08-02 Jeff Law <law@redhat.com>
104 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
105 Define to speculation_safe_value_not_needed.
108 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
109 Define to speculation_safe_value_not_needed.
111 2018-08-02 Tom de Vries <tdevries@suse.de>
114 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
115 function. Return UI_TARGET unconditionally.
116 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
117 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
119 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
121 * genemit.c (print_overload_test): Fix typo.
123 2018-08-02 Richard Biener <rguenther@suse.de>
125 PR tree-optimization/86816
126 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
127 which checks for value availability before querying it.
128 (gvn_uses_equal): Use it.
129 (same_succ_hash): Likewise.
130 (gimple_equal_p): Likewise.
132 2018-08-02 Nick Clifton <nickc@redhat.com>
135 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
136 Define to speculation_safe_value_not_needed.
139 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
140 Define to speculation_safe_value_not_needed.
143 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
144 Define to speculation_safe_value_not_needed.
147 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
148 Define to speculation_safe_value_not_needed.
151 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
152 Define to speculation_safe_value_not_needed.
155 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
156 Define to speculation_safe_value_not_needed.
159 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
160 Define to speculation_safe_value_not_needed.
163 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
164 Define to speculation_safe_value_not_needed.
167 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
168 speculation_safe_value_not_needed.
171 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
172 to speculation_safe_value_not_needed.
174 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
176 * doc/md.texi: Expand the documentation of instruction names
177 to mention port-local uses. Document '@' in pattern names.
178 * read-md.h (overloaded_instance, overloaded_name): New structs.
180 (md_reader::handle_overloaded_name): New member function.
181 (md_reader::get_overloads): Likewise.
182 (md_reader::m_first_overload): New member variable.
183 (md_reader::m_next_overload_ptr): Likewise.
184 (md_reader::m_overloads_htab): Likewise.
185 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
186 m_next_overload_ptr and m_overloads_htab.
187 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
188 (get_mode_token, get_code_token, get_int_token): New functions.
189 (map_attr_string): Add an optional argument that passes back
190 the associated iterator.
191 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
192 (md_reader::handle_overloaded_name, add_overload_instance): New
194 (apply_iterators): Handle '@' names. Report an error if '@'
195 is used without iterators.
196 (initialize_iterators): Initialize the new iterator_group fields.
197 * genopinit.c (handle_overloaded_code_for)
198 (handle_overloaded_gen): New functions.
199 (main): Use them to print declarations of maybe_code_for_* and
200 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
201 * genemit.c (print_overload_arguments, print_overload_test)
202 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
203 (main): Use it to print definitions of maybe_code_for_* and
204 maybe_gen_* functions.
205 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
206 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
207 instead of explicit mode checks.
208 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
209 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
210 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
211 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
212 (aarch64_expand_compare_and_swap): Likewise
213 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
214 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
215 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
216 (aarch64_constant_pool_reload_icode): Delete.
217 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
218 instead of aarch64_constant_pool_reload_icode. Use
219 code_for_aarch64_reload_mov instead of explicit mode checks.
220 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
221 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
222 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
223 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
224 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
225 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
226 (aarch64_atomic_load_op_code): Delete.
227 (aarch64_emit_atomic_load_op): Likewise.
228 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
229 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
230 instead of aarch64_emit_atomic_load_op.
231 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
232 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
233 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
234 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
235 character before the pattern name.
236 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
237 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
238 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
239 (aarch64_frecps<mode>): Likewise.
240 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
241 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
242 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
243 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
244 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
246 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
248 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
249 Allow HFmode constants if TARGET_FP_F16INST.
251 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
254 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
255 No longer check last store for clobber of address register.
257 2018-08-02 Martin Liska <mliska@suse.cz>
259 PR gcov-profile/86817
260 * gcov.c (process_all_functions): New function.
262 (process_file): Move functions processing to
263 process_all_functions.
265 2018-08-02 David Malcolm <dmalcolm@redhat.com>
267 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
268 "const" to the "gimple *" and "rtx_insn *" parameters.
269 * dumpfile.h (dump_user_location_t::dump_user_location_t):
271 (dump_location_t::dump_location_t): Likewise.
273 2018-08-01 Martin Sebor <msebor@redhat.com>
275 PR tree-optimization/86650
276 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
277 rather than a "gcall *". Directly pass the data of interest
278 to percent_K_format, rather than building a temporary CALL_EXPR
280 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
281 (gimple_fold_builtin_strncat): Adjust.
282 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
283 gcall* argument with gimple*.
284 * gimple-ssa-warn-restrict.c (check_call): Same.
285 (wrestrict_dom_walker::before_dom_children): Same.
286 (builtin_access::builtin_access): Same.
287 (check_bounds_or_overlap): Same
288 (maybe_diag_overlap): Same.
289 (maybe_diag_offset_bounds): Same.
290 * tree-diagnostic.c (default_tree_printer): Move usage of
291 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
293 * tree-pretty-print.c (percent_K_format): Add argument.
294 * tree-pretty-print.h: Add argument.
295 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
296 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
297 (maybe_diag_stxncpy_trunc): Same.
298 (handle_builtin_stxncpy): Same.
299 (handle_builtin_strcat): Same.
301 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
303 * match.pd: Optimise pointer range checks.
305 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
307 PR tree-optimization/86758
308 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
309 to remove pattern statements.
311 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
313 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
314 result of dfs_enumerate_from when constructing stmt_vec_infos,
315 instead of additionally calling get_loop_body.
317 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
319 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
321 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
322 When creating an iv, assert that the step is not known to be zero.
323 (vect_setup_realignment): Update call accordingly.
324 * tree-vect-stmts.c (vectorizable_store): Likewise.
325 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
327 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
329 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
330 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
331 (vectorizable_reduction): Likewise.
332 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
333 (vect_detect_hybrid_slp_stmts): Likewise.
334 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
336 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
338 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
339 (wide_int_set_zero_nonzero_bits): ...this.
340 (zero_nonzero_bits_from_vr): Rename to...
341 (vrp_set_zero_nonzero_bits): ...this.
342 (extract_range_from_multiplicative_op_1): Abstract wide int
344 (wide_int_range_multiplicative_op): ...here.
345 (extract_range_from_binary_expr_1): Extract wide int binary
346 operations into their own functions.
347 (wide_int_range_lshift): New.
348 (wide_int_range_can_optimize_bit_op): New.
349 (wide_int_range_shift_undefined_p): New.
350 (wide_int_range_bit_xor): New.
351 (wide_int_range_bit_ior): New.
352 (wide_int_range_bit_and): New.
353 (wide_int_range_trunc_mod): New.
354 (extract_range_into_wide_ints): New.
355 (vrp_shift_undefined_p): New.
356 (extract_range_from_multiplicative_op): New.
357 (vrp_can_optimize_bit_op): New.
358 * tree-vrp.h (value_range::dump): New.
359 (wide_int_range_multiplicative_op): New.
360 (wide_int_range_lshift):New.
361 (wide_int_range_shift_undefined_p): New.
362 (wide_int_range_bit_xor): New.
363 (wide_int_range_bit_ior): New.
364 (wide_int_range_bit_and): New.
365 (wide_int_range_trunc_mod): New.
366 (zero_nonzero_bits_from_bounds): Rename to...
367 (wide_int_set_zero_nonzero_bits): ...this.
368 (zero_nonzero_bits_from_vr): Rename to...
369 (vrp_set_zero_nonzero_bits): ...this.
370 (range_easy_mask_min_max): Rename to...
371 (wide_int_range_can_optimize_bit_op): this.
372 * vr-values.c (simplify_bit_ops_using_ranges): Rename
373 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
375 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
377 * tree-vectorizer.h (vect_orig_stmt): New function.
378 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
379 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
380 (vect_create_epilog_for_reduction): Likewise.
381 (vectorizable_live_operation): Likewise.
382 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
383 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
384 * tree-vect-stmts.c (vectorizable_call): Likewise.
385 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
387 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
389 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
391 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
392 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
393 (vect_transform_loop): Likewise.
394 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
396 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
398 * tree-vectorizer.h (vect_schedule_slp): Return void.
399 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
400 (vect_schedule_slp): Likewise.
402 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
404 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
406 (vect_transform_loop): Update calls accordingly. Schedule SLP
407 instances before the main loop, if any exist.
409 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
411 PR tree-optimization/86749
412 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
413 If the lhs is used in a COND_EXPR, check that it is being used
414 as the "then" or "else" value.
416 2018-08-01 Tom de Vries <tdevries@suse.de>
419 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
420 speculation_safe_value_not_needed.
422 2018-08-01 Richard Biener <rguenther@suse.de>
424 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
427 2018-08-01 Martin Liska <mliska@suse.cz>
429 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
430 format how successful transformation is dumped.
431 (gimple_mod_pow2_value_transform): Likewise.
432 (gimple_mod_subtract_transform): Likewise.
433 (gimple_stringops_transform): Likewise.
435 2018-08-01 Martin Liska <mliska@suse.cz>
438 * value-prof.c (interesting_stringop_to_profile_p):
439 Simplify the code and add BUILT_IN_MEMMOVE.
440 (gimple_stringops_transform): Likewise.
442 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
444 * config/aarch64/aarch64-simd.md
445 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
446 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
447 use GPI iterator instead of SI mode.
449 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
451 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
452 rs6000_speculation_barrier.
453 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
454 new barrier pattern name.
456 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
458 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
459 (speculation_barrier): New insn.
461 2018-08-01 Richard Biener <rguenther@suse.de>
464 * graphite.h: Include isl/id.h and isl/space.h to allow build
467 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
470 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
471 mode for COFF targets.
472 * defaults.h (TARGET_COFF): Define.
473 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
474 TARGET_COFF): Define.
475 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
476 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
477 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
479 2018-07-31 Alexandre Oliva <oliva@adacore.com>
481 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
482 * gimple-streamer-out.c (output_bb): Save it.
483 * lto-streamer-in.c (input_struct_function_base): Restore
484 instance discriminator if available. Create map on demand.
485 * lto-streamer-out.c (output_struct_function_base): Save it if
487 * final.c (decl_to_instance_map): Document LTO strategy.
489 2018-07-31 Alexandre Oliva <oliva@adacore.com>
490 Olivier Hainque <hainque@adacore.com>
492 * debug.h (decl_to_instance_map_t): New type.
493 (decl_to_instance_map): Declare.
494 (maybe_create_decl_to_instance_map): New inline function.
495 * final.c (bb_discriminator, last_bb_discriminator): New statics,
496 to track basic block discriminators.
497 (final_start_function_1): Initialize them.
498 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
500 (decl_to_instance_map): New variable.
501 (map_decl_to_instance, maybe_set_discriminator): New functions.
502 (notice_source_line): Set discriminator.
504 2018-07-31 Ian Lance Taylor <iant@golang.org>
506 * targhooks.c (default_have_speculation_safe_value): Add
509 2018-07-31 David Malcolm <dmalcolm@redhat.com>
511 * dump-context.h: Include "pretty-print.h".
512 (dump_context::refresh_dumps_are_enabled): New decl.
513 (dump_context::emit_item): New decl.
514 (class dump_context): Add fields "m_test_pp" and
516 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
517 (temp_dump_context::get_dumped_text): New decl.
518 (class temp_dump_context): Add field "m_pp".
519 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
520 (dump_context::refresh_dumps_are_enabled): ...and add a test for
522 (set_dump_file): Update for above change.
523 (set_alt_dump_file): Likewise.
524 (dump_loc): New overload, taking a pretty_printer *.
525 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
526 to any test pretty-printer.
527 (make_item_for_dump_gimple_stmt): New function, adapted from
528 optinfo::add_gimple_stmt.
529 (dump_context::dump_gimple_stmt): Call it, and use the result,
530 eliminating the direct usage of dump_file and alt_dump_file in
531 favor of indirectly using them via emit_item.
532 (make_item_for_dump_gimple_expr): New function, adapted from
533 optinfo::add_gimple_expr.
534 (dump_context::dump_gimple_expr): Call it, and use the result,
535 eliminating the direct usage of dump_file and alt_dump_file in
536 favor of indirectly using them via emit_item.
537 (make_item_for_dump_generic_expr): New function, adapted from
539 (dump_context::dump_generic_expr): Call it, and use the result,
540 eliminating the direct usage of dump_file and alt_dump_file in
541 favor of indirectly using them via emit_item.
542 (make_item_for_dump_printf_va): New function, adapted from
543 optinfo::add_printf_va.
544 (make_item_for_dump_printf): New function.
545 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
546 and use the result, eliminating the direct usage of dump_file and
547 alt_dump_file in favor of indirectly using them via emit_item.
548 (make_item_for_dump_dec): New function.
549 (dump_context::dump_dec): Call it, and use the result,
550 eliminating the direct usage of dump_file and alt_dump_file in
551 favor of indirectly using them via emit_item.
552 (make_item_for_dump_symtab_node): New function, adapted from
553 optinfo::add_symtab_node.
554 (dump_context::dump_symtab_node): Call it, and use the result,
555 eliminating the direct usage of dump_file and alt_dump_file in
556 favor of indirectly using them via emit_item.
557 (dump_context::begin_scope): Reimplement, avoiding direct usage
558 of dump_file and alt_dump_file in favor of indirectly using them
560 (dump_context::emit_item): New member function.
561 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
562 Set up test pretty-printer on the underlying context. Call
563 refresh_dumps_are_enabled.
564 (temp_dump_context::~temp_dump_context): Call
565 refresh_dumps_are_enabled.
566 (temp_dump_context::get_dumped_text): New member function.
567 (selftest::verify_dumped_text): New function.
568 (ASSERT_DUMPED_TEXT_EQ): New macro.
569 (selftest::test_capture_of_dump_calls): Run all tests twice, with
570 and then without optinfo enabled. Add uses of
571 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
572 * dumpfile.h: Update comment for the dump_* API.
573 * optinfo-emit-json.cc
574 (selftest::test_building_json_from_dump_calls): Update for new
575 param for temp_dump_context ctor.
576 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
578 (optinfo_item::~optinfo_item): Likewise.
579 (optinfo::add_item): New member function.
580 (optinfo::emit): Update comment.
581 (optinfo::add_string): Delete.
582 (optinfo::add_printf): Delete.
583 (optinfo::add_printf_va): Delete.
584 (optinfo::add_gimple_stmt): Delete.
585 (optinfo::add_gimple_expr): Delete.
586 (optinfo::add_tree): Delete.
587 (optinfo::add_symtab_node): Delete.
588 (optinfo::add_dec): Delete.
589 * optinfo.h (class dump_context): New forward decl.
590 (optinfo::add_item): New decl.
591 (optinfo::add_string): Delete.
592 (optinfo::add_printf): Delete.
593 (optinfo::add_printf_va): Delete.
594 (optinfo::add_gimple_stmt): Delete.
595 (optinfo::add_gimple_expr): Delete.
596 (optinfo::add_tree): Delete.
597 (optinfo::add_symtab_node): Delete.
598 (optinfo::add_dec): Delete.
599 (optinfo::add_poly_int): Delete.
600 (optinfo_item::optinfo_item): Remove "owned" param.
601 (class optinfo_item): Remove field "m_owned".
603 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
606 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
607 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
608 requested variable alignment.
609 (expand_one_ssa_partition): Likewise.
610 (expand_one_var): Likewise.
612 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
614 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
615 to speculation_safe_value_not_needed.
617 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
619 * targhooks.h (speculation_safe_value_not_needed): New prototype.
620 * targhooks.c (speculation_safe_value_not_needed): New function.
621 * target.def (have_speculation_safe_value): Update documentation.
622 * doc/tm.texi: Regenerated.
624 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
626 * config/aarch64/iterators.md (ALLI_TI): New iterator.
627 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
629 (despeculate_copy<ALLI:mode>_insn): New insn.
630 (despeculate_copyti_insn): New insn.
631 (despeculate_simple<ALLI:mode>): New insn
632 (despeculate_simpleti): New insn.
633 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
635 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
636 aarch64_speculation_safe_value.
637 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
639 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
641 * config/aarch64/aarch64-speculation.cc: New file.
642 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
643 before pass_reorder_blocks.
644 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
646 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
647 X14 and X15 when tracking speculation.
648 * config/aarch64/aarch64.md (register name constants): Add
649 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
650 (unspec): Add UNSPEC_SPECULATION_TRACKER.
651 (speculation_barrier): New insn attribute.
652 (cmp<mode>): Allow SP in comparisons.
653 (speculation_tracker): New insn.
654 (speculation_barrier): Add speculation_barrier attribute.
655 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
656 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
657 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
659 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
661 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
662 aarch64_track_speculation is true.
663 (tb<optab><mode>1): Likewise.
664 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
665 generate CB[N]Z when tracking speculation.
666 (aarch64_split_compare_and_swap): Likewise.
667 (aarch64_split_atomic_op): Likewise.
669 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
671 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
673 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
675 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
676 (speculation_barrier): New insn.
678 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
680 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
681 * config/arm/arm.md (speculation_barrier): New expand.
682 (speculation_barrier_insn): New pattern.
684 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
686 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
687 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
688 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
689 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
691 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
692 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
693 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
694 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
695 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
696 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
697 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
698 * builtins.c (expand_speculation_safe_value): New function.
699 (expand_builtin): Call it.
700 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
701 * doc/extend.texi: Document __builtin_speculation_safe_value.
702 * doc/md.texi: Document "speculation_barrier" pattern.
703 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
704 TARGET_HAVE_SPECULATION_SAFE_VALUE.
705 * doc/tm.texi: Regenerated.
706 * target.def (have_speculation_safe_value, speculation_safe_value): New
708 * targhooks.c (default_have_speculation_safe_value): New function.
709 (default_speculation_safe_value): New function.
710 * targhooks.h (default_have_speculation_safe_value): Add prototype.
711 (default_speculation_safe_value): Add prototype.
713 2018-07-31 David Malcolm <dmalcolm@redhat.com>
715 * dump-context.h (dump_context::dump_loc): New decl.
716 * dumpfile.c (dump_context::dump_loc): New member function.
717 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
718 and dump_gimple_stmt.
719 (dump_context::dump_gimple_expr_loc): Likewise, using
721 (dump_context::dump_generic_expr_loc): Likewise, using
723 (dump_context::dump_printf_loc_va): Likewise, using
725 (dump_context::begin_scope): Explicitly using the global function
726 "dump_loc", rather than the member function.
728 2018-07-31 Martin Sebor <msebor@redhat.com>
730 PR tree-optimization/86741
731 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
733 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
735 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
736 depend on whether prefetch instructions will be emitted or not.
737 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
738 will be emitted or not.
739 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
740 (TARGET_SETMEM_PFD): New macros.
742 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
744 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
745 (NULL_STMT_VEC_INFO): Delete.
746 (stmt_vec_info::operator*): Likewise.
747 (stmt_vec_info::operator gimple *): Likewise.
748 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
749 of NULL_STMT_VEC_INFO.
750 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
751 (vect_reassociating_reduction_p): Likewise.
752 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
753 (vectorizable_store): Likewise.
754 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
755 (vec_info::free_stmt_vec_infos): Likewise.
757 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
759 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
760 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
762 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
764 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
765 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
766 (vec_info::free_stmt_vec_info): New private member functions.
767 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
768 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
769 * tree-parloops.c (gather_scalar_reductions): Remove calls to
770 set_stmt_vec_info_vec and free_stmt_vec_infos.
771 * tree-vect-loop.c (_loop_vec_info): Remove call to
772 set_stmt_vec_info_vec.
773 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
774 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
775 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
776 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
777 (vec_info::free_stmt_vec_info): ...these new functions. Remove
778 assignments in {vec_info::,}new_stmt_vec_info that are redundant
779 with the clearing in the xcalloc.
780 (stmt_vec_info_vec): Delete.
781 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
782 (vectorize_loops): Likewise.
783 (vec_info::~vec_info): Remove argument from call to
785 (vec_info::add_stmt): Remove vinfo argument from call to
788 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
790 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
791 rather than a gimple stmt.
792 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
793 information for pattern statements when passed the original
794 statement; instead wait to be passed the pattern statement itself.
795 Don't call set_vinfo_for_stmt here.
796 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
797 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
799 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
800 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
801 stmt_vec_infos entry.
803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
805 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
806 * tree-vectorizer.c (vec_info::replace_stmt): New function.
807 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
808 * tree-vect-stmts.c (vectorizable_call): Likewise.
809 (vectorizable_simd_clone_call): Likewise.
811 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
813 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
814 * tree-vectorizer.c (vec_info::remove_stmt): New function.
815 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
816 * tree-vect-loop.c (vect_transform_loop): Likewise.
817 * tree-vect-slp.c (vect_schedule_slp): Likewise.
818 * tree-vect-stmts.c (vect_remove_stores): Likewise.
820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
822 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
823 (vect_dr_stmt): Delete.
824 * tree-vectorizer.c (vec_info::lookup_dr): New function.
825 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
827 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
828 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
829 (vect_verify_datarefs_alignment, vect_peeling_supportable)
830 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
831 (vect_analyze_data_refs): Likewise.
832 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
834 (vect_find_same_alignment_drs): Likewise.
835 (vect_slp_analyze_node_dependences): Update calls accordingly.
836 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
837 instead of DR_VECT_AUX.
838 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
839 of a vector data references. Use vec_info::lookup_dr instead of
841 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
842 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
843 instead of DR_VECT_AUX.
845 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
847 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
849 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
851 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
852 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
853 (vect_gen_prolog_loop_niters): Likewise.
855 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
857 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
858 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
859 (vect_known_alignment_in_bytes, vect_dr_behavior)
860 (vect_get_scalar_dr_size): Take references as dr_vec_infos
861 instead of data_references. Update calls to other routines for
862 which the same change has been made.
863 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
864 dr_vec_infos instead of stmt_vec_infos.
865 (vect_analyze_data_ref_dependence): Update call accordingly.
866 (vect_slp_analyze_data_ref_dependence)
867 (vect_record_base_alignments): Use DR_VECT_AUX.
868 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
869 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
870 (vector_alignment_reachable_p, vect_get_data_access_cost)
871 (vect_peeling_supportable, vect_analyze_group_access_1)
872 (vect_analyze_group_access, vect_analyze_data_ref_access)
873 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
874 (vect_compile_time_alias, vect_small_gap_p)
875 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
876 (vect_supportable_dr_alignment): Take references as dr_vec_infos
877 instead of data_references. Update calls to other routines for
878 which the same change has been made.
879 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
880 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
881 (vect_slp_analyze_and_verify_node_alignment)
882 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
883 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
884 (vect_setup_realignment): Use dr_vec_infos. Update calls after
886 (_vect_peel_info::dr): Replace with...
887 (_vect_peel_info::dr_info): ...this new field.
888 (vect_peeling_hash_get_most_frequent)
889 (vect_peeling_hash_choose_best_peeling): Update accordingly.
890 (vect_peeling_hash_get_lowest_cost):
891 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
892 routines for which the same change has been made.
893 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
895 * tree-vect-loop-manip.c (get_misalign_in_elems)
896 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
898 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
899 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
900 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
901 (get_group_load_store_type, get_negative_load_store_type)
902 (vect_get_data_ptr_increment, vectorizable_store)
903 (vectorizable_load): Likewise.
904 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
905 Update calls to other routines for which the same change has been made.
907 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
909 * tree-vectorizer.h (vec_info::move_dr): New member function.
910 (dataref_aux): Rename to...
911 (dr_vec_info): ...this and add "dr" and "stmt" fields.
912 (_stmt_vec_info::dr_aux): Update accordingly.
913 (_stmt_vec_info::data_ref_info): Delete.
914 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
915 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
916 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
917 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
919 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
920 (STMT_VINFO_DR_INFO): New macro.
921 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
922 (set_dr_misalignment): Update after rename of dataref_aux.
923 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
924 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
925 initialization of STMT_VINFO_DATA_REF.
926 * tree-vectorizer.c (vec_info::move_dr): New function.
927 * tree-vect-patterns.c (vect_recog_bool_pattern)
928 (vect_recog_mask_conversion_pattern)
929 (vect_recog_gather_scatter_pattern): Use it.
930 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
931 the "dr" and "stmt" fields of dr_vec_info instead of
934 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
936 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
937 (is_pattern_stmt_p): Use it.
938 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
939 on pattern statements.
941 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
943 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
944 original stmt as a stmt_vec_info rather than a gimple stmt.
945 (vect_pattern_recog_1): Take the statement directly as a
946 stmt_vec_info, rather than via a gimple_stmt_iterator.
947 Update call to vect_mark_pattern_stmts.
948 (vect_pattern_recog): Update calls accordingly.
950 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
952 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
953 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
954 a vect_def_type for the first argument.
955 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
956 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
957 operand if it isn't defined by a vectorized statement.
958 (vect_build_gather_load_calls): Remove the mask_dt argument and
959 update calls to vect_get_vec_def_for_stmt_copy.
960 (vectorizable_bswap): Likewise the dt argument.
961 (vectorizable_call): Update calls to vectorizable_bswap and
962 vect_get_vec_def_for_stmt_copy.
963 (vectorizable_simd_clone_call, vectorizable_assignment)
964 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
965 (vectorizable_comparison): Update calls to
966 vect_get_vec_def_for_stmt_copy.
967 (vectorizable_store): Likewise. Remove now-unnecessary calls to
969 (vect_get_loop_based_defs): Remove dt argument and update call
970 to vect_get_vec_def_for_stmt_copy.
971 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
972 and vect_get_vec_def_for_stmt_copy.
973 (vectorizable_load): Update calls to vect_build_gather_load_calls
974 and vect_get_vec_def_for_stmt_copy.
975 * tree-vect-loop.c (vect_create_epilog_for_reduction)
976 (vectorizable_reduction, vectorizable_live_operation): Update calls
977 to vect_get_vec_def_for_stmt_copy.
979 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
981 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
982 and gimple stmt arguments with a stmt_vec_info.
983 (vect_record_base_alignments): Update calls accordingly.
984 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
985 and gimple stmt arguments with a stmt_vec_info.
986 (vect_build_slp_tree_1): Remove vinfo argument and update call
987 to vect_record_max_nunits.
988 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
989 and vect_record_max_nunits.
991 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
993 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
994 file and take a stmt_vec_info instead of a gimple stmt.
995 (supportable_widening_operation, vect_finish_replace_stmt)
996 (vect_finish_stmt_generation, vect_get_store_rhs)
997 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
998 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
999 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1000 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1001 (vect_create_data_ref_ptr, bump_vector_ptr)
1002 (vect_permute_store_chain, vect_setup_realignment)
1003 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1004 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1005 (vectorizable_reduction, vectorizable_induction)
1006 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1007 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1008 than gimple stmts as arguments.
1009 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1010 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1011 (can_group_stmts_p, vect_check_gather_scatter)
1012 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1013 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1014 (vect_permute_load_chain, vect_shift_permute_load_chain)
1015 (vect_transform_grouped_load)
1016 (vect_record_grouped_load_vectors): Likewise.
1017 * tree-vect-loop.c (vect_fixup_reduc_chain)
1018 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1019 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1020 (vectorizable_reduction, vectorizable_induction)
1021 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1022 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1023 (vect_get_load_store_mask): Likewise.
1024 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1025 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1026 * tree-vect-stmts.c (vect_mark_relevant)
1027 (is_simple_and_all_uses_invariant)
1028 (exist_non_indexing_operands_for_use_p, process_use)
1029 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1030 (vect_get_vec_def_for_operand, vect_get_vec_defs)
1031 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1032 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1033 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1034 (get_negative_load_store_type, get_load_store_type)
1035 (vect_check_load_store_mask, vect_check_store_rhs)
1036 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1037 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1038 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1039 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1040 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1041 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1042 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1043 (supportable_widening_operation): Likewise.
1045 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1047 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1048 a stmt_vec_info instead of a gcall.
1049 (vect_check_gather_scatter): Update call accordingly.
1050 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1052 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1053 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1054 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1055 instead of a gimple stmt.
1056 (vect_transform_loop): Update calls accordingly.
1057 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1058 stmt_vec_infos instead of gimple stmts.
1059 (vect_analyze_slp_instance): Update use accordingly.
1060 * tree-vect-stmts.c (read_vector_array, write_vector_array)
1061 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1062 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1063 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1064 (vect_gen_widened_results_half, vect_get_loop_based_defs)
1065 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1066 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1067 down to subroutines.
1069 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1071 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1072 of the worklist from a vector of gimple stmts to a vector of
1074 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1075 (vect_mark_stmts_to_be_vectorized): Likewise
1077 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1079 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1080 statement before passing it to vect_analyze_stmt.
1081 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1082 the chain of phi vector definitions. Track the exit phi via its
1084 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1085 STMT_VINFO_REDUC_DEF.
1086 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1087 stmt_vec_infos to handle the statement chains.
1088 (vect_get_slp_defs): Record the first statement in the node
1089 using a stmt_vec_info.
1090 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1091 statements here and pass their stmt_vec_info down to subroutines.
1092 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1093 down to vect_finish_stmt_generation.
1094 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1095 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1096 stmt_vec_infos to subroutines.
1097 (vect_remove_stores): Use stmt_vec_infos to handle the statement
1100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1102 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1103 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1104 (vect_permute_store_chain, vect_setup_realignment)
1105 (vect_permute_load_chain, vect_shift_permute_load_chain)
1106 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1107 stmts internally, and when passing values to other vectorizer routines.
1108 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1109 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1110 (vect_analyze_loop_operations, get_initial_def_for_reduction)
1111 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1112 (vectorizable_reduction, vectorizable_induction)
1113 (vectorizable_live_operation, vect_transform_loop_stmt)
1114 (vect_transform_loop): Likewise.
1115 * tree-vect-patterns.c (vect_reassociating_reduction_p)
1116 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1117 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1118 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1119 (vect_slp_analyze_node_operations_1): Likewise.
1120 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1121 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1122 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1123 (vect_finish_stmt_generation_1, get_group_load_store_type)
1124 (get_load_store_type, vect_build_gather_load_calls)
1125 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1126 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1127 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1128 (vectorizable_store, vectorizable_load, vectorizable_condition)
1129 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1130 (supportable_widening_operation): Likewise.
1131 (vect_get_vector_types_for_stmt): Likewise.
1132 * tree-vectorizer.h (vect_dr_behavior): Likewise.
1134 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1136 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1137 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1138 (vect_permute_store_chain, vect_permute_load_chain)
1139 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1140 repeated stmt_vec_info lookups.
1141 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1142 (vect_update_ivs_after_vectorizer): Likewise.
1143 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1144 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1145 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1146 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1147 (vect_bb_slp_scalar_cost): Likewise.
1148 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1150 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1152 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1153 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1154 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1155 to get gassigns and gcalls, rather than operating on generc gimple
1157 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1158 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1159 (vectorizable_load, vect_analyze_stmt): Likewise.
1160 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1162 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1164 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1165 return stmt_vec_infos rather than gimple stmts. Do not accept
1167 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1169 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1170 Update use of get_later_stmt.
1171 (vect_get_constant_vectors): Update call accordingly.
1172 (vect_schedule_slp_instance): Likewise
1173 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1174 (vect_slp_analyze_instance_dependence): Likewise.
1175 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1177 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1179 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1180 (stmt_info_for_cost::stmt_info): ...this new field.
1181 (add_stmt_costs): Update accordingly.
1182 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1183 (vect_get_known_peeling_cost): Likewise.
1184 (vect_estimate_min_profitable_iters): Likewise.
1185 * tree-vect-stmts.c (record_stmt_cost): Likewise.
1187 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1189 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1190 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1191 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1193 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1195 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1197 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1198 a gimple stmt to a stmt_vec_info.
1199 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1201 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1203 * tree-vectorizer.h (vec_info::grouped_stores): Change from
1204 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1205 (_loop_vec_info::reduction_chains): Likewise.
1206 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1208 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1210 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1212 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1213 a gimple stmt to a stmt_vec_info.
1214 (_stmt_vec_info::next_element): Likewise.
1215 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1216 (vect_slp_analyze_and_verify_node_alignment)
1217 (vect_analyze_group_access_1, vect_analyze_group_access)
1218 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1219 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1220 (vect_supportable_dr_alignment): Update accordingly.
1221 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1222 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1223 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1224 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1225 * tree-vect-slp.c (vect_build_slp_tree_1)
1226 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1227 (vect_split_slp_store_group, vect_analyze_slp_instance)
1228 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1229 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1230 (get_group_load_store_type, get_load_store_type)
1231 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1232 (vect_transform_stmt, vect_remove_stores): Likewise.
1234 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1236 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1238 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1239 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1240 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1241 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1242 (vector_alignment_reachable_p, vect_get_data_access_cost)
1243 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1244 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1245 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1246 (vect_analyze_group_access_1, vect_analyze_group_access)
1247 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1248 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1249 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1250 result of vect_dr_stmt and use the stmt_vec_info instead of
1251 the associated gimple stmt.
1252 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1253 (vect_gen_prolog_loop_niters): Likewise.
1254 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1256 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1258 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1259 to a vec<stmt_vec_info>.
1260 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1261 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1263 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1264 to a vec<stmt_vec_info>.
1265 (bst_traits::value_type, bst_traits::value_type): Likewise.
1266 (bst_traits::hash): Update accordingly.
1267 (vect_get_and_check_slp_defs): Change the stmts parameter from
1268 a vec<gimple *> to a vec<stmt_vec_info>.
1269 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1270 (vect_build_slp_tree): Likewise.
1271 (vect_build_slp_tree_2): Likewise. Update uses of
1272 SLP_TREE_SCALAR_STMTS.
1273 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1274 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1275 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1276 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1277 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1278 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1279 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1280 (vect_get_constant_vectors, vect_get_slp_defs)
1281 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1282 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1283 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1284 instead of gimple stmts.
1285 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1286 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1287 (vect_slp_analyze_instance_dependence): Update uses of
1288 SLP_TREE_SCALAR_STMTS.
1289 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1290 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1291 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1292 (get_initial_defs_for_reduction): Likewise.
1293 (vect_create_epilog_for_reduction): Likewise.
1294 (vectorize_fold_left_reduction): Likewise.
1295 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1296 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1297 (can_vectorize_live_stmts): Likewise.
1299 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1301 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1302 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1303 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1305 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1307 (gather_scalar_reductions): Update after above interface changes.
1308 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1309 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1311 (vect_force_simple_reduction): Likewise.
1312 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1313 LOOP_VINFO_REDUCTIONS.
1314 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1318 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1319 a gimple stmt to a stmt_vec_info.
1320 * tree-vect-loop.c (vect_active_double_reduction_p)
1321 (vect_force_simple_reduction, vectorizable_reduction): Update
1324 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1326 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1327 vec<gimple *> to a vec<stmt_vec_info>.
1328 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1329 the reduction_phis argument from a vec<gimple *> to a
1331 (vectorizable_reduction): Likewise the phis local variable that
1332 is passed to vect_create_epilog_for_reduction. Update for new type
1333 of SLP_TREE_VEC_STMTS.
1334 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1335 (vectorizable_live_operation): Likewise.
1336 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1337 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1339 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1341 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1342 a gimple stmt to a stmt_vec_info.
1343 (vectorizable_condition, vectorizable_live_operation)
1344 (vectorizable_reduction, vectorizable_induction): Pass back the
1345 vectorized statement as a stmt_vec_info.
1346 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1347 use of STMT_VINFO_VEC_STMT.
1348 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1349 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1350 as stmt_vec_infos rather than gimple stmts.
1351 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1353 (vectorizable_live_operation): Likewise.
1354 (vectorizable_reduction, vectorizable_induction): Likewise,
1355 updating use of STMT_VINFO_VEC_STMT.
1356 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1357 of STMT_VINFO_VEC_STMT.
1358 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1359 (vectorizable_simd_clone_call, vectorizable_conversion)
1360 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1361 (vectorizable_store, vectorizable_load, vectorizable_condition)
1362 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1363 from a gimple stmt to a stmt_vec_info.
1364 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
1365 pointer to a stmt_vec_info to the vectorizable_* routines.
1367 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1369 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1370 a gimple stmt to a stmt_vec_info.
1371 (is_pattern_stmt_p): Update accordingly.
1372 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1373 (vect_record_grouped_load_vectors): Likewise.
1374 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1375 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1376 (vect_model_reduction_cost): Likewise.
1377 (vect_create_epilog_for_reduction): Likewise.
1378 (vectorizable_reduction, vectorizable_induction): Likewise.
1379 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1380 Return the stmt_vec_info for the pattern statement.
1381 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1382 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1383 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1384 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1385 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1386 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1387 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1388 (free_stmt_vec_info, vect_is_simple_use): Likewise.
1390 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1392 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1393 (vect_finish_stmt_generation): Likewise.
1394 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1395 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1396 (vect_build_gather_load_calls): Use the return value of the above
1397 functions instead of a separate call to vinfo_for_stmt. Use narrow
1398 scopes for the input gimple stmt and wider scopes for the associated
1399 stmt_vec_info. Use vec_info::lookup_def when setting these
1400 stmt_vec_infos from an SSA_NAME definition.
1401 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1402 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1403 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1404 (vectorizable_store, vectorizable_load, vectorizable_condition)
1405 (vectorizable_comparison): Likewise.
1406 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1407 (vectorizable_reduction): Likewise.
1409 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1411 * tree-vectorizer.h (vect_is_simple_use): Add an optional
1412 stmt_vec_info * parameter before the optional gimple **.
1413 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1414 (process_use, vect_get_vec_def_for_operand_1): Update callers.
1415 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1416 * tree-vect-loop.c (vectorizable_reduction): Likewise.
1417 (vectorizable_live_operation): Likewise.
1418 * tree-vect-patterns.c (type_conversion_p): Likewise.
1419 (vect_look_through_possible_promotion): Likewise.
1420 (vect_recog_rotate_pattern): Likewise.
1421 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1423 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1425 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1426 a typedef to a wrapper class.
1427 (NULL_STMT_VEC_INFO): New macro.
1428 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1429 (stmt_vec_info::operator*): New function.
1430 (stmt_vec_info::operator gimple *): Likewise.
1431 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1432 (add_stmt_costs): Likewise.
1433 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1434 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1435 (vect_get_known_peeling_cost): Likewise.
1436 (vect_estimate_min_profitable_iters): Likewise.
1437 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1438 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1439 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1440 (vectorizable_store, free_stmt_vec_infos): Likewise.
1441 (new_stmt_vec_info): Change return type of xcalloc to
1444 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1446 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1447 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1448 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1449 a single_imm_use-based sequence.
1450 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1452 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1454 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1455 * tree-vectorizer.c (vec_info::lookup_def): New function.
1456 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1457 (vect_widened_op_tree): Likewise.
1458 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1459 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1460 (vectorizable_reduction): Likewise.
1461 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1463 (vect_is_slp_reduction): Update calls accordingly. Use
1464 vec_info::lookup_def.
1465 (vect_is_simple_reduction): Likewise
1466 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1468 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1470 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1471 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1472 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1474 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1475 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1476 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1477 (vect_is_slp_reduction, vectorizable_induction)
1478 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1479 * tree-vect-patterns.c (vect_init_pattern_stmt):
1480 (vect_determine_min_output_precision_1, vect_determine_precisions)
1481 (vect_pattern_recog): Likewise.
1482 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1483 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1484 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1485 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1486 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1487 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1488 info field from a loop to a loop_vec_info.
1490 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1492 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1493 (vec_info::add_stmt): Declare.
1494 * tree-vectorizer.c (vec_info::add_stmt): New function.
1495 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1496 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1497 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1498 (vectorizable_induction): Likewise.
1499 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1500 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1501 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1502 (vectorizable_load): Likewise.
1503 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1504 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1505 (vect_recog_gather_scatter_pattern): Likewise.
1506 (append_pattern_def_seq): Likewise. Remove a check that is
1507 performed by add_stmt itself.
1509 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1511 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1512 which make_ssa_name was called with new_stmt before new_stmt
1515 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1517 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1519 (vect_is_slp_reduction): ...here...
1520 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1521 that are already known to be false.
1523 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1525 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1526 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1527 STMT_VINFO_NUM_SLP_USES when it's true.
1528 (vect_free_slp_instance): Add a final_p parameter and pass it to
1530 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1531 (vect_analyze_slp_instance): Likewise.
1532 (vect_slp_analyze_operations): Likewise.
1533 (vect_slp_analyze_bb_1): Likewise.
1534 * tree-vectorizer.c (vec_info): Likewise.
1535 * tree-vect-loop.c (vect_transform_loop): Likewise.
1537 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1539 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1540 function is not called for second and subsequent members of
1543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1545 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1546 cases for nested loops from here to ...
1547 (vect_create_epilog_for_reduction): ...here. Only call
1548 vect_is_simple_use for inner-loop reductions.
1550 2018-07-31 Martin Liska <mliska@suse.cz>
1552 PR gcov-profile/85338
1553 PR gcov-profile/85350
1554 PR gcov-profile/85372
1555 * profile.c (struct location_triplet): New.
1556 (struct location_triplet_hash): Likewise.
1557 (output_location): Do not output a BB that
1558 is already recorded for a line.
1559 (branch_prob): Use streamed_locations.
1561 2018-07-31 Martin Liska <mliska@suse.cz>
1563 PR gcov-profile/85370
1564 * coverage.c (coverage_begin_function): Do not mark target
1565 clones as artificial functions.
1567 2018-07-31 Martin Liska <mliska@suse.cz>
1569 PR gcov-profile/83813
1570 PR gcov-profile/84758
1571 PR gcov-profile/85217
1572 PR gcov-profile/85332
1573 * profile.c (branch_prob): Do not record GOTO expressions
1574 for GIMPLE statements which locations are already streamed.
1576 2018-07-31 Olivier Hainque <hainque@adacore.com>
1578 * gcc.c (handle_spec_function): Accept a soft_matched_part
1579 argument, as do_spec_1. Pass it down to ...
1580 (eval_spec_function): Accept a soft_matched_part argument,
1581 and pass it down to ...
1582 (do_spec_2): Accept a soft_matched_part argument, and pass
1583 it down to do_spec_1.
1584 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1585 (handle_braces): Update call to handle_spec_function.
1586 (driver::set_up_specs): Update calls to do_spec_2.
1587 (compare_debug_dump_opt_spec_function): Likewise.
1588 (compare_debug_self_opt_spec_function): Likewise.
1590 2018-07-31 Olivier Hainque <hainque@adacore.com>
1592 * common.opt (nolibc): New option.
1593 * doc/invoke.texi (Link Options): Document it.
1594 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1595 * config/alpha/linux.h: Likewise.
1596 * config/arc/elf.h: Likewise.
1597 * config/arm/uclinux-elf.h: Likewise.
1598 * config/arm/unknown-elf.h: Likewise.
1599 * config/avr/avrlibc.h: Likewise.
1600 * config/bfin/bfin.h: Likewise.
1601 * config/bfin/linux.h: Likewise.
1602 * config/bfin/uclinux.h: Likewise.
1603 * config/darwin.h: Likewise.
1604 * config/darwin10.h: Likewise.
1605 * config/darwin12.h: Likewise.
1606 * config/gnu-user.h: Likewise.
1607 * config/lm32/uclinux-elf.h: Likewise.
1608 * config/pa/pa-hpux11.h: Likewise.
1609 * config/pa/pa64-hpux.h: Likewise.
1610 * config/sparc/sparc.h: Likewise.
1612 2018-07-31 Olivier Hainque <hainque@adacore.com>
1614 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1615 undefined variables.
1617 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1620 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1623 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1625 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1626 terminated string literal.
1628 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1630 PR rtl-optimization/85160
1631 * combine.c (is_just_move): New function.
1632 (try_combine): Allow combining two instructions into two if neither of
1633 the original instructions was a move.
1635 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1638 * doc/extend.texi (Global Register Variables): Discourage use of type
1640 (Local Register Variables): Likewise.
1642 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1644 PR tree-optimization/86506
1645 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1647 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1650 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1651 hard_regno, make sure no insn between `from` and `to` clobbers it.
1653 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1654 Tom de Vries <tdevries@suse.de>
1656 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1657 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1658 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1659 PTX_DEFAULT_RUNTIME_DIM.
1660 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1662 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1664 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1665 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1666 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1668 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1670 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1672 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1673 predicate to reflect toc fusion has been deleted.
1674 (toc_fusion_mem_raw): Delete, no longer used.
1675 (toc_fusion_mem_wrapped): Likewise.
1676 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1678 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1679 Delete, no longer used.
1680 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1681 meant to be used for toc fusion.
1682 (rs6000_debug_print_mode): Delete toc fusion debugging.
1683 (rs6000_debug_reg_global): Likewise.
1684 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1685 fusion and secondary reload support that were never used.
1686 (rs6000_option_override_internal): Delete TOC fusion, that was only
1687 partially defined, and it did not work unless you also used the
1689 (rs6000_legitimate_address_p): Delete TOC fusion support.
1690 (rs6000_opt_masks): Likewise.
1691 (fusion_wrap_memory_address): Delete function, no longer used.
1692 (fusion_split_address); Delete TOC fusion support.
1693 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1694 longer used with toc fusion being deleted.
1695 (TARGET_TOC_FUSION_FP): Likewise.
1696 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1698 (toc fusion spliter): Delete TOC fusion support.
1699 (toc_fusionload_<mode>): Likewise.
1700 (toc_fusionload_di): Likewise.
1701 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1702 longer needs to be named. Rename predicate to delete TOC fusion.
1703 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1704 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1705 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1706 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1707 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1709 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1711 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1712 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1713 __int128 in built-in function prototypes.
1714 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1715 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1717 2018-07-27 Martin Sebor <msebor@redhat.com>
1719 PR tree-optimization/86696
1720 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1721 types, including enums.
1722 (handle_char_store): Be prepared for the above function to fail.
1724 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1726 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1727 when optimization level is lower than 2 or optimize for size.
1729 2018-07-26 Martin Sebor <msebor@redhat.com>
1731 PR tree-optimization/86043
1732 PR tree-optimization/86042
1733 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1734 (get_string_cst_length): Rename...
1735 (get_min_string_length): ...to this. Add argument.
1736 (handle_char_store): Extend to handle multi-character stores by
1738 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1739 * tree.h (initializer_zerop): Add argument.
1741 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1744 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1745 declare target to variables if they have always,{to,from,tofrom} map
1748 2018-07-26 Martin Liska <mliska@suse.cz>
1751 * lto-wrapper.c: Add linker_output as prefix
1752 for ltrans_output_file.
1754 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1756 PR rtl-optimization/85805
1757 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1758 value for hard registers if that was written in the same mode.
1760 2018-07-26 Martin Liska <mliska@suse.cz>
1762 PR gcov-profile/86536
1763 * gcov.c (format_gcov): Use printf format %.*f directly
1764 and do not handle special values.
1766 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1768 * common/config/arc/arc-common.c (arc_option_optimization_table):
1769 Update default optimizations for size.
1771 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1773 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1774 * config/arc/constraints.md (CfZ): New constraint.
1775 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1776 (subsf3_fpu): Likewise.
1777 (cmpsf_fpu): Likewise.
1778 (cmpsf_fpu_uneq): Likewise.
1780 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1782 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1784 (arc_is_uncached_mem_p): uncached applies to both the variable and
1787 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1789 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1792 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1794 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1795 field "m_scopes" from vec to auto_vec.
1797 2018-07-25 Martin Liska <mliska@suse.cz>
1799 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1802 2018-07-25 Richard Biener <rguenther@suse.de>
1805 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1806 special wrt context_die late.
1807 (gen_subprogram_die): Re-use DIEs in local scope.
1809 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1811 PR tree-optimization/86644
1812 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1814 2018-07-25 Martin Liska <mliska@suse.cz>
1817 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1818 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1820 2018-07-25 Martin Liska <mliska@suse.cz>
1823 * params.def: Explain ASan abbreviation and provide
1824 a documentation link.
1826 2018-07-24 Martin Sebor <msebor@redhat.com>
1828 PR tree-optimization/86622
1829 PR tree-optimization/86532
1830 * builtins.h (string_length): Declare.
1831 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1832 (check_access): Be prepared for non-constant length ranges.
1833 (string_length): Make extern.
1834 * expr.c (string_constant): Only handle the minor non-constant
1835 array index. Use string_constant to compute the length of
1836 a generic string constant.
1838 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1840 PR tree-optimization/86618
1841 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1842 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1844 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1846 PR tree-optimization/86636
1847 * json.cc (json::object::set): Fix comment. Add assertions.
1848 (json::array::append): Move here from json.h. Add comment and an
1850 (json::string::string): Likewise.
1851 * json.h (json::array::append): Move to json.cc.
1852 (json::string::string): Likewise.
1853 * optinfo-emit-json.cc
1854 (optrecord_json_writer::impl_location_to_json): Assert that we
1855 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1856 wrapper around it. Expand the location once, rather than three
1858 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1859 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1861 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1862 places. Fix some overlong lines.
1864 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1866 * config/aarch64/aarch64-simd.md
1867 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1868 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1869 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1870 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1871 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1872 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1873 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1874 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1875 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1877 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1880 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1881 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1882 and abs_d == d, do the power of two handling if profitable.
1884 2018-07-24 Richard Biener <rguenther@suse.de>
1886 * match.pd: Add BIT_FIELD_REF canonicalizations.
1888 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1891 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1893 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1895 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1896 terminated STRING_CST object.
1898 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1900 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1902 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1904 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1905 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1906 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1907 the elements into a register.
1908 (rs6000_split_v4si_init_di_reg): Delete.
1909 (rs6000_split_v4si_init): Delete.
1910 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1911 (vsx_init_v4si): Rewrite as a define_expand.
1913 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1915 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1916 zero_extend argument from memory): New.
1918 2018-07-22 Martin Sebor <msebor@redhat.com>
1921 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1922 diagnosing calls with unknown arguments unless -Walloca-larger-than
1923 is restricted to less than PTRDIFF_MAX bytes.
1925 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1927 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1929 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1931 * pretty-print.c (text_info::set_location): Remove redundant
1932 "line_table" parameter from call to rich_location::set_range.
1934 2018-07-20 Martin Sebor <msebor@redhat.com>
1937 * builtins.c (expand_builtin_alloca): Adjust.
1938 * calls.c (alloc_max_size): Simplify.
1939 * cgraphunit.c (cgraph_node::expand): Adjust.
1940 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1942 (frame_larger_than_size): Same.
1943 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1944 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1946 * doc/invoke.texi (GCC Command Options): Document option arguments.
1947 Explain byte-size arguments and suffixes.
1948 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1949 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1950 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1951 * doc/options.texi (UInteger): Expand.
1952 (Host_Wide_Int, ByteSize): Document new properties.
1953 * final.c (final_start_function_1): Include sizes in an error message.
1954 * function.c (frame_offset_overflow): Same.
1955 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1956 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1957 Diagnose unbounded alloca calls only for limits of less than
1959 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1960 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1962 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1963 only for limits of less than PTRDIFF_MAX.
1964 * langhooks-def.h (lhd_handle_option): Change function argument
1966 * langhooks.c (lhd_handle_option): Same.
1967 * langhooks.h (handle_option): Same.
1968 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1970 (var_type, var_type_struct): Same.
1971 (var_set): Handle ByteSize flag.
1972 * optc-gen.awk: Add comments to output to ease debugging. Make
1973 use of HOST_WIDE_INT where appropriate.
1974 * opts-gen-save.awk: Use %lx to format unsigned long.
1975 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1976 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1977 arguments. Parse bytes-size suffixes.
1978 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1979 (enum_value_to_arg): Same.
1980 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1981 (handle_option): Adjust.
1982 (generate_option): Change function argument to HOST_WIDE_INT.
1983 (cmdline_handle_error): Adjust.
1984 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1985 (set_option): Change function argument to HOST_WIDE_INT.
1986 (option_enabled): Handle cl_host_wide_int.
1987 (get_option_state): Handle CLVC_SIZE.
1988 (control_warning_option): Same.
1989 * opts.c (common_handle_option): Change function argument to
1990 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1991 OPT_Wvla_larger_than_.
1992 * opts.h (enum cl_var_type): Add an enumerator.
1993 * stor-layout.c (layout_decl): Print a more meaningful warning.
1994 * toplev.c (output_stack_usage): Adjust.
1996 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1998 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1999 call to inline_expand_builtin_string_cmp.
2000 (expand_builtin_strcmp): Likewise.
2001 (expand_builtin_strncmp): Likewise.
2002 (inline_string_cmp): Delete the last parameter, change char_type_node
2003 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2005 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2006 the inlining expansion on target where the type of the call has same or
2007 narrower precision than unsigned char.
2009 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2011 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2012 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2013 * common.opt (fsave-optimization-record): New option.
2014 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2015 * doc/invoke.texi (-fsave-optimization-record): New option.
2016 * dumpfile.c: Include "optinfo-emit-json.h".
2017 (struct kv_pair): Move to coretypes.h.
2018 (optgroup_options): Make non-static.
2019 (dump_context::end_scope): Call
2020 optimization_records_maybe_pop_dump_scope.
2021 * dumpfile.h (optgroup_options): New decl.
2022 * json.cc: New file.
2024 * optinfo-emit-json.cc: New file.
2025 * optinfo-emit-json.h: New file.
2026 * optinfo.cc: Include "optinfo-emit-json.h".
2027 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2028 (optinfo_enabled_p): Check optimization_records_enabled_p.
2029 (optinfo_wants_inlining_info_p): Likewise.
2030 * optinfo.h: Update comment.
2031 * profile-count.c (profile_quality_as_string): New function.
2032 * profile-count.h (profile_quality_as_string): New decl.
2033 (profile_count::quality): New accessor.
2034 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2035 and optinfo_emit_json_cc_tests.
2036 * selftest.h (selftest::json_cc_tests): New decl.
2037 (selftest::optinfo_emit_json_cc_tests): New decl.
2038 * toplev.c: Include "optinfo-emit-json.h".
2039 (compile_file): Call optimization_records_finish.
2040 (do_compile): Call optimization_records_start.
2041 * tree-ssa-live.c: Include optinfo.h.
2042 (remove_unused_scope_block_p): Retain inlining information if
2043 optinfo_wants_inlining_info_p returns true.
2045 2018-07-20 Richard Biener <rguenther@suse.de>
2048 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2049 to cover -flto-partition=none.
2051 2018-07-20 Martin Liska <mliska@suse.cz>
2053 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2054 (get_decl_source_range): Remove unused function.
2056 2018-07-20 Richard Biener <rguenther@suse.de>
2058 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2059 (struct vn_phi_s): Likewise.
2060 (struct vn_reference_s): Likewise.
2061 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2062 for searching the slot of an entry known to be in the hash itself.
2063 (vn_phi_hasher::equal): Likewise.
2064 (vn_reference_hasher::equal): Likewise.
2065 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2067 (optimistic_info, current_info): Remove, keeping only valid_info.
2068 (vn_reference_lookup_1): Remove fallback lookup.
2069 (vn_reference_lookup_2): Likewise.
2070 (vn_nary_op_lookup_1): Likewise.
2071 (vn_phi_lookup): Likewise.
2072 (vn_nary_build_or_lookup_1): Make sure to not chain the built
2074 (vn_reference_insert): Adjust, chain the inserted hash element
2075 at last_inserted_ref.
2076 (vn_reference_insert_pieces): Likewise.
2077 (visit_reference_op_call): Likewise.
2078 (vn_nary_op_insert_into): Chain the inserted hash element at
2080 (vn_nary_op_insert_pieces): Adjust.
2081 (vn_nary_op_insert): Likewise.
2082 (vn_nary_op_insert_stmt): Likewise.
2083 (vn_phi_insert): Adjust, chain the inserted hash element at
2085 (process_scc): Remove clearing and copying the optimistic
2086 table. Instead remove elements inserted during an optimistic
2087 iteration from the single table we maintain.
2088 (init_scc_vn): Adjust.
2089 (free_scc_vn): Likewise.
2090 (sccvn_dom_walker::record_cond): Likewise.
2091 (sccvn_dom_walker::after_dom_children): Likewise.
2093 2018-07-19 Martin Sebor <msebor@redhat.com>
2095 PR tree-optimization/84047
2096 PR tree-optimization/83776
2097 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2098 (check_array_bounds): Call it.
2100 2018-07-19 Martin Sebor <msebor@redhat.com>
2102 * align.h (align_flags): Use member initialization.
2104 2018-07-19 David Malcolm <dmalcolm@redhat.com>
2106 * Makefile.in (OBJS): Add optinfo.o.
2107 * coretypes.h (class symtab_node): New forward decl.
2108 (struct cgraph_node): New forward decl.
2109 (class varpool_node): New forward decl.
2110 * dump-context.h: New file.
2111 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2113 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2114 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2115 (set_alt_dump_file): Likewise.
2116 (dump_context::~dump_context): New dtor.
2117 (dump_gimple_stmt): Move implementation to...
2118 (dump_context::dump_gimple_stmt): ...this new member function.
2119 Add the stmt to any pending optinfo, creating one if need be.
2120 (dump_gimple_stmt_loc): Move implementation to...
2121 (dump_context::dump_gimple_stmt_loc): ...this new member function.
2122 Start a new optinfo and add the stmt to it.
2123 (dump_gimple_expr): Move implementation to...
2124 (dump_context::dump_gimple_expr): ...this new member function.
2125 Add the stmt to any pending optinfo, creating one if need be.
2126 (dump_gimple_expr_loc): Move implementation to...
2127 (dump_context::dump_gimple_expr_loc): ...this new member function.
2128 Start a new optinfo and add the stmt to it.
2129 (dump_generic_expr): Move implementation to...
2130 (dump_context::dump_generic_expr): ...this new member function.
2131 Add the tree to any pending optinfo, creating one if need be.
2132 (dump_generic_expr_loc): Move implementation to...
2133 (dump_context::dump_generic_expr_loc): ...this new member
2134 function. Add the tree to any pending optinfo, creating one if
2136 (dump_printf): Move implementation to...
2137 (dump_context::dump_printf_va): ...this new member function. Add
2138 the text to any pending optinfo, creating one if need be.
2139 (dump_printf_loc): Move implementation to...
2140 (dump_context::dump_printf_loc_va): ...this new member function.
2141 Start a new optinfo and add the stmt to it.
2142 (dump_dec): Move implementation to...
2143 (dump_context::dump_dec): ...this new member function. Add the
2144 value to any pending optinfo, creating one if need be.
2145 (dump_context::dump_symtab_node): New member function.
2146 (dump_context::get_scope_depth): New member function.
2147 (dump_context::begin_scope): New member function.
2148 (dump_context::end_scope): New member function.
2149 (dump_context::ensure_pending_optinfo): New member function.
2150 (dump_context::begin_next_optinfo): New member function.
2151 (dump_context::end_any_optinfo): New member function.
2152 (dump_context::s_current): New global.
2153 (dump_context::s_default): New global.
2154 (dump_scope_depth): Delete global.
2155 (dumpfile_ensure_any_optinfo_are_flushed): New function.
2156 (dump_symtab_node): New function.
2157 (get_dump_scope_depth): Reimplement in terms of dump_context.
2158 (dump_begin_scope): Likewise.
2159 (dump_end_scope): Likewise.
2160 (selftest::temp_dump_context::temp_dump_context): New ctor.
2161 (selftest::temp_dump_context::~temp_dump_context): New dtor.
2162 (selftest::verify_item): New function.
2163 (ASSERT_IS_TEXT): New macro.
2164 (ASSERT_IS_TREE): New macro.
2165 (ASSERT_IS_GIMPLE): New macro.
2166 (selftest::test_capture_of_dump_calls): New test.
2167 (selftest::dumpfile_c_tests): Call it.
2168 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2169 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2170 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2171 descriptive comment.
2172 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2173 (dump_node, dump_bb): Move these unrelated decls.
2174 (class dump_manager): Add leading comment.
2175 * optinfo.cc: New file.
2176 * optinfo.h: New file.
2178 2018-07-19 Michael Collison <michael.collison@arm.com>
2179 Richard Henderson <rth@redhat.com>
2181 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2182 (subti): Handle op1 zero.
2183 (subvti4, usub4ti4): New.
2184 (*sub<GPI>3_compare1_imm): New.
2185 (sub<GPI>3_carryinCV): New.
2186 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2187 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2189 2018-07-19 Michael Collison <michael.collison@arm.com>
2190 Richard Henderson <rth@redhat.com>
2192 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2193 (addti3): Create simpler code if low part is already known to be 0.
2194 (addvti4, uaddvti4): New.
2195 (*add<GPI>3_compareC_cconly_imm): New.
2196 (*add<GPI>3_compareC_cconly): New.
2197 (*add<GPI>3_compareC_imm): New.
2198 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2199 handle constants within this pattern..
2200 (*add<GPI>3_compareV_cconly_imm): New.
2201 (*add<GPI>3_compareV_cconly): New.
2202 (*add<GPI>3_compareV_imm): New.
2203 (add<GPI>3_compareV): New.
2204 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2205 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2206 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2207 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2208 with 'comparison' operator.
2209 (*add<GPI>3_compareV_cconly_imm): Ditto.
2210 (*add<GPI>3_compareV_cconly): Ditto.
2211 (*add<GPI>3_compareV_imm): Ditto.
2212 (add<GPI>3_compareV): Ditto.
2213 (add<mode>3_carryinC): Ditto.
2214 (*add<mode>3_carryinC_zero): Ditto.
2215 (*add<mode>3_carryinC): Ditto.
2216 (add<mode>3_carryinV): Ditto.
2217 (*add<mode>3_carryinV_zero): Ditto.
2218 (*add<mode>3_carryinV): Ditto.
2220 2018-07-19 Michael Collison <michael.collison@arm.com>
2221 Richard Henderson <rth@redhat.com>
2223 * config/aarch64/aarch64-modes.def (CC_V): New.
2224 * config/aarch64/aarch64-protos.h
2225 (aarch64_addti_scratch_regs): Declare
2226 (aarch64_subvti_scratch_regs): Declare.
2227 (aarch64_expand_subvti): Declare.
2228 (aarch64_gen_unlikely_cbranch): Declare
2229 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2230 for signed overflow using CC_Vmode.
2231 (aarch64_get_condition_code_1): Handle CC_Vmode.
2232 (aarch64_gen_unlikely_cbranch): New function.
2233 (aarch64_addti_scratch_regs): New function.
2234 (aarch64_subvti_scratch_regs): New function.
2235 (aarch64_expand_subvti): New function.
2237 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2239 * config/aarch64/aarch64-option-extensions.def: New entry for profile
2241 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2242 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2245 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2248 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2249 address check not strict.
2251 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2253 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2255 (store_pair_lanes<mode>): Likewise.
2256 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2257 enum value 'ADDR_QUERY_LDP_STP_N'.
2258 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2259 (aarch64_print_address_internal): Add declaration.
2260 (aarch64_print_ldpstp_address): Remove.
2261 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2262 (aarch64_print_operand): Change printing of 'y'.
2263 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2264 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2265 'true' rather than '1'.
2266 * config/aarch64/constraints.md (Uml): Likewise.
2267 (Uml): Rename to Umn.
2270 2018-07-19 Richard Biener <rguenther@suse.de>
2272 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2274 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2275 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2276 (vn_reference_hasher): Likewise.
2277 (struct vn_tables_s): Remove obstack and alloc-pool members.
2278 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2279 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2280 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2281 (vn_reference_insert_pieces): Likewise.
2282 (alloc_vn_nary_op_noinit): Adjust.
2283 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2284 (vn_phi_eq): Adjust.
2285 (shared_lookup_phiargs): Remove.
2286 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2287 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2288 (visit_reference_op_call): Likewise.
2289 (copy_nary, copy_phi, copy_reference): Remove.
2290 (process_scc): Rewind the obstack when iterating. Do not
2291 copy the elements to valid_info but just move them from one
2292 hashtable to the other.
2293 (allocate_vn_table): Adjust.
2294 (free_vn_table): Likewise.
2295 (init_scc_vn): Likewise.
2296 (free_scc_vn): Likewise.
2298 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
2301 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2302 indirect_return as function type attribute.
2303 (ix86_attribute_table): Change indirect_return to function
2305 * doc/extend.texi: Update indirect_return attribute.
2307 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
2309 * wide-int.h (widest2_int): New.
2310 * gimple-fold.c (arith_overflowed_p): Use it.
2311 * tree.h (widest2_int_cst): New.
2312 * tree-vrp.c (wide_int_binop_overflow): Rename from
2313 vrp_int_const_binop.
2314 Rewrite to work on trees.
2315 (extract_range_from_multiplicative_op_1): Abstract code to...
2316 (wide_int_range_min_max): ...here.
2317 (wide_int_range_cross_product): ...and here.
2318 (extract_range_from_binary_expr_1): Abstract overflow code to...
2319 (wide_int_range_mult_wrapping): ...here.
2320 * tree-vrp.h (wide_int_range_cross_product): New.
2321 (wide_int_range_mult_wrapping): New.
2323 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
2324 Julia Koval <julia.koval@intel.com>
2326 * config/i386/x86-tune-costs.h (skylake_memcpy,
2327 skylake_memset): Replace rep_prefix with unrolling for size 512.
2329 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
2332 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2335 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
2337 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2338 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2339 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2340 previously known as "PowerPC AltiVec Built-in Functions". Move
2341 some material to new subsubsections "PowerPC AltiVec Built-in
2342 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2344 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2345 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2346 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2347 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2349 2018-07-18 Richard Biener <rguenther@suse.de>
2351 PR tree-optimization/86557
2352 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2355 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
2357 * config/s390/s390.c (s390_function_profiler): Generate CFI.
2359 2018-07-17 Jeff Law <law@redhat.com>
2361 * config/arm/arm.c (get_label_padding): Update for recent
2362 changes to label_to_alignment.
2364 PR tree-optimization/86010
2365 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2367 * config/mips/mips.c (vr4130_align_insns): Update for recent
2368 changes to label_to_alignment.
2370 * config/frv/frv.c (frv_label_align): Update for recent changes
2371 to label_to_alignment.
2373 * config/nios2/nios2.c (nios2_label_align): Update for recent
2374 changes which dropped ALIGN_LABELS_LOG.
2376 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
2378 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2379 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2381 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
2383 * config/arc/arc.c (arc_label_align): Use align_labels instead of
2384 deprecated align_labels_log.
2386 2018-07-17 Richard Biener <rguenther@suse.de>
2389 * dwarf2out.c (init_sections_and_labels): Always generate
2390 a debug_line_str_section for early LTO debug.
2391 (dwarf2out_finish): Reset debug_line_str_hash output early.
2392 Bump counter for extra dwarf5 .debug_loc labels to not conflict
2394 (dwarf2out_early_finish): Output debug_line_str.
2396 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2398 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2399 index register on z196 or later.
2401 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2403 * config/s390/s390.c (s390_default_align): Set default function
2405 (s390_override_options_after_change): Call s390_default align.
2406 (s390_option_override_internal): Call s390_default_align.
2407 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2409 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2412 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2413 to _looptemp_ clauses, other than the first two.
2415 2018-07-17 Martin Liska <mliska@suse.cz>
2417 * opts.c: Do not enable OPT_falign_* for -Os.
2419 2018-07-17 Martin Liska <mliska@suse.cz>
2421 * align.h (MAX_CODE_ALIGN): New.
2422 (MAX_CODE_ALIGN_VALUE): New.
2423 * common/config/i386/i386-common.c (ix86_handle_option):
2424 (MAX_CODE_ALIGN): Moved to align.h.
2425 * final.c (MAX_CODE_ALIGN): Likewise.
2426 * opts.c (parse_and_check_align_values):
2427 (MAX_CODE_ALIGN): Likewise.
2428 (MAX_CODE_ALIGN_VALUE): Likewise.
2430 2018-07-17 Martin Liska <mliska@suse.cz>
2432 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2433 in order to fulfil coding style.
2434 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2435 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2436 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2437 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2438 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2439 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2440 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2441 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2442 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2444 2018-07-17 Martin Liska <mliska@suse.cz>
2446 * align.h: New file.
2447 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2448 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2449 align_flags of label_to_alignment.
2450 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2452 * config/m68k/m68k.c: Do not use removed align_labels_value and
2454 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2455 (LOOP_ALIGN): Likewise.
2456 (LABEL_ALIGN): Likewise.
2457 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2458 Remove not used macro.
2459 (rs6000_loop_align): Change return type to align_flags.
2460 (rs6000_loop_align_max_skip): Remove.
2461 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2462 Change return type to align_flags.
2463 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2464 Remove not used macro.
2465 (rs6000_loop_align): Change return type to align_flags.
2466 (rs6000_loop_align_max_skip): Remove.
2467 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2468 * config/rx/rx-protos.h (rx_align_for_label): Make it
2470 * config/rx/rx.c (rx_align_for_label): Change return type
2472 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2474 into align_flags class.
2475 (LABEL_ALIGN): Likewise.
2476 (LOOP_ALIGN): Likewise.
2477 * config/s390/s390.c (s390_label_align): Use align_flags
2479 (s390_asm_output_function_label): Likewise.
2480 * config/sh/sh.c (sh_override_options_after_change):
2481 Use align_flags class directly without macros.
2482 (find_barrier): Likewise.
2483 (barrier_align): Likewise.
2484 (sh_loop_align): Likewise.
2485 * config/spu/spu.c (spu_option_override):
2486 Use align_flags_tuple::get_value instead of removed macros.
2487 (spu_sched_init): Likewise.
2488 * config/spu/spu.h (GTY): Likewise.
2489 * config/visium/visium.c (visium_option_override):
2490 Set "8" as default secondary alignment.
2491 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2492 in order to guarantee secondary alignment of 8.
2493 * coretypes.h: Include align.h header file.
2494 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2495 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2496 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2497 * doc/tm.texi.in: Likewise.
2498 * final.c (struct label_alignment): Remove not used structure.
2499 (LABEL_ALIGN): Change type to align_flags.
2500 (LOOP_ALIGN): Likewise.
2501 (JUMP_ALIGN): Likewise.
2502 (default_loop_align_max_skip): Remove.
2503 (default_label_align_max_skip): Likewise.
2504 (default_jump_align_max_skip): Likewise.
2505 (default_label_align_after_barrier_max_skip):
2506 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2507 (LABEL_TO_MAX_SKIP): Remove.
2508 (label_to_alignment): Return align_flags type instead of integer.
2509 (label_to_max_skip): Remove.
2510 (align_fuzz): Use align_flags type.
2511 (compute_alignments): Use align_flags type and use align_flags::max
2512 to combine multiple alignments.
2513 (grow_label_align): Grow vec instead of C array.
2514 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2515 (shorten_branches): Use align_flags type and use align_flags::max
2516 to combine multiple alignments.
2517 (final_scan_insn_1): Remove usage of secondary alignment that comes
2518 from label alignment, but instead use proper secondary alignment
2519 which is computed in grow_label_align.
2520 * flags.h (struct align_flags_tuple): Move to align.h.
2521 (struct align_flags): Likewise.
2522 (state_align_loops): Rename to align_loops.
2523 (state_align_jumps): Rename to align_jumps.
2524 (state_align_labels): Rename to align_labels.
2525 (state_align_functions): Rename to align_functions.
2526 (align_loops_log): Remove.
2527 (align_jumps_log): Remove.
2528 (align_labels_log): Remove.
2529 (align_functions_log): Remove.
2530 (align_loops_max_skip): Remove.
2531 (align_jumps_max_skip): Remove.
2532 (align_labels_max_skip): Remove.
2533 (align_functions_max_skip): Remove.
2534 (align_loops_value): Remove.
2535 (align_jumps_value): Remove.
2536 (align_labels_value): Remove.
2537 (align_functions_value): Remove.
2538 * output.h (label_to_alignment): Change return type to align_flags.
2539 (label_to_max_skip): Remove.
2540 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2541 jump_align_max_skip macros.
2542 * targhooks.h (default_loop_align_max_skip): Remove.
2543 (default_label_align_max_skip): Likewise.
2544 (default_jump_align_max_skip): Likewise.
2545 (default_label_align_after_barrier_max_skip): Remove.
2546 * toplev.c (read_log_maxskip): Use ::normalize function.
2547 (parse_N_M): Remove not used argument and also call ::normalize.
2548 (parse_alignment_opts): Do not pass unused arguments.
2549 * varasm.c (assemble_start_function): Use directly align_functions
2550 instead of removed macros.
2551 * system.h: Do not poison removed macros.
2553 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2556 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2557 and cond temporaries don't have reference type if iterator has
2558 pointer type. For init use &for_pre_body instead of pre_p if
2559 for_pre_body is non-empty.
2561 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2563 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2564 double-double modes to SFmode directly directly.
2565 (trunc<mode>sf2_fprs): Delete.
2567 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2569 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2570 for conversions between IFmode and the decimal floating point modes.
2571 (init_float128_ieee): Use the correct names for conversions between
2572 KFmode and the decimal floating point modes.
2574 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2576 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2577 for the conversions between TDmode and IFmode.
2578 (init_float128_ieee): Use more correct names for the conversions
2579 between TDmode and KFmode.
2581 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2583 PR tree-optimization/86526
2584 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2585 (inline_expand_builtin_string_cmp): Likewise.
2586 (inline_string_cmp): Likewise. Use c_readstr instead of
2587 builtin_memcpy_read_str. Add unit_mode temporary.
2589 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2592 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2593 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2595 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2597 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2598 Alphabetize prototypes of built-in functions, separating out
2599 built-in functions that are listed in this section but should be
2600 described elsewhere.
2602 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2605 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2606 conditional move when trapping comparison was split to a
2607 non-trapping one (and vice versa).
2609 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2611 * config/s390/s390.c (s390_function_profiler): Generate nops
2612 instead of profiler call sequences.
2613 * config/s390/s390.opt: Add the new option.
2615 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2617 * config/s390/s390.c (s390_function_profiler): Generate
2618 __mcount_loc section.
2619 * config/s390/s390.opt: Add the new option.
2621 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2623 * common.opt: Add the new warning.
2624 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2625 %r0,__fentry__" when -mfentry is specified.
2626 (s390_option_override_internal): Disallow -mfentry for 31-bit
2628 * config/s390/s390.opt: Add the new option.
2630 2018-07-16 Richard Biener <rguenther@suse.de>
2633 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2634 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2636 2018-07-16 Martin Liska <mliska@suse.cz>
2639 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2642 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2644 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2646 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2648 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2650 * config/arc/arc-cpus.def (hs4x): New cpu.
2652 * config/arc/arc-tables.opt: Regenerate.
2653 * config/arc/arc.c (arc_sched_issue_rate): New function.
2654 (TARGET_SCHED_ISSUE_RATE): Define.
2655 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2656 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2658 (attr tune): Add ARCHS4x tune values.
2659 (attr tune_dspmpy): Define.
2660 (*tst): Correct instruction type.
2661 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2662 * config/arc/arcHS4x.md: New file.
2663 * config/arc/fpu.md: Update instruction type attributes.
2664 * config/arc/t-multilib: Regenerate.
2666 2018-07-16 Tom de Vries <tdevries@suse.de>
2669 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2671 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2673 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2676 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2678 PR tree-optimization/86514
2679 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2680 conversion to a boolean type from a type with greater precision.
2682 2018-07-16 Tom de Vries <tdevries@suse.de>
2684 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2685 dump_flags request TDF_SLIM.
2687 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2689 * fold-const.c (int_const_binop_1): Abstract...
2690 (wide_int_binop): ...wide int code here.
2691 (poly_int_binop): ...poly int code here.
2692 Abstract the rest of int_const_binop_1 into int_const_binop.
2693 * fold-const.h (wide_int_binop): New.
2694 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2695 Remove useless PLUS/MINUS_EXPR case.
2696 (zero_nonzero_bits_from_vr): Move wide int code...
2697 (zero_nonzero_bits_from_bounds): ...here.
2698 (extract_range_from_binary_expr_1): Move mask optimization code...
2699 (range_easy_mask_min_max): ...here.
2700 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2701 (range_easy_mask_min_max): New.
2703 2018-07-15 Jeff Law <law@redhat.com>
2706 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2709 2018-07-14 Jim Wilson <jimw@sifive.com>
2711 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2713 2018-07-14 Paul Koning <ni1d@arrl.net>
2715 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2717 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2719 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2722 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2723 Steve Munroe <munroesj52@gmail.com>
2725 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2726 (_mm_andnot_si128): Likewise.
2727 (_mm_or_si128): Likewise.
2728 (_mm_xor_si128): Likewise.
2730 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2733 * builtins.c (expand_builtin_memcmp): Inline the calls first
2734 when result_eq is false.
2735 (expand_builtin_strcmp): Inline the calls first.
2736 (expand_builtin_strncmp): Likewise.
2737 (inline_string_cmp): New routine. Expand a string compare
2738 call by using a sequence of char comparison.
2739 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2740 a call to str(n)cmp/memcmp.
2741 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2743 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2745 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2747 * config/arm/driver-arm.c: Include arm-native.h.
2748 (host_detect_local_cpu): Use auto-generated data tables.
2749 (vendors, arm_cpu_table): Delete. Move part information to ...
2750 * config/arm/arm-cpus.in: ... here.
2751 * config/arm/parsecpu.awk (gen_native): New function.
2752 (vendor, part): New CPU fields.
2753 (END): Add support for building the native CPU detection tables.
2754 * config/arm/t-arm (arm-native.h): Add build rule.
2755 (driver-arm.o): Add dependency on arm-native.h.
2757 2018-07-13 Richard Biener <rguenther@suse.de>
2760 * match.pd (addr1 - addr2): Allow either of the operand to
2763 2018-07-13 Tom de Vries <tdevries@suse.de>
2765 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2768 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2770 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2771 arrays instead of numbered variables.
2773 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2775 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2776 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2778 2018-07-13 Richard Biener <rguenther@suse.de>
2781 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2782 instead of get_context_die.
2784 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2785 Richard Biener <rguenther@suse.de>
2788 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2789 that the loop latch destination where phi is defined.
2791 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2793 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2794 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2795 (riscv_set_current_function): Extract getting interrupt type to new
2797 (riscv_get_interrupt_type): New function.
2798 (riscv_merge_decl_attributes): New function, checking interrupt type is
2800 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2802 2018-07-12 Paul Koning <ni1d@arrl.net>
2804 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2807 2018-07-12 Paul Koning <ni1d@arrl.net>
2809 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2810 zero reference, add doloop_end instead.
2811 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2812 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2813 detail for doloop_end.
2815 2018-07-12 Martin Sebor <msebor@redhat.com>
2818 * attribs.c (decl_attributes): Reject conflicting attributes before
2819 calling attribute handlers.
2821 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2823 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2825 (gcc::dump_manager::get_dump_file_name): likewise.
2826 (dump_begin): Likewise.
2827 * dumpfile.h (dump_begin): Update prototype.
2828 (gcc::dump_manager::get_dump_file_name,
2829 gcc::dump_manager::get_dump_file_name): Update prototype.
2831 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2833 * internal-fn.h (vectorizable_internal_fn_p): New function.
2834 * tree-vect-slp.c (compatible_calls_p): Likewise.
2835 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2836 to internal functions.
2837 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2839 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2841 * fold-const.h (inverse_conditions_p): Declare.
2842 * fold-const.c (inverse_conditions_p): New function.
2843 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2844 that test the inverse condition of a conditional internal function.
2845 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2846 * internal-fn.c (internal_fn_mask_index): Handle conditional
2848 (vectorized_internal_fn_supported_p): New function.
2849 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2850 (any_pred_load_store): Replace with...
2851 (need_to_predicate): ...this new variable.
2852 (redundant_ssa_names): New variable.
2853 (ifcvt_can_use_mask_load_store): Move initial checks to...
2854 (ifcvt_can_predicate): ...this new function. Handle tree codes
2855 for which a conditional internal function exists.
2856 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2857 instead of ifcvt_can_use_mask_load_store. Update after variable
2859 (predicate_load_or_store): New function, split out from
2860 predicate_mem_writes.
2861 (check_redundant_cond_expr): New function.
2862 (value_available_p): Likewise.
2863 (predicate_rhs_code): Likewise.
2864 (predicate_mem_writes): Rename to...
2865 (predicate_statements): ...this. Use predicate_load_or_store
2866 and predicate_rhs_code.
2867 (combine_blocks, tree_if_conversion): Update after above name changes.
2868 (ifcvt_local_dce): Handle redundant_ssa_names.
2869 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2870 general conditional functions.
2871 * tree-vect-stmts.c (vectorizable_call): Likewise.
2873 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2874 Alan Hayward <alan.hayward@arm.com>
2875 David Sherwood <david.sherwood@arm.com>
2877 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2878 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2879 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2880 plus and minus and convert them into IFN_COND_FMA-based sequences.
2881 (convert_mult_to_fma): Handle conditional plus and minus.
2883 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2885 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2886 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2887 (cond_fnms_optab): New optabs.
2888 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2890 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2891 * internal-fn.h (get_conditional_internal_fn): Declare.
2892 (get_unconditional_internal_fn): Likewise.
2893 * internal-fn.c (cond_ternary_direct): New macro.
2894 (expand_cond_ternary_optab_fn): Likewise.
2895 (direct_cond_ternary_optab_supported_p): Likewise.
2896 (FOR_EACH_COND_FN_PAIR): Likewise.
2897 (get_conditional_internal_fn): New function.
2898 (get_unconditional_internal_fn): Likewise.
2899 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2900 (gimple_match_op::gimple_match_op): Add a new overload for 5
2902 (gimple_match_op::set_op): Likewise.
2903 (gimple_resimplify5): Declare.
2904 * genmatch.c (decision_tree::gen): Generate simplifications for
2906 * gimple-match-head.c (gimple_simplify): Define an overload for
2907 5 operands. Handle calls with 5 arguments in the top-level overload.
2908 (convert_conditional_op): Handle conversions from unconditional
2909 internal functions to conditional ones.
2910 (gimple_resimplify5): New function.
2911 (build_call_internal): Pass a fifth operand.
2912 (maybe_push_res_to_seq): Likewise.
2913 (try_conditional_simplification): Try converting conditional
2914 internal functions to unconditional internal functions.
2915 Handle 3-operand unconditional forms.
2916 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2917 Define ternary equivalents of the current rules for binary conditional
2919 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2921 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2922 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2923 (optab): Handle them.
2924 (SVE_COND_FP_TERNARY): New int iterator.
2925 (sve_fmla_op, sve_fmad_op): New int attributes.
2926 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2927 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2928 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2930 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2932 * target.def (preferred_else_value): New target hook.
2933 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2934 * doc/tm.texi: Regenerate.
2935 * targhooks.h (default_preferred_else_value): Declare.
2936 * targhooks.c (default_preferred_else_value): New function.
2937 * internal-fn.h (conditional_internal_fn_code): Declare.
2938 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2939 (get_conditional_internal_fn): Use it.
2940 (conditional_internal_fn_code): New function.
2941 * gimple-match.h (gimple_match_cond): New struct.
2942 (gimple_match_op): Add a cond member function.
2943 (gimple_match_op::gimple_match_op): Update all forms to take a
2945 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2946 for the suboperation, but don't specify a particular else_value.
2947 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2948 (visit_nary_op, visit_reference_op_load): Pass
2949 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2950 * gimple-match-head.c: Include tree-eh.h
2951 (convert_conditional_op): New function.
2952 (maybe_resimplify_conditional_op): Likewise.
2953 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2954 (gimple_resimplify2): Likewise.
2955 (gimple_resimplify3): Likewise.
2956 (gimple_resimplify4): Likewise.
2957 (maybe_push_res_to_seq): Return null for conditional operations.
2958 (try_conditional_simplification): New function.
2959 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2961 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2963 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2965 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2967 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2969 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2971 (hash_tree): Do not hash DECL_FCONTEXT
2972 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2973 Do not stream DECL_FCONTEXT.
2974 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2975 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2977 2018-07-12 Richard Biener <rguenther@suse.de>
2980 * dwarf2out.c (gen_block_die): Only output blocks when they have
2981 at least one !DECL_IGNORED_P variable.
2983 2018-07-12 Richard Biener <rguenther@suse.de>
2986 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2987 Remove -mieee-fp handling.
2989 2018-07-12 Richard Biener <rguenther@suse.de>
2991 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2992 left-over from last patch.
2994 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2996 PR tree-optimization/86492
2997 * gimple-ssa-store-merging.c
2998 (imm_store_chain_info::coalesce_immediate_stores): Call
2999 check_no_overlap even for the merge_overlapping case. Formatting fix.
3001 2018-07-12 Richard Biener <rguenther@suse.de>
3004 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3005 move possibly trapping operations into the conditional.
3007 2018-07-12 Richard Biener <rguenther@suse.de>
3009 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3010 (vn_lookup_simplify_result): Remove recursion limit applied
3012 (vn_nary_build_or_lookup_1): Adjust.
3013 (try_to_simplify): Likewise.
3014 * gimple-match-head.c (gimple_resimplify1): Instead apply one
3016 (gimple_resimplify2): Likewise.
3017 (gimple_resimplify3): Likewise.
3018 (gimple_resimplify4): Likewise.
3020 2018-07-11 Jakub Jelinek <jakub@redhat.com>
3022 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3023 Use __mmask64 type instead of __mmask8 for __M argument.
3024 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3025 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3027 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3028 __mmask16 for __M argument.
3029 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3030 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3031 to __mmask16 instead of __mmask8.
3032 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3033 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3034 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3035 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3036 instead of __mmask16 for __U argument.
3037 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3038 __mmask16 instead of __mmask8 for __U argument.
3039 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3041 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3043 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3045 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3047 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3049 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3051 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3053 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3055 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3057 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3059 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3060 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3061 return type as well as __M argument type and all casts from __mmask8
3063 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3064 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3065 return type as well as __M argument type and all casts from __mmask8
3067 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3068 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3069 return type as well as __M argument type and all casts from __mmask8
3071 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3072 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3073 return type as well as __M argument type and all casts from __mmask8
3075 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3076 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3079 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3081 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3082 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3085 2018-07-11 Paul Koning <ni1d@arrl.net>
3087 * doc/md.texi (define_subst): Document how multiple occurrences of
3088 the same argument in the replacement pattern are handled.
3090 2018-07-11 Paul Koning <ni1d@arrl.net>
3092 * doc/extend.texi (Common Variable Attributes): Move "mode" into
3094 (Common Type Attributes): Add "mode" attribute.
3096 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
3098 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3099 stream DECL_ORIGINAL_TYPE.
3100 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3101 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3102 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3103 Do not walk original type.
3104 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3106 (write_ts_decl_non_common_tree_pointers): Do not stream
3108 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3109 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3111 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3113 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3114 thread twice from the same starting edge.
3116 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3118 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3119 * gimple.c (gimple_call_nonnull_result_p): ...here...
3120 (gimple_call_nonnull_arg): ...and here.
3121 * gimple.h (gimple_call_nonnull_result_p): New.
3122 (gimple_call_nonnull_arg): New.
3124 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
3126 * config/arm/arm-cpus.in: Move information from fpu field of each
3127 cpu definition to the isa field.
3128 * config/arm/parsecpu.awk (fpu): Delete match rule.
3129 (gen_comm_data): Don't add bits from the CPU's FPU entry.
3131 2018-07-11 Richard Biener <rguenther@suse.de>
3134 * dwarf2out.c (init_sections_and_labels): Use
3135 output_asm_line_debug_info consistently.
3136 (dwarf2out_early_finish): Likewise.
3137 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3140 2018-07-11 Richard Biener <rguenther@suse.de>
3142 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3143 Rework father_bb setting in a way to avoid propagating constants
3144 multiple times on a loop body.
3146 2018-07-10 Mark Wielaard <mark@klomp.org>
3149 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3151 2018-07-10 Richard Biener <rguenther@suse.de>
3153 * hash-map.h (hash_map::iterator::operator*): Return
3154 references to key and value.
3156 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3159 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3160 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3161 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3162 (gimplify_omp_for): For composite loops, move outer
3163 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3164 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
3165 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
3166 TREE_LIST for both the original class iterator and the "last" helper
3167 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
3168 loop, remember has_decl_expr from outer composite loops for the
3169 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3171 2018-07-09 Martin Sebor <msebor@redhat.com>
3175 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3176 accessing implicitly initialized array elements.
3177 * expr.c (string_constant): Handle string initializers of
3178 character arrays within aggregates.
3179 * gimple-fold.c (fold_array_ctor_reference): Add argument.
3180 Store element offset. As a special case, handle zero size.
3181 (fold_nonarray_ctor_reference): Same.
3182 (fold_ctor_reference): Add argument. Store subobject offset.
3183 * gimple-fold.h (fold_ctor_reference): Add argument.
3185 2018-07-09 Paul Koning <ni1d@arrl.net>
3187 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3188 (pdp11_insn_cost): New function.
3189 (pdp11_md_asm_adjust): New function.
3190 (TARGET_INVALID_WITHIN_DOLOOP): Define.
3191 (pdp11_rtx_costs): Update to match machine better.
3192 (output_addr_const_pdp11): Correct format mismatch warnings.
3193 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3194 * config/pdp11/pdp11.md: General change to add base_cost and/or
3195 length attributes for use by new pdp11_insn_cost function.
3196 (MIN_BRANCH): Correct definition.
3198 (doloop_end): Use standard pattern name for looping pattern.
3199 (doloop_end_nocc): New.
3200 (movsf): Add another constraint alternative.
3201 (zero_extendqihi2): Add constraint alternatives for not in place
3203 (zero_extendhisi2): Remove.
3204 (shift patterns): Add CC handling variants.
3208 (define_peephole2): New peephole to recognize mov that sets CC for
3211 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3213 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3214 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3217 2018-07-09 Jakub Jelinek <jakub@redhat.com>
3220 * real.c (real_nextafter): Return true if result is denormal.
3222 2018-07-09 Martin Liska <mliska@suse.cz>
3224 * common.opt: Add back wrongly removed attribute.
3226 2018-07-09 Richard Biener <rguenther@suse.de>
3229 * dwarf2out.c (gen_block_die): For an early generated DIE
3230 always output high/low PC attributes.
3232 2018-07-09 Tom de Vries <tdevries@suse.de>
3234 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3235 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3236 onto VAR_DECL with abstract origin.
3238 2018-07-07 Jim Wilson <jimw@sifive.com>
3240 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3242 2018-07-07 Tom de Vries <tdevries@suse.de>
3244 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3246 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
3248 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3250 (combine_bound): Use wide-int overflow calculation instead of
3252 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3254 * fold-const.c (int_const_binop_2): Same.
3255 (extract_muldiv_1): Same.
3256 (fold_div_compare): Same.
3257 (fold_abs_const): Same.
3259 * poly-int.h (add): Same.
3263 * predict.c (predict_iv_comparison): Same.
3264 * profile-count.c (slow_safe_scale_64bit): Same.
3265 * simplify-rtx.c (simplify_const_binary_operation): Same.
3266 * tree-chrec.c (tree_fold_binomial): Same.
3267 * tree-data-ref.c (split_constant_offset_1): Same.
3268 * tree-if-conv.c (idx_within_array_bound): Same.
3269 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3270 * tree-ssa-phiopt.c (minmax_replacement): Same.
3271 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3272 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3273 * vr-values.c (vr_values::adjust_range_with_scev): Same.
3274 * wide-int.cc (wi::add_large): Same.
3275 (wi::mul_internal): Same.
3276 (wi::sub_large): Same.
3277 (wi::divmod_internal): Same.
3278 * wide-int.h: Change overflow type to overflow_type for neg, add,
3279 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3280 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3281 mul_internal, divmod_internal.
3282 (overflow_type): New enum.
3283 (accumulate_overflow): New.
3285 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3287 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3288 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3290 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3292 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3293 argument is checked for zero before entering loop, avoid checking again.
3295 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3297 * gimplify.h (generic_expr_could_trap_p): Set as global function.
3298 * gimplify.h (generic_expr_could_trap_p): Likwise.
3299 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3301 2018-07-06 Jakub Jelinek <jakub@redhat.com>
3303 PR tree-optimization/86401
3304 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3305 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3306 (fold_bit_and_mask): ... here. New helper function for match.pd.
3307 * fold-const.h (fold_bit_and_mask): Declare.
3308 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3310 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3313 * target.def (translate_mode_attribute): New hook.
3314 * targhooks.h (default_translate_mode_attribute): Declare.
3315 * targhooks.c (default_translate_mode_attribute): New function.
3316 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3317 * doc/tm.texi: Regenerate.
3318 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3319 (rs6000_translate_mode_attribute): New function.
3321 2018-07-06 Paul Koning <ni1d@arrl.net>
3323 * doc/md.texi (define_split): Document DONE and FAIL.
3324 (define_peephole2): Ditto.
3326 2018-07-05 Jeff Law <law@redhat.com>
3328 PR tree-optimization/86010
3329 * tree-ssa-dse.c (compute_trims): More aggressively trim at
3330 both the head and tail of mem* and str* calls.
3332 2018-07-05 Jim Wilson <jimw@sifive.com>
3334 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3336 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
3338 * config/aarch64/aarch64-simd.md: correct flags text for
3339 MIN_EXPR replacement.
3341 2018-07-05 James Clarke <jrtc27@jrtc27.com>
3343 * configure: Regenerated.
3345 2018-07-05 Carl Love <cel@us.ibm.com>
3347 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3348 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3349 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3350 VSX_BUILTIN_DOUBLEL_V4SF.
3352 2018-07-05 Martin Sebor <msebor@redhat.com>
3355 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3356 than its domain to compute its the upper bound of a char array.
3358 2018-07-05 Nathan Sidwell <nathan@acm.org>
3360 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3361 * doc/cpp.texi: Update comment.
3362 * doc/tm.texi: Rebuilt.
3363 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3364 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3365 * doc/extend.texi (Backwards Compatibility): Clarify it is system
3366 headers affected by extern "C".
3367 * system.h: Poison NO_IMPLICIT_EXTERN_C.
3368 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3369 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3370 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3371 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3372 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3373 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3374 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3375 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3376 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3377 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3378 config/sparc/sp64-elf.h, config/spu/spu.h,
3379 config/stormy16/stormy16.h, config/v850/v850.h,
3380 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3381 define NO_IMPLICIT_EXTERN_C.
3382 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3384 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3387 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3388 instead of GET_MODE_SIZE when comparing Units.
3390 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3393 * rtlanal.c (set_noop_p): Constrain on mode change,
3394 include hard-reg-set.h
3396 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3398 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3400 2018-07-05 Jakub Jelinek <jakub@redhat.com>
3403 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3406 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3408 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3410 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3413 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3415 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3417 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
3420 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3422 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
3424 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3425 neg_*_op* variables.
3427 2018-07-04 Martin Liska <mliska@suse.cz>
3429 * tree-switch-conversion.c: Define
3430 max_ratio_for_speed and max_ratio_for_size constants.
3432 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3433 Martin Liska <mliska@suse.cz>
3438 * common.opt: Rename align options with 'str_' prefix.
3439 * common/config/i386/i386-common.c (set_malign_value): New
3441 (ix86_handle_option): Use it to set -falign-* options/
3442 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3443 type from int to string.
3444 * config/aarch64/aarch64.c: Update default values from int
3446 * config/alpha/alpha.c (alpha_override_options_after_change):
3448 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3449 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3450 max skip conditionally.
3451 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3452 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3453 max skip conditionally.
3454 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3455 max skip conditionally.
3456 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3457 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3458 max skip conditionally.
3459 * config/i386/i386.c (struct ptt): Change type from int to
3461 (ix86_default_align): Set default values.
3462 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3463 max skip conditionally.
3464 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3465 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3466 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3467 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3468 max skip conditionally.
3469 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3470 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3471 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3472 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3473 max skip conditionally.
3474 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3475 * config/ia64/ia64.c (ia64_option_override): Set default values
3476 for alignment options.
3477 * config/m68k/m68k.c: Handle new str_align_* options.
3478 * config/mips/mips.c (mips_set_compression_mode): Change
3480 (mips_option_override): Set default values for options.
3481 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3483 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3485 * config/rx/rx.c (rx_option_override): Likewise.
3486 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3487 (LABEL_ALIGN): Use align_labels_log.
3488 (LOOP_ALIGN): Use align_loops_align.
3489 * config/s390/s390.c (s390_asm_output_function_label): Use new
3491 * config/sh/sh.c (sh_override_options_after_change):
3492 Change type of constants.
3493 * config/spu/spu.c (spu_sched_init): Likewise.
3494 * config/sparc/sparc.c (sparc_option_override): Set default
3496 * config/visium/visium.c (visium_option_override): Likewise.
3497 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3498 emit p2align format with last argument if it's not needed.
3499 * doc/invoke.texi: Document extended format of -falign-*.
3500 * final.c: Use align_labels alignment.
3501 * flags.h (struct target_flag_state): Change type to use
3503 (struct align_flags_tuple): New.
3504 (struct align_flags): Likewise.
3505 (align_loops_log): Redefine macro to use new types.
3506 (align_loops_max_skip): Redefine macro to use new types.
3507 (align_jumps_log): Redefine macro to use new types.
3508 (align_jumps_max_skip): Redefine macro to use new types.
3509 (align_labels_log): Redefine macro to use new types.
3510 (align_labels_max_skip): Redefine macro to use new types.
3511 (align_functions_log): Redefine macro to use new types.
3512 (align_loops): Redefine macro to use new types.
3513 (align_jumps): Redefine macro to use new types.
3514 (align_labels): Redefine macro to use new types.
3515 (align_functions): Redefine macro to use new types.
3516 (align_functions_max_skip): Redefine macro to use new types.
3517 (align_loops_value): New macro.
3518 (align_jumps_value): New macro.
3519 (align_labels_value): New macro.
3520 (align_functions_value): New macro.
3521 * function.c (invoke_set_current_function_hook): Propagate
3522 alignment values from flags to global variables default in
3524 * ipa-icf.c (sem_function::equals_wpa): Use
3525 cl_optimization_option_eq instead of memcmp.
3526 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3528 (cl_optimization_stream_in): Likewise.
3529 * optc-save-gen.awk: Support strings in cl_optimization.
3530 * opth-gen.awk: Likewise.
3531 * opts.c (finish_options): Remove error checking of invalid
3533 (MAX_CODE_ALIGN): Remove.
3534 (MAX_CODE_ALIGN_VALUE): Likewise.
3535 (parse_and_check_align_values): New function.
3536 (check_alignment_argument): Likewise.
3537 (common_handle_option): Use check_alignment_argument.
3538 * opts.h (parse_and_check_align_values): Declare.
3539 * toplev.c (init_alignments): Remove.
3540 (read_log_maxskip): New.
3541 (parse_N_M): Likewise.
3542 (parse_alignment_opts): Likewise.
3543 (backend_init_target): Remove usage of init_alignments.
3544 * toplev.h (parse_alignment_opts): Declare.
3545 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3547 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3548 * tree.c (cl_option_hasher::equal): New.
3549 * varasm.c: Use new global macros.
3551 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3553 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3554 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3555 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3556 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3557 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3558 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3559 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3560 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3561 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3562 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3563 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3564 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3565 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3567 2018-07-04 Martin Liska <mliska@suse.cz>
3568 Jonathan Wakely <jwakely@redhat.com>
3570 * coverage.c: Use correct type.
3571 * doc/invoke.texi: Language correction.
3573 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3576 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3577 ENDBRANCH for non-tail call which may return via indirect branch.
3578 * doc/extend.texi: Document indirect_return attribute.
3580 2018-07-03 Martin Sebor <msebor@redhat.com>
3582 PR tree-optimization/86274
3583 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3585 (format_floating): Correct handling of infinities and NaNs.
3587 2018-07-03 Martin Sebor <msebor@redhat.com>
3589 * print-tree.c (print_real_cst): New function.
3590 (print_node_brief): Call it.
3591 (print_node): Ditto.
3593 2018-07-03 Jeff Law <law@redhat.com>
3595 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3596 into a single pattern.
3598 * config/h8300/h8300.md (ors code_iterator): New.
3599 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3600 a single pattern and single splitter.
3601 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3602 (iorqi3_1, xorqi3_1): Likewise.
3603 (iorqi3, xorqi3 expanders): Similarly.
3605 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3606 (movmd_internal) into a single pattern using the P mode iterator.
3607 (movmd splitters): Similarly.
3608 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3609 (movsd splitters): Similarly.
3611 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3612 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3613 right table based on the size of the operand.
3614 * config/h8300/h8300.md (length_table): Corresponding changes. All
3615 references to "addb", "addw" and "addl" changed to "add".
3616 (btst patterns): Merge two variants into a single pattern.
3617 (tstqi, tsthi): Likewise.
3618 (addhi3_incdec, addsi3_incdec): Likewise.
3619 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3620 (mulhi3, mulsi3): Likewise.
3621 (udivhi3, udivsi3): Likewise.
3622 (divhi3, divsi3): Likewise.
3623 (andorqi3, andorhi3, andorsi3): Likewise.
3625 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3628 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3629 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3631 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3633 PR tree-optimization/85694
3634 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3635 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3637 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3638 (<u>avg<mode>3_ceil): New patterns.
3640 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3642 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3643 scan-tree-dump directive.
3644 * gcc.dg/vect/slp-perm-2.c: Likewise.
3645 * gcc.dg/vect/slp-perm-3.c: Likewise.
3646 * gcc.dg/vect/slp-perm-5.c: Likewise.
3647 * gcc.dg/vect/slp-perm-6.c: Likewise.
3648 * gcc.dg/vect/slp-perm-7.c: Likewise.
3649 * gcc.dg/vect/slp-perm-8.c: Likewise.
3651 2018-07-03 Marek Polacek <polacek@redhat.com>
3654 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3656 2018-07-03 Richard Biener <rguenther@suse.de>
3659 * tree-ssa-structalias.c (find_func_clobbers): Properly
3660 handle indirect calls.
3662 2018-07-03 Jeff Law <law@redhat.com>
3664 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3665 (shifts): New code iterator.
3666 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3667 expander. Fix HImode handling on H8/SX.
3668 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3669 (subqi3, subhi3, subsi3 expanders): Likewise.
3670 (andqi3, andhi3, andsi3 expanders): Likewise.
3671 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3672 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3673 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3674 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3675 (zero_extendqihi2, zero_extendqisi2): Likewise.
3676 (extendqihi2, extendqisi2): Likewise.
3677 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3678 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3679 (rotlqi3_1, rotlhi3_1): Likewise.
3680 (logicalhi3_sn, logicalsi3_sn): Likewise.
3681 (logicalhi3, logicalsi3): Likewise.
3683 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3685 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3686 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3687 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3688 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3689 type to append_pattern_def_seq instead of creating a stmt_vec_info
3691 (build_mask_conversion): Likewise. Remove vinfo argument.
3692 (vect_add_conversion_to_patterm): Likewise, renaming to...
3693 (vect_add_conversion_to_pattern): ...this.
3694 (vect_recog_mask_conversion_pattern): Update call to
3695 build_mask_conversion. Pass the vector type to
3696 append_pattern_def_seq here too.
3697 (vect_recog_gather_scatter_pattern): Update call to
3698 vect_add_conversion_to_pattern.
3700 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3702 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3703 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3704 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3705 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3706 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3707 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3708 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3709 append_pattern_def_seq instead of new_pattern_def_seq.
3710 (vect_recog_divmod_pattern): Do both of the above.
3711 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3714 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3716 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3717 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3718 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3719 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3720 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3721 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3722 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3723 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3724 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3725 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3726 parameter with a single stmt_vec_info.
3727 (vect_recog_func_ptr): Likewise.
3728 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3729 (vect_try_gather_scatter_pattern): ...this.
3730 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3731 the stmt_vec_info of the statement to be matched. Don't clear
3732 STMT_VINFO_RELATED_STMT.
3733 (vect_pattern_recog): Update call accordingly.
3735 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3737 PR tree-optimization/85694
3738 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3739 (uavgM3_ceil): Document new optabs.
3740 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3741 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3743 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3744 (savg_ceil_optab): New optabs.
3745 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3746 (vect_vect_recog_func_ptrs): Add it.
3747 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3748 constant directly from the associated lhs.
3750 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3752 * tree-vect-patterns.c (vect_split_statement): New function.
3753 (vect_convert_input): Use it to try to split an existing cast.
3755 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3757 * poly-int.h (print_hex): New function.
3758 * dumpfile.h (dump_dec, dump_hex): Declare.
3759 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3760 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3761 min_input_precision, operation_precision and operation_sign.
3762 * tree-vect-patterns.c (vect_get_range_info): New function.
3763 (vect_same_loop_or_bb_p, vect_single_imm_use)
3764 (vect_operation_fits_smaller_type): Delete.
3765 (vect_look_through_possible_promotion): Add an optional
3766 single_use_p parameter.
3767 (vect_recog_over_widening_pattern): Rewrite to use new
3768 stmt_vec_info infomration. Handle one operation at a time.
3769 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3770 (vect_truncatable_operation_p, vect_set_operation_type)
3771 (vect_set_min_input_precision): New functions.
3772 (vect_determine_min_output_precision_1): Likewise.
3773 (vect_determine_min_output_precision): Likewise.
3774 (vect_determine_precisions_from_range): Likewise.
3775 (vect_determine_precisions_from_users): Likewise.
3776 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3777 (vect_vect_recog_func_ptrs): Put over_widening first.
3779 (vect_pattern_recog): Call vect_determine_precisions.
3781 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3783 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3784 statements that have been replaced by further pattern statements.
3785 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3787 2018-07-03 Richard Biener <rguenther@suse.de>
3789 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3790 always set *dt. Dump vectype in vectype overload.
3791 * dumpfile.h (dump_gimple_expr): New function.
3792 (dump_gimple_expr_loc): Likewise.
3793 * dumpfile.c (dump_gimple_expr): New function.
3794 (dump_gimple_expr_loc): Likewise.
3796 2018-07-02 Jeff Law <law@redhat.com>
3798 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3799 the H8/300, H8/300H and H8/S variants into a single pattern.
3800 (movhi_h8300, movqi_h8300hs): Similarly.
3801 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3802 (QHI mode iterator): New.
3804 * config/h8300/h8300.md: Remove trailing whitespace.
3806 2018-07-02 Jim Wilson <jimw@sifive.com>
3808 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3809 instead of emit_insn for interrupt returns.
3810 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3811 (riscv_sret, riscv_uret): Likewise.
3813 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3815 * pretty-print.c (selftest::test_pp_format): Move save and restore
3816 of quotes to class auto_fix_quotes, and add an instance.
3817 * selftest.c: Include "intl.h".
3818 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3819 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3820 * selftest.h (selftest::auto_fix_quotes): New class.
3822 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3824 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3825 (aarch64_sve_prepare_conditional_op): Remove.
3826 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3827 Allow aarch64_simd_reg_or_zero as select operand; remove
3828 the aarch64_sve_prepare_conditional_op call.
3829 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3830 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3831 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3832 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3833 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3834 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3835 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3836 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3837 and a splitters to match all of the *_any patterns.
3838 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3840 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3841 (SVE_COND_FP_BINARY_REV): Remove.
3842 (sve_int_op_rev, sve_fp_op_rev): New.
3843 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3844 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3845 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3846 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3847 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3848 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3849 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3850 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3851 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3853 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3854 Remove match_dup 1 from the inner unspec.
3855 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3857 * config/aarch64/aarch64.md (movprfx): New attr.
3858 (length): Default movprfx to 8.
3859 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3860 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3861 (*<su>mul<SVE_I>3_highpart): Likewise.
3862 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3863 (*v<ASHIFT><SVE_I>3): Likewise.
3864 (*<su><MAXMIN><SVE_I>3): Likewise.
3865 (*<su><MAXMIN><SVE_F>3): Likewise.
3866 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3867 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3868 (*div<SVE_F>4): Likewise.
3870 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3872 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3875 2018-07-02 Richard Biener <rguenther@suse.de>
3877 PR tree-optimization/86363
3878 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3879 memset argument refers to a non-variable address.
3881 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3883 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3884 {PLUS,MINUS}_EXPR code to...
3885 (adjust_symbolic_bound): ...here,
3886 (combine_bound): ...here,
3887 (set_value_range_with_overflow): ...and here.
3889 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3891 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3893 (extract_range_from_abs_expr): ...here.
3895 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3897 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3898 -fno-omit-frame-pointer when not optimizing.
3900 2018-07-02 Martin Liska <mliska@suse.cz>
3903 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3904 (propagate_nothrow): Likewise.
3906 2018-07-02 Martin Liska <mliska@suse.cz>
3909 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3911 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3913 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3914 function in r262149, changing "loc" param from source_location to
3915 const dump_location_t &.
3916 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3917 declaration, as above.
3919 2018-07-01 Paul Koning <ni1d@arrl.net>
3921 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3922 -munit-asm, -mgnu-asm, -mdec-asm.
3923 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3924 (pdp11_output_labelref): New.
3925 (pdp11_output_def): New.
3926 (pdp11_output_addr_vec_elt): New.
3927 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3928 %# and %@ format codes.
3929 (pdp11_option_override): New.
3930 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3931 (pdp11_output_ident): New.
3932 (pdp11_asm_named_section): New.
3933 (pdp11_asm_init_sections): New.
3934 (pdp11_file_start): New.
3935 (pdp11_file_end): New.
3936 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3937 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3938 %o, like %c but octal.
3939 (pdp11_option_override): New.
3940 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3942 (DATA_SECTION_ASM_OP): Ditto.
3943 (READONLY_DATA_SECTION_ASM_OP): New.
3944 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3945 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3946 (ASM_OUTPUT_LABELREF): Ditto.
3947 (ASM_OUTPUT_DEF): Ditto.
3948 (ASM_OUTPUT_EXTERNAL): New.
3949 (ASM_OUTPUT_SOURCE_FILENAME): New.
3950 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3951 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3952 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3953 %# and %@ format codes.
3954 * config/pdp11/pdp11.opt (mgnu-asm): New.
3955 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3956 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3957 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3959 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3961 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3962 dereferencing path[] beyond its length.
3964 (debug_all_paths): New.
3965 (rewire_first_differing_edge): New.
3966 (adjust_paths_after_duplication): New.
3967 (duplicate_thread_path): Call adjust_paths_after_duplication.
3969 (thread_through_all_blocks): Add new argument to
3970 duplicate_thread_path.
3972 2018-06-30 Jim Wilson <jimw@sifive.com>
3974 * config/riscv/predicates.md (p2m1_shift_operand): New.
3975 (high_mask_shift_operand): New.
3976 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3977 pattern using p2m1_shift_operand.
3978 (lshsi3_zero_extend_3+2): New combiner pattern using
3979 high_mask_shift_operand.
3981 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3983 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3985 (vect_recog_rotate_pattern): ...here.
3986 (vect_convert_input): Try to insert casts of invariants in the
3988 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3989 preheader to be empty.
3991 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3993 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3994 vector type. If given, install it in the new statement's
3996 (vect_element_precision): New function.
3997 (vect_unpromoted_value): New struct.
3998 (vect_unpromoted_value::vect_unpromoted_value): New function.
3999 (vect_unpromoted_value::set_op): Likewise.
4000 (vect_look_through_possible_promotion): Likewise.
4001 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4002 (vect_widened_op_tree, vect_convert_input): Likewise.
4003 (vect_convert_inputs, vect_convert_output): Likewise.
4004 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4005 to handle the optional cast of the multiplication result and
4006 vect_widened_op_tree to detect the widened multiplication itself.
4007 Do not require the input and output of promotion casts to have
4008 the same sign, but base the signedness of the operation on the
4009 input rather than the result. If the pattern includes two
4010 promotions, check that those promotions have the same sign.
4011 Do not restrict the MULT_EXPR handling to a double-width result;
4012 handle quadruple-width results and wider. Use vect_convert_inputs
4013 to convert the inputs to the common type.
4014 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
4015 to handle the optional cast of the ABS result. Also allow a sign
4016 change or a sign extension between the ABS and MINUS.
4017 Use vect_widened_op_tree to detect the widened subtraction and use
4018 vect_convert_inputs to convert the inputs to the common type.
4019 (vect_handle_widen_op_by_const): Delete.
4020 (vect_recog_widen_op_pattern): New function.
4021 (vect_recog_widen_mult_pattern): Use it.
4022 (vect_recog_widen_shift_pattern): Likewise.
4023 (vect_recog_widen_sum_pattern): Use
4024 vect_look_through_possible_promotion to handle the promoted
4027 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4029 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4030 the containing gimple_seq *.
4031 * gimple-iterator.h (gsi_for_stmt): Declare it.
4032 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4033 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4034 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4035 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4036 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4038 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4040 (vect_mark_pattern_stmts): ...here. Handle cases in which the
4041 statement being replaced is part of an existing pattern
4042 definition sequence, inserting the new pattern statements before
4044 (vect_pattern_recog_1): Don't return a bool. If the statement
4045 is already part of a pattern, instead apply pattern matching
4046 to the pattern definition statements. Don't clear the
4047 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4048 (vect_pattern_recog): Don't break after the first match;
4049 continue processing the pattern definition statements instead.
4050 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4052 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4054 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4055 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4056 (vect_recog_widen_sum_pattern): Use it.
4058 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4060 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4061 phi is not a pattern statement and has not been replaced by
4062 a pattern statement.
4063 * tree-vect-patterns.c (type_conversion_p): Don't check
4064 STMT_VINFO_IN_PATTERN_P.
4065 (vect_recog_vector_vector_shift_pattern): Likewise.
4066 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4067 the pattern statement rather than the original statement; check
4068 directly for a WIDEN_MULT_EXPR here.
4069 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4070 vect_is_simple_use to return the pattern statement rather
4071 than the original statement; use is_pattern_stmt_p to check
4072 for such a pattern statement.
4073 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4074 to return the pattern statement rather than the original statement;
4075 don't do the same transformation here.
4076 (vect_is_simple_use): If the defining statement has been replaced
4077 by a pattern statement, return the pattern statement instead.
4078 Remove the corresponding (local) transformation from the vectype
4081 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4083 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4084 end and default to null.
4085 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4086 (vectorizable_reduction): Update calls accordingly, dropping the
4087 gimple ** argument if the passed-back statement isn't needed.
4088 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4089 (vect_recog_rotate_pattern): Likewise.
4090 (vect_recog_mask_conversion_pattern): Likewise.
4091 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4092 (vect_mask_constant_operand_p): Likewise.
4093 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4094 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4095 (get_group_load_store_type, get_load_store_type): Likewise.
4096 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4097 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4098 (vectorizable_conversion, vectorizable_assignment): Likewise.
4099 (vectorizable_shift, vectorizable_operation): Likewise.
4100 (vectorizable_store, vect_is_simple_cond): Likewise.
4101 (vectorizable_condition, vectorizable_comparison): Likewise.
4102 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4103 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4104 and move it to the end. Cope with null def_stmt_outs.
4106 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4108 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4110 2018-06-29 Jeff Law <law@redhat.com>
4112 * config/v850/v850.c (v850_legitimate_address_p): Handle large
4113 displacements for TARGET_V850E2V3 and newer.
4114 (TARGET_LRA_P): Remove. Defaults to LRA now.
4115 * config/v850/v850.md (sign23byte_load): Remove.
4116 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4117 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4119 2018-06-29 Martin Liska <mliska@suse.cz>
4122 * coverage.c (coverage_init): Mangle full path name.
4123 * doc/invoke.texi: Document the change.
4124 * gcov-io.c (mangle_path): New.
4125 * gcov-io.h (mangle_path): Likewise.
4126 * gcov.c (mangle_name): Use mangle_path for path mangling.
4128 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4130 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4131 if starting source register is not even.
4133 2018-06-29 Martin Liska <mliska@suse.cz>
4135 PR tree-optimization/86263
4136 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4137 Make edge redirection.
4139 2018-06-29 David Malcolm <dmalcolm@redhat.com>
4141 * dumpfile.c (dump_loc): Add indentation based on scope depth.
4142 (dump_scope_depth): New variable.
4143 (get_dump_scope_depth): New function.
4144 (dump_begin_scope): New function.
4145 (dump_end_scope): New function.
4146 * dumpfile.h (get_dump_scope_depth): New declaration.
4147 (dump_begin_scope): New declaration.
4148 (dump_end_scope): New declaration.
4149 (class auto_dump_scope): New class.
4150 (AUTO_DUMP_SCOPE): New macro.
4151 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4154 2018-06-29 Richard Biener <rguenther@suse.de>
4156 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4157 compute_all_dependences succeeds.
4158 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4159 exceed --param loop-max-datarefs-for-datadeps.
4161 2018-06-29 Jakub Jelinek <jakub@redhat.com>
4163 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4165 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
4168 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4169 alternative 0 in preferred_for_speed attribute.
4171 2018-06-28 Paul Koning <ni1d@arrl.net>
4173 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4174 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4175 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4176 * config/pdp11/pdp11.md: Correct "length" attribute calculation
4177 for shift insn patterns.
4179 2018-06-28 David Malcolm <dmalcolm@redhat.com>
4181 * cgraph.c (cgraph_node::get_body): Replace assignments to
4182 "dump_file" with calls to set_dump_file.
4183 * dumpfile.c (alt_dump_file): Make static, and group with...
4184 (alt_flags): ...this definition.
4185 (dumps_are_enabled): New variable.
4186 (refresh_dumps_are_enabled): New function.
4187 (set_dump_file): New function.
4188 (set_alt_dump_file): New function.
4189 (gcc::dump_manager::dump_start): Replace assignments to
4190 "dump_file" and "alt_dump_file" with calls to set_dump_file and
4192 (gcc::dump_manager::dump_finish): Likewise.
4193 * dumpfile.h (alt_dump_file): Delete decl.
4194 (dumps_are_enabled): New variable decl.
4195 (set_dump_file): New function decl.
4196 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4198 * tree-nested.c (lower_nested_functions): Replace assignments to
4199 "dump_file" with calls to set_dump_file.
4201 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4203 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4204 goto_locus of each outgoing edge of each basic block.
4206 2018-06-28 Richard Biener <rguenther@suse.de>
4208 * dwarf2out.c (decl_scope_table): Remove.
4209 (push_decl_scope): Likewise.
4210 (pop_decl_scope): Likewise.
4211 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4212 (gen_struct_or_union_type_die): Likewise.
4213 (gen_tagged_type_die): Likewise.
4214 (dwarf2out_init): Do not initialize decl_scope_table.
4215 (dwarf2out_c_finalize): Do not free it.
4217 2018-06-28 Richard Biener <rguenther@suse.de>
4219 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4220 deciding whether to not re-use a DIE.
4222 2018-06-28 Richard Biener <rguenther@suse.de>
4224 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4225 DW_AT_abstract_origin attribute.
4227 2018-06-28 Martin Liska <mliska@suse.cz>
4229 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4230 Use newly introduced constants.
4231 * tree-switch-conversion.h (struct jump_table_cluster):
4232 Define max_ratio_for_size and max_ratio_for_speed.
4234 2018-06-28 Martin Liska <mliska@suse.cz>
4236 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4237 Add new checking assert to catch invalid state.
4238 (jump_table_cluster::can_be_handled): Handle single case
4240 (jump_table_cluster::is_beneficial): Bail out for such case.
4241 (bit_test_cluster::find_bit_tests):
4242 Add new checking assert to catch invalid state.
4243 (bit_test_cluster::can_be_handled): Handle single case
4245 (bit_test_cluster::is_beneficial): Bail out for such case.
4246 (switch_decision_tree::analyze_switch_statement):
4249 2018-06-28 Martin Liska <mliska@suse.cz>
4251 * common.opt: Introduce -completion option.
4252 * gcc.c (driver_handle_option): Handle it.
4253 (driver::main): Print completions if completion
4255 * opt-suggestions.c (option_proposer::get_completions):
4257 (option_proposer::suggest_completion): Likewise.
4258 (option_proposer::find_param_completions): Likewise.
4259 (verify_autocompletions): Likewise.
4260 (test_completion_valid_options): Likewise.
4261 (test_completion_valid_params): Likewise.
4262 (in_completion_p): Likewise.
4263 (empty_completion_p): Likewise.
4264 (test_completion_partial_match): Likewise.
4265 (test_completion_garbage): Likewise.
4266 (opt_proposer_c_tests): Likewise.
4267 * opt-suggestions.h: Declare new functions.
4268 * opts.c (common_handle_option): Handle OPT__completion_.
4269 * selftest-run-tests.c (selftest::run_tests): Add
4270 opt_proposer_c_tests.
4271 * selftest.c (assert_str_startswith): New.
4272 * selftest.h (assert_str_startswith): Likewise.
4273 (opt_proposer_c_tests): New.
4274 (ASSERT_STR_STARTSWITH): Likewise.
4276 2018-06-28 Martin Liska <mliska@suse.cz>
4278 * Makefile.in: Add opt-suggestions.o.
4279 * gcc-main.c: Include opt-suggestions.h.
4280 * gcc.c (driver::driver): Likewise.
4281 (driver::~driver): Remove m_option_suggestions.
4282 (driver::build_option_suggestions): Moved to option_proposer.
4283 (driver::suggest_option): Likewise.
4284 (driver::handle_unrecognized_options): Use option_proposer.
4285 * gcc.h (class driver): Add new memver m_option_proposer.
4286 * opt-suggestions.c: New file.
4287 * opt-suggestions.h: New file.
4289 2018-06-28 Martin Liska <mliska@suse.cz>
4291 * vec.h (class auto_string_vec): New (moved from auto_argvec).
4292 (auto_string_vec::~auto_string_vec): Likewise.
4294 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4296 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4297 prevent_decl_creation_for_types fields up and add reset_location field.
4298 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4299 statement if id->reset_location is true.
4300 (copy_edges_for_bb): Do not set goto_locus on the new edges if
4301 id->reset_location is true.
4302 (copy_phis_for_bb): Force input_location on the arguments if
4303 id->reset_location is true.
4304 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4305 is set on the function to be inlined.
4307 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
4309 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4311 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
4313 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4314 registers for Pmode.
4315 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4316 hard registers for the clobbered pseudo.
4318 2018-06-27 Paul Koning <ni1d@arrl.net>
4320 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4321 mutually exclusive options.
4322 * config/pdp11/constraints.md (h): New constraint.
4323 (O): Update definition to match shift code generation.
4324 (D): New constraint.
4325 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4327 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4329 (output_jump): Change arguments.
4330 (pdp11_fixed_cc_regs): New function.
4331 (pdp11_cc_mode): Ditto.
4332 (pdp11_expand_shift): Ditto.
4333 (pdp11_assemble_shift): Ditto.
4334 (pdp11_small_shift): Ditto.
4335 (pdp11_branch_cost): Remove.
4336 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4338 (pdp11_register_move_cost): Update for CC registers.
4339 (pdp11_rtx_costs): Add case for LSHIFTRT.
4340 (pdp11_output_jump): Add CCNZ mode conditional branches.
4341 (notice_update_cc_on_set): Remove.
4342 (pdp11_cc_mode): New function.
4343 (simple_memory_operand): Correct pre/post decrement case.
4344 (no_side_effect_operand): New function.
4345 (pdp11_regno_reg_class): Add CC_REGS class.
4346 (pdp11_fixed_cc_regs): New function.
4347 (pdp11_small_shift): New function.
4348 (pdp11_expand_shift): New function to expand shift insns.
4349 (pdp11_assemble_shift): New function to output shifts.
4350 (pdp11_branch_cost): Remove.
4351 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4352 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4353 (WCHAR_TYPE): Ditto.
4354 (PTRDIFF_TYPE): Ditto.
4355 (ADJUST_INSN_LENGTH): New macro.
4356 (FIXED_REGISTERS): Add CC registers.
4357 (CALL_USED_REGISTERS): Ditto.
4359 (REG_CLASS_NAMES): Ditto.
4360 (REG_CLASS_CONTENTS): Ditto.
4361 (SELECT_CC_MODE): Use new function.
4362 (TARGET_FLAGS_REGNUM): New macro.
4363 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4364 (cc0_reg_rtx): Remove.
4365 (CC_STATUS_MDEP): Remove.
4366 (CC_STATUS_MDEFP_INIT): Remove.
4367 (CC_IN_FPU): Remove.
4368 (NOTICE_UPDATE_CC): Remove.
4369 (REGISTER_NAMES): Add CC registers.
4370 (BRANCH_COST): Change to constant 1.
4371 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4373 * config/pdp11/pdp11.opt (mbcopy): Remove.
4374 (mbcopy-builtin): Remove.
4375 (mbranch-cheap): Remove.
4376 (mbranch-expensive): Remove.
4377 * config/pdp11/predicates.md (expand_shift_operand): Update to
4378 match shift code generation.
4379 (ccnz_operator): New predicate.
4380 * doc/invoke.texi (PDP-11 Options): Remove deleted options
4381 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4382 Remove non-existent option -mabshi, -mno-abshi. Document mutually
4384 * doc/md.texi (PDP-11): Document new D and h constraints. Update
4385 description of O constraint.
4387 2018-06-27 Jeff Law <law@redhat.com>
4388 Austin Law <austinklaw@gmail.com>
4390 * config/v850/v850.md (addsi3_set_flags): New pattern.
4391 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4392 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4393 (zero_extendhisi2_v850_set_flags): Likewise.
4394 (zero_extendqisi2_v850_set_flags): Likewise.
4395 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4396 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4397 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4399 * config/v850/v850-protos.h (notice_update_cc): Remove.
4400 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4401 (v850_print_operand): Handle 'D' and "d".
4402 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4403 Add handling of arithmetic/logical operations compared against zero.
4404 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4405 Do not look at v850_compare_op, instead get mode from last argument.
4406 (v850_gen_compare): Remove
4407 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4408 after reload for prologue insns.
4409 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4411 (construct_save_jarl): Likewise.
4412 (TARGET_FLAGS_REGNUM): Define.
4413 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4414 (NOTICE_UPDATE_CC): Remove.
4415 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4416 than cc0. Conditionalize on reload_completed.
4417 (cmpsi_insn, setfcc_insn): Likewise.
4418 (tst1 splitter): Turn into define_and_split which sets the flags
4420 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4421 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4422 (cstoresf4, cstoredf4): Clobber the flags.
4423 (cmpsi, cmpsf, cmpdf): Remove expanders.
4424 (setf_insn): Remove pattern.
4425 (addsi3): Turn into define_and_split which clobbers the flags after
4426 reload and a suitable pattern (addsi3_clobber_flags) for use after
4428 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4429 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4430 (ashrsi3, ashrsi3_v850e2): Likewise.
4431 (bins): Clobber the flags.
4432 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4433 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4434 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4435 (call_value_internal_short, call_value_internal_long): Likewise.
4436 (callt_save_interrupt, callt_return_interrupt): Likewise.
4437 (save_interrupt, return_interrupt): Likewise.
4438 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4439 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4440 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4441 (All FP comparisons): Only allow after reload has completed.
4443 (divh, divhu): Tweak output template.
4444 (branch_z_normal, branch_z_invert): Remove
4445 (branch_nz_normal, branch_nz_invert): Likewise.
4446 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4448 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4449 * config/v850/v850.c (notice_update_cc): Remove.
4450 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4451 (CC_NO_CARRY): Likewise.
4452 (NOTICE_UPDATE_CC): Define to nothing.
4453 * config/v850/v850.md: Remove block comment on cc0 handling
4454 Remove "cc" attribute from all patterns. Remove cc_status handling
4455 from all patterns. Minor formatting fixes.
4457 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4459 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4460 (cortex-a76.cortex-a55): Likewise.
4461 * config/aarch64/aarch64-tune.md: Regenerate.
4462 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4463 cortex-a76.cortex-a55.
4465 2018-06-27 Jeff Law <law@redhat.com>
4467 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4468 (MULTILIB_DIRNAMES): Similarly.
4470 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4472 * gimple.h (gimple_return_retbnd): Delete.
4473 (gimple_return_set_retbnd): Likewise.
4474 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4475 gimple_return_set_retbnd.
4476 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4477 gimple_return_retbnd and adjust.
4478 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4479 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4480 Explicitly return NULL in a couple more cases. Move assertion
4481 on debug statements and remove unreachable code.
4482 (reset_debug_binding): Do not test id->retbnd.
4483 (expand_call_inline): Do not set it.
4485 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4487 * configure.ac: Add --disable-gcov option.
4488 * configure: Regenerate.
4489 * Makefile.in: Honour @enable_gcov@.
4490 * doc/install.texi: Document --disable-gcov.
4492 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4494 * config/arm/arm-cpus.in (cortex-a76): New entry.
4495 (cortex-a76.cortex-a55): Likewise.
4496 * config/arm/arm-tables.opt: Regenerate.
4497 * config/arm/arm-tune.md: Likewise.
4498 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4499 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4500 cortex-a76.cortex-a55.
4502 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4505 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4507 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4509 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4511 (EPILOGUE_USES): Likewise.
4513 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4515 * tree-inline.c (remap_location): New function extracted from...
4516 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4517 (copy_phis_for_bb): ...here. Call remap_location.
4518 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4520 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4522 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4523 unaligned vsx for 16B memset.
4525 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4528 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4529 ieee128_float_type_node to long_double_type_node unless
4530 TARGET_LONG_DOUBLE_128 is set.
4532 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4534 * cfgloop.c (get_loop_location): Convert return type from
4535 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4536 by implicit construction from rtx_insn *, and using
4537 dump_user_location_t::from_function_decl for the fallback case.
4538 * cfgloop.h (get_loop_location): Convert return type from
4539 location_t to dump_user_location_t.
4540 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4541 dump_printf_loc to pass in a dump_location_t rather than a
4542 location_t, via the gimple stmt.
4543 * coverage.c (get_coverage_counts): Update calls to
4544 dump_printf_loc to pass in dump_location_t rather than a
4546 * doc/optinfo.texi (Dump types): Convert example of
4547 dump_printf_loc from taking "locus" to taking "insn". Update
4548 description of the "_loc" calls to cover dump_location_t.
4549 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4551 (dump_user_location_t::dump_user_location_t): New constructors,
4552 from gimple *stmt and rtx_insn *.
4553 (dump_user_location_t::from_function_decl): New function.
4554 (dump_loc): Make static.
4555 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4556 const dump_location_t &.
4557 (dump_generic_expr_loc): Delete.
4558 (dump_printf_loc): Convert param "loc" from location_t to
4559 const dump_location_t &.
4560 (selftest::test_impl_location): New function.
4561 (selftest::dumpfile_c_tests): New function.
4562 * dumpfile.h: Include "profile-count.h".
4563 (class dump_user_location_t): New class.
4564 (struct dump_impl_location_t): New struct.
4565 (class dump_location_t): New class.
4566 (dump_printf_loc): Convert 2nd param from source_location to
4567 const dump_location_t &.
4568 (dump_generic_expr_loc): Delete.
4569 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4570 const dump_location_t &.
4571 * gimple-fold.c (fold_gimple_assign): Update call to
4572 dump_printf_loc to pass in a dump_location_t rather than a
4573 location_t, via the gimple stmt.
4574 (gimple_fold_call): Likewise.
4575 * gimple-loop-interchange.cc
4576 (loop_cand::analyze_iloop_reduction_var): Update for change to
4577 check_reduction_path.
4578 (tree_loop_interchange::interchange): Update for change to
4580 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4581 change in return-type of find_loop_location.
4582 (graphite_regenerate_ast_isl): Likewise.
4583 * graphite-optimize-isl.c (optimize_isl): Likewise.
4584 * graphite.c (graphite_transform_loops): Likewise.
4585 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4586 pass in a dump_location_t rather than a location_t, via the
4588 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4589 * ipa.c (walk_polymorphic_call_targets): Likewise.
4590 * loop-unroll.c (report_unroll): Convert "locus" param from
4591 location_t to dump_location_t.
4592 (decide_unrolling): Update for change to get_loop_location's
4594 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4595 location_t to dump_user_location_t.
4596 (grid_find_single_omp_among_assignments_1): Updates calls to
4597 dump_printf_loc to pass in a dump_location_t rather than a
4598 location_t, via the gimple stmt.
4599 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4600 location_t to dump_location_t. Updates calls to dump_printf_loc
4601 to pass in a dump_location_t rather than a location_t, via the
4603 (grid_inner_loop_gridifiable_p): Likewise.
4604 (grid_dist_follows_simple_pattern): Likewise.
4605 (grid_gfor_follows_tiling_pattern): Likewise.
4606 (grid_target_follows_gridifiable_pattern): Likewise.
4607 (grid_attempt_target_gridification): Convert initialization
4608 of local "grid" from memset to zero-initialization; FIXME: does
4609 this require C++11? Update call to dump_printf_loc to pass in a
4610 optinfo_location rather than a location_t, via the gimple stmt.
4611 * profile.c (read_profile_edge_counts): Updates call to
4612 dump_printf_loc to pass in a dump_location_t rather than a
4614 (compute_branch_probabilities): Likewise.
4615 * selftest-run-tests.c (selftest::run_tests): Call
4617 * selftest.h (dumpfile_c_tests): New decl.
4618 * tree-loop-distribution.c (pass_loop_distribution::execute):
4619 Update for change in return type of find_loop_location.
4620 * tree-parloops.c (parallelize_loops): Likewise.
4621 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4622 "locus" from location_t to dump_user_location_t.
4623 (canonicalize_loop_induction_variables): Likewise.
4624 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4625 for change in return type of find_loop_location.
4626 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4627 to dump_printf_loc to pass in a dump_location_t rather than a
4628 location_t, via the stmt.
4629 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4631 * tree-vect-loop-manip.c (find_loop_location): Convert return
4632 type from source_location to dump_user_location_t.
4633 (vect_do_peeling): Update for above change.
4634 (vect_loop_versioning): Update for change in type of
4636 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4637 from location_t to dump_user_location_t.
4638 (vect_estimate_min_profitable_iters): Update for change in type
4640 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4641 location_t to dump_location_t.
4642 (vect_slp_bb): Update for change in type of vect_location.
4643 * tree-vectorizer.c (vect_location): Convert from source_location
4644 to dump_user_location_t.
4645 (try_vectorize_loop_1): Update for change in vect_location's type.
4646 (vectorize_loops): Likewise.
4647 (increase_alignment): Likewise.
4648 * tree-vectorizer.h (vect_location): Convert from source_location
4649 to dump_user_location_t.
4650 (find_loop_location): Convert return type from source_location to
4651 dump_user_location_t.
4652 (check_reduction_path): Convert 1st param from location_t to
4653 dump_user_location_t.
4654 * value-prof.c (check_counter): Update call to dump_printf_loc to
4655 pass in a dump_user_location_t rather than a location_t; update
4656 call to error_at for change in type of "locus".
4657 (check_ic_target): Update call to dump_printf_loc to
4658 pass in a dump_user_location_t rather than a location_t, via the
4661 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4663 * config/s390/s390.h (enum processor_flags): Do not use
4664 default tune parameter when -march was specified.
4666 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4669 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4670 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4673 2018-06-26 Richard Biener <rguenther@suse.de>
4675 PR tree-optimization/86287
4677 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4678 (vect_analyze_loop): Initialize n_stmts.
4680 2018-06-26 Richard Biener <rguenther@suse.de>
4683 * fold-const.c (fold_convertible_p): Pointer extension
4686 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4689 * dwarf2out.c (loc_list_has_views): Adjust comments.
4690 (dw_loc_list): Split single cross-partition range with
4693 2018-06-25 Jeff Law <law@redhat.com>
4695 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4696 on -mbig-switch by default.
4698 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4700 (const_float_0_operand): Remove unused predicate.
4701 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4702 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4703 (recipsf2): New expander. Original pattern now called
4705 (recipdf2, recipdf2_insn): Similarly.
4706 (rsqrtsf2, rsqrtsf2_insn): Similarly
4707 (rsqrtdf2, rsqrtdf2_insn): Similarly
4709 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4711 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4712 Simplify logic for FreeBSD (twice).
4714 2018-06-25 Martin Sebor <msebor@redhat.com>
4716 PR tree-optimization/86204
4717 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4718 a strnlen result if it's less than the length of the string.
4720 2018-06-25 Martin Sebor <msebor@redhat.com>
4722 PR tree-optimization/85700
4723 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4724 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4725 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4727 2018-06-25 Martin Sebor <msebor@redhat.com>
4729 * doc/extend.texi (Zero-length arrays): Update and clarify.
4731 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4733 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4734 added IEEE/IBM long double multilib support on PowerPC little
4735 endian Linux systems.
4736 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4737 (MULTILIB_DEFAULTS): Likewise.
4738 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4740 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4741 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4742 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4744 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4747 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4748 (REORDER_45): Likewise.
4750 2018-06-25 Jeff Law <law@redhat.com>
4752 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4753 dividend to 32 bits. Adjust length.
4754 (udivmodhi4): Cleanup output template. Fix length.
4756 2018-06-25 Carl Love <cel@us.ibm.com>
4758 * config/rs6000/vsx.md: Change word selector to prefered location.
4760 2018-06-25 Richard Biener <rguenther@suse.de>
4762 PR tree-optimization/86304
4763 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4764 epilogue-if-converted loops as well.
4766 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4768 * lto-section-out.c (lto_begin_section): Do not print section
4769 name for noaddr and unnumbered dumps.
4771 2018-06-25 Richard Biener <rguenther@suse.de>
4773 * tree-vectorizer.h (struct vec_info_shared): New structure
4774 with parts split out from struct vec_info and loop_nest from
4775 struct _loop_vec_info.
4776 (struct vec_info): Adjust accordingly.
4777 (struct _loop_vec_info): Likewise.
4778 (LOOP_VINFO_LOOP_NEST): Adjust.
4779 (LOOP_VINFO_DATAREFS): Likewise.
4780 (LOOP_VINFO_DDRS): Likewise.
4781 (struct _bb_vec_info): Likewise.
4782 (BB_VINFO_DATAREFS): Likewise.
4783 (BB_VINFO_DDRS): Likewise.
4784 (struct _stmt_vec_info): Add dr_aux member.
4785 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4786 (DR_MISALIGNMENT_UNINITIALIZED): New.
4787 (set_dr_misalignment): Adjust.
4788 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4789 (vect_analyze_loop): Adjust prototype.
4790 (vect_analyze_loop_form): Likewise.
4791 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4792 Compute dependences lazily.
4793 (vect_record_base_alignments): Use shared datarefs/ddrs.
4794 (vect_verify_datarefs_alignment): Likewise.
4795 (vect_analyze_data_refs_alignment): Likewise.
4796 (vect_analyze_data_ref_accesses): Likewise.
4797 (vect_analyze_data_refs): Likewise.
4798 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4799 constructor parameter for shared part.
4800 (vect_analyze_loop_form): Pass in shared part and adjust.
4801 (vect_analyze_loop_2): Pass in storage for the number of
4802 stmts. Move loop nest finding to the caller. Compute
4804 (vect_analyze_loop): Pass in shared part.
4805 (vect_transform_loop): Verify shared datarefs are unchanged.
4806 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4807 constructor parameter for shared part.
4808 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4809 (vect_slp_bb): Verify shared datarefs are unchanged before
4811 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4813 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4814 DR_MISALIGNMENT_UNINITIALIZED.
4815 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4816 parameter for shared part.
4817 (vec_info::~vec_info): Adjust.
4818 (vec_info_shared::vec_info_shared): New.
4819 (vec_info_shared::~vec_info_shared): Likewise.
4820 (vec_info_shared::save_datarefs): Likewise.
4821 (vec_info_shared::check_datarefs): Likewise.
4822 (try_vectorize_loop_1): Construct shared part live for analyses
4823 of a single loop for multiple vector sizes.
4824 * tree-parloops.c (gather_scalar_reductions): Adjust.
4826 2018-06-25 Richard Biener <rguenther@suse.de>
4828 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4829 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4830 (vect_analyze_data_refs): Remove similar code from here and
4831 simplify accordingly.
4833 2018-06-25 Richard Biener <rguenther@suse.de>
4835 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4836 for reverse storage order accesses rather than asserting
4837 they cannot happen here.
4839 2018-06-25 Tom de Vries <tdevries@suse.de>
4842 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4843 Use data16 instead of .byte for insn prefix.
4845 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4848 * parser.c (make_char_string_pack): Pass this literal chars
4849 through cpp_interpret_string.
4850 (cp_parser_userdef_numeric_literal): Check the result of
4851 make_char_string_pack.
4853 2018-06-24 Maya Rashish <coypu@sdf.org>
4855 * ginclude/stddef.h: Simplify conditions around avoiding
4856 re-definition of __size_t.
4858 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4860 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4861 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4863 2018-06-22 Maya Rashish <coypu@sdf.org>
4865 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4866 made to OpenBSD and NetBSD through the years.
4868 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4870 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4871 behavior of vec_pack (vector double, vector double) to match
4872 behavior of vec_float2 (vector double, vector double).
4874 2018-06-22 Olivier Hainque <hainque@adacore.com>
4876 * gimplify.c (gimplify_function_tree): Prevent creation
4877 of a trampoline for the address of the current function
4878 passed to entry/exit instrumentation hooks.
4880 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4883 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4886 2018-06-22 Martin Liska <mliska@suse.cz>
4888 PR tree-optimization/86263
4889 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4890 Bail out if is_enabled is false.
4891 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4893 (jump_table_cluster::is_enabled): New function.
4895 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4897 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4898 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4899 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4900 (lto_input_ts_binfo_tree_pointers): Likewise.
4901 * tree-streamer-out.c (streamer_write_tree_bitfields,
4902 write_ts_binfo_tree_pointers): Likewise.
4903 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4905 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4907 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4909 2018-06-22 Martin Liska <mliska@suse.cz>
4911 * symbol-summary.h (get): Make it pure and inline move
4912 functionality from ::get function.
4913 (get): Remove and inline into ::get and ::get_create.
4914 (get_create): Move code from ::get function.
4916 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4919 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4920 -x assembler-with-cpp.
4922 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4924 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4925 _FILE_OFFSET_BITS=64 for C++.
4927 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4929 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4930 conversion insn that shows up when pr85657-3.c is compiled using
4931 IEEE 128-bit long double.
4932 (neg<mode>2_internal): Use the correct mode to check whether the
4933 mode is IBM extended.
4934 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4935 multiply and divide external functions from being created more
4938 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4940 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4942 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4943 the edge can be forwarded.
4944 (cfg_layout_merge_blocks): Likewise.
4946 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4948 * except.c (finish_eh_generation): Commit edge insertions only after
4949 the EH edges have been redirected from post-landing to landing pads.
4951 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4953 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4954 create_tmp_var_for to create the FRAME decl.
4955 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4957 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4959 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4960 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4961 debug statement when resetting its value.
4962 (expand_call_inline): Copy the locus of the call onto the assignment
4963 of the return value, if any. Use local variable in more cases.
4965 2018-06-21 Martin Liska <mliska@suse.cz>
4967 * ipa-pure-const.c (propagate_nothrow): Use
4968 funct_state_summaries->get.
4969 (dump_malloc_lattice): Likewise.
4970 (propagate_malloc): Likewise.
4972 2018-06-21 Richard Biener <rguenther@suse.de>
4974 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4975 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4976 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4978 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4979 BLOCK_ABSTRACT_ORIGIN unconditionally.
4981 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4983 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4985 * ipa-reference.c (ipa_reference_c_finalize): Delete
4986 ipa_ref_opt_sum_summaries and set it to NULL.
4988 2018-06-21 Tom de Vries <tdevries@suse.de>
4990 PR tree-optimization/85859
4991 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4992 test with comment from bb_no_side_effects_p.
4994 2018-06-21 Richard Biener <rguenther@suse.de>
4996 PR tree-optimization/86232
4997 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4998 max for constant niter.
5000 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5002 * config/aarch64/aarch64-simd.md
5003 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5005 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5007 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5008 Make opernads of the unspec commutative.
5010 2018-06-21 Richard Biener <rguenther@suse.de>
5012 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5013 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5014 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5015 (vect_analyze_data_ref_dependence): Re-order checks to deal with
5017 (vect_record_base_alignments): Do not record base alignment
5018 for gathers or scatters.
5019 (vect_compute_data_ref_alignment): Drop return value that is always
5020 true. Bail out early for gathers or scatters.
5021 (vect_enhance_data_refs_alignment): Bail out early for gathers
5023 (vect_find_same_alignment_drs): Likewise.
5024 (vect_analyze_data_refs_alignment): Remove dead code.
5025 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5026 (vect_analyze_data_refs): For possible gathers or scatters do
5027 not create an alternate DR, just check their possible validity
5028 and mark them. Adjust DECL_NONALIASED handling to not rely
5030 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5031 update inits of gathers or scatters.
5032 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5033 Also copy gather/scatter flag to pattern vinfo.
5035 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
5037 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5038 behavior of vec_packsu (vector unsigned long long, vector unsigned
5039 long long) to match behavior of vec_packs with same signature.
5041 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5042 Thomas Schwinge <thomas@codesourcery.com>
5043 Cesar Philippidis <cesar@codesourcery.com>
5045 * gimplify.c (gimplify_scan_omp_clauses): Add support for
5046 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5047 (gimplify_adjust_omp_clauses): Likewise.
5048 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5049 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5050 (gimplify_omp_target_update): Update handling of acc update and
5052 * omp-low.c (install_var_field): Remove unused parameter
5053 base_pointers_restrict.
5054 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5055 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5057 (omp_target_base_pointers_restrict_p): Delete.
5058 (scan_omp_target): Update call to scan_sharing_clauses.
5059 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5061 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5062 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5063 (convert_local_omp_clauses): Likewise.
5064 * tree-pretty-print.c (dump_omp_clause): Likewise.
5065 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
5067 (omp_clause_code_name): Likewise.
5069 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5072 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5075 PR tree-optimization/86231
5076 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
5077 anti-range don't overwrite *vr0min before using it to compute *vr0max.
5079 2018-06-20 Tom de Vries <tdevries@suse.de>
5081 PR tree-optimization/86097
5082 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5083 iv type if signedness of iv type is not the same as that of *nit.
5085 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5087 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
5088 EDGE_EH edges, verify they are all EDGE_EH.
5090 2018-06-20 Maya Rashish <coypu@sdf.org>
5092 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5094 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5096 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5097 * config/aarch64/aarch64.c (xgene1_tunings): Add
5098 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5099 (aarch64_mode_valid_for_sched_fusion_p):
5100 Allow 16-byte modes.
5101 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5102 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5104 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5106 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5107 * config/aarch64/iterators.md (VQ2): New mode iterator.
5109 2018-06-20 Martin Liska <mliska@suse.cz>
5111 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5112 Change default ratio from 10 to 8.
5114 2018-06-20 Martin Liska <mliska@suse.cz>
5116 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5118 (bit_test_cluster::find_bit_tests): Likewise.
5119 (switch_decision_tree::analyze_switch_statement): Find clusters.
5120 * tree-switch-conversion.h (struct jump_table_cluster): Document
5123 2018-06-20 Martin Liska <mliska@suse.cz>
5125 * tree-switch-conversion.c (switch_conversion::collect):
5126 Record m_uniq property.
5127 (switch_conversion::expand): Bail out for special conditions.
5128 (group_cluster::~group_cluster): New.
5129 (group_cluster::group_cluster): Likewise.
5130 (group_cluster::dump): Likewise.
5131 (jump_table_cluster::emit): New.
5132 (switch_decision_tree::fix_phi_operands_for_edges): New.
5133 (struct case_node): Remove struct.
5134 (jump_table_cluster::can_be_handled): New.
5135 (case_values_threshold): Moved to header.
5136 (reset_out_edges_aux): Likewise.
5137 (jump_table_cluster::is_beneficial): New.
5138 (bit_test_cluster::can_be_handled): Likewise.
5139 (add_case_node): Remove.
5140 (bit_test_cluster::is_beneficial): New.
5141 (case_bit_test::cmp): New.
5142 (bit_test_cluster::emit): New.
5143 (expand_switch_as_decision_tree_p): Remove.
5144 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5145 (fix_phi_operands_for_edge): Likewise.
5146 (switch_decision_tree::analyze_switch_statement): New.
5147 (compute_cases_per_edge): Move ...
5148 (switch_decision_tree::compute_cases_per_edge): ... here.
5149 (try_switch_expansion): Likewise.
5150 (switch_decision_tree::try_switch_expansion): Likewise.
5151 (record_phi_operand_mapping): Likewise.
5152 (switch_decision_tree::record_phi_operand_mapping): Likewise.
5153 (emit_case_decision_tree): Likewise.
5154 (switch_decision_tree::emit): Likewise.
5155 (balance_case_nodes): Likewise.
5156 (switch_decision_tree::balance_case_nodes): Likewise.
5157 (dump_case_nodes): Likewise.
5158 (switch_decision_tree::dump_case_nodes): Likewise.
5159 (emit_jump): Likewise.
5160 (switch_decision_tree::emit_jump): Likewise.
5161 (emit_cmp_and_jump_insns): Likewise.
5162 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5163 (emit_case_nodes): Likewise.
5164 (switch_decision_tree::emit_case_nodes): Likewise.
5165 (conditional_probability): Remove.
5166 * tree-switch-conversion.h (enum cluster_type): New.
5168 (struct cluster): Likewise.
5169 (cluster::cluster): Likewise.
5170 (struct simple_cluster): Likewise.
5171 (simple_cluster::simple_cluster): Likewise.
5172 (struct group_cluster): Likewise.
5173 (struct jump_table_cluster): Likewise.
5174 (struct bit_test_cluster): Likewise.
5175 (struct min_cluster_item): Likewise.
5176 (struct case_tree_node): Likewise.
5177 (case_tree_node::case_tree_node): Likewise.
5178 (jump_table_cluster::case_values_threshold): Likewise.
5179 (struct case_bit_test): Likewise.
5180 (struct switch_decision_tree): Likewise.
5181 (struct switch_conversion): Likewise.
5182 (switch_decision_tree::reset_out_edges_aux): Likewise.
5184 2018-06-20 Martin Liska <mliska@suse.cz>
5186 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5187 (hoist_edge_and_branch_if_true): Likewise.
5188 (expand_switch_using_bit_tests_p): Likewise.
5189 (struct case_bit_test): Likewise.
5190 (case_bit_test_cmp): Likewise.
5191 (emit_case_bit_tests): Likewise.
5192 (switch_conversion::switch_conversion): New class.
5193 (struct switch_conv_info): Remove old struct.
5194 (collect_switch_conv_info): More to ...
5195 (switch_conversion::collect): ... this.
5196 (check_range): Likewise.
5197 (switch_conversion::check_range): Likewise.
5198 (check_all_empty_except_final): Likewise.
5199 (switch_conversion::check_all_empty_except_final): Likewise.
5200 (check_final_bb): Likewise.
5201 (switch_conversion::check_final_bb): Likewise.
5202 (create_temp_arrays): Likewise.
5203 (switch_conversion::create_temp_arrays): Likewise.
5204 (free_temp_arrays): Likewise.
5205 (gather_default_values): Likewise.
5206 (switch_conversion::gather_default_values): Likewise.
5207 (build_constructors): Likewise.
5208 (switch_conversion::build_constructors): Likewise.
5209 (constructor_contains_same_values_p): Likewise.
5210 (switch_conversion::contains_same_values_p): Likewise.
5211 (array_value_type): Likewise.
5212 (switch_conversion::array_value_type): Likewise.
5213 (build_one_array): Likewise.
5214 (switch_conversion::build_one_array): Likewise.
5215 (build_arrays): Likewise.
5216 (switch_conversion::build_arrays): Likewise.
5217 (gen_def_assigns): Likewise.
5218 (switch_conversion::gen_def_assigns): Likewise.
5219 (prune_bbs): Likewise.
5220 (switch_conversion::prune_bbs): Likewise.
5221 (fix_phi_nodes): Likewise.
5222 (switch_conversion::fix_phi_nodes): Likewise.
5223 (gen_inbound_check): Likewise.
5224 (switch_conversion::gen_inbound_check): Likewise.
5225 (process_switch): Use the newly created class.
5226 (switch_conversion::expand): New.
5227 (switch_conversion::~switch_conversion): New.
5228 * tree-switch-conversion.h: New file.
5230 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5232 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5233 tree-vect-patterns.c.
5234 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5235 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
5236 (vect_recog_sad_pattern): Likewise.
5237 (vect_recog_widen_sum_pattern): Likewise.
5238 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
5239 (vect_recog_widen_shift_pattern): Remove the type_in argument.
5240 (vect_recog_rotate_pattern): Likewise.
5241 (vect_recog_mult_pattern): Likewise.
5242 (vect_recog_vector_vector_shift_pattern): Likewise.
5243 (vect_recog_divmod_pattern): Likewise.
5244 (vect_recog_mixed_size_cond_pattern): Likewise.
5245 (vect_recog_bool_pattern): Likewise.
5246 (vect_recog_mask_conversion_pattern): Likewise.
5247 (vect_try_gather_scatter_pattern): Likewise.
5248 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
5249 (vect_recog_over_widening_pattern): Likewise.
5250 (vect_recog_gather_scatter_pattern): Likewise.
5251 (vect_recog_func_ptr): Move from tree-vectorizer.h
5252 (vect_vect_recog_func_ptrs): Move further down the file.
5253 (vect_recog_func): Likewise. Remove the third argument.
5254 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5255 (vect_pattern_recog_1): Expect the pattern function to do any
5256 necessary target tests. Also expect it to provide a vector type.
5257 Remove the type_in handling.
5259 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5261 * tree-vect-patterns.c (vect_pattern_detected): New function.
5262 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5263 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5264 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5265 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5266 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5267 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5268 (vect_recog_mask_conversion_pattern)
5269 (vect_try_gather_scatter_pattern): Likewise.
5271 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5273 * tree-vect-patterns.c (vect_get_internal_def): New function.
5274 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5275 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5276 (search_type_for_mask_1): Use it.
5278 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5280 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5281 redundant WIDEN_SUM_EXPR handling.
5282 (vect_recog_sad_pattern): Likewise.
5284 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5286 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5287 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5288 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5289 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5290 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5292 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5294 * tree-vect-stmts.c (vectorizable_call): Make sure that we
5295 use the stmt_vec_info of the original bb statement for the
5296 new zero assignment, even if the call is part of a pattern.
5298 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5300 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5301 that the sequence is attached to the original statement rather
5302 than the pattern statement.
5303 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5304 PATTERN_DEF_SEQ from the original statement rather than
5305 the main pattern statement.
5306 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5307 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5308 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5310 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5312 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5313 definition statements before the early exit for statements that aren't
5315 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5317 (vect_transform_loop): ...here. Process pattern definition
5318 statements without first checking whether the main pattern
5319 statement is live or relevant.
5321 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5323 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5324 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5326 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
5328 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5329 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5330 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5331 (expand_block_compare): Change select_block_compare_mode call.
5332 (expand_strncmp_align_check): Use new functions, fix comment.
5333 (emit_final_str_compare_gpr): New function.
5334 (expand_strn_compare): Refactor and clean up code.
5335 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5337 2018-06-19 Tony Reix <tony.reix@atos.com>
5338 Damien Bergamini <damien.bergamini@atos.com>
5339 David Edelsohn <dje.gcc@gmail.com>
5341 * collect2.c (static_obj): New variable.
5342 (static_libs): New variable.
5343 (is_in_list): Uncomment declaration.
5344 (main): Track AIX libraries linked statically.
5345 (is_in_list): Uncomment definition.
5346 (scan_prog_file): Don't add AIX shared libraries initializer
5347 to constructor list if linking statically.
5349 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
5351 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5353 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5355 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
5357 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5360 2018-06-19 Martin Liska <mliska@suse.cz>
5362 * config/i386/i386.c (ix86_can_inline_p): Do not use
5363 ipa_fn_summaries::get_create.
5364 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5366 (devirtualization_time_bonus): Likewise.
5367 (ipcp_propagate_stage): Likewise.
5368 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5369 (edge_set_predicate): Likewise.
5370 (evaluate_conditions_for_known_args): Likewise.
5371 (evaluate_properties_for_edge): Likewise.
5372 (ipa_call_summary::reset): Tranform to ...
5373 (ipa_call_summary::~ipa_call_summary): ... this.
5374 (ipa_fn_summary::reset): Transform to ...
5375 (ipa_fn_summary::~ipa_fn_summary): ... this.
5376 (ipa_fn_summary_t::remove): Rename to ...
5377 (ipa_fn_summary_t::remove_callees): ... this.
5378 (ipa_fn_summary_t::duplicate): Use placement new
5379 instead of memory copy.
5380 (ipa_call_summary_t::duplicate): Likewise.
5381 (ipa_call_summary_t::remove): Remove.
5382 (dump_ipa_call_summary): Change get_create to get.
5383 (ipa_dump_fn_summary): Dump only when summary exists.
5384 (analyze_function_body): Use symbol_summary::get instead
5386 (compute_fn_summary): Likewise.
5387 (estimate_edge_devirt_benefit): Likewise.
5388 (estimate_edge_size_and_time): Likewise.
5389 (inline_update_callee_summaries): Likewise.
5390 (remap_edge_change_prob): Likewise.
5391 (remap_edge_summaries): Likewise.
5392 (ipa_merge_fn_summary_after_inlining): Likewise.
5393 (write_ipa_call_summary): Likewise.
5394 (ipa_fn_summary_write): Likewise.
5395 (ipa_free_fn_summary): Likewise.
5396 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5397 (struct ipa_call_summary): Likewise.
5398 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5400 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5401 (estimate_size_after_inlining): Likewise.
5402 (estimate_growth): Likewise.
5403 (growth_likely_positive): Likewise.
5404 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5405 (inline_call): Likewise.
5406 * ipa-inline.c (caller_growth_limits): Likewise.
5407 (can_inline_edge_p): Likewise.
5408 (can_inline_edge_by_limits_p): Likewise.
5409 (compute_uninlined_call_time): Likewise.
5410 (compute_inlined_call_time): Likewise.
5411 (want_inline_small_function_p): Likewise.
5412 (edge_badness): Likewise.
5413 (update_caller_keys): Likewise.
5414 (update_callee_keys): Likewise.
5415 (inline_small_functions): Likewise.
5416 (inline_to_all_callers_1): Likewise.
5417 (dump_overall_stats): Likewise.
5418 (early_inline_small_functions): Likewise.
5419 (early_inliner): Likewise.
5420 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5421 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5422 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5423 * ipa-split.c (execute_split_functions): Likewise.
5424 * symbol-summary.h: Likewise.
5425 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5427 2018-06-19 Richard Biener <rguenther@suse.de>
5429 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5430 (vectorize_loops): ... here. Fix dbgcnt handling.
5431 (try_vectorize_loop): Wrap try_vectorize_loop_1.
5433 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5436 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5437 ieee128 argument takes up only one (vector) register, not two (floating
5440 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5442 * gimplify.c (gimplify_init_constructor): Really never clear for an
5443 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5445 2018-06-19 Richard Biener <rguenther@suse.de>
5447 PR tree-optimization/86179
5448 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5449 after failed recognition.
5451 2018-06-18 Martin Sebor <msebor@redhat.com>
5454 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5455 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5456 Handle integer subtraction.
5457 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5458 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5460 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5462 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5463 param from rtx to rtx_insn *.
5464 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5466 (frv_ifcvt_modify_insn): Likwise.
5467 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5468 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5469 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5470 as_a <rtx_insn *> cast to local "unprotected_region" once
5471 it's been established that it's not NULL or pc_rtx.
5472 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5473 param "sethi" from rtx to rtx_insn *.
5474 (nds32_group_float_insns): Likewise for param "insn".
5475 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5477 (vax_output_int_subtract): Likewise.
5478 * config/vax/vax.c (vax_output_int_add): Likewise for param
5480 (vax_output_int_subtract): Likewise.
5481 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5482 (emit_pattern_after): Likewise for param "after".
5483 (emit_insn_after): Likewise.
5484 (emit_jump_insn_after): Likewise.
5485 (emit_call_insn_after): Likewise.
5486 (emit_debug_insn_after): Likewise.
5487 (emit_pattern_before): Likewise for param "before".
5488 (emit_insn_before): Likewise.
5489 (emit_jump_insn_before): Likewise.
5490 * final.c (get_insn_template): Likewise for param "insn", removing
5492 * output.h (get_insn_template): Likewise for 2nd param.
5493 * rtl.h (emit_insn_before): Likewise.
5494 (emit_jump_insn_before): Likewise.
5495 (emit_debug_insn_before_noloc): Likewise.
5496 (emit_insn_after): Likewise.
5497 (emit_jump_insn_after): Likewise.
5498 (emit_call_insn_after): Likewise.
5499 (emit_debug_insn_after): Likewise.
5500 (set_insn_deleted): Likewise for param.
5502 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5505 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5506 floating point modes, so that IFmode is numerically greater than
5507 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5508 to declare the ordering. This prevents IFmode from being
5509 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5510 machine. Include rs6000-modes.h to share the fractional values
5511 between genmodes* and the rest of the compiler.
5515 * config/rs6000/rs6000-modes.h: New file.
5516 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5517 meaning of rs6000_long_double_size so that 126..128 selects an
5518 appropriate 128-bit floating point type.
5519 (rs6000_option_override_internal): Likewise.
5520 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5521 (TARGET_LONG_DOUBLE_128): Change the meaning of
5522 rs6000_long_double_size so that 126..128 selects an appropriate
5523 128-bit floating point type.
5524 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5525 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5526 source and destination to match the standard usage.
5527 (truncifkf2): Likewise.
5528 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5529 ISA 2.07 to use an explicit clobber, instead of passing in a
5531 (copysign<mode>3_soft): Likewise.
5533 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5535 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5536 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5537 (vect_slp_analyze_instance_dependence): Likewise.
5538 (vect_enhance_data_refs_alignment): Likewise.
5539 (vect_analyze_data_refs_alignment): Likewise.
5540 (vect_slp_analyze_and_verify_instance_alignment
5541 (vect_analyze_data_ref_accesses): Likewise.
5542 (vect_prune_runtime_alias_test_list): Likewise.
5543 (vect_analyze_data_refs): Likewise.
5544 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5545 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5546 (vect_analyze_scalar_cycles_1): Likewise.
5547 (vect_get_loop_niters): Likewise.
5548 (vect_analyze_loop_form_1): Likewise.
5549 (vect_update_vf_for_slp): Likewise.
5550 (vect_analyze_loop_operations): Likewise.
5551 (vect_analyze_loop): Likewise.
5552 (vectorizable_induction): Likewise.
5553 (vect_transform_loop): Likewise.
5554 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5555 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5556 (vect_make_slp_decision): Likewise.
5557 (vect_detect_hybrid_slp): Likewise.
5558 (vect_slp_analyze_operations): Likewise.
5559 (vect_slp_bb): Likewise.
5560 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5561 (vectorizable_bswap): Likewise.
5562 (vectorizable_call): Likewise.
5563 (vectorizable_simd_clone_call): Likewise.
5564 (vectorizable_conversion): Likewise.
5565 (vectorizable_assignment): Likewise.
5566 (vectorizable_shift): Likewise.
5567 (vectorizable_operation): Likewise.
5568 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5570 2018-06-18 Martin Sebor <msebor@redhat.com>
5572 PR tree-optimization/81384
5573 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5574 * builtins.c (expand_builtin_strnlen): New function.
5575 (expand_builtin): Call it.
5576 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5577 * builtins.def (BUILT_IN_STRNLEN): New.
5578 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5579 Warn for bounds in excess of maximum object size.
5580 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5581 single-value ranges. Handle strnlen.
5582 (handle_builtin_strlen): Handle strnlen.
5583 (strlen_check_and_optimize_stmt): Same.
5584 * doc/extend.texi (Other Builtins): Document strnlen.
5586 2018-06-18 Maya Rashish <coypu@sdf.org>
5588 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5589 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5590 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5592 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5594 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5596 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5598 * tree.c (escaped_string::escape): Replace cast to char * by
5599 const_cast<char *> (unescaped).
5601 2018-06-18 Nick Clifton <nickc@redhat.com>
5604 * tree.c (escaped_string): New class. Converts an unescaped
5605 string into its escaped equivalent.
5606 (warn_deprecated_use): Use the new class to convert the
5607 deprecation message, if present.
5608 (test_escaped_strings): New self test.
5609 (test_c_tests): Add test_escaped_strings.
5610 * doc/extend.texi (deprecated): Add a note that the
5611 deprecation message is affected by the -fmessage-length
5612 option, and that control characters will be escaped.
5613 (#pragma GCC error): Document this pragma.
5614 (#pragma GCC warning): Likewise.
5615 * doc/invoke.texi (-fmessage-length): Document this option's
5616 effect on the #warning and #error preprocessor directives and
5617 the deprecated attribute.
5619 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5621 * tree.c (decl_value_expr_lookup): Revert latest change.
5622 (decl_value_expr_insert): Likewise.
5624 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5626 * gimplify.c (nonlocal_vlas): Delete.
5627 (nonlocal_vla_vars): Likewise.
5628 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5630 (gimplify_body): Do not create and destroy nonlocal_vlas.
5631 * tree-nested.c: Include diagnostic.h.
5632 (use_pointer_in_frame): Tweak.
5633 (lookup_field_for_decl): Add assertion and declare the transformation.
5634 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5635 internal error when the reference is in a wrong context. Do not
5636 create a debug decl by default.
5637 (note_nonlocal_block_vlas): Delete.
5638 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5639 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5640 create a debug decl by default.
5641 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5642 call is in a wrong context.
5643 (fixup_vla_decls): New function.
5644 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5645 debug variables were created.
5646 * tree.c (decl_value_expr_lookup): Add checking assertion.
5647 (decl_value_expr_insert): Likewise.
5649 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5652 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5653 * tree-scalar-evolution.c (interpret_expr): Likewise.
5654 (expression_expensive_p): Likewise.
5655 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5656 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5657 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5658 (ssa_defined_by_minus_one_stmt_p): New.
5660 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5663 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5664 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5665 * dojump.c (do_jump): Likewise.
5666 * expr.c (expand_expr_real_2): Check operand type's sign.
5667 * fold-const.c (const_unop): Handle ABSU_EXPR.
5668 (fold_abs_const): Likewise.
5669 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5670 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5671 (strip_sign_op_1): Likesise.
5672 * match.pd: Add new pattern to generate ABSU_EXPR.
5673 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5674 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5675 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5676 * tree-inline.c (estimate_operator_cost): Likewise.
5677 * tree-pretty-print.c (dump_generic_node): Likewise.
5678 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5679 * tree.def (ABSU_EXPR): New.
5681 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5684 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5685 documented as preserved for backward compatibility only.
5686 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5688 PR rtl-optimization/86108
5689 * bb-reorder.c (create_forwarder_block): Renamed to ...
5690 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5691 jump from new landing pad to the second part.
5692 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5695 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5698 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5699 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5700 Only call store_expr for halves if the mode is the same.
5703 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5704 Fix up comment formatting.
5706 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5708 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5709 (typed_splay_tree::closure,
5710 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5711 (typed_splay_tree::typed_splay_tree,
5712 typed_splay_tree::operator =): Declared private.
5713 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5714 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5715 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5716 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5717 typed_splay_tree::splay_tree_splay,
5718 typed_splay_tree::splay_tree_foreach_helper,
5719 typed_splay_tree::splay_tree_insert,
5720 typed_splay_tree::splay_tree_remove,
5721 typed_splay_tree::splay_tree_lookup,
5722 typed_splay_tree::splay_tree_predecessor,
5723 typed_splay_tree::splay_tree_successor,
5724 typed_splay_tree::splay_tree_min,
5725 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5726 (typed_splay_tree::root, typed_splay_tree::comp,
5727 typed_splay_tree::delete_key,
5728 typed_splay_tree::delete_value): New data members.
5729 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5730 typed_splay_tree::remove.
5732 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5734 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5735 -mginv and -mno-ginv to the assembler.
5736 * config/mips/mips.opt (-mcrc): New option.
5738 * doc/invoke.text (-mcrc): Document.
5741 2018-06-15 Nick Clifton <nickc@redhat.com>
5744 * tree.c (escaped_string): New class. Converts an unescaped
5745 string into its escaped equivalent.
5746 (warn_deprecated_use): Use the new class to convert the
5747 deprecation message, if present.
5748 (test_escaped_strings): New self test.
5749 (test_c_tests): Add test_escaped_strings.
5750 * doc/extend.texi (deprecated): Add a note that the
5751 deprecation message is affected by the -fmessage-length
5752 option, and that control characters will be escaped.
5753 (#pragma GCC error): Document this pragma.
5754 (#pragma GCC warning): Likewise.
5755 * doc/invoke.texi (-fmessage-length): Document this option's
5756 effect on the #warning and #error preprocessor directives and
5757 the deprecated attribute.
5759 2018-06-15 Richard Biener <rguenther@suse.de>
5761 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5762 here, also noting vector size used.
5763 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5764 size used in MSG_OPTIMIZED_LOCATIONS dump.
5765 (pass_slp_vectorize::execute): Adjust.
5767 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5770 * config/arc/arc.c (arc_return_address_register): Fix
5773 2018-06-15 Richard Biener <rguenther@suse.de>
5776 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5777 leave useless conversion stripping to force_gimple_operand_gsi.
5778 (gimplify_build2): Likewise.
5779 (gimplify_build1): Likewise.
5781 2018-06-15 Richard Biener <rguenther@suse.de>
5784 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5785 before adjusting their block.
5787 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5789 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5790 multilibs for *-*-rtems*.
5791 * config/riscv/t-rtems: New file.
5793 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5796 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5797 unsigned_type_for returns NULL.
5800 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5801 subregs of multi-word pseudos unless the float mode has word size.
5803 2018-06-14 Richard Biener <rguenther@suse.de>
5806 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5807 duplicate and harmful type_hash_canon.
5808 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5810 2018-06-14 Richard Biener <rguenther@suse.de>
5813 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5816 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5818 * config/rtems.h (STDINT_LONG32): Define.
5820 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5821 Prachi Godbole <prachi.godbole@imgtec.com>
5823 * config/mips/mips-cpus.def: Define P6600.
5824 * config/mips/mips-tables.opt: Regenerate.
5825 * config/mips/mips.c (mips_ucbranch_type): New enum.
5826 (mips_rtx_cost_data): Add support for P6600.
5827 (mips_issue_rate): Likewise.
5828 (mips_multipass_dfa_lookahead): Likewise.
5829 (mips_avoid_hazard): Likewise.
5830 (mips_reorg_process_insns): Likewise.
5831 (mips_classify_branch_p6600): New function.
5832 * config/mips/mips.h (TUNE_P6600): New define.
5833 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5834 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5835 * config/mips/mips.md: Include p6600.md.
5836 (processor): Add p6600.
5837 * config/mips/p6600.md: New file.
5838 * doc/invoke.texi: Add p6600 to supported architectures.
5840 2018-06-13 Martin Sebor <msebor@redhat.com>
5842 PR tree-optimization/86114
5843 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5845 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5847 2018-06-13 Richard Biener <rguenther@suse.de>
5849 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5850 Properly set vector type of the intermediate stmt.
5851 * tree-vect-stmts.c (vectorizable_operation): The destination
5852 var always has vectype_out type.
5854 2018-06-13 Jeff Law <law@redhat.com>
5856 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5857 integer 0 for argument to print_rtl_with_bb.
5858 (rl78_reorg): Likewise.
5860 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5862 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5863 from rtx to rtx_insn *.
5864 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5866 (add_sched_insns_for_speculation): Likewise for local "target",
5867 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5868 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5869 from rtx_insn ** to rtx_code_label **.
5870 (reorg_emit_nops): Likewise.
5871 (c6x_reorg): Likewise for local "call_labels".
5872 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5874 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5875 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5876 the loops over LABEL_REFS.
5877 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5879 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5880 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5881 (split_branches): Strengthen local "olabel" from rtx to
5882 rtx_insn *, adding a safe_as_a cast.
5883 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5885 (add_insn_after): Likewise for first two params.
5886 (add_insn_before): Likewise.
5887 (remove_insn): Likewise for param.
5888 (emit_pattern_before_noloc): Likewise for second and third params.
5889 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5890 (emit_call_insn_before_noloc): Likewise.
5891 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5893 (emit_barrier_before): Likewise.
5894 (emit_label_before): Strengthen "label" param from "rtx" to
5895 "rtx_code_label *". Strengthen "before" param from "rtx" to
5897 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5899 (emit_pattern_after_noloc): Likewise.
5900 (emit_insn_after_noloc): Likewise.
5901 (emit_jump_insn_after_noloc): Likewise.
5902 (emit_call_insn_after_noloc): Likewise.
5903 (emit_debug_insn_after_noloc): Likewise.
5904 (emit_barrier_after): Likewise.
5905 (emit_label_after): Likewise for both params.
5906 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5907 "loc" param from "int" to "location_t".
5908 (emit_insn_after_setloc): Likewise.
5909 (emit_jump_insn_after_setloc): Likewise.
5910 (emit_call_insn_after_setloc): Likewise.
5911 (emit_debug_insn_after_setloc): Likewise.
5912 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5913 "loc" param from "int" to "location_t".
5914 (emit_pattern_before): Convert NULL_RTX to NULL.
5915 (emit_insn_before_setloc): Convert "loc" param from "int" to
5917 (emit_jump_insn_before_setloc): Likewise.
5918 (emit_call_insn_before_setloc): Likewise.
5919 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5920 rtx_insn *. Convert "loc" param from "int" to "location_t".
5921 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5922 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5923 Convert 3rd param from "int" to "location_t".
5924 (emit_barrier_before, emit_barrier_after, next_real_insn):
5925 Strengthen param from rtx to rtx_insn *.
5926 (emit_label_before): Strengthen 1st param from "rtx" to
5927 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5929 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5930 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5931 Strengthen 2nd param from "rtx" to "rtx_insn *".
5932 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5933 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5934 Likewise. Convert 3rd param from "int" to "location_t".
5935 (emit_label_after): Strengthen 1st param from "rtx" to
5937 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5939 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5940 from "rtx" to "rtx_insn *".
5942 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5944 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5945 bodies streamed in with -Q.
5946 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5947 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5948 * gimple-streamer-out.c: Include gimple-pretty-print.h
5949 (output_bb): Dump stmts streamed.
5950 * lto-section-out.c: Include print-tree.h
5951 (lto_begin_section): Dump sections created.
5952 (lto_output_decl_index): Dump decl encoded.
5953 * lto-streamer-out.c: Include print-tree.h
5954 (create_output_block): Dump output block created.
5955 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5956 (output_function): Dump function output.
5957 (output_constructor): Dump constructor streamed.
5958 (write_global_stream): Output indexes encoded.
5959 (produce_asm_for_decls): Dump streams encoded.
5960 * lto-streamer.c (streamer_dump_file): New global var.
5961 * lto-streamer.h (streamer_dump_file): Declare.
5962 * passes.c (ipa_write_summaries): Initialize streamer dump.
5963 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5966 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5969 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5970 offsets for register save directives. Emit a second batch of save
5971 directives, if need be, when the function accesses prior frames.
5973 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5975 * config/arc/fpu.md (fmasf4): Force operand to register.
5976 (fnmasf4): Likewise.
5978 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5980 * config/arc/arc-protos.h (arc_pad_return): Remove.
5981 * config/arc/arc.c (machine_function): Remove force_short_suffix
5983 (arc_print_operand): Adjust printing of '&'.
5984 (arc_verify_short): Remove conditional printing of short suffix.
5985 (arc_final_prescan_insn): Remove reference to size_reason.
5986 (pad_return): New function.
5987 (arc_reorg): Call pad_return.
5988 (arc_pad_return): Remove.
5989 (arc_init_machine_status): Remove reference to force_short_suffix.
5990 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5991 (attr length): When attribute iscompact is true force to 2
5992 regardless; in the case of maybe check if we want to force the
5993 instruction to have 4 bytes length.
5994 (nopv): Change it to generate 4 byte long nop as well.
5995 (blockage): New pattern.
5996 (simple_return): Remove call to arc_pad_return.
5997 (p_return_i): Likewise.
5999 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6001 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6003 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6005 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6008 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6010 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6011 for ARC700 and ARCv2.
6013 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
6016 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6017 operands[2] instead of operands[1].
6020 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6022 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6023 case, check whether the outer register overlaps an unallocatable
6024 register, not just whether it fits the required class.
6026 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6028 * poly-int.h (can_div_trunc_p): Add new overload in which all values
6030 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6031 (memrefs_conflict_p): Likewise.
6032 (init_alias_analysis): Likewise.
6033 * cfgexpand.c (expand_debug_expr): Likewise.
6034 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6035 * cse.c (fold_rtx): Likewise.
6036 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6037 * expr.c (emit_block_move_hints): Likewise.
6038 (clear_storage_hints, push_block, emit_push_insn): Likewise.
6039 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6040 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6041 (emit_group_store): Likewise.
6042 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
6043 to read the PRE/POST_MODIFY increment.
6044 * calls.c (store_one_arg): Use strip_offset.
6045 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6047 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6049 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6050 (simplify_binary_operation_1): Extend CONST_INT handling to
6052 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6053 than a HOST_WIDE_INT.
6054 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6056 (adjust_mems, add_stores): Update accodingly.
6057 (vt_canonicalize_addr): Track polynomial offsets.
6058 (emit_note_insn_var_location): Likewise.
6059 (vt_add_function_parameter): Likewise.
6060 (vt_initialize): Likewise.
6062 2018-06-12 Jeff Law <law@redhat.com>
6064 * config.gcc (alpha*-*-freebsd*): Remove.
6065 * config/alpha/freebsd.h: Remove.
6067 2018-06-12 David Malcolm <dmalcolm@redhat.com>
6070 * spellcheck-tree.c (levenshtein_distance): Rename to...
6071 (get_edit_distance): ...this, and update for underlying renaming.
6072 * spellcheck-tree.h (levenshtein_distance): Rename to...
6073 (get_edit_distance): ...this.
6074 * spellcheck.c (levenshtein_distance): Rename to...
6075 (get_edit_distance): ...this. Convert from Levenshtein distance
6076 to Damerau-Levenshtein distance by supporting transpositions of
6077 adjacent characters. Rename "v1" to "v_next" and "v0" to
6079 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6080 (selftest::test_edit_distance_unit_test_oneway): ...this, and
6081 update for underlying renaming.
6082 (selftest::levenshtein_distance_unit_test): Rename to...
6083 (selftest::test_get_edit_distance_unit): ...this, and update for
6084 underlying renaming.
6085 (selftest::test_find_closest_string): Add example from PR 69968
6086 where transposition helps
6087 (selftest::test_metric_conditions): Update for renaming.
6088 (selftest::test_metric_conditions): Likewise.
6089 (selftest::spellcheck_c_tests): Likewise.
6090 * spellcheck.h (levenshtein_distance): Rename both overloads to...
6091 (get_edit_distance): ...this.
6092 (best_match::consider): Update for renaming.
6094 2018-06-12 Martin Sebor <msebor@redhat.com>
6096 PR tree-optimization/85259
6097 * builtins.c (compute_objsize): Handle constant offsets.
6098 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6099 true iff a warning has been issued.
6100 * gimple.h (gimple_nonartificial_location): New function.
6101 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6102 gimple_nonartificial_location and handle -Wno-system-headers.
6103 (handle_builtin_stxncpy): Same.
6105 2018-06-12 Martin Sebor <msebor@redhat.com>
6108 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6110 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
6112 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6113 BUILTIN_VEC_XST entries for pointer to double and long long.
6115 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
6118 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6120 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6123 2018-06-12 Martin Liska <mliska@suse.cz>
6125 * doc/options.texi: Document IntegerRange.
6127 2018-06-12 Martin Liska <mliska@suse.cz>
6129 * config/i386/i386.opt: Make MPX-related options as Deprecated.
6130 * opt-functions.awk: Handle Deprecated flag.
6131 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6133 (read_cmdline_option): Report warning for a deprecated option.
6134 * opts.h (struct cl_option): Add new field cl_deprecated.
6135 (CL_ERR_DEPRECATED): New.
6137 2018-06-12 Martin Liska <mliska@suse.cz>
6139 * doc/options.texi: Document Deprecated option flag.
6141 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6143 * config/arc/arc-arch.h (arc_extras): New enum.
6144 (arc_cpu_t):Add field extra.
6145 (arc_cpu_types): Consider the extras.
6146 * config/arc/arc-cpus.def: Add extras info.
6147 * config/arc/arc-opts.h (processor_type): Consider extra field.
6148 * config/arc/arc.c (arc_override_options): Handle extra field.
6150 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6152 * config/arc/arc-arch.h: Update ARC_OPTX macro.
6153 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6155 * config/arc/arc.c (arc_init): Update pic warning.
6156 (irq_range): Update irq range parsing warnings.
6157 (arc_override_options): Update various warning messages.
6158 (arc_handle_aux_attribute): Likewise.
6160 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
6162 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6164 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6166 * doc/sourcebuild.texi: Document usage of line number 0 in verify
6167 compiler messages directives.
6169 2018-06-12 Matthew Fortune <mfortune@gmail.com>
6171 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6172 * config/mips/mips-tables.opt: Regenerate.
6173 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6175 * doc/invoke.texi: Document -march=i6500.
6177 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
6179 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6180 (i6400_gpmul): Add cpu_unit.
6181 (i6400_gpdiv): Likewise.
6182 (i6400_msa_add_d): Update reservations.
6183 (i6400_msa_int_add) Likewise.
6184 (i6400_msa_short_logic3) Likewise.
6185 (i6400_msa_short_logic2) Likewise.
6186 (i6400_msa_short_logic) Likewise.
6187 (i6400_msa_move) Likewise.
6188 (i6400_msa_cmp) Likewise.
6189 (i6400_msa_short_float2) Likewise.
6190 (i6400_msa_div_d) Likewise.
6191 (i6400_msa_long_logic1) Likewise.
6192 (i6400_msa_long_logic2) Likewise.
6193 (i6400_msa_mult) Likewise.
6194 (i6400_msa_long_float2) Likewise.
6195 (i6400_msa_long_float4) Likewise.
6196 (i6400_msa_long_float5) Likewise.
6197 (i6400_msa_long_float8) Likewise.
6198 (i6400_fpu_fadd): Include frint type.
6199 (i6400_fpu_store): New define_insn_reservation.
6200 (i6400_fpu_load): Likewise.
6201 (i6400_fpu_move): Likewise.
6202 (i6400_fpu_fcmp): Likewise.
6203 (i6400_fpu_fmadd): Likewise.
6204 (i6400_int_mult): Include imul3nc type and update reservation.
6205 (i6400_int_div): Include idiv3 type and update reservation.
6206 (i6400_int_load): Update to check type not move_type.
6207 (i6400_int_store): Likewise.
6208 (i6400_int_prefetch): Set zero latency.
6210 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6212 * gcc.c: Document new %@{...} sequence.
6213 (LINK_COMMAND_SPEC): Use it for the -L switches.
6214 (cpp_unique_options): Use it for the -I switches.
6215 (at_file_argbuf): New global variable.
6216 (in_at_file): Likewise.
6217 (alloc_args): Create at_file_argbuf.
6218 (clear_args): Truncate at_file_argbuf.
6219 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6220 (open_at_file): New function.
6221 (close_at_file): Likewise.
6222 (create_at_file): Delete.
6223 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6226 (validate_switches_from_spec): Deal with %@{...} sequence.
6227 (validate_switches): Likewise.
6228 (driver::finalize): Call clear_args.
6230 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
6232 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6234 2018-06-11 Martin Sebor <msebor@redhat.com>
6236 * doc/invoke.texi (-Wall): List -Wc++17-compat.
6237 (Wno-class-memaccess): Add @opindex.
6238 (Wno-templates, Wno-multiple-inheritance): Same.
6239 (Wno-virtual-inheritance, Wno-namespaces): Same.
6240 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6241 (Wno-format-overflow, Wno-format-truncation): Same.
6242 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6243 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6244 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6245 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6246 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6247 (Wno-misspelled-isr): Same.
6249 2018-06-11 Martin Sebor <msebor@redhat.com>
6251 * PR tree-optimization/86083
6252 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6254 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6256 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6258 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
6261 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6262 on the correct operand.
6263 (*movdi_internal64): Ditto.
6265 2018-06-11 Martin Liska <mliska@suse.cz>
6267 PR tree-optimization/86089
6268 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6270 2018-06-11 Julia Koval <julia.koval@intel.com>
6272 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6273 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6274 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6276 2018-06-11 Olivier Hainque <hainque@adacore.com>
6278 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6279 for Ada with strict dwarf2.
6281 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
6284 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6287 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
6289 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6291 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6293 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6296 2018-06-08 Martin Liska <mliska@suse.cz>
6298 * tree-cfg.h (debug_function): Fix argument type to match
6301 2018-06-08 Martin Liska <mliska@suse.cz>
6303 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6304 Remove usage of MPX-related (and removed) fields.
6305 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6307 2018-06-08 David Malcolm <dmalcolm@redhat.com>
6309 * cfg.c (debug): Use TDF_NONE rather than 0.
6310 * cfghooks.c (debug): Likewise.
6311 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6312 (struct dump_option_value_info): Convert to...
6313 (struct kv_pair): ...this template type.
6314 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6316 (optinfo_verbosity_options): Likewise.
6317 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6319 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6320 than int for "optgroup_flags" param.
6321 (dump_generic_expr_loc): Use dump_flags_t rather than int for
6323 (dump_dec): Likewise.
6324 (dump_finish): Use TDF_NONE rather than 0.
6325 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6326 rather than int for "optgroup_flags" param. Use TDF_NONE rather
6327 than 0. Update for change to option_ptr.
6328 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6329 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
6330 0. Update for changes to optinfo_verbosity_options and
6332 (opt_info_switch_p): Convert optgroup_flags from int to
6334 (dump_basic_block): Use dump_flags_t rather than int
6335 for "dump_kind" param.
6336 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6337 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6338 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6339 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6340 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6341 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6342 TDF_NONE): Convert from macros to...
6343 (enum dump_flag): ...this new enum.
6344 (dump_flags_t): Update to use enum.
6345 (operator|, operator&, operator~, operator|=, operator&=):
6346 Implement for dump_flags_t.
6347 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6348 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6349 Convert from macros to...
6350 (enum optgroup_flag): ...this new enum.
6351 (optgroup_flags_t): New typedef.
6352 (operator|, operator|=): Implement for optgroup_flags_t.
6353 (struct dump_file_info): Convert field "alt_flags" to
6354 dump_flags_t. Convert field "optgroup_flags" to
6356 (dump_basic_block): Use dump_flags_t rather than int for param.
6357 (dump_generic_expr_loc): Likewise.
6358 (dump_dec): Likewise.
6359 (dump_register): Convert param "optgroup_flags" to
6361 (opt_info_enable_passes): Likewise.
6362 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6364 * gimple-pretty-print.c (debug): Likewise.
6365 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6366 (merged_store_group::apply_stores): Likewise.
6367 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6368 * gimple.c (verify_gimple_pp): Likewise.
6369 * graphite-poly.c (print_pbb_body): Likewise.
6370 * passes.c (pass_manager::register_one_dump_file): Convert
6371 local "optgroup_flags" to optgroup_flags_t.
6372 * print-tree.c (print_node): Use TDF_NONE rather than 0.
6374 (debug_body): Likewise.
6375 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6376 to optgroup_flags_t.
6377 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6379 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6380 (convert_mult_to_fma): Likewise.
6381 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6382 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6383 * tree-vect-data-refs.c (dump_lower_bound): Convert param
6384 "dump_kind" to dump_flags_t.
6386 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6388 * config/rs6000/rs6000.c (min, max): Delete.
6390 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6392 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6393 -mabi=spe and -mabi=no-spe.
6395 2018-06-08 Martin Liska <mliska@suse.cz>
6397 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6398 where we expect an existing summary.
6400 2018-06-08 Martin Liska <mliska@suse.cz>
6402 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6403 * ipa-inline.h (estimate_edge_growth): Likewise.
6405 2018-06-08 Martin Liska <mliska@suse.cz>
6407 * cgraph.c (function_version_hasher::hash): Use
6408 cgraph_node::get_uid ().
6409 (function_version_hasher::equal):
6410 * cgraph.h (cgraph_node::get_uid): New method.
6411 * ipa-inline.c (update_caller_keys): Use
6412 cgraph_node::get_uid ().
6413 (update_callee_keys): Likewise.
6414 * ipa-utils.c (searchc): Likewise.
6415 (ipa_reduced_postorder): Likewise.
6416 * lto-cgraph.c (input_node): Likewise.
6417 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6418 * symbol-summary.h (symtab_insertion): Likewise.
6419 (symtab_removal): Likewise.
6420 (symtab_duplication): Likewise.
6421 * tree-pretty-print.c (dump_function_header): Likewise.
6422 * tree-sra.c (convert_callers_for_node): Likewise.
6424 2018-06-08 Martin Liska <mliska@suse.cz>
6426 * cgraph.c (symbol_table::create_edge): Always assign a new
6428 (symbol_table::free_edge): Do not recycle numbers.
6429 * cgraph.h (cgraph_edge::get): New method.
6430 * symbol-summary.h (symtab_removal): Use it.
6431 (symtab_duplication): Likewise.
6432 (call_summary::hashable_uid): Remove.
6434 2018-06-08 Martin Liska <mliska@suse.cz>
6436 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6437 (initialize_growth_caches): Remove.
6438 (free_growth_caches): Likewise.
6439 (do_estimate_edge_time): Use edge_growth_cache.
6440 (do_estimate_edge_size): Likewise.
6441 (do_estimate_edge_hints): Likewise.
6442 * ipa-inline.c (reset_edge_caches): Likewise.
6443 (recursive_inlining): Likewise.
6444 (inline_small_functions): Likewise.
6445 * ipa-inline.h (initialize_growth_caches): Remove.
6446 (estimate_edge_size): Likewise.
6447 (estimate_edge_time): Likewise.
6448 (estimate_edge_hints): Likewise.
6449 (reset_edge_growth_cache): Likewise.
6450 * symbol-summary.h (call_summary::remove): New method.
6452 2018-06-08 Martin Liska <mliska@suse.cz>
6454 * ipa-cp.c (class edge_clone_summary): New summary.
6455 (grow_edge_clone_vectors): Remove.
6456 (ipcp_edge_duplication_hook): Remove.
6457 (class edge_clone_summary_t): New call_summary class.
6458 (ipcp_edge_removal_hook): Remove.
6459 (edge_clone_summary_t::duplicate): New function.
6460 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6461 (create_specialized_node): Likewise.
6462 (ipcp_driver): Initialize edge_clone_summaries and do not
6465 2018-06-08 Martin Liska <mliska@suse.cz>
6467 * symbol-summary.h (get): New function.
6468 (call_summary::m_initialize_when_cloning): New class member.
6470 2018-06-08 Martin Liska <mliska@suse.cz>
6472 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6473 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6474 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6475 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6476 (remove_cgraph_node_from_order): Use the removed_nodes set.
6477 (do_per_function_toporder): Likwise.
6478 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6479 instead of summary_uid.
6480 (symtab_removal): Likewise.
6481 (symtab_duplication): Likewise.
6483 2018-06-08 Martin Liska <mliska@suse.cz>
6485 * ipa-cp.c (ipcp_store_bits_results): Use
6486 ipcp_transformation_sum.
6487 (ipcp_store_vr_results): Likewise.
6488 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6490 (ipcp_transformation_initialize): ... this.
6491 (ipa_set_node_agg_value_chain):
6492 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6493 (write_ipcp_transformation_info): Likewise.
6494 (read_ipcp_transformation_info): Likewise.
6495 (ipcp_update_bits): Likewise.
6496 (ipcp_update_vr): Likewise.
6497 (ipcp_transform_function): Likewise.
6498 * ipa-prop.h: Rename ipcp_transformation_summary to
6499 ipcp_transformation.
6500 (class ipcp_transformation_t): New function summary.
6501 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6502 (ipa_get_agg_replacements_for_node): Likewise.
6504 2018-06-08 Martin Liska <mliska@suse.cz>
6506 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6508 (class funct_state_summary_t): New function_summary class.
6509 (has_function_state): Remove.
6510 (get_function_state): Likewise.
6511 (set_function_state): Likewise.
6512 (add_new_function): Likewise.
6513 (funct_state_summary_t::insert): New function.
6514 (duplicate_node_data): Remove.
6515 (remove_node_data): Remove.
6516 (funct_state_summary_t::duplicate): New function.
6517 (register_hooks): Create new funct_state_summaries.
6518 (pure_const_generate_summary): Use it.
6519 (pure_const_write_summary): Likewise.
6520 (pure_const_read_summary): Likewise.
6521 (propagate_pure_const): Likewise.
6522 (propagate_nothrow): Likewise.
6523 (dump_malloc_lattice): Likewise.
6524 (propagate_malloc): Likewise.
6525 (execute): Do not register hooks, just remove summary
6527 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6530 2018-06-08 Martin Liska <mliska@suse.cz>
6532 * ipa-reference.c (remove_node_data): Remove.
6533 (duplicate_node_data): Likewise.
6534 (class ipa_ref_var_info_summary_t): New class.
6535 (class ipa_ref_opt_summary_t): Likewise.
6536 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6537 (get_reference_optimization_summary): Use
6538 ipa_ref_opt_sum_summaries.
6539 (set_reference_vars_info): Remove.
6540 (set_reference_optimization_summary): Likewise.
6541 (ipa_init): Create summaries.
6542 (init_function_info): Use function summary.
6543 (ipa_ref_opt_summary_t::duplicate): New function.
6544 (ipa_ref_opt_summary_t::remove): New function.
6545 (get_read_write_all_from_node): Fix GNU coding style.
6546 (propagate): Use function summary.
6547 (write_node_summary_p): Fix GNU coding style.
6548 (stream_out_bitmap): Likewise.
6549 (ipa_reference_read_optimization_summary): Use function summary.
6550 (ipa_reference_c_finalize): Do not release hooks.
6552 2018-06-08 Martin Liska <mliska@suse.cz>
6554 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6555 (analyze_function_body): Extract multiple calls of get_create.
6556 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6557 * ipa-inline.c (recursive_inlining): Use ::get method.
6558 * ipa-inline.h (estimate_edge_growth): Likewise.
6560 2018-06-08 Martin Liska <mliska@suse.cz>
6562 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6564 (hsa_function_summary::hsa_function_summary): Use the new enum
6566 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6567 * hsa-gen.c (hsa_get_host_function): Likewise.
6568 (get_brig_function_name): Likewise.
6569 * ipa-hsa.c (process_hsa_functions): Likewise.
6570 (ipa_hsa_write_summary): Likewise.
6571 * symbol-summary.h (symtab_duplication): Use ::get function/
6572 (get): New function.
6574 2018-06-08 Martin Liska <mliska@suse.cz>
6576 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6578 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6579 (hsa_register_kernel): Likewise.
6580 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6581 * hsa-gen.c (hsa_get_host_function): Likewise.
6582 (get_brig_function_name): Likewise.
6583 (generate_hsa): Likewise.
6584 (pass_gen_hsail::execute): Likewise.
6585 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6586 (devirtualization_time_bonus): Likewise.
6587 (ipcp_propagate_stage): Likewise.
6588 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6589 (edge_set_predicate): Likewise.
6590 (evaluate_conditions_for_known_args): Likewise.
6591 (evaluate_properties_for_edge): Likewise.
6592 (ipa_fn_summary::reset): Likewise.
6593 (ipa_fn_summary_t::duplicate): Likewise.
6594 (dump_ipa_call_summary): Likewise.
6595 (ipa_dump_fn_summary): Likewise.
6596 (analyze_function_body): Likewise.
6597 (compute_fn_summary): Likewise.
6598 (estimate_edge_devirt_benefit): Likewise.
6599 (estimate_edge_size_and_time): Likewise.
6600 (estimate_calls_size_and_time): Likewise.
6601 (estimate_node_size_and_time): Likewise.
6602 (inline_update_callee_summaries): Likewise.
6603 (remap_edge_change_prob): Likewise.
6604 (remap_edge_summaries): Likewise.
6605 (ipa_merge_fn_summary_after_inlining): Likewise.
6606 (ipa_update_overall_fn_summary): Likewise.
6607 (read_ipa_call_summary): Likewise.
6608 (inline_read_section): Likewise.
6609 (write_ipa_call_summary): Likewise.
6610 (ipa_fn_summary_write): Likewise.
6611 (ipa_free_fn_summary): Likewise.
6612 * ipa-hsa.c (process_hsa_functions): Likewise.
6613 (ipa_hsa_write_summary): Likewise.
6614 (ipa_hsa_read_section): Likewise.
6615 * ipa-icf.c (sem_function::merge): Likewise.
6616 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6617 (do_estimate_edge_time): Likewise.
6618 (estimate_size_after_inlining): Likewise.
6619 (estimate_growth): Likewise.
6620 (growth_likely_positive): Likewise.
6621 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6622 (inline_call): Likewise.
6623 * ipa-inline.c (caller_growth_limits): Likewise.
6624 (can_inline_edge_p): Likewise.
6625 (can_inline_edge_by_limits_p): Likewise.
6626 (compute_uninlined_call_time): Likewise.
6627 (compute_inlined_call_time): Likewise.
6628 (want_inline_small_function_p): Likewise.
6629 (edge_badness): Likewise.
6630 (update_caller_keys): Likewise.
6631 (update_callee_keys): Likewise.
6632 (recursive_inlining): Likewise.
6633 (inline_small_functions): Likewise.
6634 (inline_to_all_callers_1): Likewise.
6635 (dump_overall_stats): Likewise.
6636 (early_inline_small_functions): Likewise.
6637 (early_inliner): Likewise.
6638 * ipa-inline.h (estimate_edge_growth): Likewise.
6639 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6640 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6641 * ipa-prop.h (IPA_NODE_REF): Likewise.
6642 (IPA_EDGE_REF): Likewise.
6643 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6644 (propagate_malloc): Likewise.
6645 * ipa-split.c (execute_split_functions): Likewise.
6646 * symbol-summary.h: Rename get to get_create.
6648 (get_create): Likewise.
6649 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6651 2018-06-08 Martin Liska <mliska@suse.cz>
6653 * symbol-summary.h (release): Move definition out of class
6655 (symtab_removal): Likewise.
6656 (symtab_duplication): Likewise.
6658 2018-06-08 Martin Liska <mliska@suse.cz>
6660 * symbol-summary.h (function_summary): Move constructor
6661 implementation out of class declaration.
6662 (release): Likewise.
6663 (symtab_insertion): Likewise.
6664 (symtab_removal): Likewise.
6665 (symtab_duplication): Likewise.
6668 2018-06-08 Martin Liska <mliska@suse.cz>
6670 * Makefile.in: Remove support for MPX (macros, related functions,
6671 fields in cgraph_node, ...).
6672 * builtin-types.def (BT_BND): Likewise.
6673 (BT_FN_BND_CONST_PTR): Likewise.
6674 (BT_FN_CONST_PTR_BND): Likewise.
6675 (BT_FN_VOID_PTR_BND): Likewise.
6676 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6677 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6678 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6679 (expand_builtin_mempcpy_with_bounds): Likewise.
6680 (expand_builtin_memset_with_bounds): Likewise.
6681 (expand_builtin_memset_args): Likewise.
6682 (std_expand_builtin_va_start): Likewise.
6683 (expand_builtin): Likewise.
6684 (expand_builtin_with_bounds): Likewise.
6685 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6686 (DEF_LIB_BUILTIN_CHKP): Likewise.
6687 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6688 (DEF_CHKP_BUILTIN): Likewise.
6689 (BUILT_IN_MEMCPY): Likewise.
6690 (BUILT_IN_MEMMOVE): Likewise.
6691 (BUILT_IN_MEMPCPY): Likewise.
6692 (BUILT_IN_MEMSET): Likewise.
6693 (BUILT_IN_STPCPY): Likewise.
6694 (BUILT_IN_STRCAT): Likewise.
6695 (BUILT_IN_STRCHR): Likewise.
6696 (BUILT_IN_STRCPY): Likewise.
6697 (BUILT_IN_STRLEN): Likewise.
6698 (BUILT_IN_MEMCPY_CHK): Likewise.
6699 (BUILT_IN_MEMMOVE_CHK): Likewise.
6700 (BUILT_IN_MEMPCPY_CHK): Likewise.
6701 (BUILT_IN_MEMSET_CHK): Likewise.
6702 (BUILT_IN_STPCPY_CHK): Likewise.
6703 (BUILT_IN_STRCAT_CHK): Likewise.
6704 (BUILT_IN_STRCPY_CHK): Likewise.
6705 * calls.c (store_bounds): Likewise.
6706 (emit_call_1): Likewise.
6707 (special_function_p): Likewise.
6708 (maybe_warn_nonstring_arg): Likewise.
6709 (initialize_argument_information): Likewise.
6710 (finalize_must_preallocate): Likewise.
6711 (compute_argument_addresses): Likewise.
6712 (expand_call): Likewise.
6713 * cfgexpand.c (expand_call_stmt): Likewise.
6714 (expand_return): Likewise.
6715 (expand_gimple_stmt_1): Likewise.
6716 (pass_expand::execute): Likewise.
6717 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6718 (cgraph_node::remove): Likewise.
6719 (cgraph_node::dump): Likewise.
6720 (cgraph_node::verify_node): Likewise.
6721 * cgraph.h (chkp_function_instrumented_p): Likewise.
6722 (symtab_node::get_alias_target): Likewise.
6723 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6724 (cgraph_local_p): Likewise.
6725 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6726 (cgraph_edge::rebuild_references): Likewise.
6727 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6728 (walk_polymorphic_call_targets): Likewise.
6729 (cgraph_node::expand_thunk): Likewise.
6730 (symbol_table::output_weakrefs): Likewise.
6731 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6732 (ix86_handle_option): Likewise.
6733 * config/i386/constraints.md: Likewise.
6734 * config/i386/i386-builtin-types.def (BND): Likewise.
6738 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6739 (BDESC_FIRST): Likewise.
6741 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6742 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6743 * config/i386/i386.c (enum reg_class): Likewise.
6744 (ix86_target_string): Likewise.
6745 (ix86_option_override_internal): Likewise.
6746 (ix86_conditional_register_usage): Likewise.
6747 (ix86_valid_target_attribute_inner_p): Likewise.
6748 (ix86_set_indirect_branch_type): Likewise.
6749 (ix86_set_current_function): Likewise.
6750 (ix86_function_arg_regno_p): Likewise.
6751 (init_cumulative_args): Likewise.
6752 (ix86_function_arg_advance): Likewise.
6753 (ix86_function_arg): Likewise.
6754 (ix86_pass_by_reference): Likewise.
6755 (ix86_function_value_regno_p): Likewise.
6756 (ix86_function_value_1): Likewise.
6757 (ix86_function_value_bounds): Likewise.
6758 (ix86_return_in_memory): Likewise.
6759 (ix86_setup_incoming_vararg_bounds): Likewise.
6760 (ix86_va_start): Likewise.
6761 (indirect_thunk_need_prefix): Likewise.
6762 (print_reg): Likewise.
6763 (ix86_print_operand): Likewise.
6764 (ix86_expand_call): Likewise.
6765 (ix86_output_function_return): Likewise.
6766 (reg_encoded_number): Likewise.
6767 (BDESC_VERIFYS): Likewise.
6768 (ix86_init_mpx_builtins): Likewise.
6769 (ix86_init_builtins): Likewise.
6770 (ix86_emit_cmove): Likewise.
6771 (ix86_emit_move_max): Likewise.
6772 (ix86_expand_builtin): Likewise.
6773 (ix86_builtin_mpx_function): Likewise.
6774 (ix86_get_arg_address_for_bt): Likewise.
6775 (ix86_load_bounds): Likewise.
6776 (ix86_store_bounds): Likewise.
6777 (ix86_load_returned_bounds): Likewise.
6778 (ix86_store_returned_bounds): Likewise.
6779 (ix86_class_likely_spilled_p): Likewise.
6780 (ix86_hard_regno_mode_ok): Likewise.
6781 (x86_order_regs_for_local_alloc): Likewise.
6782 (ix86_mitigate_rop): Likewise.
6783 (ix86_bnd_prefixed_insn_p): Likewise.
6784 (ix86_mpx_bound_mode): Likewise.
6785 (ix86_make_bounds_constant): Likewise.
6786 (ix86_initialize_bounds): Likewise.
6787 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6788 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6789 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6790 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6791 (TARGET_CHKP_BOUND_MODE): Likewise.
6792 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6793 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6794 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6795 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6796 * config/i386/i386.h (TARGET_MPX): Likewise.
6797 (TARGET_MPX_P): Likewise.
6798 (VALID_BND_REG_MODE): Likewise.
6799 (FIRST_BND_REG): Likewise.
6800 (LAST_BND_REG): Likewise.
6801 (enum reg_class): Likewise.
6802 (BND_REG_P): Likewise.
6803 (BND_REGNO_P): Likewise.
6804 (BNDmode): Likewise.
6805 (ADJUST_INSN_LENGTH): Likewise.
6806 * config/i386/i386.md: Likewise.
6807 * config/i386/i386.opt: Likewise.
6808 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6809 (defined): Likewise.
6810 (LINK_MPX): Likewise.
6811 (MPX_SPEC): Likewise.
6812 (LIBMPX_SPEC): Likewise.
6813 (LIBMPXWRAPPERS_SPEC): Likewise.
6814 (CHKP_SPEC): Likewise.
6815 * config/i386/predicates.md: Likewise.
6816 * dbxout.c (dbxout_type): Likewise.
6817 * doc/extend.texi: Likewise.
6818 * doc/invoke.texi: Likewise.
6819 * doc/md.texi: Likewise.
6820 * doc/tm.texi: Likewise.
6821 * doc/tm.texi.in: Likewise.
6822 * dwarf2out.c (is_base_type): Likewise.
6823 (gen_formal_types_die): Likewise.
6824 (gen_subprogram_die): Likewise.
6825 (gen_type_die_with_usage): Likewise.
6826 (gen_decl_die): Likewise.
6827 (dwarf2out_late_global_decl): Likewise.
6828 * expr.c (expand_assignment): Likewise.
6829 (emit_storent_insn): Likewise.
6830 (store_expr_with_bounds): Likewise.
6831 (store_expr): Likewise.
6832 (expand_expr_real_1): Likewise.
6833 * expr.h (store_expr_with_bounds): Likewise.
6834 * function.c (use_register_for_decl): Likewise.
6835 (struct bounds_parm_data): Likewise.
6836 (assign_parms_augmented_arg_list): Likewise.
6837 (assign_parm_find_entry_rtl): Likewise.
6838 (assign_parm_is_stack_parm): Likewise.
6839 (assign_parm_load_bounds): Likewise.
6840 (assign_bounds): Likewise.
6841 (assign_parms): Likewise.
6842 (expand_function_start): Likewise.
6843 * gcc.c (CHKP_SPEC): Likewise.
6844 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6845 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6846 (wrestrict_dom_walker::check_call): Likewise.
6847 * gimple.c (gimple_build_call_from_tree): Likewise.
6848 * gimple.h (enum gf_mask): Likewise.
6849 (gimple_call_with_bounds_p): Likewise.
6850 (gimple_call_set_with_bounds): Likewise.
6851 * gimplify.c (gimplify_init_constructor): Likewise.
6852 * ipa-cp.c (initialize_node_lattices): Likewise.
6853 (propagate_constants_across_call): Likewise.
6854 (find_more_scalar_values_for_callers_subset): Likewise.
6855 * ipa-hsa.c (process_hsa_functions): Likewise.
6856 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6857 * ipa-icf.c (sem_function::merge): Likewise.
6858 * ipa-inline.c (early_inliner): Likewise.
6859 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6860 (warn_function_cold): Likewise.
6861 (propagate_pure_const): Likewise.
6862 * ipa-ref.h (enum GTY): Likewise.
6863 * ipa-split.c (find_retbnd): Likewise.
6864 (consider_split): Likewise.
6865 (split_function): Likewise.
6866 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6867 * ipa.c (walk_polymorphic_call_targets): Likewise.
6868 (symbol_table::remove_unreachable_nodes): Likewise.
6869 (process_references): Likewise.
6870 (cgraph_build_static_cdtor_1): Likewise.
6871 * lto-cgraph.c (lto_output_node): Likewise.
6872 (output_refs): Likewise.
6873 (compute_ltrans_boundary): Likewise.
6874 (input_overwrite_node): Likewise.
6875 (input_node): Likewise.
6876 (input_cgraph_1): Likewise.
6877 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6878 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6879 (class pass_chkp_instrumentation_passes): Likewise.
6880 (make_pass_chkp_instrumentation_passes): Likewise.
6881 * passes.def: Likewise.
6882 * rtl.h (struct GTY): Likewise.
6883 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6884 * stor-layout.c (layout_type): Likewise.
6885 * symtab.c: Likewise.
6886 * target.def: Likewise.
6887 * targhooks.c (default_chkp_bound_type): Likewise.
6888 (default_chkp_bound_mode): Likewise.
6889 (default_builtin_chkp_function): Likewise.
6890 (default_chkp_function_value_bounds): Likewise.
6891 (default_chkp_make_bounds_constant): Likewise.
6892 (default_chkp_initialize_bounds): Likewise.
6893 * targhooks.h (default_chkp_bound_type): Likewise.
6894 (default_chkp_bound_mode): Likewise.
6895 (default_builtin_chkp_function): Likewise.
6896 (default_chkp_function_value_bounds): Likewise.
6897 (default_chkp_make_bounds_constant): Likewise.
6898 (default_chkp_initialize_bounds): Likewise.
6899 * toplev.c (compile_file): Likewise.
6900 (process_options): Likewise.
6901 * tree-core.h (DEF_BUILTIN): Likewise.
6902 (DEF_BUILTIN_CHKP): Likewise.
6903 * tree-inline.c (declare_return_variable): Likewise.
6904 (remap_gimple_stmt): Likewise.
6905 (copy_bb): Likewise.
6906 (initialize_inlined_parameters): Likewise.
6907 (expand_call_inline): Likewise.
6908 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6909 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6910 (make_pass_ipa_chkp_produce_thunks): Likewise.
6911 (make_pass_chkp): Likewise.
6912 (make_pass_chkp_opt): Likewise.
6913 (make_pass_chkp_instrumentation_passes): Likewise.
6914 * tree-pretty-print.c (dump_generic_node): Likewise.
6915 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6916 * tree-ssa-dce.c (propagate_necessity): Likewise.
6917 (eliminate_unnecessary_stmts): Likewise.
6918 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6919 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6920 * tree-ssa-sccvn.h: Likewise.
6921 * tree-ssa-strlen.c (get_string_length): Likewise.
6922 (valid_builtin_call): Likewise.
6923 (adjust_last_stmt): Likewise.
6924 (handle_builtin_strchr): Likewise.
6925 (handle_builtin_strcpy): Likewise.
6926 (handle_builtin_stxncpy): Likewise.
6927 (handle_builtin_memcpy): Likewise.
6928 (handle_builtin_strcat): Likewise.
6929 (strlen_check_and_optimize_stmt): Likewise.
6930 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6931 * tree-streamer-in.c: Likewise.
6932 * tree-streamer.c (record_common_node): Likewise.
6933 * tree.c (tree_code_size): Likewise.
6934 (wide_int_to_tree_1): Likewise.
6935 (type_contains_placeholder_1): Likewise.
6936 (build_common_tree_nodes): Likewise.
6937 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6938 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6939 (POINTER_BOUNDS_P): Likewise.
6940 (BOUNDED_TYPE_P): Likewise.
6941 (BOUNDED_P): Likewise.
6942 (CALL_WITH_BOUNDS_P): Likewise.
6943 (pointer_bounds_type_node): Likewise.
6944 * value-prof.c (gimple_ic): Likewise.
6945 * var-tracking.c (vt_add_function_parameters): Likewise.
6946 * varasm.c (make_decl_rtl): Likewise.
6947 (assemble_start_function): Likewise.
6948 (output_constant): Likewise.
6949 (maybe_assemble_visibility): Likewise.
6950 * varpool.c (ctor_for_folding): Likewise.
6951 * chkp-builtins.def: Remove.
6952 * ipa-chkp.c: Remove.
6953 * ipa-chkp.h: Remove.
6954 * rtl-chkp.c: Remove.
6955 * rtl-chkp.h: Remove.
6956 * tree-chkp-opt.c: Remove.
6957 * tree-chkp.c: Remove.
6958 * tree-chkp.h: Remove.
6960 2018-06-07 Carl Love <cel@us.ibm.com>
6962 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6963 vextract_fp_from_shortl): Add BE support.
6965 2018-06-07 Paul Koning <ni1d@arrl.net>
6967 * compare-elim.c (try_merge_compare): Don't merge compare if
6968 address contains a side effect.
6969 (try_eliminate_compare): Likewise.
6971 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6973 * config.gcc: Support "tremont".
6974 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6975 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6977 * config/i386/i386.c (m_TREMONT): Define.
6978 (processor_target_table): Add "tremont".
6979 (PTA_TREMONT): Define.
6980 (ix86_lea_outperforms): Add TARGET_TREMONT.
6981 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6982 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6983 and M_INTEL_GOLDMONT_PLUS.
6984 (fold_builtin_cpu): Add "tremont".
6985 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6986 (ix86_option_override_internal): Add "tremont".
6987 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6988 (processor_type): Add PROCESSOR_TREMONT.
6989 * config/i386/x86-tune.def: Add m_TREMONT.
6990 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6992 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6994 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6995 symbol defined for msp430i* devices to be lower case.
6997 2018-06-07 Richard Biener <rguenther@suse.de>
6999 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7000 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
7001 Properly wrap signed arithmetic if overflow wraps.
7003 2018-06-07 Jakub Jelinek <jakub@redhat.com>
7005 PR tree-optimization/69615
7006 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7007 of a cast from a same precision integral SSA_NAME in a bb dominated
7008 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
7009 cast to utype if rhs2 has already a compatible type.
7011 2018-06-07 Richard Biener <rguenther@suse.de>
7013 PR tree-optimization/85935
7014 * graphite-scop-detection.c (find_params_in_bb): Analyze
7015 condition operands with respect to the correct loop. Assert
7016 the analysis doesn't fail.
7018 2018-06-04 Carl Love <cel@us.ibm.com>
7020 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7021 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
7022 as it is slightly cheaper.
7023 (first_match_or_eos_index_<mode>):
7024 Calculate index using natural element order.
7025 (first_match_index_<mode>):
7026 Calculate index using natural element order.
7027 (first_match_or_eos_index_<mode>):
7028 Calculate index using natural order.
7029 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7030 for BE and LE modes.
7031 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7032 P9V_BUILTIN_VCLZLSBB_V16QI.
7033 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7036 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7038 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7039 indentation and line wrap for many prototypes. Add missing
7040 @smallexample directives around block of prototypes for vec_xl and
7043 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
7045 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7046 track if we pass or return IEEE 128-bit floating point.
7047 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7048 C++ mangling that is compatible with GCC 8.1.
7049 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7050 (init_cumulative_args): Note if we pass or return IEEE 128-bit
7051 floating point types.
7052 (rs6000_function_arg_advance_1): Likewise.
7053 (rs6000_mangle_type): Optionally generate mangled names that match
7054 what GCC 8.1 generated for IEEE 128-bit floating point types.
7055 (rs6000_globalize_decl_name): If we have an external function that
7056 passes or returns IEEE 128-bit types, generate a weak reference
7057 from the mangled name used in GCC 8.1 to the current mangled
7059 (rs6000_init_builtins): Make __ibm128 use the long double type if
7060 long double is IBM extended double. Make __float128 use the long
7061 double type if long double is IEEE 128-bit.
7064 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7065 macro for __ibm128 built-in functions.
7066 (PACK_IF): Add __ibm128 pack/unpack functions.
7067 (UNPACK_IF): Likewise.
7068 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7069 enable long double built-in functions if long double is IEEE
7070 128-bit floating point.
7071 (rs6000_invalid_builtin): Update long double built-in function
7073 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7074 functions, adjust the built-in function to use the long double
7075 built-in function if __ibm128 and long double are the same type.
7076 * doc/extend.texi (PowerPC builtins): Update documention for
7077 __builtin_{,un}pack_longdouble. Add documentation for
7078 __builtin_{,un}pack_ibm128.
7080 2018-06-06 Jim Wilson <jimw@sifive.com>
7082 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7083 (struct machine_function): New field interrupt_mode.
7084 (riscv_handle_type_attribute): New function. Add forward declaration.
7085 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7086 (riscv_expand_epilogue): Check interrupt_mode field.
7087 (riscv_set_current_function): Check interrupt attribute args and
7088 set interrupt_mode field.
7089 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7090 (riscv_sret, riscv_uret): New.
7091 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7092 new arguments to interrupt attribute.
7094 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
7097 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7098 Don't handle -mcpu=power8 if -mpower9-vector is also used.
7100 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7102 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7103 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7104 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7105 several redundant entries.
7107 2018-06-06 David Malcolm <dmalcolm@redhat.com>
7109 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7110 type from "rtx" to "rtx_insn *".
7111 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7112 for local "call_insn", removing cast.
7113 (ix86_expand_call): Likewise, introducing a "call_insn" local.
7115 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
7117 PR tree-optimization/86066
7118 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7119 for BIT_INSERT_EXPR stores.
7121 2018-06-06 Richard Biener <rguenther@suse.de>
7123 PR tree-optimization/86062
7124 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7125 component refs ontop
7126 of to be offsetted base.
7128 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7130 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7131 to be static and remove check on interrupt attribute name.
7133 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
7135 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7136 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7138 2018-06-05 Steve Ellcey <sellcey@cavium.com>
7141 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7143 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7144 Remove second argument, change how error is called.
7145 (aarch64_layout_arg): Remove second argument from
7146 aarch64_err_no_fpadvsimd call.
7147 (aarch64_init_cumulative_args): Ditto.
7148 (aarch64_gimplify_va_arg_expr): Ditto.
7149 * config/aarch64/aarch64.md (mov<mode>): Ditto.
7151 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
7153 * config/i386/i386.md (simple_return_indirect_internal): New expander.
7154 (*simple_return_indirect_internal<mode>): Rename from
7155 simple_return_indirect_internal. Use W mode iterator.
7156 (rstorssp): New expander.
7157 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
7158 (clrssbsy): New expander.
7159 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
7161 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
7163 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7165 (cmse_check_pointed_object): Likewise.
7167 2018-06-05 Martin Liska <mliska@suse.cz>
7169 PR gcov-profile/47618
7170 * doc/invoke.texi: Document how -fprofile-dir format
7173 2018-06-05 Richard Biener <rguenther@suse.de>
7175 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7176 removal pretend DOM info isn't available so we do not update
7177 it and only remove edges, not dominated blocks. Actually free
7178 DOM info in case we removed something. Remove unreachable blocks.
7179 (mfb_keep_latches): Work with either DOM info or marked backedges.
7180 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7181 first. Mark backedges if DOM info isn't available.
7182 (Re-)compute DOM info after cleanup_control_flow_pre.
7184 2018-06-05 Richard Biener <rguenther@suse.de>
7186 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7187 (locus_discrim_hasher::hash): Adjust.
7188 (locus_discrim_hasher::equal): Likewise.
7189 (next_discriminator_for_locus): Work on line directly.
7190 (same_line_p): Pass in expanded locus1 as well.
7191 (assign_discriminators): Avoid redundant location expansions.
7193 2018-06-05 Richard Biener <rguenther@suse.de>
7195 PR tree-optimization/86046
7196 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7197 if required after clearing TREE_ADDRESSABLE.
7199 2018-06-05 Richard Biener <rguenther@suse.de>
7201 PR tree-optimization/86047
7202 * tree-ssa-loop.c (for_each_index): Glob handling of all
7203 decls and constants and really handle all of them.
7205 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7208 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7209 qualifier_void_pointer and qualifier_const_void_pointer.
7210 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7211 (arm_init_builtins): Handle the above.
7212 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7213 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7214 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7217 2018-06-05 Martin Liska <mliska@suse.cz>
7219 * auto-profile.c (read_autofdo_file): Do not use
7220 gcov_ctr_summary struct.
7221 (afdo_callsite_hot_enough_for_early_inline): Likewise.
7222 * coverage.c (struct counts_entry): Likewise.
7223 (read_counts_file): Read just single summary entry.
7224 (get_coverage_counts): Use gcov_summary struct.
7225 * coverage.h (get_coverage_counts): Likewise.
7226 * gcov-dump.c (dump_working_sets): Likewise.
7227 (tag_summary): Dump just single summary.
7228 * gcov-io.c (gcov_write_summary): Write just histogram
7230 (gcov_read_summary): Read just single summary.
7231 (compute_working_sets): Use gcov_summary struct.
7232 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7233 of GCOV_COUNTERS_SUMMABLE.
7234 (GCOV_COUNTERS_SUMMABLE): Remove.
7235 (GCOV_FIRST_VALUE_COUNTER): Replace with
7236 GCOV_COUNTER_V_INTERVAL.
7237 (struct gcov_ctr_summary): Remove.
7238 (struct gcov_summary): Directly use fields of former
7240 (compute_working_sets): Use gcov_summary struct.
7241 * gcov.c (read_count_file): Do not use ctrs fields.
7242 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7244 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7246 * profile.c: Likewise.
7247 * profile.h: Likewise.
7249 2018-06-05 Martin Liska <mliska@suse.cz>
7251 PR gcov-profile/84846
7252 * gcov.c (output_lines): Print working directory only
7253 in intermediate format.
7255 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
7257 * config/s390/s390-builtin-types.def: Add void function type.
7258 * config/s390/s390-builtins.def: Use the function type for the
7261 2018-06-04 Jim Wilson <jimw@sifive.com>
7263 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7265 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7266 and maybe_eh_return. Change regno to unsigned int. Use new args to
7267 handle EH_RETURN_DATA_REGNO registers properly.
7268 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7269 (riscv_expand_epilogue): Update comment. Change argument name and
7270 type. Update code to use new name and type. Pass new args to
7271 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
7273 * config/riscv/riscv.md (NORMAL_RETURN): New.
7274 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7275 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7276 (eh_return): Call gen_eh_return_internal and emit barrier.
7277 (eh_return_internal): Call riscv_expand_epilogue.
7279 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
7281 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7282 bit_insertion field and declare can_be_merged_into method.
7283 (merged_store_group::can_be_merged_into): New method.
7284 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7285 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
7286 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7288 2018-06-04 Richard Biener <rguenther@suse.de>
7290 PR tree-optimization/85955
7291 * builtins.c (fold_builtin_sincos): Convert pointers to
7292 destination to appropriate type before dereferencing.
7294 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
7296 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7298 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
7300 * expr.c (expand_expr_real_1): Force the operand into memory if
7301 its TYPE_MODE is BLKmode and if there is no integer mode for
7302 the number of bits being extracted.
7304 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7308 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7309 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7311 2018-06-04 Richard Biener <rguenther@suse.de>
7313 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7314 (cleanup_tree_cfg_noloop): ... single caller. Do
7315 start_recording_case_labels later.
7317 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
7319 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7320 to _IMMINTRIN_H_INCLUDED.
7321 * config/i386/pconfigintrin.h: Ditto.
7322 * config/i386/waitpkgintrin.h: Ditto.
7323 * config/i386/immintrin.h: Add includes for sgxintrin.h,
7324 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7325 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7326 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7327 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7328 waitpkgintrin.h and cldemoteintrin.h.
7330 2018-06-04 Richard Biener <rguenther@suse.de>
7332 PR tree-optimization/86038
7333 * tracer.c (find_best_successor): Check probability for
7334 being initialized, bail out if not.
7336 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
7339 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7340 of bits to ignore when comparing architectures.
7342 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7344 PR tree-optimization/69615
7345 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7346 maximum or minimum of the type, try to merge it also as if
7347 range1 is + [-, x - 1] or + [x + 1, -].
7350 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7352 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
7354 PR tree-optimization/86034
7355 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7356 the unsigned bitfield type in a bit insertion sequence if it does not
7357 have a larger precision than the bitfield size.
7358 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7360 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
7362 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7364 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7366 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7367 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7368 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7369 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7371 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7373 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7374 Disable -fdelete-null-pointer-checks for ELF toolchain.
7376 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7377 Kito Cheng <kito.cheng@gmail.com>
7379 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7380 (nds32le-*-*, nds32be-*-*): Integrate checking process.
7381 (nds32*-*-*): Add glibc and uclibc conditions.
7382 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7383 (TARGET_EXCEPT_UNWIND_INFO): Define.
7384 * config/nds32/elf.h: New file.
7385 * config/nds32/linux.h: New file.
7386 * config/nds32/nds32-elf.opt: New file.
7387 * config/nds32/nds32-linux.opt: New file.
7388 * config/nds32/nds32-fp-as-gp.c
7389 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7390 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7392 (nds32_asm_file_end): Ditto.
7393 (nds32_print_operand): Ditto.
7394 (nds32_insert_attributes): Ditto.
7395 (nds32_init_libfuncs): New function.
7396 (TARGET_HAVE_TLS): Define.
7397 (TARGET_INIT_LIBFUNCS): Define.
7398 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7400 (TARGET_ELF): Apply different mcmodel setting.
7401 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7402 been migrated into elf.h and linux.h files.
7403 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7404 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7405 (mcmodel): The content has been migrated into nds32-elf.opt and
7406 nds32-linux.opt files.
7407 * config/nds32/t-elf: New file.
7408 * config/nds32/t-linux: New file.
7410 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7411 Shiva Chen <shiva0217@gmail.com>
7413 * config/nds32/constants.md (unspec_volatile_element): Add
7414 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7415 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7417 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7418 (make_pass_nds32_fp_as_gp): Declare.
7419 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7421 (nds32_asm_function_end_prologue): Remove unused asm output.
7422 (nds32_asm_function_begin_epilogue): Remove unused asm output.
7423 (nds32_asm_file_start): Output necessary fp_as_gp information.
7424 (nds32_option_override): Adjust register usage.
7425 (nds32_expand_prologue): Consider fp_as_gp situation.
7426 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7427 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7430 (simple_return): Ditto.
7431 (omit_fp_begin): Output special directive for fp_as_gp.
7432 (omit_fp_end): Output special directive for fp_as_gp.
7433 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7434 mforbid-fp-as-gp): New options.
7436 2018-06-01 Mark Wielaard <mark@klomp.org>
7438 * dwarf2out.c (dwarf2out_finish): Remove generation of
7439 DW_AT_loclists_base.
7441 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7443 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7444 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7445 (struct merged_store_group): Add bit_insertion field.
7446 (dump_char_array): Use standard hexadecimal format.
7447 (merged_store_group::merged_store_group): Set bit_insertion to false.
7448 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7449 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7450 also print the mask in the dump file.
7451 (pass_store_merging::gate): Minor tweak.
7452 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7453 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7454 stores with INTEGER_CST stores.
7455 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7456 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7457 and use it throughout. Generate bit insertion sequences if need be.
7458 (pass_store_merging::process_store): Remove redundant condition.
7459 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7461 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7463 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7464 the 128-bit floating point types. Fix function comment.
7466 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7468 * config/aarch64/aarch64-simd.md
7469 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7471 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7474 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7476 PR tree-optimization/85989
7477 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7479 (backprop::intersect_uses): Check it when deciding whether this
7480 is a backedge reference.
7481 (backprop::process_block): Add each phi to m_visited_phis
7482 after visiting it, then clear it at the end.
7484 2018-06-01 Richard Biener <rguenther@suse.de>
7486 * tree-vectorizer.h (vect_dr_stmt): New function.
7487 (vect_get_load_cost): Adjust.
7488 (vect_get_store_cost): Likewise.
7489 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7490 Use vect_dr_stmt instead of DR_SMTT.
7491 (vect_record_base_alignments): Likewise.
7492 (vect_calculate_target_alignment): Likewise.
7493 (vect_compute_data_ref_alignment): Likewise and make static.
7494 (vect_update_misalignment_for_peel): Likewise.
7495 (vect_verify_datarefs_alignment): Likewise.
7496 (vector_alignment_reachable_p): Likewise.
7497 (vect_get_data_access_cost): Likewise. Pass down
7498 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7499 (vect_get_peeling_costs_all_drs): Likewise.
7500 (vect_peeling_hash_get_lowest_cost): Likewise.
7501 (vect_enhance_data_refs_alignment): Likewise.
7502 (vect_find_same_alignment_drs): Likewise.
7503 (vect_analyze_data_refs_alignment): Likewise.
7504 (vect_analyze_group_access_1): Likewise.
7505 (vect_analyze_group_access): Likewise.
7506 (vect_analyze_data_ref_access): Likewise.
7507 (vect_analyze_data_ref_accesses): Likewise.
7508 (vect_vfa_segment_size): Likewise.
7509 (vect_small_gap_p): Likewise.
7510 (vectorizable_with_step_bound_p): Likewise.
7511 (vect_prune_runtime_alias_test_list): Likewise.
7512 (vect_analyze_data_refs): Likewise.
7513 (vect_supportable_dr_alignment): Likewise.
7514 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7515 (vect_gen_prolog_loop_niters): Likewise.
7516 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7517 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7519 (vect_recog_mask_conversion_pattern): Likewise.
7520 (vect_try_gather_scatter_pattern): Likewise.
7521 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7522 to vect_get_store_cost.
7523 (vect_get_store_cost): Get stmt_info instead of DR.
7524 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7525 (vect_get_load_cost): Get stmt_info instead of DR.
7527 2018-06-01 Richard Biener <rguenther@suse.de>
7530 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7531 vars wrapped in MEM_REFs.
7533 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7535 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7536 Fix subreg tests so that we only return a choice between
7537 GENERAL_REGS and FP_REGS if the original classes included both.
7539 2018-06-01 Richard Biener <rguenther@suse.de>
7542 * tree-ssa-structalias.c (get_function_part_constraint):
7543 Handle NULL fi->decl.
7544 (find_func_aliases_for_call): Properly handle indirect
7545 fi from direct call.
7546 (find_func_clobbers): Likewise.
7547 (ipa_pta_execute): Likewise.
7548 (create_variable_info_for): For functions that are ifunc_resolver
7549 resolve to a varinfo that contains the result of the resolver call.
7550 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7553 2018-05-31 Michael Collison <michael.collison@arm.com>
7555 * config/aarch64/aarch64.md:
7556 (*fix_to_zero_extenddfdi2): New pattern.
7557 * gcc.target/aarch64/fix_extend1.c: New testcase.
7559 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7563 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7564 and BUILT_IN_STRNCMP_EQ.
7565 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7566 BUILT_IN_STRNCMP_EQ.
7567 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7568 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7569 (gimple_fold_builtin): Likewise.
7570 * tree-ssa-strlen.c (compute_string_length): New function.
7571 (determine_min_obsize): New function.
7572 (handle_builtin_string_cmp): New function to handle calls to
7573 string compare functions.
7574 (strlen_optimize_stmt): Add handling to builtin string compare
7576 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7577 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7578 * tree.c (build_common_builtin_nodes): Add new defines of
7579 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7581 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7584 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7585 functions with naked attribute.
7587 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7589 * config/i386/sse.md (avx_vec_concat<mode>):
7590 Substitute concat_tg_mode mode attribute with xtg_mode.
7591 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7592 (concat_tg_mode): Remove mode attribute.
7594 2018-05-31 Martin Sebor <msebor@redhat.com>
7597 * calls.c (alloc_max_size): Correct a logic error/typo.
7598 Treat excessive arguments as infinite. Warn for invalid arguments.
7599 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7601 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7604 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7605 and movx for Haswell.
7607 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7608 Cesar Philippidis <cesar@codesourcery.com>
7611 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7612 when emitting error on private/firstprivate reductions.
7613 * omp-low.c (lower_omp_target): Avoid reference-type processing
7614 on pointers for firstprivate clause.
7616 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7618 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7621 * config/aarch64/aarch64-simd.md
7622 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7623 (aarch64_ld1_x3_<mode>): Likewise
7624 (aarch64_st1x2<VALLDIF:mode>): Likewise
7625 (aarch64_st1_x2_<mode>): Likewise
7626 (aarch64_st1x3<VALLDIF:mode>): Likewise
7627 (aarch64_st1_x3_<mode>): Likewise
7628 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7629 (vld1_s8_x3): Likewise.
7630 (vld1_u16_x3): Likewise.
7631 (vld1_s16_x3): Likewise.
7632 (vld1_u32_x3): Likewise.
7633 (vld1_s32_x3): Likewise.
7634 (vld1_u64_x3): Likewise.
7635 (vld1_s64_x3): Likewise.
7636 (vld1_f16_x3): Likewise.
7637 (vld1_f32_x3): Likewise.
7638 (vld1_f64_x3): Likewise.
7639 (vld1_p8_x3): Likewise.
7640 (vld1_p16_x3): Likewise.
7641 (vld1_p64_x3): Likewise.
7642 (vld1q_u8_x3): Likewise.
7643 (vld1q_s8_x3): Likewise.
7644 (vld1q_u16_x3): Likewise.
7645 (vld1q_s16_x3): Likewise.
7646 (vld1q_u32_x3): Likewise.
7647 (vld1q_s32_x3): Likewise.
7648 (vld1q_u64_x3): Likewise.
7649 (vld1q_s64_x3): Likewise.
7650 (vld1q_f16_x3): Likewise.
7651 (vld1q_f32_x3): Likewise.
7652 (vld1q_f64_x3): Likewise.
7653 (vld1q_p8_x3): Likewise.
7654 (vld1q_p16_x3): Likewise.
7655 (vld1q_p64_x3): Likewise.
7656 (vst1_s64_x2): Likewise.
7657 (vst1_u64_x2): Likewise.
7658 (vst1_f64_x2): Likewise.
7659 (vst1_s8_x2): Likewise.
7660 (vst1_p8_x2): Likewise.
7661 (vst1_s16_x2): Likewise.
7662 (vst1_p16_x2): Likewise.
7663 (vst1_s32_x2): Likewise.
7664 (vst1_u8_x2): Likewise.
7665 (vst1_u16_x2): Likewise.
7666 (vst1_u32_x2): Likewise.
7667 (vst1_f16_x2): Likewise.
7668 (vst1_f32_x2): Likewise.
7669 (vst1_p64_x2): Likewise.
7670 (vst1q_s8_x2): Likewise.
7671 (vst1q_p8_x2): Likewise.
7672 (vst1q_s16_x2): Likewise.
7673 (vst1q_p16_x2): Likewise.
7674 (vst1q_s32_x2): Likewise.
7675 (vst1q_s64_x2): Likewise.
7676 (vst1q_u8_x2): Likewise.
7677 (vst1q_u16_x2): Likewise.
7678 (vst1q_u32_x2): Likewise.
7679 (vst1q_u64_x2): Likewise.
7680 (vst1q_f16_x2): Likewise.
7681 (vst1q_f32_x2): Likewise.
7682 (vst1q_f64_x2): Likewise.
7683 (vst1q_p64_x2): Likewise.
7684 (vst1_s64_x3): Likewise.
7685 (vst1_u64_x3): Likewise.
7686 (vst1_f64_x3): Likewise.
7687 (vst1_s8_x3): Likewise.
7688 (vst1_p8_x3): Likewise.
7689 (vst1_s16_x3): Likewise.
7690 (vst1_p16_x3): Likewise.
7691 (vst1_s32_x3): Likewise.
7692 (vst1_u8_x3): Likewise.
7693 (vst1_u16_x3): Likewise.
7694 (vst1_u32_x3): Likewise.
7695 (vst1_f16_x3): Likewise.
7696 (vst1_f32_x3): Likewise.
7697 (vst1_p64_x3): Likewise.
7698 (vst1q_s8_x3): Likewise.
7699 (vst1q_p8_x3): Likewise.
7700 (vst1q_s16_x3): Likewise.
7701 (vst1q_p16_x3): Likewise.
7702 (vst1q_s32_x3): Likewise.
7703 (vst1q_s64_x3): Likewise.
7704 (vst1q_u8_x3): Likewise.
7705 (vst1q_u16_x3): Likewise.
7706 (vst1q_u32_x3): Likewise.
7707 (vst1q_u64_x3): Likewise.
7708 (vst1q_f16_x3): Likewise.
7709 (vst1q_f32_x3): Likewise.
7710 (vst1q_f64_x3): Likewise.
7711 (vst1q_p64_x3): Likewise.
7713 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7715 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7716 user_label_prefix to name.
7718 * tree-core.h: Update comment about the format of NAME string
7719 passed to handler in attribute_spec.
7721 * config/msp430/msp430.md: Remove erroneous subreg expression from
7722 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7723 zero_extend{q,h}isi2.
7725 2018-05-30 Borislav Petkov <bp@suse.de>
7727 * doc/extend.texi: Document some architecture specific
7728 constraints and sort entries.
7730 2018-05-30 Martin Sebor <msebor@redhat.com>
7733 * builtins.c (expand_builtin_stpcpy_1): New function.
7734 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7735 only if the former succeeds.
7737 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7739 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7742 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7744 * doc/invoke.texi (-flinker-output): Document
7746 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7748 * passes.c (ipa_write_summaries): Only modify statements if body
7750 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7751 incrementally linking.
7752 (ipa_passes): Likewise.
7753 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7754 pass down resolution info.
7755 * common.opt (flag_incremental_link): Update info.
7756 * gcc.c (plugin specs): Turn flinker-output=* to
7757 -plugin-opt=-linker-output-known
7758 * toplev.c (compile_file): Also cut compilation when doing incremental
7760 * flag-types. (enum lto_partition_model): Add
7761 LTO_LINKER_OUTPUT_NOLTOREL.
7762 (invoke.texi): Add -flinker-output docs.
7763 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7764 link same way as WPA; do not stream in dead initializers.
7766 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7767 darf2out_register_external_decl): Support incremental link.
7769 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7771 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7773 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7775 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7776 it down to simple_object_copy_lto_debug_sections.
7777 (run_gcc): Determine incremental LTO link time and configure
7778 lto1 into non-wpa mode, disable renaming of debug sections.
7780 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7782 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7783 descriptions of various incorrectly documented functions.
7785 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7788 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7789 address check not strict.
7791 2018-05-30 Richard Biener <rguenther@suse.de>
7793 PR tree-optimization/85964
7794 * tracer.c (better_p): Drop initialized count check, we only
7795 call the function with initialized counts now.
7796 (find_best_successor): Do find a best edge if one
7797 has uninitialized count.
7798 (find_best_predecessor): Likewise. Do BB frequency check only
7799 if count is initialized.
7801 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7803 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7804 (aarch64_ldrstr_offset_compare): New.
7805 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7806 load/store orderings.
7807 (aarch64_gen_adjusted_ldpstp): Likewise.
7809 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7811 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7812 Check for subset of GENERAL_REGS and FP_REGS.
7813 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7816 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7818 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7819 and wi::to_poly_offset. Add the current offset and then check
7820 whether the sum fits, rather than using an unchecked addition of
7821 a checked term. Check for a shwi rather than a uhwi.
7822 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7823 (store_constructor): Use poly_int_tree_p.
7824 (expand_expr_real_1): Likewise.
7825 * function.c (assign_temp): Likewise.
7826 * fold-const.c (const_binop): Use poly_int_tree_p and
7828 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7830 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7831 to_poly_offset for MEM offsets.
7832 * ipa-icf.c (sem_variable::equals): Likewise.
7833 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7834 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7835 wi::to_poly_offset for BIT_FIELD_REF offsets.
7836 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7838 * var-tracking.c (emit_note_insn_var_location): Use
7839 tree_to_poly_uint64.
7841 2018-05-29 Jim Wilson <jimw@sifive.com>
7843 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7845 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7848 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7849 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7851 (sse4_1_round<mode>2): Use nonimmediate_operand
7852 for operand 1 predicate.
7854 2018-05-29 Martin Sebor <msebor@redhat.com>
7855 Richard Biener <rguenther@suse.de>
7858 * calls.c (get_size_range): Call determine_value_range instead
7859 of get_value_range..
7860 * tree-vrp.h (determine_value_range): Declared new function.
7861 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7863 2018-05-29 Richard Biener <rguenther@suse.de>
7865 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7866 sure to use non-pattern stmts for get_earlier_stmt arguments.
7867 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7868 called on pattern stmts.
7869 (get_later_stmt): Likewise.
7871 2018-05-29 Martin Liska <mliska@suse.cz>
7873 PR gcov-profile/85759
7874 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7877 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7879 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7881 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7885 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7886 VEC_PACK_FLOAT_EXPR): New tree codes.
7887 * tree-pretty-print.c (op_code_prio): Handle
7888 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7889 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7890 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7891 * tree-inline.c (estimate_operator_cost): Likewise.
7892 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7893 * fold-const.c (const_binop): Likewise.
7894 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7895 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7896 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7897 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7898 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7899 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7900 * expr.c (expand_expr_real_2): Likewise.
7901 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7902 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7903 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7905 * optabs.c (expand_widen_pattern_expr): For
7906 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7907 sign from result type rather than operand's type.
7908 (expand_binop_directly): For vec_packu_float_optab and
7909 vec_packs_float_optab allow result type to be different from operand's
7911 * optabs-tree.c (optab_for_tree_code): Handle
7912 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7913 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7914 * tree-vect-generic.c (expand_vector_operations_1): Handle
7915 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7916 VEC_PACK_FLOAT_EXPR.
7917 * tree-vect-stmts.c (supportable_widening_operation): Handle
7919 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7920 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7921 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7922 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7923 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7925 (vec_pack<floatprefix>_float_<mode>): New expander.
7926 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7928 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7929 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7930 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7931 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7932 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7934 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7935 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7936 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7937 VEC_PACK_FLOAT_EXPR): Document.
7939 2018-05-29 Richard Biener <rguenther@suse.de>
7941 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7943 (stmt_vec_info_vec): Make pointer.
7944 (init_stmt_vec_info_vec): Remove.
7945 (free_stmt_vec_info_vec): Likewise.
7946 (set_stmt_vec_info_vec): New function.
7947 (free_stmt_vec_infos): Likewise.
7948 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7949 (set_vinfo_for_stmt): Likewise.
7950 (get_earlier_stmt): Likewise.
7951 (get_later_stmt): Likewise.
7952 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7953 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7954 (vec_info::~vec_info): Free stmt_vec_infos.
7955 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7956 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7957 (pass_slp_vectorize::execute): Likewise.
7958 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7959 (free_stmt_vec_info_vec): Likewise.
7960 (set_stmt_vec_info_vec): New function.
7961 (free_stmt_vec_infos): Likewise.
7962 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7963 the global stmt_vec_info_vec.
7964 * tree-parloops.c (gather_scalar_reductions): Use
7965 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7968 2018-05-29 Richard Biener <rguenther@suse.de>
7970 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7972 2018-05-29 Martin Liska <mliska@suse.cz>
7973 David Malcolm <dmalcolm@redhat.com>
7975 * vec.c (test_reverse): New.
7976 (vec_c_tests): Add new test.
7977 * vec.h (vl_ptr>::reverse): New function.
7979 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7981 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7983 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7986 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7988 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7990 2018-05-28 Richard Biener <rguenther@suse.de>
7992 PR tree-optimization/85933
7993 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7994 look at stmts marked as vectorizable.
7996 2018-05-28 Richard Biener <rguenther@suse.de>
7998 PR tree-optimization/85934
7999 * tree-vect-generic.c (expand_vector_operations_1): Hoist
8000 vector boolean check before scalar optimization.
8002 2018-05-28 Jakub Jelinek <jakub@redhat.com>
8004 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8007 2018-05-28 Mark Wielaard <mark@klomp.org>
8009 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8010 if it is an expression containing a minus sign.
8012 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
8014 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8016 2018-05-27 Paul Koning <ni1d@arrl.net>
8018 * config/pdp11/pdp11.md (truncsihi2): Remove.
8020 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
8021 Chung-Ju Wu <jasonwucj@gmail.com>
8023 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8025 (unaligned_store_dw): Ditto.
8026 * config/nds32/nds32-memory-manipulation.c
8027 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8028 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8029 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8030 (emit_setmem_word_loop): Rename to ...
8031 (emit_setmem_doubleword_loop): ... this.
8032 (nds32_gen_dup_4_byte_to_word_value): New function.
8033 (nds32_gen_dup_8_byte_to_double_word_value): New function.
8034 (nds32_expand_setmem_loop): Refine implementation.
8035 (nds32_expand_setmem_loop_v3m): Ditto.
8036 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8039 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8041 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8043 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8045 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8046 (nds32_init_machine_status): Initialize machine->attr_naked_p and
8047 machine->attr_no_prologue_p.
8048 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8049 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8050 (nds32_expand_epilogue): Consider attr_naked_p.
8051 (nds32_expand_epilogue_v3pop): Likewise.
8052 (nds32_can_use_return_insn): Likewise.
8053 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8054 attr_no_prologue_p fields.
8055 * config/nds32/nds32.opt (mret-in-naked-func): New option.
8057 2018-05-27 Jakub Jelinek <jakub@redhat.com>
8060 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8062 * config/i386/sse.md
8063 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8065 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8067 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8069 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8071 (*<floatsuffix>floatv2div2sf2): Rename to ...
8072 (*float<floatunssuffix>v2div2sf2): ... this.
8073 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8074 (float<floatunssuffix>v2div2sf2_mask): ... this.
8075 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8076 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8077 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8079 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8081 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8083 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8085 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8087 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8089 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8090 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8091 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8092 gen_ufix_truncv8dfv8si2.
8093 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8094 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8095 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8096 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8097 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8098 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8099 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8100 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8102 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8106 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8108 2018-05-25 Jim Wilson <jimw@sifive.com>
8110 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8111 * config/riscv/riscv.c (struct machine_function): Add
8112 interrupt_handler_p and attribute_checked_p fields.
8113 (riscv_attribute_table): Add interrupt.
8114 (riscv_interrupt_type_p): New.
8115 (riscv_save_reg_p): Save extra regs for interrupt handler.
8116 (riscv_use_save_libcall): Return false for interrupt handler.
8117 (riscv_first_stack_step): Add forward declaration.
8118 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
8119 for interrupt handler with large frame. Use it for saved reg list.
8120 (riscv_expand_prologue): Move flag_stack_usage_info support to
8121 eliminate duplication.
8122 (riscv_expand_epilogue): Generate mret for interrupt handler.
8123 (riscv_epilogue_uses): New.
8124 (riscv_can_use_return_insn): Return false for interrupt handler.
8125 (riscv_function_ok_for_sibcall): Likewise.
8126 (riscv_set_current_function): Add interrupt handler support.
8127 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8128 * config/riscv/riscv.md (UNSPECV_MRET): New.
8130 (riscv_frflags, riscv_fsflags): Use tab after opcode.
8132 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8134 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
8136 PR tree-optimization/85712
8137 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8138 this candidate has already been replaced in-situ by a copy.
8140 2018-05-25 Jason Merrill <jason@redhat.com>
8142 PR c++/80485 - inline function non-zero address.
8143 * symtab.c (nonzero_address): Check DECL_COMDAT.
8145 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
8148 * config/alpha/alpha.md (ashlsi3): New insn pattern.
8149 (*ashlsi_se): Rename from *ashldi_se. Define as sign
8150 extension of SImode operation. Use const123_operand predicate.
8151 (*saddsi_1): Remove.
8152 (*saddl_se_1): Ditto.
8154 (*ssubl_se_1): Ditto.
8155 * config/alpha/predicates.md (const123_operand): New predicate.
8156 * config/alpha/constraints.md (P): Use IN_RANGE.
8158 2018-05-25 Richard Biener <rguenther@suse.de>
8160 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8162 (ref_maybe_used_by_stmt_p): Likewise.
8163 (stmt_may_clobber_ref_p): Likewise.
8164 (stmt_may_clobber_ref_p_1): Likewise.
8165 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8167 (ref_maybe_used_by_stmt_p): Likewise.
8168 (stmt_may_clobber_ref_p): Likewise.
8169 (stmt_may_clobber_ref_p_1): Likewise.
8170 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8171 the alias oracle to disambiguate DRs with stmts DR analysis
8173 (vect_analyze_data_refs): Do not give up on not analyzable
8174 DRs for BB vectorization. Remove code truncating the dataref
8177 2018-05-25 Jakub Jelinek <jakub@redhat.com>
8180 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8181 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
8182 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8184 2018-05-25 Richard Biener <rguenther@suse.de>
8186 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8187 function, combining stmt data ref gathering and fatal analysis
8189 (vect_analyze_data_refs): Remove now redudnant code and simplify.
8190 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8191 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8192 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8193 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8195 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8197 PR tree-optimization/85720
8198 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8199 SCC if all partitions are builtins.
8200 (version_loop_by_alias_check): New parameter. Generate cancelable
8201 runtime alias check if all partitions are builtins.
8202 (distribute_loop): Update call to above function.
8204 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8206 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8207 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8208 (parm_default_def_partition_arg): Ditto.
8209 (set_parm_default_def_partition): Ditto.
8210 (get_parm_default_def_partitions): Ditto and make it static.
8211 (get_undefined_value_partitions): Ditto and make it static.
8212 (remove_ssa_form): Refactor call to init_var_map here.
8213 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8214 computation for loop region.
8215 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8216 (register_default_def): Delete.
8217 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8218 (parm_default_def_partition_arg): Ditto.
8219 (set_parm_default_def_partition): Ditto.
8220 (get_parm_default_def_partitions): Ditto and make it static.
8221 (get_undefined_value_partitions): Ditto and make it static.
8222 (coalesce_with_default, coalesce_with_default): Update comment.
8223 (create_coalesce_list_for_region): New func factored out from
8224 create_outofssa_var_map.
8225 (populate_coalesce_list_for_outofssa): New func factored out from
8226 create_outofssa_var_map and coalesce_ssa_name.
8227 (create_outofssa_var_map): Delete.
8228 (coalesce_ssa_name): Refactor to support live range computation.
8229 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8230 (get_parm_default_def_partitions): Delete.
8231 (get_undefined_value_partitions): Ditto.
8232 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8233 computation for loop region.
8234 (new_tree_live_info, loe_visit_block): Ditto.
8235 (live_worklist, set_var_live_on_entry): Ditto.
8236 (calculate_live_on_exit, verify_live_on_entry): Ditto.
8237 * tree-ssa-live.h (struct _var_map): New fields.
8238 (init_var_map): Change decl.
8239 (region_contains_p): New.
8241 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8243 * tree-ssa-live.h (live_merge_and_clear): Delete.
8245 2018-05-25 Richard Biener <rguenther@suse.de>
8248 * tree-dump.c (dequeue_and_dump): Remove access to removed
8249 operand 2 of a SWITCH_EXPR.
8251 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8253 * doc/sourcebuild.texi (vect_double_cond_arith): Include
8254 multiplication and division.
8255 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8256 (cond_udiv@var{m}, cond_umod@var{m}): Document.
8257 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8258 (cond_udiv_optab, cond_umod_optab): New optabs.
8259 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8260 (IFN_COND_RDIV): New internal functions.
8261 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8262 TRUNC_MOD_EXPR and RDIV_EXPR.
8263 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8264 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8266 (SVE_INT_BINARY): Include mult.
8267 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8268 (optab, sve_int_op): Handle mult.
8269 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8271 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8272 for SVE_INT_BINARY_SD.
8274 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8276 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8277 (optab, sve_int_op): Handle div and udiv.
8278 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8279 for SVE_INT_BINARY_SD.
8280 (*<optab><mode>3): New insn for the same.
8282 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8284 * tree-vect-patterns.c: Include predict.h.
8285 (vect_recog_divmod_pattern): Restrict check for division support
8286 to when optimizing for size.
8288 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8290 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8291 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8292 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8293 (gimple_match_op::set_op): Likewise.
8294 (gimple_resimplify4): Declare.
8295 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8296 (expr::gen_transform): Likewise.
8297 (decision_tree::gen): Generate a simplification routine for 4 operands.
8298 * gimple-match-head.c (gimple_simplify): Add an overload for
8299 4 operands. In the top-level function, handle up to 4 call
8300 arguments and call gimple_resimplify4.
8301 (gimple_resimplify4): New function.
8302 (build_call_internal): Pass a fourth operand.
8303 (maybe_push_to_seq): Likewise.
8304 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8305 Fold VEC_COND_EXPRs of an operation and a default value into
8306 an IFN_COND_* function if possible.
8307 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8309 (SVE_COND_FP_BINARY): Include them.
8310 (optab, sve_fp_op): Handle them.
8311 (SVE_INT_BINARY_REV): New code iterator.
8312 (SVE_COND_FP_BINARY_REV): New int iterator.
8313 (commutative): New int attribute.
8314 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8316 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8318 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8319 (*cond_<optab><mode>): New patterns for reversed operands.
8321 2018-05-25 Richard Biener <rguenther@suse.de>
8323 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8324 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8325 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8326 (STMT_VINFO_GROUPED_ACCESS): Adjust.
8327 * tree-vect-data-refs.c (everywhere): Adjust users.
8328 * tree-vect-loop.c (everywhere): Likewise.
8329 * tree-vect-slp.c (everywhere): Likewise.
8330 * tree-vect-stmts.c (everywhere): Likewise.
8331 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8333 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8335 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8337 (gcc_cv_as_section_exclude): ... this.
8338 Try Solaris as #exclude syntax.
8339 * configure: Regenerate.
8340 * config.in: Regenerate.
8341 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8343 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8344 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8346 * varasm.c (default_elf_asm_named_section): Don't check if
8347 HAVE_GAS_SECTION_EXCLUDE is defined.
8349 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8351 * doc/md.texi: Update the documentation of the cond_* optabs
8352 to mention the new final operand. Fix GET_MODE_NUNITS call.
8353 Describe the scalar case too.
8354 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8355 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8357 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8358 (get_conditional_internal_fn): Update comment.
8359 * tree-vect-loop.c (vectorizable_reduction): Pass the original
8360 accumulator value as a final argument to conditional functions.
8361 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8362 a define_expand and add an "else" operand. Assert for now that
8363 the else operand is equal to operand 2. Use SVE_INT_BINARY and
8364 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8365 (*cond_<optab><mode>): New patterns.
8366 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8367 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8368 (UNSPEC_COND_EOR): Delete.
8369 (optab): Remove associated mappings.
8370 (SVE_INT_BINARY): New code iterator.
8371 (sve_int_op): Remove int attribute and add "minus" to the code
8373 (SVE_COND_INT_OP): Delete.
8374 (SVE_COND_FP_OP): Rename to...
8375 (SVE_COND_FP_BINARY): ...this.
8377 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8379 * optabs.c (can_reuse_operands_p): New function.
8380 (maybe_legitimize_operands): Try to reuse the results for
8383 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8385 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8386 Add {q} suffix to insn mnemonic.
8388 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8390 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8391 (msp430_warn_func_return): New.
8393 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
8395 * fold-const.c (tree_nonzero_bits): New function.
8396 * fold-const.h (tree_nonzero_bits): Likewise.
8397 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8398 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8400 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8404 * varasm.c (assemble_alias): Check ifunc_resolver only on
8407 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8410 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8411 when memory input operand is handled.
8413 2018-05-24 Luis Machado <luis.machado@linaro.org>
8415 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8417 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8419 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8421 * match.pd: Delay FMA folds until after vectorization.
8423 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
8426 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8427 address check not strict.
8429 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8431 * gimple-match.h (gimple_match_op): New class.
8432 (mprts_hook): Replace parameters with a gimple_match_op *.
8433 (maybe_build_generic_op): Likewise.
8434 (gimple_simplified_result_is_gimple_val): Replace parameters with
8435 a const gimple_match_op *.
8436 (gimple_simplify): Replace code_helper * and tree * parameters with
8437 a gimple_match_op * parameter.
8438 (gimple_resimplify1): Replace code_helper *, tree and tree *
8439 parameters with a gimple_match_op * parameter.
8440 (gimple_resimplify2): Likewise.
8441 (gimple_resimplify3): Likewise.
8442 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8443 parameters with a gimple_match_op * parameter.
8444 * gimple-match-head.c (gimple_simplify): Change prototypes of
8445 auto-generated functions to take a gimple_match_op * instead of
8446 separate code_helper * and tree * parameters. Make the same
8447 change in the top-level overload and update calls to the
8448 gimple_resimplify routines. Update calls to the auto-generated
8449 functions and to maybe_push_res_to_seq in the publicly-facing
8450 operation-specific gimple_simplify overloads.
8451 (gimple_match_op::MAX_NUM_OPS): Define.
8452 (gimple_resimplify1): Replace rcode and ops with a single res_op
8453 parameter. Update call to gimple_simplify.
8454 (gimple_resimplify2): Likewise.
8455 (gimple_resimplify3): Likewise.
8456 (mprts_hook): Replace parameters with a gimple_match_op *.
8457 (maybe_build_generic_op): Likewise.
8458 (build_call_internal): Replace type, nargs and ops with
8459 a gimple_match_op *.
8460 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8461 with a single gimple_match_op *. Update calls to mprts_hook,
8462 build_call_internal and gimple_simplified_result_is_gimple_val.
8463 Factor out code that is common to the tree_code and combined_fn cases.
8464 * genmatch.c (expr::gen_transform): Replace tem_code and
8465 tem_ops with a gimple_match_op called tem_op. Update calls
8466 to the gimple_resimplify functions and maybe_push_res_to_seq.
8467 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8468 res_ops. Update call to the gimple_resimplify functions.
8469 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8470 (decision_tree::gen): Make the functions take a gimple_match_op *
8471 called res_op instead of separate res_code and res_ops parameters.
8472 Update call accordingly.
8473 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8474 and ops with a single res_op parameter. Update calls to
8475 maybe_build_generic_op and maybe_push_res_to_seq.
8476 (fold_stmt_1): Update calls to gimple_simplify and
8477 replace_stmt_with_simplification.
8478 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8479 and gimple_simplified_result_is_gimple_val.
8480 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8482 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8483 with a gimple_match_op *.
8484 (vn_nary_build_or_lookup): Likewise. Update call to
8485 vn_nary_build_or_lookup_1.
8486 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8487 gimple_match_op *. Update calls to the gimple_resimplify routines
8488 and to gimple_simplified_result_is_gimple_val.
8489 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8490 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8491 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8492 (visit_nary_op): Likewise.
8493 (visit_reference_op_load): Likewise.
8495 2018-05-23 Luis Machado <luis.machado@linaro.org>
8497 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8498 modifier for printing the step amount.
8500 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8503 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8506 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8508 * doc/sourcebuild.texi (Endianness): New subsubsection.
8510 2018-05-23 Luis Machado <luis.machado@linaro.org>
8512 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8513 <prefetch_dynamic_strides>: New const bool field.
8514 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8515 prefetch_dynamic_strides.
8516 (exynosm1_prefetch_tune): Likewise.
8517 (thunderxt88_prefetch_tune): Likewise.
8518 (thunderx_prefetch_tune): Likewise.
8519 (thunderx2t99_prefetch_tune): Likewise.
8520 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8522 (aarch64_override_options_internal): Update to set
8523 PARAM_PREFETCH_DYNAMIC_STRIDES.
8524 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8525 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8526 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8527 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8528 prefetch-dynamic-strides setting.
8530 2018-05-23 Luis Machado <luis.machado@linaro.org>
8532 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8533 <minimum_stride>: New const int field.
8534 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8535 minimum_stride field defaulting to -1.
8536 (exynosm1_prefetch_tune): Likewise.
8537 (thunderxt88_prefetch_tune): Likewise.
8538 (thunderx_prefetch_tune): Likewise.
8539 (thunderx2t99_prefetch_tune): Likewise.
8540 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8541 <default_opt_level>: Set to 3.
8542 (aarch64_override_options_internal): Update to set
8543 PARAM_PREFETCH_MINIMUM_STRIDE.
8544 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8545 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8546 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8547 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8548 stride is constant and is below the minimum stride threshold.
8550 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8552 * config/arm/arm-cpus.in (mode26): Delete.
8553 (armv4): Delete mode26 reference.
8554 * config/arm/arm.c (arm_configure_build_target): Delete use of
8557 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8559 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8561 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8562 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8564 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8565 (floatunsdidf2): Ditto.
8567 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8569 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8570 (fixuns_trunc<mode>si2_avx512f): Ditto.
8571 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8572 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8573 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8575 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8577 PR rtl-optimization/79985
8578 * df-scan.c (df_insn_refs_collect): Remove special case for
8579 global registers and asm statements.
8581 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8583 * extend.texi (Global Register Variables): Rewrite the bullet list.
8584 Note that the register is available for allocation. Note that access
8585 via inline asm must use constraints. Add note about async-signal
8586 handlers. Remove paragraph about automagic register selection.
8588 2018-05-23 Richard Biener <rguenther@suse.de>
8590 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8591 of fixed offset from memset VN.
8593 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8595 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8597 (alloc_cand_and_find_basis): Initialize first_interp field.
8598 (slsr_process_mul): Modify first_interp field.
8599 (slsr_process_add): Likewise.
8600 (slsr_process_cast): Modify first_interp field for each new
8602 (slsr_process_copy): Likewise.
8603 (dump_candidate): Dump first_interp field.
8604 (replace_mult_candidate): Process all interpretations, not just
8606 (replace_rhs_if_not_dup): Likewise.
8607 (replace_one_candidate): Likewise.
8609 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8611 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8613 (aarch64_needs_frame_chain): New function.
8614 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8616 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8619 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8620 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8621 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8622 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8623 as true for strict-align.
8624 (aarch64_can_inline_p): Perform checks even when callee has no
8625 attributes to check for strict alignment.
8626 * doc/extend.texi (AArch64 Function Attributes): Document
8628 * doc/invoke.texi: (AArch64 Options): Likewise.
8630 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8632 PR tree-optimization/85853
8633 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8634 the handling of the root of the node to...
8635 (vect_slp_analyze_node_operations_1): ...this new function,
8636 and run the whole thing with the child nodes' def types
8637 set according to their SLP node's def type.
8639 2018-05-23 Richard Biener <rguenther@suse.de>
8642 * tree-data-ref.c (create_runtime_alias_checks): Defer
8643 and ignore overflow warnings.
8645 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8647 PR tree-optimization/85822
8648 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8651 2018-05-23 Richard Biener <rguenther@suse.de>
8653 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8654 memset constants via native_interpret_expr.
8656 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8659 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8661 (cgraph_node::create_alias): Likewise.
8662 (cgraph_node::get_availability): Check ifunc_resolver instead
8663 of looking up ifunc attribute.
8664 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8665 * varasm.c (do_assemble_alias): Likewise.
8666 (assemble_alias): Likewise.
8667 (default_binds_local_p_3): Likewise.
8668 * cgraph.h (cgraph_node): Add ifunc_resolver.
8669 (cgraph_node::only_called_directly_or_aliased_p): Return false
8671 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8673 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8674 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8675 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8676 instead of looking up ifunc attribute.
8678 2018-05-22 Luis Machado <luis.machado@linaro.org>
8680 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8682 2018-05-22 Martin Sebor <msebor@redhat.com>
8685 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8686 only when expasion succeeds.
8687 (expand_builtin_strcmp): Same.
8688 (expand_builtin_strncmp): Same.
8690 2018-05-22 Martin Sebor <msebor@redhat.com>
8692 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8694 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8695 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8697 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8698 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8700 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8701 Add check for legitimate_address.
8702 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8703 (aarch64_swap_ldrstr_operands): New.
8704 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8707 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8708 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8710 * config/aarch64/aarch64.md: New patterns to generate stp
8712 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8713 single words and double words.
8714 (load_pair_sw, load_pair_dw): Likewise.
8715 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8717 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8719 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8720 for different mode ldpstp and add peephole for merged zero stores.
8722 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8724 (aarch64_gen_store_pair): Rename calls to match new patterns.
8725 (aarch64_gen_load_pair): Rename calls to match new patterns.
8726 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8727 (load_pair<DREG:mode><DREG2:mode>): ... This.
8728 (store_pair<mode>): Rename to...
8729 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8730 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8732 (V_INT_EQUIV): Handle SImode.
8733 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8736 2018-05-22 Martin Sebor <msebor@redhat.com>
8739 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8740 or ajust the presumed bound on an operation to avoid unnecessary
8743 2018-05-22 Martin Sebor <msebor@redhat.com>
8745 PR tree-optimization/85826
8746 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8747 assuming that a DECL necesarily has a constant size.
8749 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8752 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8754 2018-05-22 Richard Biener <rguenther@suse.de>
8756 PR tree-optimization/85834
8757 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8758 non-constant and non-zero memset arguments.
8760 2018-05-22 Martin Liska <mliska@suse.cz>
8763 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8765 2018-05-22 Richard Biener <rguenther@suse.de>
8767 PR tree-optimization/85863
8768 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8769 comparisons when vectype is specified.
8770 (vectorizable_condition): Do not specify vectype for
8771 vect_is_simple_cond when SLP vectorizing.
8773 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8776 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8777 define __ibm128 as long double.
8778 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8779 as a distinct type when IEEE 128-bit support is enabled.
8780 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8781 128-bit types to use the correct functions.
8782 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8783 convert between 128-bit floating point types that have different
8784 modes but the same representation, instead of using gen_lowpart to
8786 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8788 (IFKF_reg): New attributes to give the register constraints for
8790 (extend<mode>tf2_internal): New insns to mark an explicit
8791 conversion between 128-bit floating point types that have a
8792 different mode but share the same representation.
8794 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8796 PR tree-optimization/85814
8797 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8798 a null return from get_strinfo when unsharing the next
8799 strinfo in the chain.
8801 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8804 * varasm.c (weak_finish): Clean up weak_decls.
8806 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8808 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8809 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8810 UNSPEC_UADALP values.
8811 * config/aarch64/iterators.md (ABAL): New int iterator.
8814 (sur): Add mappings for the above.
8815 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8817 (aarch64_<sur>abal<mode>_4): Likewise.
8818 (aarch64_<sur>adalp<mode>_3): Likewise.
8819 (<sur>sadv16qi): New define_expand.
8821 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8823 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8824 (*movdf_internal): Ditto.
8825 (*rcpsf2_sse): Ditto.
8826 (*rsqrtsf2_sse): Ditto.
8827 (*sqrt<mode>2_sse): Ditto.
8829 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8831 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8833 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8834 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8835 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8836 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8838 * config/aarch64/arm_neon.h: Likewise.
8839 * config/aarch64/iterators.md (VQ_I): New.
8841 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8843 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8845 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8848 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8850 * config/nds32/constraints.md (S): New constraint.
8851 * config/nds32/nds32.md (call_internal): Use constraint S.
8852 (call_value_internal): Likewise.
8853 (sibcall_internal): Likewise.
8854 (sibcall_value_internal): Likewise.
8856 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8857 Chung-Ju Wu <jasonwucj@gmail.com>
8859 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8862 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8863 Chung-Ju Wu <jasonwucj@gmail.com>
8865 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8866 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8867 (nds32_rtx_costs_impl): Simplify.
8868 (nds32_address_cost_impl): Simplify.
8869 (nds32_init_rtx_costs): New function.
8870 (nds32_rtx_costs_speed_prefer): Likewise.
8871 (nds32_rtx_costs_size_prefer): Likewise.
8872 (nds32_address_cost_speed_prefer): Likewise.
8873 (nds32_address_cost_speed_fwprop): Likewise.
8874 (nds32_address_cost_size_prefer): Likewise.
8875 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8876 * config/nds32/nds32.c (nds32_option_override): Use
8877 nds32_init_rtx_costs function.
8879 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8881 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8882 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8883 (TARGET_PIPELINE_N8): Likewise.
8884 (TARGET_PIPELINE_N10): Likewise.
8885 (TARGET_PIPELINE_N13): Likewise.
8886 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8888 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8890 * config/nds32/nds32-fpu.md: Update copyright year.
8892 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8894 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8896 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8898 * config/nds32/nds32.c
8899 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8900 * config/nds32/nds32.opt (minline-asm-r15): New option.
8902 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8904 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8906 * config/nds32/nds32.md (abssi2): New pattern.
8908 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8910 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8911 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8912 Merge insn pattern from sse_cvtsi2ss<round_name> and
8913 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8914 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8915 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8916 using SWI48 mode iterator.
8917 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8918 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8919 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8920 pattern from sse_cvttss2si<round_saeonly_name>
8921 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8922 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8923 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8924 using SWI48 mode iterator.
8925 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8926 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8927 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8928 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8929 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8930 using SWI48 mode iterator.
8931 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8932 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8933 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8934 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8935 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8936 SWI48 mode iterator.
8937 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8938 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8939 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8940 pattern from sse_cvttsd2si<round_saeonly_name>
8941 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8943 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8945 * config/nds32/nds32-md-auxiliary.c
8946 (nds32_valid_smw_lwm_base_p): Refine.
8947 (nds32_output_smw_single_word): Refine.
8948 (nds32_output_smw_double_word): New.
8949 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8951 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8953 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8954 (nds32_output_stack_pop): Refine.
8955 (nds32_expand_unaligned_load): Refine.
8956 (nds32_expand_unaligned_store): Refine.
8958 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8959 Chung-Ju Wu <jasonwucj@gmail.com>
8961 * config/nds32/constants.md: Add TP_REGNUM constant.
8962 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8963 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8965 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8966 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8967 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8968 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8969 and PIC code generation.
8970 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8972 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8974 * config/nds32/nds32.md: Support TLS and PIC.
8975 * config/nds32/nds32.c: Support TLS and PIC.
8976 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8977 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8980 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8982 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8983 mode with E_ prefix.
8985 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8986 Chung-Ju Wu <jasonwucj@gmail.com>
8988 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8989 * config/nds32/nds32-md-auxiliary.c
8990 (symbolic_reference_mentioned_p): New.
8991 (nds32_legitimize_ict_address): New.
8992 (nds32_expand_ict_move): New.
8993 (nds32_indirect_call_referenced_p): New.
8994 (nds32_symbol_binds_local_p): Delete.
8995 (nds32_long_call_p): Modify.
8996 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8997 * config/nds32/nds32-protos.h
8998 (symbolic_reference_mentioned_p): Declare.
8999 (nds32_legitimize_ict_address): Declare.
9000 (nds32_expand_ict_move): Declare.
9001 (nds32_indirect_call_referenced_p): Declare.
9002 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9003 (nds32_relax_group): Use nds32_ict_const_p as condition.
9004 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9005 (nds32_asm_file_start): Output ict_model directive in asm code.
9006 (nds32_legitimate_address_p): Consider indirect call.
9007 (nds32_print_operand): Consider indirect call.
9008 (nds32_print_operand_address): Consider indirect call.
9009 (nds32_insert_attributes): Handle "indirect_call" attribute.
9010 (TARGET_LEGITIMATE_ADDRESS_P): Define.
9011 (TARGET_LEGITIMATE_CONSTANT_P): Define.
9012 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9013 (TARGET_DELEGITIMIZE_ADDRESS): Define.
9014 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9015 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9016 (TARGET_ICT_MODEL_SMALL): Define.
9017 (TARGET_ICT_MODEL_LARGE): Define.
9018 * config/nds32/nds32.md (movsi): Consider ict model.
9019 (call, call_value): Consider ict model.
9020 (sibcall, sibcall_value): Consider ict model.
9021 * config/nds32/nds32.opt (mict-model): New option.
9022 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9025 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
9026 Monk Chiang <sh.chiang04@gmail.com>
9027 Jim Wilson <jimw@sifive.com>
9029 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9030 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
9031 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9032 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9033 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
9034 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9035 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9036 compute save_libcall_adjustment properly.
9037 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9038 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9039 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9040 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9041 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9042 (ABI_SPEC): Handle mabi=ilp32e.
9043 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9044 (RVE): Add RVE mask.
9045 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9046 <-march>: Add rv32e as an example.
9048 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
9051 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9052 (intra_create_variable_infos): Handle C++ constructors.
9054 2018-05-18 Martin Liska <mliska@suse.cz>
9056 * passes.def: Remove a redundant pass.
9058 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
9061 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9063 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9065 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9067 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9069 (armv2, armv2a, armv3, armv3m): Delete architectures.
9070 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9071 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9072 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9074 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9075 (*mulsidi3adddi): Likewise.
9076 (mulsidi3): Likewise.
9077 (*mulsidi3_nov6): Likewise.
9078 (umulsidi3): Likewise.
9079 (umulsidi3_nov6): Likewise.
9080 (umaddsidi4): Likewise.
9081 (*umulsidi3adddi): Likewise.
9082 (smulsi3_highpart): Likewise.
9083 (*smulsi3_highpart_nov6): Likewise.
9084 (umulsi3_highpart): Likewise.
9085 (*umulsi3_highpart_nov6): Likewise.
9086 * config/arm/arm.h (arm_arch3m): Delete.
9087 * config/arm/arm.c (arm_arch3m): Delete.
9088 (arm_option_override_internal): Update armv3-related comment.
9089 (arm_configure_build_target): Delete use of isa_bit_mode32.
9090 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9091 (arm_rtx_costs_internal): Delete check of arm_arch3m.
9092 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9094 (mulusa3): Likewise.
9095 * config/arm/arm-protos.h (arm_arch3m): Delete.
9096 * config/arm/arm-tables.opt: Regenerate.
9097 * config/arm/arm-tune.md: Likewise.
9098 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9099 deleted architectures.
9101 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9103 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9104 (armv5t, armv5te): New features.
9105 (ARMv5, ARMv5e): Delete fgroups.
9106 (ARMv5t, ARMv5te): Adjust for above changes.
9108 (armv5, armv5e): Delete arches.
9109 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9111 (*call_reg_arm): Likewise.
9112 (*call_value_reg_armv5): Likewise.
9113 (*call_value_reg_arm): Likewise.
9114 (*call_symbol): Likewise.
9115 (*call_value_symbol): Likewise.
9116 (*sibcall_insn): Likewise.
9117 (*sibcall_value_insn): Likewise.
9119 (prefetch): Likewise.
9120 (define_split and define_peephole2 dependent on arm_arch5):
9122 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9124 (TARGET_ARM_QBIT): Likewise.
9125 (TARGET_DSP_MULTIPLY): Likewise.
9126 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9127 (arm_arch5, arm_arch5e): Delete.
9128 (arm_arch5t, arm_arch5te): Declare.
9129 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9130 (arm_arch5t): Declare.
9131 (arm_option_reconfigure_globals): Update for the above.
9132 (arm_options_perform_arch_sanity_checks): Update comment, replace
9133 use of arm_arch5 with arm_arch5t.
9134 (use_return_insn): Likewise.
9135 (arm_emit_call_insn): Likewise.
9136 (output_return_instruction): Likewise.
9137 (arm_final_prescan_insn): Likewise.
9138 (arm_coproc_builtin_available): Likewise.
9139 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9140 arm_arch5e with arm_arch5t and arm_arch5te.
9141 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9142 (arm_arch5t, arm_arch5te): Declare.
9143 * config/arm/arm-tables.opt: Regenerate.
9144 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9145 * config/arm/t-multilib: Likewise.
9146 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9147 instead of arm_arch5.
9148 (*call_reg_thumb1): Likewise.
9149 (*call_value_reg_thumb1_v5): Likewise.
9150 (*call_value_reg_thumb1): Likewise.
9151 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9153 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9155 2018-05-18 Martin Liska <mliska@suse.cz>
9157 PR gcov-profile/84846
9158 * doc/gcov.texi: Document -t option of gcov tool.
9160 2018-05-18 Martin Liska <mliska@suse.cz>
9162 PR gcov-profile/84846
9163 * gcov.c (print_usage): Add new -t option.
9164 (process_args): Handle the option.
9165 (generate_results): Use stdout as output when requested by
9168 2018-05-18 Martin Liska <mliska@suse.cz>
9170 PR gcov-profile/84846
9171 * coverage.c (coverage_init): Write PWD to .gcno file.
9172 * doc/gcov.texi: Document how working directory is printed.
9173 * gcov-dump.c (dump_gcov_file): Print PWD.
9174 * gcov.c (output_intermediate_file): Likewise.
9175 (read_graph_file): Read PWD string.
9176 (output_lines): Print PWD.
9178 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9181 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9182 for retval and return false if all args to phi are zero.
9184 2018-05-18 Richard Biener <rguenther@suse.de>
9186 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9188 (evrp_dom_walker::before_dom_children): Call it.
9190 2018-05-18 Richard Biener <rguenther@suse.de>
9192 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9193 results when processing array refs with variable index.
9195 2018-05-18 Toon Moene <toon@moene.org>
9197 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9198 directly after that of -floop-interchange. Indicate that both
9199 options are enabled by default when specifying -O3.
9201 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9203 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9204 iterator. Delete separate integer-mode vec_set<mode> expander.
9205 (aarch64_simd_vec_setv2di): Delete.
9206 (vec_setv2di): Delete.
9207 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9208 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9209 the "w, r" alternative.
9211 2018-05-18 Martin Liska <mliska@suse.cz>
9213 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9214 * tree-pass.h (make_pass_lower_switch_O0): New function.
9215 * tree-switch-conversion.c (node_has_low_bound): Remove.
9216 (node_has_high_bound): Likewise.
9217 (node_is_bounded): Likewise.
9218 (class pass_lower_switch): Make it a template type and create
9220 (pass_lower_switch::execute): Add template argument.
9221 (make_pass_lower_switch): New function.
9222 (make_pass_lower_switch_O0): New function.
9223 (do_jump_if_equal): Remove.
9224 (emit_case_nodes): Simplify to just handle all 3 cases and leave
9225 all the hard work to tree optimization passes.
9227 2018-05-18 Martin Liska <mliska@suse.cz>
9229 * dbgcnt.c (limit_low): Renamed from limit.
9230 (limit_high): New variable.
9231 (dbg_cnt_is_enabled): Check for upper limit.
9232 (dbg_cnt): Adjust dumping.
9233 (dbg_cnt_set_limit_by_index): Add new argument for high
9235 (dbg_cnt_set_limit_by_name): Likewise.
9236 (dbg_cnt_process_single_pair): Parse new format.
9237 (dbg_cnt_process_opt): Use strtok.
9238 (dbg_cnt_list_all_counters): Remove 'value' and add
9240 * doc/invoke.texi: Document changes.
9242 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
9244 * doc/sourcebuild.texi (scalar_all_fma): Document.
9245 * tree.def (FMA_EXPR): Delete.
9246 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9247 * internal-fn.c (ternary_direct): New macro.
9248 (expand_ternary_optab_fn): Likewise.
9249 (direct_ternary_optab_supported_p): Likewise.
9250 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9251 * builtins.c (fold_builtin_fma): Delete.
9252 (fold_builtin_3): Don't call it.
9253 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9254 * expr.c (expand_expr_real_2): Likewise.
9255 * fold-const.c (operand_equal_p): Likewise.
9256 (fold_ternary_loc): Likewise.
9257 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9258 * gimple.c (DEFTREECODE): Likewise.
9259 * gimplify.c (gimplify_expr): Likewise.
9260 * optabs-tree.c (optab_for_tree_code): Likewise.
9261 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9262 * tree-eh.c (operation_could_trap_p): Likewise.
9263 (stmt_could_throw_1_p): Likewise.
9264 * tree-inline.c (estimate_operator_cost): Likewise.
9265 * tree-pretty-print.c (dump_generic_node): Likewise.
9266 (op_code_prio): Likewise.
9267 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9268 * tree-ssa-operands.c (get_expr_operands): Likewise.
9269 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9270 * fold-const-call.h (fold_fma): Delete.
9271 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9272 CFN_FNMA and CFN_FNMS.
9274 * genmatch.c (combined_fn): New enum.
9275 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9276 (commutative_op): New function.
9277 (commutate): Use it. Handle more than 2 operands.
9278 (dt_operand::gen_gimple_expr): Use commutative_op.
9279 (parser::parse_expr): Allow :c to be used with non-binary
9280 operators if the commutative operand is known.
9281 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9282 CFN_FMS, CFN_FNMA and CFN_FNMS.
9283 (backprop::process_assign_use): Remove FMA_EXPR handling.
9284 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9285 (gen_hsa_fma): New function.
9286 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9287 IFN_FNMA and IFN_FNMS.
9288 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9289 * gimple-fold.h (follow_all_ssa_edges): Declare.
9290 * gimple-fold.c (follow_all_ssa_edges): New function.
9291 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9292 gimple_build interface and use follow_all_ssa_edges to fold the result.
9293 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9294 instead of checking for optabs directly.
9295 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9296 rather than FMA_EXPRs.
9297 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9298 call to IFN_FMA instead of an FMA_EXPR.
9300 2018-05-17 Jim Wilson <jimw@sifive.com>
9302 * expr.c (do_tablejump): When converting index to Pmode, if we have a
9303 sign extended promoted subreg, and the range does not have the sign bit
9304 set, then do a sign extend.
9306 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9307 test, check for sign extended subreg and/or constant operands, and
9308 do a sign extend in that case.
9310 2018-05-17 Steve Ellcey <sellcey@cavium.com>
9312 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9313 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9315 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9316 Change logics_shift_reg to logics_shift_imm.
9317 (thunderx2t99_fp_loadpair_basic): Delete.
9318 (thunderx2t99_fp_storepair_basic): Delete.
9319 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9320 (thunderx2t99_asimd_polynomial): Delete.
9321 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9322 and neon_fp_mul_d_scalar_q.
9323 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9324 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9325 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9326 (thunderx2t99_asimd_lut): Add missing tbl types.
9327 (thunderx2t99_asimd_ext): Delete.
9328 (thunderx2t99_asimd_load1_1_mult): Delete.
9329 (thunderx2t99_asimd_load1_2_mult): Delete.
9330 (thunderx2t99_asimd_load1_ldp): New.
9331 (thunderx2t99_asimd_load1): New.
9332 (thunderx2t99_asimd_load2): Add missing *load2* types.
9333 (thunderx2t99_asimd_load3): New.
9334 (thunderx2t99_asimd_load4): New.
9335 (thunderx2t99_asimd_store1_1_mult): Delete.
9336 (thunderx2t99_asimd_store1_2_mult): Delete.
9337 (thunderx2t99_asimd_store2_mult): Delete.
9338 (thunderx2t99_asimd_store2_onelane): Delete.
9339 (thunderx2t99_asimd_store_stp): New.
9340 (thunderx2t99_asimd_store1): New.
9341 (thunderx2t99_asimd_store2): New.
9342 (thunderx2t99_asimd_store3): New.
9343 (thunderx2t99_asimd_store4): New.
9345 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
9347 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9348 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
9350 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
9351 Segher Boessenkool <segher@kernel.crashing.org>
9354 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9357 2018-05-17 Richard Biener <rguenther@suse.de>
9359 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9360 for pruning loop and prune defs feeding only already visited PHIs.
9362 2018-05-17 Richard Biener <rguenther@suse.de>
9364 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9366 2018-05-17 Bin Cheng <bin.cheng@arm.com>
9367 Richard Biener <rguenther@suse.de>
9369 PR tree-optimization/85793
9370 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9371 for VMAT_ELEMENTWISE.
9373 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9375 * internal-fn.h (lookup_internal_fn): Declare
9376 * internal-fn.c (lookup_internal_fn): New function.
9377 * gimple.c (gimple_build_call_from_tree): Handle calls to
9379 * gimple-pretty-print.c (dump_gimple_call): Print "." before
9380 internal function names.
9381 * tree-pretty-print.c (dump_generic_node): Likewise.
9382 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9384 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9386 * gimple-fold.h (gimple_build): Make the function forms take
9387 combined_fn rather than built_in_function.
9388 (gimple_simplify): Likewise.
9389 * gimple-match-head.c (gimple_simplify): Likewise.
9390 * gimple-fold.c (gimple_build): Likewise.
9391 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9392 rather than gimple_build_call_internal.
9393 (get_initial_defs_for_reduction): Likewise.
9394 (vect_create_epilog_for_reduction): Likewise.
9395 (vectorizable_live_operation): Likewise.
9397 2018-05-17 Martin Liska <mliska@suse.cz>
9399 * gimple-ssa-sprintf.c (format_directive): Do not use
9400 space in between 'G_' and '('.
9402 2018-05-17 Jakub Jelinek <jakub@redhat.com>
9405 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9406 even if the mask is not all ones.
9409 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9411 (ix86_gimple_fold_builtin): Likewise.
9414 * config/i386/i386.c: Include tree-vector-builder.h.
9415 (ix86_vector_shift_count): New function.
9416 (ix86_fold_builtin): Fold shift builtins by scalar count.
9417 (ix86_gimple_fold_builtin): Likewise.
9419 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9420 _mm512_setzero): New intrinsics.
9422 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
9423 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9425 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9426 code generation for cases where splatting a value is not useful.
9427 * simplify-rtx.c (simplify_ternary_operation): Simplify
9428 vec_merge across a vec_duplicate and a paradoxical subreg forming
9429 a vector mode to a vec_concat.
9431 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
9433 * config.gcc: Support "goldmont-plus".
9434 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9436 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9437 PROCESSOR_GOLDMONT_PLUS.
9438 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9439 (processor_target_table): Add "goldmont-plus".
9440 (PTA_GOLDMONT_PLUS): Define.
9441 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9442 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9443 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9444 (fold_builtin_cpu): Add "goldmont-plus".
9445 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9446 (ix86_option_override_internal): Add "goldmont-plus".
9447 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9448 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9449 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9450 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9452 2018-05-17 Richard Biener <rguenther@suse.de>
9454 PR tree-optimization/85757
9455 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9456 remove defs that only feed that PHI from further processing.
9458 2018-05-16 Jim Wilson <jimw@sifive.com>
9460 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9462 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9464 2018-05-16 Mark Wielaard <mark@klomp.org>
9466 * dwarf2out.c (count_index_strings): New function.
9467 (output_indirect_strings): Call count_index_strings and generate
9468 header for dwarf_version >= 5.
9470 2018-05-16 Mark Wielaard <mark@klomp.org>
9472 * dwarf2out.c (dwarf_FORM): New function.
9473 (set_indirect_string): Use dwarf_FORM.
9474 (reset_indirect_string): Likewise.
9475 (size_of_die): Likewise.
9476 (value_format): Likewise.
9477 (output_die): Likewise.
9478 (add_skeleton_AT_string): Likewise.
9479 (output_macinfo_op): Likewise.
9480 (index_string): Likewise.
9481 (output_index_string_offset): Likewise.
9482 (output_index_string): Likewise.
9483 (count_index_strings): Likewise.
9485 2018-05-16 Carl Love <cel@us.ibm.com>
9487 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9488 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9490 2018-05-16 Martin Jambor <mjambor@suse.cz>
9492 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9493 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9495 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9497 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9498 (fnma<mode>4): Likewise.
9499 (fms<mode>4): Likewise.
9500 (fnms<mode>4): Likewise.
9501 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9502 (aarch64_fnma<mode>4): Likewise.
9503 (aarch64_fms<mode>4): Likewise.
9504 (aarch64_fnms<mode>4): Likewise.
9505 (aarch64_fnmadd<mode>4): Likewise.
9507 2018-05-16 Jason Merrill <jason@redhat.com>
9509 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9511 2018-05-16 Richard Biener <rguenther@suse.de>
9513 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9514 (dump_stmt_cost): Declare.
9515 (add_stmt_cost): Dump cost we add.
9516 (add_stmt_costs): New function.
9517 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9519 (vect_analyze_stmt): Adjust prototype.
9520 (vectorizable_condition): Likewise.
9521 (vectorizable_live_operation): Likewise.
9522 (vectorizable_reduction): Likewise.
9523 (vectorizable_induction): Likewise.
9524 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9525 cost vector to pass to vectorizable_ and record afterwards.
9526 (vect_model_reduction_cost): Take cost vector argument and adjust.
9527 (vect_model_induction_cost): Likewise.
9528 (vectorizable_reduction): Likewise.
9529 (vectorizable_induction): Likewise.
9530 (vectorizable_live_operation): Likewise.
9531 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9532 SLP_TREE_NUMBER_OF_VEC_STMTS.
9533 (vect_analyze_slp_cost_1): Remove.
9534 (vect_analyze_slp_cost): Likewise.
9535 (vect_slp_analyze_node_operations): Take visited args and
9536 a target cost vector. Avoid processing already visited stmt sets.
9537 (vect_slp_analyze_operations): Use a local cost vector to gather
9538 costs and register those of non-discarded instances.
9539 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9540 (vect_schedule_slp_instance): Remove copying of
9541 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9543 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9544 adding cost. Record cost entry location.
9545 (vect_prologue_cost_for_slp_op): Function to compute cost of
9546 a constant or invariant generated for SLP vect in the prologue,
9547 split out from vect_analyze_slp_cost_1.
9548 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9549 (vect_model_promotion_demotion_cost): Likewise.
9550 (vect_model_store_cost): Likewise, make static.
9551 (vect_model_load_cost): Likewise.
9552 (vectorizable_bswap): Add cost vector arg and adjust.
9553 (vectorizable_call): Likewise.
9554 (vectorizable_simd_clone_call): Likewise.
9555 (vectorizable_conversion): Likewise.
9556 (vectorizable_assignment): Likewise.
9557 (vectorizable_shift): Likewise.
9558 (vectorizable_operation): Likewise.
9559 (vectorizable_store): Likewise.
9560 (vectorizable_load): Likewise.
9561 (vectorizable_condition): Likewise.
9562 (vectorizable_comparison): Likewise.
9563 (can_vectorize_live_stmts): Likewise.
9564 (vect_analyze_stmt): Likewise.
9565 (vect_transform_stmt): Adjust calls to vectorizable_*.
9566 * tree-vectorizer.c: Include gimple-pretty-print.h.
9567 (dump_stmt_cost): New function.
9569 2018-05-16 Richard Biener <rguenther@suse.de>
9571 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9572 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9573 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9574 (check_name): New callback.
9575 (dse_classify_store): Track cycles via a visited bitmap of PHI
9576 defs and simplify handling of in-loop and across loop dead stores
9577 and properly fail for loop-variant refs. Handle byte-tracking with
9578 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9581 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9583 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9584 (vect_get_mask_type_for_stmt): Likewise.
9585 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9587 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9588 to determine the statement's vector type and the vector type that
9589 should be used for calculating nunits. Deal with cases in which
9590 the type has to be deferred.
9591 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9592 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9593 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9594 (vect_determine_vf_for_stmt): New functions, split out from...
9595 (vect_determine_vectorization_factor): ...here.
9596 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9597 (vect_get_mask_type_for_stmt): New functions, split out from
9598 vect_determine_vectorization_factor.
9600 2018-05-16 Richard Biener <rguenther@suse.de>
9602 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9603 verify the [VEC_]COND_EXPR embedded comparison.
9605 2018-05-15 Martin Sebor <msebor@redhat.com>
9607 PR tree-optimization/85753
9608 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9609 RECORD_TYPE in addition to ARRAY_TYPE.
9611 2018-05-15 Martin Sebor <msebor@redhat.com>
9614 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9616 2018-05-15 Richard Biener <rguenther@suse.de>
9618 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9619 add by_clobber_p one. Change algorithm to collect all defs
9620 representing uses we need to walk and try reducing them to
9621 a single one before failing.
9622 (dse_dom_walker::dse_optimize_stmt): Adjust.
9624 2018-05-13 Mark Wielaard <mark@klomp.org>
9626 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9627 (size_of_loc_descr): Likewise.
9628 (output_loc_operands): Likewise.
9629 (output_loc_operands_raw): Likewise.
9630 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9631 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9632 (hash_loc_operands): Likewise.
9633 (compare_loc_operands): Likewise.
9635 2018-05-14 Mark Wielaard <mark@klomp.org>
9637 * dwarf2out.c (count_index_addrs): New function.
9638 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9640 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9642 PR tree-optimization/83648
9643 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9644 return value as malloc candidate.
9646 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9649 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9650 param as true in call to suggest_attribute.
9652 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9654 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9655 -mreadonly-in-sdata.
9657 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9659 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9661 (aarch64_crypto_aesd_fused): Likewise.
9663 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9665 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9666 (movsi_aarch64): Likewise.
9667 (load_pairsi): Likewise.
9668 (load_pairdi): Likewise.
9669 (store_pairsi): Likewise.
9670 (store_pairdi): Likewise.
9671 (load_pairsf): Likewise.
9672 (load_pairdf): Likewise.
9673 (store_pairsf): Likewise.
9674 (store_pairdf): Likewise.
9675 (zero_extend): Likewise.
9676 (trunc): Swap alternatives.
9677 (fcvt_target): Add '?' to prefer w over r.
9679 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9682 * config/i386/i386.md: Disallow non-commutative arithmetics in
9683 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9684 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9685 in the peephole2 before it.
9687 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9689 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9690 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9691 (ix86_handle_option): Handle -mcldemote.
9692 * config.gcc: New header.
9693 * config/i386/cldemoteintrin.h: New file.
9694 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9695 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9697 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9698 OPTION_MASK_ISA_CLDEMOTE.
9699 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9700 (ix86_valid_target_attribute_inner_p): Ditto.
9701 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9702 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9703 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9704 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9705 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9707 * config/i386/i386.opt: Add -mcldemote.
9708 * config/i386/x86intrin.h: New header.
9709 * doc/invoke.texi: Add -mcldemote.
9711 2018-05-14 Richard Biener <rguenther@suse.de>
9713 * doc/match-and-simplify.texi: Adjust :s documentation.
9715 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9717 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9718 intended memcpy size.
9719 (REORDER_45): Likewise.
9721 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9723 * sort.cc: New file.
9724 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9725 * vec.c (qsort_chk): Use gcc_qsort.
9726 * Makefile.in (OBJS-libcommon): Add sort.o.
9727 (build/sort.o): New target. Use it...
9728 (BUILD_RTL): ... here, and...
9729 (build/gencfn-macros): ... here, and...
9730 (build/genmatch): ... here.
9732 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9733 Chung-Ju Wu <jasonwucj@gmail.com>
9735 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9736 * config/nds32/nds32-graywolf.md: New file.
9737 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9738 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9740 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9741 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9742 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9743 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9744 * config/nds32/pipelines.md: Include n15 settings.
9746 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9747 Chung-Ju Wu <jasonwucj@gmail.com>
9749 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9750 * config/nds32/nds32-n13.md: New file.
9751 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9752 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9754 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9755 * config/nds32/nds32.md (pipeline_model): Add n13.
9756 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9757 * config/nds32/pipelines.md: Include n13 settings.
9759 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9760 Chung-Ju Wu <jasonwucj@gmail.com>
9762 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9763 * config/nds32/nds32-n10.md: New file.
9764 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9765 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9767 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9768 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9769 * config/nds32/nds32.md (pipeline_model): Add n10.
9770 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9771 * config/nds32/pipelines.md: Include n10 settings.
9773 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9774 Kito Cheng <kito.cheng@gmail.com>
9775 Chung-Ju Wu <jasonwucj@gmail.com>
9777 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9778 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9779 Add enum values for DSP extension instructions.
9780 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9782 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9783 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9785 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9786 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9787 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9788 * config/nds32/nds32-intrinsic.md: Likewise.
9789 * config/nds32/nds32_intrinsic.h: Likewise.
9790 * config/nds32/nds32-md-auxiliary.c: Likewise.
9791 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9792 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9793 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9794 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9795 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9796 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9797 TYPE_DMAC in switch statement.
9798 * config/nds32/nds32.c: New checking and implementation for DSP
9799 extension instructions.
9800 * config/nds32/nds32.h: Likewise.
9801 * config/nds32/nds32.md: Likewise.
9802 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9803 * config/nds32/predicates.md: Implement new predicates for DSP
9806 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9808 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9809 Reformat alternatives and attributes so it is easier to identify
9810 which constraints/attributes go with which instruction.
9811 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9812 (mov<mode>_softfloat32, FMOVE64): Likewise.
9813 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9814 (mov<mode>_softfloat64, FMOVE64): Likewise.
9816 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9818 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9820 (Basic PowerPC Built-in Functions): The new name of the
9821 subsection previously known as "PowerPC Built-in Functions".
9822 (Basic PowerPC Built-in Functions Available on all Configurations):
9824 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9825 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9826 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9827 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9829 2018-05-11 Martin Jambor <mjambor@suse.cz>
9832 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9835 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9838 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9840 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9842 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9843 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9844 (ix86_handle_option): Handle -mwaitpkg.
9845 * config.gcc: New header.
9846 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9847 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9848 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9850 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9851 OPTION_MASK_ISA_WAITPKG.
9852 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9853 (ix86_option_override_internal): Add PTA_WAITPKG.
9854 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9855 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9856 IX86_BUILTIN_TPAUSE.
9857 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9858 __builtin_ia32_umwait and __builtin_ia32_tpause.
9859 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9860 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9861 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9862 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9863 UNSPECV_TPAUSE): New.
9864 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9865 * config/i386/i386.opt: Add -mwaitpkg.
9866 * config/i386/waitpkgintrin.h: New file.
9867 * config/i386/x86intrin.h: New header.
9868 * doc/invoke.texi: Add -mwaitpkg.
9870 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9873 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9875 (cortex-m0): Use armv6s-m isa.
9876 (cortex-m0plus): Likewise.
9877 (cortex-m1): Likewise.
9878 (cortex-m0.small-multiply): Likewise.
9879 (cortex-m0plus.small-multiply): Likewise.
9880 (cortex-m1.small-multiply): Likewise.
9882 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9883 Jakub Jelinek <jakub@redhat.com>
9885 PR tree-optimization/85692
9886 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9887 source permute as well.
9889 2018-05-11 Martin Liska <mliska@suse.cz>
9892 * doc/extend.texi: Document LLVM style format for no_sanitize
9895 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9897 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9898 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9899 (mode_supports_vsx_dform_quad): Likewise.
9900 (mode_supports_vmx_dform): Move these functions to be next to the
9901 other mode_supports functions.
9902 (mode_supports_dq_form): Likewise.
9903 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9904 mode_supports_dq_form.
9905 (reg_offset_addressing_ok_p): Likewise.
9906 (offsettable_ok_by_alignment): Likewise.
9907 (rs6000_legitimate_offset_address_p): Likewise.
9908 (legitimate_lo_sum_address_p): Likewise.
9909 (rs6000_legitimize_address): Likewise.
9910 (rs6000_legitimize_reload_address): Likewise.
9911 (rs6000_secondary_reload_inner): Likewise.
9912 (rs6000_preferred_reload_class): Likewise.
9913 (rs6000_output_move_128bit): Likewise.
9915 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9917 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9918 Generate SImode target register for null target.
9919 <case IX86_BUILTIN_XGETBV>: Ditto.
9920 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9921 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9923 2018-05-10 Carl Love <cel@us.ibm.com>
9925 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9926 dcbtt and dcbtstt if operands[2] is 0.
9928 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9931 * config/i386/sse.md (usadv64qi): New expander.
9933 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9935 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9936 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9937 -maltivec=be support.
9938 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9939 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9940 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9941 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9942 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9943 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9944 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9945 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9946 altivec_vsumsws): Adjust.
9947 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9948 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9949 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9951 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9952 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9953 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9954 (altivec_lve<VI_char>x): Delete expand.
9955 (*altivec_lve<VI_char>x_internal): Rename to...
9956 (altivec_lve<VI_char>x): ... this.
9957 (altivec_lvxl_<mode>): Delete expand.
9958 (*altivec_lvxl_<mode>_internal): Rename to ...
9959 (altivec_lvxl_<mode>): ... this.
9960 (altivec_stvxl_<mode>): Delete expand.
9961 (*altivec_stvxl_<mode>_internal): Rename to ...
9962 (altivec_stvxl_<mode>): ... this.
9963 (altivec_stve<VI_char>x): Delete expand.
9964 (*altivec_stve<VI_char>x_internal): Rename to ...
9965 (altivec_stve<VI_char>x): ... this.
9966 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9967 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9968 reduc_plus_scal_<mode>): Adjust.
9969 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9971 (rs6000_cpu_cpp_builtins): Adjust.
9972 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9973 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9974 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9975 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9976 -maltivec=be support.
9977 (rs6000_split_vec_extract_var): Adjust.
9978 (rs6000_split_v4si_init): Adjust.
9979 (swap_selector_for_mode): Delete.
9980 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9981 altivec_expand_stvex_be): Delete.
9982 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9983 -maltivec=be support.
9984 (rs6000_gimple_fold_builtin): Ditto.
9985 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9987 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9988 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9989 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9990 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9991 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9992 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9993 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9994 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9995 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9996 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9997 anonymous split): Adjust.
9998 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9999 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10001 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
10003 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10004 when --with-gxx-include-dir is also specified.
10005 * configure: Regenerate.
10007 2018-05-09 Jim Wilson <jimw@sifive.com>
10010 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10011 * config/riscv/t-withmultilib: New.
10012 * config/riscv/withmultilib.h: New.
10013 * doc/install.texi: Document RISC-V --with-multilib-list support.
10015 2018-05-09 Richard Biener <rguenther@suse.de>
10017 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10019 (vect_bb_vectorization_profitable_p): Adjust. Compute
10020 actual scalar cost using the cost vector and the add_stmt_cost
10023 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10025 PR rtl-optimization/85645
10026 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10027 in the REG_CFA_REGISTER note for LR, don't leave it empty.
10029 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10031 PR rtl-optimization/85645
10032 * shrink-wrap.c (spread_components): Return a boolean saying if
10033 anything was changed.
10034 (try_shrink_wrapping_separate): Iterate spread_components until
10035 nothing changes anymore.
10037 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10039 PR rtl-optimization/85645
10040 * regrename.c (build_def_use): Also kill the chains that include the
10041 destination of a REG_CFA_REGISTER note.
10043 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10045 PR rtl-optimization/85645
10046 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10047 insn that has a REG_CFA_REGISTER note.
10049 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
10051 * cfgexpand.c (expand_clobber): New function.
10052 (expand_gimple_stmt_1): Use it.
10053 * tree-vect-stmts.c (vect_clobber_variable): New function,
10055 (vectorizable_simd_clone_call): ...here.
10056 (vectorizable_store): Emit a clobber either side of an
10057 IFN_STORE_LANES sequence.
10058 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10060 2018-05-09 Tom de Vries <tom@codesourcery.com>
10063 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10064 (define_insn "trap_if_false"): Add exit after trap.
10066 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
10068 PR rtl-optimization/85638
10069 * bb-reorder.c: Include common/common-target.h.
10070 (create_forwarder_block): New function extracted from...
10071 (fix_up_crossing_landing_pad): ...here. Rename into...
10072 (dw2_fix_up_crossing_landing_pad): ...this.
10073 (sjlj_fix_up_crossing_landing_pad): New function.
10074 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10075 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10076 from both partitions and exit the loop after one iteration.
10078 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10081 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10083 (Basic PowerPC Built-in Functions): The new name of the
10084 subsection previously known as "PowerPC Built-in Functions".
10085 (Basic PowerPC Built-in Functions Available on all Configurations):
10087 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10089 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10091 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10093 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10096 2018-05-08 Jim Wilson <jimw@sifive.com>
10098 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10099 (LD_EMUL_SUFFIX): New.
10100 (LINK_SPEC): Use it.
10102 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10104 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10106 (Basic PowerPC Built-in Functions): The new name of the
10107 subsection previously known as "PowerPC Built-in Functions".
10108 (Basic PowerPC Built-in Functions Available on all Configurations):
10110 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10112 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10114 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10116 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10119 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10122 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10123 after cmpelim optimization.
10125 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
10127 * config.gcc: Support "goldmont".
10128 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10129 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10130 PROCESSOR_GOLDMONT.
10131 * config/i386/i386.c (m_GOLDMONT): Define.
10132 (processor_target_table): Add "goldmont".
10133 (PTA_GOLDMONT): Define.
10134 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10135 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10136 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10137 (fold_builtin_cpu): Add "goldmont".
10138 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10139 (ix86_option_override_internal): Add "goldmont".
10140 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10141 (processor_type): Add PROCESSOR_GOLDMONT.
10142 * config/i386/i386.md: Add CPU "glm".
10143 * config/i386/glm.md: New file.
10144 * config/i386/x86-tune.def: Add m_GOLDMONT.
10145 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10147 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10150 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10152 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10153 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
10154 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
10157 * config/i386/i386.c (ix86_fold_builtin): Handle
10158 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10161 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10162 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10164 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
10167 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10168 (check_arch): Likewise.
10169 (check_fpu): Return the result rather than printing it.
10170 (end arch): Fix operator precedence.
10171 (end cpu): Likewise.
10172 (END): Print the result from check_fpu.
10174 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10175 Alan Hayward <alan.hayward@arm.com>
10176 David Sherwood <david.sherwood@arm.com>
10178 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10179 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10180 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10181 (*fcmuo<mode>_and): New patterns.
10183 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10185 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10186 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10187 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10188 (cmp_op, sve_imm_con): New code attributes.
10189 (SVE_COND_INT_CMP, imm_con): Delete.
10190 (cmp_op): Remove above unspecs from int attribute.
10191 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10193 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
10194 comparison-specific unspecs.
10195 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10196 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10197 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10198 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10199 (*vec_fcm<cmp_op><mode>): Rename to...
10200 (*fcm<cmp_op><mode>): ...this and adjust likewise.
10201 (*vec_fcmuo<mode>): Rename to...
10202 (*fcmuo<mode>): ...this and adjust likewise.
10203 (*pred_fcm<cmp_op><mode>): New pattern.
10204 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10205 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10207 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10209 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10210 (aarch64_emit_sve_predicated_cond): New function.
10211 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10212 (aarch64_emit_unspec_cond_or): Replace with...
10213 (aarch64_emit_sve_or_conds): ...this new function. Use
10214 aarch64_emit_sve_ptrue_op for the individual comparisons and
10215 aarch64_emit_binop to OR them together.
10216 (aarch64_emit_inverted_unspec_cond): Replace with...
10217 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10218 aarch64_emit_sve_ptrue_op for the comparison and
10219 aarch64_emit_unop to invert the result.
10220 (aarch64_expand_sve_vec_cmp_float): Update after the above
10221 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
10223 2018-05-07 Nathan Sidwell <nathan@acm.org>
10225 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10226 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10227 (Backwards Compatibility): Likewise.
10229 2018-05-07 Luis Machado <luis.machado@linaro.org>
10233 2018-05-07 Luis Machado <luis.machado@linaro.org>
10235 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10236 <prefetch_dynamic_strides>: New const bool field.
10237 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10238 prefetch_dynamic_strides.
10239 (exynosm1_prefetch_tune): Likewise.
10240 (thunderxt88_prefetch_tune): Likewise.
10241 (thunderx_prefetch_tune): Likewise.
10242 (thunderx2t99_prefetch_tune): Likewise.
10243 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10245 (aarch64_override_options_internal): Update to set
10246 PARAM_PREFETCH_DYNAMIC_STRIDES.
10247 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10248 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10249 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10250 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10251 prefetch-dynamic-strides setting.
10253 2018-05-07 Luis Machado <luis.machado@linaro.org>
10255 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10256 <minimum_stride>: New const int field.
10257 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10258 minimum_stride field.
10259 (exynosm1_prefetch_tune): Likewise.
10260 (thunderxt88_prefetch_tune): Likewise.
10261 (thunderx_prefetch_tune): Likewise.
10262 (thunderx2t99_prefetch_tune): Likewise.
10263 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10264 (aarch64_override_options_internal): Update to set
10265 PARAM_PREFETCH_MINIMUM_STRIDE.
10266 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10267 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10268 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10269 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10270 stride is constant and is below the minimum stride threshold.
10272 2018-05-07 Luis Machado <luis.machado@linaro.org>
10274 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10277 2018-05-07 Luis Machado <luis.machado@linaro.org>
10279 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10280 <prefetch_dynamic_strides>: New const bool field.
10281 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10282 prefetch_dynamic_strides.
10283 (exynosm1_prefetch_tune): Likewise.
10284 (thunderxt88_prefetch_tune): Likewise.
10285 (thunderx_prefetch_tune): Likewise.
10286 (thunderx2t99_prefetch_tune): Likewise.
10287 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10289 (aarch64_override_options_internal): Update to set
10290 PARAM_PREFETCH_DYNAMIC_STRIDES.
10291 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10292 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10293 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10294 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10295 prefetch-dynamic-strides setting.
10297 2018-05-07 Luis Machado <luis.machado@linaro.org>
10299 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10300 <minimum_stride>: New const int field.
10301 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10302 minimum_stride field.
10303 (exynosm1_prefetch_tune): Likewise.
10304 (thunderxt88_prefetch_tune): Likewise.
10305 (thunderx_prefetch_tune): Likewise.
10306 (thunderx2t99_prefetch_tune): Likewise.
10307 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10308 (aarch64_override_options_internal): Update to set
10309 PARAM_PREFETCH_MINIMUM_STRIDE.
10310 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10311 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10312 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10313 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10314 stride is constant and is below the minimum stride threshold.
10316 2018-05-06 Jakub Jelinek <jakub@redhat.com>
10319 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10320 the type is addressable. Don't force op into register if it has
10323 2018-05-05 Roland McGrath <mcgrathr@google.com>
10326 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10327 any section for which we don't know a specific type it should have,
10328 regardless of name. Previously this was done only for the exact
10329 names ".init_array", ".fini_array", and ".preinit_array".
10330 (default_elf_asm_named_section): Add comment about
10331 relationship with default_section_type_flags and SECTION_NOTYPE.
10332 (get_section): Don't consider it a type conflict if one side has
10333 SECTION_NOTYPE and the other doesn't, as long as neither has the
10334 SECTION_BSS et al used in the default_section_type_flags logic.
10336 2018-05-05 Tom de Vries <tom@codesourcery.com>
10339 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10340 (workaround_barsyncs): New function.
10341 (nvptx_reorg): Use workaround_barsyncs.
10342 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10343 (define_expand "nvptx_membar_cta"): New define_expand.
10344 (define_insn "*nvptx_membar_cta"): New insn.
10346 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
10348 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10349 To improve optimization opportunities.
10350 * builtin-types.def: The new needed builtin types for the above.
10352 2018-05-04 Richard Biener <rguenther@suse.de>
10354 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10355 * gimple-ssa-store-merging.c
10356 (imm_store_chain_info::output_merged_store): Remove redundant create,
10357 release split_store vector contents on failure.
10358 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10359 scalar stmt vector on cache hit.
10361 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
10363 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10365 * config.gcc (powerpc-xilinx-eabi*): Remove.
10366 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10368 (fusion_addis_mem_combo_load): Ditto.
10369 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10371 (rs6000_cpu_cpp_builtins): Ditto.
10372 * config/rs6000/rs6000-linux.c
10373 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10374 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10375 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10377 (rs6000_setup_reg_addr_masks): Ditto.
10378 (rs6000_init_hard_regno_mode_ok): Ditto.
10379 (rs6000_option_override_internal): Ditto.
10380 (legitimate_lo_sum_address_p): Ditto.
10381 (rs6000_legitimize_address): Ditto.
10382 (rs6000_legitimize_reload_address): Ditto.
10383 (rs6000_legitimate_address_p): Ditto.
10384 (abi_v4_pass_in_fpr): Ditto.
10385 (setup_incoming_varargs): Ditto.
10386 (rs6000_gimplify_va_arg): Ditto.
10387 (rs6000_split_multireg_move): Ditto.
10388 (rs6000_savres_strategy): Ditto.
10389 (rs6000_emit_prologue_components): Ditto.
10390 (rs6000_emit_epilogue_components): Ditto.
10391 (rs6000_emit_prologue): Ditto.
10392 (rs6000_emit_epilogue): Ditto.
10393 (rs6000_elf_file_end): Ditto.
10394 (rs6000_function_value): Ditto.
10395 (rs6000_libcall_value): Ditto.
10396 * config/rs6000/rs6000.h: Ditto.
10397 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10398 (TARGET_MINMAX): ... this. New.
10399 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10400 * config/rs6000/rs6000.md: Remove Xilinx FP support.
10401 (*movsi_internal1_single): Delete.
10402 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10403 mfpu=, mxilinx-fpu): Delete.
10404 * config/rs6000/singlefp.h: Delete.
10405 * config/rs6000/sysv4.h: Remove Xilinx FP support.
10406 * config/rs6000/t-rs6000: Ditto.
10407 * config/rs6000/t-xilinx: Delete.
10408 * config/rs6000/titan.md: Adjust for fp_type removal.
10409 * config/rs6000/vsx.md: Remove Xilinx FP support.
10410 (VStype_simple): Delete.
10411 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10412 * config/rs6000/xfpu.h: Delete.
10413 * config/rs6000/xfpu.md: Delete.
10414 * config/rs6000/xilinx.h: Delete.
10415 * config/rs6000/xilinx.opt: Delete.
10416 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10417 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10419 2018-05-04 Tom de Vries <tom@codesourcery.com>
10422 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10425 2018-05-04 Richard Biener <rguenther@suse.de>
10427 PR middle-end/85627
10428 * tree-complex.c (update_complex_assignment): We are always in SSA form.
10429 (expand_complex_div_wide): Likewise.
10430 (expand_complex_operations_1): Likewise.
10431 (expand_complex_libcall): Preserve EH info of the original stmt.
10432 (tree_lower_complex): Handle removed blocks.
10433 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10434 on complex multiplication and division libcall builtins.
10436 2018-05-04 Richard Biener <rguenther@suse.de>
10438 PR middle-end/85574
10439 * fold-const.c (negate_expr_p): Restrict negation of operand
10440 zero of a division to when we know that can happen without
10442 (fold_negate_expr_1): Likewise.
10444 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10447 * real.h (real_nextafter): Declare.
10448 * real.c (real_nextafter): New function.
10449 * fold-const-call.c (fold_const_nextafter): New function.
10450 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10451 CASE_CFN_NEXTTOWARD.
10452 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10453 even when arg1_mode is different from arg0_mode.
10455 2018-05-03 Nathan Sidwell <nathan@acm.org>
10457 * doc/extend.texi (Deprecated Features): Remove
10458 -ffriend-injection.
10459 (Backwards Compatibility): Likewise.
10460 * doc/invoke.texi (C++ Language Options): Likewise.
10461 (C++ Dialect Options): Likewise.
10463 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10466 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10467 _mm512_mask_mullox_epi64): New intrinsics.
10469 2018-05-03 Tom de Vries <tom@codesourcery.com>
10472 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10473 dump files): Add offload-tree.
10475 2018-05-03 Richard Biener <rguenther@suse.de>
10477 PR tree-optimization/85615
10478 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10479 to loops not nested in BBs loop father to avoid creating multi-entry
10482 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10484 PR tree-optimization/70291
10485 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10486 arguments. Change return type to tree. Emit libcall as a new
10487 statement rather than replacing existing one when inplace_p is true.
10488 (expand_complex_multiplication_components): New function.
10489 (expand_complex_multiplication): Expand floating-point complex
10490 multiplication using the above.
10491 (expand_complex_division): Rename inner_type parameter to type.
10492 Update expand_complex_libcall call-site.
10493 (expand_complex_operations_1): Update expand_complex_multiplication
10494 and expand_complex_division call-sites.
10496 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10499 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10500 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10501 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10502 the highest significant bit of the shift count mask is clear. In
10503 check whether and[sq]i3 is needed verify that all significant bits
10504 of the shift count other than the highest are set.
10506 2018-05-02 Tom de Vries <tom@codesourcery.com>
10509 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10510 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10511 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10512 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10513 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10514 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10515 __builtin_goacc_parlevel_size.
10517 2018-05-02 Richard Biener <rguenther@suse.de>
10519 PR tree-optimization/85597
10520 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10521 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10524 2018-05-02 Tom de Vries <tom@codesourcery.com>
10527 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10528 dump files): Add ltrans-tree.
10530 2018-05-02 Tom de Vries <tom@codesourcery.com>
10533 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10534 dump files): Add wpa-ipa.
10536 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10538 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10539 powerpc*-*-linux*paired* target.
10540 * config/rs6000/750cl.h: Delete.
10541 * config/rs6000/paired.h: Delete.
10542 * config/rs6000/paired.md: Delete.
10543 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10545 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10546 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10547 comment. Remove paired float support.
10548 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10549 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10551 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10552 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10554 * config/rs6000/rs6000.c: Remove paired float support.
10555 (paired_expand_vector_init, paired_expand_vector_move,
10556 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10557 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10558 paired_expand_builtin, paired_expand_predicate_builtin,
10559 paired_init_builtins): Delete.
10560 * config/rs6000/rs6000.h: Remove paired float support.
10561 * config/rs6000/rs6000.md: Remove paired float support.
10562 (move_from_CR_ov_bit): Delete.
10563 * config/rs6000/rs6000.opt (mpaired): Delete.
10564 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10565 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10567 2018-05-02 Richard Biener <rguenther@suse.de>
10569 PR middle-end/85567
10570 * gimplify.c (gimplify_save_expr): When in SSA form allow
10571 SAVE_EXPRs to compute to SSA vars.
10573 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10576 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10577 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10578 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10579 clobber operands[2], instead use a new pseudo. Formatting fixes.
10581 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10583 PR tree-optimization/85586
10584 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10585 exit early for statements in the same group if the accesses are
10588 2018-05-02 Tom de Vries <tom@codesourcery.com>
10591 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10594 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10596 PR tree-optimization/85143
10597 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10599 2018-05-01 Tom de Vries <tom@codesourcery.com>
10602 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10603 not found" error message.
10605 2018-05-01 Tom de Vries <tom@codesourcery.com>
10608 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10609 * vec.c (test_ordered_remove_if): New function.
10610 (vec_c_tests): Call test_ordered_remove_if.
10611 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10612 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10613 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10614 VEC_ORDERED_REMOVE_IF.
10616 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10618 PR tree-optimization/82665
10619 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10620 pointer subtraction where arguments come from a memchr call.
10622 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10624 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10625 --push-state --as-needed and --pop-state instead of --as-needed and
10626 --no-as-needed if ld supports it.
10627 * configure: Regenerated.
10630 * doc/install.texi2html: Replace _002d with - and _002a with * in
10631 generated html files using sed.
10633 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10636 * gcc-rich-location.c (blank_line_before_p): New function.
10637 (use_new_line): New function.
10638 (gcc_rich_location::add_fixit_insert_formatted): New function.
10639 * gcc-rich-location.h
10640 (gcc_rich_location::add_fixit_insert_formatted): New function.
10642 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10644 * selftest.c (assert_streq): Rename "expected" and "actual" to
10645 "val1" and "val2". Extend NULL-handling to cover both inputs
10646 symmetrically, while still requiring both to be non-NULL for a pass.
10647 * selftest.h (assert_streq): Rename "expected" and "actual" to
10649 (ASSERT_EQ): Likewise.
10650 (ASSERT_EQ_AT): Likewise.
10651 (ASSERT_KNOWN_EQ): Likewise.
10652 (ASSERT_KNOWN_EQ_AT): Likewise.
10653 (ASSERT_NE): Likewise.
10654 (ASSERT_MAYBE_NE): Likewise.
10655 (ASSERT_MAYBE_NE_AT): Likewise.
10656 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10657 the assertion to pass.
10658 (ASSERT_STREQ_AT): Likewise.
10660 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10662 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10663 interaction with -pie.
10665 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10667 * selftest.h: Fix alphabetization of per-source-file selftest
10670 2018-04-30 Jason Merrill <jason@redhat.com>
10672 PR c++/61982 - dead stores to destroyed objects.
10673 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10676 2018-04-30 Jason Merrill <jason@redhat.com>
10678 * tree.c (build_clobber): New.
10679 * tree.h: Declare it.
10680 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10682 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10684 * diagnostic-show-locus.c (layout::layout): Update for
10685 location_get_source_line returning a char_span.
10686 (struct char_span): Move to input.h.
10687 (struct correction): Update for fields in char_span becoming
10689 (struct source_line): Update for location_get_source_line
10690 returning a char_span.
10691 (layout::print_line): Likewise.
10692 * edit-context.c (edited_file::print_content): Likewise.
10693 (edited_file::print_diff_hunk): Likewise.
10694 (edited_file::print_run_of_changed_lines): Likewise.
10695 (edited_file::get_num_lines): Likewise.
10696 (edited_line::edited_line): Likewise.
10697 * final.c (asm_show_source): Likewise.
10698 * input.c (location_get_source_line): Convert return type
10699 from const char * to char_span, losing the final "line_len"
10701 (dump_location_info): Update for the above.
10702 (get_substring_ranges_for_loc): Likewise. Use a char_span
10703 when handling the literal within the line.
10704 (test_reading_source_line): Update for location_get_source_line
10705 returning a char_span.
10706 * input.h (class char_span): Move here from
10707 diagnostic-show-locus.c, converting from a struct to a class.
10708 Make data members private.
10709 (char_span::operator bool): New.
10710 (char_span::length): New.
10711 (char_span::get_buffer): New.
10712 (char_span::operator[]): New.
10713 (char_span::subspan): Make const.
10714 (char_span::xstrdup): New.
10715 (location_get_source_line): Convert return type from const char *
10716 to char_span, losing the final "line_size" param.
10718 2018-04-30 Jan Hubicka <jh@suse.cz>
10720 * lto-wrapper.c (ltrans_priorities): New static var.
10721 (cmp_priority): New.
10722 (run_gcc): Read priorities and if doing parallel build order
10723 the Makefile by them.
10725 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10727 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10729 2018-04-30 Richard Biener <rguenther@suse.de>
10731 * tree-cfg.c (verify_address): Remove base argument, add
10732 flag whether to check TREE_ADDRESSABLE and do that.
10733 (verify_expr): Remove.
10734 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10735 (verify_gimple_assign_single): Likewise.
10736 (verify_gimple_switch): Likewise.
10737 (verify_expr_location_1): Dereference tp once. Add (disabled)
10738 piece from verify_expr.
10739 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10741 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10743 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10745 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10747 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10748 (small_data_pattern): Likewise.
10749 (arc_rewrite_small_data): Likewise.
10750 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10751 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10752 (get_symbol_alignment): New function.
10753 (legitimate_small_data_address_p): Likewise.
10754 (legitimate_scaled_address): Update, call
10755 legitimate_small_data_address_p.
10756 (output_sdata): New static variable.
10757 (arc_print_operand): Update how we handle small data operands.
10758 (arc_print_operand_address): Likewise.
10759 (arc_legitimate_address_p): Update, use
10760 legitimate_small_data_address_p.
10761 (arc_rewrite_small_data_p): Remove.
10762 (arc_rewrite_small_data_1): Likewise.
10763 (arc_rewrite_small_data): Likewise.
10764 (small_data_pattern): Likewise.
10765 (compact_sda_memory_operand): Update to use
10766 legitimate_small_data_address_p and get_symbol_alignment.
10767 (prepare_move_operands): Don't rewite sdata pattern.
10768 (prepare_extend_operands): Remove.
10769 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10771 (zero_extendqisi2): Likewise.
10772 (zero_extendhisi2): Likewise.
10773 (extendqihi2): Likewise.
10774 (extendqisi2): Likewise.
10775 (extendhisi2): Likewise.
10776 (addsi3): Likewise.
10777 (subsi3): Likewise.
10778 (andsi3): Likewise.
10779 * config/arc/constraints.md (Usd): Change it to memory constraint.
10781 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10783 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10784 as source of std instructions.
10785 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10786 allow 6-bit constants as source for store instructions.
10787 (movdi_insn): Update instruction pattern to allow 6-bit constants
10788 as source for store instructions.
10790 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10792 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10794 2018-04-30 Nathan Sidwell <nathan@acm.org>
10795 Sandra Loosemore <sandra@codesourcery.com>
10797 * dumpfile.c (dump_open): Allow '-' for stdout.
10798 * doc/invoke.texi (Developer Options): Document dump filename
10799 determination early. Document stdin/stdout selection.
10801 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10803 Microblaze Target: PIC data text relative
10805 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10806 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10808 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10809 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10810 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10811 New addressing mode for data-text relative position indepenedent code.
10812 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10813 'ADDRESS_SYMBOLIC_TXT_REL'.
10814 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10815 (microblaze_legitimate_pic_operand): Exclude function calls from
10816 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10817 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10819 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10820 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10821 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10822 for 'address + offset'.
10823 (microblaze_expand_prologue): Add new function prologue call for
10825 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10826 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10827 table in case of TARGET_PIC_DATA_TEXT_REL.
10828 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10829 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10830 Add new macros 'UNSPEC_TEXT',
10831 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10832 + exclude function calls from 'UNSPEC_PLT' in case of data text
10834 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10835 new target hook for generating address diff vector tables in case of
10837 * doc/tm.texi : Regenerate.
10838 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10839 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10840 of addr diff vector generation.
10841 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10842 target hook definition.
10843 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10844 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10845 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10846 option for data text relative.
10848 2018-04-30 Richard Biener <rguenther@suse.de>
10850 * tree-chrec.h (evolution_function_is_constant_p): Remove
10852 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10854 2018-04-30 Richard Biener <rguenther@suse.de>
10857 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10859 2018-04-30 Richard Biener <rguenther@suse.de>
10861 PR tree-optimization/28364
10862 PR tree-optimization/85275
10863 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10864 copying first exit test.
10866 2018-04-28 Mark Wielaard <mark@klomp.org>
10868 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10869 dwarf_version >= 5.
10870 (dwarf_AT): Handle DW_AT_addr_base.
10871 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10873 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10876 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10877 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10878 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10879 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10881 2018-04-28 Richard Biener <rguenther@suse.de>
10883 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10884 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10885 to reflect use. Only add interesting stmts.
10887 2018-04-27 Martin Jambor <mjambor@suse.cz>
10890 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10891 the jump function allows for passing through aggregate values.
10893 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10895 * input.h (in_system_header_at): Convert from macro to inline
10897 (from_macro_expansion_at): Likewise.
10898 (from_macro_definition_at): Likewise.
10900 2018-04-27 Jeff Law <law@redhat.com>
10902 * config.gcc: Mark tile* targets as deprecated/obsolete.
10904 2018-04-27 Richard Biener <rguenther@suse.de>
10906 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10909 2018-04-27 Richard Biener <rguenther@suse.de>
10911 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10913 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10915 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10916 with Yd constraint. Set "preferred_for_speed" attribute from
10917 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10918 with Yd constraint.
10919 (*movdi_internal): Ditto.
10920 (movti_interunit splitters): Remove
10921 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10922 (movdi_interunit splitters): Ditto.
10923 * config/i386/constraints.md (Ye): Remove.
10924 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10926 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10929 * config/aarch64/constraints.md (Usg): Limit to 31.
10930 (Usj): Limit to 63.
10932 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10934 PR tree-optimization/85529
10935 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10936 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10937 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10938 zero extension or masking of the MSB bit.
10939 (optimize_range_tests): Add FIRST_BB argument, pass it through
10940 to optimize_range_tests_var_bound.
10941 (maybe_optimize_range_tests, reassociate_bb): Adjust
10942 optimize_range_tests callers.
10944 2018-04-26 Richard Biener <rguenther@suse.de>
10945 Jakub Jelinek <jakub@redhat.com>
10947 * cgraph.h (symbol_table): Just declare debug method here.
10948 * symtab.c (symbol_table::debug): Define.
10950 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10952 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10954 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10956 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10957 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10958 (*movdi_internal): Substitute Yi and Yj constraint with x
10959 and Ym and Yn constraint with y constraint. Update "isa"
10960 attribute and set "preferred_for_speed" attribute from
10961 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10962 (*movsi_internal): Ditto.
10963 (*movdf_internal): Ditto.
10964 (*movsf_internal): Ditto.
10965 (*zero_extendsidi2): Ditto.
10966 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10967 (sse2_loadld): Ditto.
10968 (*vec_extract<ssevecmodelower>_0): Ditto.
10969 (*vec_extractv4si_0_zext_sse4): Ditto.
10970 (vec_concatv2di): Ditto.
10971 (*vec_dup<mode>): Ditto.
10972 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10973 * config/i386/constraints.md (Yi): Remove.
10978 2018-04-26 Nathan Sidwell <nathan@acm.org>
10980 * dumpfile.c (dump_open): New.
10981 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10982 (dump_finish): Detect stdio/stderr by value not name.
10984 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10986 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10988 2018-04-26 Tom de Vries <tom@codesourcery.com>
10991 * config/nvptx/nvptx.c (verify_neutering_jumps)
10992 (verify_neutering_labels): New function
10993 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10995 2018-04-26 Tom de Vries <tom@codesourcery.com>
10998 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10999 (nvptx_single): Use needs_neutering_p to skip over insns that do not
11002 2018-04-26 Richard Biener <rguenther@suse.de>
11003 Tom de Vries <tom@codesourcery.com>
11006 * lto-streamer-out.c (output_function): Fixup loops if required to match
11007 discovery done in the reader.
11009 2018-04-26 Richard Biener <rguenther@suse.de>
11011 PR tree-optimization/85116
11012 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11013 have a loop exit from the single latch predecessor. Remove
11014 case of header with just condition.
11015 (ch_base::copy_headers): Exclude infinite loops from any
11017 (pass_ch::execute): Record exits.
11019 2018-04-26 Richard Biener <rguenther@suse.de>
11021 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11022 prologue cost vector and pass it to vect_get_load_cost.
11023 (vect_get_peeling_costs_all_drs): Likewise.
11024 (vect_peeling_hash_get_lowest_cost): Likewise.
11025 (vect_enhance_data_refs_alignment): Likewise.
11027 2018-04-26 Richard Biener <rguenther@suse.de>
11029 PR middle-end/85450
11030 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11031 checking of integer<->pointer conversions.
11032 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11033 sign-/zero-extending pointer types.
11034 (expand_omp_for_static_chunk): Likewise.
11036 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
11037 Jean Lee <xiaoyur347@gmail.com>
11039 * config/mips/mips.c (mips_asan_shadow_offset): New function.
11040 (TARGET_ASAN_SHADOW_OFFSET): Define.
11041 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11042 true for -fsanitize=address.
11044 2018-04-25 Mark Wielaard <mark@klomp.org>
11046 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11049 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11051 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11052 than "alu", remove explicit "memory" and "imm_disp" attributes.
11053 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11055 PR middle-end/85414
11056 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11057 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11058 gen_lowpart_no_emit.
11060 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
11063 * config/i386/i386.c (ix86_expand_builtin): Change memory
11064 operand to XI, extend p0 to Pmode.
11065 * config/i386/i386.md: Change unspec volatile and operand
11066 1 mode to XI, change operand 0 mode to P.
11068 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11070 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11071 GET_MODE_MASK before any checking.
11072 (nds32_can_use_bset_p): Likewise.
11073 (nds32_can_use_btgl_p): Likewise.
11075 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11077 * config/nds32/nds32-doubleword.md: New define_split pattern for
11078 illegal register number.
11080 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11082 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11084 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11086 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11088 2018-04-25 Richard Biener <rguenther@suse.de>
11090 * lto-streamer.h (LTO_major_version): Bump to 8.
11092 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11094 * BASE-VER: Set to 9.0.0.
11096 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
11098 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11099 in __abskf2 and __powikf2.
11101 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11104 * config/aarch64/constraints.md (Usg, Usj): New constraints.
11105 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11106 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11107 Use the above on operand 2. Reindent.
11108 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11110 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11113 * common/config/i386/i386-common.c (ix86_handle_option): Don't
11115 * config/i386/i386.opt (mcet): Removed.
11116 * doc/install.texi: Remove -mcet documentation.
11117 * doc/invoke.texi: Likewise.
11119 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11122 * doc/install.texi: Remove -mcet from bootstrap-cet.
11124 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11127 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11128 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11132 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11133 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11134 containing a CONST_VECTOR.
11136 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
11138 * doc/install.texi: Update newlib dependency for nvptx.
11140 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11143 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11144 instead of INTVAL when shifting x left.
11146 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
11148 PR tree-optimization/85478
11149 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11150 vect_grouped_store_supported for single element vectors.
11152 2018-04-24 Richard Biener <rguenther@suse.de>
11155 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11156 load cost increase to the case of non-constant step.
11158 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11161 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11162 destination if any_malformed_asm.
11164 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
11166 PR middle-end/85496
11167 * expr.c (store_field): In the bitfield case, if the value comes from
11168 a function call and is returned in registers by means of a PARALLEL,
11169 do not change the mode of the temporary unless BLKmode and VOIDmode.
11171 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
11173 PR rtl-optimization/85423
11174 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11175 dependencies to debug insns when the previous insn is non-debug.
11177 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11179 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11180 enums into a single definition.
11181 (fls): Fix predicates and printing.
11184 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11186 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11187 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11188 and short u6 immediate.
11189 (check_if_valid_sleep_operand): Remove.
11190 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11192 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11194 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11195 flag_always_save_lp condition.
11196 * config/nds32/nds32.opt (malways-save-lp): New option.
11198 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11200 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11201 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11202 * config/nds32/nds32.h
11203 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11204 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11206 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11208 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11209 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11211 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11212 Chung-Ju Wu <jasonwucj@gmail.com>
11214 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11216 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11217 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11219 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11221 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11223 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11225 * config/nds32/nds32-protos.h (nds32_data_alignment,
11226 nds32_local_alignment): Declare.
11227 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11228 nds32_local_alignment): New functions.
11229 (TARGET_CONSTANT_ALIGNMENT): Define.
11230 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11232 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11234 * config/nds32/nds32.c
11235 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11236 (TARGET_MODES_TIEABLE_P): Likewise.
11238 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11240 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11241 level Ofast and Og.
11243 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
11244 Chung-Ju Wu <jasonwucj@gmail.com>
11246 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11247 for unaligned access.
11248 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11250 * config/nds32/nds32-intrinsic.md: Likewise.
11251 * config/nds32/nds32_intrinsic.h: Likewise.
11252 * config/nds32/nds32.h (nds32_builtins): Likewise.
11253 * config/nds32/nds32.opt (munaligned-access): New option.
11254 * config/nds32/nds32.c (nds32_asm_file_start): Display
11255 flag_unaligned_access status.
11257 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11259 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11260 -mno-relax is present.
11261 * config/riscv/linux.h (LINK_SPEC): Ditto.
11263 2018-04-20 Martin Sebor <msebor@redhat.com>
11266 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11268 (gimple_fold_builtin_stxcpy_chk): Same.
11269 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11271 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
11274 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11275 __powikf2 when long double is IEEE 128-bit.
11277 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11279 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11280 step to make sure stack always aligned.
11282 2018-04-20 Carl Love <cel@us.ibm.com>
11285 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11286 size check for arg0.
11288 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
11289 Tom de Vries <tom@codesourcery.com>
11292 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11293 Emit insns for calls too.
11294 (nvptx_find_par): Always look for worker-level predecessor insn.
11295 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
11297 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11298 (nvptx_process_pars): Propagate frames for calls.
11300 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
11303 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11305 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11306 (ix86_handle_option): Don't handle OPT_mibt.
11307 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11309 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11311 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11312 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11313 (ix86_target_macros): Define __CET__ with flag_cf_protection
11314 for -fcf-protection.
11315 * config/i386/i386.c (isa2_opts): Remove -mibt.
11316 * config/i386/i386.h (TARGET_IBT): Removed.
11317 (TARGET_IBT_P): Likewise.
11318 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11319 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11320 * config/i386/i386.opt (mcet): Update help message.
11321 (mshstk): Likewise.
11323 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
11324 -mcet as an alias for -mshstk.
11326 2018-04-20 Richard Biener <rguenther@suse.de>
11328 PR middle-end/85475
11329 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11330 complexity by forcing a single use of the multiply operand.
11332 2018-04-20 Martin Jambor <mjambor@suse.cz>
11335 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11336 recursion dependency to only apply to non-clones.
11338 2018-04-20 Martin Jambor <mjambor@suse.cz>
11341 * ipa-cp.c (create_specialized_node): Check that clones of
11342 self-recursive edges exist during IPA-CP.
11344 2018-04-19 Toon Moene <toon@moene.org>
11346 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11349 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11351 PR tree-optimization/85467
11352 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11353 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
11354 VECTOR_CST element to type.
11356 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11359 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11360 * config/i386/i386.md (builtin_setjmp_setup): Removed.
11361 (builtin_longjmp): Likewise.
11362 (save_stack_nonlocal): New pattern.
11363 (restore_stack_nonlocal): Likewise.
11365 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11368 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11369 Replace ASM_OUTPUT_LABEL with fprintf.
11371 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11374 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11375 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11376 * config/i386/i386-c.c (ix86_target_macros_internal): Also
11377 define __IBT__ and __SHSTK__ for -fcf-protection.
11378 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11380 (ix86_trampoline_init): Likewise.
11381 (x86_output_mi_thunk): Likewise.
11382 (ix86_notrack_prefixed_insn_p): Likewise.
11383 (ix86_option_override_internal): Don't disallow -fcf-protection.
11384 * config/i386/i386.md (rdssp<mode>): Also enable for
11386 (incssp<mode>): Likewise.
11387 (nop_endbr): Likewise.
11388 * config/i386/i386.opt (mcet): Change help message to built-in
11391 (mshstk): Likewise.
11392 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11393 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
11394 enable CET built-in functions.
11396 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
11398 * common/config/i386/i386-common.c
11399 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11400 OPTION_MASK_ISA_MOVDIRI_UNSET,
11401 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11402 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11403 * config.gcc (movdirintrin.h): New header.
11404 * config/i386/cpuid.h (bit_MOVDIRI,
11405 bit_MOVDIR64B): New bits.
11406 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11408 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11409 (VOID, PVOID, PCVOID)): New function types.
11410 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11411 __builtin_ia32_directstoreu_u64,
11412 __builtin_ia32_movdir64b): New builtins.
11413 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11414 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11416 (ix86_valid_target_attribute_inner_p): Ditto.
11417 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11418 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11419 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11420 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11421 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11422 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11423 (movdiri<mode>, movdir64b_<mode>): New.
11424 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11425 * config/i386/immintrin.h: Include movdirintrin.h.
11426 * config/i386/movdirintrin.h: New file.
11427 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11429 2018-04-19 Richard Biener <rguenther@suse.de>
11431 PR middle-end/85455
11432 * cfg.c (clear_bb_flags): When loop state says we have
11433 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11435 2018-04-19 Richard Biener <rguenther@suse.de>
11437 PR tree-optimization/84737
11438 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11439 copying restrict info.
11440 (vect_setup_realignment): Use it.
11441 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11442 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11443 the first DR to all generated stores.
11444 (vectorizable_load): Likewise for loads.
11446 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11448 PR tree-optimization/85446
11449 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11450 the integral and pointer types to have the same precision.
11452 * doc/install.texi: Document --disable-cet being the default and
11455 2018-04-18 Martin Liska <mliska@suse.cz>
11457 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11460 2018-04-18 Martin Liska <mliska@suse.cz>
11463 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11466 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11467 arguments if they are comparable.
11469 2018-04-18 Martin Liska <mliska@suse.cz>
11472 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11475 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11478 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11481 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11482 ENDBR after calling __morestack.
11484 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11487 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11488 by using gcc_base_ver to generate a gcc_driver_version, and use
11489 it when generating GCC_DRIVER_NAME.
11490 * configure: Regenerate.
11492 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11495 * config.gcc: Obsolete powerpc*-*-*spe*.
11497 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11500 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11501 (stabstr_D): Change type of unum from unsigned int to
11502 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11505 2018-04-17 Jim Wilson <jimw@sifive.com>
11508 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11509 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11510 Set arg_pointer_offset after using pretend_args_size.
11512 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11514 PR rtl-optimization/85431
11515 * dse.c (record_store): Ignore zero width stores.
11518 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11519 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11520 __builtin_stack_restore rather than after it.
11521 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11522 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11523 argument instead of virtual_dynamic_stack_rtx.
11525 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11527 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11529 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11530 Add note to error message to explain internal mapping of overloaded
11531 built-in function name to non-overloaded built-in function name.
11532 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11535 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11538 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11539 where the inputs overlap with the output.
11541 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11543 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11544 (=v, v) alternative and explicit "memory" attribute.
11545 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11546 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11548 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11549 "sselog1" type instead of "sselog".
11550 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11551 "sselog". Remove explicit "memory" attribute.
11552 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11553 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11555 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11556 "sselog1" type instead of "sselog". Remove explicit "memory"
11558 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11559 use "sselog1" type instead of "sselog". Remove explicit "memory"
11561 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11562 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11564 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11565 "sselog1" type instead of "sselog". Remove explicit "memory"
11567 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11568 use "sselog1" type instead of "sselog". Remove explicit "memory"
11572 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11574 PR middle-end/85414
11575 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11578 2018-04-17 Martin Jambor <mjambor@suse.cz>
11581 * ipa-cp.c (create_specialized_node): Call
11582 expand_all_artificial_thunks if necessary.
11584 2018-04-17 Martin Liska <mliska@suse.cz>
11587 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11588 in message, remote space in between '_G' and '('.
11590 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11593 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11594 avx512f_vmcmp<mode>3<round_saeonly_name>,
11595 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11596 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11597 avx512f_rndscale<mode><round_saeonly_name>,
11598 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11599 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11600 Use %<iptr>2 instead of %2 for -masm=intel.
11601 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11602 avx512f_vcvttss2usi<round_saeonly_name>,
11603 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11605 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11606 avx512f_vcvttsd2usi<round_saeonly_name>,
11607 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11608 Use %q1 instead of %1 for -masm=intel.
11609 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11610 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11611 of %3 for -masm=intel.
11612 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11614 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11616 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11618 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11619 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11621 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11623 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11624 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11625 %g1 and one with %0 and %1.
11626 (avx512er_vmrcp28<mode><round_saeonly_name>,
11627 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11628 %1 for -masm=intel.
11629 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11630 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11631 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11632 of %0 and %{%4%} for -masm=intel.
11633 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11634 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11635 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11636 order of %0 and %{%5%}%{z%} for -masm=intel.
11638 2018-04-17 Jan Hubicka <jh@suse.cz>
11641 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11643 2018-04-17 Martin Liska <mliska@suse.cz>
11646 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11647 for target_clone error message. Make default implementation
11648 clone to be a local declaration.
11649 (separate_attrs): Add new argument and check for an empty
11651 (expand_target_clones): Handle it.
11652 (ipa_target_clone): Make redirection just for target_clones
11655 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11656 Tom de Vries <tom@codesourcery.com>
11658 PR middle-end/84955
11659 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11660 tiled basic blocks without omp continue statements.
11662 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11665 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11666 vec_extract expression as having side effects to make sure it gets
11669 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11672 * config/i386/i386.c (get_builtin_code_for_version): Check
11675 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11678 * config.gcc: Support "skylake".
11679 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11681 * config/i386/i386.c (m_SKYLAKE): Define.
11682 (processor_target_table): Add "skylake".
11683 (ix86_option_override_internal): Add "skylake".
11684 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11685 PROCESSOR_CANNONLAKE.
11686 (get_builtin_code_for_version): Fix priority for
11687 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11688 PROCESSOR_SKYLAKE-AVX512.
11689 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11690 (processor_type): Add PROCESSOR_SKYLAKE.
11692 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11693 Jason Merrill <jason@redhat.com>
11696 * convert.c (convert_to_integer_1): Use direct recursion for
11697 enumeral types and types with a precision less than the number
11698 of bits in their mode.
11700 2018-04-16 Julia Koval <julia.koval@intel.com>
11703 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11704 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11706 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11709 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11710 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11711 and -mno-direct-move.
11713 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11716 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11717 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11718 Ensure negative shifts result in {0}.
11720 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11722 PR rtl-optimization/79916
11723 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11724 regs (if any) to define how to gnerate SD moves when LRA is in
11727 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11729 PR rtl-optimization/85393
11730 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11731 * except.c (expand_dw2_landing_pad_for_region): Make static.
11732 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11733 a label and unconditional jump to old_bb, rather than
11734 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11737 PR rtl-optimization/85376
11738 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11739 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11740 instead of a specific value.
11742 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11743 Bin Cheng <bin.cheng@arm.com>
11745 PR tree-optimization/82965
11746 PR tree-optimization/83991
11747 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11748 by_profile_only parameter.
11749 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11750 information if the loop was predicted to iterate too many times.
11751 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11753 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11756 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11759 2018-04-13 Martin Liska <mliska@suse.cz>
11760 Jakub Jelinek <jakub@redhat.com>
11762 PR middle-end/81657
11763 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11764 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11765 * builtins.c (expand_builtin_memory_copy_args): Use
11766 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11767 handle dest_addr == pc_rtx.
11769 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11772 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11773 asked to not generate direct moves.
11774 (fix_trunc<mode>si2_stfiwx): Similar.
11775 (fix_trunc<mode>si2_internal): Similar.
11777 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11780 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11781 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11782 lookup if dest in some wider mode is known to be const0_rtx and
11783 if so, record permanent equivalence for it to be ZERO_EXTEND of
11784 the narrower mode destination.
11786 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11788 * lto-streamer-out.c (output_function): Revert 259346.
11789 * omp-expand.c (expand_oacc_for): Likewise.
11791 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11793 PR rtl-optimization/85354
11794 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11795 * sel-sched.c (sel_global_init): ... here.
11797 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11800 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11801 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11802 mode for PE-COFF targets.
11803 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11804 (i386_pe_asm_lto_end): Likewise.
11805 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11806 (TARGET_ASM_LTO_END): Likewise.
11807 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11808 (i386_pe_asm_lto_start): New function.
11809 (i386_pe_asm_lto_end): Likewise.
11811 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11812 Richard Biener <rguenther@suse.de>
11814 PR middle-end/84955
11815 * lto-streamer-out.c (output_function): Fix CFG loop state before
11817 * omp-expand.c (expand_oacc_for): Handle calls to internal
11818 functions like regular functions.
11820 2018-04-12 Richard Biener <rguenther@suse.de>
11823 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11824 for the early LTO debug to properly generate references to it
11825 during DIE emission. Do not re-use that for the skeleton for
11827 (dwarf2out_early_finish): Likewise.
11829 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11832 * config/i386/sse.md
11833 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11834 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11835 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11836 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11837 and output is a reg, avoid creating invalid lowpart subreg, but
11838 instead split into a 512-bit move. Don't split if not AVX512VL,
11839 input is xmm16+ reg and output is a mem.
11840 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11841 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11842 xmm16+ reg and output is a mem.
11844 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11846 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11847 also for flag_dwarf2_cfi_asm.
11849 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11851 PR rtl-optimization/85342
11852 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11853 a bool scalar var inside of the loop instead. Don't try to update
11854 recog_data.operand after failed apply_change_group.
11856 2018-04-12 Tom de Vries <tom@codesourcery.com>
11859 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11860 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11861 array with flexible array member as array without given dimension.
11862 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11863 argument for undefined param to true.
11865 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11868 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11869 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11870 from PowerPC section.
11871 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11872 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11873 help text that is too long.
11874 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11875 help text that is too long.
11876 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11877 help text that is too long.
11879 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11881 * config/alpha/alpha.md (stack_probe_internal): Rename
11882 from "probe_stack". Update all callers.
11884 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11886 PR rtl-optimization/84566
11887 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11888 sched_macro_fuse_insns.
11890 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11893 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11894 (compute_block_dependences): ... from here.
11896 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11898 PR tree-optimization/85331
11899 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11900 from int to HOST_WIDE_INT.
11902 2018-04-11 Martin Jambor <mjambor@suse.cz>
11905 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11906 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11907 not the same as the source val.
11908 (cgraph_edge_brings_value_p): New parameter.
11909 (gather_edges_for_value): Pass destination value to
11910 cgraph_edge_brings_value_p.
11911 (perhaps_add_new_callers): Likewise.
11912 (get_info_about_necessary_edges): Likewise and exclude values brought
11913 only by self-recursive edges.
11914 (create_specialized_node): Redirect only clones of self-calling edges.
11915 (+self_recursive_pass_through_p): New function.
11916 (find_more_scalar_values_for_callers_subset): Use it.
11917 (find_aggregate_values_for_callers_subset): Likewise.
11918 (known_aggs_to_agg_replacement_list): Removed.
11919 (decide_whether_version_node): Re-calculate known constants for all
11920 remaining context clones.
11922 2018-04-11 Richard Biener <rguenther@suse.de>
11925 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11926 from early DWARF output.
11927 (dwarf2out_early_finish): Output line info unconditionally into
11928 early DWARF and add reference to it.
11930 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11933 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11934 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11935 other than V2DFmode using iptr mode attribute.
11936 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11938 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11940 PR rtl-optimization/84659
11941 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11943 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11946 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11948 (output_loc_list): Pass address of a dummy size variable even in the
11949 locview handling loop.
11950 (index_location_lists): Add comment on why skip_loc_list_entry can't
11953 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11956 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11959 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11962 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11963 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11964 and -mstring-compare-inline-limit.
11966 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11969 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11970 for stack clash protection in a register whenever we need it to be in
11973 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11975 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11976 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11978 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11981 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11983 (mlong-double-): Ditto.
11984 * config/rs6000/sysv4.opt (msdata=): Ditto.
11985 (mtls-size=): Ditto.
11987 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11989 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11990 erroneous entries for
11991 "vector int vec_ldl (int, long int *)", and
11992 "vector unsigned int vec_ldl (int, unsigned long int *)".
11993 Add comments and entries for
11994 "vector bool char vec_ldl (int, bool char *)",
11995 "vector bool short vec_ldl (int, bool short *)",
11996 "vector bool int vec_ldl (int, bool int *)",
11997 "vector bool long long vec_ldl (int, bool long long *)",
11998 "vector pixel vec_ldl (int, pixel *)",
11999 "vector long long vec_ldl (int, long long *)",
12000 "vector unsigned long long vec_ldl (int, unsigned long long *)".
12001 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12002 type tree bool_long_long_type_node and correct definition of
12003 bool_V2DI_type_node to make reference to this new type tree.
12004 (rs6000_mangle_type): Replace erroneous reference to
12005 bool_long_type_node with bool_long_long_type_node.
12006 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12007 comments to emphasize sign distinctions for char and int types and
12008 replace RS6000_BTI_bool_long constant with
12009 RS6000_BTI_bool_long_long constant. Also add comment to restrict
12010 use of RS6000_BTI_pixel.
12011 (bool_long_type_node): Remove this macro definition.
12012 (bool_long_long_type_node): New macro definition
12014 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12016 PR rtl-optimization/85300
12017 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12018 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12019 simplify_unary_operation fails.
12021 2018-04-10 Martin Liska <mliska@suse.cz>
12023 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12024 cgraph_edge and ipa_ref.
12026 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12030 * config/i386/sse.md
12031 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12032 computation of the VEC_MERGE selector from mask.
12033 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12034 Fix decoding of the VEC_MERGE selector into mask.
12036 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12038 PR tree-optimization/85286
12039 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12041 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12043 * final.c (final_1): Set insn_last_address as well as
12044 insn_current_address.
12046 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12049 * explow.c (emit_stack_probe): Call validize_mem on memory location
12050 before passing it to gen_probe_stack. Create address operand and
12051 legitimize it for the probe_stack_address case.
12053 2018-04-09 Jan Hubicka <jh@suse.cz>
12056 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12057 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12058 * tree.c (free_lang_data_in_type): Fix handling of binfos;
12060 (free_lang_data): Rebuild type inheritance graph.
12062 2018-04-09 Martin Sebor <msebor@redhat.com>
12064 * invoke.texi (-finline-small-functions): Mention other optimization
12066 (-findirect-inlining, -fpartial-inlining): Same.
12067 (-finline-functions-called-once): Same.
12068 (-freorder-blocks-and-partition): Same.
12070 2018-04-09 Jan Hubicka <jh@suse.cz>
12073 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12074 jumps; choose last target that matches the criteria (i.e.
12075 no partition changes for non-crossing jumps).
12076 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12077 support for redirecting crossing jumps to non-crossing.
12079 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
12081 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12082 also for naked functions.
12084 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
12086 * config/arc/arc.md (add_shift): New pattern.
12087 (add_shift2): Likewise.
12088 (sub_shift): Likewise.
12089 (sub_shift_cmp0_noout): Likewise.
12090 (compare_si_ashiftsi): Likewise.
12091 (xbfu_cmp0_noout): New combine pattern.
12092 (xbfu_cmp0"): Likewise.
12093 (movsi_set_cc_insn): Place the predicable variant first.
12094 (commutative_binary_cmp0_noout): Remove clobber.
12095 (commutative_binary_cmp0): New pattern.
12096 (noncommutative_binary_cmp0): Likewise.
12097 (noncommutative_binary_cmp0_noout): Likewise.
12098 (noncommutative_binary_comparison_result_used): Removed.
12099 (rsub_cmp0): New pattern.
12100 (rsub_cmp0_noout): Likewise.
12101 (extzvsi): Changed, keep only meaningful variants.
12102 (SQH, SEZ): New iterators.
12103 (SQH_postfix): New mode attribute.
12104 (SEZ_prefix): New code attribute.
12105 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12106 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12107 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12108 of numerical value.
12109 (noncommutative_operator): Check the availability of barrel
12112 2018-04-09 Richard Biener <rguenther@suse.de>
12114 PR tree-optimization/85284
12115 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12116 Only use the niter constraining form of simple_iv when the exit
12117 is always executed.
12119 2018-04-09 Tom de Vries <tom@codesourcery.com>
12122 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12123 (define_expand "*memory_barrier"): New define_expand.
12124 (define_insn "memory_barrier"): New insn.
12126 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12128 PR rtl-optimization/80463
12129 PR rtl-optimization/83972
12130 PR rtl-optimization/83480
12132 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12133 correct producer for the insn.
12134 (tidy_control_flow): Fixup seqnos in case of debug insns.
12136 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12138 PR rtl-optimization/83913
12140 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12141 different sched-times when merging exprs.
12143 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12145 PR rtl-optimization/83962
12147 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12148 tidy_fallthru_edge and tidy_control_flow.
12150 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12152 PR rtl-optimization/83530
12154 * sel-sched.c (force_next_insn): New global variable.
12155 (remove_insn_for_debug): When force_next_insn is true, also leave only
12156 next insn in the ready list.
12157 (sel_sched_region): When the region wasn't scheduled, make another pass
12158 over it with force_next_insn set to 1.
12160 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12162 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12164 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12165 for interrupt control.
12166 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12167 functions for interrupt control.
12168 * config/nds32/nds32-intrinsic.md: Likewise.
12169 * config/nds32/nds32_intrinsic.h: Likewise.
12170 * config/nds32/nds32.h (nds32_builtins): Likewise.
12172 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12174 * config/nds32/nds32.c (nds32_init_machine_status,
12175 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12176 strict_aligned_p field.
12177 (nds32_expand_to_rtl_hook): New function.
12178 (TARGET_EXPAND_TO_RTL_HOOK): Define.
12179 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12181 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12182 Chung-Ju Wu <jasonwucj@gmail.com>
12184 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12185 * config/nds32/nds32-n7.md: New file.
12186 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12187 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12189 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12190 * config/nds32/nds32.md (pipeline_model): Add n7.
12191 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12192 * config/nds32/pipelines.md: Include n7 settings.
12194 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12195 Chung-Ju Wu <jasonwucj@gmail.com>
12197 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12198 * config/nds32/nds32-e8.md: New file.
12199 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12200 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12202 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12203 * config/nds32/nds32.md (pipeline_model): Add e8.
12204 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12205 * config/nds32/pipelines.md: Include e8 settings.
12207 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12208 Chung-Ju Wu <jasonwucj@gmail.com>
12210 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12211 * config/nds32/nds32-n8.md: New file.
12212 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12213 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12215 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12216 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12217 * config/nds32/nds32.md (pipeline_model): Add n8.
12218 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12219 * config/nds32/pipelines.md: Include n8 settings.
12221 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12222 Chung-Ju Wu <jasonwucj@gmail.com>
12224 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12225 * config/nds32/nds32-n9-2r1w.md: New file.
12226 * config/nds32/nds32-n9-3r2w.md: New file.
12227 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12228 nds32_register_ports): New or modify for cpu n9.
12229 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12231 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12232 * config/nds32/nds32-utils.c: New file.
12233 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12234 TARGET_MUL_SLOW): Define.
12235 * config/nds32/nds32.md (pipeline_model): New attribute.
12236 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12237 New options that support cpu n9.
12238 * config/nds32/pipelines.md: Include n9 settings.
12239 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12241 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12243 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12244 information if necessary.
12245 (output_cond_branch_compare_zero): Likewise.
12246 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12247 (nds32_target_alignment): Refine for alignment.
12248 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12249 (FUNCTION_BOUNDARY): Modify.
12250 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12252 * config/nds32/nds32.opt (malways-align, malign-functions): New.
12254 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12256 * config/nds32/constants.md (unspec_volatile_element): Add values for
12257 TLB operation and data prefetch.
12258 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12259 functions for TLB operation and data prefetch.
12260 * config/nds32/nds32-intrinsic.md: Likewise.
12261 * config/nds32/nds32_intrinsic.h: Likewise.
12262 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12263 (nds32_print_operand): Likewise.
12264 * config/nds32/nds32.h (nds32_builtins): Likewise.
12266 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
12267 Andrew Pinski <pinsika@gcc.gnu.org>
12269 PR middle-end/82976
12270 * match.pd: Use constant_boolean_node of correct type instead of
12271 boolean_true_node or boolean_false_node for simplifying
12272 pointer comparisons to zero.
12274 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12276 PR tree-optimization/80021
12277 * tree.c (verify_type_variant): Make error call in verify_variant_match
12278 translatable and remove final full stop.
12280 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12282 * config/nds32/constants.md (unspec_volatile_element): Add
12283 UNSPEC_VOLATILE_EH_RETURN.
12284 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12285 nds32_output_stack_pop): Support dwarf exception handling process.
12286 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12287 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12288 exception handling process.
12289 (nds32_compute_stack_frame): Likewise.
12290 (nds32_return_addr_rtx): Likewise.
12291 (nds32_initial_elimination_offset): Likewise.
12292 (nds32_expand_prologue): Likewise.
12293 (nds32_expand_epilogue): Likewise.
12294 (nds32_dynamic_chain_address): New function.
12295 * config/nds32/nds32.h (machine_function): Add fields for dwarf
12296 exception handling.
12297 (DYNAMIC_CHAIN_ADDRESS): Define.
12298 (EH_RETURN_DATA_REGNO): Define.
12299 (EH_RETURN_STACKADJ_RTX): Define.
12300 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12301 patterns for dwarf exception handling.
12303 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12305 * config/nds32/nds32.h: Clean up obsolete macros.
12307 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12309 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12310 Add enum values for particular instructions.
12311 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12312 particular intrinsic functions.
12313 * config/nds32/nds32-intrinsic.md: Likewise.
12314 * config/nds32/nds32_intrinsic.h: Likewise.
12315 * config/nds32/nds32.h (nds32_builtins): Likewise.
12316 * config/nds32/nds32.md (type): Add pbsad and pbsada.
12317 (btst, ave): New patterns for particular instructions.
12319 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12321 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12322 Add enum values for atomic load/store and memory sync.
12323 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12325 * config/nds32/nds32-intrinsic.md: Likewise.
12326 * config/nds32/nds32_intrinsic.h: Likewise.
12327 * config/nds32/nds32.h (nds32_builtins): Likewise.
12329 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12331 PR tree-optimization/85257
12332 * fold-const.c (native_encode_vector): If not all elts could fit
12333 and off is -1, return 0 rather than offset.
12334 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12335 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12336 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
12337 adjust buffer in native_interpret_expr call.
12339 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12341 * config/nds32/constants.md (unspec_volatile_element): Add cache
12342 control enum values.
12343 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12344 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12345 * config/nds32/nds32.c (nds32_cctl_names): New.
12346 (nds32_print_operand): Handle cache control register names.
12347 * config/nds32/nds32.h (nds32_builtins): New enum values.
12348 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12350 * config/nds32/nds32.md (type): Add mmu.
12351 * config/nds32/pipelines.md (simple_insn): Add mmu.
12353 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12355 * config/nds32/nds32.md (type): Remove call.
12356 * config/nds32/pipelines.md (simple_insn): Likewise.
12358 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12360 * config/nds32/constants.md (unspec_volatile_element): Add
12361 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12362 UNSPEC_VOLATILE_FMFCFG.
12363 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12364 description for fmfcfg and fmfcsr.
12365 (bdesc_1arg): Add fmtcsr.
12366 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12367 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12368 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12369 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12370 unspec_fmfcfg): New patterns.
12371 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12372 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12373 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12374 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12375 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12376 __nds32__fmfcfg): Define.
12378 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12380 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12381 intrinsic register names.
12382 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12383 intrinsic register enum values and macros.
12385 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12387 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12388 for load/store addressing form.
12389 (nds32_print_operand_address): Likewise.
12391 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
12394 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12395 based on LABEL_REF. Remove useless assertion.
12396 (pic_address_needs_scratch): Fix formatting.
12397 (sparc_legitimize_pic_address): Minor tweaks.
12398 (sparc_delegitimize_address): Adjust assertion accordingly.
12399 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12400 into symbolic_operand.
12401 (movsi_high_pic_label_ref): Likewise.
12402 (movsi_lo_sum_pic_label_ref): Likewise.
12403 (movdi_pic_label_ref): Likewise.
12404 (movdi_high_pic_label_ref): Likewise.
12405 (movdi_lo_sum_pic_label_ref): Likewise.
12407 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
12409 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12410 custom LIB_SPEC setup.
12412 2018-04-06 Ruslan Bukin <br@bsdpad.com>
12413 Kito Cheng <kito.cheng@gmail.com>
12415 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12416 * config/riscv/freebsd.h: New.
12418 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12420 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12421 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12424 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12425 Kito Cheng <kito.cheng@gmail.com>
12427 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12428 nds32_output_call, nds32_symbol_binds_local_p): New functions.
12429 * config/nds32/nds32-protos.h (nds32_output_call,
12430 nds32_output_return): Declare.
12431 * config/nds32/nds32.md: Refine all the call and return patterns.
12433 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12436 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12437 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12439 PR rtl-optimization/84872
12440 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12441 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12442 EDGE_CROSSING edge.
12444 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12446 * expr.c (copy_blkmode_to_reg): Revert 254862.
12447 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12449 2018-04-06 Richard Biener <rguenther@suse.de>
12451 PR middle-end/85244
12452 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12453 after seeing a component reference with an adjacent field. Treat
12454 refs to arrays at struct end of external decls similar to
12455 refs to unconstrained commons.
12457 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12460 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12461 look through SAVE_EXPRs with non-side-effects argument. Adjust
12463 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12466 2018-04-06 Richard Biener <rguenther@suse.de>
12468 PR middle-end/85180
12469 * alias.c (find_base_term): New wrapper around find_base_term
12470 unwinding CSELIB_VAL_PTR changes.
12471 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12474 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12476 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12478 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12479 constant definitions.
12480 ("nop"): lr 0,0 -> nopr r0
12481 ("nop_lr0", "nop_lr1"): New insn definitions.
12483 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12485 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12486 NDS32_V3PUSH_AVAILABLE_P macro.
12488 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12489 Chung-Ju Wu <jasonwucj@gmail.com>
12491 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12492 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12493 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12494 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12495 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12496 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12497 * config/nds32/constraints.md: New constraints and checking for hard
12498 float configuration.
12499 * config/nds32/iterators.md: New mode iterator and attribute for hard
12500 float configuration.
12501 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12503 * config/nds32/nds32-fpu.md: New file.
12504 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12505 deal with hard float code generation.
12506 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12508 (abi_type, float_reg_number): New enum type.
12509 * config/nds32/nds32-predicates.c: New predicates for hard float.
12510 * config/nds32/nds32-protos.h: Declare functions for hard float.
12511 * config/nds32/nds32.c: Implementation for hard float configuration.
12512 * config/nds32/nds32.h: Definitions for hard float configuration.
12513 * config/nds32/nds32.md: Include hard float machine description and
12514 modify patterns for hard float configuration.
12515 * config/nds32/nds32.opt: New options for hard float configuration.
12516 * config/nds32/predicates.md: New predicates for hard float
12519 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12521 * common/config/nds32/nds32-common.c
12522 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12524 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12526 PR middle-end/85195
12527 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12528 CONSTRUCTOR_ELT (ctor, ...)->value.
12530 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12533 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12535 2018-04-05 Tom de Vries <tom@codesourcery.com>
12538 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12541 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12542 Kito Cheng <kito.cheng@gmail.com>
12544 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12545 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12546 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12547 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12549 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12550 Kito Cheng <kito.cheng@gmail.com>
12552 * config/nds32/constraints.md (Ufe): New memory constraint.
12553 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12554 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12555 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12557 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12558 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12560 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12562 * config/nds32/nds32.md: Use optimize_size in the condition for
12563 alu-shift instructions.
12565 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12567 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12569 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12571 * config/nds32/nds32.md (negsi2): Refine pattern.
12573 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12574 Chung-Ju Wu <jasonwucj@gmail.com>
12576 * config/nds32/iterators.md (shift_rotate): New code iterator.
12577 (shift): New code attribute.
12578 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12579 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12580 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12581 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12582 bit-wise operations.
12583 (andsi3, *andsi3): Ditto.
12584 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12585 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12586 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12587 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12588 nds32_ior_operand, nds32_xor_operand): New predicates.
12590 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12592 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12593 (addsi3, subsi3): ... this.
12595 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12597 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12599 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12601 * config/nds32/nds32.md: Adjust indention.
12603 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12605 * config/nds32/nds32.md (feature): New attribute.
12607 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12609 * config/nds32/nds32.md (subtype): New attribute.
12611 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12614 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12615 expansion to perform a bitwise AND of the argument followed by a
12616 boolean negation of the result.
12618 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12620 PR rtl-optimization/84878
12621 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12622 the basic block. Assert the use reference is not artificial and that
12623 it has an associated insn.
12625 2018-04-04 Michael Matz <matz@suse.de>
12627 * builtins.c (compute_objsize): Pass correct operand
12628 to array_at_struct_end_p.
12630 2018-04-04 Richard Biener <rguenther@suse.de>
12633 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12634 from contexts for DINFO_LEVEL_TERSE and below.
12636 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12638 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12639 resiter_operand condition.
12640 * config/nds32/nds32.md (*move<mode>): Ditto.
12642 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12643 Monk Chiang <sh.chiang04@gmail.com>
12645 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12647 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12649 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12651 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12652 Kito Cheng <kito.cheng@gmail.com>
12654 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12655 nds32_cond_code_str, output_cond_branch,
12656 output_cond_branch_compare_zero, nds32_expand_cbranch,
12657 nds32_expand_cstore, nds32_expand_movcc,
12658 nds32_output_cbranchsi4_equality_zero,
12659 nds32_output_cbranchsi4_equality_reg,
12660 nds32_output_cbranchsi4_equality_reg_or_const_int,
12661 nds32_output_cbranchsi4_greater_less_zero: New functions.
12662 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12663 nds32_expand_cstore, nds32_expand_movcc,
12664 nds32_output_cbranchsi4_equality_zero,
12665 nds32_output_cbranchsi4_equality_reg,
12666 nds32_output_cbranchsi4_equality_reg_or_const_int,
12667 nds32_output_cbranchsi4_greater_less_zero): Declare.
12668 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12669 nds32_rimm11s_operand): New predicates.
12670 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12671 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12674 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12676 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12677 * config/nds32/nds32.md: Ditto.
12678 * config/nds32/pipelines.md: Ditto.
12680 2018-04-04 Richard Biener <rguenther@suse.de>
12682 PR tree-optimization/85168
12683 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12684 propagating abnormals.
12686 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12688 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12690 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12691 Kito Cheng <kito.cheng@gmail.com>
12693 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12694 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12695 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12696 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12697 * config/nds32/nds32.md (sibcall_internal): New.
12698 (sibcall_register): Remove.
12699 (sibcall_immediate): Remove.
12700 (sibcall_value_internal): New.
12701 (sibcall_value_register): Remove.
12702 (sibcall_value_immediate): Remove.
12703 * config/nds32/predicates.md (nds32_general_register_operand): New.
12704 (nds32_call_address_operand): New.
12706 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12708 PR rtl-optimization/85167
12709 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12710 bb_defs if *split_p, instead preinitialize it to NULL.
12712 PR tree-optimization/85156
12713 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12714 evaluating the argument multiple times.
12716 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12718 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12720 (_mm_cvtpd_ps): Likewise.
12721 (_mm_cvttpd_epi32): Likewise.
12722 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12723 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12724 vector, pixel, and bool following altivec.h include.
12726 2018-04-03 Martin Sebor <msebor@redhat.com>
12728 * doc/extend.texi (Common Function Attributes): Clarify.
12729 (const attribute): Likewise.
12730 (pure attribute): Likewise.
12732 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12735 * config/i386/i386.c (ix86_expand_vector_set): Use
12736 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12738 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12740 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12741 instructions when changing rounding bits to preserve precision bits
12742 in the x87 control word.
12744 2018-04-03 Martin Liska <mliska@suse.cz>
12746 PR tree-optimization/82491
12747 * rtl.h (strip_offset_and_add): Replace += suboffset with
12748 poly_uint64 () + suboffset.
12750 2018-03-29 Martin Liska <mliska@suse.cz>
12751 Martin Jambor <mjambor@suse.cz>
12754 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12755 param_type is not an integral or pointer type.
12757 2018-04-03 Richard Biener <rguenther@suse.de>
12759 * sese.h (recompute_all_dominators): Remove.
12761 2018-04-02 Martin Sebor <msebor@redhat.com>
12763 * doc/invoke.texi (-Wrestrict): Fix typos.
12765 2018-04-02 Jim Wilson <jimw@sifive.com>
12767 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12768 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12769 (<optab>di3, <optab>si3_extend): Likewise.
12770 (<optab>si3_mask, <optab>si3_mask_1): New.
12771 (<optab>di3_mask, <optab>di3_mask_1): New.
12772 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12773 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12774 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12776 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12778 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12781 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12783 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12784 (nds32_canonicalize_comparison): New function.
12786 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12787 Kito Cheng <kito.cheng@gmail.com>
12788 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12790 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12791 * config/nds32/constants.md (unspec_volatile_element): Add
12792 UNSPEC_VOLATILE_RELAX_GROUP.
12793 * config/nds32/nds32-relax-opt.c: New file.
12794 * config/nds32/nds32-predicates.c
12795 (nds32_symbol_load_store_p): New function.
12796 * config/nds32/nds32-protos.h
12797 (nds32_symbol_load_store_p): Declare function.
12798 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12799 * config/nds32/nds32.c
12800 (nds32_register_pass): New function to register pass.
12801 (nds32_register_passes): New function to register passes.
12802 * config/nds32/nds32.md (relax_group): New pattern.
12803 * config/nds32/nds32.opt (mrelax-hint): New option.
12804 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12806 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12808 * config/nds32/t-nds32: Modify files dependency.
12810 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12812 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12813 (PROFILE_HOOK): Define its implementation.
12815 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12817 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12818 type and 32-bit size.
12820 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12822 PR middle-end/85090
12823 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12824 (V_128_256): New mode iterator.
12825 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12826 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12827 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12829 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12830 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12832 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12835 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12836 NaN inputs correctly.
12838 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12841 * config/rs6000/vsx.md (??r): New mode attribute.
12842 (*vsx_mov<mode>_64bit): Use it.
12843 (*vsx_mov<mode>_32bit): Likewise.
12845 2018-03-30 Martin Sebor <msebor@redhat.com>
12847 PR tree-optimization/84818
12848 * builtins.c (check_access): Use warning_n.
12850 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12853 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12855 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12858 2018-03-30 Julia Koval <julia.koval@intel.com>
12861 * x86-tune.def (movx, partial_reg_dependency): Enable for
12864 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12866 PR inline-asm/84985
12867 * lra-constraints.c (process_alt_operands): Move setting
12868 this_alternative_matches below.
12870 2018-03-29 Martin Liska <mliska@suse.cz>
12873 * doc/invoke.texi: Document how LTO works with debug info.
12874 Describe auto-load support of binutils. Mention 'x86-64'
12875 as valid option value of -march option.
12877 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12879 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12882 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12883 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12884 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12887 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12890 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12891 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12892 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12893 for RS6000_BTM_POWERPC64.
12894 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12895 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12896 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12899 (DIVDEU): Likewise.
12901 2018-03-28 Carl Love <cel@us.ibm.com>
12904 2017-09-27 Carl Love <cel@us.ibm.com>
12906 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12907 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12908 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12911 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12913 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12914 instead of __vector bool.
12915 (_mm_max_pu8): Likewise.
12916 (_mm_min_pi16): Likewise.
12918 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12921 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12922 (DIVWEUO): Likewise.
12923 (DIVDEO): Likewise.
12924 (DIVDEUO): Likewise.
12925 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12926 DIVWEUO and DIVDEUO.
12927 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12928 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12929 (div_extend): Likewise.
12930 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12932 (__builtin_divweuo): Likewise.
12933 (__builtin_divdeo): Likewise.
12934 (__builtin_divdeuo): Likewise.
12936 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12939 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12940 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12942 PR tree-optimization/82004
12943 * gimple-match-head.c (optimize_pow_to_exp): New function.
12944 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12945 Don't fold to exp if optimize_pow_to_exp is false.
12947 2018-03-28 Martin Liska <mliska@suse.cz>
12950 * calls.c (initialize_argument_information): Fix trailing space.
12951 * common.opt: Fix typo and provide better explanation for
12952 -fsanitize-coverage option.
12953 * config/i386/i386.opt: Fix typo.
12955 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12956 Martin Liska <mliska@suse.cz>
12959 * gimplify.c (asan_poison_variable): Don't do the check for
12960 gimplify_omp_ctxp here.
12961 (gimplify_decl_expr): Do it here.
12962 (gimplify_target_expr): Likewise.
12964 2018-03-28 Martin Liska <mliska@suse.cz>
12967 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12968 chkp_type_bounds_count if MPX is not enabled.
12970 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12972 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12974 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12977 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12978 function to create the function decl for complex long double
12979 multiply and divide for -mabi=ieeelongdouble.
12980 (init_float128_ieee): Call it.
12982 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12985 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12986 -fcf-protection=branch -mibt.
12987 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12989 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12992 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12993 arm_word_relocations.
12995 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12998 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12999 extern array declarations.
13001 2018-03-27 Richard Biener <rguenther@suse.de>
13003 PR middle-end/84067
13004 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13005 explicit single_use checks.
13007 2018-03-27 Richard Biener <rguenther@suse.de>
13009 PR tree-optimization/85082
13010 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13013 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13015 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13016 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13017 Turn on fasynchronous-unwind-tables and funwind-tables.
13019 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
13022 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13023 (*bmi_blsr_<mode>_ccz): Ditto.
13025 2018-03-26 Tom de Vries <tom@codesourcery.com>
13027 PR tree-optimization/85063
13028 * omp-general.c (offloading_function_p): New function. Factor out
13030 * omp-offload.c (pass_omp_target_link::gate): ... here.
13031 * omp-general.h (offloading_function_p): Declare.
13032 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13033 with attribute omp declare target for offloading functions.
13035 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
13037 PR tree-optimization/84005
13038 * tree-data-ref.h (get_base_for_alignment): Declare.
13039 * tree-data-ref.c (get_base_for_alignment_1): New function.
13040 (get_base_for_alignment): Likewise.
13041 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13042 get_base_for_alignment to find a suitable base object, instead
13043 of always using drb->base_address.
13045 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13047 PR inline-asm/85022
13048 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13049 known size by default.
13051 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
13053 PR inline-asm/85030
13054 * lra-constraints.c (process_alt_operands): Don't match BLKmode
13055 and non BLKmode operands.
13057 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13060 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13061 Clean up attributes.
13063 2018-03-23 Richard Biener <rguenther@suse.de>
13066 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13067 we are going to emit early debug for LTO.
13069 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13071 PR inline-asm/85034
13072 * function.c (match_asm_constraints_1): Don't optimize if input
13073 doesn't satisfy general_operand predicate for output's mode.
13075 PR inline-asm/85022
13076 * alias.c (write_dependence_p): Don't require for x_canonicalized
13077 non-VOIDmode if x has VOIDmode.
13080 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13081 just don't try to optimize it rather than assert it never happens.
13083 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13085 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13086 macro expansions for definition of ST_INTERNAL_<mode> and
13087 LD_INTERNAL_<mode> builtins.
13088 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13090 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13092 (altivec_expand_st_builtin): Likewise.
13093 (altivec_expand_builtin): Remove calls to deleted functions.
13094 (rs6000_address_for_altivec): Delete this function.
13095 * config/rs6000/vector.md: Remove expands for
13096 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13098 2018-03-22 Sudakshina Das <sudi.das@arm.com>
13101 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13102 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13103 re-computing once computed.
13104 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13105 (arm_init_machine_status): Initialize
13106 machine->static_chain_stack_bytes.
13108 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13111 * doc/extend.texi: Add four new prototypes for vec_ld.
13112 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13113 definitions for more logical presentation.
13114 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13115 entries for V1TI variants of __builtin_altivec_ld builtin.
13116 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13117 handling of V1TI variant of LVX icode pattern.
13118 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13119 (rs6000_gimple_fold_builtin): Likewise.
13120 (altivec_init_builtins): Add code to define
13121 __builtin_altivec_lvx_v1ti function.
13123 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13125 PR inline-asm/84941
13126 * function.c (match_asm_constraints_1): Don't do the optimization
13127 if input isn't a REG, SUBREG, MEM or constant.
13129 2018-03-22 Tom de Vries <tom@codesourcery.com>
13131 PR tree-optimization/84956
13132 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13133 bb_has_abnormal_pred.
13135 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13138 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13139 DECL_INITIAL (decl) to decl at the end.
13140 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13141 adjust the comment.
13143 2018-03-21 Joseph Myers <joseph@codesourcery.com>
13145 * doc/extend.texi (__builtin_tgmath): Document when complex
13146 integer types are treated as _Complex _Float64.
13148 2018-03-21 Tom de Vries <tom@codesourcery.com>
13150 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13152 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13154 PR tree-optimization/84960
13155 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13156 if it is ENTRY block, move them into single succ of ENTRY in that case.
13158 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
13160 PR tree-optimization/84811
13161 * poly-int.h (poly_span_traits): Remove the T3 parameter and
13162 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13163 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13164 (known_subrange_p): Update accordingly. Cast each value involved
13165 in the size comparison, rather than casting the result of the
13168 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13170 PR tree-optimization/84982
13171 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13172 by flipping the least significant bit rather than all bits from
13173 bitpos to bitpos + bitsize - 1.
13175 2018-03-21 Nathan Sidwell <nathan@acm.org>
13177 * doc/extend.texi (Deprecated Features): Remove mention of
13178 long-deleted deprecations.
13180 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13183 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13184 * configure: Regenerate.
13186 2018-03-21 Tom de Vries <tom@codesourcery.com>
13188 PR tree-optimization/83126
13189 * tree-parloops.c (num_phis): New function.
13190 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13192 2018-03-21 Nathan Sidwell <nathan@acm.org>
13194 * doc/extend.texi (Deprecated Features): Update deprecated flags,
13195 mention anon-struct/union members and trailing attributes.
13197 2018-03-21 Bin Cheng <bin.cheng@arm.com>
13199 PR tree-optimization/84969
13200 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13201 builtin memset partitions if they set different rhs values.
13203 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13205 PR rtl-optimization/84989
13206 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13207 VEC_DUPLICATE with scalar result mode.
13209 2018-03-21 Martin Liska <mliska@suse.cz>
13212 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13213 not intended return statement.
13215 2018-03-21 Martin Liska <mliska@suse.cz>
13218 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13219 (chkp_find_bound_slots_1): Limit number of iterations.
13221 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
13224 * Minor grammar fixes for x86 options.
13226 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13229 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13230 holding REG_CFA_RESTORE notes, instead turn them into a USE.
13232 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
13235 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13236 (altivec_lvx_<mode>_1op): Likewise.
13237 (altivec_stvx_<mode>_2op): Likewise.
13238 (altivec_stvx_<mode>_1op): Likewise.
13239 (altivec_lvx_<VM2:mode>): New define_expand.
13240 (altivec_stvx_<VM2:mode>): Likewise.
13241 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13242 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13243 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13244 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13245 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13246 (rs6000_gen_lvx): Likewise.
13247 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13248 (altivec_expand_stv_builtin): Likewise.
13249 (altivec_expand_builtin): Likewise.
13250 * config/rs6000/vector.md: Likewise.
13252 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13255 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13258 2018-03-20 Richard Biener <rguenther@suse.de>
13261 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13262 sign-conversions as zero, fall back to standard scalar_stmt
13265 2018-03-20 Martin Liska <mliska@suse.cz>
13268 * predict.c (rebuild_frequencies): Handle case when we have
13269 PROFILE_ABSENT, but flag_guess_branch_prob is false.
13271 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13274 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13275 flag_section_anchors.
13276 * varasm.c (use_blocks_for_decl_p): Remove hack for
13277 dw2_force_const_mem.
13280 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13282 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
13283 be created, use lowpart_subreg of operands[0] rather than operands[0]
13285 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13286 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13287 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13288 and n constraint instead of aarch64_shift_imm_di and Usd.
13289 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13290 (*aarch64_<optab>_reg_minus<mode>3): ... this.
13292 2018-03-20 Sudakshina Das <sudi.das@arm.com>
13295 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13296 to favor GPR over NEON registers.
13297 (<shift>di3_neon): Likewise.
13299 2018-03-20 Tom de Vries <tom@codesourcery.com>
13302 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13303 (nvptx_process_pars): Emit bar.sync asap and alap.
13305 2018-03-20 Tom de Vries <tom@codesourcery.com>
13308 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13309 seen_label if seen_label is already set.
13311 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13314 * config/i386/i386.c (fold_builtin_cpu): For features above 31
13315 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13316 Use 1U instead of 1. Formatting fixes.
13319 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13320 instead of TREE_TYPE (s1) for the return value.
13322 2018-03-19 Jakub Jelinek <jakub@redhat.com>
13324 PR tree-optimization/84946
13325 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13326 bitsize + bitsize in poly_uint64 rather than poly_int64.
13329 * dwarf2asm.c: Include fold-const.c.
13330 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13331 of decl rather than decl itself.
13333 PR rtl-optimization/84643
13334 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13336 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
13339 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13340 calling assemble_variable.
13342 2018-03-19 Sudakshina Das <sudi.das@arm.com>
13345 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13346 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13348 2018-03-19 Jim Wilson <jimw@sifive.com>
13351 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13352 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13353 (riscv_first_stack_step): Likewise.
13354 (riscv_option_override): Use STACK_BOUNDARY instead of
13355 MIN_STACK_BOUNDARY.
13356 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13357 MIN_STACK_BOUNDARY.
13358 (BIGGEST_ALIGNMENT): Set to 128.
13359 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13360 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13363 2018-03-19 Richard Biener <rguenther@suse.de>
13365 PR tree-optimization/84933
13366 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13367 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13369 2018-03-19 Richard Biener <rguenther@suse.de>
13371 PR tree-optimization/84859
13372 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13373 (cond_if_else_store_replacement): Perform sinking operation on
13374 single-store BBs regardless of MAX_STORES_TO_SINK setting.
13375 Generalize what a BB with a single eligible store is.
13377 2018-03-19 Richard Biener <rguenther@suse.de>
13379 PR tree-optimization/84929
13380 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13381 chrec_is_positive against non-chrec arg.
13383 2018-03-19 Tamar Christina <tamar.christina@arm.com>
13386 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13388 2018-03-18 Martin Liska <mliska@suse.cz>
13390 PR rtl-optimization/84635
13391 * regrename.c (build_def_use): Use matches_mode only when
13394 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
13396 PR tree-optimization/84913
13397 * tree-vect-loop.c (vectorizable_reduction): Don't try to
13398 vectorize chains of COND_EXPRs.
13400 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13402 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13404 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13406 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13408 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13410 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13412 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13413 Kito Cheng <kito.cheng@gmail.com>
13415 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13416 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13417 (nds32_adjust_reg_alloc_order): New function.
13418 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13420 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
13422 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13423 nds32_print_operand, nds32_print_operand_address): Use
13424 HOST_WIDE_INT_PRINT_DEC instead.
13426 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13428 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13430 2018-03-17 Jakub Jelinek <jakub@redhat.com>
13433 * config/i386/i386.c (initial_ix86_tune_features,
13434 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13435 unsigned long long.
13436 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13437 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13438 rather than 1u << ix86_tune. Formatting fix.
13439 (ix86_option_override_internal): Change ix86_arch_mask from
13440 unsigned int to unsigned HOST_WIDE_INT, initialize to
13441 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13442 (ix86_function_specific_restore): Likewise.
13444 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13447 * postreload.c (reload_combine_recognize_pattern): Perform
13448 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13449 truncate_int_for_mode the result for the destination's mode.
13452 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13453 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13455 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13458 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13461 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13462 regno_allocno_class_array and sorted_pseudos.
13463 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13464 insns where regno is used.
13466 2018-03-16 Martin Liska <mliska@suse.cz>
13469 * multiple_target.c (create_dispatcher_calls): Redirect
13470 reference in the symbol table.
13472 2018-03-16 Martin Liska <mliska@suse.cz>
13475 * multiple_target.c (create_dispatcher_calls): Redirect also
13478 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13482 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13483 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13484 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13486 2018-03-16 Julia Koval <julia.koval@intel.com>
13488 * doc/invoke.texi (Skylake Server): Add CLWB.
13489 Cannonlake): Remove CLWB.
13491 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13493 PR tree-optimization/84841
13494 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13496 (FLOAT_ONE_CONST_TYPE): Define.
13497 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13498 (sort_by_operand_rank): Put entries with higher constant_type last
13499 rather than first to match comments.
13501 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13503 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13506 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13509 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13510 check and use address of target always.
13512 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13515 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13516 (indirect_thunk_bnd_needed): Likewise.
13517 (indirect_thunks_used): Likewise.
13518 (indirect_thunks_bnd_used): Likewise.
13519 (indirect_return_needed): New.
13520 (indirect_return_bnd_needed): Likewise.
13521 (output_indirect_thunk_function): Add a bool argument for
13523 (output_indirect_thunk_function): Don't generate alias for
13524 function return thunk.
13525 (ix86_code_end): Call output_indirect_thunk_function to generate
13526 function return thunks.
13527 (ix86_output_function_return): Set indirect_return_bnd_needed
13528 and indirect_return_needed instead of indirect_thunk_bnd_needed
13529 and indirect_thunk_needed.
13531 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13533 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13534 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13535 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13537 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13538 Paul Hua <paul.hua.gm@gmail.com>
13541 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13543 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13545 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13546 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13547 resp. SFmode cases.
13549 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13552 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13553 instead of GET_MODE_SIZE when comparing Units.
13555 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13558 * varasm.c (hash_section): Return an unchangeble hash value
13559 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13560 Return !aarch64_can_use_per_function_literal_pools_p ().
13562 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13565 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13566 rather than address of cmode as last argument to prepare_cmp_insn.
13568 2018-03-15 Julia Koval <julia.koval@intel.com>
13570 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13571 F_AVX512VNNI, F_AVX512BITALG): New.
13573 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13576 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13577 insn for floating-point loads and stores.
13579 2018-03-14 Carl Love <cel@us.ibm.com>
13581 * config/rs6000/rs6000-c.c: Add macro definitions for
13582 ALTIVEC_BUILTIN_VEC_PERMXOR.
13583 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13584 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13585 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13586 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13588 * config/doc/extend.texi: Add prototypes for vec_permxor.
13590 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13593 * diagnostic-show-locus.c (class layout_point): Convert m_line
13594 from int to linenum_type.
13595 (line_span::comparator): Use linenum "compare" function when
13596 comparing line numbers.
13597 (test_line_span): New function.
13598 (layout_range::contains_point): Convert param "row" from int to
13600 (layout_range::intersects_line_p): Likewise.
13601 (layout::will_show_line_p): Likewise.
13602 (layout::print_source_line): Likewise.
13603 (layout::should_print_annotation_line_p): Likewise.
13604 (layout::print_annotation_line): Likewise.
13605 (layout::print_leading_fixits): Likewise.
13606 (layout::annotation_line_showed_range_p): Likewise.
13607 (struct line_corrections): Likewise for field m_row.
13608 (line_corrections::line_corrections): Likewise for param "row".
13609 (layout::print_trailing_fixits): Likewise.
13610 (layout::get_state_at_point): Likewise.
13611 (layout::get_x_bound_for_row): Likewise.
13612 (layout::print_line): Likewise.
13613 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13614 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13615 * input.c (selftest::test_linenum_comparisons): New function.
13616 (selftest::input_c_tests): Call it.
13617 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13618 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13619 * selftest.h (ASSERT_GT): New macro.
13620 (ASSERT_GT_AT): New macro.
13621 (ASSERT_LT): New macro.
13622 (ASSERT_LT_AT): New macro.
13624 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13626 PR rtl-optimization/84780
13627 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13629 2018-03-14 Martin Liska <mliska@suse.cz>
13631 * tree.c (record_node_allocation_statistics): Use
13632 get_stats_node_kind.
13633 (get_stats_node_kind): New function extracted from
13634 record_node_allocation_statistics.
13635 (free_node): Use get_stats_node_kind.
13637 2018-03-14 Richard Biener <rguenther@suse.de>
13639 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13640 that the value-set of ANTIC_IN doesn't grow.
13643 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13645 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13646 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13648 2018-03-14 Julia Koval <julia.koval@intel.com>
13650 * config.gcc (icelake-client, icelake-server): New.
13652 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13653 (initial_ix86_arch_features): Ditto.
13654 (PTA_SKYLAKE): Add SGX.
13655 (PTA_ICELAKE): Remove.
13656 (PTA_ICELAKE_CLIENT): New.
13657 (PTA_ICELAKE_SERVER): New.
13658 (ix86_option_override_internal): Split up icelake on icelake client and
13660 (get_builtin_code_for_version): Ditto.
13661 (fold_builtin_cpu): Ditto.
13662 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13663 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13664 * config/i386/i386.h (processor_type): Ditto.
13665 * doc/invoke.texi: Ditto.
13667 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13670 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13671 INTEGER_CST offset, add it together with bitpos / 8 and
13672 sign extend based on POINTER_SIZE.
13676 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13679 * config/i386/constraints.md (Yc): New register constraint.
13680 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13681 Use Yc constraint for alternative 2 of operand 0. Remove
13682 preferred_for_speed attribute.
13684 2018-03-14 Richard Biener <rguenther@suse.de>
13686 PR tree-optimization/84830
13687 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13688 with the old one to avoid oscillations.
13690 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13693 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13695 (assign_by_spills): Return a flag of reload assignment failure.
13696 Do not process the reload assignment failures. Do not spill other
13697 reload pseudos if they has the same reg class. Update n if
13699 (lra_assign): Add a return arg. Set up from the result of
13700 assign_by_spills call.
13701 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13702 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13703 usage_insns if it is not NULL.
13704 (spill_hard_reg_in_range): New function.
13705 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13706 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13707 function prototypes.
13708 (lra_assign): Change prototype.
13709 * lra.c (lra): Add code to deal with fails by splitting hard reg
13712 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13714 * config/riscv/riscv.opt (mrelax): New option.
13715 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13716 "norelax" when riscv_mrelax is disabled.
13717 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13719 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13722 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13723 reassociation for int modes.
13725 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13727 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13728 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13730 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13731 * config/aarch64/aarch64-sve.md
13732 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13733 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13734 (*extend<mode><Vwide>2): Rename to...
13735 (aarch64_sve_extend<mode><Vwide>2): ...this.
13736 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13737 renaming the old pattern to...
13738 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13740 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13741 define_expand, renaming the old pattern to...
13742 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13743 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13744 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13745 account when deciding which SVE instruction the optab should use.
13746 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13748 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13750 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13751 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13752 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13753 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13754 (tlsdesc_small_<mode>): Turn a define_expand and use
13755 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13756 (tlsdesc_small_advsimd_<mode>): ...this.
13757 (tlsdesc_small_sve_<mode>): New pattern.
13759 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13761 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13762 (UNSPEC_UMUL_HIGHPART): New constants.
13763 (MUL_HIGHPART): New int iteraor.
13764 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13765 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13767 (*<su>mul<mode>3_highpart): New define_insn.
13769 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13772 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13775 2018-03-13 Martin Liska <mliska@suse.cz>
13778 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13780 (sem_item_optimizer::~sem_item_optimizer): Release it.
13781 (sem_item_optimizer::merge_classes): Register variable aliases.
13782 (sem_item_optimizer::fixup_pt_set): New function.
13783 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13784 * ipa-icf.h: Declare new variables and functions.
13786 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13788 PR middle-end/84834
13789 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13790 integer_pow2p@2 and test integer_pow2p in condition.
13791 (A < 0 ? C : 0): Similarly for @1.
13793 PR middle-end/84831
13794 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13795 characters starting at p contain '\0' character, don't look beyond
13799 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13800 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13803 * reg-stack.c (change_stack): Change update_end var from int to
13804 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13805 also call set_block_for_insn on the newly added insns and rescan.
13808 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13809 on the last operand.
13812 * tree.c (stabilize_reference_1): Return save_expr (e) for
13813 STATEMENT_LIST even if it doesn't have side-effects.
13815 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13817 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13819 2018-03-12 Renlin Li <renlin.li@arm.com>
13821 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13822 aarch64_output_scalar_simd_mov_immediate.
13824 2018-03-12 Martin Sebor <msebor@redhat.com>
13826 PR tree-optimization/83456
13827 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13828 for perfectly overlapping calls to memcpy.
13829 (gimple_fold_builtin_memory_chk): Same.
13830 (gimple_fold_builtin_strcpy): Handle no-warning.
13831 (gimple_fold_builtin_stxcpy_chk): Same.
13832 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13834 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13836 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13837 parameter. Use it for SFmode.
13838 (rs6000_function_arg_advance_1): Adjust.
13839 (rs6000_function_arg): Adjust.
13840 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13842 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13844 PR rtl-optimization/84169
13845 PR rtl-optimization/84780
13846 * combine.c (can_combine_p): Check for a 2-insn combination whether
13847 the destination register is used between the two insns, too.
13849 2018-03-12 Richard Biener <rguenther@suse.de>
13851 PR tree-optimization/84803
13852 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13853 for refs DR analysis didn't process.
13855 2018-03-12 Richard Biener <rguenther@suse.de>
13857 PR tree-optimization/84777
13858 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13859 force-vectorize loops ignore whether we are optimizing for size.
13861 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13863 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13864 (TARGET_MD_ASM_ADJUST): Define.
13866 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13867 Kito Cheng <kito.cheng@gmail.com>
13868 Chung-Ju Wu <jasonwucj@gmail.com>
13870 * config/nds32/nds32.c (nds32_compute_stack_frame,
13871 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13872 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13873 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13874 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13875 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13876 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13877 * config/nds32/nds32.md (prologue, epilogue): Use macro
13878 NDS32_V3PUSH_AVAILABLE_P to do checking.
13880 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13883 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13884 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13885 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13886 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13887 addition of most attributes on !orig_type_die or the attribute not
13888 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13890 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13891 Chung-Ju Wu <jasonwucj@gmail.com>
13893 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13894 __NDS32_VH__ macro.
13895 * config/nds32/nds32.opt (mvh): New option.
13897 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13898 Chung-Ju Wu <jasonwucj@gmail.com>
13900 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13902 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13903 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13906 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13907 Chung-Ju Wu <jasonwucj@gmail.com>
13909 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13911 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13912 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13914 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13915 Kito Cheng <kito.cheng@gmail.com>
13916 Chung-Ju Wu <jasonwucj@gmail.com>
13918 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13919 UNSPEC_FFMISM and UNSPEC_FLMISM.
13920 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13921 for ffb, ffmism and flmism.
13922 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13923 (unspec_ffmism): Ditto.
13924 (unspec_flmism): Ditto.
13925 (nds32_expand_builtin_impl): Check if string extension is available.
13926 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13927 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13929 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13932 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13935 * lra-assigns.c (assign_by_spills): Return a flag of reload
13936 assignment failure. Do not process the reload assignment
13937 failures. Do not spill other reload pseudos if they has the same
13939 (lra_assign): Add a return arg. Set up from the result of
13940 assign_by_spills call.
13941 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13942 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13943 usage_insns if it is not NULL.
13944 (spill_hard_reg_in_range): New function.
13945 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13946 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13947 function prototypes.
13948 (lra_assign): Change prototype.
13949 * lra.c (lra): Add code to deal with fails by splitting hard reg
13952 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13955 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13957 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13960 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13961 (dw_val_node): Add val_symbolic_view.
13962 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13963 (symview_upper_bound): New.
13964 (new_line_info_table): Initialize symviews_since_reset.
13965 (dwarf2out_source_line): Count symviews_since_reset and set
13966 symview_upper_bound.
13967 (dw_val_equal_p): Handle symview.
13968 (add_AT_symview): New.
13969 (print_dw_val): Handle symview.
13970 (attr_checksum, attr_checksum_ordered): Likewise.
13971 (same_dw_val_p, size_of_die): Likewise.
13972 (value_format, output_die): Likewise.
13973 (add_high_low_attributes): Use add_AT_symview for entry_view.
13974 (dwarf2out_finish): Reset symview_upper_bound, clear
13977 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13980 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13981 Add strict argument and use it.
13982 (rs6000_split_multireg_move): Update for new strict argument.
13983 (mem_operand_gpr): Disallow all non-offsettable addresses.
13984 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13986 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13989 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13990 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13991 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13994 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13995 decl, use remap_type if we want to use the type.
13997 2018-03-09 Martin Sebor <msebor@redhat.com>
13999 PR tree-optimization/84526
14000 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14002 (builtin_access::generic_overlap): Be prepared to handle non-array
14005 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
14007 PR rtl-optimization/84682
14008 * lra-constraints.c (process_address_1): Check is_address flag
14009 for address constraints.
14010 (process_alt_operands): Likewise.
14011 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14012 preprocess_constraints.
14013 * recog.h (preprocess_constraints): Add oploc parameter.
14015 * recog.c (preprocess_constraints): Test address_operand for
14016 CT_ADDRESS constraints.
14018 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
14021 * lra-assigns.c (assign_by_spills): Return a flag of reload
14022 assignment failure. Do not process the reload assignment
14023 failures. Do not spill other reload pseudos if they has the same
14025 (lra_assign): Add a return arg. Set up from the result of
14026 assign_by_spills call.
14027 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14028 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14029 usage_insns if it is not NULL.
14030 (spill_hard_reg_in_range): New function.
14031 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14032 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14033 function prototypes.
14034 (lra_assign): Change prototype.
14035 * lra.c (lra): Add code to deal with fails by splitting hard reg
14038 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14041 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14042 Accept complain bool parameter. Only emit errors if it is true.
14043 (arm_parse_cpu_option_name): Likewise.
14044 (arm_target_thumb_only): Adjust callers of the above.
14045 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14046 prototype to take a default true bool parameter.
14047 (arm_parse_arch_option_name): Likewise.
14049 2018-03-09 David Malcolm <dmalcolm@redhat.com>
14050 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14054 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14055 * configure: Regenerate.
14056 * configure.ac ("linker --version-script option"): New.
14057 ("linker soname option"): New.
14059 2018-03-09 Richard Biener <rguenther@suse.de>
14061 PR tree-optimization/84775
14062 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14063 immediate uses of predicate stmts and mark them modified.
14066 PR tree-optimization/84178
14067 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14069 (version_loop_for_if_conversion): Delay update_ssa call.
14070 (tree_if_conversion): Delay update_ssa until after predicate
14073 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
14076 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14077 when the function accesses prior frames.
14079 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14082 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14083 gen_llsym, otherwise call maybe_gen_llsym.
14085 PR inline-asm/84742
14086 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14087 has ',' character inside of it.
14089 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14092 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14093 as clobbering CC_REGNUM.
14095 2018-03-08 Richard Biener <rguenther@suse.de>
14097 PR middle-end/84552
14098 * tree-scalar-evolution.c: Include tree-into-ssa.h.
14099 (follow_copies_to_constant): Do not follow SSA names registered
14102 2018-03-08 Richard Biener <rguenther@suse.de>
14104 PR tree-optimization/84178
14105 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14107 (version_loop_for_if_conversion): Delay update_ssa call.
14108 (tree_if_conversion): Delay update_ssa until after predicate
14111 2018-03-08 David Malcolm <dmalcolm@redhat.com>
14113 PR tree-optimization/84178
14114 * tree-if-conv.c (release_bb_predicate): Remove the
14115 the assertion that the stmts have NULL use_ops.
14116 Discard the statements, asserting that they haven't
14117 yet been added to a BB.
14119 2018-03-08 Richard Biener <rguenther@suse.de>
14121 PR tree-optimization/84746
14122 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14123 (phi_translate): Pass in destination ANTIC_OUT set.
14124 (phi_translate_1): Likewise. For a simplified result lookup
14125 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14126 (phi_translate_set): Adjust.
14127 (do_pre_regular_insertion): Likewise.
14128 (do_pre_partial_partial_insertion): Likewise.
14130 2018-03-08 Martin Liska <mliska@suse.cz>
14132 PR gcov-profile/84735
14133 * doc/gcov.texi: Document usage of profile files.
14134 * gcov-io.h: Document changes in the format.
14136 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
14140 * dwarf2out.c (struct dw_line_info_table): Update comments for
14142 (FORCE_RESET_NEXT_VIEW): New.
14143 (FORCE_RESETTING_VIEW_P): New.
14144 (RESETTING_VIEW_P): Check for -1 too.
14145 (ZERO_VIEW_P): Likewise.
14146 (new_line_info_table): Force-reset next view.
14147 (dwarf2out_begin_function): Likewise.
14148 (dwarf2out_source_line): Simplify zero_view_p initialization.
14149 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14150 view directly. Omit view when omitting .loc at line 0.
14152 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14154 PR tree-optimization/84740
14155 * tree-switch-conversion.c (process_switch): Call build_constructors
14156 only if info.phi_count is non-zero.
14158 PR tree-optimization/84739
14159 * tree-tailcall.c (find_tail_calls): Check call arguments against
14160 DECL_ARGUMENTS (current_function_decl) rather than
14161 DECL_ARGUMENTS (func) when checking for tail recursion.
14163 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14165 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14166 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14167 Volker Reichelt's entry and add entries for people that perform
14168 GCC fuzzy testing and report numerous bugs.
14170 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
14173 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14174 readonly data in sdata, if that is disabled.
14175 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14176 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14177 -mreadonly-in-sdata option.
14179 2018-03-07 Martin Sebor <msebor@redhat.com>
14181 PR tree-optimization/84468
14182 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14183 basic block when looking for nul assignment.
14185 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
14188 * except.h (output_function_exception_table): Adjust prototype.
14189 * except.c (output_function_exception_table): Remove FNNAME parameter
14190 and add SECTION parameter. Ouput one part of the table at a time.
14191 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14192 the first part of the exception table and emit unwind directives.
14193 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14194 (i386_pe_seh_cold_init): Likewise.
14195 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14196 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14197 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14198 (ix86_output_call_insn): Emit a nop in one more case for SEH.
14199 * config/i386/winnt.c: Include except.h.
14200 (struct seh_frame_state): Add reg_offset, after_prologue and
14201 in_cold_section fields.
14202 (i386_pe_seh_end_prologue): Set seh->after_prologue.
14203 (i386_pe_seh_cold_init): New function.
14204 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14205 to seh->in_cold_section.
14206 (seh_emit_push): Record the offset of the push.
14207 (seh_emit_save): Record the offet of the save.
14208 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14209 Test seh->after_prologue to disregard the epilogue.
14210 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14211 (i386_pe_end_cold_function): New function.
14213 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14216 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14217 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14220 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14222 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14223 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14225 PR middle-end/84723
14226 * multiple_target.c: Include tree-inline.h and intl.h.
14227 (expand_target_clones): Diagnose and fail if node->definition and
14228 !tree_versionable_function_p (node->decl).
14230 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
14232 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14234 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14235 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14236 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14238 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14241 * combine.c (try_combine): Use reg_or_subregno instead of handling
14242 just paradoxical SUBREGs and REGs.
14244 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
14246 * config/arc/arc.c (arc_finalize_pic): Remove function.
14247 (arc_must_save_register): We use single base PIC register, remove
14248 checks to save/restore the PIC register.
14249 (arc_expand_prologue): Likewise.
14250 * config/arc/arc-protos.h (arc_set_default_type_attributes):
14252 (arc_verify_short): Likewise.
14253 (arc_attr_type): Likewise.
14254 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14255 (walk_stores): Likewise.
14256 (arc_address_cost): Make it static.
14257 (arc_verify_short): Likewise.
14258 (branch_dest): Likewise.
14259 (arc_attr_type): Likewise.
14260 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14261 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14262 (arc_final_prescan_insn): Remove inserting the nops due to
14263 hardware hazards. It is done in reorg step.
14264 (insn_length_variant_t): Remove.
14265 (insn_length_parameters_t): Likewise.
14266 (arc_insn_length_parameters): Likewise.
14267 (arc_get_insn_variants): Likewise.
14268 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14270 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14272 PR inline-asm/84683
14273 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14276 PR tree-optimization/84687
14277 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14279 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14281 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14283 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14284 Rename to ppc_speculation_barrier.
14285 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14286 __builtin_ppc_speculation_barrier.
14288 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14291 * combine.c (combine_simplify_rtx): Don't try to simplify if
14292 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14295 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
14297 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14298 to 32 bytes when compiling for POWER9.
14300 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14303 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14304 regparm >= 3 with no arg reg available also for calls with
14305 flag_force_indirect_call. Pass decl to ix86_function_regparm.
14308 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14310 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
14312 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
14315 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14317 2018-03-05 Richard Biener <rguenther@suse.de>
14319 PR tree-optimization/84486
14320 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14321 When inserting a __builtin_assume_aligned call set the LHS
14322 SSA name alignment info accordingly.
14324 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
14326 PR tree-optimization/84114
14327 * config/aarch64/aarch64.c (aarch64_reassociation_width)
14328 Avoid reassociation of FLOAT_MODE addition.
14330 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
14332 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14333 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14334 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14335 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14336 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14337 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14338 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14340 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14341 __builtin_ia32_wbinvd): New builtins.
14342 (SPECIAL_ARGS2): New.
14343 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14344 (SPECIAL_ARGS2): New.
14345 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14346 (ix86_valid_target_attribute_inner_p): Ditto.
14347 (ix86_init_mmx_sse_builtins): Add special_args2.
14348 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14349 TARGET_WBNOINVD_P): New.
14350 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14351 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14352 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14353 * config/i386/immintrin.h (_wbinvd): New intrinsic.
14354 * config/i386/pconfigintrin.h: New file.
14355 * config/i386/wbnoinvdintrin.h: Ditto.
14356 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14358 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14360 2018-03-05 Richard Biener <rguenther@suse.de>
14362 PR tree-optimization/84670
14363 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14365 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14366 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14367 (compute_antic_aux): Only assert the number of values in ANTIC_IN
14368 doesn't grow if all successors (recursively) were visited at least
14371 2018-03-05 Richard Biener <rguenther@suse.de>
14373 PR tree-optimization/84650
14374 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14375 if executed in the loop pipeline.
14377 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
14379 * doc/configfiles.texi (Configuration Files): Move info about
14380 conditionalizing $target-protos.h to...
14381 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
14382 differs from $target-protos.h.
14384 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
14385 Chung-Ju Wu <jasonwucj@gmail.com>
14387 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14388 * config/nds32/nds32-multiple.md (setmemsi): Define.
14389 * config/nds32/nds32-memory-manipulation.c
14390 (nds32_gen_dup_4_byte_to_word_value): New.
14391 (emit_setmem_word_loop): New.
14392 (emit_setmem_byte_loop): New.
14393 (nds32_expand_setmem_loop): New.
14394 (nds32_expand_setmem_loop_v3m): New.
14395 (nds32_expand_setmem_unroll): New.
14396 (nds32_expand_setmem): New.
14398 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14399 Chung-Ju Wu <jasonwucj@gmail.com>
14401 * config/nds32/nds32-memory-manipulation.c
14402 (nds32_emit_load_store): New.
14403 (nds32_emit_post_inc_load_store): New.
14404 (nds32_emit_mem_move): New.
14405 (nds32_emit_mem_move_block): New.
14406 (nds32_expand_movmemsi_loop_unknown_size): New.
14407 (nds32_expand_movmemsi_loop_known_size): New.
14408 (nds32_expand_movmemsi_loop): New.
14409 (nds32_expand_movmemsi_unroll): New.
14410 (nds32_expand_movmemqi): Rename ...
14411 (nds32_expand_movmemsi): ... to this.
14412 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14413 (movmemsi): ... to this.
14414 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14415 (nds32_expand_movmemsi): ... to this.
14417 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14418 Monk Chiang <sh.chiang04@gmail.com>
14419 Chung-Ju Wu <jasonwucj@gmail.com>
14421 * config/nds32/nds32-protos.h
14422 (nds32_expand_load_multiple): New arguments.
14423 (nds32_expand_store_multiple): Ditto.
14424 (nds32_valid_multiple_load_store): Rename ...
14425 (nds32_valid_multiple_load_store_p): ... to this.
14426 * config/nds32/nds32-memory-manipulation.c
14427 (nds32_expand_load_multiple): Refine implementation.
14428 (nds32_expand_store_multiple): Ditto.
14429 * config/nds32/nds32-multiple.md
14430 (load_multiple): Update nds32_expand_load_multiple interface.
14431 (store_multiple): Update nds32_expand_store_multiple interface.
14432 * config/nds32/nds32-predicates.c
14433 (nds32_valid_multiple_load_store): Rename ...
14434 (nds32_valid_multiple_load_store_p): ... to this and refine
14436 * config/nds32/predicates.md
14437 (nds32_load_multiple_and_update_address_operation): New predicate.
14438 (nds32_store_multiple_and_update_address_operation): New predicate.
14440 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14441 Chung-Ju Wu <jasonwucj@gmail.com>
14443 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14444 (combo): New attribute.
14445 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14447 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14449 * config/nds32/nds32.opt: Change -mcmodel= default value.
14451 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14452 Monk Chiang <sh.chiang04@gmail.com>
14453 Chung-Ju Wu <jasonwucj@gmail.com>
14455 * config/nds32/constants.md (unspec_element): New enum.
14456 * config/nds32/constraints.md (Umw): New constraint.
14457 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14458 * config/nds32/nds32-intrinsic.md: Likewise.
14459 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14460 (nds32_valid_smw_lwm_base_p): New.
14461 (nds32_output_smw_single_word): New.
14462 (nds32_output_lmw_single_word): New.
14463 (nds32_expand_unaligned_load): New.
14464 (nds32_expand_unaligned_store): New.
14465 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14466 (nds32_output_smw_single_word): Declare.
14467 (nds32_output_lmw_single_word): Declare.
14468 (nds32_expand_unaligned_load): Declare.
14469 (nds32_expand_unaligned_store): Declare.
14470 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14471 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14472 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14473 NDS32_BUILTIN_UASTORE_DW.
14474 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14477 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14478 Kito Cheng <kito.cheng@gmail.com>
14479 Chung-Ju Wu <jasonwucj@gmail.com>
14481 * config/nds32/nds32-intrinsic.c
14482 (nds32_expand_builtin_null_ftype_reg): Delete.
14483 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14484 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14485 (nds32_read_argument): New.
14486 (nds32_legitimize_target): Ditto.
14487 (nds32_legitimize_argument): Ditto.
14488 (nds32_check_constant_argument): Ditto.
14489 (nds32_expand_unop_builtin): Ditto.
14490 (nds32_expand_unopimm_builtin): Ditto.
14491 (nds32_expand_binop_builtin): Ditto.
14492 (nds32_builtin_decl_impl): Ditto.
14493 (builtin_description): Ditto.
14494 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14495 (nds32_init_builtins_impl): Ditto.
14496 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14497 (nds32_builtin_decl): New.
14498 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14499 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14501 2018-03-02 Jeff Law <law@redhat.com>
14503 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14504 (redundant_insn, fill_simple_delay_slots): Likewise.
14505 (fill_slots_from_thread): Likewise.
14506 * resource.c (mark_referenced_resources): Likewise.
14507 (mark_set_resources, find_dead_or_set_registers): Likewise.
14509 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14511 * substring-locations.h (format_warning_va): Formatting fix for
14512 ATTRIBUTE_GCC_DIAG.
14513 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14515 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14516 * substring-locations.c: Include intl.h.
14517 (format_warning_va): Turned into small wrapper around
14518 format_warning_n_va, renamed to ...
14519 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14520 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14522 (format_warning_at_substring_n): New function.
14523 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14524 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14525 format_warning_at_substring with just a shorter name instead of
14526 const function pointer.
14527 (fmtwarn_n): New function.
14528 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14529 appropriate, get rid of all the fmtstr temporaries, move conditionals
14530 with G_() wrapped string literals directly into fmtwarn arguments,
14531 cast dir.len to (int), formatting fixes.
14533 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14535 * doc/invoke.texi: Remove "Cilk Plus" references.
14537 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14538 Richard Biener <rguenther@suse.de>
14541 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14542 for error or warning attributes if CALL_FROM_THUNK_P is set.
14545 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14548 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14549 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14552 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14553 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14555 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14556 instead of -1U in last predictors element's probability member.
14558 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14561 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14562 arguments if they are comparable.
14564 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14566 PR tree-optimization/84634
14567 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14568 masks and masked_loop_p with a single loop_masks, making sure it's
14569 null for bb vectorization.
14571 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14573 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14574 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14575 loop->force_vectorize to check whether there is no alias.
14577 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14580 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14582 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14584 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14585 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14586 instead of a loop around prev_real_insn.
14587 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14590 PR inline-asm/84625
14591 * config/i386/i386.c (ix86_print_operand): Use conditional
14592 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14595 2018-03-02 Richard Biener <rguenther@suse.de>
14597 PR tree-optimization/84427
14598 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14599 (bitmap_set_subtract_values): Rewrite to handle multiple
14602 (prune_clobbered_mems): Likewise.
14603 (phi_translate): Take edge instead of pred/phiblock.
14604 (phi_translate_1): Likewise.
14605 (phi_translate_set): Likewise. Insert all translated
14606 exprs for a value into the set, keeping possibly multiple
14607 expressions per value.
14608 (compute_antic_aux): Adjust for phi_translate changes.
14609 When intersecting union the expressions and prune those
14610 not in the final value set, keeping possibly multiple
14611 expressions per value. Do not use value-insertion
14612 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14613 all expressions. Add verification that the value-sets
14614 only shrink during iteration.
14615 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14616 (do_pre_regular_insertion): Likewise.
14617 (do_pre_partial_partial_insertion): Likewise.
14619 2018-03-02 Richard Biener <rguenther@suse.de>
14622 * config/darwin.c (saved_debug_info_level): New static global.
14623 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14624 (darwin_asm_lto_end): Restore debug info generation settings.
14626 2018-03-01 Martin Liska <mliska@suse.cz>
14629 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14630 volatile arguments.
14632 2018-03-01 Richard Biener <rguenther@suse.de>
14635 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14636 type annotation with LTO when debug was disabled at compile-time.
14638 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14640 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14642 (mips_final_postscan_insn): Likewise.
14644 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14646 PR rtl-optimization/84528
14647 * alias.c (init_alias_target): Add commentary.
14648 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14649 a unique base value if the frame pointer is not eliminated
14650 to the stack pointer.
14652 2018-03-01 Tom de Vries <tom@codesourcery.com>
14654 PR rtl-optimization/83327
14655 * lra-int.h (hard_regs_spilled_into): Declare.
14656 * lra.c (hard_regs_spilled_into): Define.
14657 (init_reg_info): Init hard_regs_spilled_into.
14658 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14659 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14660 (process_bb_lives): Handle hard_regs_spilled_into.
14661 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14662 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14664 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14666 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14667 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14668 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14669 * config/rs6000/aix72.h: New file.
14671 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14673 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14674 instead of warning_at with conditional singular and plural messages
14678 * stor-layout.c (update_alignment_for_field): For
14679 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14680 && !DECL_PACKED (field), do the alignment update, just use
14681 only desired_align instead of MAX (type_align, desired_align)
14683 (place_field): Don't do known_align < desired_align handling
14684 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14685 is non-NULL, instead do it after rli->prev_field handling and
14686 only if not within a bitfield word. For DECL_PACKED (field)
14687 use type_align of BITS_PER_UNIT.
14689 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14691 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14692 superfluous parentheses and trailing spaces.
14694 2018-02-28 Richard Biener <rguenther@suse.de>
14696 PR tree-optimization/84584
14697 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14698 SCoPs with fake exit edge.
14700 2018-02-28 Martin Liska <mliska@suse.cz>
14703 * timevar.c (timer::print): Fix format to properly print 100%
14706 2018-02-28 Richard Biener <rguenther@suse.de>
14708 PR middle-end/84607
14709 * genmatch.c (capture_info::walk_match): Do not mark
14710 captured expressions without operands as expr_p given
14711 they act more like predicates and should be subject to
14712 "lost tail" side-effect preserving.
14714 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14716 PR rtl-optimization/81611
14717 * auto-inc-dec.c (attempt_change): Move dead note from
14718 mem_insn if it's the next use of regno
14719 (find_address): Take address use of reg holding
14720 non-incremented value. Add parm to limit search to the named
14722 (merge_in_block): Attempt to use a mem insn that is the next
14723 use of the original regno.
14725 2018-02-27 Martin Sebor <msebor@redhat.com>
14728 * doc/invoke.texi (-Wmissing-attributes): New option.
14729 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14731 2018-02-27 Martin Sebor <msebor@redhat.com>
14733 PR translation/84207
14734 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14735 n argument to unsigned HOST_WIDE_INT.
14736 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14737 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14738 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14739 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14741 2018-02-27 Richard Biener <rguenther@suse.de>
14743 PR tree-optimization/84512
14744 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14745 Do not use the estimate returned from record_stmt_cost for
14746 the scalar iteration cost but sum properly using add_stmt_cost.
14748 2018-02-27 Richard Biener <rguenther@suse.de>
14750 PR tree-optimization/84466
14751 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14752 Adjust last change to less strictly validate use operands.
14754 2018-02-27 Martin Liska <mliska@suse.cz>
14756 PR gcov-profile/84548
14757 * gcov.c (process_file): Allow partial overlap and consider it
14758 also as group functions.
14759 (output_lines): Properly calculate range of lines for a group.
14761 2018-02-27 Martin Liska <mliska@suse.cz>
14763 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14764 'ggc' suffixes. Change first column width.
14765 (timer::print): Fix formatting of the column.
14767 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14769 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14770 preserve inline entry blocks for the sake of debug inline
14771 entry point markers alone.
14772 (remove_unused_locals): Suggest in comments a better place to
14773 force the preservation of inline entry blocks that are
14774 otherwise unused, but do not preserve them.
14776 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14778 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14780 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14783 * config/i386/constraints.md (Bs): Replace
14784 ix86_indirect_branch_register with
14785 TARGET_INDIRECT_BRANCH_REGISTER.
14787 * config/i386/i386.md (indirect_jump): Likewise.
14788 (tablejump): Likewise.
14789 (*sibcall_memory): Likewise.
14790 (*sibcall_value_memory): Likewise.
14791 Peepholes of indirect call and jump via memory: Likewise.
14792 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14793 (*sibcall_value_GOT_32): Likewise.
14794 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14795 (GOT_memory_operand): Likewise.
14796 (call_insn_operand): Likewise.
14797 (sibcall_insn_operand): Likewise.
14798 (GOT32_symbol_operand): Likewise.
14799 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14801 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14803 PR rtl-optimization/83496
14804 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14805 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14806 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14807 redundant insn, if any.
14808 (relax_delay_slots): Likewise.
14809 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14811 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14813 PR tree-optimization/83965
14814 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14815 that grouped statements are part of a reduction chain. Return
14816 true if the statement is not marked as a reduction itself but
14817 is part of a group.
14818 (vect_recog_dot_prod_pattern): Don't check whether the statement
14819 is part of a group here.
14820 (vect_recog_sad_pattern): Likewise.
14821 (vect_recog_widen_sum_pattern): Likewise.
14823 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14826 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14828 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14831 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14833 (ix86_output_indirect_function_return): New prototype.
14834 (ix86_split_simple_return_pop_internal): Likewise.
14835 * config/i386/i386.c (indirect_return_via_cx): New.
14836 (indirect_return_via_cx_bnd): Likewise.
14837 (indirect_thunk_name): Handle return va CX_REG.
14838 (output_indirect_thunk_function): Create alias for
14839 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14840 (ix86_output_indirect_jmp): Remove the bool argument.
14841 (ix86_output_indirect_function_return): New function.
14842 (ix86_split_simple_return_pop_internal): Likewise.
14843 * config/i386/i386.md (*indirect_jump): Don't pass false
14844 to ix86_output_indirect_jmp.
14845 (*tablejump_1): Likewise.
14846 (simple_return_pop_internal): Change it to define_insn_and_split.
14847 Call ix86_split_simple_return_pop_internal to split it for
14848 -mfunction-return=.
14849 (simple_return_indirect_internal): Call
14850 ix86_output_indirect_function_return instead of
14851 ix86_output_indirect_jmp.
14853 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14856 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14857 memset and value initialization afterwards.
14859 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14861 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14863 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14866 * common/config/aarch64/aarch64-common.c
14867 (aarch_option_optimization_table[]): Switch
14868 off fomit-frame-pointer
14870 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14871 Chung-Ju Wu <jasonwucj@gmail.com>
14873 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14875 (store_multiple): Ditto.
14877 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14879 * config.gcc: Add --with-cpu support for nds32 target.
14880 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14881 * config/nds32/nds32.opt: Add -mcpu= option.
14883 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14885 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14886 isel=yes): Warn for these deprecated options.
14888 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14890 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14891 ISA_2_5_MASKS_EMBEDDED.
14893 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14895 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14896 p->max as pointers rather than using iterative_hash_expr.
14898 2018-02-23 Carl Love <cel@us.ibm.com>
14900 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14901 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14903 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14904 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14905 P8V_BUILTIN_VEC_VUNSIGNED2.
14907 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14910 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14911 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14913 * lra-constraints.c (curr_insn_transform): Set up
14914 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14916 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14917 * lra-eliminations.c (spill_pseudos): Ditto.
14918 (process_insn_for_elimination): Ditto.
14919 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14920 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14921 LRA_NON_CLOBBERED_ALT.
14923 2018-02-22 Martin Sebor <msebor@redhat.com>
14925 PR tree-optimization/84480
14926 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14927 to maybe_diag_stxncpy_trunc. Call it.
14928 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14929 from gimple_fold_builtin_strcpy. Print inlining stack.
14930 (handle_builtin_stxncpy): Print inlining stack.
14931 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14933 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14936 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14937 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14938 and -fcheck-pointer-bounds are used together.
14939 (indirect_thunk_prefix): New enum.
14940 (indirect_thunk_need_prefix): New function.
14941 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14942 "_nt" instead of "_bnd" for NOTRACK prefix.
14943 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14944 (output_indirect_thunk_function): Likewise.
14946 (ix86_code_end): Update output_indirect_thunk_function calls.
14947 (ix86_output_indirect_branch_via_reg): Replace
14948 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14949 (ix86_output_indirect_branch_via_push): Likewise.
14950 (ix86_output_function_return): Likewise.
14951 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14952 incompatible with -fcf-protection=branch and
14953 -fcheck-pointer-bounds.
14955 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14958 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14959 Change gcc_assert call to output_operand_lossage.
14961 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14963 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14965 2018-02-22 DJ Delorie <dj@redhat.com>
14966 Sebastian Perta <sebastian.perta@renesas.com>
14967 Oleg Endo <olegendo@gcc.gnu.org>
14969 * config/rx/rx.c (rx_rtx_costs): New function.
14970 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14972 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14974 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14976 2018-02-22 Martin Liska <mliska@suse.cz>
14979 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14980 Add "native" as a possible value.
14982 2018-02-22 Martin Liska <mliska@suse.cz>
14985 * config/i386/i386.c (ix86_option_override_internal):
14986 Add "native" as a possible value for -march and -mtune.
14988 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14991 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14992 to all type variants.
14994 PR tree-optimization/84503
14995 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14996 width as info->bitpos + info->bitsize - start.
14997 (merged_store_group::merge_overlapping): Simplify width computation.
14998 (check_no_overlap): New function.
14999 (imm_store_chain_info::try_coalesce_bswap): Compute expected
15000 start + width and last_order of the group, fail if check_no_overlap
15002 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15003 to group if check_no_overlap fails.
15005 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15007 * config/rs6000/altivec.md: Delete contraint arguments to
15008 define_expand, define_split, and define_peephole2, and in
15009 define_insn_and_split if always unused.
15010 * config/rs6000/darwin.md: Ditto.
15011 * config/rs6000/dfp.md: Ditto.
15012 * config/rs6000/rs6000.md: Ditto.
15013 * config/rs6000/sync.md: Ditto.
15014 * config/rs6000/vector.md: Ditto.
15015 * config/rs6000/vsx.md: Ditto.
15017 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15019 * config/rs6000/altivec.md: Write output control strings as braced
15020 blocks instead of double-quoted strings.
15021 * config/rs6000/darwin.md: Ditto.
15022 * config/rs6000/rs6000.md: Ditto.
15023 * config/rs6000/vector.md: Ditto.
15024 * config/rs6000/vsx.md: Ditto.
15026 2018-02-21 Jason Merrill <jason@redhat.com>
15028 PR c++/84314 - ICE with templates and fastcall attribute.
15029 * attribs.c (build_type_attribute_qual_variant): Remove assert.
15031 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15033 * ipa-cp.c (determine_versionability): Fix comment typos.
15035 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15038 * ipa-cp.c (determine_versionability): Do not version functions caling
15041 2018-02-21 Martin Liska <mliska@suse.cz>
15044 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15045 Add "native" as a possible value.
15046 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
15047 the macro when native cpu detection is available.
15049 2018-02-21 Martin Liska <mliska@suse.cz>
15052 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15053 Add "native" as a possible value.
15054 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15055 when native cpu detection is available.
15057 2018-02-21 Jakub Jelinek <jakub@redhat.com>
15058 Martin Sebor <msebor@redhat.com>
15060 PR tree-optimization/84478
15061 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15063 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15064 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15065 support which is conservatively correct, for 2 only stay conservative
15066 for maxlen. Formatting and comment capitalization fixes. Add STRICT
15067 argument to the 2 argument get_range_strlen, adjust 6 arg
15068 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15070 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15071 (gimple_fold_builtin_strlen): Pass true as last argument to
15074 2018-02-20 Martin Sebor <msebor@redhat.com>
15076 PR middle-end/84095
15077 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15078 (builtin_memref::set_base_and_offset): Same. Handle inner references.
15079 (builtin_memref::builtin_memref): Factor out parts into
15080 set_base_and_offset and call it.
15082 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15084 PR middle-end/84406
15085 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15086 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15087 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
15088 search at the associated MODE_INT.
15090 2018-02-20 Jeff Law <law@redhat.com>
15092 PR middle-end/82123
15093 PR tree-optimization/81592
15094 PR middle-end/79257
15095 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15096 for range data rather than using global data.
15097 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15098 range data rather than using global data.
15099 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15100 pass it to children as needed.
15101 (struct directive::fmtresult): Similarly.
15102 (struct directive::set_width): Similarly.
15103 (struct directive::set_precision): Similarly.
15104 (format_integer, format_directive, parse_directive): Similarly.
15105 (format_none): Accept unnamed vr_values parameter.
15106 (format_percent, format_floating, format_character): Similarly.
15107 (format_string, format_plain): Similarly.
15108 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15109 the EVRP range analyzer for range data rather than using global data.
15110 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15111 gimple-ssa-evrp-analyze.h
15112 (class sprintf_dom_walker): Add after_dom_children member function.
15113 Add evrp_range_analyzer member.
15114 (sprintf_dom_walker::before_dom_children): Call into the EVRP
15115 range analyzer as needed.
15116 (sprintf_dom_walker::after_dom_children): New member function.
15117 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15119 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15120 (evrp_range_analyzer::pop_to_marker): Likewise.
15122 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15124 PR tree-optimization/84419
15125 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15126 with the required type if its current type is compatible but
15129 2018-02-20 Jakub Jelinek <jakub@redhat.com>
15131 PR middle-end/82004
15132 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15133 after vectorization.
15135 2018-02-20 Martin Liska <mliska@suse.cz>
15138 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15139 possible values if we don't have a hint.
15141 2018-02-20 Martin Liska <mliska@suse.cz>
15145 * final.c (shorten_branches): Build align_tab array with one
15147 * opts.c (finish_options): Add alignment option limit check.
15148 (MAX_CODE_ALIGN): Likewise.
15149 (MAX_CODE_ALIGN_VALUE): Likewise.
15150 * doc/invoke.texi: Document maximum allowed option value for
15151 all -falign-* options.
15153 2018-02-19 Jakub Jelinek <jakub@redhat.com>
15156 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15157 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15158 * var-tracking.c (emit_note_insn_var_location): Remove all references
15159 to NOTE_INSN_CALL_ARG_LOCATION.
15160 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15161 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15162 Use copy_rtx_if_shared.
15163 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15164 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15165 (dwarf2out_var_location): Remove handling of
15166 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15168 * final.c (final_scan_insn): Remove all references to
15169 NOTE_INSN_CALL_ARG_LOCATION.
15170 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
15171 before dumping final insns.
15172 * except.c (emit_note_eh_region_end): Remove all references to
15173 NOTE_INSN_CALL_ARG_LOCATION.
15174 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15175 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15176 * config/arc/arc.c (hwloop_optimize): Likewise.
15177 * config/arm/arm.c (create_fix_barrier): Likewise.
15178 * config/s390/s390.c (s390_chunkify_start): Likewise.
15179 * config/sh/sh.c (find_barrier): Likewise.
15180 * config/i386/i386.c (rest_of_insert_endbranch,
15181 ix86_seh_fixup_eh_fallthru): Likewise.
15182 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15183 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15184 * config/frv/frv.c (frv_function_prologue): Likewise.
15185 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
15187 (note_outside_basic_block_p): Remove all references to
15188 NOTE_INSN_CALL_ARG_LOCATION.
15189 * gengtype.c (adjust_field_rtx_def): Likewise.
15190 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15192 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15193 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15196 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15199 PR tree-optimization/84452
15200 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15201 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15204 2018-02-19 Martin Liska <mliska@suse.cz>
15207 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15209 2018-02-19 Martin Liska <mliska@suse.cz>
15210 Richard Sandiford <richard.sandiford@linaro.org>
15212 PR tree-optimization/82491
15213 * gimple-fold.c (get_base_constructor): Make earlier bail out
15216 2018-02-19 Carl Love <cel@us.ibm.com>
15218 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15219 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15221 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15222 P8V_BUILTIN_VEC_NEG.
15224 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
15226 * config/rl78/rl78.md (movdf): New define expand.
15228 2018-02-19 Martin Liska <mliska@suse.cz>
15231 * doc/invoke.texi: Fix typo.
15232 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15234 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
15236 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15237 handle rs6000_single_float and rs6000_double_float specially for
15240 2018-02-16 Jeff Law <law@redhat.com>
15242 * config/rx/rx.c (add_pop_cfi_notes): New function.;
15243 (pop_regs): Use it.
15245 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15248 * ipa-inline.c (inline_small_functions): Fix a typo.
15250 2018-02-16 Nathan Sidwell <nathan@acm.org>
15252 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15254 2018-02-16 Carl Love <cel@us.ibm.com>
15256 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15257 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15258 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15259 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15260 expansion to P8V_BUILTIN_VEC_FLOAT2.
15262 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
15264 PR rtl-optimization/70023
15265 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15266 src_regno into account.
15268 2018-02-16 Carl Love <cel@us.ibm.com>
15270 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15271 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15272 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15273 * config/rs6000/rs6000.c: Remove case statements for
15274 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15275 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15276 and P9V_BUILTIN_VEC_VINSERT4B.
15277 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15278 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15279 * config/rs6000/vsx.md:
15280 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15283 2018-02-16 Carl Love <cel@us.ibm.com>
15285 * config/rs6000/altivec.h: Add builtin names vec_extract4b
15287 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15289 * config/rs6000/rs6000-c.c: Add the definitions for
15290 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15291 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15292 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15293 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
15294 definition for insert4b and define insn *insert3b_internal.
15295 * doc/extend.texi: Add documentation for vec_extract4b.
15297 2018-02-16 Nathan Sidwell <nathan@acm.org>
15299 * doc/extend.texi (Backwards Compatibility): Mention friend
15300 injection. Note for-scope is deprecated.
15301 * doc/invoke.texi (-ffriend-injection): Deprecate.
15303 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
15305 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15306 that moved to I2, also allow destinations that are a paradoxical
15307 subreg (instead of a normal reg).
15309 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
15312 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15315 2018-02-16 Richard Biener <rguenther@suse.de>
15317 PR tree-optimization/84037
15318 PR tree-optimization/84016
15320 * config/i386/i386.c (ix86_builtin_vectorization_cost):
15321 Adjust vec_construct for the fact we need additional higher latency
15322 128bit inserts for AVX256 and AVX512 vector builds.
15323 (ix86_add_stmt_cost): Scale vector construction cost for
15326 2018-02-16 Richard Biener <rguenther@suse.de>
15328 PR tree-optimization/84417
15329 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15330 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15331 (non_rewritable_lvalue_p): Likewise, use poly-ints.
15333 2018-02-16 Martin Liska <mliska@suse.cz>
15336 * internal-fn.def (ASAN_CHECK): Set proper flags.
15337 (ASAN_MARK): Likewise.
15339 2018-02-16 Julia Koval <julia.koval@intel.com>
15341 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15342 from PTA_CANNONLAKE.
15344 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15347 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15348 Use ++iter rather than iter++ for std::list iterators.
15349 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
15350 defer deleting them until all nodes in the forest are processed. Do
15351 free even leaf nodes. Change to_process into auto_vec.
15354 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15355 * vec.h (vec_default_construct): Use memset instead of placement new
15356 if BROKEN_VALUE_INITIALIZATION is defined.
15357 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15358 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15361 PR rtl-optimization/83723
15362 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15363 * lra.c (lra_substitute_pseudo): Likewise. If true, use
15364 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
15366 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15368 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15370 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
15372 PR rtl-optimization/81443
15373 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15374 from inner REGs to paradoxical SUBREGs.
15376 2018-02-16 Richard Biener <rguenther@suse.de>
15378 PR tree-optimization/84399
15379 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15380 For operands we can analyze at their definition make sure we can
15381 analyze them at each use as well.
15383 2018-02-16 Richard Biener <rguenther@suse.de>
15385 PR tree-optimization/84190
15386 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15387 volatile accesses if the decl isn't volatile.
15389 2018-02-15 Jason Merrill <jason@redhat.com>
15391 PR c++/84314 - ICE with templates and fastcall attribute.
15392 * attribs.c (build_type_attribute_qual_variant): Don't clobber
15393 TYPE_CANONICAL on an existing type.
15395 2018-02-15 Jakub Jelinek <jakub@redhat.com>
15397 PR tree-optimization/84383
15398 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15399 dstoff nor call operand_equal_p if dstbase is NULL.
15401 PR tree-optimization/84334
15402 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15403 also a CONSTANT_CLASS_P, punt.
15405 2018-02-14 Jim Wilson <jimw@sifive.com>
15407 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15408 first SMALL_OPERAND check. New local min_second_step. Move assert
15409 to where locals are set. Add TARGET_RVC support.
15410 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15412 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
15414 * doc/invoke.texi: Correct -Wformat-overflow code sample.
15416 2018-02-14 Martin Sebor <msebor@redhat.com>
15418 PR tree-optimization/83698
15419 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15420 arrays constrain the offset range to their bounds.
15421 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15422 (builtin_access::overlap): Avoid setting the size of overlap if it's
15424 (maybe_diag_overlap): Also consider arrays when deciding what values
15425 of offsets to include in diagnostics.
15427 2018-02-14 Martin Sebor <msebor@redhat.com>
15430 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15431 that correspond to the kind of a declaration.
15433 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15436 * config/pa/pa.md: Load address of PIC label using the linkage table
15437 if the label is nonlocal.
15439 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15441 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15442 warning message if user requests -maltivec=be.
15443 * doc/invoke.texi: Document deprecation of -maltivec=be.
15445 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15448 * config/rs6000/rs6000-c.c: Update definitions for
15449 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15450 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15452 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15455 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15456 add _get_ssp intrinsics. Remove argument from
15457 __builtin_ia32_rdssp[d|q].
15458 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15459 * config/i386/i386-builtin.def: Remove argument from
15460 __builtin_ia32_rdssp[d|q].
15461 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15462 ix86_expand_special_args_builtin for _rdssp[d|q].
15463 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15464 Clear register before usage.
15465 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15466 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15468 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15470 PR tree-optimization/84357
15471 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15472 operand 1 of an ARRAY_REF too.
15474 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15477 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15478 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15480 (set_of_reg): New struct.
15481 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15482 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15483 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15485 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15486 Split into bitclr, bitset, bitinvert patterns if appropriate.
15487 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15488 use rx_fuse_in_memory_bitop.
15489 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15490 to named insn, correct maximum insn length.
15492 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15495 * machmode.def: Define a complex mode for PARTIAL_INT.
15496 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15498 * doc/rtl.texi: Document CSPImode.
15499 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15501 (msp430_hard_regno_nregs_with_padding): Likewise.
15503 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15506 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15508 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15510 PR rtl-optimization/84169
15511 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15512 we generated a parallel as new i3 and we split that to new i2 and i3
15513 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15514 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15515 those to i2, not i1. Partially rewrite this scan code.
15517 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15520 * stor-layout.c (place_field): For variable length fields, adjust
15521 offset_align afterwards not just based on the field's alignment,
15522 but also on the size.
15524 PR middle-end/84309
15525 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15526 of exps and logs in the use_exp2 case.
15528 2018-02-13 Jeff Law <law@redhat.com>
15530 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15531 entry for "vector".
15533 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15536 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15540 * common.opt (gas-loc-support, gas-locview-support): New.
15541 (ginline-points, ginternal-reset-location-views): New.
15542 * doc/invoke.texi: Document them. Use @itemx where intended.
15543 (gvariable-location-views): Adjust.
15544 * target.def (reset_location_view): New.
15545 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15546 (TARGET_RESET_LOCATION_VIEW): New.
15547 * doc/tm.texi: Rebuilt.
15548 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15549 (dwarf2out_default_as_locview_support): New.
15550 (output_asm_line_debug_info): Use option variables.
15551 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15552 (output_loc_list): Likewise.
15553 (add_high_low_attributes): Check option variables.
15554 Don't output entry view attribute in strict mode.
15555 (gen_inlined_subroutine_die): Check option variables.
15556 (dwarf2out_inline_entry): Likewise.
15557 (init_sections_and_labels): Likewise.
15558 (dwarf2out_early_finish): Likewise.
15559 (maybe_reset_location_view): New, from...
15560 (dwarf2out_var_location): ... here. Call it.
15561 * debug.h (dwarf2out_default_as_loc_support): Declare.
15562 (dwarf2out_default_as_locview_support): Declare.
15563 * hooks.c (hook_int_rtx_insn_0): New.
15564 * hooks.h (hook_int_rtx_insn_0): Declare.
15565 * toplev.c (process_options): Take -gas-loc-support and
15566 -gas-locview-support from dwarf2out. Enable
15567 -gvariable-location-views by default only with locview
15568 assembler support. Enable -ginternal-reset-location-views by
15569 default only if the target defines the corresponding hook.
15570 Enable -ginline-points by default if location views are
15571 enabled; force it disabled if statement frontiers are
15573 * tree-inline.c (expand_call_inline): Check option variables.
15574 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15576 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15578 PR tree-optimization/84321
15579 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15580 handling. Also check whether the anti-range contains any values
15581 that satisfy the mask; switch to a VR_RANGE if not.
15583 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15586 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15588 2018-02-13 Martin Jambor <mjambor@suse.cz>
15591 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15592 of call statements, also set location of a load to a temporary.
15594 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15596 * config/rl78/rl78.c (add_vector_labels): New function.
15597 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15598 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15599 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15600 which checks that no arguments are passed.
15601 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15602 * doc/extend.texi: Documentation for the new attribute.
15604 2018-02-13 Andreas Schwab <schwab@suse.de>
15606 * config/riscv/linux.h (CPP_SPEC): Define.
15608 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15611 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15612 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15613 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15614 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15615 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15616 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15617 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15618 temporarily for AES and PCLMUL builtins.
15620 PR tree-optimization/84339
15621 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15622 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15625 PR middle-end/84309
15626 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15627 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15628 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15630 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15632 * omp-simd-clone.h: New file.
15633 * omp-simd-clone.c: Include omp-simd-clone.h.
15634 (expand_simd_clones): No longer static.
15635 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15636 cgraph.h and omp-simd-clone.h.
15637 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15638 (vect_recog_widen_shift_pattern): Formatting fix.
15639 (vect_pattern_recog_1): Don't check optab for calls.
15642 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15643 operands[2] into a REG before using gen_lowpart on it.
15645 2018-02-12 Jeff Law <law@redhat.com>
15648 * config/sh/sh.c (find_barrier): Consider a sibling call
15651 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15652 successfully back substituting a reg.
15654 2018-02-12 Richard Biener <rguenther@suse.de>
15656 PR tree-optimization/84037
15657 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15658 parameter, move visited init to caller.
15659 (vect_slp_analyze_operations): Separate cost from validity
15660 check, initialize visited once for all instances.
15661 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15663 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15665 (vect_model_promotion_demotion_cost): Likewise.
15666 (vectorizable_bswap): Guard cost modeling with !slp_node
15667 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15669 (vectorizable_call): Likewise.
15670 (vectorizable_conversion): Likewise.
15671 (vectorizable_assignment): Likewise.
15672 (vectorizable_shift): Likewise.
15673 (vectorizable_operation): Likewise.
15674 (vectorizable_store): Likewise.
15675 (vectorizable_load): Likewise.
15676 (vectorizable_condition): Likewise.
15677 (vectorizable_comparison): Likewise.
15679 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15682 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15683 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15684 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15686 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15688 PR middle-end/83665
15689 * params.def (inline-min-speedup): Increase from 8 to 15.
15690 (max-inline-insns-auto): Decrease from 40 to 30.
15691 * ipa-split.c (consider_split): Add some buffer for function to
15692 be considered inlining candidate.
15693 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15696 2018-02-12 Richard Biener <rguenther@suse.de>
15698 PR tree-optimization/84037
15699 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15700 matched stmts if we cannot swap the non-matched ones.
15702 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15704 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15705 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15706 _mm_maskz_scalef_round_ss): New intrinsics.
15707 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15708 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15709 __builtin_ia32_scalefss_round): Remove.
15710 (__builtin_ia32_scalefsd_mask_round,
15711 __builtin_ia32_scalefss_mask_round): New intrinsics.
15712 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15713 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15714 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15715 "<round_constraint>")): Changed to ...
15716 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15717 "<round_scalar_constraint>")): ... this.
15718 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15719 %0, %1, %2<round_op3>}"): Changed to ...
15720 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15721 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15722 %2<round_scalar_mask_op3>}"): ... this.
15723 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15725 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15727 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15728 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15729 (_mm_maskz_sqrt_round_ss): New intrinsics.
15730 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15731 (__builtin_ia32_sqrtsd_mask_round)
15732 (__builtin_ia32_sqrtss_mask_round): New builtins.
15733 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15734 (__builtin_ia32_sqrtss_round): Remove.
15735 (__builtin_ia32_sqrtsd_mask_round)
15736 (__builtin_ia32_sqrtss_mask_round): New builtins.
15737 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15738 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15739 ((match_operand:VF_128 1 "vector_operand"
15740 "xBm,<round_constraint>")): Changed to ...
15741 ((match_operand:VF_128 1 "vector_operand"
15742 "xBm,<round_scalar_constraint>")): ... this.
15743 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15744 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15745 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15746 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15747 %<iptr>1<round_scalar_mask_op3>}): ... this.
15748 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15749 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15751 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15754 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15755 Cast vec_cmpeq result to correct type.
15756 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15757 Cast vec_cmpgt result to correct type.
15759 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15761 * final.c (final_scan_insn_1): Renamed from...
15762 (final_scan_insn): ... this. New wrapper, to recover
15763 seen from the outermost call in recursive ones.
15764 * config/sparc/sparc.c (output_return): Drop seen from call.
15765 (output_sibcall): Likewise.
15766 * config/visium/visium.c (output_branch): Likewise.
15768 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15770 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15773 2018-02-10 Alan Modra <amodra@gmail.com>
15776 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15777 Specify LR as an input.
15779 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15782 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15783 remove_member_access_dummy_vars): New functions.
15784 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15785 lower_omp_1, execute_lower_omp): Use them.
15787 PR rtl-optimization/84308
15788 * shrink-wrap.c (spread_components): Release todo vector.
15790 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15792 PR rtl-optimization/57193
15793 * ira-color.c (struct allocno_color_data): Add member
15794 conflict_allocno_hard_prefs.
15795 (update_conflict_allocno_hard_prefs): New.
15796 (bucket_allocno_compare_func): Add a preference based on
15797 conflict_allocno_hard_prefs.
15798 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15799 (color_allocnos): Remove a dead code. Initiate
15800 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15802 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15805 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15806 constraint from =wa to wa. Avoid a subreg on the output operand,
15807 instead use a pseudo and subreg it in a move.
15808 (p9_xxbrd_<mode>): Changed to ...
15809 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15810 (p9_xxbrd_v2df): New expander.
15811 (p9_xxbrw_<mode>): Changed to ...
15812 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15813 (p9_xxbrw_v4sf): New expander.
15815 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15817 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15819 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15822 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15823 multiply in 32-bit mode.
15824 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15825 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15828 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15830 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15831 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15832 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15833 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15835 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15838 * dwarf2out.c (is_trivial_indirect_ref): New function.
15839 (dwarf2out_late_global_decl): Do not generate a location
15840 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15841 and that are not defined in the current unit.
15843 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15845 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15846 instead of a libcall for UNORDERED.
15848 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15851 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15852 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15854 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15857 * config/s390/s390.c (s390_set_current_function): Invoke
15858 s390_indirect_branch_settings also if fndecl didn't change.
15860 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15862 * config/rs6000/rs6000.md (blockage): Set length to zero.
15864 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15866 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15868 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15871 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15872 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15876 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15877 PARALLEL incoming that failed vt_get_decl_and_offset check.
15879 PR middle-end/84237
15880 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15881 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15883 (get_variable_section): For decls in named .bss* sections pass true as
15884 second argument to bss_initializer_p.
15886 2018-02-09 Marek Polacek <polacek@redhat.com>
15887 Jakub Jelinek <jakub@redhat.com>
15890 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15891 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15892 Sync some changes from cxx_fold_indirect_ref.
15894 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15896 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15898 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15899 (BLOCK_INLINE_ENTRY_LABEL): New.
15900 (dwarf2out_var_location): Disregard inline entry markers.
15901 (inline_entry_data): New struct.
15902 (inline_entry_data_hasher): New hashtable type.
15903 (inline_entry_data_hasher::hash): New.
15904 (inline_entry_data_hasher::equal): New.
15905 (inline_entry_data_table): New variable.
15906 (add_high_low_attributes): Add DW_AT_entry_pc and
15907 DW_AT_GNU_entry_view attributes if a pending entry is found
15908 in inline_entry_data_table. Add old entry_pc attribute only
15909 if debug nonbinding markers are disabled.
15910 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15911 markers are enabled.
15912 (block_within_block_p, dwarf2out_inline_entry): New.
15913 (dwarf2out_finish): Check that no entries remained in
15914 inline_entry_data_table.
15915 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15916 (final_scan_insn, notice_source_line): Likewise.
15917 (rest_of_clean_state): Skip inline entry markers.
15918 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15920 * gimple.c (gimple_build_debug_inline_entry): New.
15921 * gimple.h (enum gimple_debug_subcode): Add
15922 GIMPLE_DEBUG_INLINE_ENTRY.
15923 (gimple_build_debug_inline_entry): Declare.
15924 (gimple_debug_inline_entry_p): New.
15925 (gimple_debug_nonbind_marker_p): Adjust.
15926 * insn-notes.def (INLINE_ENTRY): New.
15927 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15928 inline entry marker notes.
15929 (print_insn): Likewise.
15930 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15931 (INSN_DEBUG_MARKER_KIND): Likewise.
15932 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15933 * tree-inline.c (expand_call_inline): Build and insert
15934 debug_inline_entry stmt.
15935 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15936 inline entry blocks early, if nonbind markers are enabled.
15937 (dump_scope_block): Dump fragment info.
15938 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15939 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15940 (gimple_build_debug_inline_entry): New.
15941 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15942 Enable/disable inline entry points too.
15943 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15944 (DEBUG_INSN): Describe inline entry markers.
15946 * common.opt (gvariable-location-views): New.
15947 (gvariable-location-views=incompat5): New.
15948 * config.in: Rebuilt.
15949 * configure: Rebuilt.
15950 * configure.ac: Test assembler for view support.
15951 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15952 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15953 * dwarf2out.c (var_loc_view): New typedef.
15954 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15955 (dwarf2out_locviews_in_attribute): New.
15956 (dwarf2out_locviews_in_loclist): New.
15957 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15958 (enum dw_line_info_opcode): Add LI_adv_address.
15959 (struct dw_line_info_table): Add view.
15960 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15961 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15962 (zero_view_p): New variable.
15963 (ZERO_VIEW_P): New macro.
15964 (output_asm_line_debug_info): New.
15965 (struct var_loc_node): Add view.
15966 (add_AT_view_list, AT_loc_list): New.
15967 (add_var_loc_to_decl): Add view param. Test it against last.
15968 (new_loc_list): Add view params. Record them.
15969 (AT_loc_list_ptr): Handle loc and view lists.
15970 (view_list_to_loc_list_val_node): New.
15971 (print_dw_val): Handle dw_val_class_view_list.
15972 (size_of_die): Likewise.
15973 (value_format): Likewise.
15974 (loc_list_has_views): New.
15975 (gen_llsym): Set vl_symbol too.
15976 (maybe_gen_llsym, skip_loc_list_entry): New.
15977 (dwarf2out_maybe_output_loclist_view_pair): New.
15978 (output_loc_list): Output view list or entries too.
15979 (output_view_list_offset): New.
15980 (output_die): Handle dw_val_class_view_list.
15981 (output_dwarf_version): New.
15982 (output_compilation_unit_header): Use it.
15983 (output_skeleton_debug_sections): Likewise.
15984 (output_rnglists, output_line_info): Likewise.
15985 (output_pubnames, output_aranges): Update version comments.
15986 (output_one_line_info_table): Output view numbers in asm comments.
15987 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15988 Call maybe_gen_llsym.
15989 (loc_list_from_tree_1): Adjust.
15990 (add_AT_location_description): Create view list attribute if
15991 needed, check it's absent otherwise.
15992 (convert_cfa_to_fb_loc_list): Adjust.
15993 (maybe_emit_file): Call output_asm_line_debug_info for test.
15994 (dwarf2out_var_location): Reset views as needed. Precompute
15995 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15996 attribute. Set view.
15997 (new_line_info_table): Reset next view.
15998 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15999 (dwarf2out_source_line): Likewise. Output view resets and labels to
16000 the assembler, or select appropriate line info opcodes.
16001 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16002 (optimize_string_length): Catch it. Adjust.
16003 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
16004 dw_val_class_view_list, and remove it if no longer needed.
16005 (hash_loc_list): Hash view numbers.
16006 (loc_list_hasher::equal): Compare them.
16007 (optimize_location_lists): Check whether a view list symbol is
16008 needed, and whether the locview attribute is present, and
16009 whether they match. Remove the locview attribute if no longer
16011 (index_location_lists): Call skip_loc_list_entry for test.
16012 (dwarf2out_finish): Call output_asm_line_debug_info for test.
16013 Use output_dwarf_version.
16014 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16015 (struct dw_val_node): Add val_view_list.
16016 * final.c (SEEN_NEXT_VIEW): New.
16017 (set_next_view_needed): New.
16018 (clear_next_view_needed): New.
16019 (maybe_output_next_view): New.
16020 (final_start_function): Rename to...
16021 (final_start_function_1): ... this. Take pointer to FIRST,
16022 add SEEN parameter. Emit param bindings in the initial view.
16023 (final_start_function): Reintroduce SEEN-less interface.
16024 (final): Rename to...
16025 (final_1): ... this. Take SEEN parameter. Output final pending
16026 next view at the end.
16027 (final): Reintroduce seen-less interface.
16028 (final_scan_insn): Output pending next view before switching
16029 sections or ending a block. Mark the next view as needed when
16030 outputting variable locations. Notify debug backend of section
16031 changes, and of location view changes.
16032 (rest_of_handle_final): Adjust.
16033 * toplev.c (process_options): Autodetect value for debug variable
16034 location views option. Warn on incompat5 without -gdwarf-5.
16035 * doc/invoke.texi (gvariable-location-views): New.
16036 (gvariable-location-views=incompat5): New.
16037 (gno-variable-location-views): New.
16039 2018-02-08 David Malcolm <dmalcolm@redhat.com>
16041 PR tree-optimization/84136
16042 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16043 that the result of find_edge is non-NULL.
16045 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16048 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16049 storing integer register in SImode. Fix cost of 256 and 512
16050 byte aligned SSE register store.
16052 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16054 * config/i386/i386.c (ix86_multiplication_cost): Fix
16055 multiplication cost for TARGET_AVX512DQ.
16057 2018-02-08 Marek Polacek <polacek@redhat.com>
16059 PR tree-optimization/84238
16060 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16063 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16065 PR tree-optimization/84265
16066 * tree-vect-stmts.c (vectorizable_store): Don't treat
16067 VMAT_CONTIGUOUS accesses as grouped.
16068 (vectorizable_load): Likewise.
16070 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16072 PR tree-optimization/81635
16073 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16074 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16075 (test_round_for_mask): New functions.
16076 (wide_int_cc_tests): Call test_round_for_mask.
16077 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16078 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16079 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16080 range returned by get_range_info.
16082 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16085 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16086 * symtab.c: Include builtins.h
16087 (symtab_node::output_to_lto_symbol_table_p): Move here
16088 from lto-streamer-out.c:output_symbol_p.
16089 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16090 (output_symbol_p): Move all logic to symtab.c
16091 (produce_symtab): Update.
16093 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16095 * config/s390/s390-opts.h (enum indirect_branch): Define.
16096 * config/s390/s390-protos.h (s390_return_addr_from_memory)
16097 (s390_indirect_branch_via_thunk)
16098 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16099 (enum s390_indirect_branch_type): Define.
16100 * config/s390/s390.c (struct s390_frame_layout, struct
16101 machine_function): Remove.
16102 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16103 (indirect_branch_table_label_no, indirect_branch_table_name):
16105 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16106 (enum s390_indirect_branch_option): Define.
16107 (s390_return_addr_from_memory): New function.
16108 (s390_handle_string_attribute): New function.
16109 (s390_attribute_table): Add new attribute handler.
16110 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16111 (s390_indirect_branch_via_thunk): New function.
16112 (s390_indirect_branch_via_inline_thunk): New function.
16113 (s390_function_ok_for_sibcall): When jumping via thunk disallow
16114 sibling call optimization for non z10 compiles.
16115 (s390_emit_call): Force indirect branch target to be a single
16116 register. Add r1 clobber for non-z10 compiles.
16117 (s390_emit_epilogue): Emit return jump via return_use expander.
16118 (s390_reorg): Handle JUMP_INSNs as execute targets.
16119 (s390_option_override_internal): Perform validity checks for the
16120 new command line options.
16121 (s390_indirect_branch_attrvalue): New function.
16122 (s390_indirect_branch_settings): New function.
16123 (s390_set_current_function): Invoke s390_indirect_branch_settings.
16124 (s390_output_indirect_thunk_function): New function.
16125 (s390_code_end): Implement target hook.
16126 (s390_case_values_threshold): Implement target hook.
16127 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16129 * config/s390/s390.h (struct s390_frame_layout)
16130 (struct machine_function): Move here from s390.c.
16131 (TARGET_INDIRECT_BRANCH_NOBP_RET)
16132 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16133 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16134 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16135 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16136 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16137 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16138 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16139 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16140 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16141 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16142 (mnemonic attribute): Add values which aren't recognized
16144 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16145 pattern for branch conversion. Fix mnemonic attribute.
16146 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16147 indirect branch via thunk if requested.
16148 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16149 ("*indirect_jump"): Disable for branch conversion using out of
16151 ("indirect_jump_via_thunk<mode>_z10")
16152 ("indirect_jump_via_thunk<mode>")
16153 ("indirect_jump_via_inlinethunk<mode>_z10")
16154 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16155 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16156 ("casesi_jump_via_inlinethunk<mode>_z10")
16157 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16158 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16159 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16160 ("*indirect2_jump"): Disable for branch conversion.
16161 ("casesi_jump"): Turn into expander and expand patterns for branch
16163 ("return_use"): New expander.
16164 ("*return"): Emit return via thunk and rename it to ...
16165 ("*return<mode>"): ... this one.
16166 * config/s390/s390.opt: Add new options and and enum for the
16169 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16171 * lra-constraints.c (match_reload): Unconditionally use
16172 gen_lowpart_SUBREG, rather than selecting between that
16173 and equivalent gen_rtx_SUBREG code.
16175 2018-02-08 Richard Biener <rguenther@suse.de>
16177 PR tree-optimization/84233
16178 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16179 changed flag instead of boguously re-using phi_inserted.
16181 2018-02-08 Martin Jambor <mjambor@suse.cz>
16183 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16184 static local variables.
16186 2018-02-08 Richard Biener <rguenther@suse.de>
16188 PR tree-optimization/84278
16189 * tree-vect-stmts.c (vectorizable_store): When looking for
16190 smaller vector types to perform grouped strided loads/stores
16191 make sure the mode is supported by the target.
16192 (vectorizable_load): Likewise.
16194 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16196 * config/aarch64/aarch64.c (aarch64_components_for_bb):
16197 Increase LDP/STP opportunities by adding adjacent callee-saves.
16199 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16201 PR rtl-optimization/84068
16202 PR rtl-optimization/83459
16203 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16205 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16207 PR tree-optimization/84224
16208 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16209 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16210 non-zero arguments.
16212 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16215 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16216 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16217 count, remove one USE.
16219 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16221 * doc/install.texi (Configuration): Document the
16222 --with-long-double-format={ibm,ieee} PowerPC configuration
16226 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16227 Convert from define_expand to be define_insn_and_split. Rework
16228 float/double/_Float128 conversions to QI/HI/SImode to work with
16229 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
16230 conversions to QI/HImode types did a store and then a load to
16231 truncate the value. For conversions to VSX registers, don't split
16232 the insn, instead emit the code directly. Use the code iterator
16233 any_fix to combine signed and unsigned conversions.
16234 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16235 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16236 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16237 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16238 (fix_<mode>di2_hw): Likewise.
16239 (fixuns_<mode>di2_hw): Likewise.
16240 (fix_<mode>si2_hw): Likewise.
16241 (fixuns_<mode>si2_hw): Likewise.
16242 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16243 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16244 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16245 fix<uns>_trunc<SFDF:mode>si2_p8.
16246 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16247 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16248 (fix<uns>_<mode>_mem): Likewise.
16249 (fctiw<u>z_<mode>_mem): Likewise.
16250 (fix<uns>_<mode>_mem): Likewise.
16251 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16252 the register allocator from doing a direct move to the GPRs to do
16253 a store, and instead use the ISA 3.0 store byte/half-word from
16254 vector register instruction. For IEEE 128-bit floating point,
16255 also optimize stores of 32-bit ints.
16256 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16258 2018-02-07 Alan Hayward <alan.hayward@arm.com>
16260 * genextract.c (push_pathstr_operand): New function to support
16262 (walk_rtx): Call push_pathstr_operand.
16263 (print_path): Support [a-zA-Z].
16265 2018-02-07 Richard Biener <rguenther@suse.de>
16267 PR tree-optimization/84037
16268 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16269 (cse_and_gimplify_to_preheader): Declare.
16270 (vect_get_place_in_interleaving_chain): Likewise.
16271 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16273 (_loop_vec_info::~_loop_vec_info): Delete it.
16274 (cse_and_gimplify_to_preheader): New function.
16275 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16276 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16277 (vectorizable_load): Likewise. For grouped stores always base
16278 the IV on the first element.
16279 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16280 condition before gimplifying.
16282 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16284 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16285 *DIV_EXPR and *MOD_EXPR.
16287 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
16290 * config/i386/i386.c (ix86_option_override_internal): Mask out
16291 the CF_SET bit when checking -fcf-protection.
16293 2018-02-07 Tom de Vries <tom@codesourcery.com>
16296 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16299 2018-02-07 Richard Biener <rguenther@suse.de>
16301 PR tree-optimization/84204
16302 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16305 PR tree-optimization/84205
16306 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16307 special-case isl_ast_op_zdiv_r.
16309 PR tree-optimization/84223
16310 * graphite-scop-detection.c (gather_bbs::before_dom_children):
16311 Only add conditions from within the region.
16312 (gather_bbs::after_dom_children): Adjust.
16314 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
16317 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16318 * config/avr/avr.md: Only post-reload split REG-REG moves if
16319 either register is GENERAL_REG_P.
16321 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16323 PR tree-optimization/84235
16324 * tree-ssa-scopedtables.c
16325 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16326 if the subtraction is performed in floating point type where NaNs are
16327 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16328 build 1. Formatting fix.
16330 2018-02-06 Jakub Jelinek <jakub@redhat.com>
16333 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16334 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16335 and skip it regardless of bb boundaries. Use CALL_P macro,
16336 don't test INSN_P (insn) together with CALL_P or JUMP_P check
16337 unnecessarily, formatting fix.
16339 2018-02-06 Michael Collison <michael.collison@arm.com>
16341 * config/arm/thumb2.md:
16342 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16343 (*thumb_mov_notscc): Ditto.
16345 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
16348 * config/rs6000/rs6000.md (su code attribute): Use "u" for
16349 unsigned_fix, not "s".
16351 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16353 * configure.ac (gcc_fn_eh_frame_ro): New function.
16354 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16355 correct .eh_frame permissions.
16356 * configure: Regenerate.
16358 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
16360 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16361 irrelevant options.
16363 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16365 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16366 Display warning message for -mno-speculate-indirect-jumps.
16368 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
16370 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16372 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16374 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
16376 PR tree-optimization/84225
16377 * tree-eh.c (find_trapping_overflow): Only call
16378 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16380 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16383 * config/i386/i386.c: Reimplement the check of possible options
16384 -mibt/-mshstk conbination. Change error messages.
16385 * doc/invoke.texi: Fix a typo: remove extra '='.
16387 2018-02-06 Marek Polacek <polacek@redhat.com>
16389 PR tree-optimization/84228
16390 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16392 2018-02-06 Tamar Christina <tamar.christina@arm.com>
16395 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16396 emitted arch directives.
16397 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16398 __ARM_FEATURE_COPROC before changing architectures.
16400 2018-02-06 Richard Biener <rguenther@suse.de>
16402 * config/i386/i386.c (print_reg): Fix typo.
16403 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16405 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
16407 * configure: Regenerate.
16409 2018-02-05 Martin Sebor <msebor@redhat.com>
16411 PR tree-optimization/83369
16412 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16415 2018-02-05 Martin Liska <mliska@suse.cz>
16417 * doc/invoke.texi: Cherry-pick upstream r323995.
16419 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
16421 * ira.c (ira_init_register_move_cost): Adjust comment.
16423 2018-02-05 Martin Liska <mliska@suse.cz>
16425 PR gcov-profile/84137
16426 * doc/gcov.texi: Fix typo in documentation.
16428 2018-02-05 Martin Liska <mliska@suse.cz>
16430 PR gcov-profile/83879
16431 * doc/gcov.texi: Document necessity of --dynamic-list-data when
16432 using dlopen functionality.
16434 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16436 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16437 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16438 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16439 _mm_maskz_range_round_ss): New intrinsics.
16440 (__builtin_ia32_rangesd128_round)
16441 (__builtin_ia32_rangess128_round): Remove.
16442 (__builtin_ia32_rangesd128_mask_round,
16443 __builtin_ia32_rangess128_mask_round): New builtins.
16444 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16445 __builtin_ia32_rangess128_round): Remove.
16446 (__builtin_ia32_rangesd128_mask_round,
16447 __builtin_ia32_rangess128_mask_round): New builtins.
16448 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16449 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16450 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16451 "<round_saeonly_constraint>")): Changed to ...
16452 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16453 "<round_saeonly_scalar_constraint>")): ... this.
16454 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16455 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16456 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16457 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16458 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16460 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16462 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16464 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16465 Remove all values except native, 8540 and 8548.
16467 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16469 * config/i386/i386.c (ix86_output_function_return): Pass
16470 INVALID_REGNUM, instead of -1, as invalid register number to
16471 indirect_thunk_name and output_indirect_thunk.
16473 2018-02-02 Julia Koval <julia.koval@intel.com>
16475 * config.gcc: Add -march=icelake.
16476 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16477 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16478 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16479 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16480 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16481 (processor_target_table): Add icelake.
16482 (ix86_option_override_internal): Handle new PTAs.
16483 (get_builtin_code_for_version): Handle icelake.
16484 (M_INTEL_COREI7_ICELAKE): New.
16485 (fold_builtin_cpu): Handle icelake.
16486 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16487 * doc/invoke.texi: Add -march=icelake.
16489 2018-02-02 Julia Koval <julia.koval@intel.com>
16491 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16492 to wide_int_bitmask.
16493 * wide-int-bitmask.h: New.
16495 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16498 * config/i386/i386.md: Replace Pmode with word_mode in
16499 builtin_setjmp_setup and builtin_longjmp to support x32.
16501 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16505 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16507 (rs6000_supported_cpu_names): New static variable.
16508 (linux_cpu_translation_table): Likewise.
16509 (elf_platform) <cpu>: Define new static variable and use it.
16510 Translate kernel AT_PLATFORM name to canonical name if needed.
16511 Error if platform name is unknown.
16513 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16516 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16518 2018-02-01 Jeff Law <law@redhat.com>
16521 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16522 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16523 the scratch if RELEASE_VIA_POP is false.
16524 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16525 If we have to save a temporary register, decrement SIZE appropriately.
16526 Pass new arguments to release_scratch_register_on_entry.
16527 (ix86_adjust_stack_and_probe): Likewise.
16528 (ix86_emit_probe_stack_range): Pass new arguments to
16529 release_scratch_register_on_entry.
16531 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16533 PR rtl-optimization/84157
16534 * combine.c (change_zero_ext): Use REG_P predicate in
16535 front of HARD_REGISTER_P predicate.
16537 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16539 * config/avr/avr.c (avr_option_override): Move disabling of
16540 -fdelete-null-pointer-checks to...
16541 * common/config/avr/avr-common.c (avr_option_optimization_table):
16544 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16546 PR tree-optimization/81635
16547 * tree-data-ref.c (split_constant_offset_1): For types that
16548 wrap on overflow, try to use range info to prove that wrapping
16551 2018-02-01 Renlin Li <renlin.li@arm.com>
16554 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16555 TAILCALL_ADDR_REGS.
16556 (aarch64_register_move_cost): Likewise.
16557 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16558 TAILCALL_ADDR_REGS.
16559 (REG_CLASS_NAMES): Likewise.
16560 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16561 TAILCALL_ADDR_REGS. Remove IP registers.
16562 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16564 2018-02-01 Richard Biener <rguenther@suse.de>
16566 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16567 for specifying RPO order and allow NULL for that.
16568 * domwalk.c (dom_walker::dom_walker): Likewise.
16569 (dom_walker::walk): Handle NULL RPO order.
16570 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16572 (rewrite_update_dom_walker): Likewise.
16573 (mark_def_dom_walker): Likewise.
16575 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16577 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16578 (aarch64_maybe_expand_sve_subreg_move): Declare.
16579 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16580 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16582 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16583 that are semantically a reverse operation.
16584 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16585 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16586 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16588 (aarch64_can_change_mode_class): For big-endian, forbid changes
16589 between two SVE modes if they have different element sizes.
16591 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16593 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16594 the TImode handling for big-endian targets.
16596 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16598 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16599 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16601 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16602 Remove BSWAP handing for big-endian targets and use the form of
16603 LD1RQ appropariate for the mode.
16605 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16607 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16608 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16609 duplicated element.
16611 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16614 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16615 check for operands that need to go through aarch64_sve_reload_be.
16617 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16619 PR tree-optimization/81661
16620 PR tree-optimization/84117
16621 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16622 * tree-eh.c: Include gimplify.h.
16623 (find_trapping_overflow, replace_trapping_overflow,
16624 rewrite_to_non_trapping_overflow): New functions.
16625 * tree-vect-loop.c: Include tree-eh.h.
16626 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16627 * tree-data-ref.c: Include tree-eh.h.
16628 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16630 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16632 PR rtl-optimization/84123
16633 * combine.c (change_zero_ext): Check if hard register satisfies
16634 can_change_dest_mode before calling gen_lowpart_SUBREG.
16636 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16639 * ira.c (ira_init_register_move_cost): Remove assert.
16641 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16643 PR rtl-optimization/84071
16644 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16645 * doc/tm.texi: Regenerate.
16647 2018-01-31 Richard Biener <rguenther@suse.de>
16649 PR tree-optimization/84132
16650 * tree-data-ref.c (analyze_miv_subscript): Properly
16651 check whether evolution_function_is_affine_multivariate_p
16652 before calling gcd_of_steps_may_divide_p.
16654 2018-01-31 Julia Koval <julia.koval@intel.com>
16657 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16658 * config/i386/i386.md (rdpid_rex64) New.
16659 (rdpid): Make 32bit only.
16661 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16664 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16665 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16667 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16670 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16672 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16674 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16676 PR rtl-optimization/84071
16677 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16678 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16680 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16682 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16683 (arc_attribute_table): Add 'aux' attribute.
16684 (arc_in_small_data_p): Consider aux like variables.
16685 (arc_is_aux_reg_p): New function.
16686 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16687 (arc_get_aux_arg): New function.
16688 (prepare_move_operands): Handle aux-register access.
16689 (arc_handle_aux_attribute): New function.
16690 * doc/extend.texi (ARC Variable attributes): Add subsection.
16692 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16694 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16695 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16696 (arc_attribute_table): Add 'uncached' attribute.
16697 (arc_print_operand): Print '.di' flag for uncached memory
16699 (arc_in_small_data_p): Do not consider for small data the uncached
16701 (arc_is_uncached_mem_p): New function.
16702 * config/arc/predicates.md (compact_store_memory_operand): Check
16703 for uncached memory accesses.
16704 (nonvol_nonimm_operand): Likewise.
16705 * doc/extend.texi (ARC Type Attribute): New subsection.
16707 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16710 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16711 falign-loops=): Add Optimization flag.
16713 2018-01-30 Jeff Law <law@redhat.com>
16716 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16717 INT_REGISTERS_SAVED. Check it prior to calling
16718 get_scratch_register_on_entry.
16719 (ix86_adjust_stack_and_probe): Similarly.
16720 (ix86_emit_probe_stack_range): Similarly.
16721 (ix86_expand_prologue): Corresponding changes.
16723 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16726 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16727 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16729 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16732 * lra-constraints.c (curr_insn_transform): Process AND in the
16735 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16737 PR rtl-optimization/83986
16738 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16739 dependence against last_pending_memory_flush in addition to
16740 pending_jump_insns.
16742 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16744 PR tree-optimization/81611
16745 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16748 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16751 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16754 2018-01-30 Richard Biener <rguenther@suse.de>
16755 Jakub Jelinek <jakub@redhat.com>
16757 PR tree-optimization/84111
16758 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16759 inner loops added during recursion, as they don't have up-to-date
16762 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16765 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16766 (can_inline_edge_by_limits_p): ... here.
16767 (can_early_inline_edge_p, check_callers,
16768 update_caller_keys, update_callee_keys, recursive_inlining,
16769 add_new_edges_to_heap, speculation_useful_p,
16770 inline_small_functions,
16771 inline_small_functions, flatten_function,
16772 inline_to_all_callers_1): Update.
16774 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16776 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16779 2018-01-30 Richard Biener <rguenther@suse.de>
16781 PR tree-optimization/83008
16782 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16783 invariant and constant vector uses in stmts when they need
16784 more than one stmt.
16786 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16789 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16790 * configure: Regenerate.
16792 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16794 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16796 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16797 Use gen_rtx_REG rather than gen_lowpart.
16799 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16801 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16802 rather than 0 when creating partial subregs.
16804 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16806 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16809 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16812 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16813 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16814 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16815 flags. This restores the settings used before the 2017-07-24.
16816 Turning off pre increment/decrement/modify allows IVOPTS to
16817 optimize DF/SF loops where the index is an int.
16819 2018-01-29 Richard Biener <rguenther@suse.de>
16820 Kelvin Nilsen <kelvin@gcc.gnu.org>
16823 * tree-vect-stmts.c (vectorizable_call): Don't call
16824 targetm.vectorize_builtin_md_vectorized_function if callee is
16827 2018-01-22 Carl Love <cel@us.ibm.com>
16829 * doc/extend.tex: Fix typo in second arg in
16830 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16832 2018-01-29 Richard Biener <rguenther@suse.de>
16834 PR tree-optimization/84086
16835 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16836 (flush_ssaname_freelist): When SSA names were released reset
16837 the SCEV hash table.
16839 2018-01-29 Richard Biener <rguenther@suse.de>
16841 PR tree-optimization/84057
16842 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16843 removed paths when removing edges.
16845 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16847 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16848 -mfunction-return=@var{choice}.
16850 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16852 PR diagnostic/84034
16853 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16854 Handle CR like TAB.
16855 (layout::print_source_line): Likewise.
16856 (test_get_line_width_without_trailing_whitespace): Add test cases.
16858 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16860 PR middle-end/84040
16861 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16864 2018-01-26 Jim Wilson <jimw@sifive.com>
16866 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16868 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16871 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16873 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16874 and CMP + SUB-immediate -> SUBS.
16876 2018-01-26 Martin Sebor <msebor@redhat.com>
16878 PR tree-optimization/83896
16879 * tree-ssa-strlen.c (get_string_len): Rename...
16880 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16881 Avoid assuming length is constant.
16882 (handle_char_store): Use HOST_WIDE_INT for string length.
16884 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16887 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16888 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16890 2018-01-26 Richard Biener <rguenther@suse.de>
16892 PR rtl-optimization/84003
16893 * dse.c (record_store): Only record redundant stores when
16894 the earlier store aliases at least all accesses the later one does.
16896 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16898 PR rtl-optimization/83985
16899 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16900 REG_CFA_RESTORE insns.
16901 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16902 REG_CFA_RESTORE insns here.
16905 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16906 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16908 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16910 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16911 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16912 (arc_init): Likewise.
16913 (arc_override_options): Likewise.
16914 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16916 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16918 * config/arc/arc.h (TARGET_DBNZ): Define.
16919 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16920 properly set the tune attribute.
16921 (dbnz): Use TARGET_DBNZ guard.
16922 * config/arc/arc.opt (mtune): Add core3 option.
16924 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16926 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16927 recognize new pic like addresses.
16928 (arc_delegitimize_address): Clean up.
16930 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16932 * config/arc/arc-arches.def: Option mrf16 valid for all
16934 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16935 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16936 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16937 * config/arc/arc-tables.opt: Regenerate.
16938 * config/arc/arc.c (arc_conditional_register_usage): Handle
16939 reduced register file case.
16940 (arc_file_start): Set must have build attributes.
16941 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16942 mrf16 option value.
16943 * config/arc/arc.opt (mrf16): Add new option.
16944 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16945 * config/arc/genmultilib.awk: Handle new mrf16 option.
16946 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16947 * config/arc/t-multilib: Regenerate.
16948 * doc/invoke.texi (ARC Options): Document mrf16 option.
16950 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16952 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16953 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16954 (arc_attribute_table): Add 'secure_call' attribute.
16955 (arc_print_operand): Print secure call operand.
16956 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16958 (arc_is_secure_call_p): New function. * config/arc/arc.md
16959 (call_i): Add support for sjli instruction.
16960 (call_value_i): Likewise.
16961 * config/arc/constraints.md (Csc): New constraint.
16963 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16964 John Eric Martin <John.Martin@emmicro-us.com>
16966 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16967 * config/arc/arc.c (_arc_jli_section): New struct.
16968 (arc_jli_section): New type.
16969 (rc_jli_sections): New static variable.
16970 (arc_handle_jli_attribute): New function.
16971 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16972 (arc_file_end): New function.
16973 (TARGET_ASM_FILE_END): Define.
16974 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16975 (arc_add_jli_section): New function.
16976 (jli_call_scan): Likewise.
16977 (arc_reorg): Call jli_call_scan.
16978 (arc_output_addsi): Remove 'S' from printing asm operand.
16979 (arc_is_jli_call_p): New function.
16980 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16982 (movhi_insn): Likewise.
16983 (movsi_insn): Likewise.
16984 (movsi_set_cc_insn): Likewise.
16985 (loadqi_update): Likewise.
16986 (load_zeroextendqisi_update): Likewise.
16987 (load_signextendqisi_update): Likewise.
16988 (loadhi_update): Likewise.
16989 (load_zeroextendhisi_update): Likewise.
16990 (load_signextendhisi_update): Likewise.
16991 (loadsi_update): Likewise.
16992 (loadsf_update): Likewise.
16993 (movsicc_insn): Likewise.
16994 (bset_insn): Likewise.
16995 (bxor_insn): Likewise.
16996 (bclr_insn): Likewise.
16997 (bmsk_insn): Likewise.
16998 (bicsi3_insn): Likewise.
16999 (cmpsi_cc_c_insn): Likewise.
17000 (movsi_ne): Likewise.
17001 (movsi_cond_exec): Likewise.
17002 (clrsbsi2): Likewise.
17003 (norm_f): Likewise.
17013 (call_i): Remove 'S' asm letter, add jli instruction.
17014 (call_value_i): Likewise.
17015 * config/arc/arc.op (mjli-always): New option.
17016 * config/arc/constraints.md (Cji): New constraint.
17017 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17019 (subsf3_fpx): Likewise.
17020 (mulsf3_fpx): Likewise.
17021 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17023 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17024 function attrbutes.
17025 * doc/invoke.texi (ARC): Document mjli-always option.
17027 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
17029 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17030 avoid addition with 0 and use incw and decw where possible.
17032 2018-01-26 Richard Biener <rguenther@suse.de>
17034 PR tree-optimization/81082
17035 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17036 association if it requires casting to unsigned.
17037 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17038 from fold_plusminus_mult_expr to catch important cases late when
17039 range info is available.
17041 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17043 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17044 * configure.ac (hidden_linkonce): New test.
17045 * configure: Regenerate.
17046 * config.in: Regenerate.
17048 2018-01-26 Julia Koval <julia.koval@intel.com>
17050 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17051 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17052 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17053 _mm_mask_bitshuffle_epi64_mask): Fix type.
17054 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17055 USI_FTYPE_V4DI_V4DI_USI): Remove.
17056 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17057 __builtin_ia32_vpshufbitqmb256_mask,
17058 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17059 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17060 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17062 2018-01-26 Alan Modra <amodra@gmail.com>
17065 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17066 UNSPEC_VBPERMQ. Sort other unspecs.
17068 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
17070 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17072 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
17074 PR middle-end/83055
17075 * predict.c (drop_profile): Do not push/pop cfun; update also
17077 (handle_missing_profiles): Fix logic looking for zero profiles.
17079 2018-01-25 Jakub Jelinek <jakub@redhat.com>
17081 PR middle-end/83977
17082 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17083 on functions with #pragma omp declare simd or functions with simd
17085 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17086 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17087 Remove trailing \n from warning_at calls.
17089 2018-01-25 Tom de Vries <tom@codesourcery.com>
17092 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17093 for neutered workers.
17095 2018-01-24 Joseph Myers <joseph@codesourcery.com>
17098 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17099 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17101 2018-01-24 Jeff Law <law@redhat.com>
17104 * i386.c (get_probe_interval): Move to earlier point.
17105 (ix86_compute_frame_layout): If -fstack-clash-protection and
17106 the frame is larger than the probe interval, then use pushes
17107 to save registers rather than reg->mem moves.
17108 (ix86_expand_prologue): Remove conditional for int_registers_saved
17111 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
17114 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17115 min/max for never referenced object.
17117 2018-01-24 Jakub Jelinek <jakub@redhat.com>
17119 PR middle-end/83977
17120 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17122 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17123 attributes from DECL_ATTRIBUTES (decl) without affecting
17124 DECL_ATTRIBUTES (current_function_decl).
17125 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17126 functions with non-NULL DECL_ABSTRACT_ORIGIN.
17128 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
17130 PR tree-optimization/83979
17131 * fold-const.c (fold_comparison): Use constant_boolean_node
17132 instead of boolean_{true,false}_node.
17134 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
17136 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17139 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17141 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17142 Simplify the clause that sets the length attribute.
17143 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17144 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17145 clause that sets the length attribute.
17146 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17148 2018-01-24 Tom de Vries <tom@codesourcery.com>
17151 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17152 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17153 Add strict parameter.
17154 (prevent_branch_around_nothing): Insert dummy insn between branch to
17155 label and label with no ptx insn inbetween.
17156 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17158 2018-01-24 Tom de Vries <tom@codesourcery.com>
17161 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17162 for neutered threads in warp.
17163 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17165 2018-01-24 Richard Biener <rguenther@suse.de>
17167 PR tree-optimization/83176
17168 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17171 2018-01-24 Richard Biener <rguenther@suse.de>
17173 PR tree-optimization/82819
17174 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17175 code generating pluses that are no-ops in the target precision.
17177 2018-01-24 Richard Biener <rguenther@suse.de>
17179 PR middle-end/84000
17180 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17182 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17184 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17185 to merge probabilities.
17186 * predict.c (probably_never_executed): Also mark as cold functions
17187 with global 0 profile and guessed local profile.
17188 * profile-count.c (profile_probability::combine_with_count): New
17190 * profile-count.h (profile_probability::operator*,
17191 profile_probability::operator*=, profile_probability::operator/,
17192 profile_probability::operator/=): Reduce precision to adjusted
17193 and set value to guessed on contradictory divisions.
17194 (profile_probability::combine_with_freq): Remove.
17195 (profile_probability::combine_wiht_count): Declare.
17196 (profile_count::force_nonzero):: Set to adjusted.
17197 (profile_count::probability_in):: Set quality to adjusted.
17198 * tree-ssa-tail-merge.c (replace_block_by): Use
17199 combine_with_count.
17201 2018-01-23 Andrew Waterman <andrew@sifive.com>
17202 Jim Wilson <jimw@sifive.com>
17204 * config/riscv/riscv.c (riscv_stack_boundary): New.
17205 (riscv_option_override): Set riscv_stack_boundary. Handle
17206 riscv_preferred_stack_boundary_arg.
17207 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17208 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17209 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17210 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17211 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17212 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17214 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17217 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17218 of struct ix86_frame.
17219 (ix86_expand_epilogue): Likewise. Add a local variable for
17220 the reg_save_offset field in struct ix86_frame.
17222 2018-01-23 Bin Cheng <bin.cheng@arm.com>
17224 PR tree-optimization/82604
17225 * tree-loop-distribution.c (enum partition_kind): New enum item
17226 PKIND_PARTIAL_MEMSET.
17227 (partition_builtin_p): Support above new enum item.
17228 (generate_code_for_partition): Ditto.
17229 (compute_access_range): Differentiate cases that equality can be
17230 proven at all loops, the innermost loops or no loops.
17231 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17232 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
17233 (finalize_partitions, distribute_loop): Don't fuse partition of
17234 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17235 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17236 parloop is enabled.
17238 2018-01-23 Martin Liska <mliska@suse.cz>
17240 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17241 order to ignore the predictor.
17242 (PRED_POLYMORPHIC_CALL): Likewise.
17243 (PRED_RECURSIVE_CALL): Likewise.
17245 2018-01-23 Martin Liska <mliska@suse.cz>
17247 * tree-profile.c (tree_profiling): Print function header to
17248 aware reader which function we are working on.
17249 * value-prof.c (gimple_find_values_to_profile): Do not print
17250 not interesting value histograms.
17252 2018-01-23 Martin Liska <mliska@suse.cz>
17254 * profile-count.h (enum profile_quality): Add
17255 profile_uninitialized as the first value. Do not number values
17256 as they are zero based.
17257 (profile_count::verify): Update sanity check.
17258 (profile_probability::verify): Likewise.
17260 2018-01-23 Nathan Sidwell <nathan@acm.org>
17262 * doc/invoke.texi (ffor-scope): Deprecate.
17264 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17266 PR tree-optimization/83510
17267 * domwalk.c (set_all_edges_as_executable): New function.
17268 (dom_walker::dom_walker): Convert bool param
17269 "skip_unreachable_blocks" to enum reachability. Move setup of
17270 edge flags to set_all_edges_as_executable and only do it when
17271 reachability is REACHABLE_BLOCKS.
17272 * domwalk.h (enum dom_walker::reachability): New enum.
17273 (dom_walker::dom_walker): Convert bool param
17274 "skip_unreachable_blocks" to enum reachability.
17275 (set_all_edges_as_executable): New decl.
17276 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
17277 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17279 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17280 but converting true to REACHABLE_BLOCKS.
17281 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17283 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17284 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17285 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17287 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17288 if check_all_array_refs will be called.
17290 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17292 * tree.c (selftest::test_location_wrappers): Add more test
17295 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17297 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17298 (selftest::test_bit_in_range): Likewise.
17300 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17303 * doc/sourcebuild.texi (vect_float): Say that the selector
17304 only describes the situation when -funsafe-math-optimizations is on.
17305 (vect_float_strict): Document.
17307 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17309 PR tree-optimization/83965
17310 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17311 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17312 instead of checking only for a reduction.
17313 (vect_recog_widen_sum_pattern): Likewise.
17315 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17317 * predict.c (probably_never_executed): Only use precise profile info.
17318 (compute_function_frequency): Skip after inlining hack since we now
17319 have quality checking.
17321 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17323 * profile-count.h (profile_probability::very_unlikely,
17324 profile_probability::unlikely, profile_probability::even): Set
17325 precision to guessed.
17327 2018-01-23 Richard Biener <rguenther@suse.de>
17329 PR tree-optimization/83963
17330 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17331 Properly terminate dominator walk when crossing the exit edge not
17332 when visiting its source block.
17334 2018-01-23 Jakub Jelinek <jakub@redhat.com>
17337 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17338 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17340 2018-01-22 Jakub Jelinek <jakub@redhat.com>
17342 PR tree-optimization/83957
17343 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
17344 semicolon after for body surrounded by braces.
17346 PR tree-optimization/83081
17347 * profile-count.h (profile_probability::split): New method.
17348 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17349 Use profile_probability::split.
17350 (do_compare_rtx_and_jump): Fix adjustment of probabilities
17351 when splitting a single conditional jump into 2.
17353 2018-01-22 David Malcolm <dmalcolm@redhat.com>
17355 PR tree-optimization/69452
17356 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17359 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17361 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17362 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17363 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17365 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17367 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17369 * config/rl78/rl78.md (movdi): New define_expand.
17370 * config/rl78/rl78.c (rl78_split_movdi): New function.
17372 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
17375 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17377 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17378 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17379 128-bit to produce an UNSPEC move to get the double word with the
17380 signbit and then a shift directly to do signbit.
17381 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17382 implementation with a new version that just does either a direct
17383 move or a regular move. Move memory interface to separate insns.
17384 Move insns so they are next to the expander.
17385 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17386 with signbit move. Split big and little endian case.
17387 (signbit<mode>2_dm_mem_le): Likewise.
17388 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17389 (signbit<mode>2_dm2): Likewise.
17391 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17393 * config/rl78/rl78.md (anddi3): New define_expand.
17395 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17397 * config/rl78/rl78.md (umindi3): New define_expand.
17399 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17401 * config/rl78/rl78.md (smindi3): New define_expand.
17403 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17405 * config/rl78/rl78.md (smaxdi3): New define_expand.
17407 2018-01-22 Carl Love <cel@us.ibm.com>
17409 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17410 LVX_V1TI): Add macro expansion.
17411 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17412 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17413 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17414 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17415 Change check to determine if the instruction is a byte reversing
17416 entry. Fix typo in comment.
17417 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17418 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17419 Add def_builtin calls for new builtins.
17420 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17421 Add define_insn expansion.
17423 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17425 * config/rl78/rl78.md (umaxdi3): New define_expand.
17427 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17429 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17430 for non-QImode registers.
17432 2018-01-22 Richard Biener <rguenther@suse.de>
17434 PR tree-optimization/83963
17435 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17436 including the loop exit block.
17437 (scop_detection::merge_sese): Likewise.
17438 (scop_detection::add_scop): Do it here instead.
17440 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17442 * doc/sourcebuild.texi (arm_softfloat): Document.
17444 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17447 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17448 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17449 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17451 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17452 David Edelsohn <dje.gcc@gmail.com>
17455 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17456 Change "crset eq" to "crset 2".
17457 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17458 (*call_indirect_aix<mode>_nospec): Likewise.
17459 (*call_value_indirect_aix<mode>_nospec): Likewise.
17460 (*call_indirect_elfv2<mode>_nospec): Likewise.
17461 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17462 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17463 change assembly output from . to $.
17464 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17465 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17466 (*tablejump<mode>_internal1_nospec): Likewise.
17468 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17471 * config/sh/sh_optimize_sett_clrt.cc:
17472 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17474 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17476 PR tree-optimization/83940
17477 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17478 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17479 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17480 use it to pass back the definition type.
17481 (vect_check_store_rhs): Likewise rhs_dt_out.
17482 (vect_build_gather_load_calls): Add a mask_dt argument and use
17483 it instead of a call to vect_is_simple_use.
17484 (vectorizable_store): Update calls to vect_check_load_store_mask
17485 and vect_check_store_rhs. Use the dt returned by the latter instead
17486 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17487 instead of calls to vect_is_simple_use. Pass the scalar rather
17488 than the vector operand to vect_is_simple_use when handling
17489 second and subsequent copies of an rhs value.
17490 (vectorizable_load): Update calls to vect_check_load_store_mask
17491 and vect_build_gather_load_calls. Use the cached mask_dt and
17492 gs_info.offset_dt instead of calls to vect_is_simple_use.
17494 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17496 PR middle-end/83945
17497 * tree-emutls.c: Include gimplify.h.
17498 (lower_emutls_2): New function.
17499 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17500 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17501 it before further processing.
17504 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17505 UINTVAL (trueop1) instead of INTVAL (op1).
17507 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17511 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17512 INCOMING_FRAME_SP_OFFSET if not defined.
17513 (scan_trace): Add ENTRY argument. If true and
17514 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17515 emit a note to adjust the CFA offset.
17516 (create_cfi_notes): Adjust scan_trace callers.
17517 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17518 INCOMING_FRAME_SP_OFFSET in the CIE.
17519 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17520 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17522 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17523 * doc/tm.texi: Regenerated.
17525 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17527 PR rtl-optimization/83147
17528 * lra-constraints.c (remove_inheritance_pseudos): Use
17529 lra_substitute_pseudo_within_insn.
17531 2018-01-19 Tom de Vries <tom@codesourcery.com>
17532 Cesar Philippidis <cesar@codesourcery.com>
17535 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17537 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17540 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17541 spaces for function labels.
17543 2018-01-19 Martin Liska <mliska@suse.cz>
17545 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17546 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17547 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17548 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17549 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17550 (PRED_CONST_RETURN): Change from 69 to 65.
17551 (PRED_NULL_RETURN): Change from 91 to 71.
17552 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17553 (PRED_LOOP_GUARD): Change from 66 to 73.
17555 2018-01-19 Martin Liska <mliska@suse.cz>
17557 * predict.c (predict_insn_def): Add new assert.
17558 (struct branch_predictor): Change type to signed integer.
17559 (test_prediction_value_range): Amend test to cover
17560 PROB_UNINITIALIZED.
17561 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17562 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17563 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17564 (PRED_LOOP_IV_COMPARE): Likewise.
17565 * predict.h (PROB_UNINITIALIZED): Define new constant.
17567 2018-01-19 Martin Liska <mliska@suse.cz>
17569 * predict.c (dump_prediction): Add new format for
17570 analyze_brprob.py script which is enabled with -details
17572 * profile-count.h (precise_p): New function.
17574 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17576 PR tree-optimization/83922
17577 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17578 there are no statements that need masking.
17579 (vect_active_double_reduction_p): New function.
17580 (vect_analyze_loop_operations): Use it when handling phis that
17581 are not in the loop header.
17583 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17585 PR tree-optimization/83914
17586 * tree-vect-loop.c (vectorizable_induction): Don't convert
17587 init_expr or apply the peeling adjustment for inductions
17588 that are nested within the vectorized loop.
17590 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17592 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17595 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17599 * function.h (gimplify_parameters): Add gimple_seq * argument.
17600 * function.c: Include gimple.h and options.h.
17601 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17602 for the added local temporaries if needed.
17603 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17604 if there are any parameter cleanups, wrap whole body into a
17605 try/finally with the cleanups.
17607 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17610 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17611 Use GET_MODE_CLASS for scalar floating point.
17613 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17617 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17618 Fix call of call_cgraph_insertion_hooks.
17620 2018-01-18 Martin Sebor <msebor@redhat.com>
17622 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17624 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17627 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17630 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17633 * common.opt: (-ffile-prefix-map): New option.
17634 * opts.c (common_handle_option): Defer it.
17635 * opts-global.c (handle_common_deferred_options): Handle it.
17636 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17637 * file-prefix-map.h: New file.
17638 (remap_debug_filename, add_debug_prefix_map): ...here.
17639 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17640 * final.c (debug_prefix_map, add_debug_prefix_map
17641 remap_debug_filename): Move to...
17642 * file-prefix-map.c: New file.
17643 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17644 generalize, get rid of alloca(), use strrchr() instead of strchr().
17645 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17646 Implement in terms of add_prefix_map().
17647 (remap_macro_filename, remap_debug_filename): Implement in term of
17649 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17650 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17651 * dbxout.c: Include file-prefix-map.h.
17652 * varasm.c: Likewise.
17653 * vmsdbgout.c: Likewise.
17654 * xcoffout.c: Likewise.
17655 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17656 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17657 * doc/invoke.texi (-ffile-prefix-map): Document.
17658 (-fdebug-prefix-map): Update description.
17660 2018-01-18 Martin Liska <mliska@suse.cz>
17662 * config/i386/i386.c (indirect_thunk_name): Document that also
17664 (output_indirect_thunk): Document why both instructions
17665 (pause and lfence) are generated.
17667 2018-01-18 Richard Biener <rguenther@suse.de>
17669 PR tree-optimization/83887
17670 * graphite-scop-detection.c
17671 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17672 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17673 (scop_detection::merge_sese): Re-implement with a flood-fill
17674 algorithm that properly finds a SESE region if it exists.
17676 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17679 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17680 pointer_diff optimizations use view_convert instead of convert.
17682 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17684 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17685 Generate different code for -mno-speculate-indirect-jumps.
17686 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17687 (*call_indirect_aix<mode>): Disable for
17688 -mno-speculate-indirect-jumps.
17689 (*call_indirect_aix<mode>_nospec): New define_insn.
17690 (*call_value_indirect_aix<mode>): Disable for
17691 -mno-speculate-indirect-jumps.
17692 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17693 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17694 -mno-speculate-indirect-jumps.
17695 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17697 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17699 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17700 long double type, set the flags for noting the default long double
17701 type, even if we don't pass or return a long double type.
17703 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17706 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17709 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17711 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17712 support for merge[hl].
17713 (fold_mergehl_helper): New helper function.
17714 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17715 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17716 (altivec_vmrglw_direct): Add xxmrglw insn.
17718 2018-01-17 Andrew Waterman <andrew@sifive.com>
17720 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17721 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17723 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17726 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17727 call the lto_location_cache before reading the
17728 DECL_SOURCE_LOCATION of the types.
17730 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17731 Richard Sandiford <richard.sandiford@linaro.org>
17733 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17734 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17735 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17736 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17737 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17739 * config/aarch64/constraints.md (aarch64_movti_operand):
17741 * config/aarch64/predicates.md (Uti): Add new constraint.
17743 2018-01-17 Carl Love <cel@us.ibm.com>
17745 * config/rs6000/vsx.md (define_expand xl_len_r,
17746 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17747 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17749 (define_expand, define_insn): Move the shift left from the
17750 define_insn to the define_expand for lxvl and stxvl instructions.
17751 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17752 and XL_LEN_R definitions to PURE.
17754 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17756 * config/i386/i386.c (indirect_thunk_name): Declare regno
17757 as unsigned int. Compare regno with INVALID_REGNUM.
17758 (output_indirect_thunk): Ditto.
17759 (output_indirect_thunk_function): Ditto.
17760 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17761 in the call to output_indirect_thunk_function.
17763 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17765 PR middle-end/83884
17766 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17767 rather than the size of inner_type to determine the stack slot size
17768 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17770 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17773 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17776 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17778 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17779 endian Linux systems to optionally enable multilibs for selecting
17780 the long double type if the user configured an explicit type.
17781 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17782 have no long double multilibs if not defined.
17783 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17784 warn if the user used -mabi={ieee,ibm}longdouble and we built
17785 multilibs for long double.
17786 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17787 appropriate multilib option.
17788 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17790 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17791 for building long double multilibs.
17792 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17794 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17796 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17799 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17801 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17804 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17807 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17810 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17812 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17813 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17815 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17817 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17818 different rtl trees depending on TARGET_64BIT.
17819 (rs6000_gen_lvx): Likewise.
17821 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17823 * config/visium/visium.md (nop): Tweak comment.
17824 (hazard_nop): Likewise.
17826 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17828 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17829 -mspeculate-indirect-jumps.
17830 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17831 for -mno-speculate-indirect-jumps.
17832 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17833 (*call_value_indirect_elfv2<mode>): Disable for
17834 -mno-speculate-indirect-jumps.
17835 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17836 (indirect_jump): Emit different RTL for
17837 -mno-speculate-indirect-jumps.
17838 (*indirect_jump<mode>): Disable for
17839 -mno-speculate-indirect-jumps.
17840 (*indirect_jump<mode>_nospec): New define_insn.
17841 (tablejump): Emit different RTL for
17842 -mno-speculate-indirect-jumps.
17843 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17844 (tablejumpsi_nospec): New define_expand.
17845 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17846 (tablejumpdi_nospec): New define_expand.
17847 (*tablejump<mode>_internal1): Disable for
17848 -mno-speculate-indirect-jumps.
17849 (*tablejump<mode>_internal1_nospec): New define_insn.
17850 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17853 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17855 * caller-save.c (insert_save): Drop unnecessary parameter. All
17858 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17859 Richard Biener <rguenth@suse.de>
17862 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17863 return early, inline manually is_gimple_sizepos. Make sure if we
17864 call gimplify_expr we don't end up with a gimple constant.
17865 * tree.c (variably_modified_type_p): Don't return true for
17866 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17867 * gimplify.h (is_gimple_sizepos): Remove.
17869 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17871 PR tree-optimization/83857
17872 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17873 vectorizable_live_operation for pure SLP statements.
17874 (vectorizable_live_operation): Handle PHIs.
17876 2018-01-16 Richard Biener <rguenther@suse.de>
17878 PR tree-optimization/83867
17879 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17880 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17882 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17885 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17886 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17887 If off is not INTEGER_CST, issue a may not be aligned warning
17888 rather than isn't aligned. Use isn%'t rather than isn't.
17889 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17891 <case MULT_EXPR>: Improve the case when bottom and one of the
17892 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17893 operand, in that case check if the other operand is multiple of
17894 bottom divided by the INTEGER_CST operand.
17896 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17899 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17900 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17901 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17902 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17903 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17904 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17905 (pa_function_arg_size): New function.
17907 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17909 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17910 in a separate statement.
17912 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17914 PR tree-optimization/83847
17915 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17916 group gathers and scatters.
17918 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17920 PR rtl-optimization/86620
17921 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17923 PR rtl-optimization/83213
17924 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17925 to last if both are JUMP_INSNs.
17927 PR tree-optimization/83843
17928 * gimple-ssa-store-merging.c
17929 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17930 store_immediate_info for bswap/nop orig_stores.
17932 2018-01-15 Andrew Waterman <andrew@sifive.com>
17934 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17936 <UDIV>: Increase cost if !TARGET_DIV.
17938 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17940 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17941 (define_attr "cr_logical_3op"): New.
17942 (cceq_ior_compare): Adjust.
17943 (cceq_ior_compare_complement): Adjust.
17944 (*cceq_rev_compare): Adjust.
17945 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17946 (is_cracked_insn): Adjust.
17947 (insn_must_be_first_in_group): Adjust.
17948 * config/rs6000/40x.md: Adjust.
17949 * config/rs6000/440.md: Adjust.
17950 * config/rs6000/476.md: Adjust.
17951 * config/rs6000/601.md: Adjust.
17952 * config/rs6000/603.md: Adjust.
17953 * config/rs6000/6xx.md: Adjust.
17954 * config/rs6000/7450.md: Adjust.
17955 * config/rs6000/7xx.md: Adjust.
17956 * config/rs6000/8540.md: Adjust.
17957 * config/rs6000/cell.md: Adjust.
17958 * config/rs6000/e300c2c3.md: Adjust.
17959 * config/rs6000/e500mc.md: Adjust.
17960 * config/rs6000/e500mc64.md: Adjust.
17961 * config/rs6000/e5500.md: Adjust.
17962 * config/rs6000/e6500.md: Adjust.
17963 * config/rs6000/mpc.md: Adjust.
17964 * config/rs6000/power4.md: Adjust.
17965 * config/rs6000/power5.md: Adjust.
17966 * config/rs6000/power6.md: Adjust.
17967 * config/rs6000/power7.md: Adjust.
17968 * config/rs6000/power8.md: Adjust.
17969 * config/rs6000/power9.md: Adjust.
17970 * config/rs6000/rs64.md: Adjust.
17971 * config/rs6000/titan.md: Adjust.
17973 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17975 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17976 ix86_indirect_branch_register logic.
17978 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17980 * config/i386/constraints.md (Bs): Update
17981 ix86_indirect_branch_register check. Don't check
17982 ix86_indirect_branch_register with GOT_memory_operand.
17984 * config/i386/predicates.md (GOT_memory_operand): Don't check
17985 ix86_indirect_branch_register here.
17986 (GOT32_symbol_operand): Likewise.
17988 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17990 * config/i386/predicates.md (constant_call_address_operand):
17991 Rewrite ix86_indirect_branch_register logic.
17992 (sibcall_insn_operand): Likewise.
17994 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17996 * config/i386/constraints.md (Bs): Replace
17997 ix86_indirect_branch_thunk_register with
17998 ix86_indirect_branch_register.
18000 * config/i386/i386.md (indirect_jump): Likewise.
18001 (tablejump): Likewise.
18002 (*sibcall_memory): Likewise.
18003 (*sibcall_value_memory): Likewise.
18004 Peepholes of indirect call and jump via memory: Likewise.
18005 * config/i386/i386.opt: Likewise.
18006 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18007 (GOT_memory_operand): Likewise.
18008 (call_insn_operand): Likewise.
18009 (sibcall_insn_operand): Likewise.
18010 (GOT32_symbol_operand): Likewise.
18012 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18014 PR middle-end/83837
18015 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18016 type rather than type addr's type points to.
18017 (expand_omp_atomic_mutex): Likewise.
18018 (expand_omp_atomic): Likewise.
18020 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18023 * config/i386/i386.c (output_indirect_thunk_function): Use
18024 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18025 for __x86_return_thunk.
18027 2018-01-15 Richard Biener <rguenther@suse.de>
18029 PR middle-end/83850
18030 * expmed.c (extract_bit_field_1): Fix typo.
18032 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18035 * config/arm/iterators.md (VF): New mode iterator.
18036 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18037 Remove integer-related logic from pattern.
18038 (neon_vabd<mode>_3): Likewise.
18040 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18042 PR middle-end/82694
18043 * common.opt (fstrict-overflow): No longer an alias.
18044 (fwrapv-pointer): New option.
18045 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18046 also for pointer types based on flag_wrapv_pointer.
18047 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18048 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18049 opts->x_flag_wrapv got set.
18050 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18051 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18052 POINTER_TYPE_OVERFLOW_UNDEFINED.
18053 * match.pd: Likewise in address comparison pattern.
18054 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18056 2018-01-15 Richard Biener <rguenther@suse.de>
18059 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18060 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
18061 Reset type names to their identifier if their TYPE_DECL doesn't
18062 have linkage (and thus is used for ODR and devirt).
18063 (save_debug_info_for_decl): Remove.
18064 (save_debug_info_for_type): Likewise.
18065 (add_tree_to_fld_list): Adjust.
18066 * tree-pretty-print.c (dump_generic_node): Make dumping of
18067 type names more robust.
18069 2018-01-15 Richard Biener <rguenther@suse.de>
18071 * BASE-VER: Bump to 8.0.1.
18073 2018-01-14 Martin Sebor <msebor@redhat.com>
18076 * builtins.c (check_access): Avoid warning when the no-warning bit
18079 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
18081 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18082 * ira-color (allocno_hard_regs_compare): Likewise.
18084 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
18087 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18088 Use .pushsection/.popsection.
18090 2018-01-14 Martin Sebor <msebor@redhat.com>
18093 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18095 2018-01-14 Jakub Jelinek <jakub@redhat.com>
18097 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18098 entry from extra_headers.
18099 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18100 extra_headers, make the list bitwise identical to the i?86-*-* one.
18102 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18104 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18105 -mcmodel=large with -mindirect-branch=thunk,
18106 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18107 -mfunction-return=thunk-extern.
18108 * doc/invoke.texi: Document -mcmodel=large is incompatible with
18109 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18110 -mfunction-return=thunk and -mfunction-return=thunk-extern.
18112 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18114 * config/i386/i386.c (print_reg): Print the name of the full
18115 integer register without '%'.
18116 (ix86_print_operand): Handle 'V'.
18117 * doc/extend.texi: Document 'V' modifier.
18119 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18121 * config/i386/constraints.md (Bs): Disallow memory operand for
18122 -mindirect-branch-register.
18124 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18125 (GOT_memory_operand): Likewise.
18126 (call_insn_operand): Likewise.
18127 (sibcall_insn_operand): Likewise.
18128 (GOT32_symbol_operand): Likewise.
18129 * config/i386/i386.md (indirect_jump): Call convert_memory_address
18130 for -mindirect-branch-register.
18131 (tablejump): Likewise.
18132 (*sibcall_memory): Likewise.
18133 (*sibcall_value_memory): Likewise.
18134 Disallow peepholes of indirect call and jump via memory for
18135 -mindirect-branch-register.
18136 (*call_pop): Replace m with Bw.
18137 (*call_value_pop): Likewise.
18138 (*sibcall_pop_memory): Replace m with Bs.
18139 * config/i386/i386.opt (mindirect-branch-register): New option.
18140 * doc/invoke.texi: Document -mindirect-branch-register option.
18142 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18144 * config/i386/i386-protos.h (ix86_output_function_return): New.
18145 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18146 set function_return_type.
18147 (indirect_thunk_name): Add ret_p to indicate thunk for function
18149 (output_indirect_thunk_function): Pass false to
18150 indirect_thunk_name.
18151 (ix86_output_indirect_branch_via_reg): Likewise.
18152 (ix86_output_indirect_branch_via_push): Likewise.
18153 (output_indirect_thunk_function): Create alias for function
18154 return thunk if regno < 0.
18155 (ix86_output_function_return): New function.
18156 (ix86_handle_fndecl_attribute): Handle function_return.
18157 (ix86_attribute_table): Add function_return.
18158 * config/i386/i386.h (machine_function): Add
18159 function_return_type.
18160 * config/i386/i386.md (simple_return_internal): Use
18161 ix86_output_function_return.
18162 (simple_return_internal_long): Likewise.
18163 * config/i386/i386.opt (mfunction-return=): New option.
18164 (indirect_branch): Mention -mfunction-return=.
18165 * doc/extend.texi: Document function_return function attribute.
18166 * doc/invoke.texi: Document -mfunction-return= option.
18168 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18170 * config/i386/i386-opts.h (indirect_branch): New.
18171 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18172 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18173 with local indirect jump when converting indirect call and jump.
18174 (ix86_set_indirect_branch_type): New.
18175 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18176 (indirectlabelno): New.
18177 (indirect_thunk_needed): Likewise.
18178 (indirect_thunk_bnd_needed): Likewise.
18179 (indirect_thunks_used): Likewise.
18180 (indirect_thunks_bnd_used): Likewise.
18181 (INDIRECT_LABEL): Likewise.
18182 (indirect_thunk_name): Likewise.
18183 (output_indirect_thunk): Likewise.
18184 (output_indirect_thunk_function): Likewise.
18185 (ix86_output_indirect_branch_via_reg): Likewise.
18186 (ix86_output_indirect_branch_via_push): Likewise.
18187 (ix86_output_indirect_branch): Likewise.
18188 (ix86_output_indirect_jmp): Likewise.
18189 (ix86_code_end): Call output_indirect_thunk_function if needed.
18190 (ix86_output_call_insn): Call ix86_output_indirect_branch if
18192 (ix86_handle_fndecl_attribute): Handle indirect_branch.
18193 (ix86_attribute_table): Add indirect_branch.
18194 * config/i386/i386.h (machine_function): Add indirect_branch_type
18195 and has_local_indirect_jump.
18196 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18198 (tablejump): Likewise.
18199 (*indirect_jump): Use ix86_output_indirect_jmp.
18200 (*tablejump_1): Likewise.
18201 (simple_return_indirect_internal): Likewise.
18202 * config/i386/i386.opt (mindirect-branch=): New option.
18203 (indirect_branch): New.
18206 (thunk-inline): Likewise.
18207 (thunk-extern): Likewise.
18208 * doc/extend.texi: Document indirect_branch function attribute.
18209 * doc/invoke.texi: Document -mindirect-branch= option.
18211 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18214 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18216 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18218 * ipa-inline.c (want_inline_small_function_p): Return false if
18219 inlining has already failed with CIF_FINAL_ERROR.
18220 (update_caller_keys): Call want_inline_small_function_p before
18222 (update_callee_keys): Likewise.
18224 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18226 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18228 (rs6000_quadword_masked_address_p): Likewise.
18229 (quad_aligned_load_p): Likewise.
18230 (quad_aligned_store_p): Likewise.
18231 (const_load_sequence_p): Add comment to describe the outer-most loop.
18232 (mimic_memory_attributes_and_flags): New function.
18233 (rs6000_gen_stvx): Likewise.
18234 (replace_swapped_aligned_store): Likewise.
18235 (rs6000_gen_lvx): Likewise.
18236 (replace_swapped_aligned_load): Likewise.
18237 (replace_swapped_load_constant): Capitalize argument name in
18238 comment describing this function.
18239 (rs6000_analyze_swaps): Add a third pass to search for vector loads
18240 and stores that access quad-word aligned addresses and replace
18241 with stvx or lvx instructions when appropriate.
18242 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18243 New function prototype.
18244 (rs6000_quadword_masked_address_p): Likewise.
18245 (rs6000_gen_lvx): Likewise.
18246 (rs6000_gen_stvx): Likewise.
18247 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18248 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18249 when memory address is aligned.
18250 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18251 this split to select lvx instruction when memory address is aligned.
18252 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18253 instruction when memory address is aligned.
18254 (*vsx_le_perm_load_v16qi): Likewise.
18255 (four unnamed splitters): Modify to select the stvx instruction
18256 when memory is aligned.
18258 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
18260 * predict.c (determine_unlikely_bbs): Handle correctly BBs
18261 which appears in the queue multiple times.
18263 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18264 Alan Hayward <alan.hayward@arm.com>
18265 David Sherwood <david.sherwood@arm.com>
18267 * tree-vectorizer.h (vec_lower_bound): New structure.
18268 (_loop_vec_info): Add check_nonzero and lower_bounds.
18269 (LOOP_VINFO_CHECK_NONZERO): New macro.
18270 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18271 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18272 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18273 fields. Make seg_len the distance travelled, not including the
18275 (dr_direction_indicator): Declare.
18276 (dr_zero_step_indicator): Likewise.
18277 (dr_known_forward_stride_p): Likewise.
18278 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18280 (runtime_alias_check_p): Allow runtime alias checks with
18282 (operator ==): Compare access_size and align.
18283 (prune_runtime_alias_test_list): Rework for new distinction between
18284 the access_size and seg_len.
18285 (create_intersect_range_checks_index): Likewise. Cope with polynomial
18287 (get_segment_min_max): New function.
18288 (create_intersect_range_checks): Use it.
18289 (dr_step_indicator): New function.
18290 (dr_direction_indicator): Likewise.
18291 (dr_zero_step_indicator): Likewise.
18292 (dr_known_forward_stride_p): Likewise.
18293 * tree-loop-distribution.c (data_ref_segment_size): Return
18294 DR_STEP * (niters - 1).
18295 (compute_alias_check_pairs): Update call to the dr_with_seg_len
18297 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18298 (vect_preserves_scalar_order_p): New function, split out from...
18299 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
18300 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18301 (vect_vfa_access_size): New function.
18302 (vect_vfa_align): Likewise.
18303 (vect_compile_time_alias): Take access_size_a and access_b arguments.
18304 (dump_lower_bound): New function.
18305 (vect_check_lower_bound): Likewise.
18306 (vect_small_gap_p): Likewise.
18307 (vectorizable_with_step_bound_p): Likewise.
18308 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18309 depencies if the vectorization factor is 1. Convert the checks
18310 for nonzero steps into checks on the bounds of DR_STEP. Try using
18311 a bunds check for variable steps if the minimum required step is
18312 relatively small. Update calls to the dr_with_seg_len
18313 constructor and to vect_compile_time_alias.
18314 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18316 (vect_loop_versioning): Call it.
18317 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18319 (vect_estimate_min_profitable_iters): Account for any bounds checks.
18321 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18322 Alan Hayward <alan.hayward@arm.com>
18323 David Sherwood <david.sherwood@arm.com>
18325 * doc/sourcebuild.texi (vect_scatter_store): Document.
18326 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18328 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18330 * genopinit.c (main): Add supports_vec_scatter_store and
18331 supports_vec_scatter_store_cached to target_optabs.
18332 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18333 IFN_MASK_SCATTER_STORE.
18334 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18336 * internal-fn.h (internal_store_fn_p): Declare.
18337 (internal_fn_stored_value_index): Likewise.
18338 * internal-fn.c (scatter_store_direct): New macro.
18339 (expand_scatter_store_optab_fn): New function.
18340 (direct_scatter_store_optab_supported_p): New macro.
18341 (internal_store_fn_p): New function.
18342 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18343 IFN_MASK_SCATTER_STORE.
18344 (internal_fn_mask_index): Likewise.
18345 (internal_fn_stored_value_index): New function.
18346 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18347 for scatter stores.
18348 * optabs-query.h (supports_vec_scatter_store_p): Declare.
18349 * optabs-query.c (supports_vec_scatter_store_p): New function.
18350 * tree-vectorizer.h (vect_get_store_rhs): Declare.
18351 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18352 true for scatter stores.
18353 (vect_gather_scatter_fn_p): Handle scatter stores too.
18354 (vect_check_gather_scatter): Consider using scatter stores if
18355 supports_vec_scatter_store_p.
18356 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18357 scatter stores too.
18358 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18359 internal_fn_stored_value_index.
18360 (check_load_store_masking): Handle scatter stores too.
18361 (vect_get_store_rhs): Make public.
18362 (vectorizable_call): Use internal_store_fn_p.
18363 (vectorizable_store): Handle scatter store internal functions.
18364 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18365 when deciding whether the end of the group has been reached.
18366 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18367 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18368 (mask_scatter_store<mode>): New insns.
18370 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18371 Alan Hayward <alan.hayward@arm.com>
18372 David Sherwood <david.sherwood@arm.com>
18374 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18375 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18376 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18378 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18379 Use vect_truncate_gather_scatter_offset if we can't treat the
18380 operation as a normal gather load or scatter store.
18381 (get_group_load_store_type): Take the gather_scatter_info
18382 as argument. Try using a gather load or scatter store for
18383 single-element groups.
18384 (get_load_store_type): Update calls to get_group_load_store_type
18385 and vect_use_strided_gather_scatters_p.
18387 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18388 Alan Hayward <alan.hayward@arm.com>
18389 David Sherwood <david.sherwood@arm.com>
18391 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18392 optional tree argument.
18393 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18395 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18396 but continue to use the current value as a fallback.
18397 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18398 to compare the updates.
18399 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18400 (get_load_store_type): Use it when handling a strided access.
18401 (vect_get_strided_load_store_ops): New function.
18402 (vect_get_data_ptr_increment): Likewise.
18403 (vectorizable_load): Handle strided gather loads. Always pass
18404 a step to vect_create_data_ref_ptr and bump_vector_ptr.
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 * doc/md.texi (gather_load@var{m}): Document.
18411 (mask_gather_load@var{m}): Likewise.
18412 * genopinit.c (main): Add supports_vec_gather_load and
18413 supports_vec_gather_load_cached to target_optabs.
18414 * optabs-tree.c (init_tree_optimization_optabs): Use
18415 ggc_cleared_alloc to allocate target_optabs.
18416 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18417 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18419 * internal-fn.h (internal_load_fn_p): Declare.
18420 (internal_gather_scatter_fn_p): Likewise.
18421 (internal_fn_mask_index): Likewise.
18422 (internal_gather_scatter_fn_supported_p): Likewise.
18423 * internal-fn.c (gather_load_direct): New macro.
18424 (expand_gather_load_optab_fn): New function.
18425 (direct_gather_load_optab_supported_p): New macro.
18426 (direct_internal_fn_optab): New function.
18427 (internal_load_fn_p): Likewise.
18428 (internal_gather_scatter_fn_p): Likewise.
18429 (internal_fn_mask_index): Likewise.
18430 (internal_gather_scatter_fn_supported_p): Likewise.
18431 * optabs-query.c (supports_at_least_one_mode_p): New function.
18432 (supports_vec_gather_load_p): Likewise.
18433 * optabs-query.h (supports_vec_gather_load_p): Declare.
18434 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18435 and memory_type field.
18436 (NUM_PATTERNS): Bump to 15.
18437 * tree-vect-data-refs.c: Include internal-fn.h.
18438 (vect_gather_scatter_fn_p): New function.
18439 (vect_describe_gather_scatter_call): Likewise.
18440 (vect_check_gather_scatter): Try using internal functions for
18441 gather loads. Recognize existing calls to a gather load function.
18442 (vect_analyze_data_refs): Consider using gather loads if
18443 supports_vec_gather_load_p.
18444 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18445 (vect_get_gather_scatter_offset_type): Likewise.
18446 (vect_convert_mask_for_vectype): Likewise.
18447 (vect_add_conversion_to_patterm): Likewise.
18448 (vect_try_gather_scatter_pattern): Likewise.
18449 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18450 (vect_vect_recog_func_ptrs): Add it.
18451 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18452 internal_fn_mask_index and internal_gather_scatter_fn_p.
18453 (check_load_store_masking): Take the gather_scatter_info as an
18454 argument and handle gather loads.
18455 (vect_get_gather_scatter_ops): New function.
18456 (vectorizable_call): Check internal_load_fn_p.
18457 (vectorizable_load): Likewise. Handle gather load internal
18459 (vectorizable_store): Update call to check_load_store_masking.
18460 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18461 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18462 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18463 (aarch64_gather_scale_operand_d): New predicates.
18464 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18465 (mask_gather_load<mode>): New insns.
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 * optabs.def (fold_left_plus_optab): New optab.
18472 * doc/md.texi (fold_left_plus_@var{m}): Document.
18473 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18474 * internal-fn.c (fold_left_direct): Define.
18475 (expand_fold_left_optab_fn): Likewise.
18476 (direct_fold_left_optab_supported_p): Likewise.
18477 * fold-const-call.c (fold_const_fold_left): New function.
18478 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18479 * tree-parloops.c (valid_reduction_p): New function.
18480 (gather_scalar_reductions): Use it.
18481 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18482 (vect_finish_replace_stmt): Declare.
18483 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18484 (needs_fold_left_reduction_p): New function, split out from...
18485 (vect_is_simple_reduction): ...here. Accept reductions that
18486 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18487 (vect_force_simple_reduction): Also store the reduction type in
18488 the assignment's STMT_VINFO_REDUC_TYPE.
18489 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18490 (merge_with_identity): New function.
18491 (vect_expand_fold_left): Likewise.
18492 (vectorize_fold_left_reduction): Likewise.
18493 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18494 scalar phi in place for it. Check for target support and reject
18495 cases that would reassociate the operation. Defer the transform
18496 phase to vectorize_fold_left_reduction.
18497 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18498 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18499 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18501 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18503 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18504 call to ifc_temp_var.
18506 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18507 Alan Hayward <alan.hayward@arm.com>
18508 David Sherwood <david.sherwood@arm.com>
18510 * target.def (legitimize_address_displacement): Take the original
18511 offset as a poly_int.
18512 * targhooks.h (default_legitimize_address_displacement): Update
18514 * targhooks.c (default_legitimize_address_displacement): Likewise.
18515 * doc/tm.texi: Regenerate.
18516 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18517 as an argument, moving assert of ad->disp == ad->disp_term to...
18518 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18519 Try calling targetm.legitimize_address_displacement before expanding
18520 the address rather than afterwards, and adjust for the new interface.
18521 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18522 Match the new hook interface. Handle SVE addresses.
18523 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18524 new hook interface.
18526 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18528 * Makefile.in (OBJS): Add early-remat.o.
18529 * target.def (select_early_remat_modes): New hook.
18530 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18531 * doc/tm.texi: Regenerate.
18532 * targhooks.h (default_select_early_remat_modes): Declare.
18533 * targhooks.c (default_select_early_remat_modes): New function.
18534 * timevar.def (TV_EARLY_REMAT): New timevar.
18535 * passes.def (pass_early_remat): New pass.
18536 * tree-pass.h (make_pass_early_remat): Declare.
18537 * early-remat.c: New file.
18538 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18540 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18542 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18543 Alan Hayward <alan.hayward@arm.com>
18544 David Sherwood <david.sherwood@arm.com>
18546 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18547 vfm1 with a bound_epilog parameter.
18548 (vect_do_peeling): Update calls accordingly, and move the prologue
18549 call earlier in the function. Treat the base bound_epilog as 0 for
18550 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18551 this base when peeling for gaps.
18552 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18553 with fully-masked loops.
18554 (vect_estimate_min_profitable_iters): Handle the single peeled
18555 iteration in that case.
18557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18558 Alan Hayward <alan.hayward@arm.com>
18559 David Sherwood <david.sherwood@arm.com>
18561 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18562 single-element interleaving even if the size is not a power of 2.
18563 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18564 accesses for single-element interleaving if the group size is
18567 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18568 Alan Hayward <alan.hayward@arm.com>
18569 David Sherwood <david.sherwood@arm.com>
18571 * doc/md.texi (fold_extract_last_@var{m}): Document.
18572 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18573 * optabs.def (fold_extract_last_optab): New optab.
18574 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18575 * internal-fn.c (fold_extract_direct): New macro.
18576 (expand_fold_extract_optab_fn): Likewise.
18577 (direct_fold_extract_optab_supported_p): Likewise.
18578 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18579 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18580 EXTRACT_LAST_REDUCTION.
18581 (get_initial_def_for_reduction): Do not create an initial vector
18582 for EXTRACT_LAST_REDUCTION reductions.
18583 (vectorizable_reduction): Leave the scalar phi in place for
18584 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18585 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18586 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18587 transform phase to vectorizable_condition.
18588 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18590 (vect_finish_stmt_generation): ...here.
18591 (vect_finish_replace_stmt): New function.
18592 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18593 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18595 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18597 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18598 Alan Hayward <alan.hayward@arm.com>
18599 David Sherwood <david.sherwood@arm.com>
18601 * doc/md.texi (extract_last_@var{m}): Document.
18602 * optabs.def (extract_last_optab): New optab.
18603 * internal-fn.def (EXTRACT_LAST): New internal function.
18604 * internal-fn.c (cond_unary_direct): New macro.
18605 (expand_cond_unary_optab_fn): Likewise.
18606 (direct_cond_unary_optab_supported_p): Likewise.
18607 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18608 loops using EXTRACT_LAST.
18609 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18610 (extract_last_<mode>): ...this optab.
18611 (vec_extract<mode><Vel>): Update accordingly.
18613 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18614 Alan Hayward <alan.hayward@arm.com>
18615 David Sherwood <david.sherwood@arm.com>
18617 * target.def (empty_mask_is_expensive): New hook.
18618 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18619 * doc/tm.texi: Regenerate.
18620 * targhooks.h (default_empty_mask_is_expensive): Declare.
18621 * targhooks.c (default_empty_mask_is_expensive): New function.
18622 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18623 if the target says that empty masks are expensive.
18624 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18626 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18628 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18629 Alan Hayward <alan.hayward@arm.com>
18630 David Sherwood <david.sherwood@arm.com>
18632 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18633 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18634 (vect_use_loop_mask_for_alignment_p): New function.
18635 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18636 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18637 niters_skip argument. Make sure that the first niters_skip elements
18638 of the first iteration are inactive.
18639 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18640 Update call to vect_set_loop_masks_directly.
18641 (get_misalign_in_elems): New function, split out from...
18642 (vect_gen_prolog_loop_niters): ...here.
18643 (vect_update_init_of_dr): Take a code argument that specifies whether
18644 the adjustment should be added or subtracted.
18645 (vect_update_init_of_drs): Likewise.
18646 (vect_prepare_for_masked_peels): New function.
18647 (vect_do_peeling): Skip prologue peeling if we're using a mask
18648 instead. Update call to vect_update_inits_of_drs.
18649 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18651 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18652 alignment. Do not include the number of peeled iterations in
18653 the minimum threshold in that case.
18654 (vectorizable_induction): Adjust the start value down by
18655 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18656 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18657 Take the number of skipped iterations into account when calculating
18659 * tree-vect-stmts.c (vect_gen_while_not): New function.
18661 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18662 Alan Hayward <alan.hayward@arm.com>
18663 David Sherwood <david.sherwood@arm.com>
18665 * doc/sourcebuild.texi (vect_fully_masked): Document.
18666 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18667 default value to 0.
18668 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18670 (vect_analyze_loop_2): ...here. Don't check the vectorization
18671 factor against the number of loop iterations if the loop is
18674 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18675 Alan Hayward <alan.hayward@arm.com>
18676 David Sherwood <david.sherwood@arm.com>
18678 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18679 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18680 (dump_groups): Update accordingly.
18681 (iv_use::mem_type): New member variable.
18682 (address_p): New function.
18683 (record_use): Add a mem_type argument and initialize the new
18685 (record_group_use): Add a mem_type argument. Use address_p.
18686 Remove obsolete null checks of base_object. Update call to record_use.
18687 (find_interesting_uses_op): Update call to record_group_use.
18688 (find_interesting_uses_cond): Likewise.
18689 (find_interesting_uses_address): Likewise.
18690 (get_mem_type_for_internal_fn): New function.
18691 (find_address_like_use): Likewise.
18692 (find_interesting_uses_stmt): Try find_address_like_use before
18693 calling find_interesting_uses_op.
18694 (addr_offset_valid_p): Use the iv mem_type field as the type
18695 of the addressed memory.
18696 (add_autoinc_candidates): Likewise.
18697 (get_address_cost): Likewise.
18698 (split_small_address_groups_p): Use address_p.
18699 (split_address_groups): Likewise.
18700 (add_iv_candidate_for_use): Likewise.
18701 (autoinc_possible_for_pair): Likewise.
18702 (rewrite_groups): Likewise.
18703 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18704 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18705 (get_alias_ptr_type_for_ptr_address): New function.
18706 (rewrite_use_address): Rewrite address uses in calls that were
18707 identified by find_address_like_use.
18709 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18710 Alan Hayward <alan.hayward@arm.com>
18711 David Sherwood <david.sherwood@arm.com>
18713 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18715 * gimple-expr.h (is_gimple_addressable: Likewise.
18716 * gimple-expr.c (is_gimple_address): Likewise.
18717 * internal-fn.c (expand_call_mem_ref): New function.
18718 (expand_mask_load_optab_fn): Use it.
18719 (expand_mask_store_optab_fn): Likewise.
18721 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18722 Alan Hayward <alan.hayward@arm.com>
18723 David Sherwood <david.sherwood@arm.com>
18725 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18726 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18727 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18728 (cond_umax@var{mode}): Document.
18729 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18730 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18731 (cond_umin_optab, cond_umax_optab): New optabs.
18732 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18733 (COND_IOR, COND_XOR): New internal functions.
18734 * internal-fn.h (get_conditional_internal_fn): Declare.
18735 * internal-fn.c (cond_binary_direct): New macro.
18736 (expand_cond_binary_optab_fn): Likewise.
18737 (direct_cond_binary_optab_supported_p): Likewise.
18738 (get_conditional_internal_fn): New function.
18739 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18740 Cope with reduction statements that are vectorized as calls rather
18742 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18743 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18744 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18745 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18746 (UNSPEC_COND_EOR): New unspecs.
18747 (optab): Add mappings for them.
18748 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18749 (sve_int_op, sve_fp_op): New int attributes.
18751 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18752 Alan Hayward <alan.hayward@arm.com>
18753 David Sherwood <david.sherwood@arm.com>
18755 * optabs.def (while_ult_optab): New optab.
18756 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18757 * internal-fn.def (WHILE_ULT): New internal function.
18758 * internal-fn.h (direct_internal_fn_supported_p): New override
18759 that takes two types as argument.
18760 * internal-fn.c (while_direct): New macro.
18761 (expand_while_optab_fn): New function.
18762 (convert_optab_supported_p): Likewise.
18763 (direct_while_optab_supported_p): New macro.
18764 * wide-int.h (wi::udiv_ceil): New function.
18765 * tree-vectorizer.h (rgroup_masks): New structure.
18766 (vec_loop_masks): New typedef.
18767 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18768 and fully_masked_p.
18769 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18770 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18771 (vect_max_vf): New function.
18772 (slpeel_make_loop_iterate_ntimes): Delete.
18773 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18774 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18775 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18776 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18777 internal-fn.h, stor-layout.h and optabs-query.h.
18778 (vect_set_loop_mask): New function.
18779 (add_preheader_seq): Likewise.
18780 (add_header_seq): Likewise.
18781 (interleave_supported_p): Likewise.
18782 (vect_maybe_permute_loop_masks): Likewise.
18783 (vect_set_loop_masks_directly): Likewise.
18784 (vect_set_loop_condition_masked): Likewise.
18785 (vect_set_loop_condition_unmasked): New function, split out from
18786 slpeel_make_loop_iterate_ntimes.
18787 (slpeel_make_loop_iterate_ntimes): Rename to..
18788 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18789 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18790 (vect_do_peeling): Update call accordingly.
18791 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18793 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18794 mask_compare_type, can_fully_mask_p and fully_masked_p.
18795 (release_vec_loop_masks): New function.
18796 (_loop_vec_info): Use it to free the loop masks.
18797 (can_produce_all_loop_masks_p): New function.
18798 (vect_get_max_nscalars_per_iter): Likewise.
18799 (vect_verify_full_masking): Likewise.
18800 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18801 retries, and free the mask rgroups before retrying. Check loop-wide
18802 reasons for disallowing fully-masked loops. Make the final decision
18803 about whether use a fully-masked loop or not.
18804 (vect_estimate_min_profitable_iters): Do not assume that peeling
18805 for the number of iterations will be needed for fully-masked loops.
18806 (vectorizable_reduction): Disable fully-masked loops.
18807 (vectorizable_live_operation): Likewise.
18808 (vect_halve_mask_nunits): New function.
18809 (vect_double_mask_nunits): Likewise.
18810 (vect_record_loop_mask): Likewise.
18811 (vect_get_loop_mask): Likewise.
18812 (vect_transform_loop): Handle the case in which the final loop
18813 iteration might handle a partial vector. Call vect_set_loop_condition
18814 instead of slpeel_make_loop_iterate_ntimes.
18815 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18816 (check_load_store_masking): New function.
18817 (prepare_load_store_mask): Likewise.
18818 (vectorizable_store): Handle fully-masked loops.
18819 (vectorizable_load): Likewise.
18820 (supportable_widening_operation): Use vect_halve_mask_nunits for
18822 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18823 (vect_gen_while): New function.
18824 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18825 (aarch64_uqdec<mode>): New insn.
18827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18828 Alan Hayward <alan.hayward@arm.com>
18829 David Sherwood <david.sherwood@arm.com>
18831 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18832 (reduc_xor_scal_optab): New optabs.
18833 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18834 (reduc_xor_scal_@var{m}): Document.
18835 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18836 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18837 internal functions.
18838 * fold-const-call.c (fold_const_call): Handle them.
18839 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18840 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18841 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18842 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18843 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18844 (UNSPEC_XORV): New unspecs.
18845 (optab): Add entries for them.
18846 (BITWISEV): New int iterator.
18847 (bit_reduc_op): New int attributes.
18849 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18850 Alan Hayward <alan.hayward@arm.com>
18851 David Sherwood <david.sherwood@arm.com>
18853 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18854 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18855 * optabs.def (vec_shl_insert_optab): New optab.
18856 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18857 (duplicate_and_interleave): Likewise.
18858 * tree-vect-loop.c: Include internal-fn.h.
18859 (neutral_op_for_slp_reduction): New function, split out from
18860 get_initial_defs_for_reduction.
18861 (get_initial_def_for_reduction): Handle option 2 for variable-length
18862 vectors by loading the neutral value into a vector and then shifting
18863 the initial value into element 0.
18864 (get_initial_defs_for_reduction): Replace the code argument with
18865 the neutral value calculated by neutral_op_for_slp_reduction.
18866 Use gimple_build_vector for constant-length vectors.
18867 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18868 but the first group_size elements have a neutral value.
18869 Use duplicate_and_interleave otherwise.
18870 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18871 Update call to get_initial_defs_for_reduction. Handle SLP
18872 reductions for variable-length vectors by creating one vector
18873 result for each scalar result, with the elements associated
18874 with other scalar results stubbed out with the neutral value.
18875 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18876 Require IFN_VEC_SHL_INSERT for double reductions on
18877 variable-length vectors, or SLP reductions that have
18878 a neutral value. Require can_duplicate_and_interleave_p
18879 support for variable-length unchained SLP reductions if there
18880 is no neutral value, such as for MIN/MAX reductions. Also require
18881 the number of vector elements to be a multiple of the number of
18882 SLP statements when doing variable-length unchained SLP reductions.
18883 Update call to vect_create_epilog_for_reduction.
18884 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18885 and remove initial values.
18886 (duplicate_and_interleave): Make public.
18887 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18888 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18890 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18891 Alan Hayward <alan.hayward@arm.com>
18892 David Sherwood <david.sherwood@arm.com>
18894 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18895 (can_duplicate_and_interleave_p): New function.
18896 (vect_get_and_check_slp_defs): Take the vector of statements
18897 rather than just the current one. Remove excess parentheses.
18898 Restriction rejectinon of vect_constant_def and vect_external_def
18899 for variable-length vectors to boolean types, or types for which
18900 can_duplicate_and_interleave_p is false.
18901 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18902 (duplicate_and_interleave): New function.
18903 (vect_get_constant_vectors): Use gimple_build_vector for
18904 constant-length vectors and suitable variable-length constant
18905 vectors. Use duplicate_and_interleave for other variable-length
18906 vectors. Don't defer the update when inserting new statements.
18908 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18909 Alan Hayward <alan.hayward@arm.com>
18910 David Sherwood <david.sherwood@arm.com>
18912 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18913 min_profitable_iters doesn't go negative.
18915 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18916 Alan Hayward <alan.hayward@arm.com>
18917 David Sherwood <david.sherwood@arm.com>
18919 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18920 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18921 * optabs.def (vec_mask_load_lanes_optab): New optab.
18922 (vec_mask_store_lanes_optab): Likewise.
18923 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18924 (MASK_STORE_LANES): Likewise.
18925 * internal-fn.c (mask_load_lanes_direct): New macro.
18926 (mask_store_lanes_direct): Likewise.
18927 (expand_mask_load_optab_fn): Handle masked operations.
18928 (expand_mask_load_lanes_optab_fn): New macro.
18929 (expand_mask_store_optab_fn): Handle masked operations.
18930 (expand_mask_store_lanes_optab_fn): New macro.
18931 (direct_mask_load_lanes_optab_supported_p): Likewise.
18932 (direct_mask_store_lanes_optab_supported_p): Likewise.
18933 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18935 (vect_load_lanes_supported): Likewise.
18936 * tree-vect-data-refs.c (strip_conversion): New function.
18937 (can_group_stmts_p): Likewise.
18938 (vect_analyze_data_ref_accesses): Use it instead of checking
18939 for a pair of assignments.
18940 (vect_store_lanes_supported): Take a masked_p parameter.
18941 (vect_load_lanes_supported): Likewise.
18942 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18943 vect_store_lanes_supported and vect_load_lanes_supported.
18944 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18945 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18946 parameter. Don't allow gaps for masked accesses.
18947 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18948 and vect_load_lanes_supported.
18949 (get_load_store_type): Take a masked_p parameter and update
18950 call to get_group_load_store_type.
18951 (vectorizable_store): Update call to get_load_store_type.
18952 Handle IFN_MASK_STORE_LANES.
18953 (vectorizable_load): Update call to get_load_store_type.
18954 Handle IFN_MASK_LOAD_LANES.
18956 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18957 Alan Hayward <alan.hayward@arm.com>
18958 David Sherwood <david.sherwood@arm.com>
18960 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18962 * config/aarch64/aarch64-protos.h
18963 (aarch64_sve_struct_memory_operand_p): Declare.
18964 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18965 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18966 (VPRED, vpred): Handle SVE structure modes.
18967 * config/aarch64/constraints.md (Utx): New constraint.
18968 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18969 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18970 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18971 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18972 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18973 structure modes. Split into pieces after RA.
18974 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18975 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18977 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18978 SVE structure modes.
18979 (aarch64_classify_address): Likewise.
18980 (sizetochar): Move earlier in file.
18981 (aarch64_print_operand): Handle SVE register lists.
18982 (aarch64_array_mode): New function.
18983 (aarch64_sve_struct_memory_operand_p): Likewise.
18984 (TARGET_ARRAY_MODE): Redefine.
18986 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18987 Alan Hayward <alan.hayward@arm.com>
18988 David Sherwood <david.sherwood@arm.com>
18990 * target.def (array_mode): New target hook.
18991 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18992 * doc/tm.texi: Regenerate.
18993 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18994 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18995 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18996 targetm.array_mode.
18997 * stor-layout.c (mode_for_array): Likewise. Support polynomial
19000 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19001 Alan Hayward <alan.hayward@arm.com>
19002 David Sherwood <david.sherwood@arm.com>
19004 * fold-const.c (fold_binary_loc): Check the argument types
19005 rather than the result type when testing for a vector operation.
19007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19009 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19010 * doc/tm.texi: Regenerate.
19012 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19013 Alan Hayward <alan.hayward@arm.com>
19014 David Sherwood <david.sherwood@arm.com>
19016 * doc/invoke.texi (-msve-vector-bits=): Document new option.
19017 (sve): Document new AArch64 extension.
19018 * doc/md.texi (w): Extend the description of the AArch64
19019 constraint to include SVE vectors.
19020 (Upl, Upa): Document new AArch64 predicate constraints.
19021 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19023 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19024 (msve-vector-bits=): New option.
19025 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19026 SVE when these are disabled.
19027 (sve): New extension.
19028 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19029 modes. Adjust their number of units based on aarch64_sve_vg.
19030 (MAX_BITSIZE_MODE_ANY_MODE): Define.
19031 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19032 aarch64_addr_query_type.
19033 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19034 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19035 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19036 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19037 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19038 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19039 (aarch64_simd_imm_zero_p): Delete.
19040 (aarch64_check_zero_based_sve_index_immediate): Declare.
19041 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19042 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19043 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19044 (aarch64_sve_float_mul_immediate_p): Likewise.
19045 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19046 rather than an rtx.
19047 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19048 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19049 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19050 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19051 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19052 (aarch64_regmode_natural_size): Likewise.
19053 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19054 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19056 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19057 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19058 for VG and the SVE predicate registers.
19059 (V_ALIASES): Add a "z"-prefixed alias.
19060 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19061 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19062 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19063 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19064 (REG_CLASS_NAMES): Add entries for them.
19065 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
19066 and the predicate registers.
19067 (aarch64_sve_vg): Declare.
19068 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19069 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19070 (REGMODE_NATURAL_SIZE): Define.
19071 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19073 * config/aarch64/aarch64.c: Include cfgrtl.h.
19074 (simd_immediate_info): Add a constructor for series vectors,
19075 and an associated step field.
19076 (aarch64_sve_vg): New variable.
19077 (aarch64_dbx_register_number): Handle VG and the predicate registers.
19078 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19079 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19080 (VEC_ANY_DATA, VEC_STRUCT): New constants.
19081 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19082 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19083 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19084 (aarch64_get_mask_mode): New functions.
19085 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19086 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19087 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
19088 predicate modes and predicate registers. Explicitly restrict
19089 GPRs to modes of 16 bytes or smaller. Only allow FP registers
19090 to store a vector mode if it is recognized by
19091 aarch64_classify_vector_mode.
19092 (aarch64_regmode_natural_size): New function.
19093 (aarch64_hard_regno_caller_save_mode): Return the original mode
19095 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19096 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19097 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19098 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19100 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
19101 does not overlap dest if the function is frame-related. Handle
19103 (aarch64_split_add_offset): New function.
19104 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19105 them aarch64_add_offset.
19106 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19107 and update call to aarch64_sub_sp.
19108 (aarch64_add_cfa_expression): New function.
19109 (aarch64_expand_prologue): Pass extra temporary registers to the
19110 functions above. Handle the case in which we need to emit new
19111 DW_CFA_expressions for registers that were originally saved
19112 relative to the stack pointer, but now have to be expressed
19113 relative to the frame pointer.
19114 (aarch64_output_mi_thunk): Pass extra temporary registers to the
19116 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
19117 IP0 and IP1 values for SVE frames.
19118 (aarch64_expand_vec_series): New function.
19119 (aarch64_expand_sve_widened_duplicate): Likewise.
19120 (aarch64_expand_sve_const_vector): Likewise.
19121 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19122 Handle SVE constants. Use emit_move_insn to move a force_const_mem
19123 into the register, rather than emitting a SET directly.
19124 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19125 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19126 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19127 (offset_9bit_signed_scaled_p): New functions.
19128 (aarch64_replicate_bitmask_imm): New function.
19129 (aarch64_bitmask_imm): Use it.
19130 (aarch64_cannot_force_const_mem): Reject expressions involving
19131 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
19132 (aarch64_classify_index): Handle SVE indices, by requiring
19133 a plain register index with a scale that matches the element size.
19134 (aarch64_classify_address): Handle SVE addresses. Assert that
19135 the mode of the address is VOIDmode or an integer mode.
19136 Update call to aarch64_classify_symbol.
19137 (aarch64_classify_symbolic_expression): Update call to
19138 aarch64_classify_symbol.
19139 (aarch64_const_vec_all_in_range_p): New function.
19140 (aarch64_print_vector_float_operand): Likewise.
19141 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
19142 "vN" for FP registers with SVE modes. Handle (const ...) vectors
19143 and the FP immediates 1.0 and 0.5.
19144 (aarch64_print_address_internal): Handle SVE addresses.
19145 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19146 (aarch64_regno_regclass): Handle predicate registers.
19147 (aarch64_secondary_reload): Handle big-endian reloads of SVE
19149 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19150 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19151 (aarch64_convert_sve_vector_bits): New function.
19152 (aarch64_override_options): Use it to handle -msve-vector-bits=.
19153 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19154 rather than an rtx.
19155 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19156 Handle SVE vector and predicate modes. Accept VL-based constants
19157 that need only one temporary register, and VL offsets that require
19158 no temporary registers.
19159 (aarch64_conditional_register_usage): Mark the predicate registers
19160 as fixed if SVE isn't available.
19161 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19162 Return true for SVE vector and predicate modes.
19163 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19164 rather than an unsigned int. Handle SVE modes.
19165 (aarch64_preferred_simd_mode): Update call accordingly. Handle
19167 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19169 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19170 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19171 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19172 (aarch64_sve_float_mul_immediate_p): New functions.
19173 (aarch64_sve_valid_immediate): New function.
19174 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19175 Explicitly reject structure modes. Check for INDEX constants.
19176 Handle PTRUE and PFALSE constants.
19177 (aarch64_check_zero_based_sve_index_immediate): New function.
19178 (aarch64_simd_imm_zero_p): Delete.
19179 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19180 vector modes. Accept constants in the range of CNT[BHWD].
19181 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19182 ask for an Advanced SIMD mode.
19183 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19184 (aarch64_simd_vector_alignment): Handle SVE predicates.
19185 (aarch64_vectorize_preferred_vector_alignment): New function.
19186 (aarch64_simd_vector_alignment_reachable): Use it instead of
19188 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19189 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19191 (MAX_VECT_LEN): Delete.
19192 (expand_vec_perm_d): Add a vec_flags field.
19193 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19194 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19195 (aarch64_evpc_ext): Don't apply a big-endian lane correction
19197 (aarch64_evpc_rev): Rename to...
19198 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
19199 (aarch64_evpc_rev_global): New function.
19200 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19201 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19203 (aarch64_evpc_sve_tbl): New function.
19204 (aarch64_expand_vec_perm_const_1): Update after rename of
19205 aarch64_evpc_rev. Handle SVE permutes too, trying
19206 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19207 than aarch64_evpc_tbl.
19208 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19209 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19210 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19211 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19212 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19213 (aarch64_expand_sve_vcond): New functions.
19214 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19215 of aarch64_vector_mode_p.
19216 (aarch64_dwarf_poly_indeterminate_value): New function.
19217 (aarch64_compute_pressure_classes): Likewise.
19218 (aarch64_can_change_mode_class): Likewise.
19219 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19220 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19221 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19222 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19223 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19224 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19225 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19226 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19228 (Dn, Dl, Dr): Accept const as well as const_vector.
19229 (Dz): Likewise. Compare against CONST0_RTX.
19230 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19231 of "vector" where appropriate.
19232 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19233 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19234 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19235 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19236 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19237 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19238 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19239 (v_int_equiv): Extend to SVE modes.
19240 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19242 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19243 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19244 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19245 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19246 (SVE_COND_FP_CMP): New int iterators.
19247 (perm_hilo): Handle the new unpack unspecs.
19248 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19250 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19251 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19252 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19253 (aarch64_equality_operator, aarch64_constant_vector_operand)
19254 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19255 (aarch64_sve_nonimmediate_operand): Likewise.
19256 (aarch64_sve_general_operand): Likewise.
19257 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19258 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19259 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19260 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19261 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19262 (aarch64_sve_float_arith_immediate): Likewise.
19263 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19264 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19265 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19266 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19267 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19268 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19269 (aarch64_sve_float_arith_operand): Likewise.
19270 (aarch64_sve_float_arith_with_sub_operand): Likewise.
19271 (aarch64_sve_float_mul_operand): Likewise.
19272 (aarch64_sve_vec_perm_operand): Likewise.
19273 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19274 (aarch64_mov_operand): Accept const_poly_int and const_vector.
19275 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19276 as well as const_vector.
19277 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19278 in file. Use CONST0_RTX and CONSTM1_RTX.
19279 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
19280 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19281 Use aarch64_simd_imm_zero.
19282 * config/aarch64/aarch64-sve.md: New file.
19283 * config/aarch64/aarch64.md: Include it.
19284 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19285 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19286 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19287 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19288 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19289 (sve): New attribute.
19290 (enabled): Disable instructions with the sve attribute unless
19292 (movqi, movhi): Pass CONST_POLY_INT operaneds through
19293 aarch64_expand_mov_immediate.
19294 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19295 CNT[BHSD] immediates.
19296 (movti): Split CONST_POLY_INT moves into two halves.
19297 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19298 Split additions that need a temporary here if the destination
19299 is the stack pointer.
19300 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19301 (*add<mode>3_poly_1): New instruction.
19302 (set_clobber_cc): New expander.
19304 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19306 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19307 parameter and use it instead of GET_MODE_SIZE (innermode). Use
19308 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19309 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19310 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
19311 Change innermode from fixed_mode_size to machine_mode.
19312 (simplify_subreg): Update call accordingly. Handle a constant-sized
19313 subreg of a variable-length CONST_VECTOR.
19315 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19316 Alan Hayward <alan.hayward@arm.com>
19317 David Sherwood <david.sherwood@arm.com>
19319 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19320 (add_offset_to_base): New function, split out from...
19321 (create_mem_ref): ...here. When handling a scale other than 1,
19322 check first whether the address is valid without the offset.
19323 Add it into the base if so, leaving the index and scale as-is.
19325 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19328 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19329 fold_for_warn before checking if arg2 is INTEGER_CST.
19331 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
19333 * config/rs6000/predicates.md (load_multiple_operation): Delete.
19334 (store_multiple_operation): Delete.
19335 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19336 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19337 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19338 guarded by TARGET_STRING.
19339 (rs6000_output_load_multiple): Delete.
19340 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19341 OPTION_MASK_STRING / TARGET_STRING handling.
19342 (print_operand) <'N', 'O'>: Add comment that these are unused now.
19343 (const rs6000_opt_masks) <"string">: Change mask to 0.
19344 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19345 (MASK_STRING): Delete.
19346 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19348 (load_multiple): Delete.
19355 (store_multiple): Delete.
19362 (movmemsi_8reg): Delete.
19363 (corresponding unnamed define_insn): Delete.
19364 (movmemsi_6reg): Delete.
19365 (corresponding unnamed define_insn): Delete.
19366 (movmemsi_4reg): Delete.
19367 (corresponding unnamed define_insn): Delete.
19368 (movmemsi_2reg): Delete.
19369 (corresponding unnamed define_insn): Delete.
19370 (movmemsi_1reg): Delete.
19371 (corresponding unnamed define_insn): Delete.
19372 * config/rs6000/rs6000.opt (mno-string): New.
19373 (mstring): Replace by deprecation warning stub.
19374 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19376 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19378 * regrename.c (regrename_do_replace): If replacing the same
19379 reg multiple times, try to reuse last created gen_raw_REG.
19382 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19383 main to workaround a bug in GDB.
19385 2018-01-12 Tom de Vries <tom@codesourcery.com>
19388 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19390 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
19392 PR rtl-optimization/80481
19393 * ira-color.c (get_cap_member): New function.
19394 (allocnos_conflict_by_live_ranges_p): Use it.
19395 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19396 (setup_slot_coalesced_allocno_live_ranges): Ditto.
19398 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
19401 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19402 (*saddl_se_1): Ditto.
19403 (*ssubsi_1): Ditto.
19404 (*ssubl_se_1): Ditto.
19406 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19408 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19409 rather than wi::to_widest for DR_INITs.
19410 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19411 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19412 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19414 (vect_analyze_group_access_1): Note that here.
19416 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19418 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19419 polynomial type sizes.
19421 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19423 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19424 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19425 (gimple_add_tmp_var): Likewise.
19427 2018-01-12 Martin Liska <mliska@suse.cz>
19429 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19430 (gimple_alloc_sizes): Likewise.
19431 (dump_gimple_statistics): Use PRIu64 in printf format.
19432 * gimple.h: Change uint64_t to int.
19434 2018-01-12 Martin Liska <mliska@suse.cz>
19436 * tree-core.h: Use uint64_t instead of int.
19437 * tree.c (tree_node_counts): Likewise.
19438 (tree_node_sizes): Likewise.
19439 (dump_tree_statistics): Use PRIu64 in printf format.
19441 2018-01-12 Martin Liska <mliska@suse.cz>
19443 * Makefile.in: As qsort_chk is implemented in vec.c, add
19444 vec.o to linkage of gencfn-macros.
19445 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19446 passing the info to record_node_allocation_statistics.
19447 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19449 * ggc-common.c (struct ggc_usage): Add operator== and use
19450 it in operator< and compare function.
19451 * mem-stats.h (struct mem_usage): Likewise.
19452 * vec.c (struct vec_usage): Remove operator< and compare
19453 function. Can be simply inherited.
19455 2018-01-12 Martin Jambor <mjambor@suse.cz>
19458 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19459 * tree-ssa-math-opts.c: Include domwalk.h.
19460 (convert_mult_to_fma_1): New function.
19461 (fma_transformation_info): New type.
19462 (fma_deferring_state): Likewise.
19463 (cancel_fma_deferring): New function.
19464 (result_of_phi): Likewise.
19465 (last_fma_candidate_feeds_initial_phi): Likewise.
19466 (convert_mult_to_fma): Added deferring logic, split actual
19467 transformation to convert_mult_to_fma_1.
19468 (math_opts_dom_walker): New type.
19469 (math_opts_dom_walker::after_dom_children): New method, body moved
19470 here from pass_optimize_widening_mul::execute, added deferring logic
19472 (pass_optimize_widening_mul::execute): Moved most of code to
19473 math_opts_dom_walker::after_dom_children.
19474 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19475 * config/i386/i386.c (ix86_option_override_internal): Added
19476 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19478 2018-01-12 Richard Biener <rguenther@suse.de>
19481 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19482 inline instance vars.
19484 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19487 * config/rx/rx.c (rx_is_restricted_memory_address):
19488 Handle SUBREG case.
19490 2018-01-12 Richard Biener <rguenther@suse.de>
19492 PR tree-optimization/80846
19493 * target.def (split_reduction): New target hook.
19494 * targhooks.c (default_split_reduction): New function.
19495 * targhooks.h (default_split_reduction): Declare.
19496 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19497 target requests first reduce vectors by combining low and high
19499 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19500 (get_vectype_for_scalar_type_and_size): Export.
19501 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19502 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19503 * doc/tm.texi: Regenerate.
19504 * config/i386/i386.c (ix86_split_reduction): Implement
19505 TARGET_VECTORIZE_SPLIT_REDUCTION.
19507 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19510 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19511 in PIC mode except for TARGET_VXWORKS_RTP.
19512 * config/sparc/sparc.c: Include cfgrtl.h.
19513 (TARGET_INIT_PIC_REG): Define.
19514 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19515 (sparc_pic_register_p): New predicate.
19516 (sparc_legitimate_address_p): Use it.
19517 (sparc_legitimize_pic_address): Likewise.
19518 (sparc_delegitimize_address): Likewise.
19519 (sparc_mode_dependent_address_p): Likewise.
19520 (gen_load_pcrel_sym): Remove 4th parameter.
19521 (load_got_register): Adjust call to above. Remove obsolete stuff.
19522 (sparc_expand_prologue): Do not call load_got_register here.
19523 (sparc_flat_expand_prologue): Likewise.
19524 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19525 (sparc_use_pseudo_pic_reg): New function.
19526 (sparc_init_pic_reg): Likewise.
19527 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19528 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19530 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19532 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19533 Add item for branch_cost.
19535 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19537 PR rtl-optimization/83565
19538 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19539 not extend the result to a larger mode for rotate operations.
19540 (num_sign_bit_copies1): Likewise.
19542 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19545 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19547 Use values-Xc.o for -pedantic.
19548 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19550 2018-01-12 Martin Liska <mliska@suse.cz>
19553 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19555 (possible_polymorphic_call_targets): Use it.
19556 (ipa_devirt): Likewise.
19558 2018-01-12 Martin Liska <mliska@suse.cz>
19560 * profile-count.h (enum profile_quality): Use 0 as invalid
19561 enum value of profile_quality.
19563 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19565 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19566 -mext-string options.
19568 2018-01-12 Richard Biener <rguenther@suse.de>
19570 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19571 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19572 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19574 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19576 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19578 * configure.ac (--with-long-double-format): Add support for the
19579 configuration option to change the default long double format on
19581 * config.gcc (powerpc*-linux*-*): Likewise.
19582 * configure: Regenerate.
19583 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19584 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19585 used without modification.
19587 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19589 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19590 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19591 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19592 MISC_BUILTIN_SPEC_BARRIER.
19593 (rs6000_init_builtins): Likewise.
19594 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19596 (speculation_barrier): New define_insn.
19597 * doc/extend.texi: Document __builtin_speculation_barrier.
19599 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19602 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19603 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19604 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19606 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19607 integral modes instead of "ss" and "sd".
19608 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19609 vectors with 32-bit and 64-bit elements.
19610 (vecdupssescalarmodesuffix): New mode attribute.
19611 (vec_dup<mode>): Use it.
19613 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19616 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19617 frame if argument is passed on stack.
19619 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19622 * ree.c (combine_reaching_defs): Optimize also
19623 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19624 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19626 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19628 PR middle-end/83189
19629 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19631 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19633 PR middle-end/83718
19634 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19635 after they are computed.
19637 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19639 PR tree-optimization/83695
19640 * gimple-loop-linterchange.cc
19641 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19642 reset cached scev information after interchange.
19643 (pass_linterchange::execute): Remove call to scev_reset_htab.
19645 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19647 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19648 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19649 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19650 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19651 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19652 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19653 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19654 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19655 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19656 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19657 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19658 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19659 (V_lane_reg): Likewise.
19660 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19662 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19663 (vfmal_lane_low<mode>_intrinsic,
19664 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19665 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19666 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19667 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19668 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19669 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19671 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19673 * config/arm/arm-cpus.in (fp16fml): New feature.
19674 (ALL_SIMD): Add fp16fml.
19675 (armv8.2-a): Add fp16fml as an option.
19676 (armv8.3-a): Likewise.
19677 (armv8.4-a): Add fp16fml as part of fp16.
19678 * config/arm/arm.h (TARGET_FP16FML): Define.
19679 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19681 * config/arm/arm-modes.def (V2HF): Define.
19682 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19683 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19684 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19685 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19686 vfmsl_low, vfmsl_high): New set of builtins.
19687 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19688 (vfml_op): New code attribute.
19689 (VFMLHALVES): New int iterator.
19690 (VFML, VFMLSEL): New mode attributes.
19691 (V_reg): Define mapping for V2HF.
19692 (V_hi, V_lo): New mode attributes.
19693 (VF_constraint): Likewise.
19694 (vfml_half, vfml_half_selector): New int attributes.
19695 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19697 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19698 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19700 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19701 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19702 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19703 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19705 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19706 Document new effective target and option set.
19708 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19710 * config/arm/arm-cpus.in (armv8_4): New feature.
19711 (ARMv8_4a): New fgroup.
19712 (armv8.4-a): New arch.
19713 * config/arm/arm-tables.opt: Regenerate.
19714 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19715 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19716 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19717 Add matching rules for -march=armv8.4-a and extensions.
19718 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19720 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19723 * config/rx/rx.md (BW): New mode attribute.
19724 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19726 2018-01-11 Richard Biener <rguenther@suse.de>
19728 PR tree-optimization/83435
19729 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19730 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19731 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19733 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19734 Alan Hayward <alan.hayward@arm.com>
19735 David Sherwood <david.sherwood@arm.com>
19737 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19739 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19740 (aarch64_print_address_internal): Use it to check for a zero offset.
19742 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19743 Alan Hayward <alan.hayward@arm.com>
19744 David Sherwood <david.sherwood@arm.com>
19746 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19747 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19748 Return a poly_int64 rather than a HOST_WIDE_INT.
19749 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19750 rather than a HOST_WIDE_INT.
19751 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19752 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19753 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19754 final_offset from HOST_WIDE_INT to poly_int64.
19755 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19756 to_constant when getting the number of units in an Advanced SIMD
19758 (aarch64_builtin_vectorized_function): Check for a constant number
19760 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19762 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19763 attribute instead of GET_MODE_NUNITS.
19764 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19765 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19766 GET_MODE_SIZE for fixed-size registers.
19767 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19768 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19769 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19770 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19771 (aarch64_print_operand, aarch64_print_address_internal)
19772 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19773 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19774 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19775 Handle polynomial GET_MODE_SIZE.
19776 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19777 wider than SImode without modification.
19778 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19779 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19780 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19781 passing and returning SVE modes.
19782 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19783 rather than GEN_INT.
19784 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19785 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19786 (aarch64_allocate_and_probe_stack_space): Likewise.
19787 (aarch64_layout_frame): Cope with polynomial offsets.
19788 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19789 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19790 polynomial offsets.
19791 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19792 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19793 poly_int64 rather than a HOST_WIDE_INT.
19794 (aarch64_get_separate_components, aarch64_process_components)
19795 (aarch64_expand_prologue, aarch64_expand_epilogue)
19796 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19797 (aarch64_anchor_offset): New function, split out from...
19798 (aarch64_legitimize_address): ...here.
19799 (aarch64_builtin_vectorization_cost): Handle polynomial
19800 TYPE_VECTOR_SUBPARTS.
19801 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19803 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19804 number of elements from the PARALLEL rather than the mode.
19805 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19806 rather than GET_MODE_BITSIZE.
19807 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19808 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19809 (aarch64_expand_vec_perm_const_1): Handle polynomial
19810 d->perm.length () and d->perm elements.
19811 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19812 Apply to_constant to d->perm elements.
19813 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19814 polynomial CONST_VECTOR_NUNITS.
19815 (aarch64_move_pointer): Take amount as a poly_int64 rather
19817 (aarch64_progress_pointer): Avoid temporary variable.
19818 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19819 the mode attribute instead of GET_MODE.
19821 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19822 Alan Hayward <alan.hayward@arm.com>
19823 David Sherwood <david.sherwood@arm.com>
19825 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19826 x exists before using it.
19827 (aarch64_add_constant_internal): Rename to...
19828 (aarch64_add_offset_1): ...this. Replace regnum with separate
19829 src and dest rtxes. Handle the case in which they're different,
19830 including when the offset is zero. Replace scratchreg with an rtx.
19831 Use 2 additions if there is no spare register into which we can
19832 move a 16-bit constant.
19833 (aarch64_add_constant): Delete.
19834 (aarch64_add_offset): Replace reg with separate src and dest
19835 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19836 Use aarch64_add_offset_1.
19837 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19838 an rtx rather than an int. Take the delta as a poly_int64
19839 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19840 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19841 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19842 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19843 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19844 and aarch64_add_sp.
19845 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19846 aarch64_add_constant.
19848 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19850 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19851 Use scalar_float_mode.
19853 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19855 * config/aarch64/aarch64-simd.md
19856 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19857 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19858 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19859 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19860 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19861 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19862 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19863 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19864 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19865 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19867 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19870 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19871 targ_options->x_arm_arch_string is non NULL.
19873 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19875 * config/aarch64/aarch64.h
19876 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19878 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19881 * expmed.c (emit_store_flag_force): Swap if const op0
19882 and change VOIDmode to mode of op0.
19884 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19886 PR rtl-optimization/83761
19887 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19888 than bytes to mode_for_size.
19890 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19892 PR middle-end/83189
19893 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19894 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19897 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19899 PR middle-end/83575
19900 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19901 when in layout mode.
19902 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19903 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19906 2018-01-10 Michael Collison <michael.collison@arm.com>
19908 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19909 * config/aarch64/aarch64-option-extension.def: Add
19910 AARCH64_OPT_EXTENSION of 'fp16fml'.
19911 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19912 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19913 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19914 * config/aarch64/constraints.md (Ui7): New constraint.
19915 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19916 (VFMLA_SEL_W): Ditto.
19919 (VFMLA16_LOW): New int iterator.
19920 (VFMLA16_HIGH): Ditto.
19921 (UNSPEC_FMLAL): New unspec.
19922 (UNSPEC_FMLSL): Ditto.
19923 (UNSPEC_FMLAL2): Ditto.
19924 (UNSPEC_FMLSL2): Ditto.
19925 (f16mac): New code attribute.
19926 * config/aarch64/aarch64-simd-builtins.def
19927 (aarch64_fmlal_lowv2sf): Ditto.
19928 (aarch64_fmlsl_lowv2sf): Ditto.
19929 (aarch64_fmlalq_lowv4sf): Ditto.
19930 (aarch64_fmlslq_lowv4sf): Ditto.
19931 (aarch64_fmlal_highv2sf): Ditto.
19932 (aarch64_fmlsl_highv2sf): Ditto.
19933 (aarch64_fmlalq_highv4sf): Ditto.
19934 (aarch64_fmlslq_highv4sf): Ditto.
19935 (aarch64_fmlal_lane_lowv2sf): Ditto.
19936 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19937 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19938 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19939 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19940 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19941 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19942 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19943 (aarch64_fmlal_lane_highv2sf): Ditto.
19944 (aarch64_fmlsl_lane_highv2sf): Ditto.
19945 (aarch64_fmlal_laneq_highv2sf): Ditto.
19946 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19947 (aarch64_fmlalq_lane_highv4sf): Ditto.
19948 (aarch64_fmlsl_lane_highv4sf): Ditto.
19949 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19950 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19951 * config/aarch64/aarch64-simd.md:
19952 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19953 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19954 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19955 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19956 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19957 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19958 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19959 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19960 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19961 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19962 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19963 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19964 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19965 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19966 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19967 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19968 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19969 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19970 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19971 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19972 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19973 (vfmlsl_low_u32): Ditto.
19974 (vfmlalq_low_u32): Ditto.
19975 (vfmlslq_low_u32): Ditto.
19976 (vfmlal_high_u32): Ditto.
19977 (vfmlsl_high_u32): Ditto.
19978 (vfmlalq_high_u32): Ditto.
19979 (vfmlslq_high_u32): Ditto.
19980 (vfmlal_lane_low_u32): Ditto.
19981 (vfmlsl_lane_low_u32): Ditto.
19982 (vfmlal_laneq_low_u32): Ditto.
19983 (vfmlsl_laneq_low_u32): Ditto.
19984 (vfmlalq_lane_low_u32): Ditto.
19985 (vfmlslq_lane_low_u32): Ditto.
19986 (vfmlalq_laneq_low_u32): Ditto.
19987 (vfmlslq_laneq_low_u32): Ditto.
19988 (vfmlal_lane_high_u32): Ditto.
19989 (vfmlsl_lane_high_u32): Ditto.
19990 (vfmlal_laneq_high_u32): Ditto.
19991 (vfmlsl_laneq_high_u32): Ditto.
19992 (vfmlalq_lane_high_u32): Ditto.
19993 (vfmlslq_lane_high_u32): Ditto.
19994 (vfmlalq_laneq_high_u32): Ditto.
19995 (vfmlslq_laneq_high_u32): Ditto.
19996 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19997 (AARCH64_FL_FOR_ARCH8_4): New.
19998 (AARCH64_ISA_F16FML): New ISA flag.
19999 (TARGET_F16FML): New feature flag for fp16fml.
20000 (doc/invoke.texi): Document new fp16fml option.
20002 2018-01-10 Michael Collison <michael.collison@arm.com>
20004 * config/aarch64/aarch64-builtins.c:
20005 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20006 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20007 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20008 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20009 (AARCH64_ISA_SHA3): New ISA flag.
20010 (TARGET_SHA3): New feature flag for sha3.
20011 * config/aarch64/iterators.md (sha512_op): New int attribute.
20012 (CRYPTO_SHA512): New int iterator.
20013 (UNSPEC_SHA512H): New unspec.
20014 (UNSPEC_SHA512H2): Ditto.
20015 (UNSPEC_SHA512SU0): Ditto.
20016 (UNSPEC_SHA512SU1): Ditto.
20017 * config/aarch64/aarch64-simd-builtins.def
20018 (aarch64_crypto_sha512hqv2di): New builtin.
20019 (aarch64_crypto_sha512h2qv2di): Ditto.
20020 (aarch64_crypto_sha512su0qv2di): Ditto.
20021 (aarch64_crypto_sha512su1qv2di): Ditto.
20022 (aarch64_eor3qv8hi): Ditto.
20023 (aarch64_rax1qv2di): Ditto.
20024 (aarch64_xarqv2di): Ditto.
20025 (aarch64_bcaxqv8hi): Ditto.
20026 * config/aarch64/aarch64-simd.md:
20027 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20028 (aarch64_crypto_sha512su0qv2di): Ditto.
20029 (aarch64_crypto_sha512su1qv2di): Ditto.
20030 (aarch64_eor3qv8hi): Ditto.
20031 (aarch64_rax1qv2di): Ditto.
20032 (aarch64_xarqv2di): Ditto.
20033 (aarch64_bcaxqv8hi): Ditto.
20034 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20035 (vsha512h2q_u64): Ditto.
20036 (vsha512su0q_u64): Ditto.
20037 (vsha512su1q_u64): Ditto.
20038 (veor3q_u16): Ditto.
20039 (vrax1q_u64): Ditto.
20040 (vxarq_u64): Ditto.
20041 (vbcaxq_u16): Ditto.
20042 * config/arm/types.md (crypto_sha512): New type attribute.
20043 (crypto_sha3): Ditto.
20044 (doc/invoke.texi): Document new sha3 option.
20046 2018-01-10 Michael Collison <michael.collison@arm.com>
20048 * config/aarch64/aarch64-builtins.c:
20049 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20050 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20051 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20052 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20053 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20054 (AARCH64_ISA_SM4): New ISA flag.
20055 (TARGET_SM4): New feature flag for sm4.
20056 * config/aarch64/aarch64-simd-builtins.def
20057 (aarch64_sm3ss1qv4si): Ditto.
20058 (aarch64_sm3tt1aq4si): Ditto.
20059 (aarch64_sm3tt1bq4si): Ditto.
20060 (aarch64_sm3tt2aq4si): Ditto.
20061 (aarch64_sm3tt2bq4si): Ditto.
20062 (aarch64_sm3partw1qv4si): Ditto.
20063 (aarch64_sm3partw2qv4si): Ditto.
20064 (aarch64_sm4eqv4si): Ditto.
20065 (aarch64_sm4ekeyqv4si): Ditto.
20066 * config/aarch64/aarch64-simd.md:
20067 (aarch64_sm3ss1qv4si): Ditto.
20068 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20069 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20070 (aarch64_sm4eqv4si): Ditto.
20071 (aarch64_sm4ekeyqv4si): Ditto.
20072 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20073 (sm3part_op): Ditto.
20074 (CRYPTO_SM3TT): Ditto.
20075 (CRYPTO_SM3PART): Ditto.
20076 (UNSPEC_SM3SS1): New unspec.
20077 (UNSPEC_SM3TT1A): Ditto.
20078 (UNSPEC_SM3TT1B): Ditto.
20079 (UNSPEC_SM3TT2A): Ditto.
20080 (UNSPEC_SM3TT2B): Ditto.
20081 (UNSPEC_SM3PARTW1): Ditto.
20082 (UNSPEC_SM3PARTW2): Ditto.
20083 (UNSPEC_SM4E): Ditto.
20084 (UNSPEC_SM4EKEY): Ditto.
20085 * config/aarch64/constraints.md (Ui2): New constraint.
20086 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20087 * config/arm/types.md (crypto_sm3): New type attribute.
20088 (crypto_sm4): Ditto.
20089 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20090 (vsm3tt1aq_u32): Ditto.
20091 (vsm3tt1bq_u32): Ditto.
20092 (vsm3tt2aq_u32): Ditto.
20093 (vsm3tt2bq_u32): Ditto.
20094 (vsm3partw1q_u32): Ditto.
20095 (vsm3partw2q_u32): Ditto.
20096 (vsm4eq_u32): Ditto.
20097 (vsm4ekeyq_u32): Ditto.
20098 (doc/invoke.texi): Document new sm4 option.
20100 2018-01-10 Michael Collison <michael.collison@arm.com>
20102 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20103 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20104 (AARCH64_FL_FOR_ARCH8_4): New.
20105 (AARCH64_FL_V8_4): New flag.
20106 (doc/invoke.texi): Document new armv8.4-a option.
20108 2018-01-10 Michael Collison <michael.collison@arm.com>
20110 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20111 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20112 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20113 * config/aarch64/aarch64-option-extension.def: Add
20114 AARCH64_OPT_EXTENSION of 'sha2'.
20115 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20116 (crypto): Disable sha2 and aes if crypto disabled.
20117 (crypto): Enable aes and sha2 if enabled.
20118 (simd): Disable sha2 and aes if simd disabled.
20119 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20121 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20122 (TARGET_SHA2): New feature flag for sha2.
20123 (TARGET_AES): New feature flag for aes.
20124 * config/aarch64/aarch64-simd.md:
20125 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20126 conditional on TARGET_AES.
20127 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20128 (aarch64_crypto_sha1hsi): Make pattern conditional
20130 (aarch64_crypto_sha1hv4si): Ditto.
20131 (aarch64_be_crypto_sha1hv4si): Ditto.
20132 (aarch64_crypto_sha1su1v4si): Ditto.
20133 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20134 (aarch64_crypto_sha1su0v4si): Ditto.
20135 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20136 (aarch64_crypto_sha256su0v4si): Ditto.
20137 (aarch64_crypto_sha256su1v4si): Ditto.
20138 (doc/invoke.texi): Document new aes and sha2 options.
20140 2018-01-10 Martin Sebor <msebor@redhat.com>
20142 PR tree-optimization/83781
20143 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20146 2018-01-11 Martin Sebor <msebor@gmail.com>
20147 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20149 PR tree-optimization/83501
20150 PR tree-optimization/81703
20152 * tree-ssa-strlen.c (get_string_cst): Rename...
20153 (get_string_len): ...to this. Handle global constants.
20154 (handle_char_store): Adjust.
20156 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
20157 Jim Wilson <jimw@sifive.com>
20159 * config/riscv/riscv-protos.h (riscv_output_return): New.
20160 * config/riscv/riscv.c (struct machine_function): New naked_p field.
20161 (riscv_attribute_table, riscv_output_return),
20162 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20163 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20164 (riscv_compute_frame_info): Only compute frame->mask if not a naked
20166 (riscv_expand_prologue): Add early return for naked function.
20167 (riscv_expand_epilogue): Likewise.
20168 (riscv_function_ok_for_sibcall): Return false for naked function.
20169 (riscv_set_current_function): New.
20170 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20171 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20172 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20173 * doc/extend.texi (RISC-V Function Attributes): New.
20175 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20177 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20178 check for 128-bit long double before checking TCmode.
20179 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20180 128-bit long doubles before checking TFmode or TCmode.
20181 (FLOAT128_IBM_P): Likewise.
20183 2018-01-10 Martin Sebor <msebor@redhat.com>
20185 PR tree-optimization/83671
20186 * builtins.c (c_strlen): Unconditionally return zero for the empty
20188 Use -Warray-bounds for warnings.
20189 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20190 for non-constant array indices with COMPONENT_REF, arrays of
20191 arrays, and pointers to arrays.
20192 (gimple_fold_builtin_strlen): Determine and set length range for
20193 non-constant character arrays.
20195 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
20197 PR middle-end/81897
20198 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20201 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
20203 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20205 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20208 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20209 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20210 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20211 indexed_or_indirect_operand predicate.
20212 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20213 (*vsx_le_perm_load_v8hi): Likewise.
20214 (*vsx_le_perm_load_v16qi): Likewise.
20215 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20216 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20217 (*vsx_le_perm_store_v8hi): Likewise.
20218 (*vsx_le_perm_store_v16qi): Likewise.
20219 (eight unnamed splitters): Likewise.
20221 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20223 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20224 * config/rs6000/emmintrin.h: Likewise.
20225 * config/rs6000/mmintrin.h: Likewise.
20226 * config/rs6000/xmmintrin.h: Likewise.
20228 2018-01-10 David Malcolm <dmalcolm@redhat.com>
20231 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20233 * tree.c (tree_nop_conversion): Return true for location wrapper
20235 (maybe_wrap_with_location): New function.
20236 (selftest::check_strip_nops): New function.
20237 (selftest::test_location_wrappers): New function.
20238 (selftest::tree_c_tests): Call it.
20239 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20240 (maybe_wrap_with_location): New decl.
20241 (EXPR_LOCATION_WRAPPER_P): New macro.
20242 (location_wrapper_p): New inline function.
20243 (tree_strip_any_location_wrapper): New inline function.
20245 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
20248 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20249 stack_realign_offset for the largest alignment of stack slot
20251 (ix86_find_max_used_stack_alignment): New function.
20252 (ix86_finalize_stack_frame_flags): Use it. Set
20253 max_used_stack_alignment if we don't realign stack.
20254 * config/i386/i386.h (machine_function): Add
20255 max_used_stack_alignment.
20257 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
20259 * config/arm/arm.opt (-mbranch-cost): New option.
20260 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20263 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
20266 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20267 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20269 2018-01-10 Richard Biener <rguenther@suse.de>
20272 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20273 early out so it also covers the case where we have a non-NULL
20276 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20278 PR tree-optimization/83753
20279 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20280 for non-strided grouped accesses if the number of elements is 1.
20282 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20285 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20286 * i386.h (TARGET_USE_GATHER): Define.
20287 * x86-tune.def (X86_TUNE_USE_GATHER): New.
20289 2018-01-10 Martin Liska <mliska@suse.cz>
20292 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20293 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20295 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20296 CLEANUP_NO_PARTITIONING is not set.
20298 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20300 * doc/rtl.texi: Remove documentation of (const ...) wrappers
20301 for vectors, as a partial revert of r254296.
20302 * rtl.h (const_vec_p): Delete.
20303 (const_vec_duplicate_p): Don't test for vector CONSTs.
20304 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20305 * expmed.c (make_tree): Likewise.
20308 * common.md (E, F): Use CONSTANT_P instead of checking for
20310 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20311 checking for CONST_VECTOR.
20313 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20315 PR middle-end/83575
20316 * predict.c (force_edge_cold): Handle in more sane way edges
20317 with no prediction.
20319 2018-01-09 Carl Love <cel@us.ibm.com>
20321 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20323 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20324 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20325 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20326 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
20327 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20328 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
20329 * config/rs6000/rs6000-protos.h: Add extern defition for
20330 rs6000_generate_float2_double_code.
20331 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20333 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20334 (float2_v2df): Add define_expand.
20336 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
20339 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20340 op_mode in the force_to_mode call.
20342 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20344 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20345 instead of checking each element individually.
20346 (aarch64_evpc_uzp): Likewise.
20347 (aarch64_evpc_zip): Likewise.
20348 (aarch64_evpc_ext): Likewise.
20349 (aarch64_evpc_rev): Likewise.
20350 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20351 instead of checking each element individually. Return true without
20353 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20354 whether all selected elements come from the same input, instead of
20355 checking each element individually. Remove calls to gen_rtx_REG,
20356 start_sequence and end_sequence and instead assert that no rtl is
20359 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20361 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20362 order of HIGH and CONST checks.
20364 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20366 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20367 if the destination isn't an SSA_NAME.
20369 2018-01-09 Richard Biener <rguenther@suse.de>
20371 PR tree-optimization/83668
20372 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20374 (canonicalize_loop_form): ... here, renamed from ...
20375 (canonicalize_loop_closed_ssa_form): ... this and amended to
20376 swap successor edges for loop exit blocks to make us use
20377 the RPO order we need for initial schedule generation.
20379 2018-01-09 Joseph Myers <joseph@codesourcery.com>
20381 PR tree-optimization/64811
20382 * match.pd: When optimizing comparisons with Inf, avoid
20383 introducing or losing exceptions from comparisons with NaN.
20385 2018-01-09 Martin Liska <mliska@suse.cz>
20388 * asan.c (shadow_mem_size): Add gcc_assert.
20390 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
20392 Don't save registers in main().
20395 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20396 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20397 * config/avr/avr.c (avr_set_current_function): Don't error if
20398 naked, OS_task or OS_main are specified at the same time.
20399 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20401 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20403 * common/config/avr/avr-common.c (avr_option_optimization_table):
20404 Switch on -mmain-is-OS_task for optimizing compilations.
20406 2018-01-09 Richard Biener <rguenther@suse.de>
20408 PR tree-optimization/83572
20409 * graphite.c: Include cfganal.h.
20410 (graphite_transform_loops): Connect infinite loops to exit
20411 and remove fake edges at the end.
20413 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20415 * ipa-inline.c (edge_badness): Revert accidental checkin.
20417 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20420 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20421 symbols; not inline clones.
20423 2018-01-09 Jakub Jelinek <jakub@redhat.com>
20426 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20427 hard registers. Formatting fixes.
20429 PR preprocessor/83722
20430 * gcc.c (try_generate_repro): Pass
20431 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20432 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20435 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20436 Kito Cheng <kito.cheng@gmail.com>
20438 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20439 (riscv_leaf_function_p): Delete.
20440 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20442 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20444 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20446 (do_ifelse): New function.
20447 (do_isel): New function.
20448 (do_sub3): New function.
20449 (do_add3): New function.
20450 (do_load_mask_compare): New function.
20451 (do_overlap_load_compare): New function.
20452 (expand_compare_loop): New function.
20453 (expand_block_compare): Call expand_compare_loop() when appropriate.
20454 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20455 option description.
20456 (-mblock-compare-inline-loop-limit): New option.
20458 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20461 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20462 Reverse order of second and third operands in first alternative.
20463 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20464 of first and second elements in UNSPEC_VPERMR vector.
20465 (altivec_expand_vec_perm_le): Likewise.
20467 2018-01-08 Jeff Law <law@redhat.com>
20469 PR rtl-optimizatin/81308
20470 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20471 (process_switch): If group_case_labels makes a change, then set
20473 (pass_convert_switch::execute): If a switch is converted, then
20474 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20476 PR rtl-optimization/81308
20477 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20480 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20482 PR target/83663 - Revert r255946
20483 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20484 generation for cases where splatting a value is not useful.
20485 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20486 across a vec_duplicate and a paradoxical subreg forming a vector
20487 mode to a vec_concat.
20489 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20491 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20492 -march=armv8.3-a variants.
20493 * config/arm/t-multilib: Likewise.
20494 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20496 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20498 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20500 (cceq_ior_compare_complement): Give it a name so I can use it, and
20501 change boolean_or_operator predicate to boolean_operator so it can
20502 be used to generate a crand.
20503 (eqne): New code iterator.
20504 (bd/bd_neg): New code_attrs.
20505 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20506 a single define_insn.
20507 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20508 decrement (bdnzt/bdnzf/bdzt/bdzf).
20509 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20510 with the new names of the branch decrement patterns, and added the
20511 names of the branch decrement conditional patterns.
20513 2018-01-08 Richard Biener <rguenther@suse.de>
20515 PR tree-optimization/83563
20516 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20519 2018-01-08 Richard Biener <rguenther@suse.de>
20521 PR middle-end/83713
20522 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20524 2018-01-08 Richard Biener <rguenther@suse.de>
20526 PR tree-optimization/83685
20527 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20528 references to abnormals.
20530 2018-01-08 Richard Biener <rguenther@suse.de>
20533 * dwarf2out.c (output_indirect_strings): Handle empty
20534 skeleton_debug_str_hash.
20535 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20537 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20539 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20540 (emit_store_direct): Likewise.
20541 (arc_trampoline_adjust_address): Likewise.
20542 (arc_asm_trampoline_template): New function.
20543 (arc_initialize_trampoline): Use asm_trampoline_template.
20544 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20545 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20546 * config/arc/arc.md (flush_icache): Delete pattern.
20548 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20550 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20551 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20554 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20557 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20558 by not USED_FOR_TARGET.
20559 (make_pass_resolve_sw_modes): Likewise.
20561 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20563 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20566 2018-01-08 Richard Biener <rguenther@suse.de>
20568 PR middle-end/83580
20569 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20571 2018-01-08 Richard Biener <rguenther@suse.de>
20573 PR middle-end/83517
20574 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20576 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20578 PR middle-end/81897
20579 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20580 basic blocks with a small number of successors.
20581 (convert_control_dep_chain_into_preds): Improve handling of
20583 (dump_predicates): Split apart into...
20584 (dump_pred_chain): ...here...
20585 (dump_pred_info): ...and here.
20586 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20587 (can_chain_union_be_invalidated_p): Improve check for invalidation
20589 (uninit_uses_cannot_happen): Avoid unnecessary if
20590 convert_control_dep_chain_into_preds yielded nothing.
20592 2018-01-06 Martin Sebor <msebor@redhat.com>
20594 PR tree-optimization/83640
20595 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20596 subtracting negative offset from size.
20597 (builtin_access::overlap): Adjust offset bounds of the access to fall
20598 within the size of the object if possible.
20600 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20602 PR rtl-optimization/83699
20603 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20604 extract_bit_field_as_subreg to cases in which the extracted
20605 value is also a vector.
20607 * lra-constraints.c (process_alt_operands): Test for the equivalence
20608 substitutions when detecting a possible reload cycle.
20610 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20613 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20614 by default if flag_selective_schedling{,2}. Formatting fixes.
20616 PR rtl-optimization/83682
20617 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20618 if it has non-VECTOR_MODE element mode.
20619 (vec_duplicate_p): Likewise.
20621 PR middle-end/83694
20622 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20623 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20625 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20628 * config/i386/i386-builtin.def
20629 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20630 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20631 Require also OPTION_MASK_ISA_AVX512F in addition to
20632 OPTION_MASK_ISA_GFNI.
20633 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20634 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20635 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20636 to OPTION_MASK_ISA_GFNI.
20637 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20638 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20639 OPTION_MASK_ISA_AVX512BW.
20640 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20641 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20642 addition to OPTION_MASK_ISA_GFNI.
20643 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20644 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20645 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20646 to OPTION_MASK_ISA_GFNI.
20647 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20648 a requirement for all ISAs rather than any of them with a few
20650 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20652 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20653 bitmasks to be enabled with 3 exceptions, instead of requiring any
20654 enabled ISA with lots of exceptions.
20655 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20656 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20657 Change avx512bw in isa attribute to avx512f.
20658 * config/i386/sgxintrin.h: Add license boilerplate.
20659 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20660 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20661 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20662 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20664 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20665 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20666 temporarily sse2 rather than sse if not enabled already.
20669 * config/i386/sse.md (VI248_VLBW): Rename to ...
20670 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20671 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20672 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20673 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20674 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20675 mode iterator instead of VI248_VLBW.
20677 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20679 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20680 (record_modified): Skip clobbers; add debug output.
20681 (param_change_prob): Use sreal frequencies.
20683 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20685 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20686 punt for user-aligned variables.
20688 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20690 * tree-chrec.c (chrec_contains_symbols): Return true for
20693 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20696 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20697 of (x|y) == x for BICS pattern.
20699 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20701 PR tree-optimization/83605
20702 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20703 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20706 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20708 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20709 * config/epiphany/rtems.h: New file.
20711 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20712 Uros Bizjak <ubizjak@gmail.com>
20715 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20716 QIreg_operand instead of register_operand predicate.
20717 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20718 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20719 comments instead of -fmitigate[-_]rop.
20721 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20724 * cgraphunit.c (symbol_table::compile): Switch to text_section
20725 before calling assembly_start debug hook.
20726 * run-rtl-passes.c (run_rtl_passes): Likewise.
20729 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20731 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20732 range_int_cst_p rather than !symbolic_range_p before calling
20733 extract_range_from_multiplicative_op_1.
20735 2018-01-04 Jeff Law <law@redhat.com>
20737 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20738 redundant test in assertion.
20740 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20742 * doc/rtl.texi: Document machine_mode wrapper classes.
20744 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20746 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20747 using tree_to_uhwi.
20749 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20751 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20752 the VEC_PERM_EXPR fold to fail.
20754 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20757 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20758 to switched_sections.
20760 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20763 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20764 test for d.testing.
20766 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20769 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20770 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20772 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20775 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20776 is BLKmode and bitpos not zero or mode change is needed.
20778 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20781 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20784 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20787 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20788 instead of MULT rtx. Update all corresponding splitters.
20789 (*saddl_se): Ditto.
20790 (*ssub<modesuffix>): Ditto.
20791 (*ssubl_se): Ditto.
20792 (*cmp_sadd_di): Update split patterns.
20793 (*cmp_sadd_si): Ditto.
20794 (*cmp_sadd_sidi): Ditto.
20795 (*cmp_ssub_di): Ditto.
20796 (*cmp_ssub_si): Ditto.
20797 (*cmp_ssub_sidi): Ditto.
20798 * config/alpha/predicates.md (const23_operand): New predicate.
20799 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20800 Look for ASHIFT, not MULT inner operand.
20801 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20803 2018-01-04 Martin Liska <mliska@suse.cz>
20805 PR gcov-profile/83669
20806 * gcov.c (output_intermediate_file): Add version to intermediate
20808 * doc/gcov.texi: Document new field 'version' in intermediate
20809 file format. Fix location of '-k' option of gcov command.
20811 2018-01-04 Martin Liska <mliska@suse.cz>
20814 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20816 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20818 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20820 2018-01-03 Martin Sebor <msebor@redhat.com>
20822 PR tree-optimization/83655
20823 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20824 checking calls with invalid arguments.
20826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20828 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20829 (vectorizable_mask_load_store): Delete.
20830 (vectorizable_call): Return false for masked loads and stores.
20831 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20832 instead of gimple_assign_rhs1.
20833 (vectorizable_load): Handle IFN_MASK_LOAD.
20834 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20838 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20840 (vectorizable_mask_load_store): ...here.
20841 (vectorizable_load): ...and here.
20843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20845 * tree-vect-stmts.c (vect_build_all_ones_mask)
20846 (vect_build_zero_merge_argument): New functions, split out from...
20847 (vectorizable_load): ...here.
20849 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20851 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20853 (vectorizable_mask_load_store): ...here.
20854 (vectorizable_store): ...and here.
20856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20858 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20860 (vectorizable_mask_load_store): ...here.
20862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20864 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20865 (vect_model_store_cost): Take a vec_load_store_type instead of a
20867 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20868 (vect_model_store_cost): Take a vec_load_store_type instead of a
20870 (vectorizable_mask_load_store): Update accordingly.
20871 (vectorizable_store): Likewise.
20872 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20876 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20877 IFN_MASK_LOAD calls here rather than...
20878 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20881 Alan Hayward <alan.hayward@arm.com>
20882 David Sherwood <david.sherwood@arm.com>
20884 * expmed.c (extract_bit_field_1): For vector extracts,
20885 fall back to extract_bit_field_as_subreg if vec_extract
20888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20889 Alan Hayward <alan.hayward@arm.com>
20890 David Sherwood <david.sherwood@arm.com>
20892 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20893 they are variable or constant sized.
20894 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20895 slots for constant-sized data.
20897 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20898 Alan Hayward <alan.hayward@arm.com>
20899 David Sherwood <david.sherwood@arm.com>
20901 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20902 handling COND_EXPRs with boolean comparisons, try to find a better
20903 basis for the mask type than the boolean itself.
20905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20907 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20908 is calculated and how it can be overridden.
20909 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20910 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20912 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20916 Alan Hayward <alan.hayward@arm.com>
20917 David Sherwood <david.sherwood@arm.com>
20919 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20920 Remove the mode argument.
20921 (aarch64_simd_valid_immediate): Remove the mode and inverse
20923 * config/aarch64/iterators.md (bitsize): New iterator.
20924 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20925 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20926 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20927 aarch64_simd_valid_immediate.
20928 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20929 (aarch64_reg_or_bic_imm): Likewise.
20930 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20931 with an insn_type enum and msl with a modifier_type enum.
20932 Replace element_width with a scalar_mode. Change the shift
20933 to unsigned int. Add constructors for scalar_float_mode and
20934 scalar_int_mode elements.
20935 (aarch64_vect_float_const_representable_p): Delete.
20936 (aarch64_can_const_movi_rtx_p)
20937 (aarch64_simd_scalar_immediate_valid_for_move)
20938 (aarch64_simd_make_constant): Update call to
20939 aarch64_simd_valid_immediate.
20940 (aarch64_advsimd_valid_immediate_hs): New function.
20941 (aarch64_advsimd_valid_immediate): Likewise.
20942 (aarch64_simd_valid_immediate): Remove mode and inverse
20943 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20944 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20945 and aarch64_float_const_representable_p on the result.
20946 (aarch64_output_simd_mov_immediate): Remove mode argument.
20947 Update call to aarch64_simd_valid_immediate and use of
20948 simd_immediate_info.
20949 (aarch64_output_scalar_simd_mov_immediate): Update call
20952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20953 Alan Hayward <alan.hayward@arm.com>
20954 David Sherwood <david.sherwood@arm.com>
20956 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20957 (mode_nunits): Likewise CONST_MODE_NUNITS.
20958 * machmode.def (ADJUST_NUNITS): Document.
20959 * genmodes.c (mode_data::need_nunits_adj): New field.
20960 (blank_mode): Update accordingly.
20961 (adj_nunits): New variable.
20962 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20964 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20965 listed in adj_nunits.
20966 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20967 listed in adj_nunits. Don't emit case statements for such modes.
20968 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20969 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20970 nothing if adj_nunits is nonnull.
20971 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20972 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20973 (emit_mode_fbit): Update use of print_maybe_const_decl.
20974 (emit_move_size): Likewise. Treat the array as non-const
20976 (emit_mode_adjustments): Handle adj_nunits.
20978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20980 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20981 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20982 (VECTOR_MODES): Use it.
20983 (make_vector_modes): Take the prefix as an argument.
20985 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20986 Alan Hayward <alan.hayward@arm.com>
20987 David Sherwood <david.sherwood@arm.com>
20989 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20990 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20991 for MODE_VECTOR_BOOL.
20992 * machmode.def (VECTOR_BOOL_MODE): Document.
20993 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20994 (make_vector_bool_mode): New function.
20995 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20997 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20998 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21000 * stor-layout.c (int_mode_for_mode): Likewise.
21001 * tree.c (build_vector_type_for_mode): Likewise.
21002 * varasm.c (output_constant_pool_2): Likewise.
21003 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21004 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
21005 for MODE_VECTOR_BOOL.
21006 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21007 of mode class checks.
21008 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21009 instead of a list of mode class checks.
21010 (expand_vector_scalar_condition): Likewise.
21011 (type_for_widest_vector_mode): Handle BImode as an inner mode.
21013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21014 Alan Hayward <alan.hayward@arm.com>
21015 David Sherwood <david.sherwood@arm.com>
21017 * machmode.h (mode_size): Change from unsigned short to
21019 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21020 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21021 or if measurement_type is not polynomial.
21022 (fixed_size_mode::includes_p): Check for constant-sized modes.
21023 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21024 return a poly_uint16 rather than an unsigned short.
21025 (emit_mode_size): Change the type of mode_size from unsigned short
21026 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
21027 (emit_mode_adjustments): Cope with polynomial vector sizes.
21028 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21030 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21032 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21033 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21034 * caller-save.c (setup_save_areas): Likewise.
21035 (replace_reg_with_saved_mem): Likewise.
21036 * calls.c (emit_library_call_value_1): Likewise.
21037 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21038 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21039 (gen_lowpart_for_combine): Likewise.
21040 * convert.c (convert_to_integer_1): Likewise.
21041 * cse.c (equiv_constant, cse_insn): Likewise.
21042 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21043 (cselib_subst_to_values): Likewise.
21044 * dce.c (word_dce_process_block): Likewise.
21045 * df-problems.c (df_word_lr_mark_ref): Likewise.
21046 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21047 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21048 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21049 (rtl_for_decl_location): Likewise.
21050 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21051 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21052 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21053 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21054 (expand_expr_real_1): Likewise.
21055 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21056 (pad_below): Likewise.
21057 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21058 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21059 * ira.c (get_subreg_tracking_sizes): Likewise.
21060 * ira-build.c (ira_create_allocno_objects): Likewise.
21061 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21062 (ira_sort_regnos_for_alter_reg): Likewise.
21063 * ira-costs.c (record_operand_costs): Likewise.
21064 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21065 (resolve_simple_move): Likewise.
21066 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21067 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21068 (lra_constraints): Likewise.
21069 (CONST_POOL_OK_P): Reject variable-sized modes.
21070 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21071 (add_pseudo_to_slot, lra_spill): Likewise.
21072 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21073 * optabs-query.c (get_best_extraction_insn): Likewise.
21074 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21075 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21076 (expand_mult_highpart, valid_multiword_target_p): Likewise.
21077 * recog.c (offsettable_address_addr_space_p): Likewise.
21078 * regcprop.c (maybe_mode_change): Likewise.
21079 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21080 * regrename.c (build_def_use): Likewise.
21081 * regstat.c (dump_reg_info): Likewise.
21082 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21083 (find_reloads, find_reloads_subreg_address): Likewise.
21084 * reload1.c (eliminate_regs_1): Likewise.
21085 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21086 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21087 (simplify_binary_operation_1, simplify_subreg): Likewise.
21088 * targhooks.c (default_function_arg_padding): Likewise.
21089 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21090 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21091 (verify_gimple_assign_ternary): Likewise.
21092 * tree-inline.c (estimate_move_cost): Likewise.
21093 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21094 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21095 (get_address_cost_ainc): Likewise.
21096 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21097 (vect_supportable_dr_alignment): Likewise.
21098 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21099 (vectorizable_reduction): Likewise.
21100 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21101 (vectorizable_operation, vectorizable_load): Likewise.
21102 * tree.c (build_same_sized_truth_vector_type): Likewise.
21103 * valtrack.c (cleanup_auto_inc_dec): Likewise.
21104 * var-tracking.c (emit_note_insn_var_location): Likewise.
21105 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21106 (ADDR_VEC_ALIGN): Likewise.
21108 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21109 Alan Hayward <alan.hayward@arm.com>
21110 David Sherwood <david.sherwood@arm.com>
21112 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21114 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21115 or if measurement_type is polynomial.
21116 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21117 * combine.c (make_extraction): Likewise.
21118 * dse.c (find_shift_sequence): Likewise.
21119 * dwarf2out.c (mem_loc_descriptor): Likewise.
21120 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21121 (extract_bit_field, extract_low_bits): Likewise.
21122 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21123 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21124 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21125 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21126 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21127 * reload.c (find_reloads): Likewise.
21128 * reload1.c (alter_reg): Likewise.
21129 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21130 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21131 * tree-if-conv.c (predicate_mem_writes): Likewise.
21132 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21133 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21134 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21135 * valtrack.c (dead_debug_insert_temp): Likewise.
21136 * varasm.c (mergeable_constant_section): Likewise.
21137 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21140 Alan Hayward <alan.hayward@arm.com>
21141 David Sherwood <david.sherwood@arm.com>
21143 * expr.c (expand_assignment): Cope with polynomial mode sizes
21144 when assigning to a CONCAT.
21146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21147 Alan Hayward <alan.hayward@arm.com>
21148 David Sherwood <david.sherwood@arm.com>
21150 * machmode.h (mode_precision): Change from unsigned short to
21152 (mode_to_precision): Return a poly_uint16 rather than an unsigned
21154 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21155 or if measurement_type is not polynomial.
21156 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
21157 in which the mode is already known to be a scalar_int_mode.
21158 * genmodes.c (emit_mode_precision): Change the type of mode_precision
21159 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
21161 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21162 for GET_MODE_PRECISION.
21163 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21164 for GET_MODE_PRECISION.
21165 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21167 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21168 (expand_field_assignment, make_extraction): Likewise.
21169 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21170 (get_last_value): Likewise.
21171 * convert.c (convert_to_integer_1): Likewise.
21172 * cse.c (cse_insn): Likewise.
21173 * expr.c (expand_expr_real_1): Likewise.
21174 * lra-constraints.c (simplify_operand_subreg): Likewise.
21175 * optabs-query.c (can_atomic_load_p): Likewise.
21176 * optabs.c (expand_atomic_load): Likewise.
21177 (expand_atomic_store): Likewise.
21178 * ree.c (combine_reaching_defs): Likewise.
21179 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21180 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21181 * tree.h (type_has_mode_precision_p): Likewise.
21182 * ubsan.c (instrument_si_overflow): Likewise.
21184 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21185 Alan Hayward <alan.hayward@arm.com>
21186 David Sherwood <david.sherwood@arm.com>
21188 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21189 polynomial numbers of units.
21190 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21191 (valid_vector_subparts_p): New function.
21192 (build_vector_type): Remove temporary shim and take the number
21193 of units as a poly_uint64 rather than an int.
21194 (build_opaque_vector_type): Take the number of units as a
21195 poly_uint64 rather than an int.
21196 * tree.c (build_vector_from_ctor): Handle polynomial
21197 TYPE_VECTOR_SUBPARTS.
21198 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21199 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21200 (build_vector_from_val): If the number of units is variable,
21201 use build_vec_duplicate_cst for constant operands and
21202 VEC_DUPLICATE_EXPR otherwise.
21203 (make_vector_type): Remove temporary is_constant ().
21204 (build_vector_type, build_opaque_vector_type): Take the number of
21205 units as a poly_uint64 rather than an int.
21206 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21208 * cfgexpand.c (expand_debug_expr): Likewise.
21209 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21210 (store_constructor, expand_expr_real_1): Likewise.
21211 (const_scalar_mask_from_tree): Likewise.
21212 * fold-const-call.c (fold_const_reduction): Likewise.
21213 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21214 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21215 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21216 (fold_relational_const): Likewise.
21217 (native_interpret_vector): Likewise. Change the size from an
21218 int to an unsigned int.
21219 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21220 TYPE_VECTOR_SUBPARTS.
21221 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21222 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21223 duplicating a non-constant operand into a variable-length vector.
21224 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21225 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21226 * ipa-icf.c (sem_variable::equals): Likewise.
21227 * match.pd: Likewise.
21228 * omp-simd-clone.c (simd_clone_subparts): Likewise.
21229 * print-tree.c (print_node): Likewise.
21230 * stor-layout.c (layout_type): Likewise.
21231 * targhooks.c (default_builtin_vectorization_cost): Likewise.
21232 * tree-cfg.c (verify_gimple_comparison): Likewise.
21233 (verify_gimple_assign_binary): Likewise.
21234 (verify_gimple_assign_ternary): Likewise.
21235 (verify_gimple_assign_single): Likewise.
21236 * tree-pretty-print.c (dump_generic_node): Likewise.
21237 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21238 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21239 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21240 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21241 (vect_shift_permute_load_chain): Likewise.
21242 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21243 (expand_vector_condition, optimize_vector_constructor): Likewise.
21244 (lower_vec_perm, get_compute_type): Likewise.
21245 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21246 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21247 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21248 (vect_recog_mask_conversion_pattern): Likewise.
21249 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21250 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21251 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21252 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21253 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21254 (vectorizable_shift, vectorizable_operation, vectorizable_store)
21255 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21256 (supportable_widening_operation): Likewise.
21257 (supportable_narrowing_operation): Likewise.
21258 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21260 * varasm.c (output_constant): Likewise.
21262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21263 Alan Hayward <alan.hayward@arm.com>
21264 David Sherwood <david.sherwood@arm.com>
21266 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21267 so that both the length == 3 and length != 3 cases set up their
21268 own permute vectors. Add comments explaining why we know the
21269 number of elements is constant.
21270 (vect_permute_load_chain): Likewise.
21272 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21273 Alan Hayward <alan.hayward@arm.com>
21274 David Sherwood <david.sherwood@arm.com>
21276 * machmode.h (mode_nunits): Change from unsigned char to
21278 (ONLY_FIXED_SIZE_MODES): New macro.
21279 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21280 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21281 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21283 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21284 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21285 or if measurement_type is not polynomial.
21286 * genmodes.c (ZERO_COEFFS): New macro.
21287 (emit_mode_nunits_inline): Make mode_nunits_inline return a
21289 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21290 Use ZERO_COEFFS when emitting initializers.
21291 * data-streamer.h (bp_pack_poly_value): New function.
21292 (bp_unpack_poly_value): Likewise.
21293 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21294 for GET_MODE_NUNITS.
21295 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21296 for GET_MODE_NUNITS.
21297 * tree.c (make_vector_type): Remove temporary shim and make
21298 the real function take the number of units as a poly_uint64
21299 rather than an int.
21300 (build_vector_type_for_mode): Handle polynomial nunits.
21301 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21302 * emit-rtl.c (const_vec_series_p_1): Likewise.
21303 (gen_rtx_CONST_VECTOR): Likewise.
21304 * fold-const.c (test_vec_duplicate_folding): Likewise.
21305 * genrecog.c (validate_pattern): Likewise.
21306 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21307 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21308 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21309 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21310 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21311 * rtlanal.c (subreg_get_info): Likewise.
21312 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21313 (vect_grouped_load_supported): Likewise.
21314 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21315 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21316 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21317 (simplify_const_unary_operation, simplify_binary_operation_1)
21318 (simplify_const_binary_operation, simplify_ternary_operation)
21319 (test_vector_ops_duplicate, test_vector_ops): Likewise.
21320 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21321 instead of CONST_VECTOR_NUNITS.
21322 * varasm.c (output_constant_pool_2): Likewise.
21323 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21324 explicit-encoded elements in the XVEC for variable-length vectors.
21326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21328 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21331 Alan Hayward <alan.hayward@arm.com>
21332 David Sherwood <david.sherwood@arm.com>
21334 * coretypes.h (fixed_size_mode): Declare.
21335 (fixed_size_mode_pod): New typedef.
21336 * builtins.h (target_builtins::x_apply_args_mode)
21337 (target_builtins::x_apply_result_mode): Change type to
21338 fixed_size_mode_pod.
21339 * builtins.c (apply_args_size, apply_result_size, result_vector)
21340 (expand_builtin_apply_args_1, expand_builtin_apply)
21341 (expand_builtin_return): Update accordingly.
21343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21345 * cse.c (hash_rtx_cb): Hash only the encoded elements.
21346 * cselib.c (cselib_hash_rtx): Likewise.
21347 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21348 CONST_VECTOR encoding.
21350 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21351 Jeff Law <law@redhat.com>
21354 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21355 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21356 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21357 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21360 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21361 explicitly probe *sp in a noreturn function if there were any callee
21362 register saves or frame pointer is needed.
21364 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21367 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21368 BLKmode for ternary, binary or unary expressions.
21371 * var-tracking.c (delete_vta_debug_insn): New inline function.
21372 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21373 insns from get_insns () to NULL instead of each bb separately.
21374 Use delete_vta_debug_insn. No longer static.
21375 (vt_debug_insns_local, variable_tracking_main_1): Adjust
21376 delete_vta_debug_insns callers.
21377 * rtl.h (delete_vta_debug_insns): Declare.
21378 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21379 instead of variable_tracking_main.
21381 2018-01-03 Martin Sebor <msebor@redhat.com>
21383 PR tree-optimization/83603
21384 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21385 arguments past the endof the argument list in functions declared
21386 without a prototype.
21387 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21388 Avoid checking when arguments are null.
21390 2018-01-03 Martin Sebor <msebor@redhat.com>
21393 * doc/extend.texi (attribute const): Fix a typo.
21394 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21395 issuing -Wsuggest-attribute for void functions.
21397 2018-01-03 Martin Sebor <msebor@redhat.com>
21399 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21400 offset_int::from instead of wide_int::to_shwi.
21401 (maybe_diag_overlap): Remove assertion.
21402 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21403 * gimple-ssa-sprintf.c (format_directive): Same.
21404 (parse_directive): Same.
21405 (sprintf_dom_walker::compute_format_length): Same.
21406 (try_substitute_return_value): Same.
21408 2018-01-03 Jeff Law <law@redhat.com>
21410 PR middle-end/83654
21411 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21412 non-constant residual for zero at runtime and avoid probing in
21413 that case. Reorganize code for trailing problem to mirror handling
21416 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21418 PR tree-optimization/83501
21419 * tree-ssa-strlen.c (get_string_cst): New.
21420 (handle_char_store): Call get_string_cst.
21422 2018-01-03 Martin Liska <mliska@suse.cz>
21424 PR tree-optimization/83593
21425 * tree-ssa-strlen.c: Include tree-cfg.h.
21426 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21427 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21428 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21430 (strlen_dom_walker::before_dom_children): Call
21431 gimple_purge_dead_eh_edges. Dump tranformation with details
21433 (strlen_dom_walker::before_dom_children): Update call by adding
21434 new argument cleanup_eh.
21435 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21437 2018-01-03 Martin Liska <mliska@suse.cz>
21440 * cif-code.def (VARIADIC_THUNK): New enum value.
21441 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21444 2018-01-03 Jan Beulich <jbeulich@suse.com>
21446 * sse.md (mov<mode>_internal): Tighten condition for when to use
21447 vmovdqu<ssescalarsize> for TI and OI modes.
21449 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21451 Update copyright years.
21453 2018-01-03 Martin Liska <mliska@suse.cz>
21456 * ipa-visibility.c (function_and_variable_visibility): Skip
21457 functions with noipa attribure.
21459 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21461 * gcc.c (process_command): Update copyright notice dates.
21462 * gcov-dump.c (print_version): Ditto.
21463 * gcov.c (print_version): Ditto.
21464 * gcov-tool.c (print_version): Ditto.
21465 * gengtype.c (create_file): Ditto.
21466 * doc/cpp.texi: Bump @copying's copyright year.
21467 * doc/cppinternals.texi: Ditto.
21468 * doc/gcc.texi: Ditto.
21469 * doc/gccint.texi: Ditto.
21470 * doc/gcov.texi: Ditto.
21471 * doc/install.texi: Ditto.
21472 * doc/invoke.texi: Ditto.
21474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21476 * vector-builder.h (vector_builder::m_full_nelts): Change from
21477 unsigned int to poly_uint64.
21478 (vector_builder::full_nelts): Update prototype accordingly.
21479 (vector_builder::new_vector): Likewise.
21480 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21481 (vector_builder::operator ==): Likewise.
21482 (vector_builder::finalize): Likewise.
21483 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21484 Take the number of elements as a poly_uint64 rather than an
21486 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21487 from unsigned int to poly_uint64.
21488 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21489 (vec_perm_indices::new_vector): Likewise.
21490 (vec_perm_indices::length): Likewise.
21491 (vec_perm_indices::nelts_per_input): Likewise.
21492 (vec_perm_indices::input_nelts): Likewise.
21493 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21494 number of elements per input as a poly_uint64 rather than an
21495 unsigned int. Use the original encoding for variable-length
21496 vectors, rather than clamping each individual element.
21497 For the second and subsequent elements in each pattern,
21498 clamp the step and base before clamping their sum.
21499 (vec_perm_indices::series_p): Handle polynomial element counts.
21500 (vec_perm_indices::all_in_range_p): Likewise.
21501 (vec_perm_indices_to_tree): Likewise.
21502 (vec_perm_indices_to_rtx): Likewise.
21503 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21504 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21505 (tree_vector_builder::new_binary_operation): Handle polynomial
21506 element counts. Return false if we need to know the number
21507 of elements at compile time.
21508 * fold-const.c (fold_vec_perm): Punt if the number of elements
21509 isn't known at compile time.
21511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21513 * vec-perm-indices.h (vec_perm_builder): Change element type
21514 from HOST_WIDE_INT to poly_int64.
21515 (vec_perm_indices::element_type): Update accordingly.
21516 (vec_perm_indices::clamp): Handle polynomial element_types.
21517 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21518 (vec_perm_indices::all_in_range_p): Likewise.
21519 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21521 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21522 polynomial vec_perm_indices element types.
21523 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21524 * fold-const.c (fold_vec_perm): Likewise.
21525 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21526 * tree-vect-generic.c (lower_vec_perm): Likewise.
21527 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21528 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21529 element type to HOST_WIDE_INT.
21531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21532 Alan Hayward <alan.hayward@arm.com>
21533 David Sherwood <david.sherwood@arm.com>
21535 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21536 rather than an int. Use plus_constant.
21537 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21538 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21540 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21541 Alan Hayward <alan.hayward@arm.com>
21542 David Sherwood <david.sherwood@arm.com>
21544 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21545 a HOST_WIDE_INT to a poly_int64.
21547 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21548 Alan Hayward <alan.hayward@arm.com>
21549 David Sherwood <david.sherwood@arm.com>
21551 * calls.c (load_register_parameters): Cope with polynomial
21552 mode sizes. Require a constant size for BLKmode parameters
21553 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21554 forces a parameter to be padded at the lsb end in order to
21555 fill a complete number of words, require the parameter size
21556 to be ordered wrt UNITS_PER_WORD.
21558 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21559 Alan Hayward <alan.hayward@arm.com>
21560 David Sherwood <david.sherwood@arm.com>
21562 * reload1.c (spill_stack_slot_width): Change element type
21563 from unsigned int to poly_uint64_pod.
21564 (alter_reg): Treat mode sizes as polynomial.
21566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21567 Alan Hayward <alan.hayward@arm.com>
21568 David Sherwood <david.sherwood@arm.com>
21570 * reload.c (complex_word_subreg_p): New function.
21571 (reload_inner_reg_of_subreg, push_reload): Use it.
21573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21574 Alan Hayward <alan.hayward@arm.com>
21575 David Sherwood <david.sherwood@arm.com>
21577 * lra-constraints.c (process_alt_operands): Reject matched
21578 operands whose sizes aren't ordered.
21579 (match_reload): Refer to this check here.
21581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21582 Alan Hayward <alan.hayward@arm.com>
21583 David Sherwood <david.sherwood@arm.com>
21585 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21586 that the mode size is in the set {1, 2, 4, 8, 16}.
21588 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21589 Alan Hayward <alan.hayward@arm.com>
21590 David Sherwood <david.sherwood@arm.com>
21592 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21593 Use plus_constant instead of gen_rtx_PLUS.
21595 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21596 Alan Hayward <alan.hayward@arm.com>
21597 David Sherwood <david.sherwood@arm.com>
21599 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21600 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21601 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21602 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21603 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21604 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21605 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21606 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21607 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21608 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21610 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21611 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21612 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21613 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21614 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21615 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21616 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21617 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21618 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21619 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21621 * expr.c (emit_move_resolve_push): Treat the input and result
21622 of PUSH_ROUNDING as a poly_int64.
21623 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21624 (emit_push_insn): Likewise.
21625 * lra-eliminations.c (mark_not_eliminable): Likewise.
21626 * recog.c (push_operand): Likewise.
21627 * reload1.c (elimination_effects): Likewise.
21628 * rtlanal.c (nonzero_bits1): Likewise.
21629 * calls.c (store_one_arg): Likewise. Require the padding to be
21630 known at compile time.
21632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21633 Alan Hayward <alan.hayward@arm.com>
21634 David Sherwood <david.sherwood@arm.com>
21636 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21637 Use plus_constant instead of gen_rtx_PLUS.
21639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21640 Alan Hayward <alan.hayward@arm.com>
21641 David Sherwood <david.sherwood@arm.com>
21643 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21644 rather than an int.
21646 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21647 Alan Hayward <alan.hayward@arm.com>
21648 David Sherwood <david.sherwood@arm.com>
21650 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21651 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21652 via stack temporaries. Treat the mode size as polynomial too.
21654 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21655 Alan Hayward <alan.hayward@arm.com>
21656 David Sherwood <david.sherwood@arm.com>
21658 * expr.c (expand_expr_real_2): When handling conversions involving
21659 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21660 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21661 as a poly_uint64 too.
21663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21664 Alan Hayward <alan.hayward@arm.com>
21665 David Sherwood <david.sherwood@arm.com>
21667 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21670 Alan Hayward <alan.hayward@arm.com>
21671 David Sherwood <david.sherwood@arm.com>
21673 * combine.c (can_change_dest_mode): Handle polynomial
21674 REGMODE_NATURAL_SIZE.
21675 * expmed.c (store_bit_field_1): Likewise.
21676 * expr.c (store_constructor): Likewise.
21677 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21678 and polynomial REGMODE_NATURAL_SIZE.
21679 (gen_lowpart_common): Likewise.
21680 * reginfo.c (record_subregs_of_mode): Likewise.
21681 * rtlanal.c (read_modify_subreg_p): Likewise.
21683 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21684 Alan Hayward <alan.hayward@arm.com>
21685 David Sherwood <david.sherwood@arm.com>
21687 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21688 numbers of elements.
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 * match.pd: Cope with polynomial numbers of vector elements.
21696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21697 Alan Hayward <alan.hayward@arm.com>
21698 David Sherwood <david.sherwood@arm.com>
21700 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21701 in a POINTER_PLUS_EXPR.
21703 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21704 Alan Hayward <alan.hayward@arm.com>
21705 David Sherwood <david.sherwood@arm.com>
21707 * omp-simd-clone.c (simd_clone_subparts): New function.
21708 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21709 (ipa_simd_modify_function_body): Likewise.
21711 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21712 Alan Hayward <alan.hayward@arm.com>
21713 David Sherwood <david.sherwood@arm.com>
21715 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21716 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21717 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21718 (expand_vector_condition, vector_element): Likewise.
21719 (subparts_gt): New function.
21720 (get_compute_type): Use subparts_gt.
21721 (count_type_subparts): Delete.
21722 (expand_vector_operations_1): Use subparts_gt instead of
21723 count_type_subparts.
21725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21726 Alan Hayward <alan.hayward@arm.com>
21727 David Sherwood <david.sherwood@arm.com>
21729 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21730 (vect_compile_time_alias): ...this new function. Do the calculation
21731 on poly_ints rather than trees.
21732 (vect_prune_runtime_alias_test_list): Update call accordingly.
21734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21735 Alan Hayward <alan.hayward@arm.com>
21736 David Sherwood <david.sherwood@arm.com>
21738 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21740 (vect_schedule_slp_instance): Likewise.
21742 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21743 Alan Hayward <alan.hayward@arm.com>
21744 David Sherwood <david.sherwood@arm.com>
21746 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21747 constant and extern definitions for variable-length vectors.
21748 (vect_get_constant_vectors): Note that the number of units
21749 is known to be constant.
21751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21752 Alan Hayward <alan.hayward@arm.com>
21753 David Sherwood <david.sherwood@arm.com>
21755 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21756 of units as polynomial. Choose between WIDE and NARROW based
21759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21760 Alan Hayward <alan.hayward@arm.com>
21761 David Sherwood <david.sherwood@arm.com>
21763 * tree-vect-stmts.c (simd_clone_subparts): New function.
21764 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21771 vectors as polynomial. Use build_index_vector for
21772 IFN_GOMP_SIMD_LANE.
21774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21775 Alan Hayward <alan.hayward@arm.com>
21776 David Sherwood <david.sherwood@arm.com>
21778 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21779 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21780 for variable-length vectors.
21781 (vectorizable_mask_load_store): Treat the number of units as
21782 polynomial, asserting that it is constant if the condition has
21783 already been enforced.
21784 (vectorizable_store, vectorizable_load): Likewise.
21786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21787 Alan Hayward <alan.hayward@arm.com>
21788 David Sherwood <david.sherwood@arm.com>
21790 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21791 of units as polynomial. Punt if we can't tell at compile time
21792 which vector contains the final result.
21794 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21795 Alan Hayward <alan.hayward@arm.com>
21796 David Sherwood <david.sherwood@arm.com>
21798 * tree-vect-loop.c (vectorizable_induction): Treat the number
21799 of units as polynomial. Punt on SLP inductions. Use an integer
21800 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21801 cast of such a series for variable-length floating-point
21804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21805 Alan Hayward <alan.hayward@arm.com>
21806 David Sherwood <david.sherwood@arm.com>
21808 * tree.h (build_index_vector): Declare.
21809 * tree.c (build_index_vector): New function.
21810 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21811 of units as polynomial, forcibly converting it to a constant if
21812 vectorizable_reduction has already enforced the condition.
21813 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21814 to create a {1,2,3,...} vector.
21815 (vectorizable_reduction): Treat the number of units as polynomial.
21816 Choose vectype_in based on the largest scalar element size rather
21817 than the smallest number of units. Enforce the restrictions
21820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21821 Alan Hayward <alan.hayward@arm.com>
21822 David Sherwood <david.sherwood@arm.com>
21824 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21825 number of units as polynomial.
21827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21828 Alan Hayward <alan.hayward@arm.com>
21829 David Sherwood <david.sherwood@arm.com>
21831 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21832 * target.def (autovectorize_vector_sizes): Return the vector sizes
21833 by pointer, using vector_sizes rather than a bitmask.
21834 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21835 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21836 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21838 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21839 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21840 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21841 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21842 * omp-general.c (omp_max_vf): Likewise.
21843 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21844 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21845 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21846 * tree-vect-slp.c (vect_slp_bb): Likewise.
21847 * doc/tm.texi: Regenerate.
21848 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21850 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21851 the vector size as a poly_uint64 rather than an unsigned int.
21852 (current_vector_size): Change from an unsigned int to a poly_uint64.
21853 (get_vectype_for_scalar_type): Update accordingly.
21854 * tree.h (build_truth_vector_type): Take the size and number of
21855 units as a poly_uint64 rather than an unsigned int.
21856 (build_vector_type): Add a temporary overload that takes
21857 the number of units as a poly_uint64 rather than an unsigned int.
21858 * tree.c (make_vector_type): Likewise.
21859 (build_truth_vector_type): Take the number of units as a poly_uint64
21860 rather than an unsigned int.
21862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21863 Alan Hayward <alan.hayward@arm.com>
21864 David Sherwood <david.sherwood@arm.com>
21866 * target.def (get_mask_mode): Take the number of units and length
21867 as poly_uint64s rather than unsigned ints.
21868 * targhooks.h (default_get_mask_mode): Update accordingly.
21869 * targhooks.c (default_get_mask_mode): Likewise.
21870 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21871 * doc/tm.texi: Regenerate.
21873 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21874 Alan Hayward <alan.hayward@arm.com>
21875 David Sherwood <david.sherwood@arm.com>
21877 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21878 * omp-general.c (omp_max_vf): Likewise.
21879 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21880 (expand_omp_simd): Handle polynomial safelen.
21881 * omp-low.c (omplow_simd_context): Add a default constructor.
21882 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21883 (lower_rec_simd_input_clauses): Update accordingly.
21884 (lower_rec_input_clauses): Likewise.
21886 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21887 Alan Hayward <alan.hayward@arm.com>
21888 David Sherwood <david.sherwood@arm.com>
21890 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21891 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21892 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21893 (vect_analyze_slp_cost): Likewise.
21894 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21895 (vect_model_load_cost): Likewise.
21897 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21898 Alan Hayward <alan.hayward@arm.com>
21899 David Sherwood <david.sherwood@arm.com>
21901 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21902 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21903 from an unsigned int * to a poly_uint64_pod *.
21904 (calculate_unrolling_factor): New function.
21905 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21908 Alan Hayward <alan.hayward@arm.com>
21909 David Sherwood <david.sherwood@arm.com>
21911 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21912 from an unsigned int to a poly_uint64.
21913 (_loop_vec_info::slp_unrolling_factor): Likewise.
21914 (_loop_vec_info::vectorization_factor): Change from an int
21916 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21917 (vect_get_num_vectors): New function.
21918 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21919 (vect_get_num_copies): Use vect_get_num_vectors.
21920 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21921 to an unsigned int *.
21922 (vect_analyze_data_refs): Change min_vf from an int * to a
21924 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21925 than an unsigned HOST_WIDE_INT.
21926 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21927 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21928 to an unsigned int *.
21929 (vect_analyze_data_ref_dependences): Likewise.
21930 (vect_compute_data_ref_alignment): Handle polynomial vf.
21931 (vect_enhance_data_refs_alignment): Likewise.
21932 (vect_prune_runtime_alias_test_list): Likewise.
21933 (vect_shift_permute_load_chain): Likewise.
21934 (vect_supportable_dr_alignment): Likewise.
21935 (dependence_distance_ge_vf): Take the vectorization factor as a
21936 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21937 (vect_analyze_data_refs): Change min_vf from an int * to a
21939 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21940 vfm1 as a poly_uint64 rather than an int. Make the same change
21941 for the returned bound_scalar.
21942 (vect_gen_vector_loop_niters): Handle polynomial vf.
21943 (vect_do_peeling): Likewise. Update call to
21944 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21945 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21947 * tree-vect-loop.c (vect_determine_vectorization_factor)
21948 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21949 (vect_get_known_peeling_cost): Likewise.
21950 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21951 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21952 (vect_transform_loop): Likewise. Use the lowest possible VF when
21953 updating the upper bounds of the loop.
21954 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21955 rather than an int.
21956 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21957 polynomial unroll factors.
21958 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21959 (vect_make_slp_decision): Likewise.
21960 (vect_supported_load_permutation_p): Likewise, and polynomial
21962 (vect_analyze_slp_cost): Handle polynomial vf.
21963 (vect_slp_analyze_node_operations): Likewise.
21964 (vect_slp_analyze_bb_1): Likewise.
21965 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21966 than an unsigned HOST_WIDE_INT.
21967 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21968 (vectorizable_load): Handle polynomial vf.
21969 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21971 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21974 Alan Hayward <alan.hayward@arm.com>
21975 David Sherwood <david.sherwood@arm.com>
21977 * match.pd: Handle bit operations involving three constants
21978 and try to fold one pair.
21980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21982 * tree-vect-loop-manip.c: Include gimple-fold.h.
21983 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21984 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21985 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21986 Add a path that uses a step of VF instead of 1, but disable it
21988 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21989 and niters_no_overflow parameters. Update calls to
21990 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21991 Create a new SSA name if the latter choses to use a ste other
21992 than zero, and return it via niters_vector_mult_vf_var.
21993 * tree-vect-loop.c (vect_transform_loop): Update calls to
21994 vect_do_peeling, vect_gen_vector_loop_niters and
21995 slpeel_make_loop_iterate_ntimes.
21996 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21997 (vect_gen_vector_loop_niters): Update declarations after above changes.
21999 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
22001 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22002 128-bit round to integer instructions.
22003 (ceil<mode>2): Likewise.
22004 (btrunc<mode>2): Likewise.
22005 (round<mode>2): Likewise.
22007 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22009 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22010 unaligned VSX load/store on P8/P9.
22011 (expand_block_clear): Allow the use of unaligned VSX
22012 load/store on P8/P9.
22014 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22016 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22018 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22019 swap associated with both a load and a store.
22021 2018-01-02 Andrew Waterman <andrew@sifive.com>
22023 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22024 * config/riscv/riscv.md (clear_cache): Use it.
22026 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
22028 * web.c: Remove out-of-date comment.
22030 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22032 * expr.c (fixup_args_size_notes): Check that any existing
22033 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22034 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22035 (emit_single_push_insn): ...here.
22037 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22039 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22040 (const_vector_encoded_nelts): New function.
22041 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22042 (const_vector_int_elt, const_vector_elt): Declare.
22043 * emit-rtl.c (const_vector_int_elt_1): New function.
22044 (const_vector_elt): Likewise.
22045 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22046 of CONST_VECTOR_ELT.
22048 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22050 * expr.c: Include rtx-vector-builder.h.
22051 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22052 directly on the tree encoding.
22053 (const_vector_from_tree): Likewise.
22054 * optabs.c: Include rtx-vector-builder.h.
22055 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22056 sequence of "u" values.
22057 * vec-perm-indices.c: Include rtx-vector-builder.h.
22058 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22059 directly on the vec_perm_indices encoding.
22061 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22063 * doc/rtl.texi (const_vector): Describe new encoding scheme.
22064 * Makefile.in (OBJS): Add rtx-vector-builder.o.
22065 * rtx-vector-builder.h: New file.
22066 * rtx-vector-builder.c: Likewise.
22067 * rtl.h (rtx_def::u2): Add a const_vector field.
22068 (CONST_VECTOR_NPATTERNS): New macro.
22069 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22070 (CONST_VECTOR_DUPLICATE_P): Likewise.
22071 (CONST_VECTOR_STEPPED_P): Likewise.
22072 (CONST_VECTOR_ENCODED_ELT): Likewise.
22073 (const_vec_duplicate_p): Check for a duplicated vector encoding.
22074 (unwrap_const_vec_duplicate): Likewise.
22075 (const_vec_series_p): Check for a non-duplicated vector encoding.
22076 Say that the function only returns true for integer vectors.
22077 * emit-rtl.c: Include rtx-vector-builder.h.
22078 (gen_const_vec_duplicate_1): Delete.
22079 (gen_const_vector): Call gen_const_vec_duplicate instead of
22080 gen_const_vec_duplicate_1.
22081 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22082 (gen_const_vec_duplicate): Use rtx_vector_builder.
22083 (gen_const_vec_series): Likewise.
22084 (gen_rtx_CONST_VECTOR): Likewise.
22085 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22086 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22087 Build a new vector rather than modifying a CONST_VECTOR in-place.
22088 (handle_special_swappables): Update call accordingly.
22089 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22090 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22091 Build a new vector rather than modifying a CONST_VECTOR in-place.
22092 (handle_special_swappables): Update call accordingly.
22094 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22096 * simplify-rtx.c (simplify_const_binary_operation): Use
22097 CONST_VECTOR_ELT instead of XVECEXP.
22099 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22101 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22102 the selector elements to be different from the data elements
22103 if the selector is a VECTOR_CST.
22104 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22105 ssizetype for the selector.
22107 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22109 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22110 before testing each element individually.
22111 * tree-vect-generic.c (lower_vec_perm): Likewise.
22113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22115 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22116 * selftest-run-tests.c (selftest::run_tests): Call it.
22117 * vector-builder.h (vector_builder::operator ==): New function.
22118 (vector_builder::operator !=): Likewise.
22119 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22120 (vec_perm_indices::all_from_input_p): New function.
22121 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22122 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22123 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22124 instead of reading the VECTOR_CST directly. Detect whether both
22125 vector inputs are the same before constructing the vec_perm_indices,
22126 and update the number of inputs argument accordingly. Use the
22127 utility functions added above. Only construct sel2 if we need to.
22129 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22131 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22132 the broadcast of the low byte.
22133 (expand_mult_highpart): Use an explicit encoding for the permutes.
22134 * optabs-query.c (can_mult_highpart_p): Likewise.
22135 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22136 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22137 (vectorizable_bswap): Likewise.
22138 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22139 explicit encoding for the power-of-2 permutes.
22140 (vect_permute_store_chain): Likewise.
22141 (vect_grouped_load_supported): Likewise.
22142 (vect_permute_load_chain): Likewise.
22144 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22146 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22147 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22148 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22149 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22150 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22151 (vect_gen_perm_mask_any): Likewise.
22153 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22155 * int-vector-builder.h: New file.
22156 * vec-perm-indices.h: Include int-vector-builder.h.
22157 (vec_perm_indices): Redefine as an int_vector_builder.
22158 (auto_vec_perm_indices): Delete.
22159 (vec_perm_builder): Redefine as a stand-alone class.
22160 (vec_perm_indices::vec_perm_indices): New function.
22161 (vec_perm_indices::clamp): Likewise.
22162 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22163 (vec_perm_indices::new_vector): New function.
22164 (vec_perm_indices::new_expanded_vector): Update for new
22165 vec_perm_indices class.
22166 (vec_perm_indices::rotate_inputs): New function.
22167 (vec_perm_indices::all_in_range_p): Operate directly on the
22168 encoded form, without computing elided elements.
22169 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22170 encoding. Update for new vec_perm_indices class.
22171 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22172 the given vec_perm_builder.
22173 (expand_vec_perm_var): Update vec_perm_builder constructor.
22174 (expand_mult_highpart): Use vec_perm_builder instead of
22175 auto_vec_perm_indices.
22176 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22177 vec_perm_indices instead of auto_vec_perm_indices. Use a single
22178 or double series encoding as appropriate.
22179 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22180 vec_perm_indices instead of auto_vec_perm_indices.
22181 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22182 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22183 (vect_permute_store_chain): Likewise.
22184 (vect_grouped_load_supported): Likewise.
22185 (vect_permute_load_chain): Likewise.
22186 (vect_shift_permute_load_chain): Likewise.
22187 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22188 (vect_transform_slp_perm_load): Likewise.
22189 (vect_schedule_slp_instance): Likewise.
22190 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22191 (vectorizable_mask_load_store): Likewise.
22192 (vectorizable_bswap): Likewise.
22193 (vectorizable_store): Likewise.
22194 (vectorizable_load): Likewise.
22195 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22196 vec_perm_indices instead of auto_vec_perm_indices. Use
22197 tree_to_vec_perm_builder to read the vector from a tree.
22198 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22199 vec_perm_builder instead of a vec_perm_indices.
22200 (have_whole_vector_shift): Use vec_perm_builder and
22201 vec_perm_indices instead of auto_vec_perm_indices. Leave the
22202 truncation to calc_vec_perm_mask_for_shift.
22203 (vect_create_epilog_for_reduction): Likewise.
22204 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22205 from auto_vec_perm_indices to vec_perm_indices.
22206 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22207 instead of changing individual elements.
22208 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22209 the vector in d.perm.
22210 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22211 from auto_vec_perm_indices to vec_perm_indices.
22212 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22213 instead of changing individual elements.
22214 (arm_vectorize_vec_perm_const): Use new_vector to install
22215 the vector in d.perm.
22216 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22217 Update vec_perm_builder constructor.
22218 (rs6000_expand_interleave): Likewise.
22219 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22220 (rs6000_expand_interleave): Likewise.
22222 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22224 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22225 to qimode could truncate the indices.
22226 * optabs.c (expand_vec_perm_var): Likewise.
22228 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22230 * Makefile.in (OBJS): Add vec-perm-indices.o.
22231 * vec-perm-indices.h: New file.
22232 * vec-perm-indices.c: Likewise.
22233 * target.h (vec_perm_indices): Replace with a forward class
22235 (auto_vec_perm_indices): Move to vec-perm-indices.h.
22236 * optabs.h: Include vec-perm-indices.h.
22237 (expand_vec_perm): Delete.
22238 (selector_fits_mode_p, expand_vec_perm_var): Declare.
22239 (expand_vec_perm_const): Declare.
22240 * target.def (vec_perm_const_ok): Replace with...
22241 (vec_perm_const): ...this new hook.
22242 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22243 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22244 * doc/tm.texi: Regenerate.
22245 * optabs.def (vec_perm_const): Delete.
22246 * doc/md.texi (vec_perm_const): Likewise.
22247 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22248 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22249 expand_vec_perm for constant permutation vectors. Assert that
22250 the mode of variable permutation vectors is the integer equivalent
22251 of the mode that is being permuted.
22252 * optabs-query.h (selector_fits_mode_p): Declare.
22253 * optabs-query.c: Include vec-perm-indices.h.
22254 (selector_fits_mode_p): New function.
22255 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22256 is defined, instead of checking whether the vec_perm_const_optab
22257 exists. Use targetm.vectorize.vec_perm_const instead of
22258 targetm.vectorize.vec_perm_const_ok. Check whether the indices
22259 fit in the vector mode before using a variable permute.
22260 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22261 vec_perm_indices instead of an rtx.
22262 (expand_vec_perm): Replace with...
22263 (expand_vec_perm_const): ...this new function. Take the selector
22264 as a vec_perm_indices rather than an rtx. Also take the mode of
22265 the selector. Update call to shift_amt_for_vec_perm_mask.
22266 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22267 Use vec_perm_indices::new_expanded_vector to expand the original
22268 selector into bytes. Check whether the indices fit in the vector
22269 mode before using a variable permute.
22270 (expand_vec_perm_var): Make global.
22271 (expand_mult_highpart): Use expand_vec_perm_const.
22272 * fold-const.c: Includes vec-perm-indices.h.
22273 * tree-ssa-forwprop.c: Likewise.
22274 * tree-vect-data-refs.c: Likewise.
22275 * tree-vect-generic.c: Likewise.
22276 * tree-vect-loop.c: Likewise.
22277 * tree-vect-slp.c: Likewise.
22278 * tree-vect-stmts.c: Likewise.
22279 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22281 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22282 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22283 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22284 (aarch64_vectorize_vec_perm_const): ...this new function.
22285 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22286 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22287 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22288 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22289 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22290 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22291 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22293 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
22294 check for NEON modes.
22295 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22296 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22297 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22298 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22300 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
22301 the old VEC_PERM_CONST conditions.
22302 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22303 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22304 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22305 (ia64_vectorize_vec_perm_const_ok): Merge into...
22306 (ia64_vectorize_vec_perm_const): ...this new function.
22307 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22308 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22309 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22310 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22311 * config/mips/mips.c (mips_expand_vec_perm_const)
22312 (mips_vectorize_vec_perm_const_ok): Merge into...
22313 (mips_vectorize_vec_perm_const): ...this new function.
22314 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22315 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22316 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22317 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22318 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22319 (rs6000_expand_vec_perm_const): Delete.
22320 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22322 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22323 (altivec_expand_vec_perm_const_le): Take each operand individually.
22324 Operate on constant selectors rather than rtxes.
22325 (altivec_expand_vec_perm_const): Likewise. Update call to
22326 altivec_expand_vec_perm_const_le.
22327 (rs6000_expand_vec_perm_const): Delete.
22328 (rs6000_vectorize_vec_perm_const_ok): Delete.
22329 (rs6000_vectorize_vec_perm_const): New function.
22330 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22331 an element count and rtx array.
22332 (rs6000_expand_extract_even): Update call accordingly.
22333 (rs6000_expand_interleave): Likewise.
22334 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22335 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22336 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22337 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22338 (rs6000_expand_vec_perm_const): Delete.
22339 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22340 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22341 (altivec_expand_vec_perm_const_le): Take each operand individually.
22342 Operate on constant selectors rather than rtxes.
22343 (altivec_expand_vec_perm_const): Likewise. Update call to
22344 altivec_expand_vec_perm_const_le.
22345 (rs6000_expand_vec_perm_const): Delete.
22346 (rs6000_vectorize_vec_perm_const_ok): Delete.
22347 (rs6000_vectorize_vec_perm_const): New function. Remove stray
22348 reference to the SPE evmerge intructions.
22349 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22350 an element count and rtx array.
22351 (rs6000_expand_extract_even): Update call accordingly.
22352 (rs6000_expand_interleave): Likewise.
22353 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22354 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22356 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22358 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22360 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22361 vector mode and that that mode matches the mode of the data
22363 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22364 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
22365 directly using expand_vec_perm_1 when forcing selectors into
22367 (expand_vec_perm_var): New function, split out from expand_vec_perm.
22369 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22371 * optabs-query.h (can_vec_perm_p): Delete.
22372 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22373 * optabs-query.c (can_vec_perm_p): Split into...
22374 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22375 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22376 particular selector is valid.
22377 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22378 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22379 (vect_grouped_load_supported): Likewise.
22380 (vect_shift_permute_load_chain): Likewise.
22381 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22382 (vect_transform_slp_perm_load): Likewise.
22383 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22384 (vectorizable_bswap): Likewise.
22385 (vect_gen_perm_mask_checked): Likewise.
22386 * fold-const.c (fold_ternary_loc): Likewise. Don't take
22387 implementations of variable permutation vectors into account
22388 when deciding which selector to use.
22389 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22390 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22391 with a false third argument.
22392 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22393 to test whether the constant selector is valid and can_vec_perm_var_p
22394 to test whether a variable selector is valid.
22396 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22398 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22399 * optabs-query.c (can_vec_perm_p): Likewise.
22400 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22401 instead of vec_perm_indices.
22402 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22403 (vect_gen_perm_mask_checked): Likewise,
22404 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22405 (vect_gen_perm_mask_checked): Likewise,
22407 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22409 * optabs-query.h (qimode_for_vec_perm): Declare.
22410 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22411 (qimode_for_vec_perm): ...this new function.
22412 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22414 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22416 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22417 does not have a conditional at the top.
22419 2018-01-02 Richard Biener <rguenther@suse.de>
22421 * ipa-inline.c (big_speedup_p): Fix expression.
22423 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22426 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22429 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22433 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22434 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22435 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22436 cond_taken_branch_cost 3->4.
22438 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22440 PR tree-optimization/83581
22441 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22442 TODO_cleanup_cfg if any changes have been made.
22444 PR middle-end/83608
22445 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22446 convert_modes if target mode has the right side, but different mode
22449 PR middle-end/83609
22450 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22451 last argument when extracting from CONCAT. If either from_real or
22452 from_imag is NULL, use expansion through memory. If result is not
22453 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22454 the parts directly to inner mode, if even that fails, use expansion
22457 PR middle-end/83623
22458 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22459 check for bswap in mode rather than HImode and use that in expand_unop
22462 Copyright (C) 2018 Free Software Foundation, Inc.
22464 Copying and distribution of this file, with or without modification,
22465 are permitted in any medium without royalty provided the copyright
22466 notice and this notice are preserved.