1 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
4 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5 cfun->machine->max_used_stack_alignment if needed.
7 2018-08-04 Martin Sebor <msebor@redhat.com>
9 PR tree-optimization/86571
10 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
13 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
15 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
18 2018-08-03 Jeff Law <law@redhat.com>
21 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
22 Define to speculation_safe_value_not_needed.
24 2018-08-03 David Malcolm <dmalcolm@redhat.com>
26 * doc/gcov.texi (-x): Remove duplicate "to".
27 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
28 (-Wif-not-aligned): Remove duplicate "is".
29 (-flto): Remove duplicate "the".
30 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
32 (MSP430 Options): Remove duplicate "and" from the description
33 of "-mgprel-sec=regexp".
34 (x86 Options): Remove duplicate copies of "vmldLog102" and
35 vmlsLog104 from description of "-mveclibabi=type".
37 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
39 * internal-fn.h (first_commutative_argument): Declare.
40 * internal-fn.c (first_commutative_argument): New function.
41 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
42 restrictions for pattern statements. Use first_commutative_argument
43 to look for commutative operands in calls to internal functions.
45 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
47 * Makefile.in (wide-int-range.o): New.
48 * tree-vrp.c: Move all the wide_int_* functions to...
49 * wide-int-range.cc: ...here.
50 * tree-vrp.h: Move all the wide_int_* prototypes to...
51 * wide-int-range.h: ...here.
53 2018-08-03 Tom de Vries <tdevries@suse.de>
55 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
57 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
58 * except.c (output_function_exception_table): Do early exit if
59 targetm_common.except_unwind_info (&global_options) == UI_NONE.
61 2018-08-03 Martin Liska <mliska@suse.cz>
63 * predict.c (dump_prediction): Change to 2 digits
66 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
68 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
70 (falkor_am_1_gtov_gtov): ... a new insn reservation.
72 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
74 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
75 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
76 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
77 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
78 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
80 2018-08-02 David Malcolm <dmalcolm@redhat.com>
82 * diagnostic-show-locus.c (diagnostic_show_locus): Use
83 pp_take_prefix when saving the existing prefix.
84 * diagnostic.c (diagnostic_append_note): Likewise.
85 * langhooks.c (lhd_print_error_function): Likewise.
86 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
87 param's type. Free the existing prefix.
88 (pp_take_prefix): New function.
89 (pretty_printer::pretty_printer): Drop the prefix parameter.
90 Rename the length parameter to match the comment.
91 (pretty_printer::~pretty_printer): Free the prefix.
92 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
94 (struct pretty_printer): Drop the "const" from "prefix" field's
95 type and clarify memory management.
96 (pp_set_prefix): Drop the "const" from the 2nd param.
97 (pp_take_prefix): New decl.
99 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
101 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
102 for word_mode_ok here instead of passing as argument.
103 (expand_block_compare): Change select_block_compare_mode() call.
104 (expand_strncmp_gpr_sequence): New function.
105 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
107 2018-08-02 Jeff Law <law@redhat.com>
110 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
111 Define to speculation_safe_value_not_needed.
114 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
115 Define to speculation_safe_value_not_needed.
117 2018-08-02 Tom de Vries <tdevries@suse.de>
120 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
121 function. Return UI_TARGET unconditionally.
122 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
123 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
125 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
127 * genemit.c (print_overload_test): Fix typo.
129 2018-08-02 Richard Biener <rguenther@suse.de>
131 PR tree-optimization/86816
132 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
133 which checks for value availability before querying it.
134 (gvn_uses_equal): Use it.
135 (same_succ_hash): Likewise.
136 (gimple_equal_p): Likewise.
138 2018-08-02 Nick Clifton <nickc@redhat.com>
141 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
142 Define to speculation_safe_value_not_needed.
145 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
146 Define to speculation_safe_value_not_needed.
149 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
150 Define to speculation_safe_value_not_needed.
153 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
154 Define to speculation_safe_value_not_needed.
157 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
158 Define to speculation_safe_value_not_needed.
161 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
162 Define to speculation_safe_value_not_needed.
165 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
166 Define to speculation_safe_value_not_needed.
169 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
170 Define to speculation_safe_value_not_needed.
173 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
174 speculation_safe_value_not_needed.
177 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
178 to speculation_safe_value_not_needed.
180 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
182 * doc/md.texi: Expand the documentation of instruction names
183 to mention port-local uses. Document '@' in pattern names.
184 * read-md.h (overloaded_instance, overloaded_name): New structs.
186 (md_reader::handle_overloaded_name): New member function.
187 (md_reader::get_overloads): Likewise.
188 (md_reader::m_first_overload): New member variable.
189 (md_reader::m_next_overload_ptr): Likewise.
190 (md_reader::m_overloads_htab): Likewise.
191 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
192 m_next_overload_ptr and m_overloads_htab.
193 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
194 (get_mode_token, get_code_token, get_int_token): New functions.
195 (map_attr_string): Add an optional argument that passes back
196 the associated iterator.
197 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
198 (md_reader::handle_overloaded_name, add_overload_instance): New
200 (apply_iterators): Handle '@' names. Report an error if '@'
201 is used without iterators.
202 (initialize_iterators): Initialize the new iterator_group fields.
203 * genopinit.c (handle_overloaded_code_for)
204 (handle_overloaded_gen): New functions.
205 (main): Use them to print declarations of maybe_code_for_* and
206 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
207 * genemit.c (print_overload_arguments, print_overload_test)
208 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
209 (main): Use it to print definitions of maybe_code_for_* and
210 maybe_gen_* functions.
211 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
212 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
213 instead of explicit mode checks.
214 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
215 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
216 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
217 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
218 (aarch64_expand_compare_and_swap): Likewise
219 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
220 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
221 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
222 (aarch64_constant_pool_reload_icode): Delete.
223 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
224 instead of aarch64_constant_pool_reload_icode. Use
225 code_for_aarch64_reload_mov instead of explicit mode checks.
226 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
227 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
228 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
229 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
230 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
231 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
232 (aarch64_atomic_load_op_code): Delete.
233 (aarch64_emit_atomic_load_op): Likewise.
234 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
235 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
236 instead of aarch64_emit_atomic_load_op.
237 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
238 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
239 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
240 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
241 character before the pattern name.
242 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
243 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
244 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
245 (aarch64_frecps<mode>): Likewise.
246 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
247 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
248 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
249 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
250 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
252 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
254 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
255 Allow HFmode constants if TARGET_FP_F16INST.
257 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
260 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
261 No longer check last store for clobber of address register.
263 2018-08-02 Martin Liska <mliska@suse.cz>
265 PR gcov-profile/86817
266 * gcov.c (process_all_functions): New function.
268 (process_file): Move functions processing to
269 process_all_functions.
271 2018-08-02 David Malcolm <dmalcolm@redhat.com>
273 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
274 "const" to the "gimple *" and "rtx_insn *" parameters.
275 * dumpfile.h (dump_user_location_t::dump_user_location_t):
277 (dump_location_t::dump_location_t): Likewise.
279 2018-08-01 Martin Sebor <msebor@redhat.com>
281 PR tree-optimization/86650
282 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
283 rather than a "gcall *". Directly pass the data of interest
284 to percent_K_format, rather than building a temporary CALL_EXPR
286 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
287 (gimple_fold_builtin_strncat): Adjust.
288 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
289 gcall* argument with gimple*.
290 * gimple-ssa-warn-restrict.c (check_call): Same.
291 (wrestrict_dom_walker::before_dom_children): Same.
292 (builtin_access::builtin_access): Same.
293 (check_bounds_or_overlap): Same
294 (maybe_diag_overlap): Same.
295 (maybe_diag_offset_bounds): Same.
296 * tree-diagnostic.c (default_tree_printer): Move usage of
297 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
299 * tree-pretty-print.c (percent_K_format): Add argument.
300 * tree-pretty-print.h: Add argument.
301 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
302 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
303 (maybe_diag_stxncpy_trunc): Same.
304 (handle_builtin_stxncpy): Same.
305 (handle_builtin_strcat): Same.
307 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
309 * match.pd: Optimise pointer range checks.
311 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
313 PR tree-optimization/86758
314 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
315 to remove pattern statements.
317 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
319 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
320 result of dfs_enumerate_from when constructing stmt_vec_infos,
321 instead of additionally calling get_loop_body.
323 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
325 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
327 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
328 When creating an iv, assert that the step is not known to be zero.
329 (vect_setup_realignment): Update call accordingly.
330 * tree-vect-stmts.c (vectorizable_store): Likewise.
331 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
333 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
335 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
336 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
337 (vectorizable_reduction): Likewise.
338 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
339 (vect_detect_hybrid_slp_stmts): Likewise.
340 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
342 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
344 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
345 (wide_int_set_zero_nonzero_bits): ...this.
346 (zero_nonzero_bits_from_vr): Rename to...
347 (vrp_set_zero_nonzero_bits): ...this.
348 (extract_range_from_multiplicative_op_1): Abstract wide int
350 (wide_int_range_multiplicative_op): ...here.
351 (extract_range_from_binary_expr_1): Extract wide int binary
352 operations into their own functions.
353 (wide_int_range_lshift): New.
354 (wide_int_range_can_optimize_bit_op): New.
355 (wide_int_range_shift_undefined_p): New.
356 (wide_int_range_bit_xor): New.
357 (wide_int_range_bit_ior): New.
358 (wide_int_range_bit_and): New.
359 (wide_int_range_trunc_mod): New.
360 (extract_range_into_wide_ints): New.
361 (vrp_shift_undefined_p): New.
362 (extract_range_from_multiplicative_op): New.
363 (vrp_can_optimize_bit_op): New.
364 * tree-vrp.h (value_range::dump): New.
365 (wide_int_range_multiplicative_op): New.
366 (wide_int_range_lshift):New.
367 (wide_int_range_shift_undefined_p): New.
368 (wide_int_range_bit_xor): New.
369 (wide_int_range_bit_ior): New.
370 (wide_int_range_bit_and): New.
371 (wide_int_range_trunc_mod): New.
372 (zero_nonzero_bits_from_bounds): Rename to...
373 (wide_int_set_zero_nonzero_bits): ...this.
374 (zero_nonzero_bits_from_vr): Rename to...
375 (vrp_set_zero_nonzero_bits): ...this.
376 (range_easy_mask_min_max): Rename to...
377 (wide_int_range_can_optimize_bit_op): this.
378 * vr-values.c (simplify_bit_ops_using_ranges): Rename
379 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
381 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
383 * tree-vectorizer.h (vect_orig_stmt): New function.
384 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
385 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
386 (vect_create_epilog_for_reduction): Likewise.
387 (vectorizable_live_operation): Likewise.
388 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
389 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
390 * tree-vect-stmts.c (vectorizable_call): Likewise.
391 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
393 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
395 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
397 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
398 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
399 (vect_transform_loop): Likewise.
400 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
402 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
404 * tree-vectorizer.h (vect_schedule_slp): Return void.
405 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
406 (vect_schedule_slp): Likewise.
408 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
410 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
412 (vect_transform_loop): Update calls accordingly. Schedule SLP
413 instances before the main loop, if any exist.
415 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
417 PR tree-optimization/86749
418 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
419 If the lhs is used in a COND_EXPR, check that it is being used
420 as the "then" or "else" value.
422 2018-08-01 Tom de Vries <tdevries@suse.de>
425 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
426 speculation_safe_value_not_needed.
428 2018-08-01 Richard Biener <rguenther@suse.de>
430 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
433 2018-08-01 Martin Liska <mliska@suse.cz>
435 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
436 format how successful transformation is dumped.
437 (gimple_mod_pow2_value_transform): Likewise.
438 (gimple_mod_subtract_transform): Likewise.
439 (gimple_stringops_transform): Likewise.
441 2018-08-01 Martin Liska <mliska@suse.cz>
444 * value-prof.c (interesting_stringop_to_profile_p):
445 Simplify the code and add BUILT_IN_MEMMOVE.
446 (gimple_stringops_transform): Likewise.
448 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
450 * config/aarch64/aarch64-simd.md
451 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
452 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
453 use GPI iterator instead of SI mode.
455 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
457 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
458 rs6000_speculation_barrier.
459 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
460 new barrier pattern name.
462 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
464 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
465 (speculation_barrier): New insn.
467 2018-08-01 Richard Biener <rguenther@suse.de>
470 * graphite.h: Include isl/id.h and isl/space.h to allow build
473 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
476 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
477 mode for COFF targets.
478 * defaults.h (TARGET_COFF): Define.
479 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
480 TARGET_COFF): Define.
481 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
482 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
483 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
485 2018-07-31 Alexandre Oliva <oliva@adacore.com>
487 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
488 * gimple-streamer-out.c (output_bb): Save it.
489 * lto-streamer-in.c (input_struct_function_base): Restore
490 instance discriminator if available. Create map on demand.
491 * lto-streamer-out.c (output_struct_function_base): Save it if
493 * final.c (decl_to_instance_map): Document LTO strategy.
495 2018-07-31 Alexandre Oliva <oliva@adacore.com>
496 Olivier Hainque <hainque@adacore.com>
498 * debug.h (decl_to_instance_map_t): New type.
499 (decl_to_instance_map): Declare.
500 (maybe_create_decl_to_instance_map): New inline function.
501 * final.c (bb_discriminator, last_bb_discriminator): New statics,
502 to track basic block discriminators.
503 (final_start_function_1): Initialize them.
504 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
506 (decl_to_instance_map): New variable.
507 (map_decl_to_instance, maybe_set_discriminator): New functions.
508 (notice_source_line): Set discriminator.
510 2018-07-31 Ian Lance Taylor <iant@golang.org>
512 * targhooks.c (default_have_speculation_safe_value): Add
515 2018-07-31 David Malcolm <dmalcolm@redhat.com>
517 * dump-context.h: Include "pretty-print.h".
518 (dump_context::refresh_dumps_are_enabled): New decl.
519 (dump_context::emit_item): New decl.
520 (class dump_context): Add fields "m_test_pp" and
522 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
523 (temp_dump_context::get_dumped_text): New decl.
524 (class temp_dump_context): Add field "m_pp".
525 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
526 (dump_context::refresh_dumps_are_enabled): ...and add a test for
528 (set_dump_file): Update for above change.
529 (set_alt_dump_file): Likewise.
530 (dump_loc): New overload, taking a pretty_printer *.
531 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
532 to any test pretty-printer.
533 (make_item_for_dump_gimple_stmt): New function, adapted from
534 optinfo::add_gimple_stmt.
535 (dump_context::dump_gimple_stmt): Call it, and use the result,
536 eliminating the direct usage of dump_file and alt_dump_file in
537 favor of indirectly using them via emit_item.
538 (make_item_for_dump_gimple_expr): New function, adapted from
539 optinfo::add_gimple_expr.
540 (dump_context::dump_gimple_expr): Call it, and use the result,
541 eliminating the direct usage of dump_file and alt_dump_file in
542 favor of indirectly using them via emit_item.
543 (make_item_for_dump_generic_expr): New function, adapted from
545 (dump_context::dump_generic_expr): Call it, and use the result,
546 eliminating the direct usage of dump_file and alt_dump_file in
547 favor of indirectly using them via emit_item.
548 (make_item_for_dump_printf_va): New function, adapted from
549 optinfo::add_printf_va.
550 (make_item_for_dump_printf): New function.
551 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
552 and use the result, eliminating the direct usage of dump_file and
553 alt_dump_file in favor of indirectly using them via emit_item.
554 (make_item_for_dump_dec): New function.
555 (dump_context::dump_dec): Call it, and use the result,
556 eliminating the direct usage of dump_file and alt_dump_file in
557 favor of indirectly using them via emit_item.
558 (make_item_for_dump_symtab_node): New function, adapted from
559 optinfo::add_symtab_node.
560 (dump_context::dump_symtab_node): Call it, and use the result,
561 eliminating the direct usage of dump_file and alt_dump_file in
562 favor of indirectly using them via emit_item.
563 (dump_context::begin_scope): Reimplement, avoiding direct usage
564 of dump_file and alt_dump_file in favor of indirectly using them
566 (dump_context::emit_item): New member function.
567 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
568 Set up test pretty-printer on the underlying context. Call
569 refresh_dumps_are_enabled.
570 (temp_dump_context::~temp_dump_context): Call
571 refresh_dumps_are_enabled.
572 (temp_dump_context::get_dumped_text): New member function.
573 (selftest::verify_dumped_text): New function.
574 (ASSERT_DUMPED_TEXT_EQ): New macro.
575 (selftest::test_capture_of_dump_calls): Run all tests twice, with
576 and then without optinfo enabled. Add uses of
577 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
578 * dumpfile.h: Update comment for the dump_* API.
579 * optinfo-emit-json.cc
580 (selftest::test_building_json_from_dump_calls): Update for new
581 param for temp_dump_context ctor.
582 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
584 (optinfo_item::~optinfo_item): Likewise.
585 (optinfo::add_item): New member function.
586 (optinfo::emit): Update comment.
587 (optinfo::add_string): Delete.
588 (optinfo::add_printf): Delete.
589 (optinfo::add_printf_va): Delete.
590 (optinfo::add_gimple_stmt): Delete.
591 (optinfo::add_gimple_expr): Delete.
592 (optinfo::add_tree): Delete.
593 (optinfo::add_symtab_node): Delete.
594 (optinfo::add_dec): Delete.
595 * optinfo.h (class dump_context): New forward decl.
596 (optinfo::add_item): New decl.
597 (optinfo::add_string): Delete.
598 (optinfo::add_printf): Delete.
599 (optinfo::add_printf_va): Delete.
600 (optinfo::add_gimple_stmt): Delete.
601 (optinfo::add_gimple_expr): Delete.
602 (optinfo::add_tree): Delete.
603 (optinfo::add_symtab_node): Delete.
604 (optinfo::add_dec): Delete.
605 (optinfo::add_poly_int): Delete.
606 (optinfo_item::optinfo_item): Remove "owned" param.
607 (class optinfo_item): Remove field "m_owned".
609 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
612 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
613 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
614 requested variable alignment.
615 (expand_one_ssa_partition): Likewise.
616 (expand_one_var): Likewise.
618 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
620 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
621 to speculation_safe_value_not_needed.
623 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
625 * targhooks.h (speculation_safe_value_not_needed): New prototype.
626 * targhooks.c (speculation_safe_value_not_needed): New function.
627 * target.def (have_speculation_safe_value): Update documentation.
628 * doc/tm.texi: Regenerated.
630 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
632 * config/aarch64/iterators.md (ALLI_TI): New iterator.
633 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
635 (despeculate_copy<ALLI:mode>_insn): New insn.
636 (despeculate_copyti_insn): New insn.
637 (despeculate_simple<ALLI:mode>): New insn
638 (despeculate_simpleti): New insn.
639 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
641 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
642 aarch64_speculation_safe_value.
643 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
645 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
647 * config/aarch64/aarch64-speculation.cc: New file.
648 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
649 before pass_reorder_blocks.
650 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
652 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
653 X14 and X15 when tracking speculation.
654 * config/aarch64/aarch64.md (register name constants): Add
655 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
656 (unspec): Add UNSPEC_SPECULATION_TRACKER.
657 (speculation_barrier): New insn attribute.
658 (cmp<mode>): Allow SP in comparisons.
659 (speculation_tracker): New insn.
660 (speculation_barrier): Add speculation_barrier attribute.
661 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
662 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
663 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
665 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
667 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
668 aarch64_track_speculation is true.
669 (tb<optab><mode>1): Likewise.
670 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
671 generate CB[N]Z when tracking speculation.
672 (aarch64_split_compare_and_swap): Likewise.
673 (aarch64_split_atomic_op): Likewise.
675 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
677 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
679 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
681 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
682 (speculation_barrier): New insn.
684 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
686 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
687 * config/arm/arm.md (speculation_barrier): New expand.
688 (speculation_barrier_insn): New pattern.
690 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
692 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
693 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
694 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
695 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
697 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
698 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
699 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
700 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
701 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
702 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
703 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
704 * builtins.c (expand_speculation_safe_value): New function.
705 (expand_builtin): Call it.
706 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
707 * doc/extend.texi: Document __builtin_speculation_safe_value.
708 * doc/md.texi: Document "speculation_barrier" pattern.
709 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
710 TARGET_HAVE_SPECULATION_SAFE_VALUE.
711 * doc/tm.texi: Regenerated.
712 * target.def (have_speculation_safe_value, speculation_safe_value): New
714 * targhooks.c (default_have_speculation_safe_value): New function.
715 (default_speculation_safe_value): New function.
716 * targhooks.h (default_have_speculation_safe_value): Add prototype.
717 (default_speculation_safe_value): Add prototype.
719 2018-07-31 David Malcolm <dmalcolm@redhat.com>
721 * dump-context.h (dump_context::dump_loc): New decl.
722 * dumpfile.c (dump_context::dump_loc): New member function.
723 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
724 and dump_gimple_stmt.
725 (dump_context::dump_gimple_expr_loc): Likewise, using
727 (dump_context::dump_generic_expr_loc): Likewise, using
729 (dump_context::dump_printf_loc_va): Likewise, using
731 (dump_context::begin_scope): Explicitly using the global function
732 "dump_loc", rather than the member function.
734 2018-07-31 Martin Sebor <msebor@redhat.com>
736 PR tree-optimization/86741
737 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
739 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
741 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
742 depend on whether prefetch instructions will be emitted or not.
743 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
744 will be emitted or not.
745 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
746 (TARGET_SETMEM_PFD): New macros.
748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
750 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
751 (NULL_STMT_VEC_INFO): Delete.
752 (stmt_vec_info::operator*): Likewise.
753 (stmt_vec_info::operator gimple *): Likewise.
754 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
755 of NULL_STMT_VEC_INFO.
756 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
757 (vect_reassociating_reduction_p): Likewise.
758 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
759 (vectorizable_store): Likewise.
760 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
761 (vec_info::free_stmt_vec_infos): Likewise.
763 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
765 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
766 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
768 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
770 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
771 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
772 (vec_info::free_stmt_vec_info): New private member functions.
773 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
774 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
775 * tree-parloops.c (gather_scalar_reductions): Remove calls to
776 set_stmt_vec_info_vec and free_stmt_vec_infos.
777 * tree-vect-loop.c (_loop_vec_info): Remove call to
778 set_stmt_vec_info_vec.
779 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
780 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
781 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
782 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
783 (vec_info::free_stmt_vec_info): ...these new functions. Remove
784 assignments in {vec_info::,}new_stmt_vec_info that are redundant
785 with the clearing in the xcalloc.
786 (stmt_vec_info_vec): Delete.
787 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
788 (vectorize_loops): Likewise.
789 (vec_info::~vec_info): Remove argument from call to
791 (vec_info::add_stmt): Remove vinfo argument from call to
794 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
796 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
797 rather than a gimple stmt.
798 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
799 information for pattern statements when passed the original
800 statement; instead wait to be passed the pattern statement itself.
801 Don't call set_vinfo_for_stmt here.
802 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
803 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
805 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
806 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
807 stmt_vec_infos entry.
809 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
811 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
812 * tree-vectorizer.c (vec_info::replace_stmt): New function.
813 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
814 * tree-vect-stmts.c (vectorizable_call): Likewise.
815 (vectorizable_simd_clone_call): Likewise.
817 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
819 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
820 * tree-vectorizer.c (vec_info::remove_stmt): New function.
821 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
822 * tree-vect-loop.c (vect_transform_loop): Likewise.
823 * tree-vect-slp.c (vect_schedule_slp): Likewise.
824 * tree-vect-stmts.c (vect_remove_stores): Likewise.
826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
828 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
829 (vect_dr_stmt): Delete.
830 * tree-vectorizer.c (vec_info::lookup_dr): New function.
831 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
833 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
834 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
835 (vect_verify_datarefs_alignment, vect_peeling_supportable)
836 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
837 (vect_analyze_data_refs): Likewise.
838 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
840 (vect_find_same_alignment_drs): Likewise.
841 (vect_slp_analyze_node_dependences): Update calls accordingly.
842 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
843 instead of DR_VECT_AUX.
844 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
845 of a vector data references. Use vec_info::lookup_dr instead of
847 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
848 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
849 instead of DR_VECT_AUX.
851 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
853 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
855 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
857 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
858 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
859 (vect_gen_prolog_loop_niters): Likewise.
861 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
863 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
864 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
865 (vect_known_alignment_in_bytes, vect_dr_behavior)
866 (vect_get_scalar_dr_size): Take references as dr_vec_infos
867 instead of data_references. Update calls to other routines for
868 which the same change has been made.
869 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
870 dr_vec_infos instead of stmt_vec_infos.
871 (vect_analyze_data_ref_dependence): Update call accordingly.
872 (vect_slp_analyze_data_ref_dependence)
873 (vect_record_base_alignments): Use DR_VECT_AUX.
874 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
875 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
876 (vector_alignment_reachable_p, vect_get_data_access_cost)
877 (vect_peeling_supportable, vect_analyze_group_access_1)
878 (vect_analyze_group_access, vect_analyze_data_ref_access)
879 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
880 (vect_compile_time_alias, vect_small_gap_p)
881 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
882 (vect_supportable_dr_alignment): Take references as dr_vec_infos
883 instead of data_references. Update calls to other routines for
884 which the same change has been made.
885 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
886 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
887 (vect_slp_analyze_and_verify_node_alignment)
888 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
889 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
890 (vect_setup_realignment): Use dr_vec_infos. Update calls after
892 (_vect_peel_info::dr): Replace with...
893 (_vect_peel_info::dr_info): ...this new field.
894 (vect_peeling_hash_get_most_frequent)
895 (vect_peeling_hash_choose_best_peeling): Update accordingly.
896 (vect_peeling_hash_get_lowest_cost):
897 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
898 routines for which the same change has been made.
899 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
901 * tree-vect-loop-manip.c (get_misalign_in_elems)
902 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
904 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
905 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
906 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
907 (get_group_load_store_type, get_negative_load_store_type)
908 (vect_get_data_ptr_increment, vectorizable_store)
909 (vectorizable_load): Likewise.
910 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
911 Update calls to other routines for which the same change has been made.
913 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
915 * tree-vectorizer.h (vec_info::move_dr): New member function.
916 (dataref_aux): Rename to...
917 (dr_vec_info): ...this and add "dr" and "stmt" fields.
918 (_stmt_vec_info::dr_aux): Update accordingly.
919 (_stmt_vec_info::data_ref_info): Delete.
920 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
921 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
922 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
923 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
925 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
926 (STMT_VINFO_DR_INFO): New macro.
927 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
928 (set_dr_misalignment): Update after rename of dataref_aux.
929 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
930 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
931 initialization of STMT_VINFO_DATA_REF.
932 * tree-vectorizer.c (vec_info::move_dr): New function.
933 * tree-vect-patterns.c (vect_recog_bool_pattern)
934 (vect_recog_mask_conversion_pattern)
935 (vect_recog_gather_scatter_pattern): Use it.
936 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
937 the "dr" and "stmt" fields of dr_vec_info instead of
940 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
942 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
943 (is_pattern_stmt_p): Use it.
944 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
945 on pattern statements.
947 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
949 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
950 original stmt as a stmt_vec_info rather than a gimple stmt.
951 (vect_pattern_recog_1): Take the statement directly as a
952 stmt_vec_info, rather than via a gimple_stmt_iterator.
953 Update call to vect_mark_pattern_stmts.
954 (vect_pattern_recog): Update calls accordingly.
956 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
958 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
959 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
960 a vect_def_type for the first argument.
961 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
962 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
963 operand if it isn't defined by a vectorized statement.
964 (vect_build_gather_load_calls): Remove the mask_dt argument and
965 update calls to vect_get_vec_def_for_stmt_copy.
966 (vectorizable_bswap): Likewise the dt argument.
967 (vectorizable_call): Update calls to vectorizable_bswap and
968 vect_get_vec_def_for_stmt_copy.
969 (vectorizable_simd_clone_call, vectorizable_assignment)
970 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
971 (vectorizable_comparison): Update calls to
972 vect_get_vec_def_for_stmt_copy.
973 (vectorizable_store): Likewise. Remove now-unnecessary calls to
975 (vect_get_loop_based_defs): Remove dt argument and update call
976 to vect_get_vec_def_for_stmt_copy.
977 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
978 and vect_get_vec_def_for_stmt_copy.
979 (vectorizable_load): Update calls to vect_build_gather_load_calls
980 and vect_get_vec_def_for_stmt_copy.
981 * tree-vect-loop.c (vect_create_epilog_for_reduction)
982 (vectorizable_reduction, vectorizable_live_operation): Update calls
983 to vect_get_vec_def_for_stmt_copy.
985 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
987 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
988 and gimple stmt arguments with a stmt_vec_info.
989 (vect_record_base_alignments): Update calls accordingly.
990 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
991 and gimple stmt arguments with a stmt_vec_info.
992 (vect_build_slp_tree_1): Remove vinfo argument and update call
993 to vect_record_max_nunits.
994 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
995 and vect_record_max_nunits.
997 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
999 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1000 file and take a stmt_vec_info instead of a gimple stmt.
1001 (supportable_widening_operation, vect_finish_replace_stmt)
1002 (vect_finish_stmt_generation, vect_get_store_rhs)
1003 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1004 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1005 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1006 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1007 (vect_create_data_ref_ptr, bump_vector_ptr)
1008 (vect_permute_store_chain, vect_setup_realignment)
1009 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1010 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1011 (vectorizable_reduction, vectorizable_induction)
1012 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1013 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1014 than gimple stmts as arguments.
1015 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1016 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1017 (can_group_stmts_p, vect_check_gather_scatter)
1018 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1019 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1020 (vect_permute_load_chain, vect_shift_permute_load_chain)
1021 (vect_transform_grouped_load)
1022 (vect_record_grouped_load_vectors): Likewise.
1023 * tree-vect-loop.c (vect_fixup_reduc_chain)
1024 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1025 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1026 (vectorizable_reduction, vectorizable_induction)
1027 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1028 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1029 (vect_get_load_store_mask): Likewise.
1030 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1031 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1032 * tree-vect-stmts.c (vect_mark_relevant)
1033 (is_simple_and_all_uses_invariant)
1034 (exist_non_indexing_operands_for_use_p, process_use)
1035 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1036 (vect_get_vec_def_for_operand, vect_get_vec_defs)
1037 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1038 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1039 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1040 (get_negative_load_store_type, get_load_store_type)
1041 (vect_check_load_store_mask, vect_check_store_rhs)
1042 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1043 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1044 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1045 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1046 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1047 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1048 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1049 (supportable_widening_operation): Likewise.
1051 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1053 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1054 a stmt_vec_info instead of a gcall.
1055 (vect_check_gather_scatter): Update call accordingly.
1056 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1058 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1059 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1060 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1061 instead of a gimple stmt.
1062 (vect_transform_loop): Update calls accordingly.
1063 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1064 stmt_vec_infos instead of gimple stmts.
1065 (vect_analyze_slp_instance): Update use accordingly.
1066 * tree-vect-stmts.c (read_vector_array, write_vector_array)
1067 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1068 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1069 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1070 (vect_gen_widened_results_half, vect_get_loop_based_defs)
1071 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1072 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1073 down to subroutines.
1075 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1077 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1078 of the worklist from a vector of gimple stmts to a vector of
1080 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1081 (vect_mark_stmts_to_be_vectorized): Likewise
1083 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1085 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1086 statement before passing it to vect_analyze_stmt.
1087 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1088 the chain of phi vector definitions. Track the exit phi via its
1090 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1091 STMT_VINFO_REDUC_DEF.
1092 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1093 stmt_vec_infos to handle the statement chains.
1094 (vect_get_slp_defs): Record the first statement in the node
1095 using a stmt_vec_info.
1096 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1097 statements here and pass their stmt_vec_info down to subroutines.
1098 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1099 down to vect_finish_stmt_generation.
1100 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1101 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1102 stmt_vec_infos to subroutines.
1103 (vect_remove_stores): Use stmt_vec_infos to handle the statement
1106 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1108 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1109 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1110 (vect_permute_store_chain, vect_setup_realignment)
1111 (vect_permute_load_chain, vect_shift_permute_load_chain)
1112 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1113 stmts internally, and when passing values to other vectorizer routines.
1114 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1115 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1116 (vect_analyze_loop_operations, get_initial_def_for_reduction)
1117 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1118 (vectorizable_reduction, vectorizable_induction)
1119 (vectorizable_live_operation, vect_transform_loop_stmt)
1120 (vect_transform_loop): Likewise.
1121 * tree-vect-patterns.c (vect_reassociating_reduction_p)
1122 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1123 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1124 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1125 (vect_slp_analyze_node_operations_1): Likewise.
1126 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1127 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1128 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1129 (vect_finish_stmt_generation_1, get_group_load_store_type)
1130 (get_load_store_type, vect_build_gather_load_calls)
1131 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1132 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1133 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1134 (vectorizable_store, vectorizable_load, vectorizable_condition)
1135 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1136 (supportable_widening_operation): Likewise.
1137 (vect_get_vector_types_for_stmt): Likewise.
1138 * tree-vectorizer.h (vect_dr_behavior): Likewise.
1140 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1142 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1143 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1144 (vect_permute_store_chain, vect_permute_load_chain)
1145 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1146 repeated stmt_vec_info lookups.
1147 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1148 (vect_update_ivs_after_vectorizer): Likewise.
1149 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1150 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1151 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1152 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1153 (vect_bb_slp_scalar_cost): Likewise.
1154 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1156 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1158 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1159 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1160 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1161 to get gassigns and gcalls, rather than operating on generc gimple
1163 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1164 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1165 (vectorizable_load, vect_analyze_stmt): Likewise.
1166 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1168 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1170 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1171 return stmt_vec_infos rather than gimple stmts. Do not accept
1173 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1175 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1176 Update use of get_later_stmt.
1177 (vect_get_constant_vectors): Update call accordingly.
1178 (vect_schedule_slp_instance): Likewise
1179 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1180 (vect_slp_analyze_instance_dependence): Likewise.
1181 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1183 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1185 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1186 (stmt_info_for_cost::stmt_info): ...this new field.
1187 (add_stmt_costs): Update accordingly.
1188 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1189 (vect_get_known_peeling_cost): Likewise.
1190 (vect_estimate_min_profitable_iters): Likewise.
1191 * tree-vect-stmts.c (record_stmt_cost): Likewise.
1193 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1195 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1196 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1197 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1199 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1201 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1203 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1204 a gimple stmt to a stmt_vec_info.
1205 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1207 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1209 * tree-vectorizer.h (vec_info::grouped_stores): Change from
1210 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1211 (_loop_vec_info::reduction_chains): Likewise.
1212 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1214 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1216 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1218 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1219 a gimple stmt to a stmt_vec_info.
1220 (_stmt_vec_info::next_element): Likewise.
1221 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1222 (vect_slp_analyze_and_verify_node_alignment)
1223 (vect_analyze_group_access_1, vect_analyze_group_access)
1224 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1225 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1226 (vect_supportable_dr_alignment): Update accordingly.
1227 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1228 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1229 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1230 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1231 * tree-vect-slp.c (vect_build_slp_tree_1)
1232 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1233 (vect_split_slp_store_group, vect_analyze_slp_instance)
1234 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1235 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1236 (get_group_load_store_type, get_load_store_type)
1237 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1238 (vect_transform_stmt, vect_remove_stores): Likewise.
1240 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1242 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1244 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1245 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1246 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1247 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1248 (vector_alignment_reachable_p, vect_get_data_access_cost)
1249 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1250 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1251 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1252 (vect_analyze_group_access_1, vect_analyze_group_access)
1253 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1254 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1255 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1256 result of vect_dr_stmt and use the stmt_vec_info instead of
1257 the associated gimple stmt.
1258 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1259 (vect_gen_prolog_loop_niters): Likewise.
1260 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1262 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1264 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1265 to a vec<stmt_vec_info>.
1266 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1267 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1269 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1270 to a vec<stmt_vec_info>.
1271 (bst_traits::value_type, bst_traits::value_type): Likewise.
1272 (bst_traits::hash): Update accordingly.
1273 (vect_get_and_check_slp_defs): Change the stmts parameter from
1274 a vec<gimple *> to a vec<stmt_vec_info>.
1275 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1276 (vect_build_slp_tree): Likewise.
1277 (vect_build_slp_tree_2): Likewise. Update uses of
1278 SLP_TREE_SCALAR_STMTS.
1279 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1280 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1281 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1282 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1283 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1284 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1285 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1286 (vect_get_constant_vectors, vect_get_slp_defs)
1287 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1288 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1289 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1290 instead of gimple stmts.
1291 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1292 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1293 (vect_slp_analyze_instance_dependence): Update uses of
1294 SLP_TREE_SCALAR_STMTS.
1295 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1296 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1297 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1298 (get_initial_defs_for_reduction): Likewise.
1299 (vect_create_epilog_for_reduction): Likewise.
1300 (vectorize_fold_left_reduction): Likewise.
1301 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1302 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1303 (can_vectorize_live_stmts): Likewise.
1305 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1307 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1308 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1309 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1311 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1313 (gather_scalar_reductions): Update after above interface changes.
1314 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1315 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1317 (vect_force_simple_reduction): Likewise.
1318 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1319 LOOP_VINFO_REDUCTIONS.
1320 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1322 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1324 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1325 a gimple stmt to a stmt_vec_info.
1326 * tree-vect-loop.c (vect_active_double_reduction_p)
1327 (vect_force_simple_reduction, vectorizable_reduction): Update
1330 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1332 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1333 vec<gimple *> to a vec<stmt_vec_info>.
1334 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1335 the reduction_phis argument from a vec<gimple *> to a
1337 (vectorizable_reduction): Likewise the phis local variable that
1338 is passed to vect_create_epilog_for_reduction. Update for new type
1339 of SLP_TREE_VEC_STMTS.
1340 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1341 (vectorizable_live_operation): Likewise.
1342 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1343 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1345 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1347 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1348 a gimple stmt to a stmt_vec_info.
1349 (vectorizable_condition, vectorizable_live_operation)
1350 (vectorizable_reduction, vectorizable_induction): Pass back the
1351 vectorized statement as a stmt_vec_info.
1352 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1353 use of STMT_VINFO_VEC_STMT.
1354 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1355 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1356 as stmt_vec_infos rather than gimple stmts.
1357 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1359 (vectorizable_live_operation): Likewise.
1360 (vectorizable_reduction, vectorizable_induction): Likewise,
1361 updating use of STMT_VINFO_VEC_STMT.
1362 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1363 of STMT_VINFO_VEC_STMT.
1364 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1365 (vectorizable_simd_clone_call, vectorizable_conversion)
1366 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1367 (vectorizable_store, vectorizable_load, vectorizable_condition)
1368 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1369 from a gimple stmt to a stmt_vec_info.
1370 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
1371 pointer to a stmt_vec_info to the vectorizable_* routines.
1373 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1375 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1376 a gimple stmt to a stmt_vec_info.
1377 (is_pattern_stmt_p): Update accordingly.
1378 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1379 (vect_record_grouped_load_vectors): Likewise.
1380 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1381 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1382 (vect_model_reduction_cost): Likewise.
1383 (vect_create_epilog_for_reduction): Likewise.
1384 (vectorizable_reduction, vectorizable_induction): Likewise.
1385 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1386 Return the stmt_vec_info for the pattern statement.
1387 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1388 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1389 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1390 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1391 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1392 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1393 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1394 (free_stmt_vec_info, vect_is_simple_use): Likewise.
1396 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1398 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1399 (vect_finish_stmt_generation): Likewise.
1400 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1401 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1402 (vect_build_gather_load_calls): Use the return value of the above
1403 functions instead of a separate call to vinfo_for_stmt. Use narrow
1404 scopes for the input gimple stmt and wider scopes for the associated
1405 stmt_vec_info. Use vec_info::lookup_def when setting these
1406 stmt_vec_infos from an SSA_NAME definition.
1407 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1408 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1409 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1410 (vectorizable_store, vectorizable_load, vectorizable_condition)
1411 (vectorizable_comparison): Likewise.
1412 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1413 (vectorizable_reduction): Likewise.
1415 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1417 * tree-vectorizer.h (vect_is_simple_use): Add an optional
1418 stmt_vec_info * parameter before the optional gimple **.
1419 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1420 (process_use, vect_get_vec_def_for_operand_1): Update callers.
1421 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1422 * tree-vect-loop.c (vectorizable_reduction): Likewise.
1423 (vectorizable_live_operation): Likewise.
1424 * tree-vect-patterns.c (type_conversion_p): Likewise.
1425 (vect_look_through_possible_promotion): Likewise.
1426 (vect_recog_rotate_pattern): Likewise.
1427 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1429 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1431 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1432 a typedef to a wrapper class.
1433 (NULL_STMT_VEC_INFO): New macro.
1434 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1435 (stmt_vec_info::operator*): New function.
1436 (stmt_vec_info::operator gimple *): Likewise.
1437 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1438 (add_stmt_costs): Likewise.
1439 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1440 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1441 (vect_get_known_peeling_cost): Likewise.
1442 (vect_estimate_min_profitable_iters): Likewise.
1443 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1444 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1445 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1446 (vectorizable_store, free_stmt_vec_infos): Likewise.
1447 (new_stmt_vec_info): Change return type of xcalloc to
1450 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1452 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1453 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1454 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1455 a single_imm_use-based sequence.
1456 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1458 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1460 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1461 * tree-vectorizer.c (vec_info::lookup_def): New function.
1462 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1463 (vect_widened_op_tree): Likewise.
1464 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1465 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1466 (vectorizable_reduction): Likewise.
1467 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1469 (vect_is_slp_reduction): Update calls accordingly. Use
1470 vec_info::lookup_def.
1471 (vect_is_simple_reduction): Likewise
1472 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1474 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1476 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1477 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1478 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1480 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1481 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1482 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1483 (vect_is_slp_reduction, vectorizable_induction)
1484 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1485 * tree-vect-patterns.c (vect_init_pattern_stmt):
1486 (vect_determine_min_output_precision_1, vect_determine_precisions)
1487 (vect_pattern_recog): Likewise.
1488 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1489 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1490 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1491 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1492 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1493 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1494 info field from a loop to a loop_vec_info.
1496 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1498 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1499 (vec_info::add_stmt): Declare.
1500 * tree-vectorizer.c (vec_info::add_stmt): New function.
1501 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1502 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1503 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1504 (vectorizable_induction): Likewise.
1505 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1506 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1507 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1508 (vectorizable_load): Likewise.
1509 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1510 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1511 (vect_recog_gather_scatter_pattern): Likewise.
1512 (append_pattern_def_seq): Likewise. Remove a check that is
1513 performed by add_stmt itself.
1515 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1517 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1518 which make_ssa_name was called with new_stmt before new_stmt
1521 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1523 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1525 (vect_is_slp_reduction): ...here...
1526 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1527 that are already known to be false.
1529 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1531 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1532 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1533 STMT_VINFO_NUM_SLP_USES when it's true.
1534 (vect_free_slp_instance): Add a final_p parameter and pass it to
1536 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1537 (vect_analyze_slp_instance): Likewise.
1538 (vect_slp_analyze_operations): Likewise.
1539 (vect_slp_analyze_bb_1): Likewise.
1540 * tree-vectorizer.c (vec_info): Likewise.
1541 * tree-vect-loop.c (vect_transform_loop): Likewise.
1543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1545 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1546 function is not called for second and subsequent members of
1549 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1551 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1552 cases for nested loops from here to ...
1553 (vect_create_epilog_for_reduction): ...here. Only call
1554 vect_is_simple_use for inner-loop reductions.
1556 2018-07-31 Martin Liska <mliska@suse.cz>
1558 PR gcov-profile/85338
1559 PR gcov-profile/85350
1560 PR gcov-profile/85372
1561 * profile.c (struct location_triplet): New.
1562 (struct location_triplet_hash): Likewise.
1563 (output_location): Do not output a BB that
1564 is already recorded for a line.
1565 (branch_prob): Use streamed_locations.
1567 2018-07-31 Martin Liska <mliska@suse.cz>
1569 PR gcov-profile/85370
1570 * coverage.c (coverage_begin_function): Do not mark target
1571 clones as artificial functions.
1573 2018-07-31 Martin Liska <mliska@suse.cz>
1575 PR gcov-profile/83813
1576 PR gcov-profile/84758
1577 PR gcov-profile/85217
1578 PR gcov-profile/85332
1579 * profile.c (branch_prob): Do not record GOTO expressions
1580 for GIMPLE statements which locations are already streamed.
1582 2018-07-31 Olivier Hainque <hainque@adacore.com>
1584 * gcc.c (handle_spec_function): Accept a soft_matched_part
1585 argument, as do_spec_1. Pass it down to ...
1586 (eval_spec_function): Accept a soft_matched_part argument,
1587 and pass it down to ...
1588 (do_spec_2): Accept a soft_matched_part argument, and pass
1589 it down to do_spec_1.
1590 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1591 (handle_braces): Update call to handle_spec_function.
1592 (driver::set_up_specs): Update calls to do_spec_2.
1593 (compare_debug_dump_opt_spec_function): Likewise.
1594 (compare_debug_self_opt_spec_function): Likewise.
1596 2018-07-31 Olivier Hainque <hainque@adacore.com>
1598 * common.opt (nolibc): New option.
1599 * doc/invoke.texi (Link Options): Document it.
1600 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1601 * config/alpha/linux.h: Likewise.
1602 * config/arc/elf.h: Likewise.
1603 * config/arm/uclinux-elf.h: Likewise.
1604 * config/arm/unknown-elf.h: Likewise.
1605 * config/avr/avrlibc.h: Likewise.
1606 * config/bfin/bfin.h: Likewise.
1607 * config/bfin/linux.h: Likewise.
1608 * config/bfin/uclinux.h: Likewise.
1609 * config/darwin.h: Likewise.
1610 * config/darwin10.h: Likewise.
1611 * config/darwin12.h: Likewise.
1612 * config/gnu-user.h: Likewise.
1613 * config/lm32/uclinux-elf.h: Likewise.
1614 * config/pa/pa-hpux11.h: Likewise.
1615 * config/pa/pa64-hpux.h: Likewise.
1616 * config/sparc/sparc.h: Likewise.
1618 2018-07-31 Olivier Hainque <hainque@adacore.com>
1620 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1621 undefined variables.
1623 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1626 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1629 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1631 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1632 terminated string literal.
1634 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1636 PR rtl-optimization/85160
1637 * combine.c (is_just_move): New function.
1638 (try_combine): Allow combining two instructions into two if neither of
1639 the original instructions was a move.
1641 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1644 * doc/extend.texi (Global Register Variables): Discourage use of type
1646 (Local Register Variables): Likewise.
1648 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1650 PR tree-optimization/86506
1651 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1653 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1656 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1657 hard_regno, make sure no insn between `from` and `to` clobbers it.
1659 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1660 Tom de Vries <tdevries@suse.de>
1662 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1663 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1664 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1665 PTX_DEFAULT_RUNTIME_DIM.
1666 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1668 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1670 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1671 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1672 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1674 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1676 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1678 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1679 predicate to reflect toc fusion has been deleted.
1680 (toc_fusion_mem_raw): Delete, no longer used.
1681 (toc_fusion_mem_wrapped): Likewise.
1682 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1684 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1685 Delete, no longer used.
1686 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1687 meant to be used for toc fusion.
1688 (rs6000_debug_print_mode): Delete toc fusion debugging.
1689 (rs6000_debug_reg_global): Likewise.
1690 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1691 fusion and secondary reload support that were never used.
1692 (rs6000_option_override_internal): Delete TOC fusion, that was only
1693 partially defined, and it did not work unless you also used the
1695 (rs6000_legitimate_address_p): Delete TOC fusion support.
1696 (rs6000_opt_masks): Likewise.
1697 (fusion_wrap_memory_address): Delete function, no longer used.
1698 (fusion_split_address); Delete TOC fusion support.
1699 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1700 longer used with toc fusion being deleted.
1701 (TARGET_TOC_FUSION_FP): Likewise.
1702 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1704 (toc fusion spliter): Delete TOC fusion support.
1705 (toc_fusionload_<mode>): Likewise.
1706 (toc_fusionload_di): Likewise.
1707 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1708 longer needs to be named. Rename predicate to delete TOC fusion.
1709 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1710 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1711 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1712 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1713 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1715 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1717 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1718 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1719 __int128 in built-in function prototypes.
1720 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1721 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1723 2018-07-27 Martin Sebor <msebor@redhat.com>
1725 PR tree-optimization/86696
1726 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1727 types, including enums.
1728 (handle_char_store): Be prepared for the above function to fail.
1730 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1732 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1733 when optimization level is lower than 2 or optimize for size.
1735 2018-07-26 Martin Sebor <msebor@redhat.com>
1737 PR tree-optimization/86043
1738 PR tree-optimization/86042
1739 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1740 (get_string_cst_length): Rename...
1741 (get_min_string_length): ...to this. Add argument.
1742 (handle_char_store): Extend to handle multi-character stores by
1744 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1745 * tree.h (initializer_zerop): Add argument.
1747 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1750 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1751 declare target to variables if they have always,{to,from,tofrom} map
1754 2018-07-26 Martin Liska <mliska@suse.cz>
1757 * lto-wrapper.c: Add linker_output as prefix
1758 for ltrans_output_file.
1760 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1762 PR rtl-optimization/85805
1763 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1764 value for hard registers if that was written in the same mode.
1766 2018-07-26 Martin Liska <mliska@suse.cz>
1768 PR gcov-profile/86536
1769 * gcov.c (format_gcov): Use printf format %.*f directly
1770 and do not handle special values.
1772 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1774 * common/config/arc/arc-common.c (arc_option_optimization_table):
1775 Update default optimizations for size.
1777 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1779 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1780 * config/arc/constraints.md (CfZ): New constraint.
1781 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1782 (subsf3_fpu): Likewise.
1783 (cmpsf_fpu): Likewise.
1784 (cmpsf_fpu_uneq): Likewise.
1786 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1788 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1790 (arc_is_uncached_mem_p): uncached applies to both the variable and
1793 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1795 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1798 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1800 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1801 field "m_scopes" from vec to auto_vec.
1803 2018-07-25 Martin Liska <mliska@suse.cz>
1805 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1808 2018-07-25 Richard Biener <rguenther@suse.de>
1811 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1812 special wrt context_die late.
1813 (gen_subprogram_die): Re-use DIEs in local scope.
1815 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1817 PR tree-optimization/86644
1818 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1820 2018-07-25 Martin Liska <mliska@suse.cz>
1823 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1824 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1826 2018-07-25 Martin Liska <mliska@suse.cz>
1829 * params.def: Explain ASan abbreviation and provide
1830 a documentation link.
1832 2018-07-24 Martin Sebor <msebor@redhat.com>
1834 PR tree-optimization/86622
1835 PR tree-optimization/86532
1836 * builtins.h (string_length): Declare.
1837 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1838 (check_access): Be prepared for non-constant length ranges.
1839 (string_length): Make extern.
1840 * expr.c (string_constant): Only handle the minor non-constant
1841 array index. Use string_constant to compute the length of
1842 a generic string constant.
1844 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1846 PR tree-optimization/86618
1847 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1848 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1850 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1852 PR tree-optimization/86636
1853 * json.cc (json::object::set): Fix comment. Add assertions.
1854 (json::array::append): Move here from json.h. Add comment and an
1856 (json::string::string): Likewise.
1857 * json.h (json::array::append): Move to json.cc.
1858 (json::string::string): Likewise.
1859 * optinfo-emit-json.cc
1860 (optrecord_json_writer::impl_location_to_json): Assert that we
1861 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1862 wrapper around it. Expand the location once, rather than three
1864 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1865 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1867 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1868 places. Fix some overlong lines.
1870 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1872 * config/aarch64/aarch64-simd.md
1873 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1874 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1875 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1876 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1877 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1878 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1879 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1880 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1881 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1883 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1886 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1887 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1888 and abs_d == d, do the power of two handling if profitable.
1890 2018-07-24 Richard Biener <rguenther@suse.de>
1892 * match.pd: Add BIT_FIELD_REF canonicalizations.
1894 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1897 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1899 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1901 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1902 terminated STRING_CST object.
1904 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1906 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1908 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1910 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1911 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1912 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1913 the elements into a register.
1914 (rs6000_split_v4si_init_di_reg): Delete.
1915 (rs6000_split_v4si_init): Delete.
1916 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1917 (vsx_init_v4si): Rewrite as a define_expand.
1919 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1921 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1922 zero_extend argument from memory): New.
1924 2018-07-22 Martin Sebor <msebor@redhat.com>
1927 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1928 diagnosing calls with unknown arguments unless -Walloca-larger-than
1929 is restricted to less than PTRDIFF_MAX bytes.
1931 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1933 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1935 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1937 * pretty-print.c (text_info::set_location): Remove redundant
1938 "line_table" parameter from call to rich_location::set_range.
1940 2018-07-20 Martin Sebor <msebor@redhat.com>
1943 * builtins.c (expand_builtin_alloca): Adjust.
1944 * calls.c (alloc_max_size): Simplify.
1945 * cgraphunit.c (cgraph_node::expand): Adjust.
1946 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1948 (frame_larger_than_size): Same.
1949 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1950 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1952 * doc/invoke.texi (GCC Command Options): Document option arguments.
1953 Explain byte-size arguments and suffixes.
1954 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1955 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1956 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1957 * doc/options.texi (UInteger): Expand.
1958 (Host_Wide_Int, ByteSize): Document new properties.
1959 * final.c (final_start_function_1): Include sizes in an error message.
1960 * function.c (frame_offset_overflow): Same.
1961 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1962 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1963 Diagnose unbounded alloca calls only for limits of less than
1965 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1966 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1968 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1969 only for limits of less than PTRDIFF_MAX.
1970 * langhooks-def.h (lhd_handle_option): Change function argument
1972 * langhooks.c (lhd_handle_option): Same.
1973 * langhooks.h (handle_option): Same.
1974 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1976 (var_type, var_type_struct): Same.
1977 (var_set): Handle ByteSize flag.
1978 * optc-gen.awk: Add comments to output to ease debugging. Make
1979 use of HOST_WIDE_INT where appropriate.
1980 * opts-gen-save.awk: Use %lx to format unsigned long.
1981 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1982 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1983 arguments. Parse bytes-size suffixes.
1984 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1985 (enum_value_to_arg): Same.
1986 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1987 (handle_option): Adjust.
1988 (generate_option): Change function argument to HOST_WIDE_INT.
1989 (cmdline_handle_error): Adjust.
1990 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1991 (set_option): Change function argument to HOST_WIDE_INT.
1992 (option_enabled): Handle cl_host_wide_int.
1993 (get_option_state): Handle CLVC_SIZE.
1994 (control_warning_option): Same.
1995 * opts.c (common_handle_option): Change function argument to
1996 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1997 OPT_Wvla_larger_than_.
1998 * opts.h (enum cl_var_type): Add an enumerator.
1999 * stor-layout.c (layout_decl): Print a more meaningful warning.
2000 * toplev.c (output_stack_usage): Adjust.
2002 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
2004 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2005 call to inline_expand_builtin_string_cmp.
2006 (expand_builtin_strcmp): Likewise.
2007 (expand_builtin_strncmp): Likewise.
2008 (inline_string_cmp): Delete the last parameter, change char_type_node
2009 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2011 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2012 the inlining expansion on target where the type of the call has same or
2013 narrower precision than unsigned char.
2015 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2017 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2018 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2019 * common.opt (fsave-optimization-record): New option.
2020 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2021 * doc/invoke.texi (-fsave-optimization-record): New option.
2022 * dumpfile.c: Include "optinfo-emit-json.h".
2023 (struct kv_pair): Move to coretypes.h.
2024 (optgroup_options): Make non-static.
2025 (dump_context::end_scope): Call
2026 optimization_records_maybe_pop_dump_scope.
2027 * dumpfile.h (optgroup_options): New decl.
2028 * json.cc: New file.
2030 * optinfo-emit-json.cc: New file.
2031 * optinfo-emit-json.h: New file.
2032 * optinfo.cc: Include "optinfo-emit-json.h".
2033 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2034 (optinfo_enabled_p): Check optimization_records_enabled_p.
2035 (optinfo_wants_inlining_info_p): Likewise.
2036 * optinfo.h: Update comment.
2037 * profile-count.c (profile_quality_as_string): New function.
2038 * profile-count.h (profile_quality_as_string): New decl.
2039 (profile_count::quality): New accessor.
2040 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2041 and optinfo_emit_json_cc_tests.
2042 * selftest.h (selftest::json_cc_tests): New decl.
2043 (selftest::optinfo_emit_json_cc_tests): New decl.
2044 * toplev.c: Include "optinfo-emit-json.h".
2045 (compile_file): Call optimization_records_finish.
2046 (do_compile): Call optimization_records_start.
2047 * tree-ssa-live.c: Include optinfo.h.
2048 (remove_unused_scope_block_p): Retain inlining information if
2049 optinfo_wants_inlining_info_p returns true.
2051 2018-07-20 Richard Biener <rguenther@suse.de>
2054 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2055 to cover -flto-partition=none.
2057 2018-07-20 Martin Liska <mliska@suse.cz>
2059 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2060 (get_decl_source_range): Remove unused function.
2062 2018-07-20 Richard Biener <rguenther@suse.de>
2064 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2065 (struct vn_phi_s): Likewise.
2066 (struct vn_reference_s): Likewise.
2067 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2068 for searching the slot of an entry known to be in the hash itself.
2069 (vn_phi_hasher::equal): Likewise.
2070 (vn_reference_hasher::equal): Likewise.
2071 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2073 (optimistic_info, current_info): Remove, keeping only valid_info.
2074 (vn_reference_lookup_1): Remove fallback lookup.
2075 (vn_reference_lookup_2): Likewise.
2076 (vn_nary_op_lookup_1): Likewise.
2077 (vn_phi_lookup): Likewise.
2078 (vn_nary_build_or_lookup_1): Make sure to not chain the built
2080 (vn_reference_insert): Adjust, chain the inserted hash element
2081 at last_inserted_ref.
2082 (vn_reference_insert_pieces): Likewise.
2083 (visit_reference_op_call): Likewise.
2084 (vn_nary_op_insert_into): Chain the inserted hash element at
2086 (vn_nary_op_insert_pieces): Adjust.
2087 (vn_nary_op_insert): Likewise.
2088 (vn_nary_op_insert_stmt): Likewise.
2089 (vn_phi_insert): Adjust, chain the inserted hash element at
2091 (process_scc): Remove clearing and copying the optimistic
2092 table. Instead remove elements inserted during an optimistic
2093 iteration from the single table we maintain.
2094 (init_scc_vn): Adjust.
2095 (free_scc_vn): Likewise.
2096 (sccvn_dom_walker::record_cond): Likewise.
2097 (sccvn_dom_walker::after_dom_children): Likewise.
2099 2018-07-19 Martin Sebor <msebor@redhat.com>
2101 PR tree-optimization/84047
2102 PR tree-optimization/83776
2103 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2104 (check_array_bounds): Call it.
2106 2018-07-19 Martin Sebor <msebor@redhat.com>
2108 * align.h (align_flags): Use member initialization.
2110 2018-07-19 David Malcolm <dmalcolm@redhat.com>
2112 * Makefile.in (OBJS): Add optinfo.o.
2113 * coretypes.h (class symtab_node): New forward decl.
2114 (struct cgraph_node): New forward decl.
2115 (class varpool_node): New forward decl.
2116 * dump-context.h: New file.
2117 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2119 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2120 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2121 (set_alt_dump_file): Likewise.
2122 (dump_context::~dump_context): New dtor.
2123 (dump_gimple_stmt): Move implementation to...
2124 (dump_context::dump_gimple_stmt): ...this new member function.
2125 Add the stmt to any pending optinfo, creating one if need be.
2126 (dump_gimple_stmt_loc): Move implementation to...
2127 (dump_context::dump_gimple_stmt_loc): ...this new member function.
2128 Start a new optinfo and add the stmt to it.
2129 (dump_gimple_expr): Move implementation to...
2130 (dump_context::dump_gimple_expr): ...this new member function.
2131 Add the stmt to any pending optinfo, creating one if need be.
2132 (dump_gimple_expr_loc): Move implementation to...
2133 (dump_context::dump_gimple_expr_loc): ...this new member function.
2134 Start a new optinfo and add the stmt to it.
2135 (dump_generic_expr): Move implementation to...
2136 (dump_context::dump_generic_expr): ...this new member function.
2137 Add the tree to any pending optinfo, creating one if need be.
2138 (dump_generic_expr_loc): Move implementation to...
2139 (dump_context::dump_generic_expr_loc): ...this new member
2140 function. Add the tree to any pending optinfo, creating one if
2142 (dump_printf): Move implementation to...
2143 (dump_context::dump_printf_va): ...this new member function. Add
2144 the text to any pending optinfo, creating one if need be.
2145 (dump_printf_loc): Move implementation to...
2146 (dump_context::dump_printf_loc_va): ...this new member function.
2147 Start a new optinfo and add the stmt to it.
2148 (dump_dec): Move implementation to...
2149 (dump_context::dump_dec): ...this new member function. Add the
2150 value to any pending optinfo, creating one if need be.
2151 (dump_context::dump_symtab_node): New member function.
2152 (dump_context::get_scope_depth): New member function.
2153 (dump_context::begin_scope): New member function.
2154 (dump_context::end_scope): New member function.
2155 (dump_context::ensure_pending_optinfo): New member function.
2156 (dump_context::begin_next_optinfo): New member function.
2157 (dump_context::end_any_optinfo): New member function.
2158 (dump_context::s_current): New global.
2159 (dump_context::s_default): New global.
2160 (dump_scope_depth): Delete global.
2161 (dumpfile_ensure_any_optinfo_are_flushed): New function.
2162 (dump_symtab_node): New function.
2163 (get_dump_scope_depth): Reimplement in terms of dump_context.
2164 (dump_begin_scope): Likewise.
2165 (dump_end_scope): Likewise.
2166 (selftest::temp_dump_context::temp_dump_context): New ctor.
2167 (selftest::temp_dump_context::~temp_dump_context): New dtor.
2168 (selftest::verify_item): New function.
2169 (ASSERT_IS_TEXT): New macro.
2170 (ASSERT_IS_TREE): New macro.
2171 (ASSERT_IS_GIMPLE): New macro.
2172 (selftest::test_capture_of_dump_calls): New test.
2173 (selftest::dumpfile_c_tests): Call it.
2174 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2175 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2176 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2177 descriptive comment.
2178 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2179 (dump_node, dump_bb): Move these unrelated decls.
2180 (class dump_manager): Add leading comment.
2181 * optinfo.cc: New file.
2182 * optinfo.h: New file.
2184 2018-07-19 Michael Collison <michael.collison@arm.com>
2185 Richard Henderson <rth@redhat.com>
2187 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2188 (subti): Handle op1 zero.
2189 (subvti4, usub4ti4): New.
2190 (*sub<GPI>3_compare1_imm): New.
2191 (sub<GPI>3_carryinCV): New.
2192 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2193 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2195 2018-07-19 Michael Collison <michael.collison@arm.com>
2196 Richard Henderson <rth@redhat.com>
2198 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2199 (addti3): Create simpler code if low part is already known to be 0.
2200 (addvti4, uaddvti4): New.
2201 (*add<GPI>3_compareC_cconly_imm): New.
2202 (*add<GPI>3_compareC_cconly): New.
2203 (*add<GPI>3_compareC_imm): New.
2204 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2205 handle constants within this pattern..
2206 (*add<GPI>3_compareV_cconly_imm): New.
2207 (*add<GPI>3_compareV_cconly): New.
2208 (*add<GPI>3_compareV_imm): New.
2209 (add<GPI>3_compareV): New.
2210 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2211 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2212 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2213 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2214 with 'comparison' operator.
2215 (*add<GPI>3_compareV_cconly_imm): Ditto.
2216 (*add<GPI>3_compareV_cconly): Ditto.
2217 (*add<GPI>3_compareV_imm): Ditto.
2218 (add<GPI>3_compareV): Ditto.
2219 (add<mode>3_carryinC): Ditto.
2220 (*add<mode>3_carryinC_zero): Ditto.
2221 (*add<mode>3_carryinC): Ditto.
2222 (add<mode>3_carryinV): Ditto.
2223 (*add<mode>3_carryinV_zero): Ditto.
2224 (*add<mode>3_carryinV): Ditto.
2226 2018-07-19 Michael Collison <michael.collison@arm.com>
2227 Richard Henderson <rth@redhat.com>
2229 * config/aarch64/aarch64-modes.def (CC_V): New.
2230 * config/aarch64/aarch64-protos.h
2231 (aarch64_addti_scratch_regs): Declare
2232 (aarch64_subvti_scratch_regs): Declare.
2233 (aarch64_expand_subvti): Declare.
2234 (aarch64_gen_unlikely_cbranch): Declare
2235 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2236 for signed overflow using CC_Vmode.
2237 (aarch64_get_condition_code_1): Handle CC_Vmode.
2238 (aarch64_gen_unlikely_cbranch): New function.
2239 (aarch64_addti_scratch_regs): New function.
2240 (aarch64_subvti_scratch_regs): New function.
2241 (aarch64_expand_subvti): New function.
2243 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2245 * config/aarch64/aarch64-option-extensions.def: New entry for profile
2247 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2248 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2251 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2254 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2255 address check not strict.
2257 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2259 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2261 (store_pair_lanes<mode>): Likewise.
2262 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2263 enum value 'ADDR_QUERY_LDP_STP_N'.
2264 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2265 (aarch64_print_address_internal): Add declaration.
2266 (aarch64_print_ldpstp_address): Remove.
2267 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2268 (aarch64_print_operand): Change printing of 'y'.
2269 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2270 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2271 'true' rather than '1'.
2272 * config/aarch64/constraints.md (Uml): Likewise.
2273 (Uml): Rename to Umn.
2276 2018-07-19 Richard Biener <rguenther@suse.de>
2278 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2280 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2281 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2282 (vn_reference_hasher): Likewise.
2283 (struct vn_tables_s): Remove obstack and alloc-pool members.
2284 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2285 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2286 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2287 (vn_reference_insert_pieces): Likewise.
2288 (alloc_vn_nary_op_noinit): Adjust.
2289 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2290 (vn_phi_eq): Adjust.
2291 (shared_lookup_phiargs): Remove.
2292 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2293 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2294 (visit_reference_op_call): Likewise.
2295 (copy_nary, copy_phi, copy_reference): Remove.
2296 (process_scc): Rewind the obstack when iterating. Do not
2297 copy the elements to valid_info but just move them from one
2298 hashtable to the other.
2299 (allocate_vn_table): Adjust.
2300 (free_vn_table): Likewise.
2301 (init_scc_vn): Likewise.
2302 (free_scc_vn): Likewise.
2304 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
2307 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2308 indirect_return as function type attribute.
2309 (ix86_attribute_table): Change indirect_return to function
2311 * doc/extend.texi: Update indirect_return attribute.
2313 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
2315 * wide-int.h (widest2_int): New.
2316 * gimple-fold.c (arith_overflowed_p): Use it.
2317 * tree.h (widest2_int_cst): New.
2318 * tree-vrp.c (wide_int_binop_overflow): Rename from
2319 vrp_int_const_binop.
2320 Rewrite to work on trees.
2321 (extract_range_from_multiplicative_op_1): Abstract code to...
2322 (wide_int_range_min_max): ...here.
2323 (wide_int_range_cross_product): ...and here.
2324 (extract_range_from_binary_expr_1): Abstract overflow code to...
2325 (wide_int_range_mult_wrapping): ...here.
2326 * tree-vrp.h (wide_int_range_cross_product): New.
2327 (wide_int_range_mult_wrapping): New.
2329 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
2330 Julia Koval <julia.koval@intel.com>
2332 * config/i386/x86-tune-costs.h (skylake_memcpy,
2333 skylake_memset): Replace rep_prefix with unrolling for size 512.
2335 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
2338 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2341 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
2343 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2344 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2345 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2346 previously known as "PowerPC AltiVec Built-in Functions". Move
2347 some material to new subsubsections "PowerPC AltiVec Built-in
2348 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2350 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2351 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2352 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2353 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2355 2018-07-18 Richard Biener <rguenther@suse.de>
2357 PR tree-optimization/86557
2358 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2361 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
2363 * config/s390/s390.c (s390_function_profiler): Generate CFI.
2365 2018-07-17 Jeff Law <law@redhat.com>
2367 * config/arm/arm.c (get_label_padding): Update for recent
2368 changes to label_to_alignment.
2370 PR tree-optimization/86010
2371 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2373 * config/mips/mips.c (vr4130_align_insns): Update for recent
2374 changes to label_to_alignment.
2376 * config/frv/frv.c (frv_label_align): Update for recent changes
2377 to label_to_alignment.
2379 * config/nios2/nios2.c (nios2_label_align): Update for recent
2380 changes which dropped ALIGN_LABELS_LOG.
2382 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
2384 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2385 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2387 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
2389 * config/arc/arc.c (arc_label_align): Use align_labels instead of
2390 deprecated align_labels_log.
2392 2018-07-17 Richard Biener <rguenther@suse.de>
2395 * dwarf2out.c (init_sections_and_labels): Always generate
2396 a debug_line_str_section for early LTO debug.
2397 (dwarf2out_finish): Reset debug_line_str_hash output early.
2398 Bump counter for extra dwarf5 .debug_loc labels to not conflict
2400 (dwarf2out_early_finish): Output debug_line_str.
2402 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2404 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2405 index register on z196 or later.
2407 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2409 * config/s390/s390.c (s390_default_align): Set default function
2411 (s390_override_options_after_change): Call s390_default align.
2412 (s390_option_override_internal): Call s390_default_align.
2413 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2415 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2418 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2419 to _looptemp_ clauses, other than the first two.
2421 2018-07-17 Martin Liska <mliska@suse.cz>
2423 * opts.c: Do not enable OPT_falign_* for -Os.
2425 2018-07-17 Martin Liska <mliska@suse.cz>
2427 * align.h (MAX_CODE_ALIGN): New.
2428 (MAX_CODE_ALIGN_VALUE): New.
2429 * common/config/i386/i386-common.c (ix86_handle_option):
2430 (MAX_CODE_ALIGN): Moved to align.h.
2431 * final.c (MAX_CODE_ALIGN): Likewise.
2432 * opts.c (parse_and_check_align_values):
2433 (MAX_CODE_ALIGN): Likewise.
2434 (MAX_CODE_ALIGN_VALUE): Likewise.
2436 2018-07-17 Martin Liska <mliska@suse.cz>
2438 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2439 in order to fulfil coding style.
2440 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2441 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2442 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2443 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2444 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2445 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2446 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2447 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2448 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2450 2018-07-17 Martin Liska <mliska@suse.cz>
2452 * align.h: New file.
2453 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2454 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2455 align_flags of label_to_alignment.
2456 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2458 * config/m68k/m68k.c: Do not use removed align_labels_value and
2460 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2461 (LOOP_ALIGN): Likewise.
2462 (LABEL_ALIGN): Likewise.
2463 * config/powerpcspe/powerpcspe.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/rs6000/rs6000-protos.h (rs6000_loop_align):
2468 Change return type to align_flags.
2469 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2470 Remove not used macro.
2471 (rs6000_loop_align): Change return type to align_flags.
2472 (rs6000_loop_align_max_skip): Remove.
2473 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2474 * config/rx/rx-protos.h (rx_align_for_label): Make it
2476 * config/rx/rx.c (rx_align_for_label): Change return type
2478 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2480 into align_flags class.
2481 (LABEL_ALIGN): Likewise.
2482 (LOOP_ALIGN): Likewise.
2483 * config/s390/s390.c (s390_label_align): Use align_flags
2485 (s390_asm_output_function_label): Likewise.
2486 * config/sh/sh.c (sh_override_options_after_change):
2487 Use align_flags class directly without macros.
2488 (find_barrier): Likewise.
2489 (barrier_align): Likewise.
2490 (sh_loop_align): Likewise.
2491 * config/spu/spu.c (spu_option_override):
2492 Use align_flags_tuple::get_value instead of removed macros.
2493 (spu_sched_init): Likewise.
2494 * config/spu/spu.h (GTY): Likewise.
2495 * config/visium/visium.c (visium_option_override):
2496 Set "8" as default secondary alignment.
2497 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2498 in order to guarantee secondary alignment of 8.
2499 * coretypes.h: Include align.h header file.
2500 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2501 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2502 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2503 * doc/tm.texi.in: Likewise.
2504 * final.c (struct label_alignment): Remove not used structure.
2505 (LABEL_ALIGN): Change type to align_flags.
2506 (LOOP_ALIGN): Likewise.
2507 (JUMP_ALIGN): Likewise.
2508 (default_loop_align_max_skip): Remove.
2509 (default_label_align_max_skip): Likewise.
2510 (default_jump_align_max_skip): Likewise.
2511 (default_label_align_after_barrier_max_skip):
2512 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2513 (LABEL_TO_MAX_SKIP): Remove.
2514 (label_to_alignment): Return align_flags type instead of integer.
2515 (label_to_max_skip): Remove.
2516 (align_fuzz): Use align_flags type.
2517 (compute_alignments): Use align_flags type and use align_flags::max
2518 to combine multiple alignments.
2519 (grow_label_align): Grow vec instead of C array.
2520 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2521 (shorten_branches): Use align_flags type and use align_flags::max
2522 to combine multiple alignments.
2523 (final_scan_insn_1): Remove usage of secondary alignment that comes
2524 from label alignment, but instead use proper secondary alignment
2525 which is computed in grow_label_align.
2526 * flags.h (struct align_flags_tuple): Move to align.h.
2527 (struct align_flags): Likewise.
2528 (state_align_loops): Rename to align_loops.
2529 (state_align_jumps): Rename to align_jumps.
2530 (state_align_labels): Rename to align_labels.
2531 (state_align_functions): Rename to align_functions.
2532 (align_loops_log): Remove.
2533 (align_jumps_log): Remove.
2534 (align_labels_log): Remove.
2535 (align_functions_log): Remove.
2536 (align_loops_max_skip): Remove.
2537 (align_jumps_max_skip): Remove.
2538 (align_labels_max_skip): Remove.
2539 (align_functions_max_skip): Remove.
2540 (align_loops_value): Remove.
2541 (align_jumps_value): Remove.
2542 (align_labels_value): Remove.
2543 (align_functions_value): Remove.
2544 * output.h (label_to_alignment): Change return type to align_flags.
2545 (label_to_max_skip): Remove.
2546 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2547 jump_align_max_skip macros.
2548 * targhooks.h (default_loop_align_max_skip): Remove.
2549 (default_label_align_max_skip): Likewise.
2550 (default_jump_align_max_skip): Likewise.
2551 (default_label_align_after_barrier_max_skip): Remove.
2552 * toplev.c (read_log_maxskip): Use ::normalize function.
2553 (parse_N_M): Remove not used argument and also call ::normalize.
2554 (parse_alignment_opts): Do not pass unused arguments.
2555 * varasm.c (assemble_start_function): Use directly align_functions
2556 instead of removed macros.
2557 * system.h: Do not poison removed macros.
2559 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2562 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2563 and cond temporaries don't have reference type if iterator has
2564 pointer type. For init use &for_pre_body instead of pre_p if
2565 for_pre_body is non-empty.
2567 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2569 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2570 double-double modes to SFmode directly directly.
2571 (trunc<mode>sf2_fprs): Delete.
2573 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2575 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2576 for conversions between IFmode and the decimal floating point modes.
2577 (init_float128_ieee): Use the correct names for conversions between
2578 KFmode and the decimal floating point modes.
2580 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2582 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2583 for the conversions between TDmode and IFmode.
2584 (init_float128_ieee): Use more correct names for the conversions
2585 between TDmode and KFmode.
2587 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2589 PR tree-optimization/86526
2590 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2591 (inline_expand_builtin_string_cmp): Likewise.
2592 (inline_string_cmp): Likewise. Use c_readstr instead of
2593 builtin_memcpy_read_str. Add unit_mode temporary.
2595 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2598 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2599 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2601 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2603 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2604 Alphabetize prototypes of built-in functions, separating out
2605 built-in functions that are listed in this section but should be
2606 described elsewhere.
2608 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2611 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2612 conditional move when trapping comparison was split to a
2613 non-trapping one (and vice versa).
2615 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2617 * config/s390/s390.c (s390_function_profiler): Generate nops
2618 instead of profiler call sequences.
2619 * config/s390/s390.opt: Add the new option.
2621 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2623 * config/s390/s390.c (s390_function_profiler): Generate
2624 __mcount_loc section.
2625 * config/s390/s390.opt: Add the new option.
2627 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2629 * common.opt: Add the new warning.
2630 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2631 %r0,__fentry__" when -mfentry is specified.
2632 (s390_option_override_internal): Disallow -mfentry for 31-bit
2634 * config/s390/s390.opt: Add the new option.
2636 2018-07-16 Richard Biener <rguenther@suse.de>
2639 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2640 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2642 2018-07-16 Martin Liska <mliska@suse.cz>
2645 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2648 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2650 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2652 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2654 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2656 * config/arc/arc-cpus.def (hs4x): New cpu.
2658 * config/arc/arc-tables.opt: Regenerate.
2659 * config/arc/arc.c (arc_sched_issue_rate): New function.
2660 (TARGET_SCHED_ISSUE_RATE): Define.
2661 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2662 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2664 (attr tune): Add ARCHS4x tune values.
2665 (attr tune_dspmpy): Define.
2666 (*tst): Correct instruction type.
2667 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2668 * config/arc/arcHS4x.md: New file.
2669 * config/arc/fpu.md: Update instruction type attributes.
2670 * config/arc/t-multilib: Regenerate.
2672 2018-07-16 Tom de Vries <tdevries@suse.de>
2675 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2677 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2679 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2682 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2684 PR tree-optimization/86514
2685 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2686 conversion to a boolean type from a type with greater precision.
2688 2018-07-16 Tom de Vries <tdevries@suse.de>
2690 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2691 dump_flags request TDF_SLIM.
2693 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2695 * fold-const.c (int_const_binop_1): Abstract...
2696 (wide_int_binop): ...wide int code here.
2697 (poly_int_binop): ...poly int code here.
2698 Abstract the rest of int_const_binop_1 into int_const_binop.
2699 * fold-const.h (wide_int_binop): New.
2700 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2701 Remove useless PLUS/MINUS_EXPR case.
2702 (zero_nonzero_bits_from_vr): Move wide int code...
2703 (zero_nonzero_bits_from_bounds): ...here.
2704 (extract_range_from_binary_expr_1): Move mask optimization code...
2705 (range_easy_mask_min_max): ...here.
2706 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2707 (range_easy_mask_min_max): New.
2709 2018-07-15 Jeff Law <law@redhat.com>
2712 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2715 2018-07-14 Jim Wilson <jimw@sifive.com>
2717 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2719 2018-07-14 Paul Koning <ni1d@arrl.net>
2721 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2723 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2725 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2728 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2729 Steve Munroe <munroesj52@gmail.com>
2731 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2732 (_mm_andnot_si128): Likewise.
2733 (_mm_or_si128): Likewise.
2734 (_mm_xor_si128): Likewise.
2736 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2739 * builtins.c (expand_builtin_memcmp): Inline the calls first
2740 when result_eq is false.
2741 (expand_builtin_strcmp): Inline the calls first.
2742 (expand_builtin_strncmp): Likewise.
2743 (inline_string_cmp): New routine. Expand a string compare
2744 call by using a sequence of char comparison.
2745 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2746 a call to str(n)cmp/memcmp.
2747 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2749 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2751 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2753 * config/arm/driver-arm.c: Include arm-native.h.
2754 (host_detect_local_cpu): Use auto-generated data tables.
2755 (vendors, arm_cpu_table): Delete. Move part information to ...
2756 * config/arm/arm-cpus.in: ... here.
2757 * config/arm/parsecpu.awk (gen_native): New function.
2758 (vendor, part): New CPU fields.
2759 (END): Add support for building the native CPU detection tables.
2760 * config/arm/t-arm (arm-native.h): Add build rule.
2761 (driver-arm.o): Add dependency on arm-native.h.
2763 2018-07-13 Richard Biener <rguenther@suse.de>
2766 * match.pd (addr1 - addr2): Allow either of the operand to
2769 2018-07-13 Tom de Vries <tdevries@suse.de>
2771 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2774 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2776 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2777 arrays instead of numbered variables.
2779 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2781 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2782 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2784 2018-07-13 Richard Biener <rguenther@suse.de>
2787 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2788 instead of get_context_die.
2790 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2791 Richard Biener <rguenther@suse.de>
2794 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2795 that the loop latch destination where phi is defined.
2797 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2799 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2800 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2801 (riscv_set_current_function): Extract getting interrupt type to new
2803 (riscv_get_interrupt_type): New function.
2804 (riscv_merge_decl_attributes): New function, checking interrupt type is
2806 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2808 2018-07-12 Paul Koning <ni1d@arrl.net>
2810 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2813 2018-07-12 Paul Koning <ni1d@arrl.net>
2815 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2816 zero reference, add doloop_end instead.
2817 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2818 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2819 detail for doloop_end.
2821 2018-07-12 Martin Sebor <msebor@redhat.com>
2824 * attribs.c (decl_attributes): Reject conflicting attributes before
2825 calling attribute handlers.
2827 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2829 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2831 (gcc::dump_manager::get_dump_file_name): likewise.
2832 (dump_begin): Likewise.
2833 * dumpfile.h (dump_begin): Update prototype.
2834 (gcc::dump_manager::get_dump_file_name,
2835 gcc::dump_manager::get_dump_file_name): Update prototype.
2837 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2839 * internal-fn.h (vectorizable_internal_fn_p): New function.
2840 * tree-vect-slp.c (compatible_calls_p): Likewise.
2841 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2842 to internal functions.
2843 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2845 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2847 * fold-const.h (inverse_conditions_p): Declare.
2848 * fold-const.c (inverse_conditions_p): New function.
2849 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2850 that test the inverse condition of a conditional internal function.
2851 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2852 * internal-fn.c (internal_fn_mask_index): Handle conditional
2854 (vectorized_internal_fn_supported_p): New function.
2855 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2856 (any_pred_load_store): Replace with...
2857 (need_to_predicate): ...this new variable.
2858 (redundant_ssa_names): New variable.
2859 (ifcvt_can_use_mask_load_store): Move initial checks to...
2860 (ifcvt_can_predicate): ...this new function. Handle tree codes
2861 for which a conditional internal function exists.
2862 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2863 instead of ifcvt_can_use_mask_load_store. Update after variable
2865 (predicate_load_or_store): New function, split out from
2866 predicate_mem_writes.
2867 (check_redundant_cond_expr): New function.
2868 (value_available_p): Likewise.
2869 (predicate_rhs_code): Likewise.
2870 (predicate_mem_writes): Rename to...
2871 (predicate_statements): ...this. Use predicate_load_or_store
2872 and predicate_rhs_code.
2873 (combine_blocks, tree_if_conversion): Update after above name changes.
2874 (ifcvt_local_dce): Handle redundant_ssa_names.
2875 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2876 general conditional functions.
2877 * tree-vect-stmts.c (vectorizable_call): Likewise.
2879 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2880 Alan Hayward <alan.hayward@arm.com>
2881 David Sherwood <david.sherwood@arm.com>
2883 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2884 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2885 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2886 plus and minus and convert them into IFN_COND_FMA-based sequences.
2887 (convert_mult_to_fma): Handle conditional plus and minus.
2889 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2891 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2892 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2893 (cond_fnms_optab): New optabs.
2894 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2896 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2897 * internal-fn.h (get_conditional_internal_fn): Declare.
2898 (get_unconditional_internal_fn): Likewise.
2899 * internal-fn.c (cond_ternary_direct): New macro.
2900 (expand_cond_ternary_optab_fn): Likewise.
2901 (direct_cond_ternary_optab_supported_p): Likewise.
2902 (FOR_EACH_COND_FN_PAIR): Likewise.
2903 (get_conditional_internal_fn): New function.
2904 (get_unconditional_internal_fn): Likewise.
2905 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2906 (gimple_match_op::gimple_match_op): Add a new overload for 5
2908 (gimple_match_op::set_op): Likewise.
2909 (gimple_resimplify5): Declare.
2910 * genmatch.c (decision_tree::gen): Generate simplifications for
2912 * gimple-match-head.c (gimple_simplify): Define an overload for
2913 5 operands. Handle calls with 5 arguments in the top-level overload.
2914 (convert_conditional_op): Handle conversions from unconditional
2915 internal functions to conditional ones.
2916 (gimple_resimplify5): New function.
2917 (build_call_internal): Pass a fifth operand.
2918 (maybe_push_res_to_seq): Likewise.
2919 (try_conditional_simplification): Try converting conditional
2920 internal functions to unconditional internal functions.
2921 Handle 3-operand unconditional forms.
2922 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2923 Define ternary equivalents of the current rules for binary conditional
2925 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2927 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2928 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2929 (optab): Handle them.
2930 (SVE_COND_FP_TERNARY): New int iterator.
2931 (sve_fmla_op, sve_fmad_op): New int attributes.
2932 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2933 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2934 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2936 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2938 * target.def (preferred_else_value): New target hook.
2939 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2940 * doc/tm.texi: Regenerate.
2941 * targhooks.h (default_preferred_else_value): Declare.
2942 * targhooks.c (default_preferred_else_value): New function.
2943 * internal-fn.h (conditional_internal_fn_code): Declare.
2944 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2945 (get_conditional_internal_fn): Use it.
2946 (conditional_internal_fn_code): New function.
2947 * gimple-match.h (gimple_match_cond): New struct.
2948 (gimple_match_op): Add a cond member function.
2949 (gimple_match_op::gimple_match_op): Update all forms to take a
2951 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2952 for the suboperation, but don't specify a particular else_value.
2953 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2954 (visit_nary_op, visit_reference_op_load): Pass
2955 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2956 * gimple-match-head.c: Include tree-eh.h
2957 (convert_conditional_op): New function.
2958 (maybe_resimplify_conditional_op): Likewise.
2959 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2960 (gimple_resimplify2): Likewise.
2961 (gimple_resimplify3): Likewise.
2962 (gimple_resimplify4): Likewise.
2963 (maybe_push_res_to_seq): Return null for conditional operations.
2964 (try_conditional_simplification): New function.
2965 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2967 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2969 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2971 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2973 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2975 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2977 (hash_tree): Do not hash DECL_FCONTEXT
2978 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2979 Do not stream DECL_FCONTEXT.
2980 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2981 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2983 2018-07-12 Richard Biener <rguenther@suse.de>
2986 * dwarf2out.c (gen_block_die): Only output blocks when they have
2987 at least one !DECL_IGNORED_P variable.
2989 2018-07-12 Richard Biener <rguenther@suse.de>
2992 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2993 Remove -mieee-fp handling.
2995 2018-07-12 Richard Biener <rguenther@suse.de>
2997 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2998 left-over from last patch.
3000 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3002 PR tree-optimization/86492
3003 * gimple-ssa-store-merging.c
3004 (imm_store_chain_info::coalesce_immediate_stores): Call
3005 check_no_overlap even for the merge_overlapping case. Formatting fix.
3007 2018-07-12 Richard Biener <rguenther@suse.de>
3010 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3011 move possibly trapping operations into the conditional.
3013 2018-07-12 Richard Biener <rguenther@suse.de>
3015 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3016 (vn_lookup_simplify_result): Remove recursion limit applied
3018 (vn_nary_build_or_lookup_1): Adjust.
3019 (try_to_simplify): Likewise.
3020 * gimple-match-head.c (gimple_resimplify1): Instead apply one
3022 (gimple_resimplify2): Likewise.
3023 (gimple_resimplify3): Likewise.
3024 (gimple_resimplify4): Likewise.
3026 2018-07-11 Jakub Jelinek <jakub@redhat.com>
3028 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3029 Use __mmask64 type instead of __mmask8 for __M argument.
3030 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3031 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3033 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3034 __mmask16 for __M argument.
3035 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3036 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3037 to __mmask16 instead of __mmask8.
3038 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3039 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3040 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3041 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3042 instead of __mmask16 for __U argument.
3043 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3044 __mmask16 instead of __mmask8 for __U argument.
3045 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3047 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3049 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3051 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3053 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3055 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3057 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3059 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3061 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3063 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3065 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3066 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3067 return type as well as __M argument type and all casts from __mmask8
3069 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3070 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3071 return type as well as __M argument type and all casts from __mmask8
3073 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3074 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3075 return type as well as __M argument type and all casts from __mmask8
3077 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3078 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3079 return type as well as __M argument type and all casts from __mmask8
3081 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3082 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3085 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3087 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3088 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3091 2018-07-11 Paul Koning <ni1d@arrl.net>
3093 * doc/md.texi (define_subst): Document how multiple occurrences of
3094 the same argument in the replacement pattern are handled.
3096 2018-07-11 Paul Koning <ni1d@arrl.net>
3098 * doc/extend.texi (Common Variable Attributes): Move "mode" into
3100 (Common Type Attributes): Add "mode" attribute.
3102 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
3104 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3105 stream DECL_ORIGINAL_TYPE.
3106 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3107 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3108 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3109 Do not walk original type.
3110 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3112 (write_ts_decl_non_common_tree_pointers): Do not stream
3114 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3115 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3117 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3119 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3120 thread twice from the same starting edge.
3122 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3124 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3125 * gimple.c (gimple_call_nonnull_result_p): ...here...
3126 (gimple_call_nonnull_arg): ...and here.
3127 * gimple.h (gimple_call_nonnull_result_p): New.
3128 (gimple_call_nonnull_arg): New.
3130 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
3132 * config/arm/arm-cpus.in: Move information from fpu field of each
3133 cpu definition to the isa field.
3134 * config/arm/parsecpu.awk (fpu): Delete match rule.
3135 (gen_comm_data): Don't add bits from the CPU's FPU entry.
3137 2018-07-11 Richard Biener <rguenther@suse.de>
3140 * dwarf2out.c (init_sections_and_labels): Use
3141 output_asm_line_debug_info consistently.
3142 (dwarf2out_early_finish): Likewise.
3143 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3146 2018-07-11 Richard Biener <rguenther@suse.de>
3148 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3149 Rework father_bb setting in a way to avoid propagating constants
3150 multiple times on a loop body.
3152 2018-07-10 Mark Wielaard <mark@klomp.org>
3155 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3157 2018-07-10 Richard Biener <rguenther@suse.de>
3159 * hash-map.h (hash_map::iterator::operator*): Return
3160 references to key and value.
3162 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3165 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3166 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3167 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3168 (gimplify_omp_for): For composite loops, move outer
3169 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3170 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
3171 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
3172 TREE_LIST for both the original class iterator and the "last" helper
3173 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
3174 loop, remember has_decl_expr from outer composite loops for the
3175 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3177 2018-07-09 Martin Sebor <msebor@redhat.com>
3181 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3182 accessing implicitly initialized array elements.
3183 * expr.c (string_constant): Handle string initializers of
3184 character arrays within aggregates.
3185 * gimple-fold.c (fold_array_ctor_reference): Add argument.
3186 Store element offset. As a special case, handle zero size.
3187 (fold_nonarray_ctor_reference): Same.
3188 (fold_ctor_reference): Add argument. Store subobject offset.
3189 * gimple-fold.h (fold_ctor_reference): Add argument.
3191 2018-07-09 Paul Koning <ni1d@arrl.net>
3193 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3194 (pdp11_insn_cost): New function.
3195 (pdp11_md_asm_adjust): New function.
3196 (TARGET_INVALID_WITHIN_DOLOOP): Define.
3197 (pdp11_rtx_costs): Update to match machine better.
3198 (output_addr_const_pdp11): Correct format mismatch warnings.
3199 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3200 * config/pdp11/pdp11.md: General change to add base_cost and/or
3201 length attributes for use by new pdp11_insn_cost function.
3202 (MIN_BRANCH): Correct definition.
3204 (doloop_end): Use standard pattern name for looping pattern.
3205 (doloop_end_nocc): New.
3206 (movsf): Add another constraint alternative.
3207 (zero_extendqihi2): Add constraint alternatives for not in place
3209 (zero_extendhisi2): Remove.
3210 (shift patterns): Add CC handling variants.
3214 (define_peephole2): New peephole to recognize mov that sets CC for
3217 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3219 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3220 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3223 2018-07-09 Jakub Jelinek <jakub@redhat.com>
3226 * real.c (real_nextafter): Return true if result is denormal.
3228 2018-07-09 Martin Liska <mliska@suse.cz>
3230 * common.opt: Add back wrongly removed attribute.
3232 2018-07-09 Richard Biener <rguenther@suse.de>
3235 * dwarf2out.c (gen_block_die): For an early generated DIE
3236 always output high/low PC attributes.
3238 2018-07-09 Tom de Vries <tdevries@suse.de>
3240 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3241 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3242 onto VAR_DECL with abstract origin.
3244 2018-07-07 Jim Wilson <jimw@sifive.com>
3246 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3248 2018-07-07 Tom de Vries <tdevries@suse.de>
3250 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3252 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
3254 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3256 (combine_bound): Use wide-int overflow calculation instead of
3258 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3260 * fold-const.c (int_const_binop_2): Same.
3261 (extract_muldiv_1): Same.
3262 (fold_div_compare): Same.
3263 (fold_abs_const): Same.
3265 * poly-int.h (add): Same.
3269 * predict.c (predict_iv_comparison): Same.
3270 * profile-count.c (slow_safe_scale_64bit): Same.
3271 * simplify-rtx.c (simplify_const_binary_operation): Same.
3272 * tree-chrec.c (tree_fold_binomial): Same.
3273 * tree-data-ref.c (split_constant_offset_1): Same.
3274 * tree-if-conv.c (idx_within_array_bound): Same.
3275 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3276 * tree-ssa-phiopt.c (minmax_replacement): Same.
3277 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3278 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3279 * vr-values.c (vr_values::adjust_range_with_scev): Same.
3280 * wide-int.cc (wi::add_large): Same.
3281 (wi::mul_internal): Same.
3282 (wi::sub_large): Same.
3283 (wi::divmod_internal): Same.
3284 * wide-int.h: Change overflow type to overflow_type for neg, add,
3285 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3286 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3287 mul_internal, divmod_internal.
3288 (overflow_type): New enum.
3289 (accumulate_overflow): New.
3291 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3293 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3294 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3296 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3298 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3299 argument is checked for zero before entering loop, avoid checking again.
3301 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3303 * gimplify.h (generic_expr_could_trap_p): Set as global function.
3304 * gimplify.h (generic_expr_could_trap_p): Likwise.
3305 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3307 2018-07-06 Jakub Jelinek <jakub@redhat.com>
3309 PR tree-optimization/86401
3310 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3311 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3312 (fold_bit_and_mask): ... here. New helper function for match.pd.
3313 * fold-const.h (fold_bit_and_mask): Declare.
3314 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3316 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3319 * target.def (translate_mode_attribute): New hook.
3320 * targhooks.h (default_translate_mode_attribute): Declare.
3321 * targhooks.c (default_translate_mode_attribute): New function.
3322 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3323 * doc/tm.texi: Regenerate.
3324 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3325 (rs6000_translate_mode_attribute): New function.
3327 2018-07-06 Paul Koning <ni1d@arrl.net>
3329 * doc/md.texi (define_split): Document DONE and FAIL.
3330 (define_peephole2): Ditto.
3332 2018-07-05 Jeff Law <law@redhat.com>
3334 PR tree-optimization/86010
3335 * tree-ssa-dse.c (compute_trims): More aggressively trim at
3336 both the head and tail of mem* and str* calls.
3338 2018-07-05 Jim Wilson <jimw@sifive.com>
3340 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3342 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
3344 * config/aarch64/aarch64-simd.md: correct flags text for
3345 MIN_EXPR replacement.
3347 2018-07-05 James Clarke <jrtc27@jrtc27.com>
3349 * configure: Regenerated.
3351 2018-07-05 Carl Love <cel@us.ibm.com>
3353 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3354 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3355 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3356 VSX_BUILTIN_DOUBLEL_V4SF.
3358 2018-07-05 Martin Sebor <msebor@redhat.com>
3361 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3362 than its domain to compute its the upper bound of a char array.
3364 2018-07-05 Nathan Sidwell <nathan@acm.org>
3366 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3367 * doc/cpp.texi: Update comment.
3368 * doc/tm.texi: Rebuilt.
3369 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3370 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3371 * doc/extend.texi (Backwards Compatibility): Clarify it is system
3372 headers affected by extern "C".
3373 * system.h: Poison NO_IMPLICIT_EXTERN_C.
3374 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3375 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3376 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3377 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3378 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3379 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3380 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3381 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3382 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3383 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3384 config/sparc/sp64-elf.h, config/spu/spu.h,
3385 config/stormy16/stormy16.h, config/v850/v850.h,
3386 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3387 define NO_IMPLICIT_EXTERN_C.
3388 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3390 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3393 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3394 instead of GET_MODE_SIZE when comparing Units.
3396 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3399 * rtlanal.c (set_noop_p): Constrain on mode change,
3400 include hard-reg-set.h
3402 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3404 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3406 2018-07-05 Jakub Jelinek <jakub@redhat.com>
3409 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3412 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3414 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3416 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3419 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3421 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3423 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
3426 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3428 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
3430 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3431 neg_*_op* variables.
3433 2018-07-04 Martin Liska <mliska@suse.cz>
3435 * tree-switch-conversion.c: Define
3436 max_ratio_for_speed and max_ratio_for_size constants.
3438 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3439 Martin Liska <mliska@suse.cz>
3444 * common.opt: Rename align options with 'str_' prefix.
3445 * common/config/i386/i386-common.c (set_malign_value): New
3447 (ix86_handle_option): Use it to set -falign-* options/
3448 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3449 type from int to string.
3450 * config/aarch64/aarch64.c: Update default values from int
3452 * config/alpha/alpha.c (alpha_override_options_after_change):
3454 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3455 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3456 max skip conditionally.
3457 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3458 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3459 max skip conditionally.
3460 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3461 max skip conditionally.
3462 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3463 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3464 max skip conditionally.
3465 * config/i386/i386.c (struct ptt): Change type from int to
3467 (ix86_default_align): Set default values.
3468 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3469 max skip conditionally.
3470 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3471 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3472 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3473 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3474 max skip conditionally.
3475 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3476 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3477 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3478 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3479 max skip conditionally.
3480 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3481 * config/ia64/ia64.c (ia64_option_override): Set default values
3482 for alignment options.
3483 * config/m68k/m68k.c: Handle new str_align_* options.
3484 * config/mips/mips.c (mips_set_compression_mode): Change
3486 (mips_option_override): Set default values for options.
3487 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3489 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3491 * config/rx/rx.c (rx_option_override): Likewise.
3492 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3493 (LABEL_ALIGN): Use align_labels_log.
3494 (LOOP_ALIGN): Use align_loops_align.
3495 * config/s390/s390.c (s390_asm_output_function_label): Use new
3497 * config/sh/sh.c (sh_override_options_after_change):
3498 Change type of constants.
3499 * config/spu/spu.c (spu_sched_init): Likewise.
3500 * config/sparc/sparc.c (sparc_option_override): Set default
3502 * config/visium/visium.c (visium_option_override): Likewise.
3503 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3504 emit p2align format with last argument if it's not needed.
3505 * doc/invoke.texi: Document extended format of -falign-*.
3506 * final.c: Use align_labels alignment.
3507 * flags.h (struct target_flag_state): Change type to use
3509 (struct align_flags_tuple): New.
3510 (struct align_flags): Likewise.
3511 (align_loops_log): Redefine macro to use new types.
3512 (align_loops_max_skip): Redefine macro to use new types.
3513 (align_jumps_log): Redefine macro to use new types.
3514 (align_jumps_max_skip): Redefine macro to use new types.
3515 (align_labels_log): Redefine macro to use new types.
3516 (align_labels_max_skip): Redefine macro to use new types.
3517 (align_functions_log): Redefine macro to use new types.
3518 (align_loops): Redefine macro to use new types.
3519 (align_jumps): Redefine macro to use new types.
3520 (align_labels): Redefine macro to use new types.
3521 (align_functions): Redefine macro to use new types.
3522 (align_functions_max_skip): Redefine macro to use new types.
3523 (align_loops_value): New macro.
3524 (align_jumps_value): New macro.
3525 (align_labels_value): New macro.
3526 (align_functions_value): New macro.
3527 * function.c (invoke_set_current_function_hook): Propagate
3528 alignment values from flags to global variables default in
3530 * ipa-icf.c (sem_function::equals_wpa): Use
3531 cl_optimization_option_eq instead of memcmp.
3532 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3534 (cl_optimization_stream_in): Likewise.
3535 * optc-save-gen.awk: Support strings in cl_optimization.
3536 * opth-gen.awk: Likewise.
3537 * opts.c (finish_options): Remove error checking of invalid
3539 (MAX_CODE_ALIGN): Remove.
3540 (MAX_CODE_ALIGN_VALUE): Likewise.
3541 (parse_and_check_align_values): New function.
3542 (check_alignment_argument): Likewise.
3543 (common_handle_option): Use check_alignment_argument.
3544 * opts.h (parse_and_check_align_values): Declare.
3545 * toplev.c (init_alignments): Remove.
3546 (read_log_maxskip): New.
3547 (parse_N_M): Likewise.
3548 (parse_alignment_opts): Likewise.
3549 (backend_init_target): Remove usage of init_alignments.
3550 * toplev.h (parse_alignment_opts): Declare.
3551 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3553 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3554 * tree.c (cl_option_hasher::equal): New.
3555 * varasm.c: Use new global macros.
3557 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3559 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3560 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3561 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3562 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3563 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3564 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3565 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3566 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3567 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3568 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3569 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3570 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3571 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3573 2018-07-04 Martin Liska <mliska@suse.cz>
3574 Jonathan Wakely <jwakely@redhat.com>
3576 * coverage.c: Use correct type.
3577 * doc/invoke.texi: Language correction.
3579 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3582 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3583 ENDBRANCH for non-tail call which may return via indirect branch.
3584 * doc/extend.texi: Document indirect_return attribute.
3586 2018-07-03 Martin Sebor <msebor@redhat.com>
3588 PR tree-optimization/86274
3589 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3591 (format_floating): Correct handling of infinities and NaNs.
3593 2018-07-03 Martin Sebor <msebor@redhat.com>
3595 * print-tree.c (print_real_cst): New function.
3596 (print_node_brief): Call it.
3597 (print_node): Ditto.
3599 2018-07-03 Jeff Law <law@redhat.com>
3601 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3602 into a single pattern.
3604 * config/h8300/h8300.md (ors code_iterator): New.
3605 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3606 a single pattern and single splitter.
3607 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3608 (iorqi3_1, xorqi3_1): Likewise.
3609 (iorqi3, xorqi3 expanders): Similarly.
3611 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3612 (movmd_internal) into a single pattern using the P mode iterator.
3613 (movmd splitters): Similarly.
3614 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3615 (movsd splitters): Similarly.
3617 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3618 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3619 right table based on the size of the operand.
3620 * config/h8300/h8300.md (length_table): Corresponding changes. All
3621 references to "addb", "addw" and "addl" changed to "add".
3622 (btst patterns): Merge two variants into a single pattern.
3623 (tstqi, tsthi): Likewise.
3624 (addhi3_incdec, addsi3_incdec): Likewise.
3625 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3626 (mulhi3, mulsi3): Likewise.
3627 (udivhi3, udivsi3): Likewise.
3628 (divhi3, divsi3): Likewise.
3629 (andorqi3, andorhi3, andorsi3): Likewise.
3631 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3634 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3635 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3637 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3639 PR tree-optimization/85694
3640 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3641 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3643 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3644 (<u>avg<mode>3_ceil): New patterns.
3646 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3648 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3649 scan-tree-dump directive.
3650 * gcc.dg/vect/slp-perm-2.c: Likewise.
3651 * gcc.dg/vect/slp-perm-3.c: Likewise.
3652 * gcc.dg/vect/slp-perm-5.c: Likewise.
3653 * gcc.dg/vect/slp-perm-6.c: Likewise.
3654 * gcc.dg/vect/slp-perm-7.c: Likewise.
3655 * gcc.dg/vect/slp-perm-8.c: Likewise.
3657 2018-07-03 Marek Polacek <polacek@redhat.com>
3660 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3662 2018-07-03 Richard Biener <rguenther@suse.de>
3665 * tree-ssa-structalias.c (find_func_clobbers): Properly
3666 handle indirect calls.
3668 2018-07-03 Jeff Law <law@redhat.com>
3670 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3671 (shifts): New code iterator.
3672 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3673 expander. Fix HImode handling on H8/SX.
3674 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3675 (subqi3, subhi3, subsi3 expanders): Likewise.
3676 (andqi3, andhi3, andsi3 expanders): Likewise.
3677 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3678 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3679 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3680 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3681 (zero_extendqihi2, zero_extendqisi2): Likewise.
3682 (extendqihi2, extendqisi2): Likewise.
3683 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3684 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3685 (rotlqi3_1, rotlhi3_1): Likewise.
3686 (logicalhi3_sn, logicalsi3_sn): Likewise.
3687 (logicalhi3, logicalsi3): Likewise.
3689 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3691 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3692 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3693 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3694 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3695 type to append_pattern_def_seq instead of creating a stmt_vec_info
3697 (build_mask_conversion): Likewise. Remove vinfo argument.
3698 (vect_add_conversion_to_patterm): Likewise, renaming to...
3699 (vect_add_conversion_to_pattern): ...this.
3700 (vect_recog_mask_conversion_pattern): Update call to
3701 build_mask_conversion. Pass the vector type to
3702 append_pattern_def_seq here too.
3703 (vect_recog_gather_scatter_pattern): Update call to
3704 vect_add_conversion_to_pattern.
3706 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3708 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3709 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3710 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3711 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3712 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3713 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3714 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3715 append_pattern_def_seq instead of new_pattern_def_seq.
3716 (vect_recog_divmod_pattern): Do both of the above.
3717 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3720 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3722 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3723 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3724 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3725 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3726 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3727 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3728 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3729 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3730 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3731 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3732 parameter with a single stmt_vec_info.
3733 (vect_recog_func_ptr): Likewise.
3734 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3735 (vect_try_gather_scatter_pattern): ...this.
3736 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3737 the stmt_vec_info of the statement to be matched. Don't clear
3738 STMT_VINFO_RELATED_STMT.
3739 (vect_pattern_recog): Update call accordingly.
3741 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3743 PR tree-optimization/85694
3744 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3745 (uavgM3_ceil): Document new optabs.
3746 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3747 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3749 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3750 (savg_ceil_optab): New optabs.
3751 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3752 (vect_vect_recog_func_ptrs): Add it.
3753 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3754 constant directly from the associated lhs.
3756 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3758 * tree-vect-patterns.c (vect_split_statement): New function.
3759 (vect_convert_input): Use it to try to split an existing cast.
3761 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3763 * poly-int.h (print_hex): New function.
3764 * dumpfile.h (dump_dec, dump_hex): Declare.
3765 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3766 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3767 min_input_precision, operation_precision and operation_sign.
3768 * tree-vect-patterns.c (vect_get_range_info): New function.
3769 (vect_same_loop_or_bb_p, vect_single_imm_use)
3770 (vect_operation_fits_smaller_type): Delete.
3771 (vect_look_through_possible_promotion): Add an optional
3772 single_use_p parameter.
3773 (vect_recog_over_widening_pattern): Rewrite to use new
3774 stmt_vec_info infomration. Handle one operation at a time.
3775 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3776 (vect_truncatable_operation_p, vect_set_operation_type)
3777 (vect_set_min_input_precision): New functions.
3778 (vect_determine_min_output_precision_1): Likewise.
3779 (vect_determine_min_output_precision): Likewise.
3780 (vect_determine_precisions_from_range): Likewise.
3781 (vect_determine_precisions_from_users): Likewise.
3782 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3783 (vect_vect_recog_func_ptrs): Put over_widening first.
3785 (vect_pattern_recog): Call vect_determine_precisions.
3787 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3789 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3790 statements that have been replaced by further pattern statements.
3791 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3793 2018-07-03 Richard Biener <rguenther@suse.de>
3795 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3796 always set *dt. Dump vectype in vectype overload.
3797 * dumpfile.h (dump_gimple_expr): New function.
3798 (dump_gimple_expr_loc): Likewise.
3799 * dumpfile.c (dump_gimple_expr): New function.
3800 (dump_gimple_expr_loc): Likewise.
3802 2018-07-02 Jeff Law <law@redhat.com>
3804 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3805 the H8/300, H8/300H and H8/S variants into a single pattern.
3806 (movhi_h8300, movqi_h8300hs): Similarly.
3807 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3808 (QHI mode iterator): New.
3810 * config/h8300/h8300.md: Remove trailing whitespace.
3812 2018-07-02 Jim Wilson <jimw@sifive.com>
3814 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3815 instead of emit_insn for interrupt returns.
3816 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3817 (riscv_sret, riscv_uret): Likewise.
3819 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3821 * pretty-print.c (selftest::test_pp_format): Move save and restore
3822 of quotes to class auto_fix_quotes, and add an instance.
3823 * selftest.c: Include "intl.h".
3824 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3825 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3826 * selftest.h (selftest::auto_fix_quotes): New class.
3828 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3830 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3831 (aarch64_sve_prepare_conditional_op): Remove.
3832 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3833 Allow aarch64_simd_reg_or_zero as select operand; remove
3834 the aarch64_sve_prepare_conditional_op call.
3835 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3836 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3837 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3838 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3839 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3840 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3841 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3842 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3843 and a splitters to match all of the *_any patterns.
3844 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3846 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3847 (SVE_COND_FP_BINARY_REV): Remove.
3848 (sve_int_op_rev, sve_fp_op_rev): New.
3849 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3850 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3851 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3852 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3853 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3854 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3855 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3856 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3857 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3859 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3860 Remove match_dup 1 from the inner unspec.
3861 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3863 * config/aarch64/aarch64.md (movprfx): New attr.
3864 (length): Default movprfx to 8.
3865 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3866 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3867 (*<su>mul<SVE_I>3_highpart): Likewise.
3868 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3869 (*v<ASHIFT><SVE_I>3): Likewise.
3870 (*<su><MAXMIN><SVE_I>3): Likewise.
3871 (*<su><MAXMIN><SVE_F>3): Likewise.
3872 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3873 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3874 (*div<SVE_F>4): Likewise.
3876 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3878 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3881 2018-07-02 Richard Biener <rguenther@suse.de>
3883 PR tree-optimization/86363
3884 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3885 memset argument refers to a non-variable address.
3887 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3889 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3890 {PLUS,MINUS}_EXPR code to...
3891 (adjust_symbolic_bound): ...here,
3892 (combine_bound): ...here,
3893 (set_value_range_with_overflow): ...and here.
3895 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3897 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3899 (extract_range_from_abs_expr): ...here.
3901 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3903 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3904 -fno-omit-frame-pointer when not optimizing.
3906 2018-07-02 Martin Liska <mliska@suse.cz>
3909 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3910 (propagate_nothrow): Likewise.
3912 2018-07-02 Martin Liska <mliska@suse.cz>
3915 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3917 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3919 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3920 function in r262149, changing "loc" param from source_location to
3921 const dump_location_t &.
3922 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3923 declaration, as above.
3925 2018-07-01 Paul Koning <ni1d@arrl.net>
3927 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3928 -munit-asm, -mgnu-asm, -mdec-asm.
3929 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3930 (pdp11_output_labelref): New.
3931 (pdp11_output_def): New.
3932 (pdp11_output_addr_vec_elt): New.
3933 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3934 %# and %@ format codes.
3935 (pdp11_option_override): New.
3936 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3937 (pdp11_output_ident): New.
3938 (pdp11_asm_named_section): New.
3939 (pdp11_asm_init_sections): New.
3940 (pdp11_file_start): New.
3941 (pdp11_file_end): New.
3942 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3943 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3944 %o, like %c but octal.
3945 (pdp11_option_override): New.
3946 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3948 (DATA_SECTION_ASM_OP): Ditto.
3949 (READONLY_DATA_SECTION_ASM_OP): New.
3950 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3951 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3952 (ASM_OUTPUT_LABELREF): Ditto.
3953 (ASM_OUTPUT_DEF): Ditto.
3954 (ASM_OUTPUT_EXTERNAL): New.
3955 (ASM_OUTPUT_SOURCE_FILENAME): New.
3956 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3957 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3958 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3959 %# and %@ format codes.
3960 * config/pdp11/pdp11.opt (mgnu-asm): New.
3961 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3962 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3963 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3965 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3967 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3968 dereferencing path[] beyond its length.
3970 (debug_all_paths): New.
3971 (rewire_first_differing_edge): New.
3972 (adjust_paths_after_duplication): New.
3973 (duplicate_thread_path): Call adjust_paths_after_duplication.
3975 (thread_through_all_blocks): Add new argument to
3976 duplicate_thread_path.
3978 2018-06-30 Jim Wilson <jimw@sifive.com>
3980 * config/riscv/predicates.md (p2m1_shift_operand): New.
3981 (high_mask_shift_operand): New.
3982 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3983 pattern using p2m1_shift_operand.
3984 (lshsi3_zero_extend_3+2): New combiner pattern using
3985 high_mask_shift_operand.
3987 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3989 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3991 (vect_recog_rotate_pattern): ...here.
3992 (vect_convert_input): Try to insert casts of invariants in the
3994 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3995 preheader to be empty.
3997 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3999 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4000 vector type. If given, install it in the new statement's
4002 (vect_element_precision): New function.
4003 (vect_unpromoted_value): New struct.
4004 (vect_unpromoted_value::vect_unpromoted_value): New function.
4005 (vect_unpromoted_value::set_op): Likewise.
4006 (vect_look_through_possible_promotion): Likewise.
4007 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4008 (vect_widened_op_tree, vect_convert_input): Likewise.
4009 (vect_convert_inputs, vect_convert_output): Likewise.
4010 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4011 to handle the optional cast of the multiplication result and
4012 vect_widened_op_tree to detect the widened multiplication itself.
4013 Do not require the input and output of promotion casts to have
4014 the same sign, but base the signedness of the operation on the
4015 input rather than the result. If the pattern includes two
4016 promotions, check that those promotions have the same sign.
4017 Do not restrict the MULT_EXPR handling to a double-width result;
4018 handle quadruple-width results and wider. Use vect_convert_inputs
4019 to convert the inputs to the common type.
4020 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
4021 to handle the optional cast of the ABS result. Also allow a sign
4022 change or a sign extension between the ABS and MINUS.
4023 Use vect_widened_op_tree to detect the widened subtraction and use
4024 vect_convert_inputs to convert the inputs to the common type.
4025 (vect_handle_widen_op_by_const): Delete.
4026 (vect_recog_widen_op_pattern): New function.
4027 (vect_recog_widen_mult_pattern): Use it.
4028 (vect_recog_widen_shift_pattern): Likewise.
4029 (vect_recog_widen_sum_pattern): Use
4030 vect_look_through_possible_promotion to handle the promoted
4033 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4035 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4036 the containing gimple_seq *.
4037 * gimple-iterator.h (gsi_for_stmt): Declare it.
4038 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4039 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4040 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4041 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4042 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4044 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4046 (vect_mark_pattern_stmts): ...here. Handle cases in which the
4047 statement being replaced is part of an existing pattern
4048 definition sequence, inserting the new pattern statements before
4050 (vect_pattern_recog_1): Don't return a bool. If the statement
4051 is already part of a pattern, instead apply pattern matching
4052 to the pattern definition statements. Don't clear the
4053 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4054 (vect_pattern_recog): Don't break after the first match;
4055 continue processing the pattern definition statements instead.
4056 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4058 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4060 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4061 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4062 (vect_recog_widen_sum_pattern): Use it.
4064 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4066 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4067 phi is not a pattern statement and has not been replaced by
4068 a pattern statement.
4069 * tree-vect-patterns.c (type_conversion_p): Don't check
4070 STMT_VINFO_IN_PATTERN_P.
4071 (vect_recog_vector_vector_shift_pattern): Likewise.
4072 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4073 the pattern statement rather than the original statement; check
4074 directly for a WIDEN_MULT_EXPR here.
4075 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4076 vect_is_simple_use to return the pattern statement rather
4077 than the original statement; use is_pattern_stmt_p to check
4078 for such a pattern statement.
4079 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4080 to return the pattern statement rather than the original statement;
4081 don't do the same transformation here.
4082 (vect_is_simple_use): If the defining statement has been replaced
4083 by a pattern statement, return the pattern statement instead.
4084 Remove the corresponding (local) transformation from the vectype
4087 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4089 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4090 end and default to null.
4091 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4092 (vectorizable_reduction): Update calls accordingly, dropping the
4093 gimple ** argument if the passed-back statement isn't needed.
4094 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4095 (vect_recog_rotate_pattern): Likewise.
4096 (vect_recog_mask_conversion_pattern): Likewise.
4097 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4098 (vect_mask_constant_operand_p): Likewise.
4099 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4100 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4101 (get_group_load_store_type, get_load_store_type): Likewise.
4102 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4103 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4104 (vectorizable_conversion, vectorizable_assignment): Likewise.
4105 (vectorizable_shift, vectorizable_operation): Likewise.
4106 (vectorizable_store, vect_is_simple_cond): Likewise.
4107 (vectorizable_condition, vectorizable_comparison): Likewise.
4108 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4109 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4110 and move it to the end. Cope with null def_stmt_outs.
4112 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4114 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4116 2018-06-29 Jeff Law <law@redhat.com>
4118 * config/v850/v850.c (v850_legitimate_address_p): Handle large
4119 displacements for TARGET_V850E2V3 and newer.
4120 (TARGET_LRA_P): Remove. Defaults to LRA now.
4121 * config/v850/v850.md (sign23byte_load): Remove.
4122 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4123 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4125 2018-06-29 Martin Liska <mliska@suse.cz>
4128 * coverage.c (coverage_init): Mangle full path name.
4129 * doc/invoke.texi: Document the change.
4130 * gcov-io.c (mangle_path): New.
4131 * gcov-io.h (mangle_path): Likewise.
4132 * gcov.c (mangle_name): Use mangle_path for path mangling.
4134 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4136 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4137 if starting source register is not even.
4139 2018-06-29 Martin Liska <mliska@suse.cz>
4141 PR tree-optimization/86263
4142 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4143 Make edge redirection.
4145 2018-06-29 David Malcolm <dmalcolm@redhat.com>
4147 * dumpfile.c (dump_loc): Add indentation based on scope depth.
4148 (dump_scope_depth): New variable.
4149 (get_dump_scope_depth): New function.
4150 (dump_begin_scope): New function.
4151 (dump_end_scope): New function.
4152 * dumpfile.h (get_dump_scope_depth): New declaration.
4153 (dump_begin_scope): New declaration.
4154 (dump_end_scope): New declaration.
4155 (class auto_dump_scope): New class.
4156 (AUTO_DUMP_SCOPE): New macro.
4157 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4160 2018-06-29 Richard Biener <rguenther@suse.de>
4162 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4163 compute_all_dependences succeeds.
4164 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4165 exceed --param loop-max-datarefs-for-datadeps.
4167 2018-06-29 Jakub Jelinek <jakub@redhat.com>
4169 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4171 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
4174 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4175 alternative 0 in preferred_for_speed attribute.
4177 2018-06-28 Paul Koning <ni1d@arrl.net>
4179 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4180 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4181 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4182 * config/pdp11/pdp11.md: Correct "length" attribute calculation
4183 for shift insn patterns.
4185 2018-06-28 David Malcolm <dmalcolm@redhat.com>
4187 * cgraph.c (cgraph_node::get_body): Replace assignments to
4188 "dump_file" with calls to set_dump_file.
4189 * dumpfile.c (alt_dump_file): Make static, and group with...
4190 (alt_flags): ...this definition.
4191 (dumps_are_enabled): New variable.
4192 (refresh_dumps_are_enabled): New function.
4193 (set_dump_file): New function.
4194 (set_alt_dump_file): New function.
4195 (gcc::dump_manager::dump_start): Replace assignments to
4196 "dump_file" and "alt_dump_file" with calls to set_dump_file and
4198 (gcc::dump_manager::dump_finish): Likewise.
4199 * dumpfile.h (alt_dump_file): Delete decl.
4200 (dumps_are_enabled): New variable decl.
4201 (set_dump_file): New function decl.
4202 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4204 * tree-nested.c (lower_nested_functions): Replace assignments to
4205 "dump_file" with calls to set_dump_file.
4207 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4209 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4210 goto_locus of each outgoing edge of each basic block.
4212 2018-06-28 Richard Biener <rguenther@suse.de>
4214 * dwarf2out.c (decl_scope_table): Remove.
4215 (push_decl_scope): Likewise.
4216 (pop_decl_scope): Likewise.
4217 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4218 (gen_struct_or_union_type_die): Likewise.
4219 (gen_tagged_type_die): Likewise.
4220 (dwarf2out_init): Do not initialize decl_scope_table.
4221 (dwarf2out_c_finalize): Do not free it.
4223 2018-06-28 Richard Biener <rguenther@suse.de>
4225 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4226 deciding whether to not re-use a DIE.
4228 2018-06-28 Richard Biener <rguenther@suse.de>
4230 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4231 DW_AT_abstract_origin attribute.
4233 2018-06-28 Martin Liska <mliska@suse.cz>
4235 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4236 Use newly introduced constants.
4237 * tree-switch-conversion.h (struct jump_table_cluster):
4238 Define max_ratio_for_size and max_ratio_for_speed.
4240 2018-06-28 Martin Liska <mliska@suse.cz>
4242 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4243 Add new checking assert to catch invalid state.
4244 (jump_table_cluster::can_be_handled): Handle single case
4246 (jump_table_cluster::is_beneficial): Bail out for such case.
4247 (bit_test_cluster::find_bit_tests):
4248 Add new checking assert to catch invalid state.
4249 (bit_test_cluster::can_be_handled): Handle single case
4251 (bit_test_cluster::is_beneficial): Bail out for such case.
4252 (switch_decision_tree::analyze_switch_statement):
4255 2018-06-28 Martin Liska <mliska@suse.cz>
4257 * common.opt: Introduce -completion option.
4258 * gcc.c (driver_handle_option): Handle it.
4259 (driver::main): Print completions if completion
4261 * opt-suggestions.c (option_proposer::get_completions):
4263 (option_proposer::suggest_completion): Likewise.
4264 (option_proposer::find_param_completions): Likewise.
4265 (verify_autocompletions): Likewise.
4266 (test_completion_valid_options): Likewise.
4267 (test_completion_valid_params): Likewise.
4268 (in_completion_p): Likewise.
4269 (empty_completion_p): Likewise.
4270 (test_completion_partial_match): Likewise.
4271 (test_completion_garbage): Likewise.
4272 (opt_proposer_c_tests): Likewise.
4273 * opt-suggestions.h: Declare new functions.
4274 * opts.c (common_handle_option): Handle OPT__completion_.
4275 * selftest-run-tests.c (selftest::run_tests): Add
4276 opt_proposer_c_tests.
4277 * selftest.c (assert_str_startswith): New.
4278 * selftest.h (assert_str_startswith): Likewise.
4279 (opt_proposer_c_tests): New.
4280 (ASSERT_STR_STARTSWITH): Likewise.
4282 2018-06-28 Martin Liska <mliska@suse.cz>
4284 * Makefile.in: Add opt-suggestions.o.
4285 * gcc-main.c: Include opt-suggestions.h.
4286 * gcc.c (driver::driver): Likewise.
4287 (driver::~driver): Remove m_option_suggestions.
4288 (driver::build_option_suggestions): Moved to option_proposer.
4289 (driver::suggest_option): Likewise.
4290 (driver::handle_unrecognized_options): Use option_proposer.
4291 * gcc.h (class driver): Add new memver m_option_proposer.
4292 * opt-suggestions.c: New file.
4293 * opt-suggestions.h: New file.
4295 2018-06-28 Martin Liska <mliska@suse.cz>
4297 * vec.h (class auto_string_vec): New (moved from auto_argvec).
4298 (auto_string_vec::~auto_string_vec): Likewise.
4300 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4302 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4303 prevent_decl_creation_for_types fields up and add reset_location field.
4304 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4305 statement if id->reset_location is true.
4306 (copy_edges_for_bb): Do not set goto_locus on the new edges if
4307 id->reset_location is true.
4308 (copy_phis_for_bb): Force input_location on the arguments if
4309 id->reset_location is true.
4310 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4311 is set on the function to be inlined.
4313 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
4315 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4317 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
4319 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4320 registers for Pmode.
4321 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4322 hard registers for the clobbered pseudo.
4324 2018-06-27 Paul Koning <ni1d@arrl.net>
4326 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4327 mutually exclusive options.
4328 * config/pdp11/constraints.md (h): New constraint.
4329 (O): Update definition to match shift code generation.
4330 (D): New constraint.
4331 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4333 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4335 (output_jump): Change arguments.
4336 (pdp11_fixed_cc_regs): New function.
4337 (pdp11_cc_mode): Ditto.
4338 (pdp11_expand_shift): Ditto.
4339 (pdp11_assemble_shift): Ditto.
4340 (pdp11_small_shift): Ditto.
4341 (pdp11_branch_cost): Remove.
4342 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4344 (pdp11_register_move_cost): Update for CC registers.
4345 (pdp11_rtx_costs): Add case for LSHIFTRT.
4346 (pdp11_output_jump): Add CCNZ mode conditional branches.
4347 (notice_update_cc_on_set): Remove.
4348 (pdp11_cc_mode): New function.
4349 (simple_memory_operand): Correct pre/post decrement case.
4350 (no_side_effect_operand): New function.
4351 (pdp11_regno_reg_class): Add CC_REGS class.
4352 (pdp11_fixed_cc_regs): New function.
4353 (pdp11_small_shift): New function.
4354 (pdp11_expand_shift): New function to expand shift insns.
4355 (pdp11_assemble_shift): New function to output shifts.
4356 (pdp11_branch_cost): Remove.
4357 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4358 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4359 (WCHAR_TYPE): Ditto.
4360 (PTRDIFF_TYPE): Ditto.
4361 (ADJUST_INSN_LENGTH): New macro.
4362 (FIXED_REGISTERS): Add CC registers.
4363 (CALL_USED_REGISTERS): Ditto.
4365 (REG_CLASS_NAMES): Ditto.
4366 (REG_CLASS_CONTENTS): Ditto.
4367 (SELECT_CC_MODE): Use new function.
4368 (TARGET_FLAGS_REGNUM): New macro.
4369 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4370 (cc0_reg_rtx): Remove.
4371 (CC_STATUS_MDEP): Remove.
4372 (CC_STATUS_MDEFP_INIT): Remove.
4373 (CC_IN_FPU): Remove.
4374 (NOTICE_UPDATE_CC): Remove.
4375 (REGISTER_NAMES): Add CC registers.
4376 (BRANCH_COST): Change to constant 1.
4377 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4379 * config/pdp11/pdp11.opt (mbcopy): Remove.
4380 (mbcopy-builtin): Remove.
4381 (mbranch-cheap): Remove.
4382 (mbranch-expensive): Remove.
4383 * config/pdp11/predicates.md (expand_shift_operand): Update to
4384 match shift code generation.
4385 (ccnz_operator): New predicate.
4386 * doc/invoke.texi (PDP-11 Options): Remove deleted options
4387 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4388 Remove non-existent option -mabshi, -mno-abshi. Document mutually
4390 * doc/md.texi (PDP-11): Document new D and h constraints. Update
4391 description of O constraint.
4393 2018-06-27 Jeff Law <law@redhat.com>
4394 Austin Law <austinklaw@gmail.com>
4396 * config/v850/v850.md (addsi3_set_flags): New pattern.
4397 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4398 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4399 (zero_extendhisi2_v850_set_flags): Likewise.
4400 (zero_extendqisi2_v850_set_flags): Likewise.
4401 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4402 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4403 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4405 * config/v850/v850-protos.h (notice_update_cc): Remove.
4406 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4407 (v850_print_operand): Handle 'D' and "d".
4408 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4409 Add handling of arithmetic/logical operations compared against zero.
4410 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4411 Do not look at v850_compare_op, instead get mode from last argument.
4412 (v850_gen_compare): Remove
4413 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4414 after reload for prologue insns.
4415 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4417 (construct_save_jarl): Likewise.
4418 (TARGET_FLAGS_REGNUM): Define.
4419 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4420 (NOTICE_UPDATE_CC): Remove.
4421 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4422 than cc0. Conditionalize on reload_completed.
4423 (cmpsi_insn, setfcc_insn): Likewise.
4424 (tst1 splitter): Turn into define_and_split which sets the flags
4426 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4427 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4428 (cstoresf4, cstoredf4): Clobber the flags.
4429 (cmpsi, cmpsf, cmpdf): Remove expanders.
4430 (setf_insn): Remove pattern.
4431 (addsi3): Turn into define_and_split which clobbers the flags after
4432 reload and a suitable pattern (addsi3_clobber_flags) for use after
4434 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4435 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4436 (ashrsi3, ashrsi3_v850e2): Likewise.
4437 (bins): Clobber the flags.
4438 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4439 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4440 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4441 (call_value_internal_short, call_value_internal_long): Likewise.
4442 (callt_save_interrupt, callt_return_interrupt): Likewise.
4443 (save_interrupt, return_interrupt): Likewise.
4444 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4445 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4446 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4447 (All FP comparisons): Only allow after reload has completed.
4449 (divh, divhu): Tweak output template.
4450 (branch_z_normal, branch_z_invert): Remove
4451 (branch_nz_normal, branch_nz_invert): Likewise.
4452 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4454 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4455 * config/v850/v850.c (notice_update_cc): Remove.
4456 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4457 (CC_NO_CARRY): Likewise.
4458 (NOTICE_UPDATE_CC): Define to nothing.
4459 * config/v850/v850.md: Remove block comment on cc0 handling
4460 Remove "cc" attribute from all patterns. Remove cc_status handling
4461 from all patterns. Minor formatting fixes.
4463 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4465 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4466 (cortex-a76.cortex-a55): Likewise.
4467 * config/aarch64/aarch64-tune.md: Regenerate.
4468 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4469 cortex-a76.cortex-a55.
4471 2018-06-27 Jeff Law <law@redhat.com>
4473 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4474 (MULTILIB_DIRNAMES): Similarly.
4476 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4478 * gimple.h (gimple_return_retbnd): Delete.
4479 (gimple_return_set_retbnd): Likewise.
4480 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4481 gimple_return_set_retbnd.
4482 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4483 gimple_return_retbnd and adjust.
4484 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4485 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4486 Explicitly return NULL in a couple more cases. Move assertion
4487 on debug statements and remove unreachable code.
4488 (reset_debug_binding): Do not test id->retbnd.
4489 (expand_call_inline): Do not set it.
4491 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4493 * configure.ac: Add --disable-gcov option.
4494 * configure: Regenerate.
4495 * Makefile.in: Honour @enable_gcov@.
4496 * doc/install.texi: Document --disable-gcov.
4498 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4500 * config/arm/arm-cpus.in (cortex-a76): New entry.
4501 (cortex-a76.cortex-a55): Likewise.
4502 * config/arm/arm-tables.opt: Regenerate.
4503 * config/arm/arm-tune.md: Likewise.
4504 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4505 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4506 cortex-a76.cortex-a55.
4508 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4511 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4513 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4515 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4517 (EPILOGUE_USES): Likewise.
4519 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4521 * tree-inline.c (remap_location): New function extracted from...
4522 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4523 (copy_phis_for_bb): ...here. Call remap_location.
4524 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4526 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4528 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4529 unaligned vsx for 16B memset.
4531 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4534 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4535 ieee128_float_type_node to long_double_type_node unless
4536 TARGET_LONG_DOUBLE_128 is set.
4538 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4540 * cfgloop.c (get_loop_location): Convert return type from
4541 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4542 by implicit construction from rtx_insn *, and using
4543 dump_user_location_t::from_function_decl for the fallback case.
4544 * cfgloop.h (get_loop_location): Convert return type from
4545 location_t to dump_user_location_t.
4546 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4547 dump_printf_loc to pass in a dump_location_t rather than a
4548 location_t, via the gimple stmt.
4549 * coverage.c (get_coverage_counts): Update calls to
4550 dump_printf_loc to pass in dump_location_t rather than a
4552 * doc/optinfo.texi (Dump types): Convert example of
4553 dump_printf_loc from taking "locus" to taking "insn". Update
4554 description of the "_loc" calls to cover dump_location_t.
4555 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4557 (dump_user_location_t::dump_user_location_t): New constructors,
4558 from gimple *stmt and rtx_insn *.
4559 (dump_user_location_t::from_function_decl): New function.
4560 (dump_loc): Make static.
4561 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4562 const dump_location_t &.
4563 (dump_generic_expr_loc): Delete.
4564 (dump_printf_loc): Convert param "loc" from location_t to
4565 const dump_location_t &.
4566 (selftest::test_impl_location): New function.
4567 (selftest::dumpfile_c_tests): New function.
4568 * dumpfile.h: Include "profile-count.h".
4569 (class dump_user_location_t): New class.
4570 (struct dump_impl_location_t): New struct.
4571 (class dump_location_t): New class.
4572 (dump_printf_loc): Convert 2nd param from source_location to
4573 const dump_location_t &.
4574 (dump_generic_expr_loc): Delete.
4575 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4576 const dump_location_t &.
4577 * gimple-fold.c (fold_gimple_assign): Update call to
4578 dump_printf_loc to pass in a dump_location_t rather than a
4579 location_t, via the gimple stmt.
4580 (gimple_fold_call): Likewise.
4581 * gimple-loop-interchange.cc
4582 (loop_cand::analyze_iloop_reduction_var): Update for change to
4583 check_reduction_path.
4584 (tree_loop_interchange::interchange): Update for change to
4586 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4587 change in return-type of find_loop_location.
4588 (graphite_regenerate_ast_isl): Likewise.
4589 * graphite-optimize-isl.c (optimize_isl): Likewise.
4590 * graphite.c (graphite_transform_loops): Likewise.
4591 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4592 pass in a dump_location_t rather than a location_t, via the
4594 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4595 * ipa.c (walk_polymorphic_call_targets): Likewise.
4596 * loop-unroll.c (report_unroll): Convert "locus" param from
4597 location_t to dump_location_t.
4598 (decide_unrolling): Update for change to get_loop_location's
4600 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4601 location_t to dump_user_location_t.
4602 (grid_find_single_omp_among_assignments_1): Updates calls to
4603 dump_printf_loc to pass in a dump_location_t rather than a
4604 location_t, via the gimple stmt.
4605 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4606 location_t to dump_location_t. Updates calls to dump_printf_loc
4607 to pass in a dump_location_t rather than a location_t, via the
4609 (grid_inner_loop_gridifiable_p): Likewise.
4610 (grid_dist_follows_simple_pattern): Likewise.
4611 (grid_gfor_follows_tiling_pattern): Likewise.
4612 (grid_target_follows_gridifiable_pattern): Likewise.
4613 (grid_attempt_target_gridification): Convert initialization
4614 of local "grid" from memset to zero-initialization; FIXME: does
4615 this require C++11? Update call to dump_printf_loc to pass in a
4616 optinfo_location rather than a location_t, via the gimple stmt.
4617 * profile.c (read_profile_edge_counts): Updates call to
4618 dump_printf_loc to pass in a dump_location_t rather than a
4620 (compute_branch_probabilities): Likewise.
4621 * selftest-run-tests.c (selftest::run_tests): Call
4623 * selftest.h (dumpfile_c_tests): New decl.
4624 * tree-loop-distribution.c (pass_loop_distribution::execute):
4625 Update for change in return type of find_loop_location.
4626 * tree-parloops.c (parallelize_loops): Likewise.
4627 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4628 "locus" from location_t to dump_user_location_t.
4629 (canonicalize_loop_induction_variables): Likewise.
4630 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4631 for change in return type of find_loop_location.
4632 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4633 to dump_printf_loc to pass in a dump_location_t rather than a
4634 location_t, via the stmt.
4635 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4637 * tree-vect-loop-manip.c (find_loop_location): Convert return
4638 type from source_location to dump_user_location_t.
4639 (vect_do_peeling): Update for above change.
4640 (vect_loop_versioning): Update for change in type of
4642 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4643 from location_t to dump_user_location_t.
4644 (vect_estimate_min_profitable_iters): Update for change in type
4646 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4647 location_t to dump_location_t.
4648 (vect_slp_bb): Update for change in type of vect_location.
4649 * tree-vectorizer.c (vect_location): Convert from source_location
4650 to dump_user_location_t.
4651 (try_vectorize_loop_1): Update for change in vect_location's type.
4652 (vectorize_loops): Likewise.
4653 (increase_alignment): Likewise.
4654 * tree-vectorizer.h (vect_location): Convert from source_location
4655 to dump_user_location_t.
4656 (find_loop_location): Convert return type from source_location to
4657 dump_user_location_t.
4658 (check_reduction_path): Convert 1st param from location_t to
4659 dump_user_location_t.
4660 * value-prof.c (check_counter): Update call to dump_printf_loc to
4661 pass in a dump_user_location_t rather than a location_t; update
4662 call to error_at for change in type of "locus".
4663 (check_ic_target): Update call to dump_printf_loc to
4664 pass in a dump_user_location_t rather than a location_t, via the
4667 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4669 * config/s390/s390.h (enum processor_flags): Do not use
4670 default tune parameter when -march was specified.
4672 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4675 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4676 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4679 2018-06-26 Richard Biener <rguenther@suse.de>
4681 PR tree-optimization/86287
4683 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4684 (vect_analyze_loop): Initialize n_stmts.
4686 2018-06-26 Richard Biener <rguenther@suse.de>
4689 * fold-const.c (fold_convertible_p): Pointer extension
4692 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4695 * dwarf2out.c (loc_list_has_views): Adjust comments.
4696 (dw_loc_list): Split single cross-partition range with
4699 2018-06-25 Jeff Law <law@redhat.com>
4701 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4702 on -mbig-switch by default.
4704 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4706 (const_float_0_operand): Remove unused predicate.
4707 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4708 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4709 (recipsf2): New expander. Original pattern now called
4711 (recipdf2, recipdf2_insn): Similarly.
4712 (rsqrtsf2, rsqrtsf2_insn): Similarly
4713 (rsqrtdf2, rsqrtdf2_insn): Similarly
4715 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4717 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4718 Simplify logic for FreeBSD (twice).
4720 2018-06-25 Martin Sebor <msebor@redhat.com>
4722 PR tree-optimization/86204
4723 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4724 a strnlen result if it's less than the length of the string.
4726 2018-06-25 Martin Sebor <msebor@redhat.com>
4728 PR tree-optimization/85700
4729 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4730 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4731 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4733 2018-06-25 Martin Sebor <msebor@redhat.com>
4735 * doc/extend.texi (Zero-length arrays): Update and clarify.
4737 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4739 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4740 added IEEE/IBM long double multilib support on PowerPC little
4741 endian Linux systems.
4742 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4743 (MULTILIB_DEFAULTS): Likewise.
4744 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4746 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4747 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4748 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4750 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4753 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4754 (REORDER_45): Likewise.
4756 2018-06-25 Jeff Law <law@redhat.com>
4758 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4759 dividend to 32 bits. Adjust length.
4760 (udivmodhi4): Cleanup output template. Fix length.
4762 2018-06-25 Carl Love <cel@us.ibm.com>
4764 * config/rs6000/vsx.md: Change word selector to prefered location.
4766 2018-06-25 Richard Biener <rguenther@suse.de>
4768 PR tree-optimization/86304
4769 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4770 epilogue-if-converted loops as well.
4772 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4774 * lto-section-out.c (lto_begin_section): Do not print section
4775 name for noaddr and unnumbered dumps.
4777 2018-06-25 Richard Biener <rguenther@suse.de>
4779 * tree-vectorizer.h (struct vec_info_shared): New structure
4780 with parts split out from struct vec_info and loop_nest from
4781 struct _loop_vec_info.
4782 (struct vec_info): Adjust accordingly.
4783 (struct _loop_vec_info): Likewise.
4784 (LOOP_VINFO_LOOP_NEST): Adjust.
4785 (LOOP_VINFO_DATAREFS): Likewise.
4786 (LOOP_VINFO_DDRS): Likewise.
4787 (struct _bb_vec_info): Likewise.
4788 (BB_VINFO_DATAREFS): Likewise.
4789 (BB_VINFO_DDRS): Likewise.
4790 (struct _stmt_vec_info): Add dr_aux member.
4791 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4792 (DR_MISALIGNMENT_UNINITIALIZED): New.
4793 (set_dr_misalignment): Adjust.
4794 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4795 (vect_analyze_loop): Adjust prototype.
4796 (vect_analyze_loop_form): Likewise.
4797 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4798 Compute dependences lazily.
4799 (vect_record_base_alignments): Use shared datarefs/ddrs.
4800 (vect_verify_datarefs_alignment): Likewise.
4801 (vect_analyze_data_refs_alignment): Likewise.
4802 (vect_analyze_data_ref_accesses): Likewise.
4803 (vect_analyze_data_refs): Likewise.
4804 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4805 constructor parameter for shared part.
4806 (vect_analyze_loop_form): Pass in shared part and adjust.
4807 (vect_analyze_loop_2): Pass in storage for the number of
4808 stmts. Move loop nest finding to the caller. Compute
4810 (vect_analyze_loop): Pass in shared part.
4811 (vect_transform_loop): Verify shared datarefs are unchanged.
4812 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4813 constructor parameter for shared part.
4814 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4815 (vect_slp_bb): Verify shared datarefs are unchanged before
4817 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4819 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4820 DR_MISALIGNMENT_UNINITIALIZED.
4821 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4822 parameter for shared part.
4823 (vec_info::~vec_info): Adjust.
4824 (vec_info_shared::vec_info_shared): New.
4825 (vec_info_shared::~vec_info_shared): Likewise.
4826 (vec_info_shared::save_datarefs): Likewise.
4827 (vec_info_shared::check_datarefs): Likewise.
4828 (try_vectorize_loop_1): Construct shared part live for analyses
4829 of a single loop for multiple vector sizes.
4830 * tree-parloops.c (gather_scalar_reductions): Adjust.
4832 2018-06-25 Richard Biener <rguenther@suse.de>
4834 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4835 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4836 (vect_analyze_data_refs): Remove similar code from here and
4837 simplify accordingly.
4839 2018-06-25 Richard Biener <rguenther@suse.de>
4841 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4842 for reverse storage order accesses rather than asserting
4843 they cannot happen here.
4845 2018-06-25 Tom de Vries <tdevries@suse.de>
4848 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4849 Use data16 instead of .byte for insn prefix.
4851 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4854 * parser.c (make_char_string_pack): Pass this literal chars
4855 through cpp_interpret_string.
4856 (cp_parser_userdef_numeric_literal): Check the result of
4857 make_char_string_pack.
4859 2018-06-24 Maya Rashish <coypu@sdf.org>
4861 * ginclude/stddef.h: Simplify conditions around avoiding
4862 re-definition of __size_t.
4864 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4866 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4867 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4869 2018-06-22 Maya Rashish <coypu@sdf.org>
4871 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4872 made to OpenBSD and NetBSD through the years.
4874 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4876 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4877 behavior of vec_pack (vector double, vector double) to match
4878 behavior of vec_float2 (vector double, vector double).
4880 2018-06-22 Olivier Hainque <hainque@adacore.com>
4882 * gimplify.c (gimplify_function_tree): Prevent creation
4883 of a trampoline for the address of the current function
4884 passed to entry/exit instrumentation hooks.
4886 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4889 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4892 2018-06-22 Martin Liska <mliska@suse.cz>
4894 PR tree-optimization/86263
4895 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4896 Bail out if is_enabled is false.
4897 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4899 (jump_table_cluster::is_enabled): New function.
4901 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4903 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4904 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4905 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4906 (lto_input_ts_binfo_tree_pointers): Likewise.
4907 * tree-streamer-out.c (streamer_write_tree_bitfields,
4908 write_ts_binfo_tree_pointers): Likewise.
4909 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4911 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4913 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4915 2018-06-22 Martin Liska <mliska@suse.cz>
4917 * symbol-summary.h (get): Make it pure and inline move
4918 functionality from ::get function.
4919 (get): Remove and inline into ::get and ::get_create.
4920 (get_create): Move code from ::get function.
4922 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4925 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4926 -x assembler-with-cpp.
4928 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4930 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4931 _FILE_OFFSET_BITS=64 for C++.
4933 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4935 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4936 conversion insn that shows up when pr85657-3.c is compiled using
4937 IEEE 128-bit long double.
4938 (neg<mode>2_internal): Use the correct mode to check whether the
4939 mode is IBM extended.
4940 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4941 multiply and divide external functions from being created more
4944 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4946 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4948 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4949 the edge can be forwarded.
4950 (cfg_layout_merge_blocks): Likewise.
4952 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4954 * except.c (finish_eh_generation): Commit edge insertions only after
4955 the EH edges have been redirected from post-landing to landing pads.
4957 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4959 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4960 create_tmp_var_for to create the FRAME decl.
4961 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4963 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4965 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4966 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4967 debug statement when resetting its value.
4968 (expand_call_inline): Copy the locus of the call onto the assignment
4969 of the return value, if any. Use local variable in more cases.
4971 2018-06-21 Martin Liska <mliska@suse.cz>
4973 * ipa-pure-const.c (propagate_nothrow): Use
4974 funct_state_summaries->get.
4975 (dump_malloc_lattice): Likewise.
4976 (propagate_malloc): Likewise.
4978 2018-06-21 Richard Biener <rguenther@suse.de>
4980 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4981 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4982 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4984 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4985 BLOCK_ABSTRACT_ORIGIN unconditionally.
4987 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4989 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4991 * ipa-reference.c (ipa_reference_c_finalize): Delete
4992 ipa_ref_opt_sum_summaries and set it to NULL.
4994 2018-06-21 Tom de Vries <tdevries@suse.de>
4996 PR tree-optimization/85859
4997 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4998 test with comment from bb_no_side_effects_p.
5000 2018-06-21 Richard Biener <rguenther@suse.de>
5002 PR tree-optimization/86232
5003 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5004 max for constant niter.
5006 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5008 * config/aarch64/aarch64-simd.md
5009 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5011 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5013 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5014 Make opernads of the unspec commutative.
5016 2018-06-21 Richard Biener <rguenther@suse.de>
5018 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5019 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5020 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5021 (vect_analyze_data_ref_dependence): Re-order checks to deal with
5023 (vect_record_base_alignments): Do not record base alignment
5024 for gathers or scatters.
5025 (vect_compute_data_ref_alignment): Drop return value that is always
5026 true. Bail out early for gathers or scatters.
5027 (vect_enhance_data_refs_alignment): Bail out early for gathers
5029 (vect_find_same_alignment_drs): Likewise.
5030 (vect_analyze_data_refs_alignment): Remove dead code.
5031 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5032 (vect_analyze_data_refs): For possible gathers or scatters do
5033 not create an alternate DR, just check their possible validity
5034 and mark them. Adjust DECL_NONALIASED handling to not rely
5036 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5037 update inits of gathers or scatters.
5038 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5039 Also copy gather/scatter flag to pattern vinfo.
5041 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
5043 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5044 behavior of vec_packsu (vector unsigned long long, vector unsigned
5045 long long) to match behavior of vec_packs with same signature.
5047 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5048 Thomas Schwinge <thomas@codesourcery.com>
5049 Cesar Philippidis <cesar@codesourcery.com>
5051 * gimplify.c (gimplify_scan_omp_clauses): Add support for
5052 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5053 (gimplify_adjust_omp_clauses): Likewise.
5054 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5055 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5056 (gimplify_omp_target_update): Update handling of acc update and
5058 * omp-low.c (install_var_field): Remove unused parameter
5059 base_pointers_restrict.
5060 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5061 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5063 (omp_target_base_pointers_restrict_p): Delete.
5064 (scan_omp_target): Update call to scan_sharing_clauses.
5065 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5067 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5068 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5069 (convert_local_omp_clauses): Likewise.
5070 * tree-pretty-print.c (dump_omp_clause): Likewise.
5071 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
5073 (omp_clause_code_name): Likewise.
5075 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5078 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5081 PR tree-optimization/86231
5082 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
5083 anti-range don't overwrite *vr0min before using it to compute *vr0max.
5085 2018-06-20 Tom de Vries <tdevries@suse.de>
5087 PR tree-optimization/86097
5088 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5089 iv type if signedness of iv type is not the same as that of *nit.
5091 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5093 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
5094 EDGE_EH edges, verify they are all EDGE_EH.
5096 2018-06-20 Maya Rashish <coypu@sdf.org>
5098 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5100 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5102 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5103 * config/aarch64/aarch64.c (xgene1_tunings): Add
5104 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5105 (aarch64_mode_valid_for_sched_fusion_p):
5106 Allow 16-byte modes.
5107 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5108 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5110 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5112 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5113 * config/aarch64/iterators.md (VQ2): New mode iterator.
5115 2018-06-20 Martin Liska <mliska@suse.cz>
5117 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5118 Change default ratio from 10 to 8.
5120 2018-06-20 Martin Liska <mliska@suse.cz>
5122 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5124 (bit_test_cluster::find_bit_tests): Likewise.
5125 (switch_decision_tree::analyze_switch_statement): Find clusters.
5126 * tree-switch-conversion.h (struct jump_table_cluster): Document
5129 2018-06-20 Martin Liska <mliska@suse.cz>
5131 * tree-switch-conversion.c (switch_conversion::collect):
5132 Record m_uniq property.
5133 (switch_conversion::expand): Bail out for special conditions.
5134 (group_cluster::~group_cluster): New.
5135 (group_cluster::group_cluster): Likewise.
5136 (group_cluster::dump): Likewise.
5137 (jump_table_cluster::emit): New.
5138 (switch_decision_tree::fix_phi_operands_for_edges): New.
5139 (struct case_node): Remove struct.
5140 (jump_table_cluster::can_be_handled): New.
5141 (case_values_threshold): Moved to header.
5142 (reset_out_edges_aux): Likewise.
5143 (jump_table_cluster::is_beneficial): New.
5144 (bit_test_cluster::can_be_handled): Likewise.
5145 (add_case_node): Remove.
5146 (bit_test_cluster::is_beneficial): New.
5147 (case_bit_test::cmp): New.
5148 (bit_test_cluster::emit): New.
5149 (expand_switch_as_decision_tree_p): Remove.
5150 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5151 (fix_phi_operands_for_edge): Likewise.
5152 (switch_decision_tree::analyze_switch_statement): New.
5153 (compute_cases_per_edge): Move ...
5154 (switch_decision_tree::compute_cases_per_edge): ... here.
5155 (try_switch_expansion): Likewise.
5156 (switch_decision_tree::try_switch_expansion): Likewise.
5157 (record_phi_operand_mapping): Likewise.
5158 (switch_decision_tree::record_phi_operand_mapping): Likewise.
5159 (emit_case_decision_tree): Likewise.
5160 (switch_decision_tree::emit): Likewise.
5161 (balance_case_nodes): Likewise.
5162 (switch_decision_tree::balance_case_nodes): Likewise.
5163 (dump_case_nodes): Likewise.
5164 (switch_decision_tree::dump_case_nodes): Likewise.
5165 (emit_jump): Likewise.
5166 (switch_decision_tree::emit_jump): Likewise.
5167 (emit_cmp_and_jump_insns): Likewise.
5168 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5169 (emit_case_nodes): Likewise.
5170 (switch_decision_tree::emit_case_nodes): Likewise.
5171 (conditional_probability): Remove.
5172 * tree-switch-conversion.h (enum cluster_type): New.
5174 (struct cluster): Likewise.
5175 (cluster::cluster): Likewise.
5176 (struct simple_cluster): Likewise.
5177 (simple_cluster::simple_cluster): Likewise.
5178 (struct group_cluster): Likewise.
5179 (struct jump_table_cluster): Likewise.
5180 (struct bit_test_cluster): Likewise.
5181 (struct min_cluster_item): Likewise.
5182 (struct case_tree_node): Likewise.
5183 (case_tree_node::case_tree_node): Likewise.
5184 (jump_table_cluster::case_values_threshold): Likewise.
5185 (struct case_bit_test): Likewise.
5186 (struct switch_decision_tree): Likewise.
5187 (struct switch_conversion): Likewise.
5188 (switch_decision_tree::reset_out_edges_aux): Likewise.
5190 2018-06-20 Martin Liska <mliska@suse.cz>
5192 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5193 (hoist_edge_and_branch_if_true): Likewise.
5194 (expand_switch_using_bit_tests_p): Likewise.
5195 (struct case_bit_test): Likewise.
5196 (case_bit_test_cmp): Likewise.
5197 (emit_case_bit_tests): Likewise.
5198 (switch_conversion::switch_conversion): New class.
5199 (struct switch_conv_info): Remove old struct.
5200 (collect_switch_conv_info): More to ...
5201 (switch_conversion::collect): ... this.
5202 (check_range): Likewise.
5203 (switch_conversion::check_range): Likewise.
5204 (check_all_empty_except_final): Likewise.
5205 (switch_conversion::check_all_empty_except_final): Likewise.
5206 (check_final_bb): Likewise.
5207 (switch_conversion::check_final_bb): Likewise.
5208 (create_temp_arrays): Likewise.
5209 (switch_conversion::create_temp_arrays): Likewise.
5210 (free_temp_arrays): Likewise.
5211 (gather_default_values): Likewise.
5212 (switch_conversion::gather_default_values): Likewise.
5213 (build_constructors): Likewise.
5214 (switch_conversion::build_constructors): Likewise.
5215 (constructor_contains_same_values_p): Likewise.
5216 (switch_conversion::contains_same_values_p): Likewise.
5217 (array_value_type): Likewise.
5218 (switch_conversion::array_value_type): Likewise.
5219 (build_one_array): Likewise.
5220 (switch_conversion::build_one_array): Likewise.
5221 (build_arrays): Likewise.
5222 (switch_conversion::build_arrays): Likewise.
5223 (gen_def_assigns): Likewise.
5224 (switch_conversion::gen_def_assigns): Likewise.
5225 (prune_bbs): Likewise.
5226 (switch_conversion::prune_bbs): Likewise.
5227 (fix_phi_nodes): Likewise.
5228 (switch_conversion::fix_phi_nodes): Likewise.
5229 (gen_inbound_check): Likewise.
5230 (switch_conversion::gen_inbound_check): Likewise.
5231 (process_switch): Use the newly created class.
5232 (switch_conversion::expand): New.
5233 (switch_conversion::~switch_conversion): New.
5234 * tree-switch-conversion.h: New file.
5236 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5238 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5239 tree-vect-patterns.c.
5240 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5241 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
5242 (vect_recog_sad_pattern): Likewise.
5243 (vect_recog_widen_sum_pattern): Likewise.
5244 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
5245 (vect_recog_widen_shift_pattern): Remove the type_in argument.
5246 (vect_recog_rotate_pattern): Likewise.
5247 (vect_recog_mult_pattern): Likewise.
5248 (vect_recog_vector_vector_shift_pattern): Likewise.
5249 (vect_recog_divmod_pattern): Likewise.
5250 (vect_recog_mixed_size_cond_pattern): Likewise.
5251 (vect_recog_bool_pattern): Likewise.
5252 (vect_recog_mask_conversion_pattern): Likewise.
5253 (vect_try_gather_scatter_pattern): Likewise.
5254 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
5255 (vect_recog_over_widening_pattern): Likewise.
5256 (vect_recog_gather_scatter_pattern): Likewise.
5257 (vect_recog_func_ptr): Move from tree-vectorizer.h
5258 (vect_vect_recog_func_ptrs): Move further down the file.
5259 (vect_recog_func): Likewise. Remove the third argument.
5260 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5261 (vect_pattern_recog_1): Expect the pattern function to do any
5262 necessary target tests. Also expect it to provide a vector type.
5263 Remove the type_in handling.
5265 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5267 * tree-vect-patterns.c (vect_pattern_detected): New function.
5268 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5269 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5270 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5271 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5272 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5273 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5274 (vect_recog_mask_conversion_pattern)
5275 (vect_try_gather_scatter_pattern): Likewise.
5277 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5279 * tree-vect-patterns.c (vect_get_internal_def): New function.
5280 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5281 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5282 (search_type_for_mask_1): Use it.
5284 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5286 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5287 redundant WIDEN_SUM_EXPR handling.
5288 (vect_recog_sad_pattern): Likewise.
5290 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5292 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5293 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5294 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5295 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5296 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5298 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5300 * tree-vect-stmts.c (vectorizable_call): Make sure that we
5301 use the stmt_vec_info of the original bb statement for the
5302 new zero assignment, even if the call is part of a pattern.
5304 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5306 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5307 that the sequence is attached to the original statement rather
5308 than the pattern statement.
5309 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5310 PATTERN_DEF_SEQ from the original statement rather than
5311 the main pattern statement.
5312 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5313 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5314 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5316 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5318 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5319 definition statements before the early exit for statements that aren't
5321 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5323 (vect_transform_loop): ...here. Process pattern definition
5324 statements without first checking whether the main pattern
5325 statement is live or relevant.
5327 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5329 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5330 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5332 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
5334 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5335 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5336 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5337 (expand_block_compare): Change select_block_compare_mode call.
5338 (expand_strncmp_align_check): Use new functions, fix comment.
5339 (emit_final_str_compare_gpr): New function.
5340 (expand_strn_compare): Refactor and clean up code.
5341 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5343 2018-06-19 Tony Reix <tony.reix@atos.com>
5344 Damien Bergamini <damien.bergamini@atos.com>
5345 David Edelsohn <dje.gcc@gmail.com>
5347 * collect2.c (static_obj): New variable.
5348 (static_libs): New variable.
5349 (is_in_list): Uncomment declaration.
5350 (main): Track AIX libraries linked statically.
5351 (is_in_list): Uncomment definition.
5352 (scan_prog_file): Don't add AIX shared libraries initializer
5353 to constructor list if linking statically.
5355 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
5357 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5359 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5361 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
5363 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5366 2018-06-19 Martin Liska <mliska@suse.cz>
5368 * config/i386/i386.c (ix86_can_inline_p): Do not use
5369 ipa_fn_summaries::get_create.
5370 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5372 (devirtualization_time_bonus): Likewise.
5373 (ipcp_propagate_stage): Likewise.
5374 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5375 (edge_set_predicate): Likewise.
5376 (evaluate_conditions_for_known_args): Likewise.
5377 (evaluate_properties_for_edge): Likewise.
5378 (ipa_call_summary::reset): Tranform to ...
5379 (ipa_call_summary::~ipa_call_summary): ... this.
5380 (ipa_fn_summary::reset): Transform to ...
5381 (ipa_fn_summary::~ipa_fn_summary): ... this.
5382 (ipa_fn_summary_t::remove): Rename to ...
5383 (ipa_fn_summary_t::remove_callees): ... this.
5384 (ipa_fn_summary_t::duplicate): Use placement new
5385 instead of memory copy.
5386 (ipa_call_summary_t::duplicate): Likewise.
5387 (ipa_call_summary_t::remove): Remove.
5388 (dump_ipa_call_summary): Change get_create to get.
5389 (ipa_dump_fn_summary): Dump only when summary exists.
5390 (analyze_function_body): Use symbol_summary::get instead
5392 (compute_fn_summary): Likewise.
5393 (estimate_edge_devirt_benefit): Likewise.
5394 (estimate_edge_size_and_time): Likewise.
5395 (inline_update_callee_summaries): Likewise.
5396 (remap_edge_change_prob): Likewise.
5397 (remap_edge_summaries): Likewise.
5398 (ipa_merge_fn_summary_after_inlining): Likewise.
5399 (write_ipa_call_summary): Likewise.
5400 (ipa_fn_summary_write): Likewise.
5401 (ipa_free_fn_summary): Likewise.
5402 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5403 (struct ipa_call_summary): Likewise.
5404 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5406 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5407 (estimate_size_after_inlining): Likewise.
5408 (estimate_growth): Likewise.
5409 (growth_likely_positive): Likewise.
5410 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5411 (inline_call): Likewise.
5412 * ipa-inline.c (caller_growth_limits): Likewise.
5413 (can_inline_edge_p): Likewise.
5414 (can_inline_edge_by_limits_p): Likewise.
5415 (compute_uninlined_call_time): Likewise.
5416 (compute_inlined_call_time): Likewise.
5417 (want_inline_small_function_p): Likewise.
5418 (edge_badness): Likewise.
5419 (update_caller_keys): Likewise.
5420 (update_callee_keys): Likewise.
5421 (inline_small_functions): Likewise.
5422 (inline_to_all_callers_1): Likewise.
5423 (dump_overall_stats): Likewise.
5424 (early_inline_small_functions): Likewise.
5425 (early_inliner): Likewise.
5426 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5427 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5428 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5429 * ipa-split.c (execute_split_functions): Likewise.
5430 * symbol-summary.h: Likewise.
5431 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5433 2018-06-19 Richard Biener <rguenther@suse.de>
5435 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5436 (vectorize_loops): ... here. Fix dbgcnt handling.
5437 (try_vectorize_loop): Wrap try_vectorize_loop_1.
5439 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5442 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5443 ieee128 argument takes up only one (vector) register, not two (floating
5446 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5448 * gimplify.c (gimplify_init_constructor): Really never clear for an
5449 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5451 2018-06-19 Richard Biener <rguenther@suse.de>
5453 PR tree-optimization/86179
5454 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5455 after failed recognition.
5457 2018-06-18 Martin Sebor <msebor@redhat.com>
5460 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5461 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5462 Handle integer subtraction.
5463 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5464 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5466 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5468 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5469 param from rtx to rtx_insn *.
5470 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5472 (frv_ifcvt_modify_insn): Likwise.
5473 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5474 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5475 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5476 as_a <rtx_insn *> cast to local "unprotected_region" once
5477 it's been established that it's not NULL or pc_rtx.
5478 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5479 param "sethi" from rtx to rtx_insn *.
5480 (nds32_group_float_insns): Likewise for param "insn".
5481 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5483 (vax_output_int_subtract): Likewise.
5484 * config/vax/vax.c (vax_output_int_add): Likewise for param
5486 (vax_output_int_subtract): Likewise.
5487 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5488 (emit_pattern_after): Likewise for param "after".
5489 (emit_insn_after): Likewise.
5490 (emit_jump_insn_after): Likewise.
5491 (emit_call_insn_after): Likewise.
5492 (emit_debug_insn_after): Likewise.
5493 (emit_pattern_before): Likewise for param "before".
5494 (emit_insn_before): Likewise.
5495 (emit_jump_insn_before): Likewise.
5496 * final.c (get_insn_template): Likewise for param "insn", removing
5498 * output.h (get_insn_template): Likewise for 2nd param.
5499 * rtl.h (emit_insn_before): Likewise.
5500 (emit_jump_insn_before): Likewise.
5501 (emit_debug_insn_before_noloc): Likewise.
5502 (emit_insn_after): Likewise.
5503 (emit_jump_insn_after): Likewise.
5504 (emit_call_insn_after): Likewise.
5505 (emit_debug_insn_after): Likewise.
5506 (set_insn_deleted): Likewise for param.
5508 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5511 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5512 floating point modes, so that IFmode is numerically greater than
5513 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5514 to declare the ordering. This prevents IFmode from being
5515 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5516 machine. Include rs6000-modes.h to share the fractional values
5517 between genmodes* and the rest of the compiler.
5521 * config/rs6000/rs6000-modes.h: New file.
5522 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5523 meaning of rs6000_long_double_size so that 126..128 selects an
5524 appropriate 128-bit floating point type.
5525 (rs6000_option_override_internal): Likewise.
5526 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5527 (TARGET_LONG_DOUBLE_128): Change the meaning of
5528 rs6000_long_double_size so that 126..128 selects an appropriate
5529 128-bit floating point type.
5530 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5531 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5532 source and destination to match the standard usage.
5533 (truncifkf2): Likewise.
5534 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5535 ISA 2.07 to use an explicit clobber, instead of passing in a
5537 (copysign<mode>3_soft): Likewise.
5539 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5541 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5542 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5543 (vect_slp_analyze_instance_dependence): Likewise.
5544 (vect_enhance_data_refs_alignment): Likewise.
5545 (vect_analyze_data_refs_alignment): Likewise.
5546 (vect_slp_analyze_and_verify_instance_alignment
5547 (vect_analyze_data_ref_accesses): Likewise.
5548 (vect_prune_runtime_alias_test_list): Likewise.
5549 (vect_analyze_data_refs): Likewise.
5550 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5551 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5552 (vect_analyze_scalar_cycles_1): Likewise.
5553 (vect_get_loop_niters): Likewise.
5554 (vect_analyze_loop_form_1): Likewise.
5555 (vect_update_vf_for_slp): Likewise.
5556 (vect_analyze_loop_operations): Likewise.
5557 (vect_analyze_loop): Likewise.
5558 (vectorizable_induction): Likewise.
5559 (vect_transform_loop): Likewise.
5560 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5561 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5562 (vect_make_slp_decision): Likewise.
5563 (vect_detect_hybrid_slp): Likewise.
5564 (vect_slp_analyze_operations): Likewise.
5565 (vect_slp_bb): Likewise.
5566 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5567 (vectorizable_bswap): Likewise.
5568 (vectorizable_call): Likewise.
5569 (vectorizable_simd_clone_call): Likewise.
5570 (vectorizable_conversion): Likewise.
5571 (vectorizable_assignment): Likewise.
5572 (vectorizable_shift): Likewise.
5573 (vectorizable_operation): Likewise.
5574 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5576 2018-06-18 Martin Sebor <msebor@redhat.com>
5578 PR tree-optimization/81384
5579 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5580 * builtins.c (expand_builtin_strnlen): New function.
5581 (expand_builtin): Call it.
5582 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5583 * builtins.def (BUILT_IN_STRNLEN): New.
5584 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5585 Warn for bounds in excess of maximum object size.
5586 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5587 single-value ranges. Handle strnlen.
5588 (handle_builtin_strlen): Handle strnlen.
5589 (strlen_check_and_optimize_stmt): Same.
5590 * doc/extend.texi (Other Builtins): Document strnlen.
5592 2018-06-18 Maya Rashish <coypu@sdf.org>
5594 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5595 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5596 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5598 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5600 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5602 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5604 * tree.c (escaped_string::escape): Replace cast to char * by
5605 const_cast<char *> (unescaped).
5607 2018-06-18 Nick Clifton <nickc@redhat.com>
5610 * tree.c (escaped_string): New class. Converts an unescaped
5611 string into its escaped equivalent.
5612 (warn_deprecated_use): Use the new class to convert the
5613 deprecation message, if present.
5614 (test_escaped_strings): New self test.
5615 (test_c_tests): Add test_escaped_strings.
5616 * doc/extend.texi (deprecated): Add a note that the
5617 deprecation message is affected by the -fmessage-length
5618 option, and that control characters will be escaped.
5619 (#pragma GCC error): Document this pragma.
5620 (#pragma GCC warning): Likewise.
5621 * doc/invoke.texi (-fmessage-length): Document this option's
5622 effect on the #warning and #error preprocessor directives and
5623 the deprecated attribute.
5625 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5627 * tree.c (decl_value_expr_lookup): Revert latest change.
5628 (decl_value_expr_insert): Likewise.
5630 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5632 * gimplify.c (nonlocal_vlas): Delete.
5633 (nonlocal_vla_vars): Likewise.
5634 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5636 (gimplify_body): Do not create and destroy nonlocal_vlas.
5637 * tree-nested.c: Include diagnostic.h.
5638 (use_pointer_in_frame): Tweak.
5639 (lookup_field_for_decl): Add assertion and declare the transformation.
5640 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5641 internal error when the reference is in a wrong context. Do not
5642 create a debug decl by default.
5643 (note_nonlocal_block_vlas): Delete.
5644 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5645 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5646 create a debug decl by default.
5647 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5648 call is in a wrong context.
5649 (fixup_vla_decls): New function.
5650 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5651 debug variables were created.
5652 * tree.c (decl_value_expr_lookup): Add checking assertion.
5653 (decl_value_expr_insert): Likewise.
5655 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5658 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5659 * tree-scalar-evolution.c (interpret_expr): Likewise.
5660 (expression_expensive_p): Likewise.
5661 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5662 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5663 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5664 (ssa_defined_by_minus_one_stmt_p): New.
5666 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5669 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5670 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5671 * dojump.c (do_jump): Likewise.
5672 * expr.c (expand_expr_real_2): Check operand type's sign.
5673 * fold-const.c (const_unop): Handle ABSU_EXPR.
5674 (fold_abs_const): Likewise.
5675 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5676 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5677 (strip_sign_op_1): Likesise.
5678 * match.pd: Add new pattern to generate ABSU_EXPR.
5679 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5680 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5681 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5682 * tree-inline.c (estimate_operator_cost): Likewise.
5683 * tree-pretty-print.c (dump_generic_node): Likewise.
5684 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5685 * tree.def (ABSU_EXPR): New.
5687 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5690 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5691 documented as preserved for backward compatibility only.
5692 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5694 PR rtl-optimization/86108
5695 * bb-reorder.c (create_forwarder_block): Renamed to ...
5696 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5697 jump from new landing pad to the second part.
5698 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5701 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5704 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5705 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5706 Only call store_expr for halves if the mode is the same.
5709 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5710 Fix up comment formatting.
5712 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5714 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5715 (typed_splay_tree::closure,
5716 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5717 (typed_splay_tree::typed_splay_tree,
5718 typed_splay_tree::operator =): Declared private.
5719 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5720 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5721 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5722 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5723 typed_splay_tree::splay_tree_splay,
5724 typed_splay_tree::splay_tree_foreach_helper,
5725 typed_splay_tree::splay_tree_insert,
5726 typed_splay_tree::splay_tree_remove,
5727 typed_splay_tree::splay_tree_lookup,
5728 typed_splay_tree::splay_tree_predecessor,
5729 typed_splay_tree::splay_tree_successor,
5730 typed_splay_tree::splay_tree_min,
5731 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5732 (typed_splay_tree::root, typed_splay_tree::comp,
5733 typed_splay_tree::delete_key,
5734 typed_splay_tree::delete_value): New data members.
5735 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5736 typed_splay_tree::remove.
5738 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5740 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5741 -mginv and -mno-ginv to the assembler.
5742 * config/mips/mips.opt (-mcrc): New option.
5744 * doc/invoke.text (-mcrc): Document.
5747 2018-06-15 Nick Clifton <nickc@redhat.com>
5750 * tree.c (escaped_string): New class. Converts an unescaped
5751 string into its escaped equivalent.
5752 (warn_deprecated_use): Use the new class to convert the
5753 deprecation message, if present.
5754 (test_escaped_strings): New self test.
5755 (test_c_tests): Add test_escaped_strings.
5756 * doc/extend.texi (deprecated): Add a note that the
5757 deprecation message is affected by the -fmessage-length
5758 option, and that control characters will be escaped.
5759 (#pragma GCC error): Document this pragma.
5760 (#pragma GCC warning): Likewise.
5761 * doc/invoke.texi (-fmessage-length): Document this option's
5762 effect on the #warning and #error preprocessor directives and
5763 the deprecated attribute.
5765 2018-06-15 Richard Biener <rguenther@suse.de>
5767 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5768 here, also noting vector size used.
5769 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5770 size used in MSG_OPTIMIZED_LOCATIONS dump.
5771 (pass_slp_vectorize::execute): Adjust.
5773 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5776 * config/arc/arc.c (arc_return_address_register): Fix
5779 2018-06-15 Richard Biener <rguenther@suse.de>
5782 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5783 leave useless conversion stripping to force_gimple_operand_gsi.
5784 (gimplify_build2): Likewise.
5785 (gimplify_build1): Likewise.
5787 2018-06-15 Richard Biener <rguenther@suse.de>
5790 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5791 before adjusting their block.
5793 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5795 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5796 multilibs for *-*-rtems*.
5797 * config/riscv/t-rtems: New file.
5799 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5802 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5803 unsigned_type_for returns NULL.
5806 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5807 subregs of multi-word pseudos unless the float mode has word size.
5809 2018-06-14 Richard Biener <rguenther@suse.de>
5812 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5813 duplicate and harmful type_hash_canon.
5814 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5816 2018-06-14 Richard Biener <rguenther@suse.de>
5819 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5822 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5824 * config/rtems.h (STDINT_LONG32): Define.
5826 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5827 Prachi Godbole <prachi.godbole@imgtec.com>
5829 * config/mips/mips-cpus.def: Define P6600.
5830 * config/mips/mips-tables.opt: Regenerate.
5831 * config/mips/mips.c (mips_ucbranch_type): New enum.
5832 (mips_rtx_cost_data): Add support for P6600.
5833 (mips_issue_rate): Likewise.
5834 (mips_multipass_dfa_lookahead): Likewise.
5835 (mips_avoid_hazard): Likewise.
5836 (mips_reorg_process_insns): Likewise.
5837 (mips_classify_branch_p6600): New function.
5838 * config/mips/mips.h (TUNE_P6600): New define.
5839 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5840 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5841 * config/mips/mips.md: Include p6600.md.
5842 (processor): Add p6600.
5843 * config/mips/p6600.md: New file.
5844 * doc/invoke.texi: Add p6600 to supported architectures.
5846 2018-06-13 Martin Sebor <msebor@redhat.com>
5848 PR tree-optimization/86114
5849 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5851 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5853 2018-06-13 Richard Biener <rguenther@suse.de>
5855 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5856 Properly set vector type of the intermediate stmt.
5857 * tree-vect-stmts.c (vectorizable_operation): The destination
5858 var always has vectype_out type.
5860 2018-06-13 Jeff Law <law@redhat.com>
5862 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5863 integer 0 for argument to print_rtl_with_bb.
5864 (rl78_reorg): Likewise.
5866 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5868 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5869 from rtx to rtx_insn *.
5870 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5872 (add_sched_insns_for_speculation): Likewise for local "target",
5873 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5874 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5875 from rtx_insn ** to rtx_code_label **.
5876 (reorg_emit_nops): Likewise.
5877 (c6x_reorg): Likewise for local "call_labels".
5878 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5880 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5881 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5882 the loops over LABEL_REFS.
5883 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5885 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5886 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5887 (split_branches): Strengthen local "olabel" from rtx to
5888 rtx_insn *, adding a safe_as_a cast.
5889 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5891 (add_insn_after): Likewise for first two params.
5892 (add_insn_before): Likewise.
5893 (remove_insn): Likewise for param.
5894 (emit_pattern_before_noloc): Likewise for second and third params.
5895 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5896 (emit_call_insn_before_noloc): Likewise.
5897 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5899 (emit_barrier_before): Likewise.
5900 (emit_label_before): Strengthen "label" param from "rtx" to
5901 "rtx_code_label *". Strengthen "before" param from "rtx" to
5903 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5905 (emit_pattern_after_noloc): Likewise.
5906 (emit_insn_after_noloc): Likewise.
5907 (emit_jump_insn_after_noloc): Likewise.
5908 (emit_call_insn_after_noloc): Likewise.
5909 (emit_debug_insn_after_noloc): Likewise.
5910 (emit_barrier_after): Likewise.
5911 (emit_label_after): Likewise for both params.
5912 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5913 "loc" param from "int" to "location_t".
5914 (emit_insn_after_setloc): Likewise.
5915 (emit_jump_insn_after_setloc): Likewise.
5916 (emit_call_insn_after_setloc): Likewise.
5917 (emit_debug_insn_after_setloc): Likewise.
5918 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5919 "loc" param from "int" to "location_t".
5920 (emit_pattern_before): Convert NULL_RTX to NULL.
5921 (emit_insn_before_setloc): Convert "loc" param from "int" to
5923 (emit_jump_insn_before_setloc): Likewise.
5924 (emit_call_insn_before_setloc): Likewise.
5925 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5926 rtx_insn *. Convert "loc" param from "int" to "location_t".
5927 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5928 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5929 Convert 3rd param from "int" to "location_t".
5930 (emit_barrier_before, emit_barrier_after, next_real_insn):
5931 Strengthen param from rtx to rtx_insn *.
5932 (emit_label_before): Strengthen 1st param from "rtx" to
5933 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5935 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5936 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5937 Strengthen 2nd param from "rtx" to "rtx_insn *".
5938 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5939 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5940 Likewise. Convert 3rd param from "int" to "location_t".
5941 (emit_label_after): Strengthen 1st param from "rtx" to
5943 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5945 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5946 from "rtx" to "rtx_insn *".
5948 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5950 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5951 bodies streamed in with -Q.
5952 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5953 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5954 * gimple-streamer-out.c: Include gimple-pretty-print.h
5955 (output_bb): Dump stmts streamed.
5956 * lto-section-out.c: Include print-tree.h
5957 (lto_begin_section): Dump sections created.
5958 (lto_output_decl_index): Dump decl encoded.
5959 * lto-streamer-out.c: Include print-tree.h
5960 (create_output_block): Dump output block created.
5961 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5962 (output_function): Dump function output.
5963 (output_constructor): Dump constructor streamed.
5964 (write_global_stream): Output indexes encoded.
5965 (produce_asm_for_decls): Dump streams encoded.
5966 * lto-streamer.c (streamer_dump_file): New global var.
5967 * lto-streamer.h (streamer_dump_file): Declare.
5968 * passes.c (ipa_write_summaries): Initialize streamer dump.
5969 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5972 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5975 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5976 offsets for register save directives. Emit a second batch of save
5977 directives, if need be, when the function accesses prior frames.
5979 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5981 * config/arc/fpu.md (fmasf4): Force operand to register.
5982 (fnmasf4): Likewise.
5984 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5986 * config/arc/arc-protos.h (arc_pad_return): Remove.
5987 * config/arc/arc.c (machine_function): Remove force_short_suffix
5989 (arc_print_operand): Adjust printing of '&'.
5990 (arc_verify_short): Remove conditional printing of short suffix.
5991 (arc_final_prescan_insn): Remove reference to size_reason.
5992 (pad_return): New function.
5993 (arc_reorg): Call pad_return.
5994 (arc_pad_return): Remove.
5995 (arc_init_machine_status): Remove reference to force_short_suffix.
5996 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5997 (attr length): When attribute iscompact is true force to 2
5998 regardless; in the case of maybe check if we want to force the
5999 instruction to have 4 bytes length.
6000 (nopv): Change it to generate 4 byte long nop as well.
6001 (blockage): New pattern.
6002 (simple_return): Remove call to arc_pad_return.
6003 (p_return_i): Likewise.
6005 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6007 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6009 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6011 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6014 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6016 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6017 for ARC700 and ARCv2.
6019 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
6022 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6023 operands[2] instead of operands[1].
6026 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6028 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6029 case, check whether the outer register overlaps an unallocatable
6030 register, not just whether it fits the required class.
6032 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6034 * poly-int.h (can_div_trunc_p): Add new overload in which all values
6036 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6037 (memrefs_conflict_p): Likewise.
6038 (init_alias_analysis): Likewise.
6039 * cfgexpand.c (expand_debug_expr): Likewise.
6040 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6041 * cse.c (fold_rtx): Likewise.
6042 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6043 * expr.c (emit_block_move_hints): Likewise.
6044 (clear_storage_hints, push_block, emit_push_insn): Likewise.
6045 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6046 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6047 (emit_group_store): Likewise.
6048 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
6049 to read the PRE/POST_MODIFY increment.
6050 * calls.c (store_one_arg): Use strip_offset.
6051 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6053 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6055 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6056 (simplify_binary_operation_1): Extend CONST_INT handling to
6058 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6059 than a HOST_WIDE_INT.
6060 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6062 (adjust_mems, add_stores): Update accodingly.
6063 (vt_canonicalize_addr): Track polynomial offsets.
6064 (emit_note_insn_var_location): Likewise.
6065 (vt_add_function_parameter): Likewise.
6066 (vt_initialize): Likewise.
6068 2018-06-12 Jeff Law <law@redhat.com>
6070 * config.gcc (alpha*-*-freebsd*): Remove.
6071 * config/alpha/freebsd.h: Remove.
6073 2018-06-12 David Malcolm <dmalcolm@redhat.com>
6076 * spellcheck-tree.c (levenshtein_distance): Rename to...
6077 (get_edit_distance): ...this, and update for underlying renaming.
6078 * spellcheck-tree.h (levenshtein_distance): Rename to...
6079 (get_edit_distance): ...this.
6080 * spellcheck.c (levenshtein_distance): Rename to...
6081 (get_edit_distance): ...this. Convert from Levenshtein distance
6082 to Damerau-Levenshtein distance by supporting transpositions of
6083 adjacent characters. Rename "v1" to "v_next" and "v0" to
6085 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6086 (selftest::test_edit_distance_unit_test_oneway): ...this, and
6087 update for underlying renaming.
6088 (selftest::levenshtein_distance_unit_test): Rename to...
6089 (selftest::test_get_edit_distance_unit): ...this, and update for
6090 underlying renaming.
6091 (selftest::test_find_closest_string): Add example from PR 69968
6092 where transposition helps
6093 (selftest::test_metric_conditions): Update for renaming.
6094 (selftest::test_metric_conditions): Likewise.
6095 (selftest::spellcheck_c_tests): Likewise.
6096 * spellcheck.h (levenshtein_distance): Rename both overloads to...
6097 (get_edit_distance): ...this.
6098 (best_match::consider): Update for renaming.
6100 2018-06-12 Martin Sebor <msebor@redhat.com>
6102 PR tree-optimization/85259
6103 * builtins.c (compute_objsize): Handle constant offsets.
6104 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6105 true iff a warning has been issued.
6106 * gimple.h (gimple_nonartificial_location): New function.
6107 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6108 gimple_nonartificial_location and handle -Wno-system-headers.
6109 (handle_builtin_stxncpy): Same.
6111 2018-06-12 Martin Sebor <msebor@redhat.com>
6114 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6116 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
6118 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6119 BUILTIN_VEC_XST entries for pointer to double and long long.
6121 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
6124 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6126 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6129 2018-06-12 Martin Liska <mliska@suse.cz>
6131 * doc/options.texi: Document IntegerRange.
6133 2018-06-12 Martin Liska <mliska@suse.cz>
6135 * config/i386/i386.opt: Make MPX-related options as Deprecated.
6136 * opt-functions.awk: Handle Deprecated flag.
6137 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6139 (read_cmdline_option): Report warning for a deprecated option.
6140 * opts.h (struct cl_option): Add new field cl_deprecated.
6141 (CL_ERR_DEPRECATED): New.
6143 2018-06-12 Martin Liska <mliska@suse.cz>
6145 * doc/options.texi: Document Deprecated option flag.
6147 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6149 * config/arc/arc-arch.h (arc_extras): New enum.
6150 (arc_cpu_t):Add field extra.
6151 (arc_cpu_types): Consider the extras.
6152 * config/arc/arc-cpus.def: Add extras info.
6153 * config/arc/arc-opts.h (processor_type): Consider extra field.
6154 * config/arc/arc.c (arc_override_options): Handle extra field.
6156 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6158 * config/arc/arc-arch.h: Update ARC_OPTX macro.
6159 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6161 * config/arc/arc.c (arc_init): Update pic warning.
6162 (irq_range): Update irq range parsing warnings.
6163 (arc_override_options): Update various warning messages.
6164 (arc_handle_aux_attribute): Likewise.
6166 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
6168 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6170 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6172 * doc/sourcebuild.texi: Document usage of line number 0 in verify
6173 compiler messages directives.
6175 2018-06-12 Matthew Fortune <mfortune@gmail.com>
6177 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6178 * config/mips/mips-tables.opt: Regenerate.
6179 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6181 * doc/invoke.texi: Document -march=i6500.
6183 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
6185 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6186 (i6400_gpmul): Add cpu_unit.
6187 (i6400_gpdiv): Likewise.
6188 (i6400_msa_add_d): Update reservations.
6189 (i6400_msa_int_add) Likewise.
6190 (i6400_msa_short_logic3) Likewise.
6191 (i6400_msa_short_logic2) Likewise.
6192 (i6400_msa_short_logic) Likewise.
6193 (i6400_msa_move) Likewise.
6194 (i6400_msa_cmp) Likewise.
6195 (i6400_msa_short_float2) Likewise.
6196 (i6400_msa_div_d) Likewise.
6197 (i6400_msa_long_logic1) Likewise.
6198 (i6400_msa_long_logic2) Likewise.
6199 (i6400_msa_mult) Likewise.
6200 (i6400_msa_long_float2) Likewise.
6201 (i6400_msa_long_float4) Likewise.
6202 (i6400_msa_long_float5) Likewise.
6203 (i6400_msa_long_float8) Likewise.
6204 (i6400_fpu_fadd): Include frint type.
6205 (i6400_fpu_store): New define_insn_reservation.
6206 (i6400_fpu_load): Likewise.
6207 (i6400_fpu_move): Likewise.
6208 (i6400_fpu_fcmp): Likewise.
6209 (i6400_fpu_fmadd): Likewise.
6210 (i6400_int_mult): Include imul3nc type and update reservation.
6211 (i6400_int_div): Include idiv3 type and update reservation.
6212 (i6400_int_load): Update to check type not move_type.
6213 (i6400_int_store): Likewise.
6214 (i6400_int_prefetch): Set zero latency.
6216 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6218 * gcc.c: Document new %@{...} sequence.
6219 (LINK_COMMAND_SPEC): Use it for the -L switches.
6220 (cpp_unique_options): Use it for the -I switches.
6221 (at_file_argbuf): New global variable.
6222 (in_at_file): Likewise.
6223 (alloc_args): Create at_file_argbuf.
6224 (clear_args): Truncate at_file_argbuf.
6225 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6226 (open_at_file): New function.
6227 (close_at_file): Likewise.
6228 (create_at_file): Delete.
6229 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6232 (validate_switches_from_spec): Deal with %@{...} sequence.
6233 (validate_switches): Likewise.
6234 (driver::finalize): Call clear_args.
6236 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
6238 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6240 2018-06-11 Martin Sebor <msebor@redhat.com>
6242 * doc/invoke.texi (-Wall): List -Wc++17-compat.
6243 (Wno-class-memaccess): Add @opindex.
6244 (Wno-templates, Wno-multiple-inheritance): Same.
6245 (Wno-virtual-inheritance, Wno-namespaces): Same.
6246 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6247 (Wno-format-overflow, Wno-format-truncation): Same.
6248 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6249 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6250 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6251 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6252 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6253 (Wno-misspelled-isr): Same.
6255 2018-06-11 Martin Sebor <msebor@redhat.com>
6257 * PR tree-optimization/86083
6258 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6260 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6262 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6264 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
6267 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6268 on the correct operand.
6269 (*movdi_internal64): Ditto.
6271 2018-06-11 Martin Liska <mliska@suse.cz>
6273 PR tree-optimization/86089
6274 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6276 2018-06-11 Julia Koval <julia.koval@intel.com>
6278 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6279 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6280 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6282 2018-06-11 Olivier Hainque <hainque@adacore.com>
6284 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6285 for Ada with strict dwarf2.
6287 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
6290 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6293 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
6295 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6297 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6299 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6302 2018-06-08 Martin Liska <mliska@suse.cz>
6304 * tree-cfg.h (debug_function): Fix argument type to match
6307 2018-06-08 Martin Liska <mliska@suse.cz>
6309 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6310 Remove usage of MPX-related (and removed) fields.
6311 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6313 2018-06-08 David Malcolm <dmalcolm@redhat.com>
6315 * cfg.c (debug): Use TDF_NONE rather than 0.
6316 * cfghooks.c (debug): Likewise.
6317 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6318 (struct dump_option_value_info): Convert to...
6319 (struct kv_pair): ...this template type.
6320 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6322 (optinfo_verbosity_options): Likewise.
6323 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6325 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6326 than int for "optgroup_flags" param.
6327 (dump_generic_expr_loc): Use dump_flags_t rather than int for
6329 (dump_dec): Likewise.
6330 (dump_finish): Use TDF_NONE rather than 0.
6331 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6332 rather than int for "optgroup_flags" param. Use TDF_NONE rather
6333 than 0. Update for change to option_ptr.
6334 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6335 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
6336 0. Update for changes to optinfo_verbosity_options and
6338 (opt_info_switch_p): Convert optgroup_flags from int to
6340 (dump_basic_block): Use dump_flags_t rather than int
6341 for "dump_kind" param.
6342 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6343 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6344 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6345 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6346 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6347 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6348 TDF_NONE): Convert from macros to...
6349 (enum dump_flag): ...this new enum.
6350 (dump_flags_t): Update to use enum.
6351 (operator|, operator&, operator~, operator|=, operator&=):
6352 Implement for dump_flags_t.
6353 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6354 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6355 Convert from macros to...
6356 (enum optgroup_flag): ...this new enum.
6357 (optgroup_flags_t): New typedef.
6358 (operator|, operator|=): Implement for optgroup_flags_t.
6359 (struct dump_file_info): Convert field "alt_flags" to
6360 dump_flags_t. Convert field "optgroup_flags" to
6362 (dump_basic_block): Use dump_flags_t rather than int for param.
6363 (dump_generic_expr_loc): Likewise.
6364 (dump_dec): Likewise.
6365 (dump_register): Convert param "optgroup_flags" to
6367 (opt_info_enable_passes): Likewise.
6368 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6370 * gimple-pretty-print.c (debug): Likewise.
6371 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6372 (merged_store_group::apply_stores): Likewise.
6373 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6374 * gimple.c (verify_gimple_pp): Likewise.
6375 * graphite-poly.c (print_pbb_body): Likewise.
6376 * passes.c (pass_manager::register_one_dump_file): Convert
6377 local "optgroup_flags" to optgroup_flags_t.
6378 * print-tree.c (print_node): Use TDF_NONE rather than 0.
6380 (debug_body): Likewise.
6381 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6382 to optgroup_flags_t.
6383 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6385 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6386 (convert_mult_to_fma): Likewise.
6387 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6388 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6389 * tree-vect-data-refs.c (dump_lower_bound): Convert param
6390 "dump_kind" to dump_flags_t.
6392 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6394 * config/rs6000/rs6000.c (min, max): Delete.
6396 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6398 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6399 -mabi=spe and -mabi=no-spe.
6401 2018-06-08 Martin Liska <mliska@suse.cz>
6403 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6404 where we expect an existing summary.
6406 2018-06-08 Martin Liska <mliska@suse.cz>
6408 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6409 * ipa-inline.h (estimate_edge_growth): Likewise.
6411 2018-06-08 Martin Liska <mliska@suse.cz>
6413 * cgraph.c (function_version_hasher::hash): Use
6414 cgraph_node::get_uid ().
6415 (function_version_hasher::equal):
6416 * cgraph.h (cgraph_node::get_uid): New method.
6417 * ipa-inline.c (update_caller_keys): Use
6418 cgraph_node::get_uid ().
6419 (update_callee_keys): Likewise.
6420 * ipa-utils.c (searchc): Likewise.
6421 (ipa_reduced_postorder): Likewise.
6422 * lto-cgraph.c (input_node): Likewise.
6423 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6424 * symbol-summary.h (symtab_insertion): Likewise.
6425 (symtab_removal): Likewise.
6426 (symtab_duplication): Likewise.
6427 * tree-pretty-print.c (dump_function_header): Likewise.
6428 * tree-sra.c (convert_callers_for_node): Likewise.
6430 2018-06-08 Martin Liska <mliska@suse.cz>
6432 * cgraph.c (symbol_table::create_edge): Always assign a new
6434 (symbol_table::free_edge): Do not recycle numbers.
6435 * cgraph.h (cgraph_edge::get): New method.
6436 * symbol-summary.h (symtab_removal): Use it.
6437 (symtab_duplication): Likewise.
6438 (call_summary::hashable_uid): Remove.
6440 2018-06-08 Martin Liska <mliska@suse.cz>
6442 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6443 (initialize_growth_caches): Remove.
6444 (free_growth_caches): Likewise.
6445 (do_estimate_edge_time): Use edge_growth_cache.
6446 (do_estimate_edge_size): Likewise.
6447 (do_estimate_edge_hints): Likewise.
6448 * ipa-inline.c (reset_edge_caches): Likewise.
6449 (recursive_inlining): Likewise.
6450 (inline_small_functions): Likewise.
6451 * ipa-inline.h (initialize_growth_caches): Remove.
6452 (estimate_edge_size): Likewise.
6453 (estimate_edge_time): Likewise.
6454 (estimate_edge_hints): Likewise.
6455 (reset_edge_growth_cache): Likewise.
6456 * symbol-summary.h (call_summary::remove): New method.
6458 2018-06-08 Martin Liska <mliska@suse.cz>
6460 * ipa-cp.c (class edge_clone_summary): New summary.
6461 (grow_edge_clone_vectors): Remove.
6462 (ipcp_edge_duplication_hook): Remove.
6463 (class edge_clone_summary_t): New call_summary class.
6464 (ipcp_edge_removal_hook): Remove.
6465 (edge_clone_summary_t::duplicate): New function.
6466 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6467 (create_specialized_node): Likewise.
6468 (ipcp_driver): Initialize edge_clone_summaries and do not
6471 2018-06-08 Martin Liska <mliska@suse.cz>
6473 * symbol-summary.h (get): New function.
6474 (call_summary::m_initialize_when_cloning): New class member.
6476 2018-06-08 Martin Liska <mliska@suse.cz>
6478 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6479 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6480 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6481 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6482 (remove_cgraph_node_from_order): Use the removed_nodes set.
6483 (do_per_function_toporder): Likwise.
6484 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6485 instead of summary_uid.
6486 (symtab_removal): Likewise.
6487 (symtab_duplication): Likewise.
6489 2018-06-08 Martin Liska <mliska@suse.cz>
6491 * ipa-cp.c (ipcp_store_bits_results): Use
6492 ipcp_transformation_sum.
6493 (ipcp_store_vr_results): Likewise.
6494 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6496 (ipcp_transformation_initialize): ... this.
6497 (ipa_set_node_agg_value_chain):
6498 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6499 (write_ipcp_transformation_info): Likewise.
6500 (read_ipcp_transformation_info): Likewise.
6501 (ipcp_update_bits): Likewise.
6502 (ipcp_update_vr): Likewise.
6503 (ipcp_transform_function): Likewise.
6504 * ipa-prop.h: Rename ipcp_transformation_summary to
6505 ipcp_transformation.
6506 (class ipcp_transformation_t): New function summary.
6507 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6508 (ipa_get_agg_replacements_for_node): Likewise.
6510 2018-06-08 Martin Liska <mliska@suse.cz>
6512 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6514 (class funct_state_summary_t): New function_summary class.
6515 (has_function_state): Remove.
6516 (get_function_state): Likewise.
6517 (set_function_state): Likewise.
6518 (add_new_function): Likewise.
6519 (funct_state_summary_t::insert): New function.
6520 (duplicate_node_data): Remove.
6521 (remove_node_data): Remove.
6522 (funct_state_summary_t::duplicate): New function.
6523 (register_hooks): Create new funct_state_summaries.
6524 (pure_const_generate_summary): Use it.
6525 (pure_const_write_summary): Likewise.
6526 (pure_const_read_summary): Likewise.
6527 (propagate_pure_const): Likewise.
6528 (propagate_nothrow): Likewise.
6529 (dump_malloc_lattice): Likewise.
6530 (propagate_malloc): Likewise.
6531 (execute): Do not register hooks, just remove summary
6533 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6536 2018-06-08 Martin Liska <mliska@suse.cz>
6538 * ipa-reference.c (remove_node_data): Remove.
6539 (duplicate_node_data): Likewise.
6540 (class ipa_ref_var_info_summary_t): New class.
6541 (class ipa_ref_opt_summary_t): Likewise.
6542 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6543 (get_reference_optimization_summary): Use
6544 ipa_ref_opt_sum_summaries.
6545 (set_reference_vars_info): Remove.
6546 (set_reference_optimization_summary): Likewise.
6547 (ipa_init): Create summaries.
6548 (init_function_info): Use function summary.
6549 (ipa_ref_opt_summary_t::duplicate): New function.
6550 (ipa_ref_opt_summary_t::remove): New function.
6551 (get_read_write_all_from_node): Fix GNU coding style.
6552 (propagate): Use function summary.
6553 (write_node_summary_p): Fix GNU coding style.
6554 (stream_out_bitmap): Likewise.
6555 (ipa_reference_read_optimization_summary): Use function summary.
6556 (ipa_reference_c_finalize): Do not release hooks.
6558 2018-06-08 Martin Liska <mliska@suse.cz>
6560 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6561 (analyze_function_body): Extract multiple calls of get_create.
6562 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6563 * ipa-inline.c (recursive_inlining): Use ::get method.
6564 * ipa-inline.h (estimate_edge_growth): Likewise.
6566 2018-06-08 Martin Liska <mliska@suse.cz>
6568 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6570 (hsa_function_summary::hsa_function_summary): Use the new enum
6572 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6573 * hsa-gen.c (hsa_get_host_function): Likewise.
6574 (get_brig_function_name): Likewise.
6575 * ipa-hsa.c (process_hsa_functions): Likewise.
6576 (ipa_hsa_write_summary): Likewise.
6577 * symbol-summary.h (symtab_duplication): Use ::get function/
6578 (get): New function.
6580 2018-06-08 Martin Liska <mliska@suse.cz>
6582 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6584 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6585 (hsa_register_kernel): Likewise.
6586 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6587 * hsa-gen.c (hsa_get_host_function): Likewise.
6588 (get_brig_function_name): Likewise.
6589 (generate_hsa): Likewise.
6590 (pass_gen_hsail::execute): Likewise.
6591 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6592 (devirtualization_time_bonus): Likewise.
6593 (ipcp_propagate_stage): Likewise.
6594 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6595 (edge_set_predicate): Likewise.
6596 (evaluate_conditions_for_known_args): Likewise.
6597 (evaluate_properties_for_edge): Likewise.
6598 (ipa_fn_summary::reset): Likewise.
6599 (ipa_fn_summary_t::duplicate): Likewise.
6600 (dump_ipa_call_summary): Likewise.
6601 (ipa_dump_fn_summary): Likewise.
6602 (analyze_function_body): Likewise.
6603 (compute_fn_summary): Likewise.
6604 (estimate_edge_devirt_benefit): Likewise.
6605 (estimate_edge_size_and_time): Likewise.
6606 (estimate_calls_size_and_time): Likewise.
6607 (estimate_node_size_and_time): Likewise.
6608 (inline_update_callee_summaries): Likewise.
6609 (remap_edge_change_prob): Likewise.
6610 (remap_edge_summaries): Likewise.
6611 (ipa_merge_fn_summary_after_inlining): Likewise.
6612 (ipa_update_overall_fn_summary): Likewise.
6613 (read_ipa_call_summary): Likewise.
6614 (inline_read_section): Likewise.
6615 (write_ipa_call_summary): Likewise.
6616 (ipa_fn_summary_write): Likewise.
6617 (ipa_free_fn_summary): Likewise.
6618 * ipa-hsa.c (process_hsa_functions): Likewise.
6619 (ipa_hsa_write_summary): Likewise.
6620 (ipa_hsa_read_section): Likewise.
6621 * ipa-icf.c (sem_function::merge): Likewise.
6622 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6623 (do_estimate_edge_time): Likewise.
6624 (estimate_size_after_inlining): Likewise.
6625 (estimate_growth): Likewise.
6626 (growth_likely_positive): Likewise.
6627 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6628 (inline_call): Likewise.
6629 * ipa-inline.c (caller_growth_limits): Likewise.
6630 (can_inline_edge_p): Likewise.
6631 (can_inline_edge_by_limits_p): Likewise.
6632 (compute_uninlined_call_time): Likewise.
6633 (compute_inlined_call_time): Likewise.
6634 (want_inline_small_function_p): Likewise.
6635 (edge_badness): Likewise.
6636 (update_caller_keys): Likewise.
6637 (update_callee_keys): Likewise.
6638 (recursive_inlining): Likewise.
6639 (inline_small_functions): Likewise.
6640 (inline_to_all_callers_1): Likewise.
6641 (dump_overall_stats): Likewise.
6642 (early_inline_small_functions): Likewise.
6643 (early_inliner): Likewise.
6644 * ipa-inline.h (estimate_edge_growth): Likewise.
6645 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6646 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6647 * ipa-prop.h (IPA_NODE_REF): Likewise.
6648 (IPA_EDGE_REF): Likewise.
6649 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6650 (propagate_malloc): Likewise.
6651 * ipa-split.c (execute_split_functions): Likewise.
6652 * symbol-summary.h: Rename get to get_create.
6654 (get_create): Likewise.
6655 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6657 2018-06-08 Martin Liska <mliska@suse.cz>
6659 * symbol-summary.h (release): Move definition out of class
6661 (symtab_removal): Likewise.
6662 (symtab_duplication): Likewise.
6664 2018-06-08 Martin Liska <mliska@suse.cz>
6666 * symbol-summary.h (function_summary): Move constructor
6667 implementation out of class declaration.
6668 (release): Likewise.
6669 (symtab_insertion): Likewise.
6670 (symtab_removal): Likewise.
6671 (symtab_duplication): Likewise.
6674 2018-06-08 Martin Liska <mliska@suse.cz>
6676 * Makefile.in: Remove support for MPX (macros, related functions,
6677 fields in cgraph_node, ...).
6678 * builtin-types.def (BT_BND): Likewise.
6679 (BT_FN_BND_CONST_PTR): Likewise.
6680 (BT_FN_CONST_PTR_BND): Likewise.
6681 (BT_FN_VOID_PTR_BND): Likewise.
6682 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6683 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6684 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6685 (expand_builtin_mempcpy_with_bounds): Likewise.
6686 (expand_builtin_memset_with_bounds): Likewise.
6687 (expand_builtin_memset_args): Likewise.
6688 (std_expand_builtin_va_start): Likewise.
6689 (expand_builtin): Likewise.
6690 (expand_builtin_with_bounds): Likewise.
6691 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6692 (DEF_LIB_BUILTIN_CHKP): Likewise.
6693 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6694 (DEF_CHKP_BUILTIN): Likewise.
6695 (BUILT_IN_MEMCPY): Likewise.
6696 (BUILT_IN_MEMMOVE): Likewise.
6697 (BUILT_IN_MEMPCPY): Likewise.
6698 (BUILT_IN_MEMSET): Likewise.
6699 (BUILT_IN_STPCPY): Likewise.
6700 (BUILT_IN_STRCAT): Likewise.
6701 (BUILT_IN_STRCHR): Likewise.
6702 (BUILT_IN_STRCPY): Likewise.
6703 (BUILT_IN_STRLEN): Likewise.
6704 (BUILT_IN_MEMCPY_CHK): Likewise.
6705 (BUILT_IN_MEMMOVE_CHK): Likewise.
6706 (BUILT_IN_MEMPCPY_CHK): Likewise.
6707 (BUILT_IN_MEMSET_CHK): Likewise.
6708 (BUILT_IN_STPCPY_CHK): Likewise.
6709 (BUILT_IN_STRCAT_CHK): Likewise.
6710 (BUILT_IN_STRCPY_CHK): Likewise.
6711 * calls.c (store_bounds): Likewise.
6712 (emit_call_1): Likewise.
6713 (special_function_p): Likewise.
6714 (maybe_warn_nonstring_arg): Likewise.
6715 (initialize_argument_information): Likewise.
6716 (finalize_must_preallocate): Likewise.
6717 (compute_argument_addresses): Likewise.
6718 (expand_call): Likewise.
6719 * cfgexpand.c (expand_call_stmt): Likewise.
6720 (expand_return): Likewise.
6721 (expand_gimple_stmt_1): Likewise.
6722 (pass_expand::execute): Likewise.
6723 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6724 (cgraph_node::remove): Likewise.
6725 (cgraph_node::dump): Likewise.
6726 (cgraph_node::verify_node): Likewise.
6727 * cgraph.h (chkp_function_instrumented_p): Likewise.
6728 (symtab_node::get_alias_target): Likewise.
6729 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6730 (cgraph_local_p): Likewise.
6731 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6732 (cgraph_edge::rebuild_references): Likewise.
6733 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6734 (walk_polymorphic_call_targets): Likewise.
6735 (cgraph_node::expand_thunk): Likewise.
6736 (symbol_table::output_weakrefs): Likewise.
6737 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6738 (ix86_handle_option): Likewise.
6739 * config/i386/constraints.md: Likewise.
6740 * config/i386/i386-builtin-types.def (BND): Likewise.
6744 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6745 (BDESC_FIRST): Likewise.
6747 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6748 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6749 * config/i386/i386.c (enum reg_class): Likewise.
6750 (ix86_target_string): Likewise.
6751 (ix86_option_override_internal): Likewise.
6752 (ix86_conditional_register_usage): Likewise.
6753 (ix86_valid_target_attribute_inner_p): Likewise.
6754 (ix86_set_indirect_branch_type): Likewise.
6755 (ix86_set_current_function): Likewise.
6756 (ix86_function_arg_regno_p): Likewise.
6757 (init_cumulative_args): Likewise.
6758 (ix86_function_arg_advance): Likewise.
6759 (ix86_function_arg): Likewise.
6760 (ix86_pass_by_reference): Likewise.
6761 (ix86_function_value_regno_p): Likewise.
6762 (ix86_function_value_1): Likewise.
6763 (ix86_function_value_bounds): Likewise.
6764 (ix86_return_in_memory): Likewise.
6765 (ix86_setup_incoming_vararg_bounds): Likewise.
6766 (ix86_va_start): Likewise.
6767 (indirect_thunk_need_prefix): Likewise.
6768 (print_reg): Likewise.
6769 (ix86_print_operand): Likewise.
6770 (ix86_expand_call): Likewise.
6771 (ix86_output_function_return): Likewise.
6772 (reg_encoded_number): Likewise.
6773 (BDESC_VERIFYS): Likewise.
6774 (ix86_init_mpx_builtins): Likewise.
6775 (ix86_init_builtins): Likewise.
6776 (ix86_emit_cmove): Likewise.
6777 (ix86_emit_move_max): Likewise.
6778 (ix86_expand_builtin): Likewise.
6779 (ix86_builtin_mpx_function): Likewise.
6780 (ix86_get_arg_address_for_bt): Likewise.
6781 (ix86_load_bounds): Likewise.
6782 (ix86_store_bounds): Likewise.
6783 (ix86_load_returned_bounds): Likewise.
6784 (ix86_store_returned_bounds): Likewise.
6785 (ix86_class_likely_spilled_p): Likewise.
6786 (ix86_hard_regno_mode_ok): Likewise.
6787 (x86_order_regs_for_local_alloc): Likewise.
6788 (ix86_mitigate_rop): Likewise.
6789 (ix86_bnd_prefixed_insn_p): Likewise.
6790 (ix86_mpx_bound_mode): Likewise.
6791 (ix86_make_bounds_constant): Likewise.
6792 (ix86_initialize_bounds): Likewise.
6793 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6794 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6795 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6796 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6797 (TARGET_CHKP_BOUND_MODE): Likewise.
6798 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6799 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6800 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6801 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6802 * config/i386/i386.h (TARGET_MPX): Likewise.
6803 (TARGET_MPX_P): Likewise.
6804 (VALID_BND_REG_MODE): Likewise.
6805 (FIRST_BND_REG): Likewise.
6806 (LAST_BND_REG): Likewise.
6807 (enum reg_class): Likewise.
6808 (BND_REG_P): Likewise.
6809 (BND_REGNO_P): Likewise.
6810 (BNDmode): Likewise.
6811 (ADJUST_INSN_LENGTH): Likewise.
6812 * config/i386/i386.md: Likewise.
6813 * config/i386/i386.opt: Likewise.
6814 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6815 (defined): Likewise.
6816 (LINK_MPX): Likewise.
6817 (MPX_SPEC): Likewise.
6818 (LIBMPX_SPEC): Likewise.
6819 (LIBMPXWRAPPERS_SPEC): Likewise.
6820 (CHKP_SPEC): Likewise.
6821 * config/i386/predicates.md: Likewise.
6822 * dbxout.c (dbxout_type): Likewise.
6823 * doc/extend.texi: Likewise.
6824 * doc/invoke.texi: Likewise.
6825 * doc/md.texi: Likewise.
6826 * doc/tm.texi: Likewise.
6827 * doc/tm.texi.in: Likewise.
6828 * dwarf2out.c (is_base_type): Likewise.
6829 (gen_formal_types_die): Likewise.
6830 (gen_subprogram_die): Likewise.
6831 (gen_type_die_with_usage): Likewise.
6832 (gen_decl_die): Likewise.
6833 (dwarf2out_late_global_decl): Likewise.
6834 * expr.c (expand_assignment): Likewise.
6835 (emit_storent_insn): Likewise.
6836 (store_expr_with_bounds): Likewise.
6837 (store_expr): Likewise.
6838 (expand_expr_real_1): Likewise.
6839 * expr.h (store_expr_with_bounds): Likewise.
6840 * function.c (use_register_for_decl): Likewise.
6841 (struct bounds_parm_data): Likewise.
6842 (assign_parms_augmented_arg_list): Likewise.
6843 (assign_parm_find_entry_rtl): Likewise.
6844 (assign_parm_is_stack_parm): Likewise.
6845 (assign_parm_load_bounds): Likewise.
6846 (assign_bounds): Likewise.
6847 (assign_parms): Likewise.
6848 (expand_function_start): Likewise.
6849 * gcc.c (CHKP_SPEC): Likewise.
6850 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6851 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6852 (wrestrict_dom_walker::check_call): Likewise.
6853 * gimple.c (gimple_build_call_from_tree): Likewise.
6854 * gimple.h (enum gf_mask): Likewise.
6855 (gimple_call_with_bounds_p): Likewise.
6856 (gimple_call_set_with_bounds): Likewise.
6857 * gimplify.c (gimplify_init_constructor): Likewise.
6858 * ipa-cp.c (initialize_node_lattices): Likewise.
6859 (propagate_constants_across_call): Likewise.
6860 (find_more_scalar_values_for_callers_subset): Likewise.
6861 * ipa-hsa.c (process_hsa_functions): Likewise.
6862 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6863 * ipa-icf.c (sem_function::merge): Likewise.
6864 * ipa-inline.c (early_inliner): Likewise.
6865 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6866 (warn_function_cold): Likewise.
6867 (propagate_pure_const): Likewise.
6868 * ipa-ref.h (enum GTY): Likewise.
6869 * ipa-split.c (find_retbnd): Likewise.
6870 (consider_split): Likewise.
6871 (split_function): Likewise.
6872 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6873 * ipa.c (walk_polymorphic_call_targets): Likewise.
6874 (symbol_table::remove_unreachable_nodes): Likewise.
6875 (process_references): Likewise.
6876 (cgraph_build_static_cdtor_1): Likewise.
6877 * lto-cgraph.c (lto_output_node): Likewise.
6878 (output_refs): Likewise.
6879 (compute_ltrans_boundary): Likewise.
6880 (input_overwrite_node): Likewise.
6881 (input_node): Likewise.
6882 (input_cgraph_1): Likewise.
6883 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6884 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6885 (class pass_chkp_instrumentation_passes): Likewise.
6886 (make_pass_chkp_instrumentation_passes): Likewise.
6887 * passes.def: Likewise.
6888 * rtl.h (struct GTY): Likewise.
6889 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6890 * stor-layout.c (layout_type): Likewise.
6891 * symtab.c: Likewise.
6892 * target.def: Likewise.
6893 * targhooks.c (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 * targhooks.h (default_chkp_bound_type): Likewise.
6900 (default_chkp_bound_mode): Likewise.
6901 (default_builtin_chkp_function): Likewise.
6902 (default_chkp_function_value_bounds): Likewise.
6903 (default_chkp_make_bounds_constant): Likewise.
6904 (default_chkp_initialize_bounds): Likewise.
6905 * toplev.c (compile_file): Likewise.
6906 (process_options): Likewise.
6907 * tree-core.h (DEF_BUILTIN): Likewise.
6908 (DEF_BUILTIN_CHKP): Likewise.
6909 * tree-inline.c (declare_return_variable): Likewise.
6910 (remap_gimple_stmt): Likewise.
6911 (copy_bb): Likewise.
6912 (initialize_inlined_parameters): Likewise.
6913 (expand_call_inline): Likewise.
6914 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6915 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6916 (make_pass_ipa_chkp_produce_thunks): Likewise.
6917 (make_pass_chkp): Likewise.
6918 (make_pass_chkp_opt): Likewise.
6919 (make_pass_chkp_instrumentation_passes): Likewise.
6920 * tree-pretty-print.c (dump_generic_node): Likewise.
6921 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6922 * tree-ssa-dce.c (propagate_necessity): Likewise.
6923 (eliminate_unnecessary_stmts): Likewise.
6924 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6925 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6926 * tree-ssa-sccvn.h: Likewise.
6927 * tree-ssa-strlen.c (get_string_length): Likewise.
6928 (valid_builtin_call): Likewise.
6929 (adjust_last_stmt): Likewise.
6930 (handle_builtin_strchr): Likewise.
6931 (handle_builtin_strcpy): Likewise.
6932 (handle_builtin_stxncpy): Likewise.
6933 (handle_builtin_memcpy): Likewise.
6934 (handle_builtin_strcat): Likewise.
6935 (strlen_check_and_optimize_stmt): Likewise.
6936 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6937 * tree-streamer-in.c: Likewise.
6938 * tree-streamer.c (record_common_node): Likewise.
6939 * tree.c (tree_code_size): Likewise.
6940 (wide_int_to_tree_1): Likewise.
6941 (type_contains_placeholder_1): Likewise.
6942 (build_common_tree_nodes): Likewise.
6943 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6944 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6945 (POINTER_BOUNDS_P): Likewise.
6946 (BOUNDED_TYPE_P): Likewise.
6947 (BOUNDED_P): Likewise.
6948 (CALL_WITH_BOUNDS_P): Likewise.
6949 (pointer_bounds_type_node): Likewise.
6950 * value-prof.c (gimple_ic): Likewise.
6951 * var-tracking.c (vt_add_function_parameters): Likewise.
6952 * varasm.c (make_decl_rtl): Likewise.
6953 (assemble_start_function): Likewise.
6954 (output_constant): Likewise.
6955 (maybe_assemble_visibility): Likewise.
6956 * varpool.c (ctor_for_folding): Likewise.
6957 * chkp-builtins.def: Remove.
6958 * ipa-chkp.c: Remove.
6959 * ipa-chkp.h: Remove.
6960 * rtl-chkp.c: Remove.
6961 * rtl-chkp.h: Remove.
6962 * tree-chkp-opt.c: Remove.
6963 * tree-chkp.c: Remove.
6964 * tree-chkp.h: Remove.
6966 2018-06-07 Carl Love <cel@us.ibm.com>
6968 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6969 vextract_fp_from_shortl): Add BE support.
6971 2018-06-07 Paul Koning <ni1d@arrl.net>
6973 * compare-elim.c (try_merge_compare): Don't merge compare if
6974 address contains a side effect.
6975 (try_eliminate_compare): Likewise.
6977 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6979 * config.gcc: Support "tremont".
6980 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6981 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6983 * config/i386/i386.c (m_TREMONT): Define.
6984 (processor_target_table): Add "tremont".
6985 (PTA_TREMONT): Define.
6986 (ix86_lea_outperforms): Add TARGET_TREMONT.
6987 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6988 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6989 and M_INTEL_GOLDMONT_PLUS.
6990 (fold_builtin_cpu): Add "tremont".
6991 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6992 (ix86_option_override_internal): Add "tremont".
6993 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6994 (processor_type): Add PROCESSOR_TREMONT.
6995 * config/i386/x86-tune.def: Add m_TREMONT.
6996 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6998 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7000 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7001 symbol defined for msp430i* devices to be lower case.
7003 2018-06-07 Richard Biener <rguenther@suse.de>
7005 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7006 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
7007 Properly wrap signed arithmetic if overflow wraps.
7009 2018-06-07 Jakub Jelinek <jakub@redhat.com>
7011 PR tree-optimization/69615
7012 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7013 of a cast from a same precision integral SSA_NAME in a bb dominated
7014 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
7015 cast to utype if rhs2 has already a compatible type.
7017 2018-06-07 Richard Biener <rguenther@suse.de>
7019 PR tree-optimization/85935
7020 * graphite-scop-detection.c (find_params_in_bb): Analyze
7021 condition operands with respect to the correct loop. Assert
7022 the analysis doesn't fail.
7024 2018-06-04 Carl Love <cel@us.ibm.com>
7026 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7027 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
7028 as it is slightly cheaper.
7029 (first_match_or_eos_index_<mode>):
7030 Calculate index using natural element order.
7031 (first_match_index_<mode>):
7032 Calculate index using natural element order.
7033 (first_match_or_eos_index_<mode>):
7034 Calculate index using natural order.
7035 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7036 for BE and LE modes.
7037 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7038 P9V_BUILTIN_VCLZLSBB_V16QI.
7039 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7042 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7044 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7045 indentation and line wrap for many prototypes. Add missing
7046 @smallexample directives around block of prototypes for vec_xl and
7049 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
7051 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7052 track if we pass or return IEEE 128-bit floating point.
7053 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7054 C++ mangling that is compatible with GCC 8.1.
7055 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7056 (init_cumulative_args): Note if we pass or return IEEE 128-bit
7057 floating point types.
7058 (rs6000_function_arg_advance_1): Likewise.
7059 (rs6000_mangle_type): Optionally generate mangled names that match
7060 what GCC 8.1 generated for IEEE 128-bit floating point types.
7061 (rs6000_globalize_decl_name): If we have an external function that
7062 passes or returns IEEE 128-bit types, generate a weak reference
7063 from the mangled name used in GCC 8.1 to the current mangled
7065 (rs6000_init_builtins): Make __ibm128 use the long double type if
7066 long double is IBM extended double. Make __float128 use the long
7067 double type if long double is IEEE 128-bit.
7070 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7071 macro for __ibm128 built-in functions.
7072 (PACK_IF): Add __ibm128 pack/unpack functions.
7073 (UNPACK_IF): Likewise.
7074 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7075 enable long double built-in functions if long double is IEEE
7076 128-bit floating point.
7077 (rs6000_invalid_builtin): Update long double built-in function
7079 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7080 functions, adjust the built-in function to use the long double
7081 built-in function if __ibm128 and long double are the same type.
7082 * doc/extend.texi (PowerPC builtins): Update documention for
7083 __builtin_{,un}pack_longdouble. Add documentation for
7084 __builtin_{,un}pack_ibm128.
7086 2018-06-06 Jim Wilson <jimw@sifive.com>
7088 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7089 (struct machine_function): New field interrupt_mode.
7090 (riscv_handle_type_attribute): New function. Add forward declaration.
7091 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7092 (riscv_expand_epilogue): Check interrupt_mode field.
7093 (riscv_set_current_function): Check interrupt attribute args and
7094 set interrupt_mode field.
7095 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7096 (riscv_sret, riscv_uret): New.
7097 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7098 new arguments to interrupt attribute.
7100 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
7103 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7104 Don't handle -mcpu=power8 if -mpower9-vector is also used.
7106 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7108 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7109 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7110 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7111 several redundant entries.
7113 2018-06-06 David Malcolm <dmalcolm@redhat.com>
7115 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7116 type from "rtx" to "rtx_insn *".
7117 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7118 for local "call_insn", removing cast.
7119 (ix86_expand_call): Likewise, introducing a "call_insn" local.
7121 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
7123 PR tree-optimization/86066
7124 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7125 for BIT_INSERT_EXPR stores.
7127 2018-06-06 Richard Biener <rguenther@suse.de>
7129 PR tree-optimization/86062
7130 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7131 component refs ontop
7132 of to be offsetted base.
7134 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7136 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7137 to be static and remove check on interrupt attribute name.
7139 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
7141 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7142 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7144 2018-06-05 Steve Ellcey <sellcey@cavium.com>
7147 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7149 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7150 Remove second argument, change how error is called.
7151 (aarch64_layout_arg): Remove second argument from
7152 aarch64_err_no_fpadvsimd call.
7153 (aarch64_init_cumulative_args): Ditto.
7154 (aarch64_gimplify_va_arg_expr): Ditto.
7155 * config/aarch64/aarch64.md (mov<mode>): Ditto.
7157 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
7159 * config/i386/i386.md (simple_return_indirect_internal): New expander.
7160 (*simple_return_indirect_internal<mode>): Rename from
7161 simple_return_indirect_internal. Use W mode iterator.
7162 (rstorssp): New expander.
7163 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
7164 (clrssbsy): New expander.
7165 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
7167 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
7169 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7171 (cmse_check_pointed_object): Likewise.
7173 2018-06-05 Martin Liska <mliska@suse.cz>
7175 PR gcov-profile/47618
7176 * doc/invoke.texi: Document how -fprofile-dir format
7179 2018-06-05 Richard Biener <rguenther@suse.de>
7181 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7182 removal pretend DOM info isn't available so we do not update
7183 it and only remove edges, not dominated blocks. Actually free
7184 DOM info in case we removed something. Remove unreachable blocks.
7185 (mfb_keep_latches): Work with either DOM info or marked backedges.
7186 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7187 first. Mark backedges if DOM info isn't available.
7188 (Re-)compute DOM info after cleanup_control_flow_pre.
7190 2018-06-05 Richard Biener <rguenther@suse.de>
7192 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7193 (locus_discrim_hasher::hash): Adjust.
7194 (locus_discrim_hasher::equal): Likewise.
7195 (next_discriminator_for_locus): Work on line directly.
7196 (same_line_p): Pass in expanded locus1 as well.
7197 (assign_discriminators): Avoid redundant location expansions.
7199 2018-06-05 Richard Biener <rguenther@suse.de>
7201 PR tree-optimization/86046
7202 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7203 if required after clearing TREE_ADDRESSABLE.
7205 2018-06-05 Richard Biener <rguenther@suse.de>
7207 PR tree-optimization/86047
7208 * tree-ssa-loop.c (for_each_index): Glob handling of all
7209 decls and constants and really handle all of them.
7211 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7214 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7215 qualifier_void_pointer and qualifier_const_void_pointer.
7216 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7217 (arm_init_builtins): Handle the above.
7218 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7219 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7220 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7223 2018-06-05 Martin Liska <mliska@suse.cz>
7225 * auto-profile.c (read_autofdo_file): Do not use
7226 gcov_ctr_summary struct.
7227 (afdo_callsite_hot_enough_for_early_inline): Likewise.
7228 * coverage.c (struct counts_entry): Likewise.
7229 (read_counts_file): Read just single summary entry.
7230 (get_coverage_counts): Use gcov_summary struct.
7231 * coverage.h (get_coverage_counts): Likewise.
7232 * gcov-dump.c (dump_working_sets): Likewise.
7233 (tag_summary): Dump just single summary.
7234 * gcov-io.c (gcov_write_summary): Write just histogram
7236 (gcov_read_summary): Read just single summary.
7237 (compute_working_sets): Use gcov_summary struct.
7238 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7239 of GCOV_COUNTERS_SUMMABLE.
7240 (GCOV_COUNTERS_SUMMABLE): Remove.
7241 (GCOV_FIRST_VALUE_COUNTER): Replace with
7242 GCOV_COUNTER_V_INTERVAL.
7243 (struct gcov_ctr_summary): Remove.
7244 (struct gcov_summary): Directly use fields of former
7246 (compute_working_sets): Use gcov_summary struct.
7247 * gcov.c (read_count_file): Do not use ctrs fields.
7248 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7250 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7252 * profile.c: Likewise.
7253 * profile.h: Likewise.
7255 2018-06-05 Martin Liska <mliska@suse.cz>
7257 PR gcov-profile/84846
7258 * gcov.c (output_lines): Print working directory only
7259 in intermediate format.
7261 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
7263 * config/s390/s390-builtin-types.def: Add void function type.
7264 * config/s390/s390-builtins.def: Use the function type for the
7267 2018-06-04 Jim Wilson <jimw@sifive.com>
7269 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7271 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7272 and maybe_eh_return. Change regno to unsigned int. Use new args to
7273 handle EH_RETURN_DATA_REGNO registers properly.
7274 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7275 (riscv_expand_epilogue): Update comment. Change argument name and
7276 type. Update code to use new name and type. Pass new args to
7277 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
7279 * config/riscv/riscv.md (NORMAL_RETURN): New.
7280 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7281 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7282 (eh_return): Call gen_eh_return_internal and emit barrier.
7283 (eh_return_internal): Call riscv_expand_epilogue.
7285 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
7287 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7288 bit_insertion field and declare can_be_merged_into method.
7289 (merged_store_group::can_be_merged_into): New method.
7290 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7291 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
7292 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7294 2018-06-04 Richard Biener <rguenther@suse.de>
7296 PR tree-optimization/85955
7297 * builtins.c (fold_builtin_sincos): Convert pointers to
7298 destination to appropriate type before dereferencing.
7300 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
7302 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7304 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
7306 * expr.c (expand_expr_real_1): Force the operand into memory if
7307 its TYPE_MODE is BLKmode and if there is no integer mode for
7308 the number of bits being extracted.
7310 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7314 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7315 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7317 2018-06-04 Richard Biener <rguenther@suse.de>
7319 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7320 (cleanup_tree_cfg_noloop): ... single caller. Do
7321 start_recording_case_labels later.
7323 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
7325 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7326 to _IMMINTRIN_H_INCLUDED.
7327 * config/i386/pconfigintrin.h: Ditto.
7328 * config/i386/waitpkgintrin.h: Ditto.
7329 * config/i386/immintrin.h: Add includes for sgxintrin.h,
7330 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7331 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7332 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7333 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7334 waitpkgintrin.h and cldemoteintrin.h.
7336 2018-06-04 Richard Biener <rguenther@suse.de>
7338 PR tree-optimization/86038
7339 * tracer.c (find_best_successor): Check probability for
7340 being initialized, bail out if not.
7342 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
7345 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7346 of bits to ignore when comparing architectures.
7348 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7350 PR tree-optimization/69615
7351 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7352 maximum or minimum of the type, try to merge it also as if
7353 range1 is + [-, x - 1] or + [x + 1, -].
7356 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7358 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
7360 PR tree-optimization/86034
7361 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7362 the unsigned bitfield type in a bit insertion sequence if it does not
7363 have a larger precision than the bitfield size.
7364 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7366 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
7368 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7370 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7372 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7373 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7374 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7375 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7377 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7379 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7380 Disable -fdelete-null-pointer-checks for ELF toolchain.
7382 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7383 Kito Cheng <kito.cheng@gmail.com>
7385 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7386 (nds32le-*-*, nds32be-*-*): Integrate checking process.
7387 (nds32*-*-*): Add glibc and uclibc conditions.
7388 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7389 (TARGET_EXCEPT_UNWIND_INFO): Define.
7390 * config/nds32/elf.h: New file.
7391 * config/nds32/linux.h: New file.
7392 * config/nds32/nds32-elf.opt: New file.
7393 * config/nds32/nds32-linux.opt: New file.
7394 * config/nds32/nds32-fp-as-gp.c
7395 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7396 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7398 (nds32_asm_file_end): Ditto.
7399 (nds32_print_operand): Ditto.
7400 (nds32_insert_attributes): Ditto.
7401 (nds32_init_libfuncs): New function.
7402 (TARGET_HAVE_TLS): Define.
7403 (TARGET_INIT_LIBFUNCS): Define.
7404 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7406 (TARGET_ELF): Apply different mcmodel setting.
7407 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7408 been migrated into elf.h and linux.h files.
7409 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7410 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7411 (mcmodel): The content has been migrated into nds32-elf.opt and
7412 nds32-linux.opt files.
7413 * config/nds32/t-elf: New file.
7414 * config/nds32/t-linux: New file.
7416 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7417 Shiva Chen <shiva0217@gmail.com>
7419 * config/nds32/constants.md (unspec_volatile_element): Add
7420 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7421 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7423 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7424 (make_pass_nds32_fp_as_gp): Declare.
7425 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7427 (nds32_asm_function_end_prologue): Remove unused asm output.
7428 (nds32_asm_function_begin_epilogue): Remove unused asm output.
7429 (nds32_asm_file_start): Output necessary fp_as_gp information.
7430 (nds32_option_override): Adjust register usage.
7431 (nds32_expand_prologue): Consider fp_as_gp situation.
7432 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7433 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7436 (simple_return): Ditto.
7437 (omit_fp_begin): Output special directive for fp_as_gp.
7438 (omit_fp_end): Output special directive for fp_as_gp.
7439 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7440 mforbid-fp-as-gp): New options.
7442 2018-06-01 Mark Wielaard <mark@klomp.org>
7444 * dwarf2out.c (dwarf2out_finish): Remove generation of
7445 DW_AT_loclists_base.
7447 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7449 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7450 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7451 (struct merged_store_group): Add bit_insertion field.
7452 (dump_char_array): Use standard hexadecimal format.
7453 (merged_store_group::merged_store_group): Set bit_insertion to false.
7454 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7455 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7456 also print the mask in the dump file.
7457 (pass_store_merging::gate): Minor tweak.
7458 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7459 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7460 stores with INTEGER_CST stores.
7461 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7462 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7463 and use it throughout. Generate bit insertion sequences if need be.
7464 (pass_store_merging::process_store): Remove redundant condition.
7465 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7467 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7469 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7470 the 128-bit floating point types. Fix function comment.
7472 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7474 * config/aarch64/aarch64-simd.md
7475 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7477 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7480 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7482 PR tree-optimization/85989
7483 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7485 (backprop::intersect_uses): Check it when deciding whether this
7486 is a backedge reference.
7487 (backprop::process_block): Add each phi to m_visited_phis
7488 after visiting it, then clear it at the end.
7490 2018-06-01 Richard Biener <rguenther@suse.de>
7492 * tree-vectorizer.h (vect_dr_stmt): New function.
7493 (vect_get_load_cost): Adjust.
7494 (vect_get_store_cost): Likewise.
7495 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7496 Use vect_dr_stmt instead of DR_SMTT.
7497 (vect_record_base_alignments): Likewise.
7498 (vect_calculate_target_alignment): Likewise.
7499 (vect_compute_data_ref_alignment): Likewise and make static.
7500 (vect_update_misalignment_for_peel): Likewise.
7501 (vect_verify_datarefs_alignment): Likewise.
7502 (vector_alignment_reachable_p): Likewise.
7503 (vect_get_data_access_cost): Likewise. Pass down
7504 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7505 (vect_get_peeling_costs_all_drs): Likewise.
7506 (vect_peeling_hash_get_lowest_cost): Likewise.
7507 (vect_enhance_data_refs_alignment): Likewise.
7508 (vect_find_same_alignment_drs): Likewise.
7509 (vect_analyze_data_refs_alignment): Likewise.
7510 (vect_analyze_group_access_1): Likewise.
7511 (vect_analyze_group_access): Likewise.
7512 (vect_analyze_data_ref_access): Likewise.
7513 (vect_analyze_data_ref_accesses): Likewise.
7514 (vect_vfa_segment_size): Likewise.
7515 (vect_small_gap_p): Likewise.
7516 (vectorizable_with_step_bound_p): Likewise.
7517 (vect_prune_runtime_alias_test_list): Likewise.
7518 (vect_analyze_data_refs): Likewise.
7519 (vect_supportable_dr_alignment): Likewise.
7520 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7521 (vect_gen_prolog_loop_niters): Likewise.
7522 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7523 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7525 (vect_recog_mask_conversion_pattern): Likewise.
7526 (vect_try_gather_scatter_pattern): Likewise.
7527 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7528 to vect_get_store_cost.
7529 (vect_get_store_cost): Get stmt_info instead of DR.
7530 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7531 (vect_get_load_cost): Get stmt_info instead of DR.
7533 2018-06-01 Richard Biener <rguenther@suse.de>
7536 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7537 vars wrapped in MEM_REFs.
7539 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7541 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7542 Fix subreg tests so that we only return a choice between
7543 GENERAL_REGS and FP_REGS if the original classes included both.
7545 2018-06-01 Richard Biener <rguenther@suse.de>
7548 * tree-ssa-structalias.c (get_function_part_constraint):
7549 Handle NULL fi->decl.
7550 (find_func_aliases_for_call): Properly handle indirect
7551 fi from direct call.
7552 (find_func_clobbers): Likewise.
7553 (ipa_pta_execute): Likewise.
7554 (create_variable_info_for): For functions that are ifunc_resolver
7555 resolve to a varinfo that contains the result of the resolver call.
7556 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7559 2018-05-31 Michael Collison <michael.collison@arm.com>
7561 * config/aarch64/aarch64.md:
7562 (*fix_to_zero_extenddfdi2): New pattern.
7563 * gcc.target/aarch64/fix_extend1.c: New testcase.
7565 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7569 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7570 and BUILT_IN_STRNCMP_EQ.
7571 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7572 BUILT_IN_STRNCMP_EQ.
7573 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7574 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7575 (gimple_fold_builtin): Likewise.
7576 * tree-ssa-strlen.c (compute_string_length): New function.
7577 (determine_min_obsize): New function.
7578 (handle_builtin_string_cmp): New function to handle calls to
7579 string compare functions.
7580 (strlen_optimize_stmt): Add handling to builtin string compare
7582 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7583 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7584 * tree.c (build_common_builtin_nodes): Add new defines of
7585 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7587 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7590 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7591 functions with naked attribute.
7593 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7595 * config/i386/sse.md (avx_vec_concat<mode>):
7596 Substitute concat_tg_mode mode attribute with xtg_mode.
7597 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7598 (concat_tg_mode): Remove mode attribute.
7600 2018-05-31 Martin Sebor <msebor@redhat.com>
7603 * calls.c (alloc_max_size): Correct a logic error/typo.
7604 Treat excessive arguments as infinite. Warn for invalid arguments.
7605 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7607 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7610 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7611 and movx for Haswell.
7613 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7614 Cesar Philippidis <cesar@codesourcery.com>
7617 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7618 when emitting error on private/firstprivate reductions.
7619 * omp-low.c (lower_omp_target): Avoid reference-type processing
7620 on pointers for firstprivate clause.
7622 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7624 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7627 * config/aarch64/aarch64-simd.md
7628 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7629 (aarch64_ld1_x3_<mode>): Likewise
7630 (aarch64_st1x2<VALLDIF:mode>): Likewise
7631 (aarch64_st1_x2_<mode>): Likewise
7632 (aarch64_st1x3<VALLDIF:mode>): Likewise
7633 (aarch64_st1_x3_<mode>): Likewise
7634 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7635 (vld1_s8_x3): Likewise.
7636 (vld1_u16_x3): Likewise.
7637 (vld1_s16_x3): Likewise.
7638 (vld1_u32_x3): Likewise.
7639 (vld1_s32_x3): Likewise.
7640 (vld1_u64_x3): Likewise.
7641 (vld1_s64_x3): Likewise.
7642 (vld1_f16_x3): Likewise.
7643 (vld1_f32_x3): Likewise.
7644 (vld1_f64_x3): Likewise.
7645 (vld1_p8_x3): Likewise.
7646 (vld1_p16_x3): Likewise.
7647 (vld1_p64_x3): Likewise.
7648 (vld1q_u8_x3): Likewise.
7649 (vld1q_s8_x3): Likewise.
7650 (vld1q_u16_x3): Likewise.
7651 (vld1q_s16_x3): Likewise.
7652 (vld1q_u32_x3): Likewise.
7653 (vld1q_s32_x3): Likewise.
7654 (vld1q_u64_x3): Likewise.
7655 (vld1q_s64_x3): Likewise.
7656 (vld1q_f16_x3): Likewise.
7657 (vld1q_f32_x3): Likewise.
7658 (vld1q_f64_x3): Likewise.
7659 (vld1q_p8_x3): Likewise.
7660 (vld1q_p16_x3): Likewise.
7661 (vld1q_p64_x3): Likewise.
7662 (vst1_s64_x2): Likewise.
7663 (vst1_u64_x2): Likewise.
7664 (vst1_f64_x2): Likewise.
7665 (vst1_s8_x2): Likewise.
7666 (vst1_p8_x2): Likewise.
7667 (vst1_s16_x2): Likewise.
7668 (vst1_p16_x2): Likewise.
7669 (vst1_s32_x2): Likewise.
7670 (vst1_u8_x2): Likewise.
7671 (vst1_u16_x2): Likewise.
7672 (vst1_u32_x2): Likewise.
7673 (vst1_f16_x2): Likewise.
7674 (vst1_f32_x2): Likewise.
7675 (vst1_p64_x2): Likewise.
7676 (vst1q_s8_x2): Likewise.
7677 (vst1q_p8_x2): Likewise.
7678 (vst1q_s16_x2): Likewise.
7679 (vst1q_p16_x2): Likewise.
7680 (vst1q_s32_x2): Likewise.
7681 (vst1q_s64_x2): Likewise.
7682 (vst1q_u8_x2): Likewise.
7683 (vst1q_u16_x2): Likewise.
7684 (vst1q_u32_x2): Likewise.
7685 (vst1q_u64_x2): Likewise.
7686 (vst1q_f16_x2): Likewise.
7687 (vst1q_f32_x2): Likewise.
7688 (vst1q_f64_x2): Likewise.
7689 (vst1q_p64_x2): Likewise.
7690 (vst1_s64_x3): Likewise.
7691 (vst1_u64_x3): Likewise.
7692 (vst1_f64_x3): Likewise.
7693 (vst1_s8_x3): Likewise.
7694 (vst1_p8_x3): Likewise.
7695 (vst1_s16_x3): Likewise.
7696 (vst1_p16_x3): Likewise.
7697 (vst1_s32_x3): Likewise.
7698 (vst1_u8_x3): Likewise.
7699 (vst1_u16_x3): Likewise.
7700 (vst1_u32_x3): Likewise.
7701 (vst1_f16_x3): Likewise.
7702 (vst1_f32_x3): Likewise.
7703 (vst1_p64_x3): Likewise.
7704 (vst1q_s8_x3): Likewise.
7705 (vst1q_p8_x3): Likewise.
7706 (vst1q_s16_x3): Likewise.
7707 (vst1q_p16_x3): Likewise.
7708 (vst1q_s32_x3): Likewise.
7709 (vst1q_s64_x3): Likewise.
7710 (vst1q_u8_x3): Likewise.
7711 (vst1q_u16_x3): Likewise.
7712 (vst1q_u32_x3): Likewise.
7713 (vst1q_u64_x3): Likewise.
7714 (vst1q_f16_x3): Likewise.
7715 (vst1q_f32_x3): Likewise.
7716 (vst1q_f64_x3): Likewise.
7717 (vst1q_p64_x3): Likewise.
7719 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7721 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7722 user_label_prefix to name.
7724 * tree-core.h: Update comment about the format of NAME string
7725 passed to handler in attribute_spec.
7727 * config/msp430/msp430.md: Remove erroneous subreg expression from
7728 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7729 zero_extend{q,h}isi2.
7731 2018-05-30 Borislav Petkov <bp@suse.de>
7733 * doc/extend.texi: Document some architecture specific
7734 constraints and sort entries.
7736 2018-05-30 Martin Sebor <msebor@redhat.com>
7739 * builtins.c (expand_builtin_stpcpy_1): New function.
7740 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7741 only if the former succeeds.
7743 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7745 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7748 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7750 * doc/invoke.texi (-flinker-output): Document
7752 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7754 * passes.c (ipa_write_summaries): Only modify statements if body
7756 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7757 incrementally linking.
7758 (ipa_passes): Likewise.
7759 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7760 pass down resolution info.
7761 * common.opt (flag_incremental_link): Update info.
7762 * gcc.c (plugin specs): Turn flinker-output=* to
7763 -plugin-opt=-linker-output-known
7764 * toplev.c (compile_file): Also cut compilation when doing incremental
7766 * flag-types. (enum lto_partition_model): Add
7767 LTO_LINKER_OUTPUT_NOLTOREL.
7768 (invoke.texi): Add -flinker-output docs.
7769 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7770 link same way as WPA; do not stream in dead initializers.
7772 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7773 darf2out_register_external_decl): Support incremental link.
7775 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7777 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7779 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7781 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7782 it down to simple_object_copy_lto_debug_sections.
7783 (run_gcc): Determine incremental LTO link time and configure
7784 lto1 into non-wpa mode, disable renaming of debug sections.
7786 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7788 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7789 descriptions of various incorrectly documented functions.
7791 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7794 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7795 address check not strict.
7797 2018-05-30 Richard Biener <rguenther@suse.de>
7799 PR tree-optimization/85964
7800 * tracer.c (better_p): Drop initialized count check, we only
7801 call the function with initialized counts now.
7802 (find_best_successor): Do find a best edge if one
7803 has uninitialized count.
7804 (find_best_predecessor): Likewise. Do BB frequency check only
7805 if count is initialized.
7807 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7809 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7810 (aarch64_ldrstr_offset_compare): New.
7811 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7812 load/store orderings.
7813 (aarch64_gen_adjusted_ldpstp): Likewise.
7815 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7817 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7818 Check for subset of GENERAL_REGS and FP_REGS.
7819 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7822 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7824 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7825 and wi::to_poly_offset. Add the current offset and then check
7826 whether the sum fits, rather than using an unchecked addition of
7827 a checked term. Check for a shwi rather than a uhwi.
7828 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7829 (store_constructor): Use poly_int_tree_p.
7830 (expand_expr_real_1): Likewise.
7831 * function.c (assign_temp): Likewise.
7832 * fold-const.c (const_binop): Use poly_int_tree_p and
7834 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7836 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7837 to_poly_offset for MEM offsets.
7838 * ipa-icf.c (sem_variable::equals): Likewise.
7839 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7840 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7841 wi::to_poly_offset for BIT_FIELD_REF offsets.
7842 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7844 * var-tracking.c (emit_note_insn_var_location): Use
7845 tree_to_poly_uint64.
7847 2018-05-29 Jim Wilson <jimw@sifive.com>
7849 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7851 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7854 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7855 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7857 (sse4_1_round<mode>2): Use nonimmediate_operand
7858 for operand 1 predicate.
7860 2018-05-29 Martin Sebor <msebor@redhat.com>
7861 Richard Biener <rguenther@suse.de>
7864 * calls.c (get_size_range): Call determine_value_range instead
7865 of get_value_range..
7866 * tree-vrp.h (determine_value_range): Declared new function.
7867 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7869 2018-05-29 Richard Biener <rguenther@suse.de>
7871 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7872 sure to use non-pattern stmts for get_earlier_stmt arguments.
7873 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7874 called on pattern stmts.
7875 (get_later_stmt): Likewise.
7877 2018-05-29 Martin Liska <mliska@suse.cz>
7879 PR gcov-profile/85759
7880 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7883 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7885 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7887 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7891 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7892 VEC_PACK_FLOAT_EXPR): New tree codes.
7893 * tree-pretty-print.c (op_code_prio): Handle
7894 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7895 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7896 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7897 * tree-inline.c (estimate_operator_cost): Likewise.
7898 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7899 * fold-const.c (const_binop): Likewise.
7900 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7901 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7902 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7903 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7904 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7905 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7906 * expr.c (expand_expr_real_2): Likewise.
7907 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7908 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7909 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7911 * optabs.c (expand_widen_pattern_expr): For
7912 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7913 sign from result type rather than operand's type.
7914 (expand_binop_directly): For vec_packu_float_optab and
7915 vec_packs_float_optab allow result type to be different from operand's
7917 * optabs-tree.c (optab_for_tree_code): Handle
7918 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7919 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7920 * tree-vect-generic.c (expand_vector_operations_1): Handle
7921 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7922 VEC_PACK_FLOAT_EXPR.
7923 * tree-vect-stmts.c (supportable_widening_operation): Handle
7925 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7926 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7927 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7928 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7929 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7931 (vec_pack<floatprefix>_float_<mode>): New expander.
7932 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7934 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7935 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7936 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7937 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7938 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7940 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7941 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7942 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7943 VEC_PACK_FLOAT_EXPR): Document.
7945 2018-05-29 Richard Biener <rguenther@suse.de>
7947 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7949 (stmt_vec_info_vec): Make pointer.
7950 (init_stmt_vec_info_vec): Remove.
7951 (free_stmt_vec_info_vec): Likewise.
7952 (set_stmt_vec_info_vec): New function.
7953 (free_stmt_vec_infos): Likewise.
7954 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7955 (set_vinfo_for_stmt): Likewise.
7956 (get_earlier_stmt): Likewise.
7957 (get_later_stmt): Likewise.
7958 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7959 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7960 (vec_info::~vec_info): Free stmt_vec_infos.
7961 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7962 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7963 (pass_slp_vectorize::execute): Likewise.
7964 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7965 (free_stmt_vec_info_vec): Likewise.
7966 (set_stmt_vec_info_vec): New function.
7967 (free_stmt_vec_infos): Likewise.
7968 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7969 the global stmt_vec_info_vec.
7970 * tree-parloops.c (gather_scalar_reductions): Use
7971 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7974 2018-05-29 Richard Biener <rguenther@suse.de>
7976 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7978 2018-05-29 Martin Liska <mliska@suse.cz>
7979 David Malcolm <dmalcolm@redhat.com>
7981 * vec.c (test_reverse): New.
7982 (vec_c_tests): Add new test.
7983 * vec.h (vl_ptr>::reverse): New function.
7985 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7987 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7989 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7992 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7994 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7996 2018-05-28 Richard Biener <rguenther@suse.de>
7998 PR tree-optimization/85933
7999 * tree-vect-data-refs.c (vect_record_base_alignments): Only
8000 look at stmts marked as vectorizable.
8002 2018-05-28 Richard Biener <rguenther@suse.de>
8004 PR tree-optimization/85934
8005 * tree-vect-generic.c (expand_vector_operations_1): Hoist
8006 vector boolean check before scalar optimization.
8008 2018-05-28 Jakub Jelinek <jakub@redhat.com>
8010 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8013 2018-05-28 Mark Wielaard <mark@klomp.org>
8015 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8016 if it is an expression containing a minus sign.
8018 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
8020 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8022 2018-05-27 Paul Koning <ni1d@arrl.net>
8024 * config/pdp11/pdp11.md (truncsihi2): Remove.
8026 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
8027 Chung-Ju Wu <jasonwucj@gmail.com>
8029 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8031 (unaligned_store_dw): Ditto.
8032 * config/nds32/nds32-memory-manipulation.c
8033 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8034 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8035 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8036 (emit_setmem_word_loop): Rename to ...
8037 (emit_setmem_doubleword_loop): ... this.
8038 (nds32_gen_dup_4_byte_to_word_value): New function.
8039 (nds32_gen_dup_8_byte_to_double_word_value): New function.
8040 (nds32_expand_setmem_loop): Refine implementation.
8041 (nds32_expand_setmem_loop_v3m): Ditto.
8042 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8045 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8047 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8049 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8051 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8052 (nds32_init_machine_status): Initialize machine->attr_naked_p and
8053 machine->attr_no_prologue_p.
8054 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8055 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8056 (nds32_expand_epilogue): Consider attr_naked_p.
8057 (nds32_expand_epilogue_v3pop): Likewise.
8058 (nds32_can_use_return_insn): Likewise.
8059 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8060 attr_no_prologue_p fields.
8061 * config/nds32/nds32.opt (mret-in-naked-func): New option.
8063 2018-05-27 Jakub Jelinek <jakub@redhat.com>
8066 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8068 * config/i386/sse.md
8069 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8071 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8073 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8075 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8077 (*<floatsuffix>floatv2div2sf2): Rename to ...
8078 (*float<floatunssuffix>v2div2sf2): ... this.
8079 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8080 (float<floatunssuffix>v2div2sf2_mask): ... this.
8081 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8082 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8083 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8085 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8087 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8089 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8091 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8093 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8095 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8096 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8097 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8098 gen_ufix_truncv8dfv8si2.
8099 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8100 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8101 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8102 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8103 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8104 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8105 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8106 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8108 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8112 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8114 2018-05-25 Jim Wilson <jimw@sifive.com>
8116 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8117 * config/riscv/riscv.c (struct machine_function): Add
8118 interrupt_handler_p and attribute_checked_p fields.
8119 (riscv_attribute_table): Add interrupt.
8120 (riscv_interrupt_type_p): New.
8121 (riscv_save_reg_p): Save extra regs for interrupt handler.
8122 (riscv_use_save_libcall): Return false for interrupt handler.
8123 (riscv_first_stack_step): Add forward declaration.
8124 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
8125 for interrupt handler with large frame. Use it for saved reg list.
8126 (riscv_expand_prologue): Move flag_stack_usage_info support to
8127 eliminate duplication.
8128 (riscv_expand_epilogue): Generate mret for interrupt handler.
8129 (riscv_epilogue_uses): New.
8130 (riscv_can_use_return_insn): Return false for interrupt handler.
8131 (riscv_function_ok_for_sibcall): Likewise.
8132 (riscv_set_current_function): Add interrupt handler support.
8133 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8134 * config/riscv/riscv.md (UNSPECV_MRET): New.
8136 (riscv_frflags, riscv_fsflags): Use tab after opcode.
8138 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8140 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
8142 PR tree-optimization/85712
8143 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8144 this candidate has already been replaced in-situ by a copy.
8146 2018-05-25 Jason Merrill <jason@redhat.com>
8148 PR c++/80485 - inline function non-zero address.
8149 * symtab.c (nonzero_address): Check DECL_COMDAT.
8151 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
8154 * config/alpha/alpha.md (ashlsi3): New insn pattern.
8155 (*ashlsi_se): Rename from *ashldi_se. Define as sign
8156 extension of SImode operation. Use const123_operand predicate.
8157 (*saddsi_1): Remove.
8158 (*saddl_se_1): Ditto.
8160 (*ssubl_se_1): Ditto.
8161 * config/alpha/predicates.md (const123_operand): New predicate.
8162 * config/alpha/constraints.md (P): Use IN_RANGE.
8164 2018-05-25 Richard Biener <rguenther@suse.de>
8166 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8168 (ref_maybe_used_by_stmt_p): Likewise.
8169 (stmt_may_clobber_ref_p): Likewise.
8170 (stmt_may_clobber_ref_p_1): Likewise.
8171 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8173 (ref_maybe_used_by_stmt_p): Likewise.
8174 (stmt_may_clobber_ref_p): Likewise.
8175 (stmt_may_clobber_ref_p_1): Likewise.
8176 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8177 the alias oracle to disambiguate DRs with stmts DR analysis
8179 (vect_analyze_data_refs): Do not give up on not analyzable
8180 DRs for BB vectorization. Remove code truncating the dataref
8183 2018-05-25 Jakub Jelinek <jakub@redhat.com>
8186 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8187 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
8188 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8190 2018-05-25 Richard Biener <rguenther@suse.de>
8192 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8193 function, combining stmt data ref gathering and fatal analysis
8195 (vect_analyze_data_refs): Remove now redudnant code and simplify.
8196 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8197 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8198 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8199 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8201 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8203 PR tree-optimization/85720
8204 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8205 SCC if all partitions are builtins.
8206 (version_loop_by_alias_check): New parameter. Generate cancelable
8207 runtime alias check if all partitions are builtins.
8208 (distribute_loop): Update call to above function.
8210 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8212 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8213 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8214 (parm_default_def_partition_arg): Ditto.
8215 (set_parm_default_def_partition): Ditto.
8216 (get_parm_default_def_partitions): Ditto and make it static.
8217 (get_undefined_value_partitions): Ditto and make it static.
8218 (remove_ssa_form): Refactor call to init_var_map here.
8219 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8220 computation for loop region.
8221 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8222 (register_default_def): Delete.
8223 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8224 (parm_default_def_partition_arg): Ditto.
8225 (set_parm_default_def_partition): Ditto.
8226 (get_parm_default_def_partitions): Ditto and make it static.
8227 (get_undefined_value_partitions): Ditto and make it static.
8228 (coalesce_with_default, coalesce_with_default): Update comment.
8229 (create_coalesce_list_for_region): New func factored out from
8230 create_outofssa_var_map.
8231 (populate_coalesce_list_for_outofssa): New func factored out from
8232 create_outofssa_var_map and coalesce_ssa_name.
8233 (create_outofssa_var_map): Delete.
8234 (coalesce_ssa_name): Refactor to support live range computation.
8235 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8236 (get_parm_default_def_partitions): Delete.
8237 (get_undefined_value_partitions): Ditto.
8238 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8239 computation for loop region.
8240 (new_tree_live_info, loe_visit_block): Ditto.
8241 (live_worklist, set_var_live_on_entry): Ditto.
8242 (calculate_live_on_exit, verify_live_on_entry): Ditto.
8243 * tree-ssa-live.h (struct _var_map): New fields.
8244 (init_var_map): Change decl.
8245 (region_contains_p): New.
8247 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8249 * tree-ssa-live.h (live_merge_and_clear): Delete.
8251 2018-05-25 Richard Biener <rguenther@suse.de>
8254 * tree-dump.c (dequeue_and_dump): Remove access to removed
8255 operand 2 of a SWITCH_EXPR.
8257 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8259 * doc/sourcebuild.texi (vect_double_cond_arith): Include
8260 multiplication and division.
8261 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8262 (cond_udiv@var{m}, cond_umod@var{m}): Document.
8263 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8264 (cond_udiv_optab, cond_umod_optab): New optabs.
8265 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8266 (IFN_COND_RDIV): New internal functions.
8267 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8268 TRUNC_MOD_EXPR and RDIV_EXPR.
8269 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8270 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8272 (SVE_INT_BINARY): Include mult.
8273 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8274 (optab, sve_int_op): Handle mult.
8275 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8277 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8278 for SVE_INT_BINARY_SD.
8280 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8282 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8283 (optab, sve_int_op): Handle div and udiv.
8284 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8285 for SVE_INT_BINARY_SD.
8286 (*<optab><mode>3): New insn for the same.
8288 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8290 * tree-vect-patterns.c: Include predict.h.
8291 (vect_recog_divmod_pattern): Restrict check for division support
8292 to when optimizing for size.
8294 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8296 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8297 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8298 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8299 (gimple_match_op::set_op): Likewise.
8300 (gimple_resimplify4): Declare.
8301 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8302 (expr::gen_transform): Likewise.
8303 (decision_tree::gen): Generate a simplification routine for 4 operands.
8304 * gimple-match-head.c (gimple_simplify): Add an overload for
8305 4 operands. In the top-level function, handle up to 4 call
8306 arguments and call gimple_resimplify4.
8307 (gimple_resimplify4): New function.
8308 (build_call_internal): Pass a fourth operand.
8309 (maybe_push_to_seq): Likewise.
8310 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8311 Fold VEC_COND_EXPRs of an operation and a default value into
8312 an IFN_COND_* function if possible.
8313 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8315 (SVE_COND_FP_BINARY): Include them.
8316 (optab, sve_fp_op): Handle them.
8317 (SVE_INT_BINARY_REV): New code iterator.
8318 (SVE_COND_FP_BINARY_REV): New int iterator.
8319 (commutative): New int attribute.
8320 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8322 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8324 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8325 (*cond_<optab><mode>): New patterns for reversed operands.
8327 2018-05-25 Richard Biener <rguenther@suse.de>
8329 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8330 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8331 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8332 (STMT_VINFO_GROUPED_ACCESS): Adjust.
8333 * tree-vect-data-refs.c (everywhere): Adjust users.
8334 * tree-vect-loop.c (everywhere): Likewise.
8335 * tree-vect-slp.c (everywhere): Likewise.
8336 * tree-vect-stmts.c (everywhere): Likewise.
8337 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8339 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8341 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8343 (gcc_cv_as_section_exclude): ... this.
8344 Try Solaris as #exclude syntax.
8345 * configure: Regenerate.
8346 * config.in: Regenerate.
8347 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8349 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8350 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8352 * varasm.c (default_elf_asm_named_section): Don't check if
8353 HAVE_GAS_SECTION_EXCLUDE is defined.
8355 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8357 * doc/md.texi: Update the documentation of the cond_* optabs
8358 to mention the new final operand. Fix GET_MODE_NUNITS call.
8359 Describe the scalar case too.
8360 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8361 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8363 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8364 (get_conditional_internal_fn): Update comment.
8365 * tree-vect-loop.c (vectorizable_reduction): Pass the original
8366 accumulator value as a final argument to conditional functions.
8367 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8368 a define_expand and add an "else" operand. Assert for now that
8369 the else operand is equal to operand 2. Use SVE_INT_BINARY and
8370 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8371 (*cond_<optab><mode>): New patterns.
8372 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8373 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8374 (UNSPEC_COND_EOR): Delete.
8375 (optab): Remove associated mappings.
8376 (SVE_INT_BINARY): New code iterator.
8377 (sve_int_op): Remove int attribute and add "minus" to the code
8379 (SVE_COND_INT_OP): Delete.
8380 (SVE_COND_FP_OP): Rename to...
8381 (SVE_COND_FP_BINARY): ...this.
8383 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8385 * optabs.c (can_reuse_operands_p): New function.
8386 (maybe_legitimize_operands): Try to reuse the results for
8389 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8391 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8392 Add {q} suffix to insn mnemonic.
8394 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8396 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8397 (msp430_warn_func_return): New.
8399 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
8401 * fold-const.c (tree_nonzero_bits): New function.
8402 * fold-const.h (tree_nonzero_bits): Likewise.
8403 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8404 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8406 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8410 * varasm.c (assemble_alias): Check ifunc_resolver only on
8413 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8416 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8417 when memory input operand is handled.
8419 2018-05-24 Luis Machado <luis.machado@linaro.org>
8421 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8423 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8425 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8427 * match.pd: Delay FMA folds until after vectorization.
8429 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
8432 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8433 address check not strict.
8435 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8437 * gimple-match.h (gimple_match_op): New class.
8438 (mprts_hook): Replace parameters with a gimple_match_op *.
8439 (maybe_build_generic_op): Likewise.
8440 (gimple_simplified_result_is_gimple_val): Replace parameters with
8441 a const gimple_match_op *.
8442 (gimple_simplify): Replace code_helper * and tree * parameters with
8443 a gimple_match_op * parameter.
8444 (gimple_resimplify1): Replace code_helper *, tree and tree *
8445 parameters with a gimple_match_op * parameter.
8446 (gimple_resimplify2): Likewise.
8447 (gimple_resimplify3): Likewise.
8448 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8449 parameters with a gimple_match_op * parameter.
8450 * gimple-match-head.c (gimple_simplify): Change prototypes of
8451 auto-generated functions to take a gimple_match_op * instead of
8452 separate code_helper * and tree * parameters. Make the same
8453 change in the top-level overload and update calls to the
8454 gimple_resimplify routines. Update calls to the auto-generated
8455 functions and to maybe_push_res_to_seq in the publicly-facing
8456 operation-specific gimple_simplify overloads.
8457 (gimple_match_op::MAX_NUM_OPS): Define.
8458 (gimple_resimplify1): Replace rcode and ops with a single res_op
8459 parameter. Update call to gimple_simplify.
8460 (gimple_resimplify2): Likewise.
8461 (gimple_resimplify3): Likewise.
8462 (mprts_hook): Replace parameters with a gimple_match_op *.
8463 (maybe_build_generic_op): Likewise.
8464 (build_call_internal): Replace type, nargs and ops with
8465 a gimple_match_op *.
8466 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8467 with a single gimple_match_op *. Update calls to mprts_hook,
8468 build_call_internal and gimple_simplified_result_is_gimple_val.
8469 Factor out code that is common to the tree_code and combined_fn cases.
8470 * genmatch.c (expr::gen_transform): Replace tem_code and
8471 tem_ops with a gimple_match_op called tem_op. Update calls
8472 to the gimple_resimplify functions and maybe_push_res_to_seq.
8473 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8474 res_ops. Update call to the gimple_resimplify functions.
8475 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8476 (decision_tree::gen): Make the functions take a gimple_match_op *
8477 called res_op instead of separate res_code and res_ops parameters.
8478 Update call accordingly.
8479 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8480 and ops with a single res_op parameter. Update calls to
8481 maybe_build_generic_op and maybe_push_res_to_seq.
8482 (fold_stmt_1): Update calls to gimple_simplify and
8483 replace_stmt_with_simplification.
8484 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8485 and gimple_simplified_result_is_gimple_val.
8486 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8488 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8489 with a gimple_match_op *.
8490 (vn_nary_build_or_lookup): Likewise. Update call to
8491 vn_nary_build_or_lookup_1.
8492 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8493 gimple_match_op *. Update calls to the gimple_resimplify routines
8494 and to gimple_simplified_result_is_gimple_val.
8495 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8496 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8497 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8498 (visit_nary_op): Likewise.
8499 (visit_reference_op_load): Likewise.
8501 2018-05-23 Luis Machado <luis.machado@linaro.org>
8503 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8504 modifier for printing the step amount.
8506 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8509 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8512 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8514 * doc/sourcebuild.texi (Endianness): New subsubsection.
8516 2018-05-23 Luis Machado <luis.machado@linaro.org>
8518 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8519 <prefetch_dynamic_strides>: New const bool field.
8520 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8521 prefetch_dynamic_strides.
8522 (exynosm1_prefetch_tune): Likewise.
8523 (thunderxt88_prefetch_tune): Likewise.
8524 (thunderx_prefetch_tune): Likewise.
8525 (thunderx2t99_prefetch_tune): Likewise.
8526 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8528 (aarch64_override_options_internal): Update to set
8529 PARAM_PREFETCH_DYNAMIC_STRIDES.
8530 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8531 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8532 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8533 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8534 prefetch-dynamic-strides setting.
8536 2018-05-23 Luis Machado <luis.machado@linaro.org>
8538 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8539 <minimum_stride>: New const int field.
8540 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8541 minimum_stride field defaulting to -1.
8542 (exynosm1_prefetch_tune): Likewise.
8543 (thunderxt88_prefetch_tune): Likewise.
8544 (thunderx_prefetch_tune): Likewise.
8545 (thunderx2t99_prefetch_tune): Likewise.
8546 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8547 <default_opt_level>: Set to 3.
8548 (aarch64_override_options_internal): Update to set
8549 PARAM_PREFETCH_MINIMUM_STRIDE.
8550 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8551 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8552 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8553 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8554 stride is constant and is below the minimum stride threshold.
8556 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8558 * config/arm/arm-cpus.in (mode26): Delete.
8559 (armv4): Delete mode26 reference.
8560 * config/arm/arm.c (arm_configure_build_target): Delete use of
8563 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8565 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8567 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8568 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8570 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8571 (floatunsdidf2): Ditto.
8573 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8575 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8576 (fixuns_trunc<mode>si2_avx512f): Ditto.
8577 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8578 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8579 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8581 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8583 PR rtl-optimization/79985
8584 * df-scan.c (df_insn_refs_collect): Remove special case for
8585 global registers and asm statements.
8587 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8589 * extend.texi (Global Register Variables): Rewrite the bullet list.
8590 Note that the register is available for allocation. Note that access
8591 via inline asm must use constraints. Add note about async-signal
8592 handlers. Remove paragraph about automagic register selection.
8594 2018-05-23 Richard Biener <rguenther@suse.de>
8596 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8597 of fixed offset from memset VN.
8599 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8601 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8603 (alloc_cand_and_find_basis): Initialize first_interp field.
8604 (slsr_process_mul): Modify first_interp field.
8605 (slsr_process_add): Likewise.
8606 (slsr_process_cast): Modify first_interp field for each new
8608 (slsr_process_copy): Likewise.
8609 (dump_candidate): Dump first_interp field.
8610 (replace_mult_candidate): Process all interpretations, not just
8612 (replace_rhs_if_not_dup): Likewise.
8613 (replace_one_candidate): Likewise.
8615 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8617 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8619 (aarch64_needs_frame_chain): New function.
8620 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8622 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8625 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8626 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8627 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8628 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8629 as true for strict-align.
8630 (aarch64_can_inline_p): Perform checks even when callee has no
8631 attributes to check for strict alignment.
8632 * doc/extend.texi (AArch64 Function Attributes): Document
8634 * doc/invoke.texi: (AArch64 Options): Likewise.
8636 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8638 PR tree-optimization/85853
8639 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8640 the handling of the root of the node to...
8641 (vect_slp_analyze_node_operations_1): ...this new function,
8642 and run the whole thing with the child nodes' def types
8643 set according to their SLP node's def type.
8645 2018-05-23 Richard Biener <rguenther@suse.de>
8648 * tree-data-ref.c (create_runtime_alias_checks): Defer
8649 and ignore overflow warnings.
8651 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8653 PR tree-optimization/85822
8654 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8657 2018-05-23 Richard Biener <rguenther@suse.de>
8659 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8660 memset constants via native_interpret_expr.
8662 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8665 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8667 (cgraph_node::create_alias): Likewise.
8668 (cgraph_node::get_availability): Check ifunc_resolver instead
8669 of looking up ifunc attribute.
8670 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8671 * varasm.c (do_assemble_alias): Likewise.
8672 (assemble_alias): Likewise.
8673 (default_binds_local_p_3): Likewise.
8674 * cgraph.h (cgraph_node): Add ifunc_resolver.
8675 (cgraph_node::only_called_directly_or_aliased_p): Return false
8677 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8679 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8680 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8681 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8682 instead of looking up ifunc attribute.
8684 2018-05-22 Luis Machado <luis.machado@linaro.org>
8686 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8688 2018-05-22 Martin Sebor <msebor@redhat.com>
8691 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8692 only when expasion succeeds.
8693 (expand_builtin_strcmp): Same.
8694 (expand_builtin_strncmp): Same.
8696 2018-05-22 Martin Sebor <msebor@redhat.com>
8698 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8700 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8701 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8703 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8704 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8706 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8707 Add check for legitimate_address.
8708 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8709 (aarch64_swap_ldrstr_operands): New.
8710 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8713 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8714 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8716 * config/aarch64/aarch64.md: New patterns to generate stp
8718 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8719 single words and double words.
8720 (load_pair_sw, load_pair_dw): Likewise.
8721 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8723 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8725 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8726 for different mode ldpstp and add peephole for merged zero stores.
8728 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8730 (aarch64_gen_store_pair): Rename calls to match new patterns.
8731 (aarch64_gen_load_pair): Rename calls to match new patterns.
8732 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8733 (load_pair<DREG:mode><DREG2:mode>): ... This.
8734 (store_pair<mode>): Rename to...
8735 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8736 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8738 (V_INT_EQUIV): Handle SImode.
8739 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8742 2018-05-22 Martin Sebor <msebor@redhat.com>
8745 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8746 or ajust the presumed bound on an operation to avoid unnecessary
8749 2018-05-22 Martin Sebor <msebor@redhat.com>
8751 PR tree-optimization/85826
8752 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8753 assuming that a DECL necesarily has a constant size.
8755 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8758 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8760 2018-05-22 Richard Biener <rguenther@suse.de>
8762 PR tree-optimization/85834
8763 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8764 non-constant and non-zero memset arguments.
8766 2018-05-22 Martin Liska <mliska@suse.cz>
8769 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8771 2018-05-22 Richard Biener <rguenther@suse.de>
8773 PR tree-optimization/85863
8774 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8775 comparisons when vectype is specified.
8776 (vectorizable_condition): Do not specify vectype for
8777 vect_is_simple_cond when SLP vectorizing.
8779 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8782 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8783 define __ibm128 as long double.
8784 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8785 as a distinct type when IEEE 128-bit support is enabled.
8786 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8787 128-bit types to use the correct functions.
8788 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8789 convert between 128-bit floating point types that have different
8790 modes but the same representation, instead of using gen_lowpart to
8792 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8794 (IFKF_reg): New attributes to give the register constraints for
8796 (extend<mode>tf2_internal): New insns to mark an explicit
8797 conversion between 128-bit floating point types that have a
8798 different mode but share the same representation.
8800 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8802 PR tree-optimization/85814
8803 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8804 a null return from get_strinfo when unsharing the next
8805 strinfo in the chain.
8807 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8810 * varasm.c (weak_finish): Clean up weak_decls.
8812 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8814 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8815 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8816 UNSPEC_UADALP values.
8817 * config/aarch64/iterators.md (ABAL): New int iterator.
8820 (sur): Add mappings for the above.
8821 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8823 (aarch64_<sur>abal<mode>_4): Likewise.
8824 (aarch64_<sur>adalp<mode>_3): Likewise.
8825 (<sur>sadv16qi): New define_expand.
8827 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8829 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8830 (*movdf_internal): Ditto.
8831 (*rcpsf2_sse): Ditto.
8832 (*rsqrtsf2_sse): Ditto.
8833 (*sqrt<mode>2_sse): Ditto.
8835 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8837 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8839 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8840 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8841 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8842 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8844 * config/aarch64/arm_neon.h: Likewise.
8845 * config/aarch64/iterators.md (VQ_I): New.
8847 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8849 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8851 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8854 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8856 * config/nds32/constraints.md (S): New constraint.
8857 * config/nds32/nds32.md (call_internal): Use constraint S.
8858 (call_value_internal): Likewise.
8859 (sibcall_internal): Likewise.
8860 (sibcall_value_internal): Likewise.
8862 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8863 Chung-Ju Wu <jasonwucj@gmail.com>
8865 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8868 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8869 Chung-Ju Wu <jasonwucj@gmail.com>
8871 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8872 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8873 (nds32_rtx_costs_impl): Simplify.
8874 (nds32_address_cost_impl): Simplify.
8875 (nds32_init_rtx_costs): New function.
8876 (nds32_rtx_costs_speed_prefer): Likewise.
8877 (nds32_rtx_costs_size_prefer): Likewise.
8878 (nds32_address_cost_speed_prefer): Likewise.
8879 (nds32_address_cost_speed_fwprop): Likewise.
8880 (nds32_address_cost_size_prefer): Likewise.
8881 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8882 * config/nds32/nds32.c (nds32_option_override): Use
8883 nds32_init_rtx_costs function.
8885 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8887 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8888 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8889 (TARGET_PIPELINE_N8): Likewise.
8890 (TARGET_PIPELINE_N10): Likewise.
8891 (TARGET_PIPELINE_N13): Likewise.
8892 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8894 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8896 * config/nds32/nds32-fpu.md: Update copyright year.
8898 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8900 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8902 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8904 * config/nds32/nds32.c
8905 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8906 * config/nds32/nds32.opt (minline-asm-r15): New option.
8908 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8910 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8912 * config/nds32/nds32.md (abssi2): New pattern.
8914 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8916 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8917 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8918 Merge insn pattern from sse_cvtsi2ss<round_name> and
8919 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8920 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8921 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8922 using SWI48 mode iterator.
8923 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8924 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8925 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8926 pattern from sse_cvttss2si<round_saeonly_name>
8927 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8928 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8929 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8930 using SWI48 mode iterator.
8931 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8932 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8933 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8934 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8935 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8936 using SWI48 mode iterator.
8937 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8938 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8939 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8940 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8941 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8942 SWI48 mode iterator.
8943 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8944 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8945 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8946 pattern from sse_cvttsd2si<round_saeonly_name>
8947 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8949 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8951 * config/nds32/nds32-md-auxiliary.c
8952 (nds32_valid_smw_lwm_base_p): Refine.
8953 (nds32_output_smw_single_word): Refine.
8954 (nds32_output_smw_double_word): New.
8955 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8957 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8959 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8960 (nds32_output_stack_pop): Refine.
8961 (nds32_expand_unaligned_load): Refine.
8962 (nds32_expand_unaligned_store): Refine.
8964 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8965 Chung-Ju Wu <jasonwucj@gmail.com>
8967 * config/nds32/constants.md: Add TP_REGNUM constant.
8968 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8969 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8971 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8972 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8973 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8974 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8975 and PIC code generation.
8976 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8978 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8980 * config/nds32/nds32.md: Support TLS and PIC.
8981 * config/nds32/nds32.c: Support TLS and PIC.
8982 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8983 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8986 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8988 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8989 mode with E_ prefix.
8991 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8992 Chung-Ju Wu <jasonwucj@gmail.com>
8994 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8995 * config/nds32/nds32-md-auxiliary.c
8996 (symbolic_reference_mentioned_p): New.
8997 (nds32_legitimize_ict_address): New.
8998 (nds32_expand_ict_move): New.
8999 (nds32_indirect_call_referenced_p): New.
9000 (nds32_symbol_binds_local_p): Delete.
9001 (nds32_long_call_p): Modify.
9002 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9003 * config/nds32/nds32-protos.h
9004 (symbolic_reference_mentioned_p): Declare.
9005 (nds32_legitimize_ict_address): Declare.
9006 (nds32_expand_ict_move): Declare.
9007 (nds32_indirect_call_referenced_p): Declare.
9008 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9009 (nds32_relax_group): Use nds32_ict_const_p as condition.
9010 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9011 (nds32_asm_file_start): Output ict_model directive in asm code.
9012 (nds32_legitimate_address_p): Consider indirect call.
9013 (nds32_print_operand): Consider indirect call.
9014 (nds32_print_operand_address): Consider indirect call.
9015 (nds32_insert_attributes): Handle "indirect_call" attribute.
9016 (TARGET_LEGITIMATE_ADDRESS_P): Define.
9017 (TARGET_LEGITIMATE_CONSTANT_P): Define.
9018 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9019 (TARGET_DELEGITIMIZE_ADDRESS): Define.
9020 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9021 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9022 (TARGET_ICT_MODEL_SMALL): Define.
9023 (TARGET_ICT_MODEL_LARGE): Define.
9024 * config/nds32/nds32.md (movsi): Consider ict model.
9025 (call, call_value): Consider ict model.
9026 (sibcall, sibcall_value): Consider ict model.
9027 * config/nds32/nds32.opt (mict-model): New option.
9028 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9031 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
9032 Monk Chiang <sh.chiang04@gmail.com>
9033 Jim Wilson <jimw@sifive.com>
9035 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9036 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
9037 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9038 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9039 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
9040 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9041 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9042 compute save_libcall_adjustment properly.
9043 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9044 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9045 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9046 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9047 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9048 (ABI_SPEC): Handle mabi=ilp32e.
9049 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9050 (RVE): Add RVE mask.
9051 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9052 <-march>: Add rv32e as an example.
9054 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
9057 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9058 (intra_create_variable_infos): Handle C++ constructors.
9060 2018-05-18 Martin Liska <mliska@suse.cz>
9062 * passes.def: Remove a redundant pass.
9064 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
9067 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9069 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9071 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9073 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9075 (armv2, armv2a, armv3, armv3m): Delete architectures.
9076 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9077 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9078 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9080 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9081 (*mulsidi3adddi): Likewise.
9082 (mulsidi3): Likewise.
9083 (*mulsidi3_nov6): Likewise.
9084 (umulsidi3): Likewise.
9085 (umulsidi3_nov6): Likewise.
9086 (umaddsidi4): Likewise.
9087 (*umulsidi3adddi): Likewise.
9088 (smulsi3_highpart): Likewise.
9089 (*smulsi3_highpart_nov6): Likewise.
9090 (umulsi3_highpart): Likewise.
9091 (*umulsi3_highpart_nov6): Likewise.
9092 * config/arm/arm.h (arm_arch3m): Delete.
9093 * config/arm/arm.c (arm_arch3m): Delete.
9094 (arm_option_override_internal): Update armv3-related comment.
9095 (arm_configure_build_target): Delete use of isa_bit_mode32.
9096 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9097 (arm_rtx_costs_internal): Delete check of arm_arch3m.
9098 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9100 (mulusa3): Likewise.
9101 * config/arm/arm-protos.h (arm_arch3m): Delete.
9102 * config/arm/arm-tables.opt: Regenerate.
9103 * config/arm/arm-tune.md: Likewise.
9104 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9105 deleted architectures.
9107 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9109 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9110 (armv5t, armv5te): New features.
9111 (ARMv5, ARMv5e): Delete fgroups.
9112 (ARMv5t, ARMv5te): Adjust for above changes.
9114 (armv5, armv5e): Delete arches.
9115 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9117 (*call_reg_arm): Likewise.
9118 (*call_value_reg_armv5): Likewise.
9119 (*call_value_reg_arm): Likewise.
9120 (*call_symbol): Likewise.
9121 (*call_value_symbol): Likewise.
9122 (*sibcall_insn): Likewise.
9123 (*sibcall_value_insn): Likewise.
9125 (prefetch): Likewise.
9126 (define_split and define_peephole2 dependent on arm_arch5):
9128 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9130 (TARGET_ARM_QBIT): Likewise.
9131 (TARGET_DSP_MULTIPLY): Likewise.
9132 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9133 (arm_arch5, arm_arch5e): Delete.
9134 (arm_arch5t, arm_arch5te): Declare.
9135 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9136 (arm_arch5t): Declare.
9137 (arm_option_reconfigure_globals): Update for the above.
9138 (arm_options_perform_arch_sanity_checks): Update comment, replace
9139 use of arm_arch5 with arm_arch5t.
9140 (use_return_insn): Likewise.
9141 (arm_emit_call_insn): Likewise.
9142 (output_return_instruction): Likewise.
9143 (arm_final_prescan_insn): Likewise.
9144 (arm_coproc_builtin_available): Likewise.
9145 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9146 arm_arch5e with arm_arch5t and arm_arch5te.
9147 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9148 (arm_arch5t, arm_arch5te): Declare.
9149 * config/arm/arm-tables.opt: Regenerate.
9150 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9151 * config/arm/t-multilib: Likewise.
9152 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9153 instead of arm_arch5.
9154 (*call_reg_thumb1): Likewise.
9155 (*call_value_reg_thumb1_v5): Likewise.
9156 (*call_value_reg_thumb1): Likewise.
9157 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9159 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9161 2018-05-18 Martin Liska <mliska@suse.cz>
9163 PR gcov-profile/84846
9164 * doc/gcov.texi: Document -t option of gcov tool.
9166 2018-05-18 Martin Liska <mliska@suse.cz>
9168 PR gcov-profile/84846
9169 * gcov.c (print_usage): Add new -t option.
9170 (process_args): Handle the option.
9171 (generate_results): Use stdout as output when requested by
9174 2018-05-18 Martin Liska <mliska@suse.cz>
9176 PR gcov-profile/84846
9177 * coverage.c (coverage_init): Write PWD to .gcno file.
9178 * doc/gcov.texi: Document how working directory is printed.
9179 * gcov-dump.c (dump_gcov_file): Print PWD.
9180 * gcov.c (output_intermediate_file): Likewise.
9181 (read_graph_file): Read PWD string.
9182 (output_lines): Print PWD.
9184 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9187 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9188 for retval and return false if all args to phi are zero.
9190 2018-05-18 Richard Biener <rguenther@suse.de>
9192 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9194 (evrp_dom_walker::before_dom_children): Call it.
9196 2018-05-18 Richard Biener <rguenther@suse.de>
9198 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9199 results when processing array refs with variable index.
9201 2018-05-18 Toon Moene <toon@moene.org>
9203 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9204 directly after that of -floop-interchange. Indicate that both
9205 options are enabled by default when specifying -O3.
9207 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9209 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9210 iterator. Delete separate integer-mode vec_set<mode> expander.
9211 (aarch64_simd_vec_setv2di): Delete.
9212 (vec_setv2di): Delete.
9213 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9214 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9215 the "w, r" alternative.
9217 2018-05-18 Martin Liska <mliska@suse.cz>
9219 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9220 * tree-pass.h (make_pass_lower_switch_O0): New function.
9221 * tree-switch-conversion.c (node_has_low_bound): Remove.
9222 (node_has_high_bound): Likewise.
9223 (node_is_bounded): Likewise.
9224 (class pass_lower_switch): Make it a template type and create
9226 (pass_lower_switch::execute): Add template argument.
9227 (make_pass_lower_switch): New function.
9228 (make_pass_lower_switch_O0): New function.
9229 (do_jump_if_equal): Remove.
9230 (emit_case_nodes): Simplify to just handle all 3 cases and leave
9231 all the hard work to tree optimization passes.
9233 2018-05-18 Martin Liska <mliska@suse.cz>
9235 * dbgcnt.c (limit_low): Renamed from limit.
9236 (limit_high): New variable.
9237 (dbg_cnt_is_enabled): Check for upper limit.
9238 (dbg_cnt): Adjust dumping.
9239 (dbg_cnt_set_limit_by_index): Add new argument for high
9241 (dbg_cnt_set_limit_by_name): Likewise.
9242 (dbg_cnt_process_single_pair): Parse new format.
9243 (dbg_cnt_process_opt): Use strtok.
9244 (dbg_cnt_list_all_counters): Remove 'value' and add
9246 * doc/invoke.texi: Document changes.
9248 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
9250 * doc/sourcebuild.texi (scalar_all_fma): Document.
9251 * tree.def (FMA_EXPR): Delete.
9252 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9253 * internal-fn.c (ternary_direct): New macro.
9254 (expand_ternary_optab_fn): Likewise.
9255 (direct_ternary_optab_supported_p): Likewise.
9256 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9257 * builtins.c (fold_builtin_fma): Delete.
9258 (fold_builtin_3): Don't call it.
9259 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9260 * expr.c (expand_expr_real_2): Likewise.
9261 * fold-const.c (operand_equal_p): Likewise.
9262 (fold_ternary_loc): Likewise.
9263 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9264 * gimple.c (DEFTREECODE): Likewise.
9265 * gimplify.c (gimplify_expr): Likewise.
9266 * optabs-tree.c (optab_for_tree_code): Likewise.
9267 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9268 * tree-eh.c (operation_could_trap_p): Likewise.
9269 (stmt_could_throw_1_p): Likewise.
9270 * tree-inline.c (estimate_operator_cost): Likewise.
9271 * tree-pretty-print.c (dump_generic_node): Likewise.
9272 (op_code_prio): Likewise.
9273 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9274 * tree-ssa-operands.c (get_expr_operands): Likewise.
9275 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9276 * fold-const-call.h (fold_fma): Delete.
9277 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9278 CFN_FNMA and CFN_FNMS.
9280 * genmatch.c (combined_fn): New enum.
9281 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9282 (commutative_op): New function.
9283 (commutate): Use it. Handle more than 2 operands.
9284 (dt_operand::gen_gimple_expr): Use commutative_op.
9285 (parser::parse_expr): Allow :c to be used with non-binary
9286 operators if the commutative operand is known.
9287 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9288 CFN_FMS, CFN_FNMA and CFN_FNMS.
9289 (backprop::process_assign_use): Remove FMA_EXPR handling.
9290 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9291 (gen_hsa_fma): New function.
9292 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9293 IFN_FNMA and IFN_FNMS.
9294 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9295 * gimple-fold.h (follow_all_ssa_edges): Declare.
9296 * gimple-fold.c (follow_all_ssa_edges): New function.
9297 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9298 gimple_build interface and use follow_all_ssa_edges to fold the result.
9299 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9300 instead of checking for optabs directly.
9301 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9302 rather than FMA_EXPRs.
9303 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9304 call to IFN_FMA instead of an FMA_EXPR.
9306 2018-05-17 Jim Wilson <jimw@sifive.com>
9308 * expr.c (do_tablejump): When converting index to Pmode, if we have a
9309 sign extended promoted subreg, and the range does not have the sign bit
9310 set, then do a sign extend.
9312 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9313 test, check for sign extended subreg and/or constant operands, and
9314 do a sign extend in that case.
9316 2018-05-17 Steve Ellcey <sellcey@cavium.com>
9318 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9319 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9321 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9322 Change logics_shift_reg to logics_shift_imm.
9323 (thunderx2t99_fp_loadpair_basic): Delete.
9324 (thunderx2t99_fp_storepair_basic): Delete.
9325 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9326 (thunderx2t99_asimd_polynomial): Delete.
9327 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9328 and neon_fp_mul_d_scalar_q.
9329 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9330 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9331 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9332 (thunderx2t99_asimd_lut): Add missing tbl types.
9333 (thunderx2t99_asimd_ext): Delete.
9334 (thunderx2t99_asimd_load1_1_mult): Delete.
9335 (thunderx2t99_asimd_load1_2_mult): Delete.
9336 (thunderx2t99_asimd_load1_ldp): New.
9337 (thunderx2t99_asimd_load1): New.
9338 (thunderx2t99_asimd_load2): Add missing *load2* types.
9339 (thunderx2t99_asimd_load3): New.
9340 (thunderx2t99_asimd_load4): New.
9341 (thunderx2t99_asimd_store1_1_mult): Delete.
9342 (thunderx2t99_asimd_store1_2_mult): Delete.
9343 (thunderx2t99_asimd_store2_mult): Delete.
9344 (thunderx2t99_asimd_store2_onelane): Delete.
9345 (thunderx2t99_asimd_store_stp): New.
9346 (thunderx2t99_asimd_store1): New.
9347 (thunderx2t99_asimd_store2): New.
9348 (thunderx2t99_asimd_store3): New.
9349 (thunderx2t99_asimd_store4): New.
9351 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
9353 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9354 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
9356 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
9357 Segher Boessenkool <segher@kernel.crashing.org>
9360 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9363 2018-05-17 Richard Biener <rguenther@suse.de>
9365 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9366 for pruning loop and prune defs feeding only already visited PHIs.
9368 2018-05-17 Richard Biener <rguenther@suse.de>
9370 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9372 2018-05-17 Bin Cheng <bin.cheng@arm.com>
9373 Richard Biener <rguenther@suse.de>
9375 PR tree-optimization/85793
9376 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9377 for VMAT_ELEMENTWISE.
9379 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9381 * internal-fn.h (lookup_internal_fn): Declare
9382 * internal-fn.c (lookup_internal_fn): New function.
9383 * gimple.c (gimple_build_call_from_tree): Handle calls to
9385 * gimple-pretty-print.c (dump_gimple_call): Print "." before
9386 internal function names.
9387 * tree-pretty-print.c (dump_generic_node): Likewise.
9388 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9390 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9392 * gimple-fold.h (gimple_build): Make the function forms take
9393 combined_fn rather than built_in_function.
9394 (gimple_simplify): Likewise.
9395 * gimple-match-head.c (gimple_simplify): Likewise.
9396 * gimple-fold.c (gimple_build): Likewise.
9397 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9398 rather than gimple_build_call_internal.
9399 (get_initial_defs_for_reduction): Likewise.
9400 (vect_create_epilog_for_reduction): Likewise.
9401 (vectorizable_live_operation): Likewise.
9403 2018-05-17 Martin Liska <mliska@suse.cz>
9405 * gimple-ssa-sprintf.c (format_directive): Do not use
9406 space in between 'G_' and '('.
9408 2018-05-17 Jakub Jelinek <jakub@redhat.com>
9411 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9412 even if the mask is not all ones.
9415 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9417 (ix86_gimple_fold_builtin): Likewise.
9420 * config/i386/i386.c: Include tree-vector-builder.h.
9421 (ix86_vector_shift_count): New function.
9422 (ix86_fold_builtin): Fold shift builtins by scalar count.
9423 (ix86_gimple_fold_builtin): Likewise.
9425 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9426 _mm512_setzero): New intrinsics.
9428 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
9429 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9431 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9432 code generation for cases where splatting a value is not useful.
9433 * simplify-rtx.c (simplify_ternary_operation): Simplify
9434 vec_merge across a vec_duplicate and a paradoxical subreg forming
9435 a vector mode to a vec_concat.
9437 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
9439 * config.gcc: Support "goldmont-plus".
9440 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9442 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9443 PROCESSOR_GOLDMONT_PLUS.
9444 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9445 (processor_target_table): Add "goldmont-plus".
9446 (PTA_GOLDMONT_PLUS): Define.
9447 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9448 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9449 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9450 (fold_builtin_cpu): Add "goldmont-plus".
9451 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9452 (ix86_option_override_internal): Add "goldmont-plus".
9453 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9454 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9455 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9456 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9458 2018-05-17 Richard Biener <rguenther@suse.de>
9460 PR tree-optimization/85757
9461 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9462 remove defs that only feed that PHI from further processing.
9464 2018-05-16 Jim Wilson <jimw@sifive.com>
9466 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9468 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9470 2018-05-16 Mark Wielaard <mark@klomp.org>
9472 * dwarf2out.c (count_index_strings): New function.
9473 (output_indirect_strings): Call count_index_strings and generate
9474 header for dwarf_version >= 5.
9476 2018-05-16 Mark Wielaard <mark@klomp.org>
9478 * dwarf2out.c (dwarf_FORM): New function.
9479 (set_indirect_string): Use dwarf_FORM.
9480 (reset_indirect_string): Likewise.
9481 (size_of_die): Likewise.
9482 (value_format): Likewise.
9483 (output_die): Likewise.
9484 (add_skeleton_AT_string): Likewise.
9485 (output_macinfo_op): Likewise.
9486 (index_string): Likewise.
9487 (output_index_string_offset): Likewise.
9488 (output_index_string): Likewise.
9489 (count_index_strings): Likewise.
9491 2018-05-16 Carl Love <cel@us.ibm.com>
9493 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9494 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9496 2018-05-16 Martin Jambor <mjambor@suse.cz>
9498 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9499 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9501 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9503 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9504 (fnma<mode>4): Likewise.
9505 (fms<mode>4): Likewise.
9506 (fnms<mode>4): Likewise.
9507 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9508 (aarch64_fnma<mode>4): Likewise.
9509 (aarch64_fms<mode>4): Likewise.
9510 (aarch64_fnms<mode>4): Likewise.
9511 (aarch64_fnmadd<mode>4): Likewise.
9513 2018-05-16 Jason Merrill <jason@redhat.com>
9515 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9517 2018-05-16 Richard Biener <rguenther@suse.de>
9519 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9520 (dump_stmt_cost): Declare.
9521 (add_stmt_cost): Dump cost we add.
9522 (add_stmt_costs): New function.
9523 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9525 (vect_analyze_stmt): Adjust prototype.
9526 (vectorizable_condition): Likewise.
9527 (vectorizable_live_operation): Likewise.
9528 (vectorizable_reduction): Likewise.
9529 (vectorizable_induction): Likewise.
9530 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9531 cost vector to pass to vectorizable_ and record afterwards.
9532 (vect_model_reduction_cost): Take cost vector argument and adjust.
9533 (vect_model_induction_cost): Likewise.
9534 (vectorizable_reduction): Likewise.
9535 (vectorizable_induction): Likewise.
9536 (vectorizable_live_operation): Likewise.
9537 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9538 SLP_TREE_NUMBER_OF_VEC_STMTS.
9539 (vect_analyze_slp_cost_1): Remove.
9540 (vect_analyze_slp_cost): Likewise.
9541 (vect_slp_analyze_node_operations): Take visited args and
9542 a target cost vector. Avoid processing already visited stmt sets.
9543 (vect_slp_analyze_operations): Use a local cost vector to gather
9544 costs and register those of non-discarded instances.
9545 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9546 (vect_schedule_slp_instance): Remove copying of
9547 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9549 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9550 adding cost. Record cost entry location.
9551 (vect_prologue_cost_for_slp_op): Function to compute cost of
9552 a constant or invariant generated for SLP vect in the prologue,
9553 split out from vect_analyze_slp_cost_1.
9554 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9555 (vect_model_promotion_demotion_cost): Likewise.
9556 (vect_model_store_cost): Likewise, make static.
9557 (vect_model_load_cost): Likewise.
9558 (vectorizable_bswap): Add cost vector arg and adjust.
9559 (vectorizable_call): Likewise.
9560 (vectorizable_simd_clone_call): Likewise.
9561 (vectorizable_conversion): Likewise.
9562 (vectorizable_assignment): Likewise.
9563 (vectorizable_shift): Likewise.
9564 (vectorizable_operation): Likewise.
9565 (vectorizable_store): Likewise.
9566 (vectorizable_load): Likewise.
9567 (vectorizable_condition): Likewise.
9568 (vectorizable_comparison): Likewise.
9569 (can_vectorize_live_stmts): Likewise.
9570 (vect_analyze_stmt): Likewise.
9571 (vect_transform_stmt): Adjust calls to vectorizable_*.
9572 * tree-vectorizer.c: Include gimple-pretty-print.h.
9573 (dump_stmt_cost): New function.
9575 2018-05-16 Richard Biener <rguenther@suse.de>
9577 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9578 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9579 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9580 (check_name): New callback.
9581 (dse_classify_store): Track cycles via a visited bitmap of PHI
9582 defs and simplify handling of in-loop and across loop dead stores
9583 and properly fail for loop-variant refs. Handle byte-tracking with
9584 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9587 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9589 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9590 (vect_get_mask_type_for_stmt): Likewise.
9591 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9593 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9594 to determine the statement's vector type and the vector type that
9595 should be used for calculating nunits. Deal with cases in which
9596 the type has to be deferred.
9597 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9598 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9599 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9600 (vect_determine_vf_for_stmt): New functions, split out from...
9601 (vect_determine_vectorization_factor): ...here.
9602 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9603 (vect_get_mask_type_for_stmt): New functions, split out from
9604 vect_determine_vectorization_factor.
9606 2018-05-16 Richard Biener <rguenther@suse.de>
9608 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9609 verify the [VEC_]COND_EXPR embedded comparison.
9611 2018-05-15 Martin Sebor <msebor@redhat.com>
9613 PR tree-optimization/85753
9614 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9615 RECORD_TYPE in addition to ARRAY_TYPE.
9617 2018-05-15 Martin Sebor <msebor@redhat.com>
9620 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9622 2018-05-15 Richard Biener <rguenther@suse.de>
9624 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9625 add by_clobber_p one. Change algorithm to collect all defs
9626 representing uses we need to walk and try reducing them to
9627 a single one before failing.
9628 (dse_dom_walker::dse_optimize_stmt): Adjust.
9630 2018-05-13 Mark Wielaard <mark@klomp.org>
9632 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9633 (size_of_loc_descr): Likewise.
9634 (output_loc_operands): Likewise.
9635 (output_loc_operands_raw): Likewise.
9636 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9637 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9638 (hash_loc_operands): Likewise.
9639 (compare_loc_operands): Likewise.
9641 2018-05-14 Mark Wielaard <mark@klomp.org>
9643 * dwarf2out.c (count_index_addrs): New function.
9644 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9646 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9648 PR tree-optimization/83648
9649 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9650 return value as malloc candidate.
9652 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9655 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9656 param as true in call to suggest_attribute.
9658 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9660 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9661 -mreadonly-in-sdata.
9663 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9665 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9667 (aarch64_crypto_aesd_fused): Likewise.
9669 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9671 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9672 (movsi_aarch64): Likewise.
9673 (load_pairsi): Likewise.
9674 (load_pairdi): Likewise.
9675 (store_pairsi): Likewise.
9676 (store_pairdi): Likewise.
9677 (load_pairsf): Likewise.
9678 (load_pairdf): Likewise.
9679 (store_pairsf): Likewise.
9680 (store_pairdf): Likewise.
9681 (zero_extend): Likewise.
9682 (trunc): Swap alternatives.
9683 (fcvt_target): Add '?' to prefer w over r.
9685 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9688 * config/i386/i386.md: Disallow non-commutative arithmetics in
9689 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9690 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9691 in the peephole2 before it.
9693 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9695 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9696 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9697 (ix86_handle_option): Handle -mcldemote.
9698 * config.gcc: New header.
9699 * config/i386/cldemoteintrin.h: New file.
9700 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9701 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9703 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9704 OPTION_MASK_ISA_CLDEMOTE.
9705 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9706 (ix86_valid_target_attribute_inner_p): Ditto.
9707 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9708 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9709 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9710 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9711 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9713 * config/i386/i386.opt: Add -mcldemote.
9714 * config/i386/x86intrin.h: New header.
9715 * doc/invoke.texi: Add -mcldemote.
9717 2018-05-14 Richard Biener <rguenther@suse.de>
9719 * doc/match-and-simplify.texi: Adjust :s documentation.
9721 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9723 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9724 intended memcpy size.
9725 (REORDER_45): Likewise.
9727 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9729 * sort.cc: New file.
9730 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9731 * vec.c (qsort_chk): Use gcc_qsort.
9732 * Makefile.in (OBJS-libcommon): Add sort.o.
9733 (build/sort.o): New target. Use it...
9734 (BUILD_RTL): ... here, and...
9735 (build/gencfn-macros): ... here, and...
9736 (build/genmatch): ... here.
9738 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9739 Chung-Ju Wu <jasonwucj@gmail.com>
9741 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9742 * config/nds32/nds32-graywolf.md: New file.
9743 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9744 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9746 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9747 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9748 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9749 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9750 * config/nds32/pipelines.md: Include n15 settings.
9752 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9753 Chung-Ju Wu <jasonwucj@gmail.com>
9755 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9756 * config/nds32/nds32-n13.md: New file.
9757 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9758 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9760 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9761 * config/nds32/nds32.md (pipeline_model): Add n13.
9762 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9763 * config/nds32/pipelines.md: Include n13 settings.
9765 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9766 Chung-Ju Wu <jasonwucj@gmail.com>
9768 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9769 * config/nds32/nds32-n10.md: New file.
9770 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9771 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9773 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9774 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9775 * config/nds32/nds32.md (pipeline_model): Add n10.
9776 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9777 * config/nds32/pipelines.md: Include n10 settings.
9779 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9780 Kito Cheng <kito.cheng@gmail.com>
9781 Chung-Ju Wu <jasonwucj@gmail.com>
9783 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9784 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9785 Add enum values for DSP extension instructions.
9786 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9788 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9789 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9791 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9792 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9793 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9794 * config/nds32/nds32-intrinsic.md: Likewise.
9795 * config/nds32/nds32_intrinsic.h: Likewise.
9796 * config/nds32/nds32-md-auxiliary.c: Likewise.
9797 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9798 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9799 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9800 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9801 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9802 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9803 TYPE_DMAC in switch statement.
9804 * config/nds32/nds32.c: New checking and implementation for DSP
9805 extension instructions.
9806 * config/nds32/nds32.h: Likewise.
9807 * config/nds32/nds32.md: Likewise.
9808 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9809 * config/nds32/predicates.md: Implement new predicates for DSP
9812 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9814 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9815 Reformat alternatives and attributes so it is easier to identify
9816 which constraints/attributes go with which instruction.
9817 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9818 (mov<mode>_softfloat32, FMOVE64): Likewise.
9819 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9820 (mov<mode>_softfloat64, FMOVE64): Likewise.
9822 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9824 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9826 (Basic PowerPC Built-in Functions): The new name of the
9827 subsection previously known as "PowerPC Built-in Functions".
9828 (Basic PowerPC Built-in Functions Available on all Configurations):
9830 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9831 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9832 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9833 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9835 2018-05-11 Martin Jambor <mjambor@suse.cz>
9838 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9841 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9844 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9846 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9848 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9849 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9850 (ix86_handle_option): Handle -mwaitpkg.
9851 * config.gcc: New header.
9852 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9853 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9854 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9856 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9857 OPTION_MASK_ISA_WAITPKG.
9858 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9859 (ix86_option_override_internal): Add PTA_WAITPKG.
9860 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9861 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9862 IX86_BUILTIN_TPAUSE.
9863 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9864 __builtin_ia32_umwait and __builtin_ia32_tpause.
9865 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9866 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9867 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9868 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9869 UNSPECV_TPAUSE): New.
9870 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9871 * config/i386/i386.opt: Add -mwaitpkg.
9872 * config/i386/waitpkgintrin.h: New file.
9873 * config/i386/x86intrin.h: New header.
9874 * doc/invoke.texi: Add -mwaitpkg.
9876 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9879 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9881 (cortex-m0): Use armv6s-m isa.
9882 (cortex-m0plus): Likewise.
9883 (cortex-m1): Likewise.
9884 (cortex-m0.small-multiply): Likewise.
9885 (cortex-m0plus.small-multiply): Likewise.
9886 (cortex-m1.small-multiply): Likewise.
9888 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9889 Jakub Jelinek <jakub@redhat.com>
9891 PR tree-optimization/85692
9892 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9893 source permute as well.
9895 2018-05-11 Martin Liska <mliska@suse.cz>
9898 * doc/extend.texi: Document LLVM style format for no_sanitize
9901 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9903 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9904 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9905 (mode_supports_vsx_dform_quad): Likewise.
9906 (mode_supports_vmx_dform): Move these functions to be next to the
9907 other mode_supports functions.
9908 (mode_supports_dq_form): Likewise.
9909 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9910 mode_supports_dq_form.
9911 (reg_offset_addressing_ok_p): Likewise.
9912 (offsettable_ok_by_alignment): Likewise.
9913 (rs6000_legitimate_offset_address_p): Likewise.
9914 (legitimate_lo_sum_address_p): Likewise.
9915 (rs6000_legitimize_address): Likewise.
9916 (rs6000_legitimize_reload_address): Likewise.
9917 (rs6000_secondary_reload_inner): Likewise.
9918 (rs6000_preferred_reload_class): Likewise.
9919 (rs6000_output_move_128bit): Likewise.
9921 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9923 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9924 Generate SImode target register for null target.
9925 <case IX86_BUILTIN_XGETBV>: Ditto.
9926 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9927 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9929 2018-05-10 Carl Love <cel@us.ibm.com>
9931 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9932 dcbtt and dcbtstt if operands[2] is 0.
9934 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9937 * config/i386/sse.md (usadv64qi): New expander.
9939 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9941 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9942 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9943 -maltivec=be support.
9944 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9945 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9946 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9947 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9948 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9949 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9950 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9951 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9952 altivec_vsumsws): Adjust.
9953 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9954 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9955 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9957 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9958 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9959 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9960 (altivec_lve<VI_char>x): Delete expand.
9961 (*altivec_lve<VI_char>x_internal): Rename to...
9962 (altivec_lve<VI_char>x): ... this.
9963 (altivec_lvxl_<mode>): Delete expand.
9964 (*altivec_lvxl_<mode>_internal): Rename to ...
9965 (altivec_lvxl_<mode>): ... this.
9966 (altivec_stvxl_<mode>): Delete expand.
9967 (*altivec_stvxl_<mode>_internal): Rename to ...
9968 (altivec_stvxl_<mode>): ... this.
9969 (altivec_stve<VI_char>x): Delete expand.
9970 (*altivec_stve<VI_char>x_internal): Rename to ...
9971 (altivec_stve<VI_char>x): ... this.
9972 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9973 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9974 reduc_plus_scal_<mode>): Adjust.
9975 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9977 (rs6000_cpu_cpp_builtins): Adjust.
9978 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9979 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9980 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9981 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9982 -maltivec=be support.
9983 (rs6000_split_vec_extract_var): Adjust.
9984 (rs6000_split_v4si_init): Adjust.
9985 (swap_selector_for_mode): Delete.
9986 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9987 altivec_expand_stvex_be): Delete.
9988 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9989 -maltivec=be support.
9990 (rs6000_gimple_fold_builtin): Ditto.
9991 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9993 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9994 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9995 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9996 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9997 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9998 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9999 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10000 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10001 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10002 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10003 anonymous split): Adjust.
10004 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10005 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10007 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
10009 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10010 when --with-gxx-include-dir is also specified.
10011 * configure: Regenerate.
10013 2018-05-09 Jim Wilson <jimw@sifive.com>
10016 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10017 * config/riscv/t-withmultilib: New.
10018 * config/riscv/withmultilib.h: New.
10019 * doc/install.texi: Document RISC-V --with-multilib-list support.
10021 2018-05-09 Richard Biener <rguenther@suse.de>
10023 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10025 (vect_bb_vectorization_profitable_p): Adjust. Compute
10026 actual scalar cost using the cost vector and the add_stmt_cost
10029 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10031 PR rtl-optimization/85645
10032 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10033 in the REG_CFA_REGISTER note for LR, don't leave it empty.
10035 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10037 PR rtl-optimization/85645
10038 * shrink-wrap.c (spread_components): Return a boolean saying if
10039 anything was changed.
10040 (try_shrink_wrapping_separate): Iterate spread_components until
10041 nothing changes anymore.
10043 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10045 PR rtl-optimization/85645
10046 * regrename.c (build_def_use): Also kill the chains that include the
10047 destination of a REG_CFA_REGISTER note.
10049 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10051 PR rtl-optimization/85645
10052 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10053 insn that has a REG_CFA_REGISTER note.
10055 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
10057 * cfgexpand.c (expand_clobber): New function.
10058 (expand_gimple_stmt_1): Use it.
10059 * tree-vect-stmts.c (vect_clobber_variable): New function,
10061 (vectorizable_simd_clone_call): ...here.
10062 (vectorizable_store): Emit a clobber either side of an
10063 IFN_STORE_LANES sequence.
10064 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10066 2018-05-09 Tom de Vries <tom@codesourcery.com>
10069 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10070 (define_insn "trap_if_false"): Add exit after trap.
10072 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
10074 PR rtl-optimization/85638
10075 * bb-reorder.c: Include common/common-target.h.
10076 (create_forwarder_block): New function extracted from...
10077 (fix_up_crossing_landing_pad): ...here. Rename into...
10078 (dw2_fix_up_crossing_landing_pad): ...this.
10079 (sjlj_fix_up_crossing_landing_pad): New function.
10080 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10081 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10082 from both partitions and exit the loop after one iteration.
10084 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10087 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10089 (Basic PowerPC Built-in Functions): The new name of the
10090 subsection previously known as "PowerPC Built-in Functions".
10091 (Basic PowerPC Built-in Functions Available on all Configurations):
10093 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10095 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10097 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10099 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10102 2018-05-08 Jim Wilson <jimw@sifive.com>
10104 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10105 (LD_EMUL_SUFFIX): New.
10106 (LINK_SPEC): Use it.
10108 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10110 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10112 (Basic PowerPC Built-in Functions): The new name of the
10113 subsection previously known as "PowerPC Built-in Functions".
10114 (Basic PowerPC Built-in Functions Available on all Configurations):
10116 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10118 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10120 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10122 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10125 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10128 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10129 after cmpelim optimization.
10131 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
10133 * config.gcc: Support "goldmont".
10134 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10135 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10136 PROCESSOR_GOLDMONT.
10137 * config/i386/i386.c (m_GOLDMONT): Define.
10138 (processor_target_table): Add "goldmont".
10139 (PTA_GOLDMONT): Define.
10140 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10141 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10142 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10143 (fold_builtin_cpu): Add "goldmont".
10144 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10145 (ix86_option_override_internal): Add "goldmont".
10146 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10147 (processor_type): Add PROCESSOR_GOLDMONT.
10148 * config/i386/i386.md: Add CPU "glm".
10149 * config/i386/glm.md: New file.
10150 * config/i386/x86-tune.def: Add m_GOLDMONT.
10151 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10153 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10156 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10158 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10159 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
10160 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
10163 * config/i386/i386.c (ix86_fold_builtin): Handle
10164 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10167 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10168 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10170 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
10173 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10174 (check_arch): Likewise.
10175 (check_fpu): Return the result rather than printing it.
10176 (end arch): Fix operator precedence.
10177 (end cpu): Likewise.
10178 (END): Print the result from check_fpu.
10180 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10181 Alan Hayward <alan.hayward@arm.com>
10182 David Sherwood <david.sherwood@arm.com>
10184 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10185 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10186 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10187 (*fcmuo<mode>_and): New patterns.
10189 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10191 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10192 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10193 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10194 (cmp_op, sve_imm_con): New code attributes.
10195 (SVE_COND_INT_CMP, imm_con): Delete.
10196 (cmp_op): Remove above unspecs from int attribute.
10197 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10199 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
10200 comparison-specific unspecs.
10201 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10202 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10203 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10204 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10205 (*vec_fcm<cmp_op><mode>): Rename to...
10206 (*fcm<cmp_op><mode>): ...this and adjust likewise.
10207 (*vec_fcmuo<mode>): Rename to...
10208 (*fcmuo<mode>): ...this and adjust likewise.
10209 (*pred_fcm<cmp_op><mode>): New pattern.
10210 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10211 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10213 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10215 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10216 (aarch64_emit_sve_predicated_cond): New function.
10217 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10218 (aarch64_emit_unspec_cond_or): Replace with...
10219 (aarch64_emit_sve_or_conds): ...this new function. Use
10220 aarch64_emit_sve_ptrue_op for the individual comparisons and
10221 aarch64_emit_binop to OR them together.
10222 (aarch64_emit_inverted_unspec_cond): Replace with...
10223 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10224 aarch64_emit_sve_ptrue_op for the comparison and
10225 aarch64_emit_unop to invert the result.
10226 (aarch64_expand_sve_vec_cmp_float): Update after the above
10227 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
10229 2018-05-07 Nathan Sidwell <nathan@acm.org>
10231 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10232 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10233 (Backwards Compatibility): Likewise.
10235 2018-05-07 Luis Machado <luis.machado@linaro.org>
10239 2018-05-07 Luis Machado <luis.machado@linaro.org>
10241 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10242 <prefetch_dynamic_strides>: New const bool field.
10243 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10244 prefetch_dynamic_strides.
10245 (exynosm1_prefetch_tune): Likewise.
10246 (thunderxt88_prefetch_tune): Likewise.
10247 (thunderx_prefetch_tune): Likewise.
10248 (thunderx2t99_prefetch_tune): Likewise.
10249 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10251 (aarch64_override_options_internal): Update to set
10252 PARAM_PREFETCH_DYNAMIC_STRIDES.
10253 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10254 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10255 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10256 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10257 prefetch-dynamic-strides setting.
10259 2018-05-07 Luis Machado <luis.machado@linaro.org>
10261 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10262 <minimum_stride>: New const int field.
10263 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10264 minimum_stride field.
10265 (exynosm1_prefetch_tune): Likewise.
10266 (thunderxt88_prefetch_tune): Likewise.
10267 (thunderx_prefetch_tune): Likewise.
10268 (thunderx2t99_prefetch_tune): Likewise.
10269 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10270 (aarch64_override_options_internal): Update to set
10271 PARAM_PREFETCH_MINIMUM_STRIDE.
10272 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10273 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10274 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10275 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10276 stride is constant and is below the minimum stride threshold.
10278 2018-05-07 Luis Machado <luis.machado@linaro.org>
10280 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10283 2018-05-07 Luis Machado <luis.machado@linaro.org>
10285 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10286 <prefetch_dynamic_strides>: New const bool field.
10287 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10288 prefetch_dynamic_strides.
10289 (exynosm1_prefetch_tune): Likewise.
10290 (thunderxt88_prefetch_tune): Likewise.
10291 (thunderx_prefetch_tune): Likewise.
10292 (thunderx2t99_prefetch_tune): Likewise.
10293 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10295 (aarch64_override_options_internal): Update to set
10296 PARAM_PREFETCH_DYNAMIC_STRIDES.
10297 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10298 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10299 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10300 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10301 prefetch-dynamic-strides setting.
10303 2018-05-07 Luis Machado <luis.machado@linaro.org>
10305 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10306 <minimum_stride>: New const int field.
10307 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10308 minimum_stride field.
10309 (exynosm1_prefetch_tune): Likewise.
10310 (thunderxt88_prefetch_tune): Likewise.
10311 (thunderx_prefetch_tune): Likewise.
10312 (thunderx2t99_prefetch_tune): Likewise.
10313 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10314 (aarch64_override_options_internal): Update to set
10315 PARAM_PREFETCH_MINIMUM_STRIDE.
10316 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10317 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10318 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10319 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10320 stride is constant and is below the minimum stride threshold.
10322 2018-05-06 Jakub Jelinek <jakub@redhat.com>
10325 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10326 the type is addressable. Don't force op into register if it has
10329 2018-05-05 Roland McGrath <mcgrathr@google.com>
10332 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10333 any section for which we don't know a specific type it should have,
10334 regardless of name. Previously this was done only for the exact
10335 names ".init_array", ".fini_array", and ".preinit_array".
10336 (default_elf_asm_named_section): Add comment about
10337 relationship with default_section_type_flags and SECTION_NOTYPE.
10338 (get_section): Don't consider it a type conflict if one side has
10339 SECTION_NOTYPE and the other doesn't, as long as neither has the
10340 SECTION_BSS et al used in the default_section_type_flags logic.
10342 2018-05-05 Tom de Vries <tom@codesourcery.com>
10345 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10346 (workaround_barsyncs): New function.
10347 (nvptx_reorg): Use workaround_barsyncs.
10348 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10349 (define_expand "nvptx_membar_cta"): New define_expand.
10350 (define_insn "*nvptx_membar_cta"): New insn.
10352 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
10354 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10355 To improve optimization opportunities.
10356 * builtin-types.def: The new needed builtin types for the above.
10358 2018-05-04 Richard Biener <rguenther@suse.de>
10360 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10361 * gimple-ssa-store-merging.c
10362 (imm_store_chain_info::output_merged_store): Remove redundant create,
10363 release split_store vector contents on failure.
10364 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10365 scalar stmt vector on cache hit.
10367 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
10369 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10371 * config.gcc (powerpc-xilinx-eabi*): Remove.
10372 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10374 (fusion_addis_mem_combo_load): Ditto.
10375 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10377 (rs6000_cpu_cpp_builtins): Ditto.
10378 * config/rs6000/rs6000-linux.c
10379 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10380 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10381 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10383 (rs6000_setup_reg_addr_masks): Ditto.
10384 (rs6000_init_hard_regno_mode_ok): Ditto.
10385 (rs6000_option_override_internal): Ditto.
10386 (legitimate_lo_sum_address_p): Ditto.
10387 (rs6000_legitimize_address): Ditto.
10388 (rs6000_legitimize_reload_address): Ditto.
10389 (rs6000_legitimate_address_p): Ditto.
10390 (abi_v4_pass_in_fpr): Ditto.
10391 (setup_incoming_varargs): Ditto.
10392 (rs6000_gimplify_va_arg): Ditto.
10393 (rs6000_split_multireg_move): Ditto.
10394 (rs6000_savres_strategy): Ditto.
10395 (rs6000_emit_prologue_components): Ditto.
10396 (rs6000_emit_epilogue_components): Ditto.
10397 (rs6000_emit_prologue): Ditto.
10398 (rs6000_emit_epilogue): Ditto.
10399 (rs6000_elf_file_end): Ditto.
10400 (rs6000_function_value): Ditto.
10401 (rs6000_libcall_value): Ditto.
10402 * config/rs6000/rs6000.h: Ditto.
10403 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10404 (TARGET_MINMAX): ... this. New.
10405 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10406 * config/rs6000/rs6000.md: Remove Xilinx FP support.
10407 (*movsi_internal1_single): Delete.
10408 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10409 mfpu=, mxilinx-fpu): Delete.
10410 * config/rs6000/singlefp.h: Delete.
10411 * config/rs6000/sysv4.h: Remove Xilinx FP support.
10412 * config/rs6000/t-rs6000: Ditto.
10413 * config/rs6000/t-xilinx: Delete.
10414 * config/rs6000/titan.md: Adjust for fp_type removal.
10415 * config/rs6000/vsx.md: Remove Xilinx FP support.
10416 (VStype_simple): Delete.
10417 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10418 * config/rs6000/xfpu.h: Delete.
10419 * config/rs6000/xfpu.md: Delete.
10420 * config/rs6000/xilinx.h: Delete.
10421 * config/rs6000/xilinx.opt: Delete.
10422 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10423 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10425 2018-05-04 Tom de Vries <tom@codesourcery.com>
10428 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10431 2018-05-04 Richard Biener <rguenther@suse.de>
10433 PR middle-end/85627
10434 * tree-complex.c (update_complex_assignment): We are always in SSA form.
10435 (expand_complex_div_wide): Likewise.
10436 (expand_complex_operations_1): Likewise.
10437 (expand_complex_libcall): Preserve EH info of the original stmt.
10438 (tree_lower_complex): Handle removed blocks.
10439 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10440 on complex multiplication and division libcall builtins.
10442 2018-05-04 Richard Biener <rguenther@suse.de>
10444 PR middle-end/85574
10445 * fold-const.c (negate_expr_p): Restrict negation of operand
10446 zero of a division to when we know that can happen without
10448 (fold_negate_expr_1): Likewise.
10450 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10453 * real.h (real_nextafter): Declare.
10454 * real.c (real_nextafter): New function.
10455 * fold-const-call.c (fold_const_nextafter): New function.
10456 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10457 CASE_CFN_NEXTTOWARD.
10458 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10459 even when arg1_mode is different from arg0_mode.
10461 2018-05-03 Nathan Sidwell <nathan@acm.org>
10463 * doc/extend.texi (Deprecated Features): Remove
10464 -ffriend-injection.
10465 (Backwards Compatibility): Likewise.
10466 * doc/invoke.texi (C++ Language Options): Likewise.
10467 (C++ Dialect Options): Likewise.
10469 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10472 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10473 _mm512_mask_mullox_epi64): New intrinsics.
10475 2018-05-03 Tom de Vries <tom@codesourcery.com>
10478 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10479 dump files): Add offload-tree.
10481 2018-05-03 Richard Biener <rguenther@suse.de>
10483 PR tree-optimization/85615
10484 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10485 to loops not nested in BBs loop father to avoid creating multi-entry
10488 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10490 PR tree-optimization/70291
10491 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10492 arguments. Change return type to tree. Emit libcall as a new
10493 statement rather than replacing existing one when inplace_p is true.
10494 (expand_complex_multiplication_components): New function.
10495 (expand_complex_multiplication): Expand floating-point complex
10496 multiplication using the above.
10497 (expand_complex_division): Rename inner_type parameter to type.
10498 Update expand_complex_libcall call-site.
10499 (expand_complex_operations_1): Update expand_complex_multiplication
10500 and expand_complex_division call-sites.
10502 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10505 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10506 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10507 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10508 the highest significant bit of the shift count mask is clear. In
10509 check whether and[sq]i3 is needed verify that all significant bits
10510 of the shift count other than the highest are set.
10512 2018-05-02 Tom de Vries <tom@codesourcery.com>
10515 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10516 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10517 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10518 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10519 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10520 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10521 __builtin_goacc_parlevel_size.
10523 2018-05-02 Richard Biener <rguenther@suse.de>
10525 PR tree-optimization/85597
10526 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10527 do not use split vect_get_vec_defs call but call vect_get_slp_defs
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 ltrans-tree.
10536 2018-05-02 Tom de Vries <tom@codesourcery.com>
10539 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10540 dump files): Add wpa-ipa.
10542 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10544 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10545 powerpc*-*-linux*paired* target.
10546 * config/rs6000/750cl.h: Delete.
10547 * config/rs6000/paired.h: Delete.
10548 * config/rs6000/paired.md: Delete.
10549 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10551 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10552 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10553 comment. Remove paired float support.
10554 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10555 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10557 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10558 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10560 * config/rs6000/rs6000.c: Remove paired float support.
10561 (paired_expand_vector_init, paired_expand_vector_move,
10562 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10563 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10564 paired_expand_builtin, paired_expand_predicate_builtin,
10565 paired_init_builtins): Delete.
10566 * config/rs6000/rs6000.h: Remove paired float support.
10567 * config/rs6000/rs6000.md: Remove paired float support.
10568 (move_from_CR_ov_bit): Delete.
10569 * config/rs6000/rs6000.opt (mpaired): Delete.
10570 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10571 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10573 2018-05-02 Richard Biener <rguenther@suse.de>
10575 PR middle-end/85567
10576 * gimplify.c (gimplify_save_expr): When in SSA form allow
10577 SAVE_EXPRs to compute to SSA vars.
10579 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10582 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10583 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10584 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10585 clobber operands[2], instead use a new pseudo. Formatting fixes.
10587 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10589 PR tree-optimization/85586
10590 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10591 exit early for statements in the same group if the accesses are
10594 2018-05-02 Tom de Vries <tom@codesourcery.com>
10597 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10600 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10602 PR tree-optimization/85143
10603 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10605 2018-05-01 Tom de Vries <tom@codesourcery.com>
10608 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10609 not found" error message.
10611 2018-05-01 Tom de Vries <tom@codesourcery.com>
10614 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10615 * vec.c (test_ordered_remove_if): New function.
10616 (vec_c_tests): Call test_ordered_remove_if.
10617 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10618 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10619 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10620 VEC_ORDERED_REMOVE_IF.
10622 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10624 PR tree-optimization/82665
10625 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10626 pointer subtraction where arguments come from a memchr call.
10628 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10630 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10631 --push-state --as-needed and --pop-state instead of --as-needed and
10632 --no-as-needed if ld supports it.
10633 * configure: Regenerated.
10636 * doc/install.texi2html: Replace _002d with - and _002a with * in
10637 generated html files using sed.
10639 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10642 * gcc-rich-location.c (blank_line_before_p): New function.
10643 (use_new_line): New function.
10644 (gcc_rich_location::add_fixit_insert_formatted): New function.
10645 * gcc-rich-location.h
10646 (gcc_rich_location::add_fixit_insert_formatted): New function.
10648 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10650 * selftest.c (assert_streq): Rename "expected" and "actual" to
10651 "val1" and "val2". Extend NULL-handling to cover both inputs
10652 symmetrically, while still requiring both to be non-NULL for a pass.
10653 * selftest.h (assert_streq): Rename "expected" and "actual" to
10655 (ASSERT_EQ): Likewise.
10656 (ASSERT_EQ_AT): Likewise.
10657 (ASSERT_KNOWN_EQ): Likewise.
10658 (ASSERT_KNOWN_EQ_AT): Likewise.
10659 (ASSERT_NE): Likewise.
10660 (ASSERT_MAYBE_NE): Likewise.
10661 (ASSERT_MAYBE_NE_AT): Likewise.
10662 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10663 the assertion to pass.
10664 (ASSERT_STREQ_AT): Likewise.
10666 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10668 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10669 interaction with -pie.
10671 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10673 * selftest.h: Fix alphabetization of per-source-file selftest
10676 2018-04-30 Jason Merrill <jason@redhat.com>
10678 PR c++/61982 - dead stores to destroyed objects.
10679 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10682 2018-04-30 Jason Merrill <jason@redhat.com>
10684 * tree.c (build_clobber): New.
10685 * tree.h: Declare it.
10686 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10688 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10690 * diagnostic-show-locus.c (layout::layout): Update for
10691 location_get_source_line returning a char_span.
10692 (struct char_span): Move to input.h.
10693 (struct correction): Update for fields in char_span becoming
10695 (struct source_line): Update for location_get_source_line
10696 returning a char_span.
10697 (layout::print_line): Likewise.
10698 * edit-context.c (edited_file::print_content): Likewise.
10699 (edited_file::print_diff_hunk): Likewise.
10700 (edited_file::print_run_of_changed_lines): Likewise.
10701 (edited_file::get_num_lines): Likewise.
10702 (edited_line::edited_line): Likewise.
10703 * final.c (asm_show_source): Likewise.
10704 * input.c (location_get_source_line): Convert return type
10705 from const char * to char_span, losing the final "line_len"
10707 (dump_location_info): Update for the above.
10708 (get_substring_ranges_for_loc): Likewise. Use a char_span
10709 when handling the literal within the line.
10710 (test_reading_source_line): Update for location_get_source_line
10711 returning a char_span.
10712 * input.h (class char_span): Move here from
10713 diagnostic-show-locus.c, converting from a struct to a class.
10714 Make data members private.
10715 (char_span::operator bool): New.
10716 (char_span::length): New.
10717 (char_span::get_buffer): New.
10718 (char_span::operator[]): New.
10719 (char_span::subspan): Make const.
10720 (char_span::xstrdup): New.
10721 (location_get_source_line): Convert return type from const char *
10722 to char_span, losing the final "line_size" param.
10724 2018-04-30 Jan Hubicka <jh@suse.cz>
10726 * lto-wrapper.c (ltrans_priorities): New static var.
10727 (cmp_priority): New.
10728 (run_gcc): Read priorities and if doing parallel build order
10729 the Makefile by them.
10731 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10733 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10735 2018-04-30 Richard Biener <rguenther@suse.de>
10737 * tree-cfg.c (verify_address): Remove base argument, add
10738 flag whether to check TREE_ADDRESSABLE and do that.
10739 (verify_expr): Remove.
10740 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10741 (verify_gimple_assign_single): Likewise.
10742 (verify_gimple_switch): Likewise.
10743 (verify_expr_location_1): Dereference tp once. Add (disabled)
10744 piece from verify_expr.
10745 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10747 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10749 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10751 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10753 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10754 (small_data_pattern): Likewise.
10755 (arc_rewrite_small_data): Likewise.
10756 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10757 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10758 (get_symbol_alignment): New function.
10759 (legitimate_small_data_address_p): Likewise.
10760 (legitimate_scaled_address): Update, call
10761 legitimate_small_data_address_p.
10762 (output_sdata): New static variable.
10763 (arc_print_operand): Update how we handle small data operands.
10764 (arc_print_operand_address): Likewise.
10765 (arc_legitimate_address_p): Update, use
10766 legitimate_small_data_address_p.
10767 (arc_rewrite_small_data_p): Remove.
10768 (arc_rewrite_small_data_1): Likewise.
10769 (arc_rewrite_small_data): Likewise.
10770 (small_data_pattern): Likewise.
10771 (compact_sda_memory_operand): Update to use
10772 legitimate_small_data_address_p and get_symbol_alignment.
10773 (prepare_move_operands): Don't rewite sdata pattern.
10774 (prepare_extend_operands): Remove.
10775 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10777 (zero_extendqisi2): Likewise.
10778 (zero_extendhisi2): Likewise.
10779 (extendqihi2): Likewise.
10780 (extendqisi2): Likewise.
10781 (extendhisi2): Likewise.
10782 (addsi3): Likewise.
10783 (subsi3): Likewise.
10784 (andsi3): Likewise.
10785 * config/arc/constraints.md (Usd): Change it to memory constraint.
10787 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10789 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10790 as source of std instructions.
10791 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10792 allow 6-bit constants as source for store instructions.
10793 (movdi_insn): Update instruction pattern to allow 6-bit constants
10794 as source for store instructions.
10796 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10798 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10800 2018-04-30 Nathan Sidwell <nathan@acm.org>
10801 Sandra Loosemore <sandra@codesourcery.com>
10803 * dumpfile.c (dump_open): Allow '-' for stdout.
10804 * doc/invoke.texi (Developer Options): Document dump filename
10805 determination early. Document stdin/stdout selection.
10807 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10809 Microblaze Target: PIC data text relative
10811 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10812 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10814 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10815 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10816 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10817 New addressing mode for data-text relative position indepenedent code.
10818 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10819 'ADDRESS_SYMBOLIC_TXT_REL'.
10820 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10821 (microblaze_legitimate_pic_operand): Exclude function calls from
10822 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10823 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10825 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10826 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10827 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10828 for 'address + offset'.
10829 (microblaze_expand_prologue): Add new function prologue call for
10831 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10832 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10833 table in case of TARGET_PIC_DATA_TEXT_REL.
10834 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10835 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10836 Add new macros 'UNSPEC_TEXT',
10837 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10838 + exclude function calls from 'UNSPEC_PLT' in case of data text
10840 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10841 new target hook for generating address diff vector tables in case of
10843 * doc/tm.texi : Regenerate.
10844 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10845 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10846 of addr diff vector generation.
10847 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10848 target hook definition.
10849 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10850 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10851 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10852 option for data text relative.
10854 2018-04-30 Richard Biener <rguenther@suse.de>
10856 * tree-chrec.h (evolution_function_is_constant_p): Remove
10858 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10860 2018-04-30 Richard Biener <rguenther@suse.de>
10863 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10865 2018-04-30 Richard Biener <rguenther@suse.de>
10867 PR tree-optimization/28364
10868 PR tree-optimization/85275
10869 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10870 copying first exit test.
10872 2018-04-28 Mark Wielaard <mark@klomp.org>
10874 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10875 dwarf_version >= 5.
10876 (dwarf_AT): Handle DW_AT_addr_base.
10877 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10879 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10882 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10883 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10884 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10885 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10887 2018-04-28 Richard Biener <rguenther@suse.de>
10889 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10890 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10891 to reflect use. Only add interesting stmts.
10893 2018-04-27 Martin Jambor <mjambor@suse.cz>
10896 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10897 the jump function allows for passing through aggregate values.
10899 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10901 * input.h (in_system_header_at): Convert from macro to inline
10903 (from_macro_expansion_at): Likewise.
10904 (from_macro_definition_at): Likewise.
10906 2018-04-27 Jeff Law <law@redhat.com>
10908 * config.gcc: Mark tile* targets as deprecated/obsolete.
10910 2018-04-27 Richard Biener <rguenther@suse.de>
10912 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10915 2018-04-27 Richard Biener <rguenther@suse.de>
10917 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10919 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10921 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10922 with Yd constraint. Set "preferred_for_speed" attribute from
10923 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10924 with Yd constraint.
10925 (*movdi_internal): Ditto.
10926 (movti_interunit splitters): Remove
10927 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10928 (movdi_interunit splitters): Ditto.
10929 * config/i386/constraints.md (Ye): Remove.
10930 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10932 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10935 * config/aarch64/constraints.md (Usg): Limit to 31.
10936 (Usj): Limit to 63.
10938 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10940 PR tree-optimization/85529
10941 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10942 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10943 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10944 zero extension or masking of the MSB bit.
10945 (optimize_range_tests): Add FIRST_BB argument, pass it through
10946 to optimize_range_tests_var_bound.
10947 (maybe_optimize_range_tests, reassociate_bb): Adjust
10948 optimize_range_tests callers.
10950 2018-04-26 Richard Biener <rguenther@suse.de>
10951 Jakub Jelinek <jakub@redhat.com>
10953 * cgraph.h (symbol_table): Just declare debug method here.
10954 * symtab.c (symbol_table::debug): Define.
10956 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10958 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10960 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10962 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10963 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10964 (*movdi_internal): Substitute Yi and Yj constraint with x
10965 and Ym and Yn constraint with y constraint. Update "isa"
10966 attribute and set "preferred_for_speed" attribute from
10967 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10968 (*movsi_internal): Ditto.
10969 (*movdf_internal): Ditto.
10970 (*movsf_internal): Ditto.
10971 (*zero_extendsidi2): Ditto.
10972 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10973 (sse2_loadld): Ditto.
10974 (*vec_extract<ssevecmodelower>_0): Ditto.
10975 (*vec_extractv4si_0_zext_sse4): Ditto.
10976 (vec_concatv2di): Ditto.
10977 (*vec_dup<mode>): Ditto.
10978 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10979 * config/i386/constraints.md (Yi): Remove.
10984 2018-04-26 Nathan Sidwell <nathan@acm.org>
10986 * dumpfile.c (dump_open): New.
10987 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10988 (dump_finish): Detect stdio/stderr by value not name.
10990 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10992 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10994 2018-04-26 Tom de Vries <tom@codesourcery.com>
10997 * config/nvptx/nvptx.c (verify_neutering_jumps)
10998 (verify_neutering_labels): New function
10999 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11001 2018-04-26 Tom de Vries <tom@codesourcery.com>
11004 * config/nvptx/nvptx.c (needs_neutering_p): New function.
11005 (nvptx_single): Use needs_neutering_p to skip over insns that do not
11008 2018-04-26 Richard Biener <rguenther@suse.de>
11009 Tom de Vries <tom@codesourcery.com>
11012 * lto-streamer-out.c (output_function): Fixup loops if required to match
11013 discovery done in the reader.
11015 2018-04-26 Richard Biener <rguenther@suse.de>
11017 PR tree-optimization/85116
11018 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11019 have a loop exit from the single latch predecessor. Remove
11020 case of header with just condition.
11021 (ch_base::copy_headers): Exclude infinite loops from any
11023 (pass_ch::execute): Record exits.
11025 2018-04-26 Richard Biener <rguenther@suse.de>
11027 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11028 prologue cost vector and pass it to vect_get_load_cost.
11029 (vect_get_peeling_costs_all_drs): Likewise.
11030 (vect_peeling_hash_get_lowest_cost): Likewise.
11031 (vect_enhance_data_refs_alignment): Likewise.
11033 2018-04-26 Richard Biener <rguenther@suse.de>
11035 PR middle-end/85450
11036 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11037 checking of integer<->pointer conversions.
11038 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11039 sign-/zero-extending pointer types.
11040 (expand_omp_for_static_chunk): Likewise.
11042 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
11043 Jean Lee <xiaoyur347@gmail.com>
11045 * config/mips/mips.c (mips_asan_shadow_offset): New function.
11046 (TARGET_ASAN_SHADOW_OFFSET): Define.
11047 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11048 true for -fsanitize=address.
11050 2018-04-25 Mark Wielaard <mark@klomp.org>
11052 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11055 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11057 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11058 than "alu", remove explicit "memory" and "imm_disp" attributes.
11059 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11061 PR middle-end/85414
11062 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11063 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11064 gen_lowpart_no_emit.
11066 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
11069 * config/i386/i386.c (ix86_expand_builtin): Change memory
11070 operand to XI, extend p0 to Pmode.
11071 * config/i386/i386.md: Change unspec volatile and operand
11072 1 mode to XI, change operand 0 mode to P.
11074 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11076 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11077 GET_MODE_MASK before any checking.
11078 (nds32_can_use_bset_p): Likewise.
11079 (nds32_can_use_btgl_p): Likewise.
11081 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11083 * config/nds32/nds32-doubleword.md: New define_split pattern for
11084 illegal register number.
11086 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11088 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11090 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11092 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11094 2018-04-25 Richard Biener <rguenther@suse.de>
11096 * lto-streamer.h (LTO_major_version): Bump to 8.
11098 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11100 * BASE-VER: Set to 9.0.0.
11102 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
11104 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11105 in __abskf2 and __powikf2.
11107 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11110 * config/aarch64/constraints.md (Usg, Usj): New constraints.
11111 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11112 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11113 Use the above on operand 2. Reindent.
11114 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11116 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11119 * common/config/i386/i386-common.c (ix86_handle_option): Don't
11121 * config/i386/i386.opt (mcet): Removed.
11122 * doc/install.texi: Remove -mcet documentation.
11123 * doc/invoke.texi: Likewise.
11125 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11128 * doc/install.texi: Remove -mcet from bootstrap-cet.
11130 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11133 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11134 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11138 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11139 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11140 containing a CONST_VECTOR.
11142 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
11144 * doc/install.texi: Update newlib dependency for nvptx.
11146 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11149 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11150 instead of INTVAL when shifting x left.
11152 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
11154 PR tree-optimization/85478
11155 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11156 vect_grouped_store_supported for single element vectors.
11158 2018-04-24 Richard Biener <rguenther@suse.de>
11161 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11162 load cost increase to the case of non-constant step.
11164 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11167 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11168 destination if any_malformed_asm.
11170 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
11172 PR middle-end/85496
11173 * expr.c (store_field): In the bitfield case, if the value comes from
11174 a function call and is returned in registers by means of a PARALLEL,
11175 do not change the mode of the temporary unless BLKmode and VOIDmode.
11177 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
11179 PR rtl-optimization/85423
11180 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11181 dependencies to debug insns when the previous insn is non-debug.
11183 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11185 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11186 enums into a single definition.
11187 (fls): Fix predicates and printing.
11190 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11192 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11193 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11194 and short u6 immediate.
11195 (check_if_valid_sleep_operand): Remove.
11196 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11198 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11200 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11201 flag_always_save_lp condition.
11202 * config/nds32/nds32.opt (malways-save-lp): New option.
11204 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11206 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11207 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11208 * config/nds32/nds32.h
11209 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11210 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11212 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11214 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11215 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11217 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11218 Chung-Ju Wu <jasonwucj@gmail.com>
11220 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11222 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11223 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11225 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11227 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11229 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11231 * config/nds32/nds32-protos.h (nds32_data_alignment,
11232 nds32_local_alignment): Declare.
11233 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11234 nds32_local_alignment): New functions.
11235 (TARGET_CONSTANT_ALIGNMENT): Define.
11236 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11238 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11240 * config/nds32/nds32.c
11241 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11242 (TARGET_MODES_TIEABLE_P): Likewise.
11244 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11246 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11247 level Ofast and Og.
11249 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
11250 Chung-Ju Wu <jasonwucj@gmail.com>
11252 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11253 for unaligned access.
11254 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11256 * config/nds32/nds32-intrinsic.md: Likewise.
11257 * config/nds32/nds32_intrinsic.h: Likewise.
11258 * config/nds32/nds32.h (nds32_builtins): Likewise.
11259 * config/nds32/nds32.opt (munaligned-access): New option.
11260 * config/nds32/nds32.c (nds32_asm_file_start): Display
11261 flag_unaligned_access status.
11263 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11265 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11266 -mno-relax is present.
11267 * config/riscv/linux.h (LINK_SPEC): Ditto.
11269 2018-04-20 Martin Sebor <msebor@redhat.com>
11272 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11274 (gimple_fold_builtin_stxcpy_chk): Same.
11275 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11277 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
11280 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11281 __powikf2 when long double is IEEE 128-bit.
11283 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11285 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11286 step to make sure stack always aligned.
11288 2018-04-20 Carl Love <cel@us.ibm.com>
11291 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11292 size check for arg0.
11294 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
11295 Tom de Vries <tom@codesourcery.com>
11298 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11299 Emit insns for calls too.
11300 (nvptx_find_par): Always look for worker-level predecessor insn.
11301 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
11303 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11304 (nvptx_process_pars): Propagate frames for calls.
11306 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
11309 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11311 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11312 (ix86_handle_option): Don't handle OPT_mibt.
11313 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11315 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11317 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11318 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11319 (ix86_target_macros): Define __CET__ with flag_cf_protection
11320 for -fcf-protection.
11321 * config/i386/i386.c (isa2_opts): Remove -mibt.
11322 * config/i386/i386.h (TARGET_IBT): Removed.
11323 (TARGET_IBT_P): Likewise.
11324 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11325 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11326 * config/i386/i386.opt (mcet): Update help message.
11327 (mshstk): Likewise.
11329 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
11330 -mcet as an alias for -mshstk.
11332 2018-04-20 Richard Biener <rguenther@suse.de>
11334 PR middle-end/85475
11335 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11336 complexity by forcing a single use of the multiply operand.
11338 2018-04-20 Martin Jambor <mjambor@suse.cz>
11341 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11342 recursion dependency to only apply to non-clones.
11344 2018-04-20 Martin Jambor <mjambor@suse.cz>
11347 * ipa-cp.c (create_specialized_node): Check that clones of
11348 self-recursive edges exist during IPA-CP.
11350 2018-04-19 Toon Moene <toon@moene.org>
11352 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11355 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11357 PR tree-optimization/85467
11358 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11359 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
11360 VECTOR_CST element to type.
11362 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11365 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11366 * config/i386/i386.md (builtin_setjmp_setup): Removed.
11367 (builtin_longjmp): Likewise.
11368 (save_stack_nonlocal): New pattern.
11369 (restore_stack_nonlocal): Likewise.
11371 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11374 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11375 Replace ASM_OUTPUT_LABEL with fprintf.
11377 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11380 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11381 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11382 * config/i386/i386-c.c (ix86_target_macros_internal): Also
11383 define __IBT__ and __SHSTK__ for -fcf-protection.
11384 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11386 (ix86_trampoline_init): Likewise.
11387 (x86_output_mi_thunk): Likewise.
11388 (ix86_notrack_prefixed_insn_p): Likewise.
11389 (ix86_option_override_internal): Don't disallow -fcf-protection.
11390 * config/i386/i386.md (rdssp<mode>): Also enable for
11392 (incssp<mode>): Likewise.
11393 (nop_endbr): Likewise.
11394 * config/i386/i386.opt (mcet): Change help message to built-in
11397 (mshstk): Likewise.
11398 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11399 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
11400 enable CET built-in functions.
11402 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
11404 * common/config/i386/i386-common.c
11405 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11406 OPTION_MASK_ISA_MOVDIRI_UNSET,
11407 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11408 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11409 * config.gcc (movdirintrin.h): New header.
11410 * config/i386/cpuid.h (bit_MOVDIRI,
11411 bit_MOVDIR64B): New bits.
11412 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11414 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11415 (VOID, PVOID, PCVOID)): New function types.
11416 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11417 __builtin_ia32_directstoreu_u64,
11418 __builtin_ia32_movdir64b): New builtins.
11419 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11420 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11422 (ix86_valid_target_attribute_inner_p): Ditto.
11423 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11424 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11425 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11426 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11427 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11428 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11429 (movdiri<mode>, movdir64b_<mode>): New.
11430 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11431 * config/i386/immintrin.h: Include movdirintrin.h.
11432 * config/i386/movdirintrin.h: New file.
11433 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11435 2018-04-19 Richard Biener <rguenther@suse.de>
11437 PR middle-end/85455
11438 * cfg.c (clear_bb_flags): When loop state says we have
11439 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11441 2018-04-19 Richard Biener <rguenther@suse.de>
11443 PR tree-optimization/84737
11444 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11445 copying restrict info.
11446 (vect_setup_realignment): Use it.
11447 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11448 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11449 the first DR to all generated stores.
11450 (vectorizable_load): Likewise for loads.
11452 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11454 PR tree-optimization/85446
11455 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11456 the integral and pointer types to have the same precision.
11458 * doc/install.texi: Document --disable-cet being the default and
11461 2018-04-18 Martin Liska <mliska@suse.cz>
11463 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11466 2018-04-18 Martin Liska <mliska@suse.cz>
11469 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11472 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11473 arguments if they are comparable.
11475 2018-04-18 Martin Liska <mliska@suse.cz>
11478 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11481 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11484 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11487 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11488 ENDBR after calling __morestack.
11490 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11493 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11494 by using gcc_base_ver to generate a gcc_driver_version, and use
11495 it when generating GCC_DRIVER_NAME.
11496 * configure: Regenerate.
11498 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11501 * config.gcc: Obsolete powerpc*-*-*spe*.
11503 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11506 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11507 (stabstr_D): Change type of unum from unsigned int to
11508 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11511 2018-04-17 Jim Wilson <jimw@sifive.com>
11514 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11515 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11516 Set arg_pointer_offset after using pretend_args_size.
11518 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11520 PR rtl-optimization/85431
11521 * dse.c (record_store): Ignore zero width stores.
11524 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11525 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11526 __builtin_stack_restore rather than after it.
11527 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11528 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11529 argument instead of virtual_dynamic_stack_rtx.
11531 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11533 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11535 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11536 Add note to error message to explain internal mapping of overloaded
11537 built-in function name to non-overloaded built-in function name.
11538 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11541 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11544 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11545 where the inputs overlap with the output.
11547 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11549 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11550 (=v, v) alternative and explicit "memory" attribute.
11551 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11552 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11554 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11555 "sselog1" type instead of "sselog".
11556 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11557 "sselog". Remove explicit "memory" attribute.
11558 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11559 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11561 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11562 "sselog1" type instead of "sselog". Remove explicit "memory"
11564 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11565 use "sselog1" type instead of "sselog". Remove explicit "memory"
11567 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11568 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11570 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11571 "sselog1" type instead of "sselog". Remove explicit "memory"
11573 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11574 use "sselog1" type instead of "sselog". Remove explicit "memory"
11578 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11580 PR middle-end/85414
11581 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11584 2018-04-17 Martin Jambor <mjambor@suse.cz>
11587 * ipa-cp.c (create_specialized_node): Call
11588 expand_all_artificial_thunks if necessary.
11590 2018-04-17 Martin Liska <mliska@suse.cz>
11593 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11594 in message, remote space in between '_G' and '('.
11596 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11599 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11600 avx512f_vmcmp<mode>3<round_saeonly_name>,
11601 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11602 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11603 avx512f_rndscale<mode><round_saeonly_name>,
11604 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11605 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11606 Use %<iptr>2 instead of %2 for -masm=intel.
11607 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11608 avx512f_vcvttss2usi<round_saeonly_name>,
11609 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11611 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11612 avx512f_vcvttsd2usi<round_saeonly_name>,
11613 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11614 Use %q1 instead of %1 for -masm=intel.
11615 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11616 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11617 of %3 for -masm=intel.
11618 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11620 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11622 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11624 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11625 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11627 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11629 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11630 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11631 %g1 and one with %0 and %1.
11632 (avx512er_vmrcp28<mode><round_saeonly_name>,
11633 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11634 %1 for -masm=intel.
11635 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11636 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11637 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11638 of %0 and %{%4%} for -masm=intel.
11639 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11640 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11641 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11642 order of %0 and %{%5%}%{z%} for -masm=intel.
11644 2018-04-17 Jan Hubicka <jh@suse.cz>
11647 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11649 2018-04-17 Martin Liska <mliska@suse.cz>
11652 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11653 for target_clone error message. Make default implementation
11654 clone to be a local declaration.
11655 (separate_attrs): Add new argument and check for an empty
11657 (expand_target_clones): Handle it.
11658 (ipa_target_clone): Make redirection just for target_clones
11661 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11662 Tom de Vries <tom@codesourcery.com>
11664 PR middle-end/84955
11665 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11666 tiled basic blocks without omp continue statements.
11668 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11671 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11672 vec_extract expression as having side effects to make sure it gets
11675 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11678 * config/i386/i386.c (get_builtin_code_for_version): Check
11681 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11684 * config.gcc: Support "skylake".
11685 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11687 * config/i386/i386.c (m_SKYLAKE): Define.
11688 (processor_target_table): Add "skylake".
11689 (ix86_option_override_internal): Add "skylake".
11690 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11691 PROCESSOR_CANNONLAKE.
11692 (get_builtin_code_for_version): Fix priority for
11693 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11694 PROCESSOR_SKYLAKE-AVX512.
11695 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11696 (processor_type): Add PROCESSOR_SKYLAKE.
11698 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11699 Jason Merrill <jason@redhat.com>
11702 * convert.c (convert_to_integer_1): Use direct recursion for
11703 enumeral types and types with a precision less than the number
11704 of bits in their mode.
11706 2018-04-16 Julia Koval <julia.koval@intel.com>
11709 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11710 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11712 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11715 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11716 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11717 and -mno-direct-move.
11719 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11722 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11723 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11724 Ensure negative shifts result in {0}.
11726 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11728 PR rtl-optimization/79916
11729 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11730 regs (if any) to define how to gnerate SD moves when LRA is in
11733 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11735 PR rtl-optimization/85393
11736 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11737 * except.c (expand_dw2_landing_pad_for_region): Make static.
11738 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11739 a label and unconditional jump to old_bb, rather than
11740 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11743 PR rtl-optimization/85376
11744 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11745 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11746 instead of a specific value.
11748 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11749 Bin Cheng <bin.cheng@arm.com>
11751 PR tree-optimization/82965
11752 PR tree-optimization/83991
11753 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11754 by_profile_only parameter.
11755 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11756 information if the loop was predicted to iterate too many times.
11757 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11759 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11762 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11765 2018-04-13 Martin Liska <mliska@suse.cz>
11766 Jakub Jelinek <jakub@redhat.com>
11768 PR middle-end/81657
11769 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11770 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11771 * builtins.c (expand_builtin_memory_copy_args): Use
11772 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11773 handle dest_addr == pc_rtx.
11775 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11778 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11779 asked to not generate direct moves.
11780 (fix_trunc<mode>si2_stfiwx): Similar.
11781 (fix_trunc<mode>si2_internal): Similar.
11783 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11786 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11787 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11788 lookup if dest in some wider mode is known to be const0_rtx and
11789 if so, record permanent equivalence for it to be ZERO_EXTEND of
11790 the narrower mode destination.
11792 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11794 * lto-streamer-out.c (output_function): Revert 259346.
11795 * omp-expand.c (expand_oacc_for): Likewise.
11797 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11799 PR rtl-optimization/85354
11800 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11801 * sel-sched.c (sel_global_init): ... here.
11803 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11806 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11807 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11808 mode for PE-COFF targets.
11809 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11810 (i386_pe_asm_lto_end): Likewise.
11811 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11812 (TARGET_ASM_LTO_END): Likewise.
11813 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11814 (i386_pe_asm_lto_start): New function.
11815 (i386_pe_asm_lto_end): Likewise.
11817 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11818 Richard Biener <rguenther@suse.de>
11820 PR middle-end/84955
11821 * lto-streamer-out.c (output_function): Fix CFG loop state before
11823 * omp-expand.c (expand_oacc_for): Handle calls to internal
11824 functions like regular functions.
11826 2018-04-12 Richard Biener <rguenther@suse.de>
11829 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11830 for the early LTO debug to properly generate references to it
11831 during DIE emission. Do not re-use that for the skeleton for
11833 (dwarf2out_early_finish): Likewise.
11835 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11838 * config/i386/sse.md
11839 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11840 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11841 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11842 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11843 and output is a reg, avoid creating invalid lowpart subreg, but
11844 instead split into a 512-bit move. Don't split if not AVX512VL,
11845 input is xmm16+ reg and output is a mem.
11846 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11847 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11848 xmm16+ reg and output is a mem.
11850 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11852 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11853 also for flag_dwarf2_cfi_asm.
11855 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11857 PR rtl-optimization/85342
11858 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11859 a bool scalar var inside of the loop instead. Don't try to update
11860 recog_data.operand after failed apply_change_group.
11862 2018-04-12 Tom de Vries <tom@codesourcery.com>
11865 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11866 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11867 array with flexible array member as array without given dimension.
11868 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11869 argument for undefined param to true.
11871 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11874 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11875 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11876 from PowerPC section.
11877 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11878 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11879 help text that is too long.
11880 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11881 help text that is too long.
11882 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11883 help text that is too long.
11885 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11887 * config/alpha/alpha.md (stack_probe_internal): Rename
11888 from "probe_stack". Update all callers.
11890 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11892 PR rtl-optimization/84566
11893 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11894 sched_macro_fuse_insns.
11896 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11899 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11900 (compute_block_dependences): ... from here.
11902 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11904 PR tree-optimization/85331
11905 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11906 from int to HOST_WIDE_INT.
11908 2018-04-11 Martin Jambor <mjambor@suse.cz>
11911 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11912 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11913 not the same as the source val.
11914 (cgraph_edge_brings_value_p): New parameter.
11915 (gather_edges_for_value): Pass destination value to
11916 cgraph_edge_brings_value_p.
11917 (perhaps_add_new_callers): Likewise.
11918 (get_info_about_necessary_edges): Likewise and exclude values brought
11919 only by self-recursive edges.
11920 (create_specialized_node): Redirect only clones of self-calling edges.
11921 (+self_recursive_pass_through_p): New function.
11922 (find_more_scalar_values_for_callers_subset): Use it.
11923 (find_aggregate_values_for_callers_subset): Likewise.
11924 (known_aggs_to_agg_replacement_list): Removed.
11925 (decide_whether_version_node): Re-calculate known constants for all
11926 remaining context clones.
11928 2018-04-11 Richard Biener <rguenther@suse.de>
11931 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11932 from early DWARF output.
11933 (dwarf2out_early_finish): Output line info unconditionally into
11934 early DWARF and add reference to it.
11936 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11939 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11940 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11941 other than V2DFmode using iptr mode attribute.
11942 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11944 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11946 PR rtl-optimization/84659
11947 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11949 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11952 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11954 (output_loc_list): Pass address of a dummy size variable even in the
11955 locview handling loop.
11956 (index_location_lists): Add comment on why skip_loc_list_entry can't
11959 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11962 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11965 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11968 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11969 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11970 and -mstring-compare-inline-limit.
11972 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11975 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11976 for stack clash protection in a register whenever we need it to be in
11979 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11981 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11982 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11984 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11987 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11989 (mlong-double-): Ditto.
11990 * config/rs6000/sysv4.opt (msdata=): Ditto.
11991 (mtls-size=): Ditto.
11993 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11995 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11996 erroneous entries for
11997 "vector int vec_ldl (int, long int *)", and
11998 "vector unsigned int vec_ldl (int, unsigned long int *)".
11999 Add comments and entries for
12000 "vector bool char vec_ldl (int, bool char *)",
12001 "vector bool short vec_ldl (int, bool short *)",
12002 "vector bool int vec_ldl (int, bool int *)",
12003 "vector bool long long vec_ldl (int, bool long long *)",
12004 "vector pixel vec_ldl (int, pixel *)",
12005 "vector long long vec_ldl (int, long long *)",
12006 "vector unsigned long long vec_ldl (int, unsigned long long *)".
12007 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12008 type tree bool_long_long_type_node and correct definition of
12009 bool_V2DI_type_node to make reference to this new type tree.
12010 (rs6000_mangle_type): Replace erroneous reference to
12011 bool_long_type_node with bool_long_long_type_node.
12012 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12013 comments to emphasize sign distinctions for char and int types and
12014 replace RS6000_BTI_bool_long constant with
12015 RS6000_BTI_bool_long_long constant. Also add comment to restrict
12016 use of RS6000_BTI_pixel.
12017 (bool_long_type_node): Remove this macro definition.
12018 (bool_long_long_type_node): New macro definition
12020 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12022 PR rtl-optimization/85300
12023 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12024 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12025 simplify_unary_operation fails.
12027 2018-04-10 Martin Liska <mliska@suse.cz>
12029 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12030 cgraph_edge and ipa_ref.
12032 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12036 * config/i386/sse.md
12037 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12038 computation of the VEC_MERGE selector from mask.
12039 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12040 Fix decoding of the VEC_MERGE selector into mask.
12042 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12044 PR tree-optimization/85286
12045 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12047 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12049 * final.c (final_1): Set insn_last_address as well as
12050 insn_current_address.
12052 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12055 * explow.c (emit_stack_probe): Call validize_mem on memory location
12056 before passing it to gen_probe_stack. Create address operand and
12057 legitimize it for the probe_stack_address case.
12059 2018-04-09 Jan Hubicka <jh@suse.cz>
12062 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12063 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12064 * tree.c (free_lang_data_in_type): Fix handling of binfos;
12066 (free_lang_data): Rebuild type inheritance graph.
12068 2018-04-09 Martin Sebor <msebor@redhat.com>
12070 * invoke.texi (-finline-small-functions): Mention other optimization
12072 (-findirect-inlining, -fpartial-inlining): Same.
12073 (-finline-functions-called-once): Same.
12074 (-freorder-blocks-and-partition): Same.
12076 2018-04-09 Jan Hubicka <jh@suse.cz>
12079 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12080 jumps; choose last target that matches the criteria (i.e.
12081 no partition changes for non-crossing jumps).
12082 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12083 support for redirecting crossing jumps to non-crossing.
12085 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
12087 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12088 also for naked functions.
12090 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
12092 * config/arc/arc.md (add_shift): New pattern.
12093 (add_shift2): Likewise.
12094 (sub_shift): Likewise.
12095 (sub_shift_cmp0_noout): Likewise.
12096 (compare_si_ashiftsi): Likewise.
12097 (xbfu_cmp0_noout): New combine pattern.
12098 (xbfu_cmp0"): Likewise.
12099 (movsi_set_cc_insn): Place the predicable variant first.
12100 (commutative_binary_cmp0_noout): Remove clobber.
12101 (commutative_binary_cmp0): New pattern.
12102 (noncommutative_binary_cmp0): Likewise.
12103 (noncommutative_binary_cmp0_noout): Likewise.
12104 (noncommutative_binary_comparison_result_used): Removed.
12105 (rsub_cmp0): New pattern.
12106 (rsub_cmp0_noout): Likewise.
12107 (extzvsi): Changed, keep only meaningful variants.
12108 (SQH, SEZ): New iterators.
12109 (SQH_postfix): New mode attribute.
12110 (SEZ_prefix): New code attribute.
12111 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12112 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12113 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12114 of numerical value.
12115 (noncommutative_operator): Check the availability of barrel
12118 2018-04-09 Richard Biener <rguenther@suse.de>
12120 PR tree-optimization/85284
12121 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12122 Only use the niter constraining form of simple_iv when the exit
12123 is always executed.
12125 2018-04-09 Tom de Vries <tom@codesourcery.com>
12128 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12129 (define_expand "*memory_barrier"): New define_expand.
12130 (define_insn "memory_barrier"): New insn.
12132 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12134 PR rtl-optimization/80463
12135 PR rtl-optimization/83972
12136 PR rtl-optimization/83480
12138 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12139 correct producer for the insn.
12140 (tidy_control_flow): Fixup seqnos in case of debug insns.
12142 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12144 PR rtl-optimization/83913
12146 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12147 different sched-times when merging exprs.
12149 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12151 PR rtl-optimization/83962
12153 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12154 tidy_fallthru_edge and tidy_control_flow.
12156 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12158 PR rtl-optimization/83530
12160 * sel-sched.c (force_next_insn): New global variable.
12161 (remove_insn_for_debug): When force_next_insn is true, also leave only
12162 next insn in the ready list.
12163 (sel_sched_region): When the region wasn't scheduled, make another pass
12164 over it with force_next_insn set to 1.
12166 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12168 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12170 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12171 for interrupt control.
12172 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12173 functions for interrupt control.
12174 * config/nds32/nds32-intrinsic.md: Likewise.
12175 * config/nds32/nds32_intrinsic.h: Likewise.
12176 * config/nds32/nds32.h (nds32_builtins): Likewise.
12178 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12180 * config/nds32/nds32.c (nds32_init_machine_status,
12181 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12182 strict_aligned_p field.
12183 (nds32_expand_to_rtl_hook): New function.
12184 (TARGET_EXPAND_TO_RTL_HOOK): Define.
12185 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12187 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12188 Chung-Ju Wu <jasonwucj@gmail.com>
12190 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12191 * config/nds32/nds32-n7.md: New file.
12192 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12193 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12195 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12196 * config/nds32/nds32.md (pipeline_model): Add n7.
12197 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12198 * config/nds32/pipelines.md: Include n7 settings.
12200 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12201 Chung-Ju Wu <jasonwucj@gmail.com>
12203 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12204 * config/nds32/nds32-e8.md: New file.
12205 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12206 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12208 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12209 * config/nds32/nds32.md (pipeline_model): Add e8.
12210 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12211 * config/nds32/pipelines.md: Include e8 settings.
12213 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12214 Chung-Ju Wu <jasonwucj@gmail.com>
12216 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12217 * config/nds32/nds32-n8.md: New file.
12218 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12219 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12221 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12222 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12223 * config/nds32/nds32.md (pipeline_model): Add n8.
12224 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12225 * config/nds32/pipelines.md: Include n8 settings.
12227 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12228 Chung-Ju Wu <jasonwucj@gmail.com>
12230 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12231 * config/nds32/nds32-n9-2r1w.md: New file.
12232 * config/nds32/nds32-n9-3r2w.md: New file.
12233 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12234 nds32_register_ports): New or modify for cpu n9.
12235 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12237 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12238 * config/nds32/nds32-utils.c: New file.
12239 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12240 TARGET_MUL_SLOW): Define.
12241 * config/nds32/nds32.md (pipeline_model): New attribute.
12242 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12243 New options that support cpu n9.
12244 * config/nds32/pipelines.md: Include n9 settings.
12245 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12247 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12249 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12250 information if necessary.
12251 (output_cond_branch_compare_zero): Likewise.
12252 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12253 (nds32_target_alignment): Refine for alignment.
12254 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12255 (FUNCTION_BOUNDARY): Modify.
12256 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12258 * config/nds32/nds32.opt (malways-align, malign-functions): New.
12260 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12262 * config/nds32/constants.md (unspec_volatile_element): Add values for
12263 TLB operation and data prefetch.
12264 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12265 functions for TLB operation and data prefetch.
12266 * config/nds32/nds32-intrinsic.md: Likewise.
12267 * config/nds32/nds32_intrinsic.h: Likewise.
12268 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12269 (nds32_print_operand): Likewise.
12270 * config/nds32/nds32.h (nds32_builtins): Likewise.
12272 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
12273 Andrew Pinski <pinsika@gcc.gnu.org>
12275 PR middle-end/82976
12276 * match.pd: Use constant_boolean_node of correct type instead of
12277 boolean_true_node or boolean_false_node for simplifying
12278 pointer comparisons to zero.
12280 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12282 PR tree-optimization/80021
12283 * tree.c (verify_type_variant): Make error call in verify_variant_match
12284 translatable and remove final full stop.
12286 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12288 * config/nds32/constants.md (unspec_volatile_element): Add
12289 UNSPEC_VOLATILE_EH_RETURN.
12290 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12291 nds32_output_stack_pop): Support dwarf exception handling process.
12292 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12293 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12294 exception handling process.
12295 (nds32_compute_stack_frame): Likewise.
12296 (nds32_return_addr_rtx): Likewise.
12297 (nds32_initial_elimination_offset): Likewise.
12298 (nds32_expand_prologue): Likewise.
12299 (nds32_expand_epilogue): Likewise.
12300 (nds32_dynamic_chain_address): New function.
12301 * config/nds32/nds32.h (machine_function): Add fields for dwarf
12302 exception handling.
12303 (DYNAMIC_CHAIN_ADDRESS): Define.
12304 (EH_RETURN_DATA_REGNO): Define.
12305 (EH_RETURN_STACKADJ_RTX): Define.
12306 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12307 patterns for dwarf exception handling.
12309 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12311 * config/nds32/nds32.h: Clean up obsolete macros.
12313 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12315 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12316 Add enum values for particular instructions.
12317 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12318 particular intrinsic functions.
12319 * config/nds32/nds32-intrinsic.md: Likewise.
12320 * config/nds32/nds32_intrinsic.h: Likewise.
12321 * config/nds32/nds32.h (nds32_builtins): Likewise.
12322 * config/nds32/nds32.md (type): Add pbsad and pbsada.
12323 (btst, ave): New patterns for particular instructions.
12325 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12327 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12328 Add enum values for atomic load/store and memory sync.
12329 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12331 * config/nds32/nds32-intrinsic.md: Likewise.
12332 * config/nds32/nds32_intrinsic.h: Likewise.
12333 * config/nds32/nds32.h (nds32_builtins): Likewise.
12335 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12337 PR tree-optimization/85257
12338 * fold-const.c (native_encode_vector): If not all elts could fit
12339 and off is -1, return 0 rather than offset.
12340 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12341 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12342 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
12343 adjust buffer in native_interpret_expr call.
12345 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12347 * config/nds32/constants.md (unspec_volatile_element): Add cache
12348 control enum values.
12349 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12350 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12351 * config/nds32/nds32.c (nds32_cctl_names): New.
12352 (nds32_print_operand): Handle cache control register names.
12353 * config/nds32/nds32.h (nds32_builtins): New enum values.
12354 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12356 * config/nds32/nds32.md (type): Add mmu.
12357 * config/nds32/pipelines.md (simple_insn): Add mmu.
12359 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12361 * config/nds32/nds32.md (type): Remove call.
12362 * config/nds32/pipelines.md (simple_insn): Likewise.
12364 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12366 * config/nds32/constants.md (unspec_volatile_element): Add
12367 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12368 UNSPEC_VOLATILE_FMFCFG.
12369 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12370 description for fmfcfg and fmfcsr.
12371 (bdesc_1arg): Add fmtcsr.
12372 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12373 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12374 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12375 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12376 unspec_fmfcfg): New patterns.
12377 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12378 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12379 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12380 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12381 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12382 __nds32__fmfcfg): Define.
12384 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12386 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12387 intrinsic register names.
12388 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12389 intrinsic register enum values and macros.
12391 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12393 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12394 for load/store addressing form.
12395 (nds32_print_operand_address): Likewise.
12397 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
12400 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12401 based on LABEL_REF. Remove useless assertion.
12402 (pic_address_needs_scratch): Fix formatting.
12403 (sparc_legitimize_pic_address): Minor tweaks.
12404 (sparc_delegitimize_address): Adjust assertion accordingly.
12405 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12406 into symbolic_operand.
12407 (movsi_high_pic_label_ref): Likewise.
12408 (movsi_lo_sum_pic_label_ref): Likewise.
12409 (movdi_pic_label_ref): Likewise.
12410 (movdi_high_pic_label_ref): Likewise.
12411 (movdi_lo_sum_pic_label_ref): Likewise.
12413 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
12415 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12416 custom LIB_SPEC setup.
12418 2018-04-06 Ruslan Bukin <br@bsdpad.com>
12419 Kito Cheng <kito.cheng@gmail.com>
12421 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12422 * config/riscv/freebsd.h: New.
12424 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12426 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12427 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12430 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12431 Kito Cheng <kito.cheng@gmail.com>
12433 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12434 nds32_output_call, nds32_symbol_binds_local_p): New functions.
12435 * config/nds32/nds32-protos.h (nds32_output_call,
12436 nds32_output_return): Declare.
12437 * config/nds32/nds32.md: Refine all the call and return patterns.
12439 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12442 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12443 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12445 PR rtl-optimization/84872
12446 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12447 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12448 EDGE_CROSSING edge.
12450 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12452 * expr.c (copy_blkmode_to_reg): Revert 254862.
12453 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12455 2018-04-06 Richard Biener <rguenther@suse.de>
12457 PR middle-end/85244
12458 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12459 after seeing a component reference with an adjacent field. Treat
12460 refs to arrays at struct end of external decls similar to
12461 refs to unconstrained commons.
12463 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12466 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12467 look through SAVE_EXPRs with non-side-effects argument. Adjust
12469 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12472 2018-04-06 Richard Biener <rguenther@suse.de>
12474 PR middle-end/85180
12475 * alias.c (find_base_term): New wrapper around find_base_term
12476 unwinding CSELIB_VAL_PTR changes.
12477 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12480 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12482 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12484 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12485 constant definitions.
12486 ("nop"): lr 0,0 -> nopr r0
12487 ("nop_lr0", "nop_lr1"): New insn definitions.
12489 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12491 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12492 NDS32_V3PUSH_AVAILABLE_P macro.
12494 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12495 Chung-Ju Wu <jasonwucj@gmail.com>
12497 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12498 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12499 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12500 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12501 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12502 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12503 * config/nds32/constraints.md: New constraints and checking for hard
12504 float configuration.
12505 * config/nds32/iterators.md: New mode iterator and attribute for hard
12506 float configuration.
12507 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12509 * config/nds32/nds32-fpu.md: New file.
12510 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12511 deal with hard float code generation.
12512 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12514 (abi_type, float_reg_number): New enum type.
12515 * config/nds32/nds32-predicates.c: New predicates for hard float.
12516 * config/nds32/nds32-protos.h: Declare functions for hard float.
12517 * config/nds32/nds32.c: Implementation for hard float configuration.
12518 * config/nds32/nds32.h: Definitions for hard float configuration.
12519 * config/nds32/nds32.md: Include hard float machine description and
12520 modify patterns for hard float configuration.
12521 * config/nds32/nds32.opt: New options for hard float configuration.
12522 * config/nds32/predicates.md: New predicates for hard float
12525 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12527 * common/config/nds32/nds32-common.c
12528 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12530 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12532 PR middle-end/85195
12533 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12534 CONSTRUCTOR_ELT (ctor, ...)->value.
12536 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12539 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12541 2018-04-05 Tom de Vries <tom@codesourcery.com>
12544 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12547 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12548 Kito Cheng <kito.cheng@gmail.com>
12550 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12551 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12552 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12553 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12555 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12556 Kito Cheng <kito.cheng@gmail.com>
12558 * config/nds32/constraints.md (Ufe): New memory constraint.
12559 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12560 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12561 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12563 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12564 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12566 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12568 * config/nds32/nds32.md: Use optimize_size in the condition for
12569 alu-shift instructions.
12571 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12573 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12575 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12577 * config/nds32/nds32.md (negsi2): Refine pattern.
12579 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12580 Chung-Ju Wu <jasonwucj@gmail.com>
12582 * config/nds32/iterators.md (shift_rotate): New code iterator.
12583 (shift): New code attribute.
12584 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12585 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12586 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12587 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12588 bit-wise operations.
12589 (andsi3, *andsi3): Ditto.
12590 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12591 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12592 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12593 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12594 nds32_ior_operand, nds32_xor_operand): New predicates.
12596 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12598 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12599 (addsi3, subsi3): ... this.
12601 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12603 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12605 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12607 * config/nds32/nds32.md: Adjust indention.
12609 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12611 * config/nds32/nds32.md (feature): New attribute.
12613 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12615 * config/nds32/nds32.md (subtype): New attribute.
12617 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12620 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12621 expansion to perform a bitwise AND of the argument followed by a
12622 boolean negation of the result.
12624 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12626 PR rtl-optimization/84878
12627 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12628 the basic block. Assert the use reference is not artificial and that
12629 it has an associated insn.
12631 2018-04-04 Michael Matz <matz@suse.de>
12633 * builtins.c (compute_objsize): Pass correct operand
12634 to array_at_struct_end_p.
12636 2018-04-04 Richard Biener <rguenther@suse.de>
12639 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12640 from contexts for DINFO_LEVEL_TERSE and below.
12642 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12644 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12645 resiter_operand condition.
12646 * config/nds32/nds32.md (*move<mode>): Ditto.
12648 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12649 Monk Chiang <sh.chiang04@gmail.com>
12651 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12653 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12655 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12657 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12658 Kito Cheng <kito.cheng@gmail.com>
12660 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12661 nds32_cond_code_str, output_cond_branch,
12662 output_cond_branch_compare_zero, 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: New functions.
12668 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12669 nds32_expand_cstore, nds32_expand_movcc,
12670 nds32_output_cbranchsi4_equality_zero,
12671 nds32_output_cbranchsi4_equality_reg,
12672 nds32_output_cbranchsi4_equality_reg_or_const_int,
12673 nds32_output_cbranchsi4_greater_less_zero): Declare.
12674 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12675 nds32_rimm11s_operand): New predicates.
12676 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12677 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12680 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12682 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12683 * config/nds32/nds32.md: Ditto.
12684 * config/nds32/pipelines.md: Ditto.
12686 2018-04-04 Richard Biener <rguenther@suse.de>
12688 PR tree-optimization/85168
12689 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12690 propagating abnormals.
12692 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12694 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12696 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12697 Kito Cheng <kito.cheng@gmail.com>
12699 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12700 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12701 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12702 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12703 * config/nds32/nds32.md (sibcall_internal): New.
12704 (sibcall_register): Remove.
12705 (sibcall_immediate): Remove.
12706 (sibcall_value_internal): New.
12707 (sibcall_value_register): Remove.
12708 (sibcall_value_immediate): Remove.
12709 * config/nds32/predicates.md (nds32_general_register_operand): New.
12710 (nds32_call_address_operand): New.
12712 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12714 PR rtl-optimization/85167
12715 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12716 bb_defs if *split_p, instead preinitialize it to NULL.
12718 PR tree-optimization/85156
12719 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12720 evaluating the argument multiple times.
12722 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12724 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12726 (_mm_cvtpd_ps): Likewise.
12727 (_mm_cvttpd_epi32): Likewise.
12728 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12729 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12730 vector, pixel, and bool following altivec.h include.
12732 2018-04-03 Martin Sebor <msebor@redhat.com>
12734 * doc/extend.texi (Common Function Attributes): Clarify.
12735 (const attribute): Likewise.
12736 (pure attribute): Likewise.
12738 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12741 * config/i386/i386.c (ix86_expand_vector_set): Use
12742 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12744 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12746 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12747 instructions when changing rounding bits to preserve precision bits
12748 in the x87 control word.
12750 2018-04-03 Martin Liska <mliska@suse.cz>
12752 PR tree-optimization/82491
12753 * rtl.h (strip_offset_and_add): Replace += suboffset with
12754 poly_uint64 () + suboffset.
12756 2018-03-29 Martin Liska <mliska@suse.cz>
12757 Martin Jambor <mjambor@suse.cz>
12760 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12761 param_type is not an integral or pointer type.
12763 2018-04-03 Richard Biener <rguenther@suse.de>
12765 * sese.h (recompute_all_dominators): Remove.
12767 2018-04-02 Martin Sebor <msebor@redhat.com>
12769 * doc/invoke.texi (-Wrestrict): Fix typos.
12771 2018-04-02 Jim Wilson <jimw@sifive.com>
12773 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12774 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12775 (<optab>di3, <optab>si3_extend): Likewise.
12776 (<optab>si3_mask, <optab>si3_mask_1): New.
12777 (<optab>di3_mask, <optab>di3_mask_1): New.
12778 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12779 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12780 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12782 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12784 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12787 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12789 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12790 (nds32_canonicalize_comparison): New function.
12792 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12793 Kito Cheng <kito.cheng@gmail.com>
12794 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12796 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12797 * config/nds32/constants.md (unspec_volatile_element): Add
12798 UNSPEC_VOLATILE_RELAX_GROUP.
12799 * config/nds32/nds32-relax-opt.c: New file.
12800 * config/nds32/nds32-predicates.c
12801 (nds32_symbol_load_store_p): New function.
12802 * config/nds32/nds32-protos.h
12803 (nds32_symbol_load_store_p): Declare function.
12804 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12805 * config/nds32/nds32.c
12806 (nds32_register_pass): New function to register pass.
12807 (nds32_register_passes): New function to register passes.
12808 * config/nds32/nds32.md (relax_group): New pattern.
12809 * config/nds32/nds32.opt (mrelax-hint): New option.
12810 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12812 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12814 * config/nds32/t-nds32: Modify files dependency.
12816 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12818 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12819 (PROFILE_HOOK): Define its implementation.
12821 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12823 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12824 type and 32-bit size.
12826 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12828 PR middle-end/85090
12829 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12830 (V_128_256): New mode iterator.
12831 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12832 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12833 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12835 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12836 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12838 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12841 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12842 NaN inputs correctly.
12844 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12847 * config/rs6000/vsx.md (??r): New mode attribute.
12848 (*vsx_mov<mode>_64bit): Use it.
12849 (*vsx_mov<mode>_32bit): Likewise.
12851 2018-03-30 Martin Sebor <msebor@redhat.com>
12853 PR tree-optimization/84818
12854 * builtins.c (check_access): Use warning_n.
12856 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12859 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12861 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12864 2018-03-30 Julia Koval <julia.koval@intel.com>
12867 * x86-tune.def (movx, partial_reg_dependency): Enable for
12870 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12872 PR inline-asm/84985
12873 * lra-constraints.c (process_alt_operands): Move setting
12874 this_alternative_matches below.
12876 2018-03-29 Martin Liska <mliska@suse.cz>
12879 * doc/invoke.texi: Document how LTO works with debug info.
12880 Describe auto-load support of binutils. Mention 'x86-64'
12881 as valid option value of -march option.
12883 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12885 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12888 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12889 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12890 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12893 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12896 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12897 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12898 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12899 for RS6000_BTM_POWERPC64.
12900 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12901 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12902 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12905 (DIVDEU): Likewise.
12907 2018-03-28 Carl Love <cel@us.ibm.com>
12910 2017-09-27 Carl Love <cel@us.ibm.com>
12912 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12913 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12914 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12917 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12919 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12920 instead of __vector bool.
12921 (_mm_max_pu8): Likewise.
12922 (_mm_min_pi16): Likewise.
12924 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12927 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12928 (DIVWEUO): Likewise.
12929 (DIVDEO): Likewise.
12930 (DIVDEUO): Likewise.
12931 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12932 DIVWEUO and DIVDEUO.
12933 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12934 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12935 (div_extend): Likewise.
12936 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12938 (__builtin_divweuo): Likewise.
12939 (__builtin_divdeo): Likewise.
12940 (__builtin_divdeuo): Likewise.
12942 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12945 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12946 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12948 PR tree-optimization/82004
12949 * gimple-match-head.c (optimize_pow_to_exp): New function.
12950 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12951 Don't fold to exp if optimize_pow_to_exp is false.
12953 2018-03-28 Martin Liska <mliska@suse.cz>
12956 * calls.c (initialize_argument_information): Fix trailing space.
12957 * common.opt: Fix typo and provide better explanation for
12958 -fsanitize-coverage option.
12959 * config/i386/i386.opt: Fix typo.
12961 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12962 Martin Liska <mliska@suse.cz>
12965 * gimplify.c (asan_poison_variable): Don't do the check for
12966 gimplify_omp_ctxp here.
12967 (gimplify_decl_expr): Do it here.
12968 (gimplify_target_expr): Likewise.
12970 2018-03-28 Martin Liska <mliska@suse.cz>
12973 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12974 chkp_type_bounds_count if MPX is not enabled.
12976 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12978 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12980 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12983 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12984 function to create the function decl for complex long double
12985 multiply and divide for -mabi=ieeelongdouble.
12986 (init_float128_ieee): Call it.
12988 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12991 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12992 -fcf-protection=branch -mibt.
12993 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12995 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12998 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12999 arm_word_relocations.
13001 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
13004 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13005 extern array declarations.
13007 2018-03-27 Richard Biener <rguenther@suse.de>
13009 PR middle-end/84067
13010 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13011 explicit single_use checks.
13013 2018-03-27 Richard Biener <rguenther@suse.de>
13015 PR tree-optimization/85082
13016 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13019 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13021 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13022 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13023 Turn on fasynchronous-unwind-tables and funwind-tables.
13025 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
13028 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13029 (*bmi_blsr_<mode>_ccz): Ditto.
13031 2018-03-26 Tom de Vries <tom@codesourcery.com>
13033 PR tree-optimization/85063
13034 * omp-general.c (offloading_function_p): New function. Factor out
13036 * omp-offload.c (pass_omp_target_link::gate): ... here.
13037 * omp-general.h (offloading_function_p): Declare.
13038 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13039 with attribute omp declare target for offloading functions.
13041 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
13043 PR tree-optimization/84005
13044 * tree-data-ref.h (get_base_for_alignment): Declare.
13045 * tree-data-ref.c (get_base_for_alignment_1): New function.
13046 (get_base_for_alignment): Likewise.
13047 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13048 get_base_for_alignment to find a suitable base object, instead
13049 of always using drb->base_address.
13051 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13053 PR inline-asm/85022
13054 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13055 known size by default.
13057 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
13059 PR inline-asm/85030
13060 * lra-constraints.c (process_alt_operands): Don't match BLKmode
13061 and non BLKmode operands.
13063 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13066 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13067 Clean up attributes.
13069 2018-03-23 Richard Biener <rguenther@suse.de>
13072 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13073 we are going to emit early debug for LTO.
13075 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13077 PR inline-asm/85034
13078 * function.c (match_asm_constraints_1): Don't optimize if input
13079 doesn't satisfy general_operand predicate for output's mode.
13081 PR inline-asm/85022
13082 * alias.c (write_dependence_p): Don't require for x_canonicalized
13083 non-VOIDmode if x has VOIDmode.
13086 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13087 just don't try to optimize it rather than assert it never happens.
13089 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13091 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13092 macro expansions for definition of ST_INTERNAL_<mode> and
13093 LD_INTERNAL_<mode> builtins.
13094 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13096 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13098 (altivec_expand_st_builtin): Likewise.
13099 (altivec_expand_builtin): Remove calls to deleted functions.
13100 (rs6000_address_for_altivec): Delete this function.
13101 * config/rs6000/vector.md: Remove expands for
13102 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13104 2018-03-22 Sudakshina Das <sudi.das@arm.com>
13107 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13108 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13109 re-computing once computed.
13110 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13111 (arm_init_machine_status): Initialize
13112 machine->static_chain_stack_bytes.
13114 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13117 * doc/extend.texi: Add four new prototypes for vec_ld.
13118 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13119 definitions for more logical presentation.
13120 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13121 entries for V1TI variants of __builtin_altivec_ld builtin.
13122 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13123 handling of V1TI variant of LVX icode pattern.
13124 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13125 (rs6000_gimple_fold_builtin): Likewise.
13126 (altivec_init_builtins): Add code to define
13127 __builtin_altivec_lvx_v1ti function.
13129 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13131 PR inline-asm/84941
13132 * function.c (match_asm_constraints_1): Don't do the optimization
13133 if input isn't a REG, SUBREG, MEM or constant.
13135 2018-03-22 Tom de Vries <tom@codesourcery.com>
13137 PR tree-optimization/84956
13138 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13139 bb_has_abnormal_pred.
13141 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13144 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13145 DECL_INITIAL (decl) to decl at the end.
13146 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13147 adjust the comment.
13149 2018-03-21 Joseph Myers <joseph@codesourcery.com>
13151 * doc/extend.texi (__builtin_tgmath): Document when complex
13152 integer types are treated as _Complex _Float64.
13154 2018-03-21 Tom de Vries <tom@codesourcery.com>
13156 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13158 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13160 PR tree-optimization/84960
13161 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13162 if it is ENTRY block, move them into single succ of ENTRY in that case.
13164 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
13166 PR tree-optimization/84811
13167 * poly-int.h (poly_span_traits): Remove the T3 parameter and
13168 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13169 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13170 (known_subrange_p): Update accordingly. Cast each value involved
13171 in the size comparison, rather than casting the result of the
13174 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13176 PR tree-optimization/84982
13177 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13178 by flipping the least significant bit rather than all bits from
13179 bitpos to bitpos + bitsize - 1.
13181 2018-03-21 Nathan Sidwell <nathan@acm.org>
13183 * doc/extend.texi (Deprecated Features): Remove mention of
13184 long-deleted deprecations.
13186 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13189 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13190 * configure: Regenerate.
13192 2018-03-21 Tom de Vries <tom@codesourcery.com>
13194 PR tree-optimization/83126
13195 * tree-parloops.c (num_phis): New function.
13196 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13198 2018-03-21 Nathan Sidwell <nathan@acm.org>
13200 * doc/extend.texi (Deprecated Features): Update deprecated flags,
13201 mention anon-struct/union members and trailing attributes.
13203 2018-03-21 Bin Cheng <bin.cheng@arm.com>
13205 PR tree-optimization/84969
13206 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13207 builtin memset partitions if they set different rhs values.
13209 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13211 PR rtl-optimization/84989
13212 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13213 VEC_DUPLICATE with scalar result mode.
13215 2018-03-21 Martin Liska <mliska@suse.cz>
13218 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13219 not intended return statement.
13221 2018-03-21 Martin Liska <mliska@suse.cz>
13224 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13225 (chkp_find_bound_slots_1): Limit number of iterations.
13227 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
13230 * Minor grammar fixes for x86 options.
13232 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13235 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13236 holding REG_CFA_RESTORE notes, instead turn them into a USE.
13238 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
13241 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13242 (altivec_lvx_<mode>_1op): Likewise.
13243 (altivec_stvx_<mode>_2op): Likewise.
13244 (altivec_stvx_<mode>_1op): Likewise.
13245 (altivec_lvx_<VM2:mode>): New define_expand.
13246 (altivec_stvx_<VM2:mode>): Likewise.
13247 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13248 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13249 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13250 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13251 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13252 (rs6000_gen_lvx): Likewise.
13253 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13254 (altivec_expand_stv_builtin): Likewise.
13255 (altivec_expand_builtin): Likewise.
13256 * config/rs6000/vector.md: Likewise.
13258 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13261 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13264 2018-03-20 Richard Biener <rguenther@suse.de>
13267 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13268 sign-conversions as zero, fall back to standard scalar_stmt
13271 2018-03-20 Martin Liska <mliska@suse.cz>
13274 * predict.c (rebuild_frequencies): Handle case when we have
13275 PROFILE_ABSENT, but flag_guess_branch_prob is false.
13277 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13280 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13281 flag_section_anchors.
13282 * varasm.c (use_blocks_for_decl_p): Remove hack for
13283 dw2_force_const_mem.
13286 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13288 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
13289 be created, use lowpart_subreg of operands[0] rather than operands[0]
13291 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13292 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13293 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13294 and n constraint instead of aarch64_shift_imm_di and Usd.
13295 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13296 (*aarch64_<optab>_reg_minus<mode>3): ... this.
13298 2018-03-20 Sudakshina Das <sudi.das@arm.com>
13301 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13302 to favor GPR over NEON registers.
13303 (<shift>di3_neon): Likewise.
13305 2018-03-20 Tom de Vries <tom@codesourcery.com>
13308 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13309 (nvptx_process_pars): Emit bar.sync asap and alap.
13311 2018-03-20 Tom de Vries <tom@codesourcery.com>
13314 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13315 seen_label if seen_label is already set.
13317 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13320 * config/i386/i386.c (fold_builtin_cpu): For features above 31
13321 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13322 Use 1U instead of 1. Formatting fixes.
13325 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13326 instead of TREE_TYPE (s1) for the return value.
13328 2018-03-19 Jakub Jelinek <jakub@redhat.com>
13330 PR tree-optimization/84946
13331 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13332 bitsize + bitsize in poly_uint64 rather than poly_int64.
13335 * dwarf2asm.c: Include fold-const.c.
13336 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13337 of decl rather than decl itself.
13339 PR rtl-optimization/84643
13340 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13342 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
13345 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13346 calling assemble_variable.
13348 2018-03-19 Sudakshina Das <sudi.das@arm.com>
13351 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13352 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13354 2018-03-19 Jim Wilson <jimw@sifive.com>
13357 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13358 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13359 (riscv_first_stack_step): Likewise.
13360 (riscv_option_override): Use STACK_BOUNDARY instead of
13361 MIN_STACK_BOUNDARY.
13362 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13363 MIN_STACK_BOUNDARY.
13364 (BIGGEST_ALIGNMENT): Set to 128.
13365 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13366 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13369 2018-03-19 Richard Biener <rguenther@suse.de>
13371 PR tree-optimization/84933
13372 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13373 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13375 2018-03-19 Richard Biener <rguenther@suse.de>
13377 PR tree-optimization/84859
13378 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13379 (cond_if_else_store_replacement): Perform sinking operation on
13380 single-store BBs regardless of MAX_STORES_TO_SINK setting.
13381 Generalize what a BB with a single eligible store is.
13383 2018-03-19 Richard Biener <rguenther@suse.de>
13385 PR tree-optimization/84929
13386 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13387 chrec_is_positive against non-chrec arg.
13389 2018-03-19 Tamar Christina <tamar.christina@arm.com>
13392 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13394 2018-03-18 Martin Liska <mliska@suse.cz>
13396 PR rtl-optimization/84635
13397 * regrename.c (build_def_use): Use matches_mode only when
13400 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
13402 PR tree-optimization/84913
13403 * tree-vect-loop.c (vectorizable_reduction): Don't try to
13404 vectorize chains of COND_EXPRs.
13406 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13408 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13410 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13412 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13414 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13416 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13418 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13419 Kito Cheng <kito.cheng@gmail.com>
13421 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13422 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13423 (nds32_adjust_reg_alloc_order): New function.
13424 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13426 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
13428 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13429 nds32_print_operand, nds32_print_operand_address): Use
13430 HOST_WIDE_INT_PRINT_DEC instead.
13432 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13434 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13436 2018-03-17 Jakub Jelinek <jakub@redhat.com>
13439 * config/i386/i386.c (initial_ix86_tune_features,
13440 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13441 unsigned long long.
13442 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13443 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13444 rather than 1u << ix86_tune. Formatting fix.
13445 (ix86_option_override_internal): Change ix86_arch_mask from
13446 unsigned int to unsigned HOST_WIDE_INT, initialize to
13447 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13448 (ix86_function_specific_restore): Likewise.
13450 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13453 * postreload.c (reload_combine_recognize_pattern): Perform
13454 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13455 truncate_int_for_mode the result for the destination's mode.
13458 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13459 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13461 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13464 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13467 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13468 regno_allocno_class_array and sorted_pseudos.
13469 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13470 insns where regno is used.
13472 2018-03-16 Martin Liska <mliska@suse.cz>
13475 * multiple_target.c (create_dispatcher_calls): Redirect
13476 reference in the symbol table.
13478 2018-03-16 Martin Liska <mliska@suse.cz>
13481 * multiple_target.c (create_dispatcher_calls): Redirect also
13484 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13488 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13489 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13490 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13492 2018-03-16 Julia Koval <julia.koval@intel.com>
13494 * doc/invoke.texi (Skylake Server): Add CLWB.
13495 Cannonlake): Remove CLWB.
13497 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13499 PR tree-optimization/84841
13500 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13502 (FLOAT_ONE_CONST_TYPE): Define.
13503 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13504 (sort_by_operand_rank): Put entries with higher constant_type last
13505 rather than first to match comments.
13507 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13509 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13512 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13515 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13516 check and use address of target always.
13518 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13521 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13522 (indirect_thunk_bnd_needed): Likewise.
13523 (indirect_thunks_used): Likewise.
13524 (indirect_thunks_bnd_used): Likewise.
13525 (indirect_return_needed): New.
13526 (indirect_return_bnd_needed): Likewise.
13527 (output_indirect_thunk_function): Add a bool argument for
13529 (output_indirect_thunk_function): Don't generate alias for
13530 function return thunk.
13531 (ix86_code_end): Call output_indirect_thunk_function to generate
13532 function return thunks.
13533 (ix86_output_function_return): Set indirect_return_bnd_needed
13534 and indirect_return_needed instead of indirect_thunk_bnd_needed
13535 and indirect_thunk_needed.
13537 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13539 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13540 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13541 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13543 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13544 Paul Hua <paul.hua.gm@gmail.com>
13547 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13549 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13551 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13552 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13553 resp. SFmode cases.
13555 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13558 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13559 instead of GET_MODE_SIZE when comparing Units.
13561 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13564 * varasm.c (hash_section): Return an unchangeble hash value
13565 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13566 Return !aarch64_can_use_per_function_literal_pools_p ().
13568 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13571 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13572 rather than address of cmode as last argument to prepare_cmp_insn.
13574 2018-03-15 Julia Koval <julia.koval@intel.com>
13576 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13577 F_AVX512VNNI, F_AVX512BITALG): New.
13579 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13582 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13583 insn for floating-point loads and stores.
13585 2018-03-14 Carl Love <cel@us.ibm.com>
13587 * config/rs6000/rs6000-c.c: Add macro definitions for
13588 ALTIVEC_BUILTIN_VEC_PERMXOR.
13589 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13590 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13591 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13592 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13594 * config/doc/extend.texi: Add prototypes for vec_permxor.
13596 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13599 * diagnostic-show-locus.c (class layout_point): Convert m_line
13600 from int to linenum_type.
13601 (line_span::comparator): Use linenum "compare" function when
13602 comparing line numbers.
13603 (test_line_span): New function.
13604 (layout_range::contains_point): Convert param "row" from int to
13606 (layout_range::intersects_line_p): Likewise.
13607 (layout::will_show_line_p): Likewise.
13608 (layout::print_source_line): Likewise.
13609 (layout::should_print_annotation_line_p): Likewise.
13610 (layout::print_annotation_line): Likewise.
13611 (layout::print_leading_fixits): Likewise.
13612 (layout::annotation_line_showed_range_p): Likewise.
13613 (struct line_corrections): Likewise for field m_row.
13614 (line_corrections::line_corrections): Likewise for param "row".
13615 (layout::print_trailing_fixits): Likewise.
13616 (layout::get_state_at_point): Likewise.
13617 (layout::get_x_bound_for_row): Likewise.
13618 (layout::print_line): Likewise.
13619 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13620 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13621 * input.c (selftest::test_linenum_comparisons): New function.
13622 (selftest::input_c_tests): Call it.
13623 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13624 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13625 * selftest.h (ASSERT_GT): New macro.
13626 (ASSERT_GT_AT): New macro.
13627 (ASSERT_LT): New macro.
13628 (ASSERT_LT_AT): New macro.
13630 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13632 PR rtl-optimization/84780
13633 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13635 2018-03-14 Martin Liska <mliska@suse.cz>
13637 * tree.c (record_node_allocation_statistics): Use
13638 get_stats_node_kind.
13639 (get_stats_node_kind): New function extracted from
13640 record_node_allocation_statistics.
13641 (free_node): Use get_stats_node_kind.
13643 2018-03-14 Richard Biener <rguenther@suse.de>
13645 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13646 that the value-set of ANTIC_IN doesn't grow.
13649 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13651 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13652 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13654 2018-03-14 Julia Koval <julia.koval@intel.com>
13656 * config.gcc (icelake-client, icelake-server): New.
13658 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13659 (initial_ix86_arch_features): Ditto.
13660 (PTA_SKYLAKE): Add SGX.
13661 (PTA_ICELAKE): Remove.
13662 (PTA_ICELAKE_CLIENT): New.
13663 (PTA_ICELAKE_SERVER): New.
13664 (ix86_option_override_internal): Split up icelake on icelake client and
13666 (get_builtin_code_for_version): Ditto.
13667 (fold_builtin_cpu): Ditto.
13668 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13669 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13670 * config/i386/i386.h (processor_type): Ditto.
13671 * doc/invoke.texi: Ditto.
13673 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13676 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13677 INTEGER_CST offset, add it together with bitpos / 8 and
13678 sign extend based on POINTER_SIZE.
13682 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13685 * config/i386/constraints.md (Yc): New register constraint.
13686 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13687 Use Yc constraint for alternative 2 of operand 0. Remove
13688 preferred_for_speed attribute.
13690 2018-03-14 Richard Biener <rguenther@suse.de>
13692 PR tree-optimization/84830
13693 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13694 with the old one to avoid oscillations.
13696 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13699 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13701 (assign_by_spills): Return a flag of reload assignment failure.
13702 Do not process the reload assignment failures. Do not spill other
13703 reload pseudos if they has the same reg class. Update n if
13705 (lra_assign): Add a return arg. Set up from the result of
13706 assign_by_spills call.
13707 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13708 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13709 usage_insns if it is not NULL.
13710 (spill_hard_reg_in_range): New function.
13711 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13712 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13713 function prototypes.
13714 (lra_assign): Change prototype.
13715 * lra.c (lra): Add code to deal with fails by splitting hard reg
13718 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13720 * config/riscv/riscv.opt (mrelax): New option.
13721 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13722 "norelax" when riscv_mrelax is disabled.
13723 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13725 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13728 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13729 reassociation for int modes.
13731 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13733 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13734 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13736 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13737 * config/aarch64/aarch64-sve.md
13738 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13739 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13740 (*extend<mode><Vwide>2): Rename to...
13741 (aarch64_sve_extend<mode><Vwide>2): ...this.
13742 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13743 renaming the old pattern to...
13744 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13746 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13747 define_expand, renaming the old pattern to...
13748 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13749 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13750 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13751 account when deciding which SVE instruction the optab should use.
13752 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13754 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13756 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13757 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13758 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13759 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13760 (tlsdesc_small_<mode>): Turn a define_expand and use
13761 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13762 (tlsdesc_small_advsimd_<mode>): ...this.
13763 (tlsdesc_small_sve_<mode>): New pattern.
13765 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13767 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13768 (UNSPEC_UMUL_HIGHPART): New constants.
13769 (MUL_HIGHPART): New int iteraor.
13770 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13771 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13773 (*<su>mul<mode>3_highpart): New define_insn.
13775 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13778 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13781 2018-03-13 Martin Liska <mliska@suse.cz>
13784 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13786 (sem_item_optimizer::~sem_item_optimizer): Release it.
13787 (sem_item_optimizer::merge_classes): Register variable aliases.
13788 (sem_item_optimizer::fixup_pt_set): New function.
13789 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13790 * ipa-icf.h: Declare new variables and functions.
13792 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13794 PR middle-end/84834
13795 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13796 integer_pow2p@2 and test integer_pow2p in condition.
13797 (A < 0 ? C : 0): Similarly for @1.
13799 PR middle-end/84831
13800 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13801 characters starting at p contain '\0' character, don't look beyond
13805 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13806 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13809 * reg-stack.c (change_stack): Change update_end var from int to
13810 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13811 also call set_block_for_insn on the newly added insns and rescan.
13814 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13815 on the last operand.
13818 * tree.c (stabilize_reference_1): Return save_expr (e) for
13819 STATEMENT_LIST even if it doesn't have side-effects.
13821 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13823 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13825 2018-03-12 Renlin Li <renlin.li@arm.com>
13827 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13828 aarch64_output_scalar_simd_mov_immediate.
13830 2018-03-12 Martin Sebor <msebor@redhat.com>
13832 PR tree-optimization/83456
13833 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13834 for perfectly overlapping calls to memcpy.
13835 (gimple_fold_builtin_memory_chk): Same.
13836 (gimple_fold_builtin_strcpy): Handle no-warning.
13837 (gimple_fold_builtin_stxcpy_chk): Same.
13838 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13840 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13842 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13843 parameter. Use it for SFmode.
13844 (rs6000_function_arg_advance_1): Adjust.
13845 (rs6000_function_arg): Adjust.
13846 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13848 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13850 PR rtl-optimization/84169
13851 PR rtl-optimization/84780
13852 * combine.c (can_combine_p): Check for a 2-insn combination whether
13853 the destination register is used between the two insns, too.
13855 2018-03-12 Richard Biener <rguenther@suse.de>
13857 PR tree-optimization/84803
13858 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13859 for refs DR analysis didn't process.
13861 2018-03-12 Richard Biener <rguenther@suse.de>
13863 PR tree-optimization/84777
13864 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13865 force-vectorize loops ignore whether we are optimizing for size.
13867 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13869 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13870 (TARGET_MD_ASM_ADJUST): Define.
13872 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13873 Kito Cheng <kito.cheng@gmail.com>
13874 Chung-Ju Wu <jasonwucj@gmail.com>
13876 * config/nds32/nds32.c (nds32_compute_stack_frame,
13877 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13878 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13879 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13880 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13881 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13882 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13883 * config/nds32/nds32.md (prologue, epilogue): Use macro
13884 NDS32_V3PUSH_AVAILABLE_P to do checking.
13886 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13889 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13890 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13891 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13892 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13893 addition of most attributes on !orig_type_die or the attribute not
13894 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13896 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13897 Chung-Ju Wu <jasonwucj@gmail.com>
13899 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13900 __NDS32_VH__ macro.
13901 * config/nds32/nds32.opt (mvh): New option.
13903 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13904 Chung-Ju Wu <jasonwucj@gmail.com>
13906 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13908 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13909 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13912 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13913 Chung-Ju Wu <jasonwucj@gmail.com>
13915 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13917 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13918 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13920 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13921 Kito Cheng <kito.cheng@gmail.com>
13922 Chung-Ju Wu <jasonwucj@gmail.com>
13924 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13925 UNSPEC_FFMISM and UNSPEC_FLMISM.
13926 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13927 for ffb, ffmism and flmism.
13928 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13929 (unspec_ffmism): Ditto.
13930 (unspec_flmism): Ditto.
13931 (nds32_expand_builtin_impl): Check if string extension is available.
13932 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13933 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13935 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13938 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13941 * lra-assigns.c (assign_by_spills): Return a flag of reload
13942 assignment failure. Do not process the reload assignment
13943 failures. Do not spill other reload pseudos if they has the same
13945 (lra_assign): Add a return arg. Set up from the result of
13946 assign_by_spills call.
13947 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13948 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13949 usage_insns if it is not NULL.
13950 (spill_hard_reg_in_range): New function.
13951 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13952 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13953 function prototypes.
13954 (lra_assign): Change prototype.
13955 * lra.c (lra): Add code to deal with fails by splitting hard reg
13958 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13961 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13963 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13966 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13967 (dw_val_node): Add val_symbolic_view.
13968 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13969 (symview_upper_bound): New.
13970 (new_line_info_table): Initialize symviews_since_reset.
13971 (dwarf2out_source_line): Count symviews_since_reset and set
13972 symview_upper_bound.
13973 (dw_val_equal_p): Handle symview.
13974 (add_AT_symview): New.
13975 (print_dw_val): Handle symview.
13976 (attr_checksum, attr_checksum_ordered): Likewise.
13977 (same_dw_val_p, size_of_die): Likewise.
13978 (value_format, output_die): Likewise.
13979 (add_high_low_attributes): Use add_AT_symview for entry_view.
13980 (dwarf2out_finish): Reset symview_upper_bound, clear
13983 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13986 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13987 Add strict argument and use it.
13988 (rs6000_split_multireg_move): Update for new strict argument.
13989 (mem_operand_gpr): Disallow all non-offsettable addresses.
13990 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13992 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13995 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13996 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13997 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14000 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14001 decl, use remap_type if we want to use the type.
14003 2018-03-09 Martin Sebor <msebor@redhat.com>
14005 PR tree-optimization/84526
14006 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14008 (builtin_access::generic_overlap): Be prepared to handle non-array
14011 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
14013 PR rtl-optimization/84682
14014 * lra-constraints.c (process_address_1): Check is_address flag
14015 for address constraints.
14016 (process_alt_operands): Likewise.
14017 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14018 preprocess_constraints.
14019 * recog.h (preprocess_constraints): Add oploc parameter.
14021 * recog.c (preprocess_constraints): Test address_operand for
14022 CT_ADDRESS constraints.
14024 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
14027 * lra-assigns.c (assign_by_spills): Return a flag of reload
14028 assignment failure. Do not process the reload assignment
14029 failures. Do not spill other reload pseudos if they has the same
14031 (lra_assign): Add a return arg. Set up from the result of
14032 assign_by_spills call.
14033 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14034 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14035 usage_insns if it is not NULL.
14036 (spill_hard_reg_in_range): New function.
14037 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14038 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14039 function prototypes.
14040 (lra_assign): Change prototype.
14041 * lra.c (lra): Add code to deal with fails by splitting hard reg
14044 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14047 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14048 Accept complain bool parameter. Only emit errors if it is true.
14049 (arm_parse_cpu_option_name): Likewise.
14050 (arm_target_thumb_only): Adjust callers of the above.
14051 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14052 prototype to take a default true bool parameter.
14053 (arm_parse_arch_option_name): Likewise.
14055 2018-03-09 David Malcolm <dmalcolm@redhat.com>
14056 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14060 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14061 * configure: Regenerate.
14062 * configure.ac ("linker --version-script option"): New.
14063 ("linker soname option"): New.
14065 2018-03-09 Richard Biener <rguenther@suse.de>
14067 PR tree-optimization/84775
14068 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14069 immediate uses of predicate stmts and mark them modified.
14072 PR tree-optimization/84178
14073 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14075 (version_loop_for_if_conversion): Delay update_ssa call.
14076 (tree_if_conversion): Delay update_ssa until after predicate
14079 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
14082 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14083 when the function accesses prior frames.
14085 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14088 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14089 gen_llsym, otherwise call maybe_gen_llsym.
14091 PR inline-asm/84742
14092 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14093 has ',' character inside of it.
14095 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14098 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14099 as clobbering CC_REGNUM.
14101 2018-03-08 Richard Biener <rguenther@suse.de>
14103 PR middle-end/84552
14104 * tree-scalar-evolution.c: Include tree-into-ssa.h.
14105 (follow_copies_to_constant): Do not follow SSA names registered
14108 2018-03-08 Richard Biener <rguenther@suse.de>
14110 PR tree-optimization/84178
14111 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14113 (version_loop_for_if_conversion): Delay update_ssa call.
14114 (tree_if_conversion): Delay update_ssa until after predicate
14117 2018-03-08 David Malcolm <dmalcolm@redhat.com>
14119 PR tree-optimization/84178
14120 * tree-if-conv.c (release_bb_predicate): Remove the
14121 the assertion that the stmts have NULL use_ops.
14122 Discard the statements, asserting that they haven't
14123 yet been added to a BB.
14125 2018-03-08 Richard Biener <rguenther@suse.de>
14127 PR tree-optimization/84746
14128 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14129 (phi_translate): Pass in destination ANTIC_OUT set.
14130 (phi_translate_1): Likewise. For a simplified result lookup
14131 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14132 (phi_translate_set): Adjust.
14133 (do_pre_regular_insertion): Likewise.
14134 (do_pre_partial_partial_insertion): Likewise.
14136 2018-03-08 Martin Liska <mliska@suse.cz>
14138 PR gcov-profile/84735
14139 * doc/gcov.texi: Document usage of profile files.
14140 * gcov-io.h: Document changes in the format.
14142 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
14146 * dwarf2out.c (struct dw_line_info_table): Update comments for
14148 (FORCE_RESET_NEXT_VIEW): New.
14149 (FORCE_RESETTING_VIEW_P): New.
14150 (RESETTING_VIEW_P): Check for -1 too.
14151 (ZERO_VIEW_P): Likewise.
14152 (new_line_info_table): Force-reset next view.
14153 (dwarf2out_begin_function): Likewise.
14154 (dwarf2out_source_line): Simplify zero_view_p initialization.
14155 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14156 view directly. Omit view when omitting .loc at line 0.
14158 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14160 PR tree-optimization/84740
14161 * tree-switch-conversion.c (process_switch): Call build_constructors
14162 only if info.phi_count is non-zero.
14164 PR tree-optimization/84739
14165 * tree-tailcall.c (find_tail_calls): Check call arguments against
14166 DECL_ARGUMENTS (current_function_decl) rather than
14167 DECL_ARGUMENTS (func) when checking for tail recursion.
14169 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14171 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14172 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14173 Volker Reichelt's entry and add entries for people that perform
14174 GCC fuzzy testing and report numerous bugs.
14176 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
14179 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14180 readonly data in sdata, if that is disabled.
14181 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14182 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14183 -mreadonly-in-sdata option.
14185 2018-03-07 Martin Sebor <msebor@redhat.com>
14187 PR tree-optimization/84468
14188 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14189 basic block when looking for nul assignment.
14191 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
14194 * except.h (output_function_exception_table): Adjust prototype.
14195 * except.c (output_function_exception_table): Remove FNNAME parameter
14196 and add SECTION parameter. Ouput one part of the table at a time.
14197 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14198 the first part of the exception table and emit unwind directives.
14199 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14200 (i386_pe_seh_cold_init): Likewise.
14201 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14202 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14203 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14204 (ix86_output_call_insn): Emit a nop in one more case for SEH.
14205 * config/i386/winnt.c: Include except.h.
14206 (struct seh_frame_state): Add reg_offset, after_prologue and
14207 in_cold_section fields.
14208 (i386_pe_seh_end_prologue): Set seh->after_prologue.
14209 (i386_pe_seh_cold_init): New function.
14210 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14211 to seh->in_cold_section.
14212 (seh_emit_push): Record the offset of the push.
14213 (seh_emit_save): Record the offet of the save.
14214 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14215 Test seh->after_prologue to disregard the epilogue.
14216 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14217 (i386_pe_end_cold_function): New function.
14219 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14222 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14223 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14226 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14228 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14229 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14231 PR middle-end/84723
14232 * multiple_target.c: Include tree-inline.h and intl.h.
14233 (expand_target_clones): Diagnose and fail if node->definition and
14234 !tree_versionable_function_p (node->decl).
14236 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
14238 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14240 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14241 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14242 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14244 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14247 * combine.c (try_combine): Use reg_or_subregno instead of handling
14248 just paradoxical SUBREGs and REGs.
14250 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
14252 * config/arc/arc.c (arc_finalize_pic): Remove function.
14253 (arc_must_save_register): We use single base PIC register, remove
14254 checks to save/restore the PIC register.
14255 (arc_expand_prologue): Likewise.
14256 * config/arc/arc-protos.h (arc_set_default_type_attributes):
14258 (arc_verify_short): Likewise.
14259 (arc_attr_type): Likewise.
14260 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14261 (walk_stores): Likewise.
14262 (arc_address_cost): Make it static.
14263 (arc_verify_short): Likewise.
14264 (branch_dest): Likewise.
14265 (arc_attr_type): Likewise.
14266 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14267 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14268 (arc_final_prescan_insn): Remove inserting the nops due to
14269 hardware hazards. It is done in reorg step.
14270 (insn_length_variant_t): Remove.
14271 (insn_length_parameters_t): Likewise.
14272 (arc_insn_length_parameters): Likewise.
14273 (arc_get_insn_variants): Likewise.
14274 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14276 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14278 PR inline-asm/84683
14279 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14282 PR tree-optimization/84687
14283 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14285 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14287 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14289 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14290 Rename to ppc_speculation_barrier.
14291 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14292 __builtin_ppc_speculation_barrier.
14294 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14297 * combine.c (combine_simplify_rtx): Don't try to simplify if
14298 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14301 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
14303 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14304 to 32 bytes when compiling for POWER9.
14306 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14309 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14310 regparm >= 3 with no arg reg available also for calls with
14311 flag_force_indirect_call. Pass decl to ix86_function_regparm.
14314 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14316 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
14318 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
14321 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14323 2018-03-05 Richard Biener <rguenther@suse.de>
14325 PR tree-optimization/84486
14326 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14327 When inserting a __builtin_assume_aligned call set the LHS
14328 SSA name alignment info accordingly.
14330 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
14332 PR tree-optimization/84114
14333 * config/aarch64/aarch64.c (aarch64_reassociation_width)
14334 Avoid reassociation of FLOAT_MODE addition.
14336 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
14338 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14339 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14340 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14341 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14342 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14343 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14344 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14346 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14347 __builtin_ia32_wbinvd): New builtins.
14348 (SPECIAL_ARGS2): New.
14349 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14350 (SPECIAL_ARGS2): New.
14351 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14352 (ix86_valid_target_attribute_inner_p): Ditto.
14353 (ix86_init_mmx_sse_builtins): Add special_args2.
14354 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14355 TARGET_WBNOINVD_P): New.
14356 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14357 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14358 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14359 * config/i386/immintrin.h (_wbinvd): New intrinsic.
14360 * config/i386/pconfigintrin.h: New file.
14361 * config/i386/wbnoinvdintrin.h: Ditto.
14362 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14364 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14366 2018-03-05 Richard Biener <rguenther@suse.de>
14368 PR tree-optimization/84670
14369 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14371 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14372 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14373 (compute_antic_aux): Only assert the number of values in ANTIC_IN
14374 doesn't grow if all successors (recursively) were visited at least
14377 2018-03-05 Richard Biener <rguenther@suse.de>
14379 PR tree-optimization/84650
14380 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14381 if executed in the loop pipeline.
14383 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
14385 * doc/configfiles.texi (Configuration Files): Move info about
14386 conditionalizing $target-protos.h to...
14387 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
14388 differs from $target-protos.h.
14390 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
14391 Chung-Ju Wu <jasonwucj@gmail.com>
14393 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14394 * config/nds32/nds32-multiple.md (setmemsi): Define.
14395 * config/nds32/nds32-memory-manipulation.c
14396 (nds32_gen_dup_4_byte_to_word_value): New.
14397 (emit_setmem_word_loop): New.
14398 (emit_setmem_byte_loop): New.
14399 (nds32_expand_setmem_loop): New.
14400 (nds32_expand_setmem_loop_v3m): New.
14401 (nds32_expand_setmem_unroll): New.
14402 (nds32_expand_setmem): New.
14404 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14405 Chung-Ju Wu <jasonwucj@gmail.com>
14407 * config/nds32/nds32-memory-manipulation.c
14408 (nds32_emit_load_store): New.
14409 (nds32_emit_post_inc_load_store): New.
14410 (nds32_emit_mem_move): New.
14411 (nds32_emit_mem_move_block): New.
14412 (nds32_expand_movmemsi_loop_unknown_size): New.
14413 (nds32_expand_movmemsi_loop_known_size): New.
14414 (nds32_expand_movmemsi_loop): New.
14415 (nds32_expand_movmemsi_unroll): New.
14416 (nds32_expand_movmemqi): Rename ...
14417 (nds32_expand_movmemsi): ... to this.
14418 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14419 (movmemsi): ... to this.
14420 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14421 (nds32_expand_movmemsi): ... to this.
14423 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14424 Monk Chiang <sh.chiang04@gmail.com>
14425 Chung-Ju Wu <jasonwucj@gmail.com>
14427 * config/nds32/nds32-protos.h
14428 (nds32_expand_load_multiple): New arguments.
14429 (nds32_expand_store_multiple): Ditto.
14430 (nds32_valid_multiple_load_store): Rename ...
14431 (nds32_valid_multiple_load_store_p): ... to this.
14432 * config/nds32/nds32-memory-manipulation.c
14433 (nds32_expand_load_multiple): Refine implementation.
14434 (nds32_expand_store_multiple): Ditto.
14435 * config/nds32/nds32-multiple.md
14436 (load_multiple): Update nds32_expand_load_multiple interface.
14437 (store_multiple): Update nds32_expand_store_multiple interface.
14438 * config/nds32/nds32-predicates.c
14439 (nds32_valid_multiple_load_store): Rename ...
14440 (nds32_valid_multiple_load_store_p): ... to this and refine
14442 * config/nds32/predicates.md
14443 (nds32_load_multiple_and_update_address_operation): New predicate.
14444 (nds32_store_multiple_and_update_address_operation): New predicate.
14446 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14447 Chung-Ju Wu <jasonwucj@gmail.com>
14449 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14450 (combo): New attribute.
14451 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14453 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14455 * config/nds32/nds32.opt: Change -mcmodel= default value.
14457 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14458 Monk Chiang <sh.chiang04@gmail.com>
14459 Chung-Ju Wu <jasonwucj@gmail.com>
14461 * config/nds32/constants.md (unspec_element): New enum.
14462 * config/nds32/constraints.md (Umw): New constraint.
14463 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14464 * config/nds32/nds32-intrinsic.md: Likewise.
14465 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14466 (nds32_valid_smw_lwm_base_p): New.
14467 (nds32_output_smw_single_word): New.
14468 (nds32_output_lmw_single_word): New.
14469 (nds32_expand_unaligned_load): New.
14470 (nds32_expand_unaligned_store): New.
14471 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14472 (nds32_output_smw_single_word): Declare.
14473 (nds32_output_lmw_single_word): Declare.
14474 (nds32_expand_unaligned_load): Declare.
14475 (nds32_expand_unaligned_store): Declare.
14476 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14477 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14478 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14479 NDS32_BUILTIN_UASTORE_DW.
14480 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14483 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14484 Kito Cheng <kito.cheng@gmail.com>
14485 Chung-Ju Wu <jasonwucj@gmail.com>
14487 * config/nds32/nds32-intrinsic.c
14488 (nds32_expand_builtin_null_ftype_reg): Delete.
14489 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14490 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14491 (nds32_read_argument): New.
14492 (nds32_legitimize_target): Ditto.
14493 (nds32_legitimize_argument): Ditto.
14494 (nds32_check_constant_argument): Ditto.
14495 (nds32_expand_unop_builtin): Ditto.
14496 (nds32_expand_unopimm_builtin): Ditto.
14497 (nds32_expand_binop_builtin): Ditto.
14498 (nds32_builtin_decl_impl): Ditto.
14499 (builtin_description): Ditto.
14500 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14501 (nds32_init_builtins_impl): Ditto.
14502 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14503 (nds32_builtin_decl): New.
14504 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14505 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14507 2018-03-02 Jeff Law <law@redhat.com>
14509 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14510 (redundant_insn, fill_simple_delay_slots): Likewise.
14511 (fill_slots_from_thread): Likewise.
14512 * resource.c (mark_referenced_resources): Likewise.
14513 (mark_set_resources, find_dead_or_set_registers): Likewise.
14515 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14517 * substring-locations.h (format_warning_va): Formatting fix for
14518 ATTRIBUTE_GCC_DIAG.
14519 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14521 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14522 * substring-locations.c: Include intl.h.
14523 (format_warning_va): Turned into small wrapper around
14524 format_warning_n_va, renamed to ...
14525 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14526 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14528 (format_warning_at_substring_n): New function.
14529 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14530 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14531 format_warning_at_substring with just a shorter name instead of
14532 const function pointer.
14533 (fmtwarn_n): New function.
14534 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14535 appropriate, get rid of all the fmtstr temporaries, move conditionals
14536 with G_() wrapped string literals directly into fmtwarn arguments,
14537 cast dir.len to (int), formatting fixes.
14539 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14541 * doc/invoke.texi: Remove "Cilk Plus" references.
14543 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14544 Richard Biener <rguenther@suse.de>
14547 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14548 for error or warning attributes if CALL_FROM_THUNK_P is set.
14551 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14554 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14555 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14558 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14559 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14561 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14562 instead of -1U in last predictors element's probability member.
14564 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14567 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14568 arguments if they are comparable.
14570 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14572 PR tree-optimization/84634
14573 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14574 masks and masked_loop_p with a single loop_masks, making sure it's
14575 null for bb vectorization.
14577 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14579 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14580 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14581 loop->force_vectorize to check whether there is no alias.
14583 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14586 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14588 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14590 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14591 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14592 instead of a loop around prev_real_insn.
14593 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14596 PR inline-asm/84625
14597 * config/i386/i386.c (ix86_print_operand): Use conditional
14598 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14601 2018-03-02 Richard Biener <rguenther@suse.de>
14603 PR tree-optimization/84427
14604 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14605 (bitmap_set_subtract_values): Rewrite to handle multiple
14608 (prune_clobbered_mems): Likewise.
14609 (phi_translate): Take edge instead of pred/phiblock.
14610 (phi_translate_1): Likewise.
14611 (phi_translate_set): Likewise. Insert all translated
14612 exprs for a value into the set, keeping possibly multiple
14613 expressions per value.
14614 (compute_antic_aux): Adjust for phi_translate changes.
14615 When intersecting union the expressions and prune those
14616 not in the final value set, keeping possibly multiple
14617 expressions per value. Do not use value-insertion
14618 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14619 all expressions. Add verification that the value-sets
14620 only shrink during iteration.
14621 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14622 (do_pre_regular_insertion): Likewise.
14623 (do_pre_partial_partial_insertion): Likewise.
14625 2018-03-02 Richard Biener <rguenther@suse.de>
14628 * config/darwin.c (saved_debug_info_level): New static global.
14629 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14630 (darwin_asm_lto_end): Restore debug info generation settings.
14632 2018-03-01 Martin Liska <mliska@suse.cz>
14635 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14636 volatile arguments.
14638 2018-03-01 Richard Biener <rguenther@suse.de>
14641 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14642 type annotation with LTO when debug was disabled at compile-time.
14644 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14646 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14648 (mips_final_postscan_insn): Likewise.
14650 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14652 PR rtl-optimization/84528
14653 * alias.c (init_alias_target): Add commentary.
14654 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14655 a unique base value if the frame pointer is not eliminated
14656 to the stack pointer.
14658 2018-03-01 Tom de Vries <tom@codesourcery.com>
14660 PR rtl-optimization/83327
14661 * lra-int.h (hard_regs_spilled_into): Declare.
14662 * lra.c (hard_regs_spilled_into): Define.
14663 (init_reg_info): Init hard_regs_spilled_into.
14664 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14665 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14666 (process_bb_lives): Handle hard_regs_spilled_into.
14667 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14668 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14670 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14672 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14673 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14674 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14675 * config/rs6000/aix72.h: New file.
14677 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14679 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14680 instead of warning_at with conditional singular and plural messages
14684 * stor-layout.c (update_alignment_for_field): For
14685 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14686 && !DECL_PACKED (field), do the alignment update, just use
14687 only desired_align instead of MAX (type_align, desired_align)
14689 (place_field): Don't do known_align < desired_align handling
14690 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14691 is non-NULL, instead do it after rli->prev_field handling and
14692 only if not within a bitfield word. For DECL_PACKED (field)
14693 use type_align of BITS_PER_UNIT.
14695 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14697 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14698 superfluous parentheses and trailing spaces.
14700 2018-02-28 Richard Biener <rguenther@suse.de>
14702 PR tree-optimization/84584
14703 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14704 SCoPs with fake exit edge.
14706 2018-02-28 Martin Liska <mliska@suse.cz>
14709 * timevar.c (timer::print): Fix format to properly print 100%
14712 2018-02-28 Richard Biener <rguenther@suse.de>
14714 PR middle-end/84607
14715 * genmatch.c (capture_info::walk_match): Do not mark
14716 captured expressions without operands as expr_p given
14717 they act more like predicates and should be subject to
14718 "lost tail" side-effect preserving.
14720 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14722 PR rtl-optimization/81611
14723 * auto-inc-dec.c (attempt_change): Move dead note from
14724 mem_insn if it's the next use of regno
14725 (find_address): Take address use of reg holding
14726 non-incremented value. Add parm to limit search to the named
14728 (merge_in_block): Attempt to use a mem insn that is the next
14729 use of the original regno.
14731 2018-02-27 Martin Sebor <msebor@redhat.com>
14734 * doc/invoke.texi (-Wmissing-attributes): New option.
14735 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14737 2018-02-27 Martin Sebor <msebor@redhat.com>
14739 PR translation/84207
14740 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14741 n argument to unsigned HOST_WIDE_INT.
14742 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14743 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14744 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14745 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14747 2018-02-27 Richard Biener <rguenther@suse.de>
14749 PR tree-optimization/84512
14750 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14751 Do not use the estimate returned from record_stmt_cost for
14752 the scalar iteration cost but sum properly using add_stmt_cost.
14754 2018-02-27 Richard Biener <rguenther@suse.de>
14756 PR tree-optimization/84466
14757 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14758 Adjust last change to less strictly validate use operands.
14760 2018-02-27 Martin Liska <mliska@suse.cz>
14762 PR gcov-profile/84548
14763 * gcov.c (process_file): Allow partial overlap and consider it
14764 also as group functions.
14765 (output_lines): Properly calculate range of lines for a group.
14767 2018-02-27 Martin Liska <mliska@suse.cz>
14769 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14770 'ggc' suffixes. Change first column width.
14771 (timer::print): Fix formatting of the column.
14773 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14775 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14776 preserve inline entry blocks for the sake of debug inline
14777 entry point markers alone.
14778 (remove_unused_locals): Suggest in comments a better place to
14779 force the preservation of inline entry blocks that are
14780 otherwise unused, but do not preserve them.
14782 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14784 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14786 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14789 * config/i386/constraints.md (Bs): Replace
14790 ix86_indirect_branch_register with
14791 TARGET_INDIRECT_BRANCH_REGISTER.
14793 * config/i386/i386.md (indirect_jump): Likewise.
14794 (tablejump): Likewise.
14795 (*sibcall_memory): Likewise.
14796 (*sibcall_value_memory): Likewise.
14797 Peepholes of indirect call and jump via memory: Likewise.
14798 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14799 (*sibcall_value_GOT_32): Likewise.
14800 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14801 (GOT_memory_operand): Likewise.
14802 (call_insn_operand): Likewise.
14803 (sibcall_insn_operand): Likewise.
14804 (GOT32_symbol_operand): Likewise.
14805 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14807 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14809 PR rtl-optimization/83496
14810 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14811 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14812 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14813 redundant insn, if any.
14814 (relax_delay_slots): Likewise.
14815 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14817 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14819 PR tree-optimization/83965
14820 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14821 that grouped statements are part of a reduction chain. Return
14822 true if the statement is not marked as a reduction itself but
14823 is part of a group.
14824 (vect_recog_dot_prod_pattern): Don't check whether the statement
14825 is part of a group here.
14826 (vect_recog_sad_pattern): Likewise.
14827 (vect_recog_widen_sum_pattern): Likewise.
14829 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14832 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14834 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14837 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14839 (ix86_output_indirect_function_return): New prototype.
14840 (ix86_split_simple_return_pop_internal): Likewise.
14841 * config/i386/i386.c (indirect_return_via_cx): New.
14842 (indirect_return_via_cx_bnd): Likewise.
14843 (indirect_thunk_name): Handle return va CX_REG.
14844 (output_indirect_thunk_function): Create alias for
14845 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14846 (ix86_output_indirect_jmp): Remove the bool argument.
14847 (ix86_output_indirect_function_return): New function.
14848 (ix86_split_simple_return_pop_internal): Likewise.
14849 * config/i386/i386.md (*indirect_jump): Don't pass false
14850 to ix86_output_indirect_jmp.
14851 (*tablejump_1): Likewise.
14852 (simple_return_pop_internal): Change it to define_insn_and_split.
14853 Call ix86_split_simple_return_pop_internal to split it for
14854 -mfunction-return=.
14855 (simple_return_indirect_internal): Call
14856 ix86_output_indirect_function_return instead of
14857 ix86_output_indirect_jmp.
14859 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14862 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14863 memset and value initialization afterwards.
14865 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14867 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14869 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14872 * common/config/aarch64/aarch64-common.c
14873 (aarch_option_optimization_table[]): Switch
14874 off fomit-frame-pointer
14876 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14877 Chung-Ju Wu <jasonwucj@gmail.com>
14879 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14881 (store_multiple): Ditto.
14883 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14885 * config.gcc: Add --with-cpu support for nds32 target.
14886 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14887 * config/nds32/nds32.opt: Add -mcpu= option.
14889 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14891 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14892 isel=yes): Warn for these deprecated options.
14894 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14896 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14897 ISA_2_5_MASKS_EMBEDDED.
14899 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14901 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14902 p->max as pointers rather than using iterative_hash_expr.
14904 2018-02-23 Carl Love <cel@us.ibm.com>
14906 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14907 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14909 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14910 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14911 P8V_BUILTIN_VEC_VUNSIGNED2.
14913 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14916 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14917 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14919 * lra-constraints.c (curr_insn_transform): Set up
14920 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14922 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14923 * lra-eliminations.c (spill_pseudos): Ditto.
14924 (process_insn_for_elimination): Ditto.
14925 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14926 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14927 LRA_NON_CLOBBERED_ALT.
14929 2018-02-22 Martin Sebor <msebor@redhat.com>
14931 PR tree-optimization/84480
14932 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14933 to maybe_diag_stxncpy_trunc. Call it.
14934 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14935 from gimple_fold_builtin_strcpy. Print inlining stack.
14936 (handle_builtin_stxncpy): Print inlining stack.
14937 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14939 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14942 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14943 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14944 and -fcheck-pointer-bounds are used together.
14945 (indirect_thunk_prefix): New enum.
14946 (indirect_thunk_need_prefix): New function.
14947 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14948 "_nt" instead of "_bnd" for NOTRACK prefix.
14949 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14950 (output_indirect_thunk_function): Likewise.
14952 (ix86_code_end): Update output_indirect_thunk_function calls.
14953 (ix86_output_indirect_branch_via_reg): Replace
14954 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14955 (ix86_output_indirect_branch_via_push): Likewise.
14956 (ix86_output_function_return): Likewise.
14957 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14958 incompatible with -fcf-protection=branch and
14959 -fcheck-pointer-bounds.
14961 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14964 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14965 Change gcc_assert call to output_operand_lossage.
14967 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14969 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14971 2018-02-22 DJ Delorie <dj@redhat.com>
14972 Sebastian Perta <sebastian.perta@renesas.com>
14973 Oleg Endo <olegendo@gcc.gnu.org>
14975 * config/rx/rx.c (rx_rtx_costs): New function.
14976 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14978 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14980 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14982 2018-02-22 Martin Liska <mliska@suse.cz>
14985 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14986 Add "native" as a possible value.
14988 2018-02-22 Martin Liska <mliska@suse.cz>
14991 * config/i386/i386.c (ix86_option_override_internal):
14992 Add "native" as a possible value for -march and -mtune.
14994 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14997 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14998 to all type variants.
15000 PR tree-optimization/84503
15001 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15002 width as info->bitpos + info->bitsize - start.
15003 (merged_store_group::merge_overlapping): Simplify width computation.
15004 (check_no_overlap): New function.
15005 (imm_store_chain_info::try_coalesce_bswap): Compute expected
15006 start + width and last_order of the group, fail if check_no_overlap
15008 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15009 to group if check_no_overlap fails.
15011 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15013 * config/rs6000/altivec.md: Delete contraint arguments to
15014 define_expand, define_split, and define_peephole2, and in
15015 define_insn_and_split if always unused.
15016 * config/rs6000/darwin.md: Ditto.
15017 * config/rs6000/dfp.md: Ditto.
15018 * config/rs6000/rs6000.md: Ditto.
15019 * config/rs6000/sync.md: Ditto.
15020 * config/rs6000/vector.md: Ditto.
15021 * config/rs6000/vsx.md: Ditto.
15023 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15025 * config/rs6000/altivec.md: Write output control strings as braced
15026 blocks instead of double-quoted strings.
15027 * config/rs6000/darwin.md: Ditto.
15028 * config/rs6000/rs6000.md: Ditto.
15029 * config/rs6000/vector.md: Ditto.
15030 * config/rs6000/vsx.md: Ditto.
15032 2018-02-21 Jason Merrill <jason@redhat.com>
15034 PR c++/84314 - ICE with templates and fastcall attribute.
15035 * attribs.c (build_type_attribute_qual_variant): Remove assert.
15037 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15039 * ipa-cp.c (determine_versionability): Fix comment typos.
15041 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15044 * ipa-cp.c (determine_versionability): Do not version functions caling
15047 2018-02-21 Martin Liska <mliska@suse.cz>
15050 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15051 Add "native" as a possible value.
15052 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
15053 the macro when native cpu detection is available.
15055 2018-02-21 Martin Liska <mliska@suse.cz>
15058 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15059 Add "native" as a possible value.
15060 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15061 when native cpu detection is available.
15063 2018-02-21 Jakub Jelinek <jakub@redhat.com>
15064 Martin Sebor <msebor@redhat.com>
15066 PR tree-optimization/84478
15067 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15069 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15070 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15071 support which is conservatively correct, for 2 only stay conservative
15072 for maxlen. Formatting and comment capitalization fixes. Add STRICT
15073 argument to the 2 argument get_range_strlen, adjust 6 arg
15074 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15076 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15077 (gimple_fold_builtin_strlen): Pass true as last argument to
15080 2018-02-20 Martin Sebor <msebor@redhat.com>
15082 PR middle-end/84095
15083 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15084 (builtin_memref::set_base_and_offset): Same. Handle inner references.
15085 (builtin_memref::builtin_memref): Factor out parts into
15086 set_base_and_offset and call it.
15088 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15090 PR middle-end/84406
15091 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15092 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15093 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
15094 search at the associated MODE_INT.
15096 2018-02-20 Jeff Law <law@redhat.com>
15098 PR middle-end/82123
15099 PR tree-optimization/81592
15100 PR middle-end/79257
15101 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15102 for range data rather than using global data.
15103 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15104 range data rather than using global data.
15105 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15106 pass it to children as needed.
15107 (struct directive::fmtresult): Similarly.
15108 (struct directive::set_width): Similarly.
15109 (struct directive::set_precision): Similarly.
15110 (format_integer, format_directive, parse_directive): Similarly.
15111 (format_none): Accept unnamed vr_values parameter.
15112 (format_percent, format_floating, format_character): Similarly.
15113 (format_string, format_plain): Similarly.
15114 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15115 the EVRP range analyzer for range data rather than using global data.
15116 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15117 gimple-ssa-evrp-analyze.h
15118 (class sprintf_dom_walker): Add after_dom_children member function.
15119 Add evrp_range_analyzer member.
15120 (sprintf_dom_walker::before_dom_children): Call into the EVRP
15121 range analyzer as needed.
15122 (sprintf_dom_walker::after_dom_children): New member function.
15123 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15125 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15126 (evrp_range_analyzer::pop_to_marker): Likewise.
15128 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15130 PR tree-optimization/84419
15131 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15132 with the required type if its current type is compatible but
15135 2018-02-20 Jakub Jelinek <jakub@redhat.com>
15137 PR middle-end/82004
15138 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15139 after vectorization.
15141 2018-02-20 Martin Liska <mliska@suse.cz>
15144 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15145 possible values if we don't have a hint.
15147 2018-02-20 Martin Liska <mliska@suse.cz>
15151 * final.c (shorten_branches): Build align_tab array with one
15153 * opts.c (finish_options): Add alignment option limit check.
15154 (MAX_CODE_ALIGN): Likewise.
15155 (MAX_CODE_ALIGN_VALUE): Likewise.
15156 * doc/invoke.texi: Document maximum allowed option value for
15157 all -falign-* options.
15159 2018-02-19 Jakub Jelinek <jakub@redhat.com>
15162 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15163 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15164 * var-tracking.c (emit_note_insn_var_location): Remove all references
15165 to NOTE_INSN_CALL_ARG_LOCATION.
15166 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15167 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15168 Use copy_rtx_if_shared.
15169 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15170 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15171 (dwarf2out_var_location): Remove handling of
15172 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15174 * final.c (final_scan_insn): Remove all references to
15175 NOTE_INSN_CALL_ARG_LOCATION.
15176 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
15177 before dumping final insns.
15178 * except.c (emit_note_eh_region_end): Remove all references to
15179 NOTE_INSN_CALL_ARG_LOCATION.
15180 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15181 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15182 * config/arc/arc.c (hwloop_optimize): Likewise.
15183 * config/arm/arm.c (create_fix_barrier): Likewise.
15184 * config/s390/s390.c (s390_chunkify_start): Likewise.
15185 * config/sh/sh.c (find_barrier): Likewise.
15186 * config/i386/i386.c (rest_of_insert_endbranch,
15187 ix86_seh_fixup_eh_fallthru): Likewise.
15188 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15189 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15190 * config/frv/frv.c (frv_function_prologue): Likewise.
15191 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
15193 (note_outside_basic_block_p): Remove all references to
15194 NOTE_INSN_CALL_ARG_LOCATION.
15195 * gengtype.c (adjust_field_rtx_def): Likewise.
15196 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15198 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15199 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15202 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15205 PR tree-optimization/84452
15206 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15207 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15210 2018-02-19 Martin Liska <mliska@suse.cz>
15213 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15215 2018-02-19 Martin Liska <mliska@suse.cz>
15216 Richard Sandiford <richard.sandiford@linaro.org>
15218 PR tree-optimization/82491
15219 * gimple-fold.c (get_base_constructor): Make earlier bail out
15222 2018-02-19 Carl Love <cel@us.ibm.com>
15224 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15225 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15227 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15228 P8V_BUILTIN_VEC_NEG.
15230 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
15232 * config/rl78/rl78.md (movdf): New define expand.
15234 2018-02-19 Martin Liska <mliska@suse.cz>
15237 * doc/invoke.texi: Fix typo.
15238 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15240 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
15242 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15243 handle rs6000_single_float and rs6000_double_float specially for
15246 2018-02-16 Jeff Law <law@redhat.com>
15248 * config/rx/rx.c (add_pop_cfi_notes): New function.;
15249 (pop_regs): Use it.
15251 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15254 * ipa-inline.c (inline_small_functions): Fix a typo.
15256 2018-02-16 Nathan Sidwell <nathan@acm.org>
15258 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15260 2018-02-16 Carl Love <cel@us.ibm.com>
15262 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15263 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15264 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15265 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15266 expansion to P8V_BUILTIN_VEC_FLOAT2.
15268 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
15270 PR rtl-optimization/70023
15271 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15272 src_regno into account.
15274 2018-02-16 Carl Love <cel@us.ibm.com>
15276 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15277 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15278 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15279 * config/rs6000/rs6000.c: Remove case statements for
15280 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15281 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15282 and P9V_BUILTIN_VEC_VINSERT4B.
15283 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15284 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15285 * config/rs6000/vsx.md:
15286 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15289 2018-02-16 Carl Love <cel@us.ibm.com>
15291 * config/rs6000/altivec.h: Add builtin names vec_extract4b
15293 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15295 * config/rs6000/rs6000-c.c: Add the definitions for
15296 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15297 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15298 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15299 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
15300 definition for insert4b and define insn *insert3b_internal.
15301 * doc/extend.texi: Add documentation for vec_extract4b.
15303 2018-02-16 Nathan Sidwell <nathan@acm.org>
15305 * doc/extend.texi (Backwards Compatibility): Mention friend
15306 injection. Note for-scope is deprecated.
15307 * doc/invoke.texi (-ffriend-injection): Deprecate.
15309 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
15311 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15312 that moved to I2, also allow destinations that are a paradoxical
15313 subreg (instead of a normal reg).
15315 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
15318 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15321 2018-02-16 Richard Biener <rguenther@suse.de>
15323 PR tree-optimization/84037
15324 PR tree-optimization/84016
15326 * config/i386/i386.c (ix86_builtin_vectorization_cost):
15327 Adjust vec_construct for the fact we need additional higher latency
15328 128bit inserts for AVX256 and AVX512 vector builds.
15329 (ix86_add_stmt_cost): Scale vector construction cost for
15332 2018-02-16 Richard Biener <rguenther@suse.de>
15334 PR tree-optimization/84417
15335 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15336 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15337 (non_rewritable_lvalue_p): Likewise, use poly-ints.
15339 2018-02-16 Martin Liska <mliska@suse.cz>
15342 * internal-fn.def (ASAN_CHECK): Set proper flags.
15343 (ASAN_MARK): Likewise.
15345 2018-02-16 Julia Koval <julia.koval@intel.com>
15347 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15348 from PTA_CANNONLAKE.
15350 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15353 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15354 Use ++iter rather than iter++ for std::list iterators.
15355 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
15356 defer deleting them until all nodes in the forest are processed. Do
15357 free even leaf nodes. Change to_process into auto_vec.
15360 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15361 * vec.h (vec_default_construct): Use memset instead of placement new
15362 if BROKEN_VALUE_INITIALIZATION is defined.
15363 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15364 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15367 PR rtl-optimization/83723
15368 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15369 * lra.c (lra_substitute_pseudo): Likewise. If true, use
15370 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
15372 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15374 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15376 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
15378 PR rtl-optimization/81443
15379 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15380 from inner REGs to paradoxical SUBREGs.
15382 2018-02-16 Richard Biener <rguenther@suse.de>
15384 PR tree-optimization/84399
15385 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15386 For operands we can analyze at their definition make sure we can
15387 analyze them at each use as well.
15389 2018-02-16 Richard Biener <rguenther@suse.de>
15391 PR tree-optimization/84190
15392 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15393 volatile accesses if the decl isn't volatile.
15395 2018-02-15 Jason Merrill <jason@redhat.com>
15397 PR c++/84314 - ICE with templates and fastcall attribute.
15398 * attribs.c (build_type_attribute_qual_variant): Don't clobber
15399 TYPE_CANONICAL on an existing type.
15401 2018-02-15 Jakub Jelinek <jakub@redhat.com>
15403 PR tree-optimization/84383
15404 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15405 dstoff nor call operand_equal_p if dstbase is NULL.
15407 PR tree-optimization/84334
15408 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15409 also a CONSTANT_CLASS_P, punt.
15411 2018-02-14 Jim Wilson <jimw@sifive.com>
15413 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15414 first SMALL_OPERAND check. New local min_second_step. Move assert
15415 to where locals are set. Add TARGET_RVC support.
15416 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15418 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
15420 * doc/invoke.texi: Correct -Wformat-overflow code sample.
15422 2018-02-14 Martin Sebor <msebor@redhat.com>
15424 PR tree-optimization/83698
15425 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15426 arrays constrain the offset range to their bounds.
15427 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15428 (builtin_access::overlap): Avoid setting the size of overlap if it's
15430 (maybe_diag_overlap): Also consider arrays when deciding what values
15431 of offsets to include in diagnostics.
15433 2018-02-14 Martin Sebor <msebor@redhat.com>
15436 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15437 that correspond to the kind of a declaration.
15439 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15442 * config/pa/pa.md: Load address of PIC label using the linkage table
15443 if the label is nonlocal.
15445 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15447 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15448 warning message if user requests -maltivec=be.
15449 * doc/invoke.texi: Document deprecation of -maltivec=be.
15451 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15454 * config/rs6000/rs6000-c.c: Update definitions for
15455 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15456 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15458 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15461 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15462 add _get_ssp intrinsics. Remove argument from
15463 __builtin_ia32_rdssp[d|q].
15464 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15465 * config/i386/i386-builtin.def: Remove argument from
15466 __builtin_ia32_rdssp[d|q].
15467 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15468 ix86_expand_special_args_builtin for _rdssp[d|q].
15469 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15470 Clear register before usage.
15471 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15472 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15474 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15476 PR tree-optimization/84357
15477 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15478 operand 1 of an ARRAY_REF too.
15480 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15483 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15484 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15486 (set_of_reg): New struct.
15487 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15488 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15489 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15491 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15492 Split into bitclr, bitset, bitinvert patterns if appropriate.
15493 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15494 use rx_fuse_in_memory_bitop.
15495 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15496 to named insn, correct maximum insn length.
15498 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15501 * machmode.def: Define a complex mode for PARTIAL_INT.
15502 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15504 * doc/rtl.texi: Document CSPImode.
15505 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15507 (msp430_hard_regno_nregs_with_padding): Likewise.
15509 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15512 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15514 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15516 PR rtl-optimization/84169
15517 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15518 we generated a parallel as new i3 and we split that to new i2 and i3
15519 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15520 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15521 those to i2, not i1. Partially rewrite this scan code.
15523 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15526 * stor-layout.c (place_field): For variable length fields, adjust
15527 offset_align afterwards not just based on the field's alignment,
15528 but also on the size.
15530 PR middle-end/84309
15531 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15532 of exps and logs in the use_exp2 case.
15534 2018-02-13 Jeff Law <law@redhat.com>
15536 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15537 entry for "vector".
15539 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15542 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15546 * common.opt (gas-loc-support, gas-locview-support): New.
15547 (ginline-points, ginternal-reset-location-views): New.
15548 * doc/invoke.texi: Document them. Use @itemx where intended.
15549 (gvariable-location-views): Adjust.
15550 * target.def (reset_location_view): New.
15551 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15552 (TARGET_RESET_LOCATION_VIEW): New.
15553 * doc/tm.texi: Rebuilt.
15554 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15555 (dwarf2out_default_as_locview_support): New.
15556 (output_asm_line_debug_info): Use option variables.
15557 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15558 (output_loc_list): Likewise.
15559 (add_high_low_attributes): Check option variables.
15560 Don't output entry view attribute in strict mode.
15561 (gen_inlined_subroutine_die): Check option variables.
15562 (dwarf2out_inline_entry): Likewise.
15563 (init_sections_and_labels): Likewise.
15564 (dwarf2out_early_finish): Likewise.
15565 (maybe_reset_location_view): New, from...
15566 (dwarf2out_var_location): ... here. Call it.
15567 * debug.h (dwarf2out_default_as_loc_support): Declare.
15568 (dwarf2out_default_as_locview_support): Declare.
15569 * hooks.c (hook_int_rtx_insn_0): New.
15570 * hooks.h (hook_int_rtx_insn_0): Declare.
15571 * toplev.c (process_options): Take -gas-loc-support and
15572 -gas-locview-support from dwarf2out. Enable
15573 -gvariable-location-views by default only with locview
15574 assembler support. Enable -ginternal-reset-location-views by
15575 default only if the target defines the corresponding hook.
15576 Enable -ginline-points by default if location views are
15577 enabled; force it disabled if statement frontiers are
15579 * tree-inline.c (expand_call_inline): Check option variables.
15580 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15582 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15584 PR tree-optimization/84321
15585 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15586 handling. Also check whether the anti-range contains any values
15587 that satisfy the mask; switch to a VR_RANGE if not.
15589 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15592 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15594 2018-02-13 Martin Jambor <mjambor@suse.cz>
15597 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15598 of call statements, also set location of a load to a temporary.
15600 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15602 * config/rl78/rl78.c (add_vector_labels): New function.
15603 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15604 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15605 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15606 which checks that no arguments are passed.
15607 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15608 * doc/extend.texi: Documentation for the new attribute.
15610 2018-02-13 Andreas Schwab <schwab@suse.de>
15612 * config/riscv/linux.h (CPP_SPEC): Define.
15614 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15617 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15618 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15619 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15620 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15621 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15622 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15623 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15624 temporarily for AES and PCLMUL builtins.
15626 PR tree-optimization/84339
15627 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15628 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15631 PR middle-end/84309
15632 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15633 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15634 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15636 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15638 * omp-simd-clone.h: New file.
15639 * omp-simd-clone.c: Include omp-simd-clone.h.
15640 (expand_simd_clones): No longer static.
15641 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15642 cgraph.h and omp-simd-clone.h.
15643 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15644 (vect_recog_widen_shift_pattern): Formatting fix.
15645 (vect_pattern_recog_1): Don't check optab for calls.
15648 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15649 operands[2] into a REG before using gen_lowpart on it.
15651 2018-02-12 Jeff Law <law@redhat.com>
15654 * config/sh/sh.c (find_barrier): Consider a sibling call
15657 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15658 successfully back substituting a reg.
15660 2018-02-12 Richard Biener <rguenther@suse.de>
15662 PR tree-optimization/84037
15663 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15664 parameter, move visited init to caller.
15665 (vect_slp_analyze_operations): Separate cost from validity
15666 check, initialize visited once for all instances.
15667 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15669 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15671 (vect_model_promotion_demotion_cost): Likewise.
15672 (vectorizable_bswap): Guard cost modeling with !slp_node
15673 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15675 (vectorizable_call): Likewise.
15676 (vectorizable_conversion): Likewise.
15677 (vectorizable_assignment): Likewise.
15678 (vectorizable_shift): Likewise.
15679 (vectorizable_operation): Likewise.
15680 (vectorizable_store): Likewise.
15681 (vectorizable_load): Likewise.
15682 (vectorizable_condition): Likewise.
15683 (vectorizable_comparison): Likewise.
15685 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15688 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15689 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15690 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15692 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15694 PR middle-end/83665
15695 * params.def (inline-min-speedup): Increase from 8 to 15.
15696 (max-inline-insns-auto): Decrease from 40 to 30.
15697 * ipa-split.c (consider_split): Add some buffer for function to
15698 be considered inlining candidate.
15699 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15702 2018-02-12 Richard Biener <rguenther@suse.de>
15704 PR tree-optimization/84037
15705 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15706 matched stmts if we cannot swap the non-matched ones.
15708 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15710 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15711 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15712 _mm_maskz_scalef_round_ss): New intrinsics.
15713 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15714 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15715 __builtin_ia32_scalefss_round): Remove.
15716 (__builtin_ia32_scalefsd_mask_round,
15717 __builtin_ia32_scalefss_mask_round): New intrinsics.
15718 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15719 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15720 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15721 "<round_constraint>")): Changed to ...
15722 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15723 "<round_scalar_constraint>")): ... this.
15724 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15725 %0, %1, %2<round_op3>}"): Changed to ...
15726 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15727 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15728 %2<round_scalar_mask_op3>}"): ... this.
15729 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15731 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15733 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15734 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15735 (_mm_maskz_sqrt_round_ss): New intrinsics.
15736 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15737 (__builtin_ia32_sqrtsd_mask_round)
15738 (__builtin_ia32_sqrtss_mask_round): New builtins.
15739 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15740 (__builtin_ia32_sqrtss_round): Remove.
15741 (__builtin_ia32_sqrtsd_mask_round)
15742 (__builtin_ia32_sqrtss_mask_round): New builtins.
15743 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15744 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15745 ((match_operand:VF_128 1 "vector_operand"
15746 "xBm,<round_constraint>")): Changed to ...
15747 ((match_operand:VF_128 1 "vector_operand"
15748 "xBm,<round_scalar_constraint>")): ... this.
15749 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15750 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15751 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15752 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15753 %<iptr>1<round_scalar_mask_op3>}): ... this.
15754 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15755 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15757 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15760 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15761 Cast vec_cmpeq result to correct type.
15762 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15763 Cast vec_cmpgt result to correct type.
15765 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15767 * final.c (final_scan_insn_1): Renamed from...
15768 (final_scan_insn): ... this. New wrapper, to recover
15769 seen from the outermost call in recursive ones.
15770 * config/sparc/sparc.c (output_return): Drop seen from call.
15771 (output_sibcall): Likewise.
15772 * config/visium/visium.c (output_branch): Likewise.
15774 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15776 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15779 2018-02-10 Alan Modra <amodra@gmail.com>
15782 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15783 Specify LR as an input.
15785 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15788 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15789 remove_member_access_dummy_vars): New functions.
15790 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15791 lower_omp_1, execute_lower_omp): Use them.
15793 PR rtl-optimization/84308
15794 * shrink-wrap.c (spread_components): Release todo vector.
15796 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15798 PR rtl-optimization/57193
15799 * ira-color.c (struct allocno_color_data): Add member
15800 conflict_allocno_hard_prefs.
15801 (update_conflict_allocno_hard_prefs): New.
15802 (bucket_allocno_compare_func): Add a preference based on
15803 conflict_allocno_hard_prefs.
15804 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15805 (color_allocnos): Remove a dead code. Initiate
15806 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15808 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15811 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15812 constraint from =wa to wa. Avoid a subreg on the output operand,
15813 instead use a pseudo and subreg it in a move.
15814 (p9_xxbrd_<mode>): Changed to ...
15815 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15816 (p9_xxbrd_v2df): New expander.
15817 (p9_xxbrw_<mode>): Changed to ...
15818 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15819 (p9_xxbrw_v4sf): New expander.
15821 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15823 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15825 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15828 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15829 multiply in 32-bit mode.
15830 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15831 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15834 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15836 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15837 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15838 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15839 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15841 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15844 * dwarf2out.c (is_trivial_indirect_ref): New function.
15845 (dwarf2out_late_global_decl): Do not generate a location
15846 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15847 and that are not defined in the current unit.
15849 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15851 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15852 instead of a libcall for UNORDERED.
15854 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15857 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15858 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15860 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15863 * config/s390/s390.c (s390_set_current_function): Invoke
15864 s390_indirect_branch_settings also if fndecl didn't change.
15866 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15868 * config/rs6000/rs6000.md (blockage): Set length to zero.
15870 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15872 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15874 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15877 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15878 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15882 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15883 PARALLEL incoming that failed vt_get_decl_and_offset check.
15885 PR middle-end/84237
15886 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15887 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15889 (get_variable_section): For decls in named .bss* sections pass true as
15890 second argument to bss_initializer_p.
15892 2018-02-09 Marek Polacek <polacek@redhat.com>
15893 Jakub Jelinek <jakub@redhat.com>
15896 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15897 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15898 Sync some changes from cxx_fold_indirect_ref.
15900 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15902 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15904 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15905 (BLOCK_INLINE_ENTRY_LABEL): New.
15906 (dwarf2out_var_location): Disregard inline entry markers.
15907 (inline_entry_data): New struct.
15908 (inline_entry_data_hasher): New hashtable type.
15909 (inline_entry_data_hasher::hash): New.
15910 (inline_entry_data_hasher::equal): New.
15911 (inline_entry_data_table): New variable.
15912 (add_high_low_attributes): Add DW_AT_entry_pc and
15913 DW_AT_GNU_entry_view attributes if a pending entry is found
15914 in inline_entry_data_table. Add old entry_pc attribute only
15915 if debug nonbinding markers are disabled.
15916 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15917 markers are enabled.
15918 (block_within_block_p, dwarf2out_inline_entry): New.
15919 (dwarf2out_finish): Check that no entries remained in
15920 inline_entry_data_table.
15921 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15922 (final_scan_insn, notice_source_line): Likewise.
15923 (rest_of_clean_state): Skip inline entry markers.
15924 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15926 * gimple.c (gimple_build_debug_inline_entry): New.
15927 * gimple.h (enum gimple_debug_subcode): Add
15928 GIMPLE_DEBUG_INLINE_ENTRY.
15929 (gimple_build_debug_inline_entry): Declare.
15930 (gimple_debug_inline_entry_p): New.
15931 (gimple_debug_nonbind_marker_p): Adjust.
15932 * insn-notes.def (INLINE_ENTRY): New.
15933 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15934 inline entry marker notes.
15935 (print_insn): Likewise.
15936 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15937 (INSN_DEBUG_MARKER_KIND): Likewise.
15938 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15939 * tree-inline.c (expand_call_inline): Build and insert
15940 debug_inline_entry stmt.
15941 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15942 inline entry blocks early, if nonbind markers are enabled.
15943 (dump_scope_block): Dump fragment info.
15944 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15945 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15946 (gimple_build_debug_inline_entry): New.
15947 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15948 Enable/disable inline entry points too.
15949 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15950 (DEBUG_INSN): Describe inline entry markers.
15952 * common.opt (gvariable-location-views): New.
15953 (gvariable-location-views=incompat5): New.
15954 * config.in: Rebuilt.
15955 * configure: Rebuilt.
15956 * configure.ac: Test assembler for view support.
15957 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15958 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15959 * dwarf2out.c (var_loc_view): New typedef.
15960 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15961 (dwarf2out_locviews_in_attribute): New.
15962 (dwarf2out_locviews_in_loclist): New.
15963 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15964 (enum dw_line_info_opcode): Add LI_adv_address.
15965 (struct dw_line_info_table): Add view.
15966 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15967 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15968 (zero_view_p): New variable.
15969 (ZERO_VIEW_P): New macro.
15970 (output_asm_line_debug_info): New.
15971 (struct var_loc_node): Add view.
15972 (add_AT_view_list, AT_loc_list): New.
15973 (add_var_loc_to_decl): Add view param. Test it against last.
15974 (new_loc_list): Add view params. Record them.
15975 (AT_loc_list_ptr): Handle loc and view lists.
15976 (view_list_to_loc_list_val_node): New.
15977 (print_dw_val): Handle dw_val_class_view_list.
15978 (size_of_die): Likewise.
15979 (value_format): Likewise.
15980 (loc_list_has_views): New.
15981 (gen_llsym): Set vl_symbol too.
15982 (maybe_gen_llsym, skip_loc_list_entry): New.
15983 (dwarf2out_maybe_output_loclist_view_pair): New.
15984 (output_loc_list): Output view list or entries too.
15985 (output_view_list_offset): New.
15986 (output_die): Handle dw_val_class_view_list.
15987 (output_dwarf_version): New.
15988 (output_compilation_unit_header): Use it.
15989 (output_skeleton_debug_sections): Likewise.
15990 (output_rnglists, output_line_info): Likewise.
15991 (output_pubnames, output_aranges): Update version comments.
15992 (output_one_line_info_table): Output view numbers in asm comments.
15993 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15994 Call maybe_gen_llsym.
15995 (loc_list_from_tree_1): Adjust.
15996 (add_AT_location_description): Create view list attribute if
15997 needed, check it's absent otherwise.
15998 (convert_cfa_to_fb_loc_list): Adjust.
15999 (maybe_emit_file): Call output_asm_line_debug_info for test.
16000 (dwarf2out_var_location): Reset views as needed. Precompute
16001 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
16002 attribute. Set view.
16003 (new_line_info_table): Reset next view.
16004 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16005 (dwarf2out_source_line): Likewise. Output view resets and labels to
16006 the assembler, or select appropriate line info opcodes.
16007 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16008 (optimize_string_length): Catch it. Adjust.
16009 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
16010 dw_val_class_view_list, and remove it if no longer needed.
16011 (hash_loc_list): Hash view numbers.
16012 (loc_list_hasher::equal): Compare them.
16013 (optimize_location_lists): Check whether a view list symbol is
16014 needed, and whether the locview attribute is present, and
16015 whether they match. Remove the locview attribute if no longer
16017 (index_location_lists): Call skip_loc_list_entry for test.
16018 (dwarf2out_finish): Call output_asm_line_debug_info for test.
16019 Use output_dwarf_version.
16020 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16021 (struct dw_val_node): Add val_view_list.
16022 * final.c (SEEN_NEXT_VIEW): New.
16023 (set_next_view_needed): New.
16024 (clear_next_view_needed): New.
16025 (maybe_output_next_view): New.
16026 (final_start_function): Rename to...
16027 (final_start_function_1): ... this. Take pointer to FIRST,
16028 add SEEN parameter. Emit param bindings in the initial view.
16029 (final_start_function): Reintroduce SEEN-less interface.
16030 (final): Rename to...
16031 (final_1): ... this. Take SEEN parameter. Output final pending
16032 next view at the end.
16033 (final): Reintroduce seen-less interface.
16034 (final_scan_insn): Output pending next view before switching
16035 sections or ending a block. Mark the next view as needed when
16036 outputting variable locations. Notify debug backend of section
16037 changes, and of location view changes.
16038 (rest_of_handle_final): Adjust.
16039 * toplev.c (process_options): Autodetect value for debug variable
16040 location views option. Warn on incompat5 without -gdwarf-5.
16041 * doc/invoke.texi (gvariable-location-views): New.
16042 (gvariable-location-views=incompat5): New.
16043 (gno-variable-location-views): New.
16045 2018-02-08 David Malcolm <dmalcolm@redhat.com>
16047 PR tree-optimization/84136
16048 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16049 that the result of find_edge is non-NULL.
16051 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16054 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16055 storing integer register in SImode. Fix cost of 256 and 512
16056 byte aligned SSE register store.
16058 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16060 * config/i386/i386.c (ix86_multiplication_cost): Fix
16061 multiplication cost for TARGET_AVX512DQ.
16063 2018-02-08 Marek Polacek <polacek@redhat.com>
16065 PR tree-optimization/84238
16066 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16069 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16071 PR tree-optimization/84265
16072 * tree-vect-stmts.c (vectorizable_store): Don't treat
16073 VMAT_CONTIGUOUS accesses as grouped.
16074 (vectorizable_load): Likewise.
16076 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16078 PR tree-optimization/81635
16079 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16080 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16081 (test_round_for_mask): New functions.
16082 (wide_int_cc_tests): Call test_round_for_mask.
16083 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16084 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16085 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16086 range returned by get_range_info.
16088 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16091 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16092 * symtab.c: Include builtins.h
16093 (symtab_node::output_to_lto_symbol_table_p): Move here
16094 from lto-streamer-out.c:output_symbol_p.
16095 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16096 (output_symbol_p): Move all logic to symtab.c
16097 (produce_symtab): Update.
16099 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16101 * config/s390/s390-opts.h (enum indirect_branch): Define.
16102 * config/s390/s390-protos.h (s390_return_addr_from_memory)
16103 (s390_indirect_branch_via_thunk)
16104 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16105 (enum s390_indirect_branch_type): Define.
16106 * config/s390/s390.c (struct s390_frame_layout, struct
16107 machine_function): Remove.
16108 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16109 (indirect_branch_table_label_no, indirect_branch_table_name):
16111 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16112 (enum s390_indirect_branch_option): Define.
16113 (s390_return_addr_from_memory): New function.
16114 (s390_handle_string_attribute): New function.
16115 (s390_attribute_table): Add new attribute handler.
16116 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16117 (s390_indirect_branch_via_thunk): New function.
16118 (s390_indirect_branch_via_inline_thunk): New function.
16119 (s390_function_ok_for_sibcall): When jumping via thunk disallow
16120 sibling call optimization for non z10 compiles.
16121 (s390_emit_call): Force indirect branch target to be a single
16122 register. Add r1 clobber for non-z10 compiles.
16123 (s390_emit_epilogue): Emit return jump via return_use expander.
16124 (s390_reorg): Handle JUMP_INSNs as execute targets.
16125 (s390_option_override_internal): Perform validity checks for the
16126 new command line options.
16127 (s390_indirect_branch_attrvalue): New function.
16128 (s390_indirect_branch_settings): New function.
16129 (s390_set_current_function): Invoke s390_indirect_branch_settings.
16130 (s390_output_indirect_thunk_function): New function.
16131 (s390_code_end): Implement target hook.
16132 (s390_case_values_threshold): Implement target hook.
16133 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16135 * config/s390/s390.h (struct s390_frame_layout)
16136 (struct machine_function): Move here from s390.c.
16137 (TARGET_INDIRECT_BRANCH_NOBP_RET)
16138 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16139 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16140 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16141 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16142 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16143 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16144 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16145 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16146 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16147 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16148 (mnemonic attribute): Add values which aren't recognized
16150 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16151 pattern for branch conversion. Fix mnemonic attribute.
16152 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16153 indirect branch via thunk if requested.
16154 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16155 ("*indirect_jump"): Disable for branch conversion using out of
16157 ("indirect_jump_via_thunk<mode>_z10")
16158 ("indirect_jump_via_thunk<mode>")
16159 ("indirect_jump_via_inlinethunk<mode>_z10")
16160 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16161 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16162 ("casesi_jump_via_inlinethunk<mode>_z10")
16163 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16164 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16165 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16166 ("*indirect2_jump"): Disable for branch conversion.
16167 ("casesi_jump"): Turn into expander and expand patterns for branch
16169 ("return_use"): New expander.
16170 ("*return"): Emit return via thunk and rename it to ...
16171 ("*return<mode>"): ... this one.
16172 * config/s390/s390.opt: Add new options and and enum for the
16175 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16177 * lra-constraints.c (match_reload): Unconditionally use
16178 gen_lowpart_SUBREG, rather than selecting between that
16179 and equivalent gen_rtx_SUBREG code.
16181 2018-02-08 Richard Biener <rguenther@suse.de>
16183 PR tree-optimization/84233
16184 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16185 changed flag instead of boguously re-using phi_inserted.
16187 2018-02-08 Martin Jambor <mjambor@suse.cz>
16189 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16190 static local variables.
16192 2018-02-08 Richard Biener <rguenther@suse.de>
16194 PR tree-optimization/84278
16195 * tree-vect-stmts.c (vectorizable_store): When looking for
16196 smaller vector types to perform grouped strided loads/stores
16197 make sure the mode is supported by the target.
16198 (vectorizable_load): Likewise.
16200 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16202 * config/aarch64/aarch64.c (aarch64_components_for_bb):
16203 Increase LDP/STP opportunities by adding adjacent callee-saves.
16205 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16207 PR rtl-optimization/84068
16208 PR rtl-optimization/83459
16209 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16211 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16213 PR tree-optimization/84224
16214 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16215 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16216 non-zero arguments.
16218 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16221 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16222 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16223 count, remove one USE.
16225 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16227 * doc/install.texi (Configuration): Document the
16228 --with-long-double-format={ibm,ieee} PowerPC configuration
16232 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16233 Convert from define_expand to be define_insn_and_split. Rework
16234 float/double/_Float128 conversions to QI/HI/SImode to work with
16235 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
16236 conversions to QI/HImode types did a store and then a load to
16237 truncate the value. For conversions to VSX registers, don't split
16238 the insn, instead emit the code directly. Use the code iterator
16239 any_fix to combine signed and unsigned conversions.
16240 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16241 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16242 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16243 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16244 (fix_<mode>di2_hw): Likewise.
16245 (fixuns_<mode>di2_hw): Likewise.
16246 (fix_<mode>si2_hw): Likewise.
16247 (fixuns_<mode>si2_hw): Likewise.
16248 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16249 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16250 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16251 fix<uns>_trunc<SFDF:mode>si2_p8.
16252 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16253 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16254 (fix<uns>_<mode>_mem): Likewise.
16255 (fctiw<u>z_<mode>_mem): Likewise.
16256 (fix<uns>_<mode>_mem): Likewise.
16257 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16258 the register allocator from doing a direct move to the GPRs to do
16259 a store, and instead use the ISA 3.0 store byte/half-word from
16260 vector register instruction. For IEEE 128-bit floating point,
16261 also optimize stores of 32-bit ints.
16262 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16264 2018-02-07 Alan Hayward <alan.hayward@arm.com>
16266 * genextract.c (push_pathstr_operand): New function to support
16268 (walk_rtx): Call push_pathstr_operand.
16269 (print_path): Support [a-zA-Z].
16271 2018-02-07 Richard Biener <rguenther@suse.de>
16273 PR tree-optimization/84037
16274 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16275 (cse_and_gimplify_to_preheader): Declare.
16276 (vect_get_place_in_interleaving_chain): Likewise.
16277 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16279 (_loop_vec_info::~_loop_vec_info): Delete it.
16280 (cse_and_gimplify_to_preheader): New function.
16281 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16282 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16283 (vectorizable_load): Likewise. For grouped stores always base
16284 the IV on the first element.
16285 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16286 condition before gimplifying.
16288 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16290 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16291 *DIV_EXPR and *MOD_EXPR.
16293 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
16296 * config/i386/i386.c (ix86_option_override_internal): Mask out
16297 the CF_SET bit when checking -fcf-protection.
16299 2018-02-07 Tom de Vries <tom@codesourcery.com>
16302 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16305 2018-02-07 Richard Biener <rguenther@suse.de>
16307 PR tree-optimization/84204
16308 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16311 PR tree-optimization/84205
16312 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16313 special-case isl_ast_op_zdiv_r.
16315 PR tree-optimization/84223
16316 * graphite-scop-detection.c (gather_bbs::before_dom_children):
16317 Only add conditions from within the region.
16318 (gather_bbs::after_dom_children): Adjust.
16320 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
16323 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16324 * config/avr/avr.md: Only post-reload split REG-REG moves if
16325 either register is GENERAL_REG_P.
16327 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16329 PR tree-optimization/84235
16330 * tree-ssa-scopedtables.c
16331 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16332 if the subtraction is performed in floating point type where NaNs are
16333 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16334 build 1. Formatting fix.
16336 2018-02-06 Jakub Jelinek <jakub@redhat.com>
16339 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16340 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16341 and skip it regardless of bb boundaries. Use CALL_P macro,
16342 don't test INSN_P (insn) together with CALL_P or JUMP_P check
16343 unnecessarily, formatting fix.
16345 2018-02-06 Michael Collison <michael.collison@arm.com>
16347 * config/arm/thumb2.md:
16348 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16349 (*thumb_mov_notscc): Ditto.
16351 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
16354 * config/rs6000/rs6000.md (su code attribute): Use "u" for
16355 unsigned_fix, not "s".
16357 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16359 * configure.ac (gcc_fn_eh_frame_ro): New function.
16360 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16361 correct .eh_frame permissions.
16362 * configure: Regenerate.
16364 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
16366 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16367 irrelevant options.
16369 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16371 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16372 Display warning message for -mno-speculate-indirect-jumps.
16374 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
16376 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16378 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16380 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
16382 PR tree-optimization/84225
16383 * tree-eh.c (find_trapping_overflow): Only call
16384 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16386 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16389 * config/i386/i386.c: Reimplement the check of possible options
16390 -mibt/-mshstk conbination. Change error messages.
16391 * doc/invoke.texi: Fix a typo: remove extra '='.
16393 2018-02-06 Marek Polacek <polacek@redhat.com>
16395 PR tree-optimization/84228
16396 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16398 2018-02-06 Tamar Christina <tamar.christina@arm.com>
16401 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16402 emitted arch directives.
16403 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16404 __ARM_FEATURE_COPROC before changing architectures.
16406 2018-02-06 Richard Biener <rguenther@suse.de>
16408 * config/i386/i386.c (print_reg): Fix typo.
16409 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16411 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
16413 * configure: Regenerate.
16415 2018-02-05 Martin Sebor <msebor@redhat.com>
16417 PR tree-optimization/83369
16418 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16421 2018-02-05 Martin Liska <mliska@suse.cz>
16423 * doc/invoke.texi: Cherry-pick upstream r323995.
16425 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
16427 * ira.c (ira_init_register_move_cost): Adjust comment.
16429 2018-02-05 Martin Liska <mliska@suse.cz>
16431 PR gcov-profile/84137
16432 * doc/gcov.texi: Fix typo in documentation.
16434 2018-02-05 Martin Liska <mliska@suse.cz>
16436 PR gcov-profile/83879
16437 * doc/gcov.texi: Document necessity of --dynamic-list-data when
16438 using dlopen functionality.
16440 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16442 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16443 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16444 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16445 _mm_maskz_range_round_ss): New intrinsics.
16446 (__builtin_ia32_rangesd128_round)
16447 (__builtin_ia32_rangess128_round): Remove.
16448 (__builtin_ia32_rangesd128_mask_round,
16449 __builtin_ia32_rangess128_mask_round): New builtins.
16450 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16451 __builtin_ia32_rangess128_round): Remove.
16452 (__builtin_ia32_rangesd128_mask_round,
16453 __builtin_ia32_rangess128_mask_round): New builtins.
16454 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16455 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16456 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16457 "<round_saeonly_constraint>")): Changed to ...
16458 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16459 "<round_saeonly_scalar_constraint>")): ... this.
16460 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16461 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16462 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16463 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16464 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16466 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16468 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16470 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16471 Remove all values except native, 8540 and 8548.
16473 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16475 * config/i386/i386.c (ix86_output_function_return): Pass
16476 INVALID_REGNUM, instead of -1, as invalid register number to
16477 indirect_thunk_name and output_indirect_thunk.
16479 2018-02-02 Julia Koval <julia.koval@intel.com>
16481 * config.gcc: Add -march=icelake.
16482 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16483 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16484 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16485 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16486 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16487 (processor_target_table): Add icelake.
16488 (ix86_option_override_internal): Handle new PTAs.
16489 (get_builtin_code_for_version): Handle icelake.
16490 (M_INTEL_COREI7_ICELAKE): New.
16491 (fold_builtin_cpu): Handle icelake.
16492 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16493 * doc/invoke.texi: Add -march=icelake.
16495 2018-02-02 Julia Koval <julia.koval@intel.com>
16497 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16498 to wide_int_bitmask.
16499 * wide-int-bitmask.h: New.
16501 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16504 * config/i386/i386.md: Replace Pmode with word_mode in
16505 builtin_setjmp_setup and builtin_longjmp to support x32.
16507 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16511 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16513 (rs6000_supported_cpu_names): New static variable.
16514 (linux_cpu_translation_table): Likewise.
16515 (elf_platform) <cpu>: Define new static variable and use it.
16516 Translate kernel AT_PLATFORM name to canonical name if needed.
16517 Error if platform name is unknown.
16519 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16522 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16524 2018-02-01 Jeff Law <law@redhat.com>
16527 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16528 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16529 the scratch if RELEASE_VIA_POP is false.
16530 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16531 If we have to save a temporary register, decrement SIZE appropriately.
16532 Pass new arguments to release_scratch_register_on_entry.
16533 (ix86_adjust_stack_and_probe): Likewise.
16534 (ix86_emit_probe_stack_range): Pass new arguments to
16535 release_scratch_register_on_entry.
16537 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16539 PR rtl-optimization/84157
16540 * combine.c (change_zero_ext): Use REG_P predicate in
16541 front of HARD_REGISTER_P predicate.
16543 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16545 * config/avr/avr.c (avr_option_override): Move disabling of
16546 -fdelete-null-pointer-checks to...
16547 * common/config/avr/avr-common.c (avr_option_optimization_table):
16550 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16552 PR tree-optimization/81635
16553 * tree-data-ref.c (split_constant_offset_1): For types that
16554 wrap on overflow, try to use range info to prove that wrapping
16557 2018-02-01 Renlin Li <renlin.li@arm.com>
16560 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16561 TAILCALL_ADDR_REGS.
16562 (aarch64_register_move_cost): Likewise.
16563 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16564 TAILCALL_ADDR_REGS.
16565 (REG_CLASS_NAMES): Likewise.
16566 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16567 TAILCALL_ADDR_REGS. Remove IP registers.
16568 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16570 2018-02-01 Richard Biener <rguenther@suse.de>
16572 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16573 for specifying RPO order and allow NULL for that.
16574 * domwalk.c (dom_walker::dom_walker): Likewise.
16575 (dom_walker::walk): Handle NULL RPO order.
16576 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16578 (rewrite_update_dom_walker): Likewise.
16579 (mark_def_dom_walker): Likewise.
16581 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16583 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16584 (aarch64_maybe_expand_sve_subreg_move): Declare.
16585 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16586 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16588 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16589 that are semantically a reverse operation.
16590 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16591 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16592 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16594 (aarch64_can_change_mode_class): For big-endian, forbid changes
16595 between two SVE modes if they have different element sizes.
16597 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16599 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16600 the TImode handling for big-endian targets.
16602 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16604 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16605 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16607 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16608 Remove BSWAP handing for big-endian targets and use the form of
16609 LD1RQ appropariate for the mode.
16611 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16613 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16614 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16615 duplicated element.
16617 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16620 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16621 check for operands that need to go through aarch64_sve_reload_be.
16623 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16625 PR tree-optimization/81661
16626 PR tree-optimization/84117
16627 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16628 * tree-eh.c: Include gimplify.h.
16629 (find_trapping_overflow, replace_trapping_overflow,
16630 rewrite_to_non_trapping_overflow): New functions.
16631 * tree-vect-loop.c: Include tree-eh.h.
16632 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16633 * tree-data-ref.c: Include tree-eh.h.
16634 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16636 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16638 PR rtl-optimization/84123
16639 * combine.c (change_zero_ext): Check if hard register satisfies
16640 can_change_dest_mode before calling gen_lowpart_SUBREG.
16642 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16645 * ira.c (ira_init_register_move_cost): Remove assert.
16647 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16649 PR rtl-optimization/84071
16650 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16651 * doc/tm.texi: Regenerate.
16653 2018-01-31 Richard Biener <rguenther@suse.de>
16655 PR tree-optimization/84132
16656 * tree-data-ref.c (analyze_miv_subscript): Properly
16657 check whether evolution_function_is_affine_multivariate_p
16658 before calling gcd_of_steps_may_divide_p.
16660 2018-01-31 Julia Koval <julia.koval@intel.com>
16663 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16664 * config/i386/i386.md (rdpid_rex64) New.
16665 (rdpid): Make 32bit only.
16667 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16670 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16671 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16673 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16676 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16678 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16680 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16682 PR rtl-optimization/84071
16683 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16684 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16686 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16688 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16689 (arc_attribute_table): Add 'aux' attribute.
16690 (arc_in_small_data_p): Consider aux like variables.
16691 (arc_is_aux_reg_p): New function.
16692 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16693 (arc_get_aux_arg): New function.
16694 (prepare_move_operands): Handle aux-register access.
16695 (arc_handle_aux_attribute): New function.
16696 * doc/extend.texi (ARC Variable attributes): Add subsection.
16698 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16700 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16701 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16702 (arc_attribute_table): Add 'uncached' attribute.
16703 (arc_print_operand): Print '.di' flag for uncached memory
16705 (arc_in_small_data_p): Do not consider for small data the uncached
16707 (arc_is_uncached_mem_p): New function.
16708 * config/arc/predicates.md (compact_store_memory_operand): Check
16709 for uncached memory accesses.
16710 (nonvol_nonimm_operand): Likewise.
16711 * doc/extend.texi (ARC Type Attribute): New subsection.
16713 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16716 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16717 falign-loops=): Add Optimization flag.
16719 2018-01-30 Jeff Law <law@redhat.com>
16722 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16723 INT_REGISTERS_SAVED. Check it prior to calling
16724 get_scratch_register_on_entry.
16725 (ix86_adjust_stack_and_probe): Similarly.
16726 (ix86_emit_probe_stack_range): Similarly.
16727 (ix86_expand_prologue): Corresponding changes.
16729 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16732 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16733 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16735 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16738 * lra-constraints.c (curr_insn_transform): Process AND in the
16741 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16743 PR rtl-optimization/83986
16744 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16745 dependence against last_pending_memory_flush in addition to
16746 pending_jump_insns.
16748 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16750 PR tree-optimization/81611
16751 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16754 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16757 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16760 2018-01-30 Richard Biener <rguenther@suse.de>
16761 Jakub Jelinek <jakub@redhat.com>
16763 PR tree-optimization/84111
16764 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16765 inner loops added during recursion, as they don't have up-to-date
16768 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16771 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16772 (can_inline_edge_by_limits_p): ... here.
16773 (can_early_inline_edge_p, check_callers,
16774 update_caller_keys, update_callee_keys, recursive_inlining,
16775 add_new_edges_to_heap, speculation_useful_p,
16776 inline_small_functions,
16777 inline_small_functions, flatten_function,
16778 inline_to_all_callers_1): Update.
16780 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16782 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16785 2018-01-30 Richard Biener <rguenther@suse.de>
16787 PR tree-optimization/83008
16788 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16789 invariant and constant vector uses in stmts when they need
16790 more than one stmt.
16792 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16795 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16796 * configure: Regenerate.
16798 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16800 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16802 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16803 Use gen_rtx_REG rather than gen_lowpart.
16805 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16807 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16808 rather than 0 when creating partial subregs.
16810 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16812 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16815 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16818 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16819 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16820 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16821 flags. This restores the settings used before the 2017-07-24.
16822 Turning off pre increment/decrement/modify allows IVOPTS to
16823 optimize DF/SF loops where the index is an int.
16825 2018-01-29 Richard Biener <rguenther@suse.de>
16826 Kelvin Nilsen <kelvin@gcc.gnu.org>
16829 * tree-vect-stmts.c (vectorizable_call): Don't call
16830 targetm.vectorize_builtin_md_vectorized_function if callee is
16833 2018-01-22 Carl Love <cel@us.ibm.com>
16835 * doc/extend.tex: Fix typo in second arg in
16836 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16838 2018-01-29 Richard Biener <rguenther@suse.de>
16840 PR tree-optimization/84086
16841 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16842 (flush_ssaname_freelist): When SSA names were released reset
16843 the SCEV hash table.
16845 2018-01-29 Richard Biener <rguenther@suse.de>
16847 PR tree-optimization/84057
16848 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16849 removed paths when removing edges.
16851 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16853 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16854 -mfunction-return=@var{choice}.
16856 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16858 PR diagnostic/84034
16859 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16860 Handle CR like TAB.
16861 (layout::print_source_line): Likewise.
16862 (test_get_line_width_without_trailing_whitespace): Add test cases.
16864 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16866 PR middle-end/84040
16867 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16870 2018-01-26 Jim Wilson <jimw@sifive.com>
16872 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16874 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16877 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16879 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16880 and CMP + SUB-immediate -> SUBS.
16882 2018-01-26 Martin Sebor <msebor@redhat.com>
16884 PR tree-optimization/83896
16885 * tree-ssa-strlen.c (get_string_len): Rename...
16886 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16887 Avoid assuming length is constant.
16888 (handle_char_store): Use HOST_WIDE_INT for string length.
16890 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16893 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16894 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16896 2018-01-26 Richard Biener <rguenther@suse.de>
16898 PR rtl-optimization/84003
16899 * dse.c (record_store): Only record redundant stores when
16900 the earlier store aliases at least all accesses the later one does.
16902 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16904 PR rtl-optimization/83985
16905 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16906 REG_CFA_RESTORE insns.
16907 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16908 REG_CFA_RESTORE insns here.
16911 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16912 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16914 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16916 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16917 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16918 (arc_init): Likewise.
16919 (arc_override_options): Likewise.
16920 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16922 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16924 * config/arc/arc.h (TARGET_DBNZ): Define.
16925 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16926 properly set the tune attribute.
16927 (dbnz): Use TARGET_DBNZ guard.
16928 * config/arc/arc.opt (mtune): Add core3 option.
16930 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16932 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16933 recognize new pic like addresses.
16934 (arc_delegitimize_address): Clean up.
16936 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16938 * config/arc/arc-arches.def: Option mrf16 valid for all
16940 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16941 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16942 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16943 * config/arc/arc-tables.opt: Regenerate.
16944 * config/arc/arc.c (arc_conditional_register_usage): Handle
16945 reduced register file case.
16946 (arc_file_start): Set must have build attributes.
16947 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16948 mrf16 option value.
16949 * config/arc/arc.opt (mrf16): Add new option.
16950 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16951 * config/arc/genmultilib.awk: Handle new mrf16 option.
16952 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16953 * config/arc/t-multilib: Regenerate.
16954 * doc/invoke.texi (ARC Options): Document mrf16 option.
16956 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16958 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16959 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16960 (arc_attribute_table): Add 'secure_call' attribute.
16961 (arc_print_operand): Print secure call operand.
16962 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16964 (arc_is_secure_call_p): New function. * config/arc/arc.md
16965 (call_i): Add support for sjli instruction.
16966 (call_value_i): Likewise.
16967 * config/arc/constraints.md (Csc): New constraint.
16969 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16970 John Eric Martin <John.Martin@emmicro-us.com>
16972 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16973 * config/arc/arc.c (_arc_jli_section): New struct.
16974 (arc_jli_section): New type.
16975 (rc_jli_sections): New static variable.
16976 (arc_handle_jli_attribute): New function.
16977 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16978 (arc_file_end): New function.
16979 (TARGET_ASM_FILE_END): Define.
16980 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16981 (arc_add_jli_section): New function.
16982 (jli_call_scan): Likewise.
16983 (arc_reorg): Call jli_call_scan.
16984 (arc_output_addsi): Remove 'S' from printing asm operand.
16985 (arc_is_jli_call_p): New function.
16986 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16988 (movhi_insn): Likewise.
16989 (movsi_insn): Likewise.
16990 (movsi_set_cc_insn): Likewise.
16991 (loadqi_update): Likewise.
16992 (load_zeroextendqisi_update): Likewise.
16993 (load_signextendqisi_update): Likewise.
16994 (loadhi_update): Likewise.
16995 (load_zeroextendhisi_update): Likewise.
16996 (load_signextendhisi_update): Likewise.
16997 (loadsi_update): Likewise.
16998 (loadsf_update): Likewise.
16999 (movsicc_insn): Likewise.
17000 (bset_insn): Likewise.
17001 (bxor_insn): Likewise.
17002 (bclr_insn): Likewise.
17003 (bmsk_insn): Likewise.
17004 (bicsi3_insn): Likewise.
17005 (cmpsi_cc_c_insn): Likewise.
17006 (movsi_ne): Likewise.
17007 (movsi_cond_exec): Likewise.
17008 (clrsbsi2): Likewise.
17009 (norm_f): Likewise.
17019 (call_i): Remove 'S' asm letter, add jli instruction.
17020 (call_value_i): Likewise.
17021 * config/arc/arc.op (mjli-always): New option.
17022 * config/arc/constraints.md (Cji): New constraint.
17023 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17025 (subsf3_fpx): Likewise.
17026 (mulsf3_fpx): Likewise.
17027 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17029 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17030 function attrbutes.
17031 * doc/invoke.texi (ARC): Document mjli-always option.
17033 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
17035 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17036 avoid addition with 0 and use incw and decw where possible.
17038 2018-01-26 Richard Biener <rguenther@suse.de>
17040 PR tree-optimization/81082
17041 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17042 association if it requires casting to unsigned.
17043 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17044 from fold_plusminus_mult_expr to catch important cases late when
17045 range info is available.
17047 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17049 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17050 * configure.ac (hidden_linkonce): New test.
17051 * configure: Regenerate.
17052 * config.in: Regenerate.
17054 2018-01-26 Julia Koval <julia.koval@intel.com>
17056 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17057 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17058 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17059 _mm_mask_bitshuffle_epi64_mask): Fix type.
17060 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17061 USI_FTYPE_V4DI_V4DI_USI): Remove.
17062 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17063 __builtin_ia32_vpshufbitqmb256_mask,
17064 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17065 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17066 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17068 2018-01-26 Alan Modra <amodra@gmail.com>
17071 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17072 UNSPEC_VBPERMQ. Sort other unspecs.
17074 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
17076 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17078 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
17080 PR middle-end/83055
17081 * predict.c (drop_profile): Do not push/pop cfun; update also
17083 (handle_missing_profiles): Fix logic looking for zero profiles.
17085 2018-01-25 Jakub Jelinek <jakub@redhat.com>
17087 PR middle-end/83977
17088 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17089 on functions with #pragma omp declare simd or functions with simd
17091 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17092 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17093 Remove trailing \n from warning_at calls.
17095 2018-01-25 Tom de Vries <tom@codesourcery.com>
17098 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17099 for neutered workers.
17101 2018-01-24 Joseph Myers <joseph@codesourcery.com>
17104 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17105 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17107 2018-01-24 Jeff Law <law@redhat.com>
17110 * i386.c (get_probe_interval): Move to earlier point.
17111 (ix86_compute_frame_layout): If -fstack-clash-protection and
17112 the frame is larger than the probe interval, then use pushes
17113 to save registers rather than reg->mem moves.
17114 (ix86_expand_prologue): Remove conditional for int_registers_saved
17117 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
17120 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17121 min/max for never referenced object.
17123 2018-01-24 Jakub Jelinek <jakub@redhat.com>
17125 PR middle-end/83977
17126 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17128 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17129 attributes from DECL_ATTRIBUTES (decl) without affecting
17130 DECL_ATTRIBUTES (current_function_decl).
17131 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17132 functions with non-NULL DECL_ABSTRACT_ORIGIN.
17134 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
17136 PR tree-optimization/83979
17137 * fold-const.c (fold_comparison): Use constant_boolean_node
17138 instead of boolean_{true,false}_node.
17140 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
17142 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17145 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17147 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17148 Simplify the clause that sets the length attribute.
17149 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17150 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17151 clause that sets the length attribute.
17152 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17154 2018-01-24 Tom de Vries <tom@codesourcery.com>
17157 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17158 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17159 Add strict parameter.
17160 (prevent_branch_around_nothing): Insert dummy insn between branch to
17161 label and label with no ptx insn inbetween.
17162 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17164 2018-01-24 Tom de Vries <tom@codesourcery.com>
17167 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17168 for neutered threads in warp.
17169 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17171 2018-01-24 Richard Biener <rguenther@suse.de>
17173 PR tree-optimization/83176
17174 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17177 2018-01-24 Richard Biener <rguenther@suse.de>
17179 PR tree-optimization/82819
17180 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17181 code generating pluses that are no-ops in the target precision.
17183 2018-01-24 Richard Biener <rguenther@suse.de>
17185 PR middle-end/84000
17186 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17188 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17190 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17191 to merge probabilities.
17192 * predict.c (probably_never_executed): Also mark as cold functions
17193 with global 0 profile and guessed local profile.
17194 * profile-count.c (profile_probability::combine_with_count): New
17196 * profile-count.h (profile_probability::operator*,
17197 profile_probability::operator*=, profile_probability::operator/,
17198 profile_probability::operator/=): Reduce precision to adjusted
17199 and set value to guessed on contradictory divisions.
17200 (profile_probability::combine_with_freq): Remove.
17201 (profile_probability::combine_wiht_count): Declare.
17202 (profile_count::force_nonzero):: Set to adjusted.
17203 (profile_count::probability_in):: Set quality to adjusted.
17204 * tree-ssa-tail-merge.c (replace_block_by): Use
17205 combine_with_count.
17207 2018-01-23 Andrew Waterman <andrew@sifive.com>
17208 Jim Wilson <jimw@sifive.com>
17210 * config/riscv/riscv.c (riscv_stack_boundary): New.
17211 (riscv_option_override): Set riscv_stack_boundary. Handle
17212 riscv_preferred_stack_boundary_arg.
17213 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17214 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17215 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17216 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17217 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17218 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17220 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17223 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17224 of struct ix86_frame.
17225 (ix86_expand_epilogue): Likewise. Add a local variable for
17226 the reg_save_offset field in struct ix86_frame.
17228 2018-01-23 Bin Cheng <bin.cheng@arm.com>
17230 PR tree-optimization/82604
17231 * tree-loop-distribution.c (enum partition_kind): New enum item
17232 PKIND_PARTIAL_MEMSET.
17233 (partition_builtin_p): Support above new enum item.
17234 (generate_code_for_partition): Ditto.
17235 (compute_access_range): Differentiate cases that equality can be
17236 proven at all loops, the innermost loops or no loops.
17237 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17238 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
17239 (finalize_partitions, distribute_loop): Don't fuse partition of
17240 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17241 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17242 parloop is enabled.
17244 2018-01-23 Martin Liska <mliska@suse.cz>
17246 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17247 order to ignore the predictor.
17248 (PRED_POLYMORPHIC_CALL): Likewise.
17249 (PRED_RECURSIVE_CALL): Likewise.
17251 2018-01-23 Martin Liska <mliska@suse.cz>
17253 * tree-profile.c (tree_profiling): Print function header to
17254 aware reader which function we are working on.
17255 * value-prof.c (gimple_find_values_to_profile): Do not print
17256 not interesting value histograms.
17258 2018-01-23 Martin Liska <mliska@suse.cz>
17260 * profile-count.h (enum profile_quality): Add
17261 profile_uninitialized as the first value. Do not number values
17262 as they are zero based.
17263 (profile_count::verify): Update sanity check.
17264 (profile_probability::verify): Likewise.
17266 2018-01-23 Nathan Sidwell <nathan@acm.org>
17268 * doc/invoke.texi (ffor-scope): Deprecate.
17270 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17272 PR tree-optimization/83510
17273 * domwalk.c (set_all_edges_as_executable): New function.
17274 (dom_walker::dom_walker): Convert bool param
17275 "skip_unreachable_blocks" to enum reachability. Move setup of
17276 edge flags to set_all_edges_as_executable and only do it when
17277 reachability is REACHABLE_BLOCKS.
17278 * domwalk.h (enum dom_walker::reachability): New enum.
17279 (dom_walker::dom_walker): Convert bool param
17280 "skip_unreachable_blocks" to enum reachability.
17281 (set_all_edges_as_executable): New decl.
17282 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
17283 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17285 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17286 but converting true to REACHABLE_BLOCKS.
17287 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17289 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17290 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17291 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17293 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17294 if check_all_array_refs will be called.
17296 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17298 * tree.c (selftest::test_location_wrappers): Add more test
17301 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17303 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17304 (selftest::test_bit_in_range): Likewise.
17306 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17309 * doc/sourcebuild.texi (vect_float): Say that the selector
17310 only describes the situation when -funsafe-math-optimizations is on.
17311 (vect_float_strict): Document.
17313 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17315 PR tree-optimization/83965
17316 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17317 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17318 instead of checking only for a reduction.
17319 (vect_recog_widen_sum_pattern): Likewise.
17321 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17323 * predict.c (probably_never_executed): Only use precise profile info.
17324 (compute_function_frequency): Skip after inlining hack since we now
17325 have quality checking.
17327 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17329 * profile-count.h (profile_probability::very_unlikely,
17330 profile_probability::unlikely, profile_probability::even): Set
17331 precision to guessed.
17333 2018-01-23 Richard Biener <rguenther@suse.de>
17335 PR tree-optimization/83963
17336 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17337 Properly terminate dominator walk when crossing the exit edge not
17338 when visiting its source block.
17340 2018-01-23 Jakub Jelinek <jakub@redhat.com>
17343 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17344 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17346 2018-01-22 Jakub Jelinek <jakub@redhat.com>
17348 PR tree-optimization/83957
17349 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
17350 semicolon after for body surrounded by braces.
17352 PR tree-optimization/83081
17353 * profile-count.h (profile_probability::split): New method.
17354 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17355 Use profile_probability::split.
17356 (do_compare_rtx_and_jump): Fix adjustment of probabilities
17357 when splitting a single conditional jump into 2.
17359 2018-01-22 David Malcolm <dmalcolm@redhat.com>
17361 PR tree-optimization/69452
17362 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17365 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17367 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17368 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17369 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17371 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17373 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17375 * config/rl78/rl78.md (movdi): New define_expand.
17376 * config/rl78/rl78.c (rl78_split_movdi): New function.
17378 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
17381 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17383 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17384 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17385 128-bit to produce an UNSPEC move to get the double word with the
17386 signbit and then a shift directly to do signbit.
17387 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17388 implementation with a new version that just does either a direct
17389 move or a regular move. Move memory interface to separate insns.
17390 Move insns so they are next to the expander.
17391 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17392 with signbit move. Split big and little endian case.
17393 (signbit<mode>2_dm_mem_le): Likewise.
17394 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17395 (signbit<mode>2_dm2): Likewise.
17397 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17399 * config/rl78/rl78.md (anddi3): New define_expand.
17401 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17403 * config/rl78/rl78.md (umindi3): New define_expand.
17405 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17407 * config/rl78/rl78.md (smindi3): New define_expand.
17409 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17411 * config/rl78/rl78.md (smaxdi3): New define_expand.
17413 2018-01-22 Carl Love <cel@us.ibm.com>
17415 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17416 LVX_V1TI): Add macro expansion.
17417 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17418 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17419 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17420 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17421 Change check to determine if the instruction is a byte reversing
17422 entry. Fix typo in comment.
17423 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17424 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17425 Add def_builtin calls for new builtins.
17426 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17427 Add define_insn expansion.
17429 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17431 * config/rl78/rl78.md (umaxdi3): New define_expand.
17433 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17435 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17436 for non-QImode registers.
17438 2018-01-22 Richard Biener <rguenther@suse.de>
17440 PR tree-optimization/83963
17441 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17442 including the loop exit block.
17443 (scop_detection::merge_sese): Likewise.
17444 (scop_detection::add_scop): Do it here instead.
17446 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17448 * doc/sourcebuild.texi (arm_softfloat): Document.
17450 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17453 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17454 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17455 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17457 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17458 David Edelsohn <dje.gcc@gmail.com>
17461 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17462 Change "crset eq" to "crset 2".
17463 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17464 (*call_indirect_aix<mode>_nospec): Likewise.
17465 (*call_value_indirect_aix<mode>_nospec): Likewise.
17466 (*call_indirect_elfv2<mode>_nospec): Likewise.
17467 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17468 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17469 change assembly output from . to $.
17470 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17471 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17472 (*tablejump<mode>_internal1_nospec): Likewise.
17474 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17477 * config/sh/sh_optimize_sett_clrt.cc:
17478 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17480 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17482 PR tree-optimization/83940
17483 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17484 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17485 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17486 use it to pass back the definition type.
17487 (vect_check_store_rhs): Likewise rhs_dt_out.
17488 (vect_build_gather_load_calls): Add a mask_dt argument and use
17489 it instead of a call to vect_is_simple_use.
17490 (vectorizable_store): Update calls to vect_check_load_store_mask
17491 and vect_check_store_rhs. Use the dt returned by the latter instead
17492 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17493 instead of calls to vect_is_simple_use. Pass the scalar rather
17494 than the vector operand to vect_is_simple_use when handling
17495 second and subsequent copies of an rhs value.
17496 (vectorizable_load): Update calls to vect_check_load_store_mask
17497 and vect_build_gather_load_calls. Use the cached mask_dt and
17498 gs_info.offset_dt instead of calls to vect_is_simple_use.
17500 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17502 PR middle-end/83945
17503 * tree-emutls.c: Include gimplify.h.
17504 (lower_emutls_2): New function.
17505 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17506 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17507 it before further processing.
17510 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17511 UINTVAL (trueop1) instead of INTVAL (op1).
17513 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17517 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17518 INCOMING_FRAME_SP_OFFSET if not defined.
17519 (scan_trace): Add ENTRY argument. If true and
17520 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17521 emit a note to adjust the CFA offset.
17522 (create_cfi_notes): Adjust scan_trace callers.
17523 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17524 INCOMING_FRAME_SP_OFFSET in the CIE.
17525 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17526 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17528 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17529 * doc/tm.texi: Regenerated.
17531 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17533 PR rtl-optimization/83147
17534 * lra-constraints.c (remove_inheritance_pseudos): Use
17535 lra_substitute_pseudo_within_insn.
17537 2018-01-19 Tom de Vries <tom@codesourcery.com>
17538 Cesar Philippidis <cesar@codesourcery.com>
17541 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17543 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17546 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17547 spaces for function labels.
17549 2018-01-19 Martin Liska <mliska@suse.cz>
17551 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17552 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17553 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17554 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17555 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17556 (PRED_CONST_RETURN): Change from 69 to 65.
17557 (PRED_NULL_RETURN): Change from 91 to 71.
17558 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17559 (PRED_LOOP_GUARD): Change from 66 to 73.
17561 2018-01-19 Martin Liska <mliska@suse.cz>
17563 * predict.c (predict_insn_def): Add new assert.
17564 (struct branch_predictor): Change type to signed integer.
17565 (test_prediction_value_range): Amend test to cover
17566 PROB_UNINITIALIZED.
17567 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17568 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17569 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17570 (PRED_LOOP_IV_COMPARE): Likewise.
17571 * predict.h (PROB_UNINITIALIZED): Define new constant.
17573 2018-01-19 Martin Liska <mliska@suse.cz>
17575 * predict.c (dump_prediction): Add new format for
17576 analyze_brprob.py script which is enabled with -details
17578 * profile-count.h (precise_p): New function.
17580 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17582 PR tree-optimization/83922
17583 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17584 there are no statements that need masking.
17585 (vect_active_double_reduction_p): New function.
17586 (vect_analyze_loop_operations): Use it when handling phis that
17587 are not in the loop header.
17589 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17591 PR tree-optimization/83914
17592 * tree-vect-loop.c (vectorizable_induction): Don't convert
17593 init_expr or apply the peeling adjustment for inductions
17594 that are nested within the vectorized loop.
17596 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17598 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17601 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17605 * function.h (gimplify_parameters): Add gimple_seq * argument.
17606 * function.c: Include gimple.h and options.h.
17607 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17608 for the added local temporaries if needed.
17609 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17610 if there are any parameter cleanups, wrap whole body into a
17611 try/finally with the cleanups.
17613 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17616 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17617 Use GET_MODE_CLASS for scalar floating point.
17619 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17623 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17624 Fix call of call_cgraph_insertion_hooks.
17626 2018-01-18 Martin Sebor <msebor@redhat.com>
17628 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17630 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17633 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17636 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17639 * common.opt: (-ffile-prefix-map): New option.
17640 * opts.c (common_handle_option): Defer it.
17641 * opts-global.c (handle_common_deferred_options): Handle it.
17642 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17643 * file-prefix-map.h: New file.
17644 (remap_debug_filename, add_debug_prefix_map): ...here.
17645 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17646 * final.c (debug_prefix_map, add_debug_prefix_map
17647 remap_debug_filename): Move to...
17648 * file-prefix-map.c: New file.
17649 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17650 generalize, get rid of alloca(), use strrchr() instead of strchr().
17651 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17652 Implement in terms of add_prefix_map().
17653 (remap_macro_filename, remap_debug_filename): Implement in term of
17655 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17656 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17657 * dbxout.c: Include file-prefix-map.h.
17658 * varasm.c: Likewise.
17659 * vmsdbgout.c: Likewise.
17660 * xcoffout.c: Likewise.
17661 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17662 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17663 * doc/invoke.texi (-ffile-prefix-map): Document.
17664 (-fdebug-prefix-map): Update description.
17666 2018-01-18 Martin Liska <mliska@suse.cz>
17668 * config/i386/i386.c (indirect_thunk_name): Document that also
17670 (output_indirect_thunk): Document why both instructions
17671 (pause and lfence) are generated.
17673 2018-01-18 Richard Biener <rguenther@suse.de>
17675 PR tree-optimization/83887
17676 * graphite-scop-detection.c
17677 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17678 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17679 (scop_detection::merge_sese): Re-implement with a flood-fill
17680 algorithm that properly finds a SESE region if it exists.
17682 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17685 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17686 pointer_diff optimizations use view_convert instead of convert.
17688 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17690 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17691 Generate different code for -mno-speculate-indirect-jumps.
17692 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17693 (*call_indirect_aix<mode>): Disable for
17694 -mno-speculate-indirect-jumps.
17695 (*call_indirect_aix<mode>_nospec): New define_insn.
17696 (*call_value_indirect_aix<mode>): Disable for
17697 -mno-speculate-indirect-jumps.
17698 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17699 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17700 -mno-speculate-indirect-jumps.
17701 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17703 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17705 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17706 long double type, set the flags for noting the default long double
17707 type, even if we don't pass or return a long double type.
17709 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17712 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17715 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17717 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17718 support for merge[hl].
17719 (fold_mergehl_helper): New helper function.
17720 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17721 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17722 (altivec_vmrglw_direct): Add xxmrglw insn.
17724 2018-01-17 Andrew Waterman <andrew@sifive.com>
17726 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17727 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17729 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17732 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17733 call the lto_location_cache before reading the
17734 DECL_SOURCE_LOCATION of the types.
17736 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17737 Richard Sandiford <richard.sandiford@linaro.org>
17739 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17740 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17741 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17742 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17743 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17745 * config/aarch64/constraints.md (aarch64_movti_operand):
17747 * config/aarch64/predicates.md (Uti): Add new constraint.
17749 2018-01-17 Carl Love <cel@us.ibm.com>
17751 * config/rs6000/vsx.md (define_expand xl_len_r,
17752 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17753 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17755 (define_expand, define_insn): Move the shift left from the
17756 define_insn to the define_expand for lxvl and stxvl instructions.
17757 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17758 and XL_LEN_R definitions to PURE.
17760 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17762 * config/i386/i386.c (indirect_thunk_name): Declare regno
17763 as unsigned int. Compare regno with INVALID_REGNUM.
17764 (output_indirect_thunk): Ditto.
17765 (output_indirect_thunk_function): Ditto.
17766 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17767 in the call to output_indirect_thunk_function.
17769 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17771 PR middle-end/83884
17772 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17773 rather than the size of inner_type to determine the stack slot size
17774 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17776 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17779 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17782 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17784 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17785 endian Linux systems to optionally enable multilibs for selecting
17786 the long double type if the user configured an explicit type.
17787 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17788 have no long double multilibs if not defined.
17789 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17790 warn if the user used -mabi={ieee,ibm}longdouble and we built
17791 multilibs for long double.
17792 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17793 appropriate multilib option.
17794 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17796 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17797 for building long double multilibs.
17798 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17800 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17802 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17805 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17807 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17810 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17813 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17816 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17818 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17819 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17821 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17823 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17824 different rtl trees depending on TARGET_64BIT.
17825 (rs6000_gen_lvx): Likewise.
17827 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17829 * config/visium/visium.md (nop): Tweak comment.
17830 (hazard_nop): Likewise.
17832 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17834 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17835 -mspeculate-indirect-jumps.
17836 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17837 for -mno-speculate-indirect-jumps.
17838 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17839 (*call_value_indirect_elfv2<mode>): Disable for
17840 -mno-speculate-indirect-jumps.
17841 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17842 (indirect_jump): Emit different RTL for
17843 -mno-speculate-indirect-jumps.
17844 (*indirect_jump<mode>): Disable for
17845 -mno-speculate-indirect-jumps.
17846 (*indirect_jump<mode>_nospec): New define_insn.
17847 (tablejump): Emit different RTL for
17848 -mno-speculate-indirect-jumps.
17849 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17850 (tablejumpsi_nospec): New define_expand.
17851 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17852 (tablejumpdi_nospec): New define_expand.
17853 (*tablejump<mode>_internal1): Disable for
17854 -mno-speculate-indirect-jumps.
17855 (*tablejump<mode>_internal1_nospec): New define_insn.
17856 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17859 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17861 * caller-save.c (insert_save): Drop unnecessary parameter. All
17864 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17865 Richard Biener <rguenth@suse.de>
17868 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17869 return early, inline manually is_gimple_sizepos. Make sure if we
17870 call gimplify_expr we don't end up with a gimple constant.
17871 * tree.c (variably_modified_type_p): Don't return true for
17872 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17873 * gimplify.h (is_gimple_sizepos): Remove.
17875 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17877 PR tree-optimization/83857
17878 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17879 vectorizable_live_operation for pure SLP statements.
17880 (vectorizable_live_operation): Handle PHIs.
17882 2018-01-16 Richard Biener <rguenther@suse.de>
17884 PR tree-optimization/83867
17885 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17886 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17888 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17891 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17892 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17893 If off is not INTEGER_CST, issue a may not be aligned warning
17894 rather than isn't aligned. Use isn%'t rather than isn't.
17895 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17897 <case MULT_EXPR>: Improve the case when bottom and one of the
17898 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17899 operand, in that case check if the other operand is multiple of
17900 bottom divided by the INTEGER_CST operand.
17902 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17905 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17906 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17907 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17908 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17909 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17910 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17911 (pa_function_arg_size): New function.
17913 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17915 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17916 in a separate statement.
17918 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17920 PR tree-optimization/83847
17921 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17922 group gathers and scatters.
17924 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17926 PR rtl-optimization/86620
17927 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17929 PR rtl-optimization/83213
17930 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17931 to last if both are JUMP_INSNs.
17933 PR tree-optimization/83843
17934 * gimple-ssa-store-merging.c
17935 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17936 store_immediate_info for bswap/nop orig_stores.
17938 2018-01-15 Andrew Waterman <andrew@sifive.com>
17940 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17942 <UDIV>: Increase cost if !TARGET_DIV.
17944 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17946 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17947 (define_attr "cr_logical_3op"): New.
17948 (cceq_ior_compare): Adjust.
17949 (cceq_ior_compare_complement): Adjust.
17950 (*cceq_rev_compare): Adjust.
17951 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17952 (is_cracked_insn): Adjust.
17953 (insn_must_be_first_in_group): Adjust.
17954 * config/rs6000/40x.md: Adjust.
17955 * config/rs6000/440.md: Adjust.
17956 * config/rs6000/476.md: Adjust.
17957 * config/rs6000/601.md: Adjust.
17958 * config/rs6000/603.md: Adjust.
17959 * config/rs6000/6xx.md: Adjust.
17960 * config/rs6000/7450.md: Adjust.
17961 * config/rs6000/7xx.md: Adjust.
17962 * config/rs6000/8540.md: Adjust.
17963 * config/rs6000/cell.md: Adjust.
17964 * config/rs6000/e300c2c3.md: Adjust.
17965 * config/rs6000/e500mc.md: Adjust.
17966 * config/rs6000/e500mc64.md: Adjust.
17967 * config/rs6000/e5500.md: Adjust.
17968 * config/rs6000/e6500.md: Adjust.
17969 * config/rs6000/mpc.md: Adjust.
17970 * config/rs6000/power4.md: Adjust.
17971 * config/rs6000/power5.md: Adjust.
17972 * config/rs6000/power6.md: Adjust.
17973 * config/rs6000/power7.md: Adjust.
17974 * config/rs6000/power8.md: Adjust.
17975 * config/rs6000/power9.md: Adjust.
17976 * config/rs6000/rs64.md: Adjust.
17977 * config/rs6000/titan.md: Adjust.
17979 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17981 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17982 ix86_indirect_branch_register logic.
17984 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17986 * config/i386/constraints.md (Bs): Update
17987 ix86_indirect_branch_register check. Don't check
17988 ix86_indirect_branch_register with GOT_memory_operand.
17990 * config/i386/predicates.md (GOT_memory_operand): Don't check
17991 ix86_indirect_branch_register here.
17992 (GOT32_symbol_operand): Likewise.
17994 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17996 * config/i386/predicates.md (constant_call_address_operand):
17997 Rewrite ix86_indirect_branch_register logic.
17998 (sibcall_insn_operand): Likewise.
18000 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18002 * config/i386/constraints.md (Bs): Replace
18003 ix86_indirect_branch_thunk_register with
18004 ix86_indirect_branch_register.
18006 * config/i386/i386.md (indirect_jump): Likewise.
18007 (tablejump): Likewise.
18008 (*sibcall_memory): Likewise.
18009 (*sibcall_value_memory): Likewise.
18010 Peepholes of indirect call and jump via memory: Likewise.
18011 * config/i386/i386.opt: Likewise.
18012 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18013 (GOT_memory_operand): Likewise.
18014 (call_insn_operand): Likewise.
18015 (sibcall_insn_operand): Likewise.
18016 (GOT32_symbol_operand): Likewise.
18018 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18020 PR middle-end/83837
18021 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18022 type rather than type addr's type points to.
18023 (expand_omp_atomic_mutex): Likewise.
18024 (expand_omp_atomic): Likewise.
18026 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18029 * config/i386/i386.c (output_indirect_thunk_function): Use
18030 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18031 for __x86_return_thunk.
18033 2018-01-15 Richard Biener <rguenther@suse.de>
18035 PR middle-end/83850
18036 * expmed.c (extract_bit_field_1): Fix typo.
18038 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18041 * config/arm/iterators.md (VF): New mode iterator.
18042 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18043 Remove integer-related logic from pattern.
18044 (neon_vabd<mode>_3): Likewise.
18046 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18048 PR middle-end/82694
18049 * common.opt (fstrict-overflow): No longer an alias.
18050 (fwrapv-pointer): New option.
18051 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18052 also for pointer types based on flag_wrapv_pointer.
18053 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18054 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18055 opts->x_flag_wrapv got set.
18056 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18057 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18058 POINTER_TYPE_OVERFLOW_UNDEFINED.
18059 * match.pd: Likewise in address comparison pattern.
18060 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18062 2018-01-15 Richard Biener <rguenther@suse.de>
18065 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18066 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
18067 Reset type names to their identifier if their TYPE_DECL doesn't
18068 have linkage (and thus is used for ODR and devirt).
18069 (save_debug_info_for_decl): Remove.
18070 (save_debug_info_for_type): Likewise.
18071 (add_tree_to_fld_list): Adjust.
18072 * tree-pretty-print.c (dump_generic_node): Make dumping of
18073 type names more robust.
18075 2018-01-15 Richard Biener <rguenther@suse.de>
18077 * BASE-VER: Bump to 8.0.1.
18079 2018-01-14 Martin Sebor <msebor@redhat.com>
18082 * builtins.c (check_access): Avoid warning when the no-warning bit
18085 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
18087 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18088 * ira-color (allocno_hard_regs_compare): Likewise.
18090 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
18093 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18094 Use .pushsection/.popsection.
18096 2018-01-14 Martin Sebor <msebor@redhat.com>
18099 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18101 2018-01-14 Jakub Jelinek <jakub@redhat.com>
18103 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18104 entry from extra_headers.
18105 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18106 extra_headers, make the list bitwise identical to the i?86-*-* one.
18108 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18110 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18111 -mcmodel=large with -mindirect-branch=thunk,
18112 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18113 -mfunction-return=thunk-extern.
18114 * doc/invoke.texi: Document -mcmodel=large is incompatible with
18115 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18116 -mfunction-return=thunk and -mfunction-return=thunk-extern.
18118 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18120 * config/i386/i386.c (print_reg): Print the name of the full
18121 integer register without '%'.
18122 (ix86_print_operand): Handle 'V'.
18123 * doc/extend.texi: Document 'V' modifier.
18125 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18127 * config/i386/constraints.md (Bs): Disallow memory operand for
18128 -mindirect-branch-register.
18130 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18131 (GOT_memory_operand): Likewise.
18132 (call_insn_operand): Likewise.
18133 (sibcall_insn_operand): Likewise.
18134 (GOT32_symbol_operand): Likewise.
18135 * config/i386/i386.md (indirect_jump): Call convert_memory_address
18136 for -mindirect-branch-register.
18137 (tablejump): Likewise.
18138 (*sibcall_memory): Likewise.
18139 (*sibcall_value_memory): Likewise.
18140 Disallow peepholes of indirect call and jump via memory for
18141 -mindirect-branch-register.
18142 (*call_pop): Replace m with Bw.
18143 (*call_value_pop): Likewise.
18144 (*sibcall_pop_memory): Replace m with Bs.
18145 * config/i386/i386.opt (mindirect-branch-register): New option.
18146 * doc/invoke.texi: Document -mindirect-branch-register option.
18148 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18150 * config/i386/i386-protos.h (ix86_output_function_return): New.
18151 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18152 set function_return_type.
18153 (indirect_thunk_name): Add ret_p to indicate thunk for function
18155 (output_indirect_thunk_function): Pass false to
18156 indirect_thunk_name.
18157 (ix86_output_indirect_branch_via_reg): Likewise.
18158 (ix86_output_indirect_branch_via_push): Likewise.
18159 (output_indirect_thunk_function): Create alias for function
18160 return thunk if regno < 0.
18161 (ix86_output_function_return): New function.
18162 (ix86_handle_fndecl_attribute): Handle function_return.
18163 (ix86_attribute_table): Add function_return.
18164 * config/i386/i386.h (machine_function): Add
18165 function_return_type.
18166 * config/i386/i386.md (simple_return_internal): Use
18167 ix86_output_function_return.
18168 (simple_return_internal_long): Likewise.
18169 * config/i386/i386.opt (mfunction-return=): New option.
18170 (indirect_branch): Mention -mfunction-return=.
18171 * doc/extend.texi: Document function_return function attribute.
18172 * doc/invoke.texi: Document -mfunction-return= option.
18174 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18176 * config/i386/i386-opts.h (indirect_branch): New.
18177 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18178 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18179 with local indirect jump when converting indirect call and jump.
18180 (ix86_set_indirect_branch_type): New.
18181 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18182 (indirectlabelno): New.
18183 (indirect_thunk_needed): Likewise.
18184 (indirect_thunk_bnd_needed): Likewise.
18185 (indirect_thunks_used): Likewise.
18186 (indirect_thunks_bnd_used): Likewise.
18187 (INDIRECT_LABEL): Likewise.
18188 (indirect_thunk_name): Likewise.
18189 (output_indirect_thunk): Likewise.
18190 (output_indirect_thunk_function): Likewise.
18191 (ix86_output_indirect_branch_via_reg): Likewise.
18192 (ix86_output_indirect_branch_via_push): Likewise.
18193 (ix86_output_indirect_branch): Likewise.
18194 (ix86_output_indirect_jmp): Likewise.
18195 (ix86_code_end): Call output_indirect_thunk_function if needed.
18196 (ix86_output_call_insn): Call ix86_output_indirect_branch if
18198 (ix86_handle_fndecl_attribute): Handle indirect_branch.
18199 (ix86_attribute_table): Add indirect_branch.
18200 * config/i386/i386.h (machine_function): Add indirect_branch_type
18201 and has_local_indirect_jump.
18202 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18204 (tablejump): Likewise.
18205 (*indirect_jump): Use ix86_output_indirect_jmp.
18206 (*tablejump_1): Likewise.
18207 (simple_return_indirect_internal): Likewise.
18208 * config/i386/i386.opt (mindirect-branch=): New option.
18209 (indirect_branch): New.
18212 (thunk-inline): Likewise.
18213 (thunk-extern): Likewise.
18214 * doc/extend.texi: Document indirect_branch function attribute.
18215 * doc/invoke.texi: Document -mindirect-branch= option.
18217 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18220 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18222 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18224 * ipa-inline.c (want_inline_small_function_p): Return false if
18225 inlining has already failed with CIF_FINAL_ERROR.
18226 (update_caller_keys): Call want_inline_small_function_p before
18228 (update_callee_keys): Likewise.
18230 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18232 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18234 (rs6000_quadword_masked_address_p): Likewise.
18235 (quad_aligned_load_p): Likewise.
18236 (quad_aligned_store_p): Likewise.
18237 (const_load_sequence_p): Add comment to describe the outer-most loop.
18238 (mimic_memory_attributes_and_flags): New function.
18239 (rs6000_gen_stvx): Likewise.
18240 (replace_swapped_aligned_store): Likewise.
18241 (rs6000_gen_lvx): Likewise.
18242 (replace_swapped_aligned_load): Likewise.
18243 (replace_swapped_load_constant): Capitalize argument name in
18244 comment describing this function.
18245 (rs6000_analyze_swaps): Add a third pass to search for vector loads
18246 and stores that access quad-word aligned addresses and replace
18247 with stvx or lvx instructions when appropriate.
18248 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18249 New function prototype.
18250 (rs6000_quadword_masked_address_p): Likewise.
18251 (rs6000_gen_lvx): Likewise.
18252 (rs6000_gen_stvx): Likewise.
18253 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18254 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18255 when memory address is aligned.
18256 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18257 this split to select lvx instruction when memory address is aligned.
18258 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18259 instruction when memory address is aligned.
18260 (*vsx_le_perm_load_v16qi): Likewise.
18261 (four unnamed splitters): Modify to select the stvx instruction
18262 when memory is aligned.
18264 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
18266 * predict.c (determine_unlikely_bbs): Handle correctly BBs
18267 which appears in the queue multiple times.
18269 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18270 Alan Hayward <alan.hayward@arm.com>
18271 David Sherwood <david.sherwood@arm.com>
18273 * tree-vectorizer.h (vec_lower_bound): New structure.
18274 (_loop_vec_info): Add check_nonzero and lower_bounds.
18275 (LOOP_VINFO_CHECK_NONZERO): New macro.
18276 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18277 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18278 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18279 fields. Make seg_len the distance travelled, not including the
18281 (dr_direction_indicator): Declare.
18282 (dr_zero_step_indicator): Likewise.
18283 (dr_known_forward_stride_p): Likewise.
18284 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18286 (runtime_alias_check_p): Allow runtime alias checks with
18288 (operator ==): Compare access_size and align.
18289 (prune_runtime_alias_test_list): Rework for new distinction between
18290 the access_size and seg_len.
18291 (create_intersect_range_checks_index): Likewise. Cope with polynomial
18293 (get_segment_min_max): New function.
18294 (create_intersect_range_checks): Use it.
18295 (dr_step_indicator): New function.
18296 (dr_direction_indicator): Likewise.
18297 (dr_zero_step_indicator): Likewise.
18298 (dr_known_forward_stride_p): Likewise.
18299 * tree-loop-distribution.c (data_ref_segment_size): Return
18300 DR_STEP * (niters - 1).
18301 (compute_alias_check_pairs): Update call to the dr_with_seg_len
18303 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18304 (vect_preserves_scalar_order_p): New function, split out from...
18305 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
18306 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18307 (vect_vfa_access_size): New function.
18308 (vect_vfa_align): Likewise.
18309 (vect_compile_time_alias): Take access_size_a and access_b arguments.
18310 (dump_lower_bound): New function.
18311 (vect_check_lower_bound): Likewise.
18312 (vect_small_gap_p): Likewise.
18313 (vectorizable_with_step_bound_p): Likewise.
18314 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18315 depencies if the vectorization factor is 1. Convert the checks
18316 for nonzero steps into checks on the bounds of DR_STEP. Try using
18317 a bunds check for variable steps if the minimum required step is
18318 relatively small. Update calls to the dr_with_seg_len
18319 constructor and to vect_compile_time_alias.
18320 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18322 (vect_loop_versioning): Call it.
18323 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18325 (vect_estimate_min_profitable_iters): Account for any bounds checks.
18327 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18328 Alan Hayward <alan.hayward@arm.com>
18329 David Sherwood <david.sherwood@arm.com>
18331 * doc/sourcebuild.texi (vect_scatter_store): Document.
18332 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18334 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18336 * genopinit.c (main): Add supports_vec_scatter_store and
18337 supports_vec_scatter_store_cached to target_optabs.
18338 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18339 IFN_MASK_SCATTER_STORE.
18340 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18342 * internal-fn.h (internal_store_fn_p): Declare.
18343 (internal_fn_stored_value_index): Likewise.
18344 * internal-fn.c (scatter_store_direct): New macro.
18345 (expand_scatter_store_optab_fn): New function.
18346 (direct_scatter_store_optab_supported_p): New macro.
18347 (internal_store_fn_p): New function.
18348 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18349 IFN_MASK_SCATTER_STORE.
18350 (internal_fn_mask_index): Likewise.
18351 (internal_fn_stored_value_index): New function.
18352 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18353 for scatter stores.
18354 * optabs-query.h (supports_vec_scatter_store_p): Declare.
18355 * optabs-query.c (supports_vec_scatter_store_p): New function.
18356 * tree-vectorizer.h (vect_get_store_rhs): Declare.
18357 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18358 true for scatter stores.
18359 (vect_gather_scatter_fn_p): Handle scatter stores too.
18360 (vect_check_gather_scatter): Consider using scatter stores if
18361 supports_vec_scatter_store_p.
18362 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18363 scatter stores too.
18364 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18365 internal_fn_stored_value_index.
18366 (check_load_store_masking): Handle scatter stores too.
18367 (vect_get_store_rhs): Make public.
18368 (vectorizable_call): Use internal_store_fn_p.
18369 (vectorizable_store): Handle scatter store internal functions.
18370 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18371 when deciding whether the end of the group has been reached.
18372 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18373 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18374 (mask_scatter_store<mode>): New insns.
18376 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18377 Alan Hayward <alan.hayward@arm.com>
18378 David Sherwood <david.sherwood@arm.com>
18380 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18381 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18382 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18384 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18385 Use vect_truncate_gather_scatter_offset if we can't treat the
18386 operation as a normal gather load or scatter store.
18387 (get_group_load_store_type): Take the gather_scatter_info
18388 as argument. Try using a gather load or scatter store for
18389 single-element groups.
18390 (get_load_store_type): Update calls to get_group_load_store_type
18391 and vect_use_strided_gather_scatters_p.
18393 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18394 Alan Hayward <alan.hayward@arm.com>
18395 David Sherwood <david.sherwood@arm.com>
18397 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18398 optional tree argument.
18399 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18401 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18402 but continue to use the current value as a fallback.
18403 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18404 to compare the updates.
18405 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18406 (get_load_store_type): Use it when handling a strided access.
18407 (vect_get_strided_load_store_ops): New function.
18408 (vect_get_data_ptr_increment): Likewise.
18409 (vectorizable_load): Handle strided gather loads. Always pass
18410 a step to vect_create_data_ref_ptr and bump_vector_ptr.
18412 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18413 Alan Hayward <alan.hayward@arm.com>
18414 David Sherwood <david.sherwood@arm.com>
18416 * doc/md.texi (gather_load@var{m}): Document.
18417 (mask_gather_load@var{m}): Likewise.
18418 * genopinit.c (main): Add supports_vec_gather_load and
18419 supports_vec_gather_load_cached to target_optabs.
18420 * optabs-tree.c (init_tree_optimization_optabs): Use
18421 ggc_cleared_alloc to allocate target_optabs.
18422 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18423 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18425 * internal-fn.h (internal_load_fn_p): Declare.
18426 (internal_gather_scatter_fn_p): Likewise.
18427 (internal_fn_mask_index): Likewise.
18428 (internal_gather_scatter_fn_supported_p): Likewise.
18429 * internal-fn.c (gather_load_direct): New macro.
18430 (expand_gather_load_optab_fn): New function.
18431 (direct_gather_load_optab_supported_p): New macro.
18432 (direct_internal_fn_optab): New function.
18433 (internal_load_fn_p): Likewise.
18434 (internal_gather_scatter_fn_p): Likewise.
18435 (internal_fn_mask_index): Likewise.
18436 (internal_gather_scatter_fn_supported_p): Likewise.
18437 * optabs-query.c (supports_at_least_one_mode_p): New function.
18438 (supports_vec_gather_load_p): Likewise.
18439 * optabs-query.h (supports_vec_gather_load_p): Declare.
18440 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18441 and memory_type field.
18442 (NUM_PATTERNS): Bump to 15.
18443 * tree-vect-data-refs.c: Include internal-fn.h.
18444 (vect_gather_scatter_fn_p): New function.
18445 (vect_describe_gather_scatter_call): Likewise.
18446 (vect_check_gather_scatter): Try using internal functions for
18447 gather loads. Recognize existing calls to a gather load function.
18448 (vect_analyze_data_refs): Consider using gather loads if
18449 supports_vec_gather_load_p.
18450 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18451 (vect_get_gather_scatter_offset_type): Likewise.
18452 (vect_convert_mask_for_vectype): Likewise.
18453 (vect_add_conversion_to_patterm): Likewise.
18454 (vect_try_gather_scatter_pattern): Likewise.
18455 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18456 (vect_vect_recog_func_ptrs): Add it.
18457 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18458 internal_fn_mask_index and internal_gather_scatter_fn_p.
18459 (check_load_store_masking): Take the gather_scatter_info as an
18460 argument and handle gather loads.
18461 (vect_get_gather_scatter_ops): New function.
18462 (vectorizable_call): Check internal_load_fn_p.
18463 (vectorizable_load): Likewise. Handle gather load internal
18465 (vectorizable_store): Update call to check_load_store_masking.
18466 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18467 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18468 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18469 (aarch64_gather_scale_operand_d): New predicates.
18470 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18471 (mask_gather_load<mode>): New insns.
18473 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18474 Alan Hayward <alan.hayward@arm.com>
18475 David Sherwood <david.sherwood@arm.com>
18477 * optabs.def (fold_left_plus_optab): New optab.
18478 * doc/md.texi (fold_left_plus_@var{m}): Document.
18479 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18480 * internal-fn.c (fold_left_direct): Define.
18481 (expand_fold_left_optab_fn): Likewise.
18482 (direct_fold_left_optab_supported_p): Likewise.
18483 * fold-const-call.c (fold_const_fold_left): New function.
18484 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18485 * tree-parloops.c (valid_reduction_p): New function.
18486 (gather_scalar_reductions): Use it.
18487 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18488 (vect_finish_replace_stmt): Declare.
18489 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18490 (needs_fold_left_reduction_p): New function, split out from...
18491 (vect_is_simple_reduction): ...here. Accept reductions that
18492 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18493 (vect_force_simple_reduction): Also store the reduction type in
18494 the assignment's STMT_VINFO_REDUC_TYPE.
18495 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18496 (merge_with_identity): New function.
18497 (vect_expand_fold_left): Likewise.
18498 (vectorize_fold_left_reduction): Likewise.
18499 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18500 scalar phi in place for it. Check for target support and reject
18501 cases that would reassociate the operation. Defer the transform
18502 phase to vectorize_fold_left_reduction.
18503 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18504 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18505 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18507 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18509 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18510 call to ifc_temp_var.
18512 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18513 Alan Hayward <alan.hayward@arm.com>
18514 David Sherwood <david.sherwood@arm.com>
18516 * target.def (legitimize_address_displacement): Take the original
18517 offset as a poly_int.
18518 * targhooks.h (default_legitimize_address_displacement): Update
18520 * targhooks.c (default_legitimize_address_displacement): Likewise.
18521 * doc/tm.texi: Regenerate.
18522 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18523 as an argument, moving assert of ad->disp == ad->disp_term to...
18524 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18525 Try calling targetm.legitimize_address_displacement before expanding
18526 the address rather than afterwards, and adjust for the new interface.
18527 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18528 Match the new hook interface. Handle SVE addresses.
18529 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18530 new hook interface.
18532 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18534 * Makefile.in (OBJS): Add early-remat.o.
18535 * target.def (select_early_remat_modes): New hook.
18536 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18537 * doc/tm.texi: Regenerate.
18538 * targhooks.h (default_select_early_remat_modes): Declare.
18539 * targhooks.c (default_select_early_remat_modes): New function.
18540 * timevar.def (TV_EARLY_REMAT): New timevar.
18541 * passes.def (pass_early_remat): New pass.
18542 * tree-pass.h (make_pass_early_remat): Declare.
18543 * early-remat.c: New file.
18544 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18546 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18548 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18549 Alan Hayward <alan.hayward@arm.com>
18550 David Sherwood <david.sherwood@arm.com>
18552 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18553 vfm1 with a bound_epilog parameter.
18554 (vect_do_peeling): Update calls accordingly, and move the prologue
18555 call earlier in the function. Treat the base bound_epilog as 0 for
18556 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18557 this base when peeling for gaps.
18558 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18559 with fully-masked loops.
18560 (vect_estimate_min_profitable_iters): Handle the single peeled
18561 iteration in that case.
18563 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18564 Alan Hayward <alan.hayward@arm.com>
18565 David Sherwood <david.sherwood@arm.com>
18567 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18568 single-element interleaving even if the size is not a power of 2.
18569 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18570 accesses for single-element interleaving if the group size is
18573 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18574 Alan Hayward <alan.hayward@arm.com>
18575 David Sherwood <david.sherwood@arm.com>
18577 * doc/md.texi (fold_extract_last_@var{m}): Document.
18578 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18579 * optabs.def (fold_extract_last_optab): New optab.
18580 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18581 * internal-fn.c (fold_extract_direct): New macro.
18582 (expand_fold_extract_optab_fn): Likewise.
18583 (direct_fold_extract_optab_supported_p): Likewise.
18584 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18585 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18586 EXTRACT_LAST_REDUCTION.
18587 (get_initial_def_for_reduction): Do not create an initial vector
18588 for EXTRACT_LAST_REDUCTION reductions.
18589 (vectorizable_reduction): Leave the scalar phi in place for
18590 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18591 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18592 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18593 transform phase to vectorizable_condition.
18594 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18596 (vect_finish_stmt_generation): ...here.
18597 (vect_finish_replace_stmt): New function.
18598 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18599 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18601 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18603 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18604 Alan Hayward <alan.hayward@arm.com>
18605 David Sherwood <david.sherwood@arm.com>
18607 * doc/md.texi (extract_last_@var{m}): Document.
18608 * optabs.def (extract_last_optab): New optab.
18609 * internal-fn.def (EXTRACT_LAST): New internal function.
18610 * internal-fn.c (cond_unary_direct): New macro.
18611 (expand_cond_unary_optab_fn): Likewise.
18612 (direct_cond_unary_optab_supported_p): Likewise.
18613 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18614 loops using EXTRACT_LAST.
18615 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18616 (extract_last_<mode>): ...this optab.
18617 (vec_extract<mode><Vel>): Update accordingly.
18619 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18620 Alan Hayward <alan.hayward@arm.com>
18621 David Sherwood <david.sherwood@arm.com>
18623 * target.def (empty_mask_is_expensive): New hook.
18624 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18625 * doc/tm.texi: Regenerate.
18626 * targhooks.h (default_empty_mask_is_expensive): Declare.
18627 * targhooks.c (default_empty_mask_is_expensive): New function.
18628 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18629 if the target says that empty masks are expensive.
18630 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18632 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18634 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18635 Alan Hayward <alan.hayward@arm.com>
18636 David Sherwood <david.sherwood@arm.com>
18638 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18639 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18640 (vect_use_loop_mask_for_alignment_p): New function.
18641 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18642 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18643 niters_skip argument. Make sure that the first niters_skip elements
18644 of the first iteration are inactive.
18645 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18646 Update call to vect_set_loop_masks_directly.
18647 (get_misalign_in_elems): New function, split out from...
18648 (vect_gen_prolog_loop_niters): ...here.
18649 (vect_update_init_of_dr): Take a code argument that specifies whether
18650 the adjustment should be added or subtracted.
18651 (vect_update_init_of_drs): Likewise.
18652 (vect_prepare_for_masked_peels): New function.
18653 (vect_do_peeling): Skip prologue peeling if we're using a mask
18654 instead. Update call to vect_update_inits_of_drs.
18655 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18657 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18658 alignment. Do not include the number of peeled iterations in
18659 the minimum threshold in that case.
18660 (vectorizable_induction): Adjust the start value down by
18661 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18662 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18663 Take the number of skipped iterations into account when calculating
18665 * tree-vect-stmts.c (vect_gen_while_not): New function.
18667 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18668 Alan Hayward <alan.hayward@arm.com>
18669 David Sherwood <david.sherwood@arm.com>
18671 * doc/sourcebuild.texi (vect_fully_masked): Document.
18672 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18673 default value to 0.
18674 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18676 (vect_analyze_loop_2): ...here. Don't check the vectorization
18677 factor against the number of loop iterations if the loop is
18680 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18681 Alan Hayward <alan.hayward@arm.com>
18682 David Sherwood <david.sherwood@arm.com>
18684 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18685 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18686 (dump_groups): Update accordingly.
18687 (iv_use::mem_type): New member variable.
18688 (address_p): New function.
18689 (record_use): Add a mem_type argument and initialize the new
18691 (record_group_use): Add a mem_type argument. Use address_p.
18692 Remove obsolete null checks of base_object. Update call to record_use.
18693 (find_interesting_uses_op): Update call to record_group_use.
18694 (find_interesting_uses_cond): Likewise.
18695 (find_interesting_uses_address): Likewise.
18696 (get_mem_type_for_internal_fn): New function.
18697 (find_address_like_use): Likewise.
18698 (find_interesting_uses_stmt): Try find_address_like_use before
18699 calling find_interesting_uses_op.
18700 (addr_offset_valid_p): Use the iv mem_type field as the type
18701 of the addressed memory.
18702 (add_autoinc_candidates): Likewise.
18703 (get_address_cost): Likewise.
18704 (split_small_address_groups_p): Use address_p.
18705 (split_address_groups): Likewise.
18706 (add_iv_candidate_for_use): Likewise.
18707 (autoinc_possible_for_pair): Likewise.
18708 (rewrite_groups): Likewise.
18709 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18710 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18711 (get_alias_ptr_type_for_ptr_address): New function.
18712 (rewrite_use_address): Rewrite address uses in calls that were
18713 identified by find_address_like_use.
18715 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18716 Alan Hayward <alan.hayward@arm.com>
18717 David Sherwood <david.sherwood@arm.com>
18719 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18721 * gimple-expr.h (is_gimple_addressable: Likewise.
18722 * gimple-expr.c (is_gimple_address): Likewise.
18723 * internal-fn.c (expand_call_mem_ref): New function.
18724 (expand_mask_load_optab_fn): Use it.
18725 (expand_mask_store_optab_fn): Likewise.
18727 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18728 Alan Hayward <alan.hayward@arm.com>
18729 David Sherwood <david.sherwood@arm.com>
18731 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18732 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18733 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18734 (cond_umax@var{mode}): Document.
18735 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18736 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18737 (cond_umin_optab, cond_umax_optab): New optabs.
18738 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18739 (COND_IOR, COND_XOR): New internal functions.
18740 * internal-fn.h (get_conditional_internal_fn): Declare.
18741 * internal-fn.c (cond_binary_direct): New macro.
18742 (expand_cond_binary_optab_fn): Likewise.
18743 (direct_cond_binary_optab_supported_p): Likewise.
18744 (get_conditional_internal_fn): New function.
18745 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18746 Cope with reduction statements that are vectorized as calls rather
18748 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18749 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18750 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18751 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18752 (UNSPEC_COND_EOR): New unspecs.
18753 (optab): Add mappings for them.
18754 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18755 (sve_int_op, sve_fp_op): New int attributes.
18757 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18758 Alan Hayward <alan.hayward@arm.com>
18759 David Sherwood <david.sherwood@arm.com>
18761 * optabs.def (while_ult_optab): New optab.
18762 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18763 * internal-fn.def (WHILE_ULT): New internal function.
18764 * internal-fn.h (direct_internal_fn_supported_p): New override
18765 that takes two types as argument.
18766 * internal-fn.c (while_direct): New macro.
18767 (expand_while_optab_fn): New function.
18768 (convert_optab_supported_p): Likewise.
18769 (direct_while_optab_supported_p): New macro.
18770 * wide-int.h (wi::udiv_ceil): New function.
18771 * tree-vectorizer.h (rgroup_masks): New structure.
18772 (vec_loop_masks): New typedef.
18773 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18774 and fully_masked_p.
18775 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18776 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18777 (vect_max_vf): New function.
18778 (slpeel_make_loop_iterate_ntimes): Delete.
18779 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18780 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18781 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18782 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18783 internal-fn.h, stor-layout.h and optabs-query.h.
18784 (vect_set_loop_mask): New function.
18785 (add_preheader_seq): Likewise.
18786 (add_header_seq): Likewise.
18787 (interleave_supported_p): Likewise.
18788 (vect_maybe_permute_loop_masks): Likewise.
18789 (vect_set_loop_masks_directly): Likewise.
18790 (vect_set_loop_condition_masked): Likewise.
18791 (vect_set_loop_condition_unmasked): New function, split out from
18792 slpeel_make_loop_iterate_ntimes.
18793 (slpeel_make_loop_iterate_ntimes): Rename to..
18794 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18795 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18796 (vect_do_peeling): Update call accordingly.
18797 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18799 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18800 mask_compare_type, can_fully_mask_p and fully_masked_p.
18801 (release_vec_loop_masks): New function.
18802 (_loop_vec_info): Use it to free the loop masks.
18803 (can_produce_all_loop_masks_p): New function.
18804 (vect_get_max_nscalars_per_iter): Likewise.
18805 (vect_verify_full_masking): Likewise.
18806 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18807 retries, and free the mask rgroups before retrying. Check loop-wide
18808 reasons for disallowing fully-masked loops. Make the final decision
18809 about whether use a fully-masked loop or not.
18810 (vect_estimate_min_profitable_iters): Do not assume that peeling
18811 for the number of iterations will be needed for fully-masked loops.
18812 (vectorizable_reduction): Disable fully-masked loops.
18813 (vectorizable_live_operation): Likewise.
18814 (vect_halve_mask_nunits): New function.
18815 (vect_double_mask_nunits): Likewise.
18816 (vect_record_loop_mask): Likewise.
18817 (vect_get_loop_mask): Likewise.
18818 (vect_transform_loop): Handle the case in which the final loop
18819 iteration might handle a partial vector. Call vect_set_loop_condition
18820 instead of slpeel_make_loop_iterate_ntimes.
18821 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18822 (check_load_store_masking): New function.
18823 (prepare_load_store_mask): Likewise.
18824 (vectorizable_store): Handle fully-masked loops.
18825 (vectorizable_load): Likewise.
18826 (supportable_widening_operation): Use vect_halve_mask_nunits for
18828 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18829 (vect_gen_while): New function.
18830 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18831 (aarch64_uqdec<mode>): New insn.
18833 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18834 Alan Hayward <alan.hayward@arm.com>
18835 David Sherwood <david.sherwood@arm.com>
18837 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18838 (reduc_xor_scal_optab): New optabs.
18839 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18840 (reduc_xor_scal_@var{m}): Document.
18841 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18842 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18843 internal functions.
18844 * fold-const-call.c (fold_const_call): Handle them.
18845 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18846 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18847 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18848 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18849 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18850 (UNSPEC_XORV): New unspecs.
18851 (optab): Add entries for them.
18852 (BITWISEV): New int iterator.
18853 (bit_reduc_op): New int attributes.
18855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18856 Alan Hayward <alan.hayward@arm.com>
18857 David Sherwood <david.sherwood@arm.com>
18859 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18860 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18861 * optabs.def (vec_shl_insert_optab): New optab.
18862 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18863 (duplicate_and_interleave): Likewise.
18864 * tree-vect-loop.c: Include internal-fn.h.
18865 (neutral_op_for_slp_reduction): New function, split out from
18866 get_initial_defs_for_reduction.
18867 (get_initial_def_for_reduction): Handle option 2 for variable-length
18868 vectors by loading the neutral value into a vector and then shifting
18869 the initial value into element 0.
18870 (get_initial_defs_for_reduction): Replace the code argument with
18871 the neutral value calculated by neutral_op_for_slp_reduction.
18872 Use gimple_build_vector for constant-length vectors.
18873 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18874 but the first group_size elements have a neutral value.
18875 Use duplicate_and_interleave otherwise.
18876 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18877 Update call to get_initial_defs_for_reduction. Handle SLP
18878 reductions for variable-length vectors by creating one vector
18879 result for each scalar result, with the elements associated
18880 with other scalar results stubbed out with the neutral value.
18881 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18882 Require IFN_VEC_SHL_INSERT for double reductions on
18883 variable-length vectors, or SLP reductions that have
18884 a neutral value. Require can_duplicate_and_interleave_p
18885 support for variable-length unchained SLP reductions if there
18886 is no neutral value, such as for MIN/MAX reductions. Also require
18887 the number of vector elements to be a multiple of the number of
18888 SLP statements when doing variable-length unchained SLP reductions.
18889 Update call to vect_create_epilog_for_reduction.
18890 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18891 and remove initial values.
18892 (duplicate_and_interleave): Make public.
18893 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18894 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18896 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18897 Alan Hayward <alan.hayward@arm.com>
18898 David Sherwood <david.sherwood@arm.com>
18900 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18901 (can_duplicate_and_interleave_p): New function.
18902 (vect_get_and_check_slp_defs): Take the vector of statements
18903 rather than just the current one. Remove excess parentheses.
18904 Restriction rejectinon of vect_constant_def and vect_external_def
18905 for variable-length vectors to boolean types, or types for which
18906 can_duplicate_and_interleave_p is false.
18907 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18908 (duplicate_and_interleave): New function.
18909 (vect_get_constant_vectors): Use gimple_build_vector for
18910 constant-length vectors and suitable variable-length constant
18911 vectors. Use duplicate_and_interleave for other variable-length
18912 vectors. Don't defer the update when inserting new statements.
18914 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18915 Alan Hayward <alan.hayward@arm.com>
18916 David Sherwood <david.sherwood@arm.com>
18918 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18919 min_profitable_iters doesn't go negative.
18921 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18922 Alan Hayward <alan.hayward@arm.com>
18923 David Sherwood <david.sherwood@arm.com>
18925 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18926 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18927 * optabs.def (vec_mask_load_lanes_optab): New optab.
18928 (vec_mask_store_lanes_optab): Likewise.
18929 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18930 (MASK_STORE_LANES): Likewise.
18931 * internal-fn.c (mask_load_lanes_direct): New macro.
18932 (mask_store_lanes_direct): Likewise.
18933 (expand_mask_load_optab_fn): Handle masked operations.
18934 (expand_mask_load_lanes_optab_fn): New macro.
18935 (expand_mask_store_optab_fn): Handle masked operations.
18936 (expand_mask_store_lanes_optab_fn): New macro.
18937 (direct_mask_load_lanes_optab_supported_p): Likewise.
18938 (direct_mask_store_lanes_optab_supported_p): Likewise.
18939 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18941 (vect_load_lanes_supported): Likewise.
18942 * tree-vect-data-refs.c (strip_conversion): New function.
18943 (can_group_stmts_p): Likewise.
18944 (vect_analyze_data_ref_accesses): Use it instead of checking
18945 for a pair of assignments.
18946 (vect_store_lanes_supported): Take a masked_p parameter.
18947 (vect_load_lanes_supported): Likewise.
18948 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18949 vect_store_lanes_supported and vect_load_lanes_supported.
18950 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18951 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18952 parameter. Don't allow gaps for masked accesses.
18953 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18954 and vect_load_lanes_supported.
18955 (get_load_store_type): Take a masked_p parameter and update
18956 call to get_group_load_store_type.
18957 (vectorizable_store): Update call to get_load_store_type.
18958 Handle IFN_MASK_STORE_LANES.
18959 (vectorizable_load): Update call to get_load_store_type.
18960 Handle IFN_MASK_LOAD_LANES.
18962 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18963 Alan Hayward <alan.hayward@arm.com>
18964 David Sherwood <david.sherwood@arm.com>
18966 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18968 * config/aarch64/aarch64-protos.h
18969 (aarch64_sve_struct_memory_operand_p): Declare.
18970 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18971 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18972 (VPRED, vpred): Handle SVE structure modes.
18973 * config/aarch64/constraints.md (Utx): New constraint.
18974 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18975 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18976 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18977 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18978 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18979 structure modes. Split into pieces after RA.
18980 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18981 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18983 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18984 SVE structure modes.
18985 (aarch64_classify_address): Likewise.
18986 (sizetochar): Move earlier in file.
18987 (aarch64_print_operand): Handle SVE register lists.
18988 (aarch64_array_mode): New function.
18989 (aarch64_sve_struct_memory_operand_p): Likewise.
18990 (TARGET_ARRAY_MODE): Redefine.
18992 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18993 Alan Hayward <alan.hayward@arm.com>
18994 David Sherwood <david.sherwood@arm.com>
18996 * target.def (array_mode): New target hook.
18997 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18998 * doc/tm.texi: Regenerate.
18999 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19000 * hooks.c (hook_optmode_mode_uhwi_none): New function.
19001 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19002 targetm.array_mode.
19003 * stor-layout.c (mode_for_array): Likewise. Support polynomial
19006 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19007 Alan Hayward <alan.hayward@arm.com>
19008 David Sherwood <david.sherwood@arm.com>
19010 * fold-const.c (fold_binary_loc): Check the argument types
19011 rather than the result type when testing for a vector operation.
19013 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19015 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19016 * doc/tm.texi: Regenerate.
19018 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19019 Alan Hayward <alan.hayward@arm.com>
19020 David Sherwood <david.sherwood@arm.com>
19022 * doc/invoke.texi (-msve-vector-bits=): Document new option.
19023 (sve): Document new AArch64 extension.
19024 * doc/md.texi (w): Extend the description of the AArch64
19025 constraint to include SVE vectors.
19026 (Upl, Upa): Document new AArch64 predicate constraints.
19027 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19029 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19030 (msve-vector-bits=): New option.
19031 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19032 SVE when these are disabled.
19033 (sve): New extension.
19034 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19035 modes. Adjust their number of units based on aarch64_sve_vg.
19036 (MAX_BITSIZE_MODE_ANY_MODE): Define.
19037 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19038 aarch64_addr_query_type.
19039 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19040 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19041 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19042 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19043 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19044 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19045 (aarch64_simd_imm_zero_p): Delete.
19046 (aarch64_check_zero_based_sve_index_immediate): Declare.
19047 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19048 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19049 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19050 (aarch64_sve_float_mul_immediate_p): Likewise.
19051 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19052 rather than an rtx.
19053 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19054 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19055 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19056 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19057 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19058 (aarch64_regmode_natural_size): Likewise.
19059 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19060 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19062 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19063 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19064 for VG and the SVE predicate registers.
19065 (V_ALIASES): Add a "z"-prefixed alias.
19066 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19067 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19068 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19069 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19070 (REG_CLASS_NAMES): Add entries for them.
19071 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
19072 and the predicate registers.
19073 (aarch64_sve_vg): Declare.
19074 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19075 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19076 (REGMODE_NATURAL_SIZE): Define.
19077 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19079 * config/aarch64/aarch64.c: Include cfgrtl.h.
19080 (simd_immediate_info): Add a constructor for series vectors,
19081 and an associated step field.
19082 (aarch64_sve_vg): New variable.
19083 (aarch64_dbx_register_number): Handle VG and the predicate registers.
19084 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19085 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19086 (VEC_ANY_DATA, VEC_STRUCT): New constants.
19087 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19088 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19089 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19090 (aarch64_get_mask_mode): New functions.
19091 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19092 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19093 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
19094 predicate modes and predicate registers. Explicitly restrict
19095 GPRs to modes of 16 bytes or smaller. Only allow FP registers
19096 to store a vector mode if it is recognized by
19097 aarch64_classify_vector_mode.
19098 (aarch64_regmode_natural_size): New function.
19099 (aarch64_hard_regno_caller_save_mode): Return the original mode
19101 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19102 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19103 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19104 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19106 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
19107 does not overlap dest if the function is frame-related. Handle
19109 (aarch64_split_add_offset): New function.
19110 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19111 them aarch64_add_offset.
19112 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19113 and update call to aarch64_sub_sp.
19114 (aarch64_add_cfa_expression): New function.
19115 (aarch64_expand_prologue): Pass extra temporary registers to the
19116 functions above. Handle the case in which we need to emit new
19117 DW_CFA_expressions for registers that were originally saved
19118 relative to the stack pointer, but now have to be expressed
19119 relative to the frame pointer.
19120 (aarch64_output_mi_thunk): Pass extra temporary registers to the
19122 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
19123 IP0 and IP1 values for SVE frames.
19124 (aarch64_expand_vec_series): New function.
19125 (aarch64_expand_sve_widened_duplicate): Likewise.
19126 (aarch64_expand_sve_const_vector): Likewise.
19127 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19128 Handle SVE constants. Use emit_move_insn to move a force_const_mem
19129 into the register, rather than emitting a SET directly.
19130 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19131 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19132 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19133 (offset_9bit_signed_scaled_p): New functions.
19134 (aarch64_replicate_bitmask_imm): New function.
19135 (aarch64_bitmask_imm): Use it.
19136 (aarch64_cannot_force_const_mem): Reject expressions involving
19137 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
19138 (aarch64_classify_index): Handle SVE indices, by requiring
19139 a plain register index with a scale that matches the element size.
19140 (aarch64_classify_address): Handle SVE addresses. Assert that
19141 the mode of the address is VOIDmode or an integer mode.
19142 Update call to aarch64_classify_symbol.
19143 (aarch64_classify_symbolic_expression): Update call to
19144 aarch64_classify_symbol.
19145 (aarch64_const_vec_all_in_range_p): New function.
19146 (aarch64_print_vector_float_operand): Likewise.
19147 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
19148 "vN" for FP registers with SVE modes. Handle (const ...) vectors
19149 and the FP immediates 1.0 and 0.5.
19150 (aarch64_print_address_internal): Handle SVE addresses.
19151 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19152 (aarch64_regno_regclass): Handle predicate registers.
19153 (aarch64_secondary_reload): Handle big-endian reloads of SVE
19155 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19156 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19157 (aarch64_convert_sve_vector_bits): New function.
19158 (aarch64_override_options): Use it to handle -msve-vector-bits=.
19159 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19160 rather than an rtx.
19161 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19162 Handle SVE vector and predicate modes. Accept VL-based constants
19163 that need only one temporary register, and VL offsets that require
19164 no temporary registers.
19165 (aarch64_conditional_register_usage): Mark the predicate registers
19166 as fixed if SVE isn't available.
19167 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19168 Return true for SVE vector and predicate modes.
19169 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19170 rather than an unsigned int. Handle SVE modes.
19171 (aarch64_preferred_simd_mode): Update call accordingly. Handle
19173 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19175 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19176 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19177 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19178 (aarch64_sve_float_mul_immediate_p): New functions.
19179 (aarch64_sve_valid_immediate): New function.
19180 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19181 Explicitly reject structure modes. Check for INDEX constants.
19182 Handle PTRUE and PFALSE constants.
19183 (aarch64_check_zero_based_sve_index_immediate): New function.
19184 (aarch64_simd_imm_zero_p): Delete.
19185 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19186 vector modes. Accept constants in the range of CNT[BHWD].
19187 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19188 ask for an Advanced SIMD mode.
19189 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19190 (aarch64_simd_vector_alignment): Handle SVE predicates.
19191 (aarch64_vectorize_preferred_vector_alignment): New function.
19192 (aarch64_simd_vector_alignment_reachable): Use it instead of
19194 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19195 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19197 (MAX_VECT_LEN): Delete.
19198 (expand_vec_perm_d): Add a vec_flags field.
19199 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19200 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19201 (aarch64_evpc_ext): Don't apply a big-endian lane correction
19203 (aarch64_evpc_rev): Rename to...
19204 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
19205 (aarch64_evpc_rev_global): New function.
19206 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19207 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19209 (aarch64_evpc_sve_tbl): New function.
19210 (aarch64_expand_vec_perm_const_1): Update after rename of
19211 aarch64_evpc_rev. Handle SVE permutes too, trying
19212 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19213 than aarch64_evpc_tbl.
19214 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19215 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19216 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19217 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19218 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19219 (aarch64_expand_sve_vcond): New functions.
19220 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19221 of aarch64_vector_mode_p.
19222 (aarch64_dwarf_poly_indeterminate_value): New function.
19223 (aarch64_compute_pressure_classes): Likewise.
19224 (aarch64_can_change_mode_class): Likewise.
19225 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19226 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19227 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19228 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19229 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19230 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19231 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19232 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19234 (Dn, Dl, Dr): Accept const as well as const_vector.
19235 (Dz): Likewise. Compare against CONST0_RTX.
19236 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19237 of "vector" where appropriate.
19238 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19239 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19240 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19241 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19242 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19243 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19244 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19245 (v_int_equiv): Extend to SVE modes.
19246 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19248 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19249 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19250 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19251 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19252 (SVE_COND_FP_CMP): New int iterators.
19253 (perm_hilo): Handle the new unpack unspecs.
19254 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19256 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19257 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19258 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19259 (aarch64_equality_operator, aarch64_constant_vector_operand)
19260 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19261 (aarch64_sve_nonimmediate_operand): Likewise.
19262 (aarch64_sve_general_operand): Likewise.
19263 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19264 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19265 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19266 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19267 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19268 (aarch64_sve_float_arith_immediate): Likewise.
19269 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19270 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19271 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19272 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19273 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19274 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19275 (aarch64_sve_float_arith_operand): Likewise.
19276 (aarch64_sve_float_arith_with_sub_operand): Likewise.
19277 (aarch64_sve_float_mul_operand): Likewise.
19278 (aarch64_sve_vec_perm_operand): Likewise.
19279 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19280 (aarch64_mov_operand): Accept const_poly_int and const_vector.
19281 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19282 as well as const_vector.
19283 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19284 in file. Use CONST0_RTX and CONSTM1_RTX.
19285 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
19286 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19287 Use aarch64_simd_imm_zero.
19288 * config/aarch64/aarch64-sve.md: New file.
19289 * config/aarch64/aarch64.md: Include it.
19290 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19291 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19292 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19293 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19294 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19295 (sve): New attribute.
19296 (enabled): Disable instructions with the sve attribute unless
19298 (movqi, movhi): Pass CONST_POLY_INT operaneds through
19299 aarch64_expand_mov_immediate.
19300 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19301 CNT[BHSD] immediates.
19302 (movti): Split CONST_POLY_INT moves into two halves.
19303 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19304 Split additions that need a temporary here if the destination
19305 is the stack pointer.
19306 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19307 (*add<mode>3_poly_1): New instruction.
19308 (set_clobber_cc): New expander.
19310 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19312 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19313 parameter and use it instead of GET_MODE_SIZE (innermode). Use
19314 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19315 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19316 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
19317 Change innermode from fixed_mode_size to machine_mode.
19318 (simplify_subreg): Update call accordingly. Handle a constant-sized
19319 subreg of a variable-length CONST_VECTOR.
19321 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19322 Alan Hayward <alan.hayward@arm.com>
19323 David Sherwood <david.sherwood@arm.com>
19325 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19326 (add_offset_to_base): New function, split out from...
19327 (create_mem_ref): ...here. When handling a scale other than 1,
19328 check first whether the address is valid without the offset.
19329 Add it into the base if so, leaving the index and scale as-is.
19331 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19334 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19335 fold_for_warn before checking if arg2 is INTEGER_CST.
19337 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
19339 * config/rs6000/predicates.md (load_multiple_operation): Delete.
19340 (store_multiple_operation): Delete.
19341 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19342 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19343 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19344 guarded by TARGET_STRING.
19345 (rs6000_output_load_multiple): Delete.
19346 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19347 OPTION_MASK_STRING / TARGET_STRING handling.
19348 (print_operand) <'N', 'O'>: Add comment that these are unused now.
19349 (const rs6000_opt_masks) <"string">: Change mask to 0.
19350 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19351 (MASK_STRING): Delete.
19352 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19354 (load_multiple): Delete.
19361 (store_multiple): Delete.
19368 (movmemsi_8reg): Delete.
19369 (corresponding unnamed define_insn): Delete.
19370 (movmemsi_6reg): Delete.
19371 (corresponding unnamed define_insn): Delete.
19372 (movmemsi_4reg): Delete.
19373 (corresponding unnamed define_insn): Delete.
19374 (movmemsi_2reg): Delete.
19375 (corresponding unnamed define_insn): Delete.
19376 (movmemsi_1reg): Delete.
19377 (corresponding unnamed define_insn): Delete.
19378 * config/rs6000/rs6000.opt (mno-string): New.
19379 (mstring): Replace by deprecation warning stub.
19380 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19382 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19384 * regrename.c (regrename_do_replace): If replacing the same
19385 reg multiple times, try to reuse last created gen_raw_REG.
19388 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19389 main to workaround a bug in GDB.
19391 2018-01-12 Tom de Vries <tom@codesourcery.com>
19394 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19396 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
19398 PR rtl-optimization/80481
19399 * ira-color.c (get_cap_member): New function.
19400 (allocnos_conflict_by_live_ranges_p): Use it.
19401 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19402 (setup_slot_coalesced_allocno_live_ranges): Ditto.
19404 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
19407 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19408 (*saddl_se_1): Ditto.
19409 (*ssubsi_1): Ditto.
19410 (*ssubl_se_1): Ditto.
19412 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19414 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19415 rather than wi::to_widest for DR_INITs.
19416 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19417 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19418 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19420 (vect_analyze_group_access_1): Note that here.
19422 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19424 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19425 polynomial type sizes.
19427 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19429 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19430 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19431 (gimple_add_tmp_var): Likewise.
19433 2018-01-12 Martin Liska <mliska@suse.cz>
19435 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19436 (gimple_alloc_sizes): Likewise.
19437 (dump_gimple_statistics): Use PRIu64 in printf format.
19438 * gimple.h: Change uint64_t to int.
19440 2018-01-12 Martin Liska <mliska@suse.cz>
19442 * tree-core.h: Use uint64_t instead of int.
19443 * tree.c (tree_node_counts): Likewise.
19444 (tree_node_sizes): Likewise.
19445 (dump_tree_statistics): Use PRIu64 in printf format.
19447 2018-01-12 Martin Liska <mliska@suse.cz>
19449 * Makefile.in: As qsort_chk is implemented in vec.c, add
19450 vec.o to linkage of gencfn-macros.
19451 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19452 passing the info to record_node_allocation_statistics.
19453 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19455 * ggc-common.c (struct ggc_usage): Add operator== and use
19456 it in operator< and compare function.
19457 * mem-stats.h (struct mem_usage): Likewise.
19458 * vec.c (struct vec_usage): Remove operator< and compare
19459 function. Can be simply inherited.
19461 2018-01-12 Martin Jambor <mjambor@suse.cz>
19464 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19465 * tree-ssa-math-opts.c: Include domwalk.h.
19466 (convert_mult_to_fma_1): New function.
19467 (fma_transformation_info): New type.
19468 (fma_deferring_state): Likewise.
19469 (cancel_fma_deferring): New function.
19470 (result_of_phi): Likewise.
19471 (last_fma_candidate_feeds_initial_phi): Likewise.
19472 (convert_mult_to_fma): Added deferring logic, split actual
19473 transformation to convert_mult_to_fma_1.
19474 (math_opts_dom_walker): New type.
19475 (math_opts_dom_walker::after_dom_children): New method, body moved
19476 here from pass_optimize_widening_mul::execute, added deferring logic
19478 (pass_optimize_widening_mul::execute): Moved most of code to
19479 math_opts_dom_walker::after_dom_children.
19480 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19481 * config/i386/i386.c (ix86_option_override_internal): Added
19482 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19484 2018-01-12 Richard Biener <rguenther@suse.de>
19487 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19488 inline instance vars.
19490 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19493 * config/rx/rx.c (rx_is_restricted_memory_address):
19494 Handle SUBREG case.
19496 2018-01-12 Richard Biener <rguenther@suse.de>
19498 PR tree-optimization/80846
19499 * target.def (split_reduction): New target hook.
19500 * targhooks.c (default_split_reduction): New function.
19501 * targhooks.h (default_split_reduction): Declare.
19502 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19503 target requests first reduce vectors by combining low and high
19505 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19506 (get_vectype_for_scalar_type_and_size): Export.
19507 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19508 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19509 * doc/tm.texi: Regenerate.
19510 * config/i386/i386.c (ix86_split_reduction): Implement
19511 TARGET_VECTORIZE_SPLIT_REDUCTION.
19513 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19516 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19517 in PIC mode except for TARGET_VXWORKS_RTP.
19518 * config/sparc/sparc.c: Include cfgrtl.h.
19519 (TARGET_INIT_PIC_REG): Define.
19520 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19521 (sparc_pic_register_p): New predicate.
19522 (sparc_legitimate_address_p): Use it.
19523 (sparc_legitimize_pic_address): Likewise.
19524 (sparc_delegitimize_address): Likewise.
19525 (sparc_mode_dependent_address_p): Likewise.
19526 (gen_load_pcrel_sym): Remove 4th parameter.
19527 (load_got_register): Adjust call to above. Remove obsolete stuff.
19528 (sparc_expand_prologue): Do not call load_got_register here.
19529 (sparc_flat_expand_prologue): Likewise.
19530 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19531 (sparc_use_pseudo_pic_reg): New function.
19532 (sparc_init_pic_reg): Likewise.
19533 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19534 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19536 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19538 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19539 Add item for branch_cost.
19541 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19543 PR rtl-optimization/83565
19544 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19545 not extend the result to a larger mode for rotate operations.
19546 (num_sign_bit_copies1): Likewise.
19548 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19551 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19553 Use values-Xc.o for -pedantic.
19554 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19556 2018-01-12 Martin Liska <mliska@suse.cz>
19559 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19561 (possible_polymorphic_call_targets): Use it.
19562 (ipa_devirt): Likewise.
19564 2018-01-12 Martin Liska <mliska@suse.cz>
19566 * profile-count.h (enum profile_quality): Use 0 as invalid
19567 enum value of profile_quality.
19569 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19571 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19572 -mext-string options.
19574 2018-01-12 Richard Biener <rguenther@suse.de>
19576 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19577 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19578 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19580 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19582 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19584 * configure.ac (--with-long-double-format): Add support for the
19585 configuration option to change the default long double format on
19587 * config.gcc (powerpc*-linux*-*): Likewise.
19588 * configure: Regenerate.
19589 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19590 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19591 used without modification.
19593 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19595 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19596 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19597 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19598 MISC_BUILTIN_SPEC_BARRIER.
19599 (rs6000_init_builtins): Likewise.
19600 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19602 (speculation_barrier): New define_insn.
19603 * doc/extend.texi: Document __builtin_speculation_barrier.
19605 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19608 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19609 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19610 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19612 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19613 integral modes instead of "ss" and "sd".
19614 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19615 vectors with 32-bit and 64-bit elements.
19616 (vecdupssescalarmodesuffix): New mode attribute.
19617 (vec_dup<mode>): Use it.
19619 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19622 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19623 frame if argument is passed on stack.
19625 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19628 * ree.c (combine_reaching_defs): Optimize also
19629 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19630 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19632 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19634 PR middle-end/83189
19635 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19637 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19639 PR middle-end/83718
19640 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19641 after they are computed.
19643 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19645 PR tree-optimization/83695
19646 * gimple-loop-linterchange.cc
19647 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19648 reset cached scev information after interchange.
19649 (pass_linterchange::execute): Remove call to scev_reset_htab.
19651 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19653 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19654 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19655 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19656 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19657 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19658 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19659 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19660 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19661 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19662 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19663 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19664 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19665 (V_lane_reg): Likewise.
19666 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19668 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19669 (vfmal_lane_low<mode>_intrinsic,
19670 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19671 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19672 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19673 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19674 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19675 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19677 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19679 * config/arm/arm-cpus.in (fp16fml): New feature.
19680 (ALL_SIMD): Add fp16fml.
19681 (armv8.2-a): Add fp16fml as an option.
19682 (armv8.3-a): Likewise.
19683 (armv8.4-a): Add fp16fml as part of fp16.
19684 * config/arm/arm.h (TARGET_FP16FML): Define.
19685 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19687 * config/arm/arm-modes.def (V2HF): Define.
19688 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19689 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19690 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19691 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19692 vfmsl_low, vfmsl_high): New set of builtins.
19693 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19694 (vfml_op): New code attribute.
19695 (VFMLHALVES): New int iterator.
19696 (VFML, VFMLSEL): New mode attributes.
19697 (V_reg): Define mapping for V2HF.
19698 (V_hi, V_lo): New mode attributes.
19699 (VF_constraint): Likewise.
19700 (vfml_half, vfml_half_selector): New int attributes.
19701 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19703 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19704 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19706 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19707 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19708 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19709 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19711 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19712 Document new effective target and option set.
19714 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19716 * config/arm/arm-cpus.in (armv8_4): New feature.
19717 (ARMv8_4a): New fgroup.
19718 (armv8.4-a): New arch.
19719 * config/arm/arm-tables.opt: Regenerate.
19720 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19721 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19722 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19723 Add matching rules for -march=armv8.4-a and extensions.
19724 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19726 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19729 * config/rx/rx.md (BW): New mode attribute.
19730 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19732 2018-01-11 Richard Biener <rguenther@suse.de>
19734 PR tree-optimization/83435
19735 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19736 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19737 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19739 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19740 Alan Hayward <alan.hayward@arm.com>
19741 David Sherwood <david.sherwood@arm.com>
19743 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19745 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19746 (aarch64_print_address_internal): Use it to check for a zero offset.
19748 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19749 Alan Hayward <alan.hayward@arm.com>
19750 David Sherwood <david.sherwood@arm.com>
19752 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19753 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19754 Return a poly_int64 rather than a HOST_WIDE_INT.
19755 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19756 rather than a HOST_WIDE_INT.
19757 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19758 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19759 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19760 final_offset from HOST_WIDE_INT to poly_int64.
19761 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19762 to_constant when getting the number of units in an Advanced SIMD
19764 (aarch64_builtin_vectorized_function): Check for a constant number
19766 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19768 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19769 attribute instead of GET_MODE_NUNITS.
19770 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19771 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19772 GET_MODE_SIZE for fixed-size registers.
19773 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19774 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19775 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19776 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19777 (aarch64_print_operand, aarch64_print_address_internal)
19778 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19779 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19780 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19781 Handle polynomial GET_MODE_SIZE.
19782 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19783 wider than SImode without modification.
19784 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19785 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19786 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19787 passing and returning SVE modes.
19788 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19789 rather than GEN_INT.
19790 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19791 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19792 (aarch64_allocate_and_probe_stack_space): Likewise.
19793 (aarch64_layout_frame): Cope with polynomial offsets.
19794 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19795 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19796 polynomial offsets.
19797 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19798 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19799 poly_int64 rather than a HOST_WIDE_INT.
19800 (aarch64_get_separate_components, aarch64_process_components)
19801 (aarch64_expand_prologue, aarch64_expand_epilogue)
19802 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19803 (aarch64_anchor_offset): New function, split out from...
19804 (aarch64_legitimize_address): ...here.
19805 (aarch64_builtin_vectorization_cost): Handle polynomial
19806 TYPE_VECTOR_SUBPARTS.
19807 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19809 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19810 number of elements from the PARALLEL rather than the mode.
19811 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19812 rather than GET_MODE_BITSIZE.
19813 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19814 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19815 (aarch64_expand_vec_perm_const_1): Handle polynomial
19816 d->perm.length () and d->perm elements.
19817 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19818 Apply to_constant to d->perm elements.
19819 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19820 polynomial CONST_VECTOR_NUNITS.
19821 (aarch64_move_pointer): Take amount as a poly_int64 rather
19823 (aarch64_progress_pointer): Avoid temporary variable.
19824 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19825 the mode attribute instead of GET_MODE.
19827 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19828 Alan Hayward <alan.hayward@arm.com>
19829 David Sherwood <david.sherwood@arm.com>
19831 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19832 x exists before using it.
19833 (aarch64_add_constant_internal): Rename to...
19834 (aarch64_add_offset_1): ...this. Replace regnum with separate
19835 src and dest rtxes. Handle the case in which they're different,
19836 including when the offset is zero. Replace scratchreg with an rtx.
19837 Use 2 additions if there is no spare register into which we can
19838 move a 16-bit constant.
19839 (aarch64_add_constant): Delete.
19840 (aarch64_add_offset): Replace reg with separate src and dest
19841 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19842 Use aarch64_add_offset_1.
19843 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19844 an rtx rather than an int. Take the delta as a poly_int64
19845 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19846 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19847 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19848 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19849 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19850 and aarch64_add_sp.
19851 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19852 aarch64_add_constant.
19854 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19856 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19857 Use scalar_float_mode.
19859 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19861 * config/aarch64/aarch64-simd.md
19862 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19863 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19864 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19865 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19866 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19867 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19868 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19869 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19870 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19871 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19873 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19876 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19877 targ_options->x_arm_arch_string is non NULL.
19879 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19881 * config/aarch64/aarch64.h
19882 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19884 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19887 * expmed.c (emit_store_flag_force): Swap if const op0
19888 and change VOIDmode to mode of op0.
19890 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19892 PR rtl-optimization/83761
19893 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19894 than bytes to mode_for_size.
19896 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19898 PR middle-end/83189
19899 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19900 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19903 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19905 PR middle-end/83575
19906 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19907 when in layout mode.
19908 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19909 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19912 2018-01-10 Michael Collison <michael.collison@arm.com>
19914 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19915 * config/aarch64/aarch64-option-extension.def: Add
19916 AARCH64_OPT_EXTENSION of 'fp16fml'.
19917 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19918 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19919 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19920 * config/aarch64/constraints.md (Ui7): New constraint.
19921 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19922 (VFMLA_SEL_W): Ditto.
19925 (VFMLA16_LOW): New int iterator.
19926 (VFMLA16_HIGH): Ditto.
19927 (UNSPEC_FMLAL): New unspec.
19928 (UNSPEC_FMLSL): Ditto.
19929 (UNSPEC_FMLAL2): Ditto.
19930 (UNSPEC_FMLSL2): Ditto.
19931 (f16mac): New code attribute.
19932 * config/aarch64/aarch64-simd-builtins.def
19933 (aarch64_fmlal_lowv2sf): Ditto.
19934 (aarch64_fmlsl_lowv2sf): Ditto.
19935 (aarch64_fmlalq_lowv4sf): Ditto.
19936 (aarch64_fmlslq_lowv4sf): Ditto.
19937 (aarch64_fmlal_highv2sf): Ditto.
19938 (aarch64_fmlsl_highv2sf): Ditto.
19939 (aarch64_fmlalq_highv4sf): Ditto.
19940 (aarch64_fmlslq_highv4sf): Ditto.
19941 (aarch64_fmlal_lane_lowv2sf): Ditto.
19942 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19943 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19944 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19945 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19946 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19947 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19948 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19949 (aarch64_fmlal_lane_highv2sf): Ditto.
19950 (aarch64_fmlsl_lane_highv2sf): Ditto.
19951 (aarch64_fmlal_laneq_highv2sf): Ditto.
19952 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19953 (aarch64_fmlalq_lane_highv4sf): Ditto.
19954 (aarch64_fmlsl_lane_highv4sf): Ditto.
19955 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19956 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19957 * config/aarch64/aarch64-simd.md:
19958 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19959 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19960 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19961 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19962 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19963 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19964 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19965 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19966 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19967 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19968 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19969 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19970 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19971 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19972 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19973 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19974 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19975 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19976 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19977 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19978 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19979 (vfmlsl_low_u32): Ditto.
19980 (vfmlalq_low_u32): Ditto.
19981 (vfmlslq_low_u32): Ditto.
19982 (vfmlal_high_u32): Ditto.
19983 (vfmlsl_high_u32): Ditto.
19984 (vfmlalq_high_u32): Ditto.
19985 (vfmlslq_high_u32): Ditto.
19986 (vfmlal_lane_low_u32): Ditto.
19987 (vfmlsl_lane_low_u32): Ditto.
19988 (vfmlal_laneq_low_u32): Ditto.
19989 (vfmlsl_laneq_low_u32): Ditto.
19990 (vfmlalq_lane_low_u32): Ditto.
19991 (vfmlslq_lane_low_u32): Ditto.
19992 (vfmlalq_laneq_low_u32): Ditto.
19993 (vfmlslq_laneq_low_u32): Ditto.
19994 (vfmlal_lane_high_u32): Ditto.
19995 (vfmlsl_lane_high_u32): Ditto.
19996 (vfmlal_laneq_high_u32): Ditto.
19997 (vfmlsl_laneq_high_u32): Ditto.
19998 (vfmlalq_lane_high_u32): Ditto.
19999 (vfmlslq_lane_high_u32): Ditto.
20000 (vfmlalq_laneq_high_u32): Ditto.
20001 (vfmlslq_laneq_high_u32): Ditto.
20002 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20003 (AARCH64_FL_FOR_ARCH8_4): New.
20004 (AARCH64_ISA_F16FML): New ISA flag.
20005 (TARGET_F16FML): New feature flag for fp16fml.
20006 (doc/invoke.texi): Document new fp16fml option.
20008 2018-01-10 Michael Collison <michael.collison@arm.com>
20010 * config/aarch64/aarch64-builtins.c:
20011 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20012 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20013 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20014 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20015 (AARCH64_ISA_SHA3): New ISA flag.
20016 (TARGET_SHA3): New feature flag for sha3.
20017 * config/aarch64/iterators.md (sha512_op): New int attribute.
20018 (CRYPTO_SHA512): New int iterator.
20019 (UNSPEC_SHA512H): New unspec.
20020 (UNSPEC_SHA512H2): Ditto.
20021 (UNSPEC_SHA512SU0): Ditto.
20022 (UNSPEC_SHA512SU1): Ditto.
20023 * config/aarch64/aarch64-simd-builtins.def
20024 (aarch64_crypto_sha512hqv2di): New builtin.
20025 (aarch64_crypto_sha512h2qv2di): Ditto.
20026 (aarch64_crypto_sha512su0qv2di): Ditto.
20027 (aarch64_crypto_sha512su1qv2di): Ditto.
20028 (aarch64_eor3qv8hi): Ditto.
20029 (aarch64_rax1qv2di): Ditto.
20030 (aarch64_xarqv2di): Ditto.
20031 (aarch64_bcaxqv8hi): Ditto.
20032 * config/aarch64/aarch64-simd.md:
20033 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20034 (aarch64_crypto_sha512su0qv2di): Ditto.
20035 (aarch64_crypto_sha512su1qv2di): Ditto.
20036 (aarch64_eor3qv8hi): Ditto.
20037 (aarch64_rax1qv2di): Ditto.
20038 (aarch64_xarqv2di): Ditto.
20039 (aarch64_bcaxqv8hi): Ditto.
20040 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20041 (vsha512h2q_u64): Ditto.
20042 (vsha512su0q_u64): Ditto.
20043 (vsha512su1q_u64): Ditto.
20044 (veor3q_u16): Ditto.
20045 (vrax1q_u64): Ditto.
20046 (vxarq_u64): Ditto.
20047 (vbcaxq_u16): Ditto.
20048 * config/arm/types.md (crypto_sha512): New type attribute.
20049 (crypto_sha3): Ditto.
20050 (doc/invoke.texi): Document new sha3 option.
20052 2018-01-10 Michael Collison <michael.collison@arm.com>
20054 * config/aarch64/aarch64-builtins.c:
20055 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20056 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20057 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20058 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20059 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20060 (AARCH64_ISA_SM4): New ISA flag.
20061 (TARGET_SM4): New feature flag for sm4.
20062 * config/aarch64/aarch64-simd-builtins.def
20063 (aarch64_sm3ss1qv4si): Ditto.
20064 (aarch64_sm3tt1aq4si): Ditto.
20065 (aarch64_sm3tt1bq4si): Ditto.
20066 (aarch64_sm3tt2aq4si): Ditto.
20067 (aarch64_sm3tt2bq4si): Ditto.
20068 (aarch64_sm3partw1qv4si): Ditto.
20069 (aarch64_sm3partw2qv4si): Ditto.
20070 (aarch64_sm4eqv4si): Ditto.
20071 (aarch64_sm4ekeyqv4si): Ditto.
20072 * config/aarch64/aarch64-simd.md:
20073 (aarch64_sm3ss1qv4si): Ditto.
20074 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20075 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20076 (aarch64_sm4eqv4si): Ditto.
20077 (aarch64_sm4ekeyqv4si): Ditto.
20078 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20079 (sm3part_op): Ditto.
20080 (CRYPTO_SM3TT): Ditto.
20081 (CRYPTO_SM3PART): Ditto.
20082 (UNSPEC_SM3SS1): New unspec.
20083 (UNSPEC_SM3TT1A): Ditto.
20084 (UNSPEC_SM3TT1B): Ditto.
20085 (UNSPEC_SM3TT2A): Ditto.
20086 (UNSPEC_SM3TT2B): Ditto.
20087 (UNSPEC_SM3PARTW1): Ditto.
20088 (UNSPEC_SM3PARTW2): Ditto.
20089 (UNSPEC_SM4E): Ditto.
20090 (UNSPEC_SM4EKEY): Ditto.
20091 * config/aarch64/constraints.md (Ui2): New constraint.
20092 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20093 * config/arm/types.md (crypto_sm3): New type attribute.
20094 (crypto_sm4): Ditto.
20095 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20096 (vsm3tt1aq_u32): Ditto.
20097 (vsm3tt1bq_u32): Ditto.
20098 (vsm3tt2aq_u32): Ditto.
20099 (vsm3tt2bq_u32): Ditto.
20100 (vsm3partw1q_u32): Ditto.
20101 (vsm3partw2q_u32): Ditto.
20102 (vsm4eq_u32): Ditto.
20103 (vsm4ekeyq_u32): Ditto.
20104 (doc/invoke.texi): Document new sm4 option.
20106 2018-01-10 Michael Collison <michael.collison@arm.com>
20108 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20109 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20110 (AARCH64_FL_FOR_ARCH8_4): New.
20111 (AARCH64_FL_V8_4): New flag.
20112 (doc/invoke.texi): Document new armv8.4-a option.
20114 2018-01-10 Michael Collison <michael.collison@arm.com>
20116 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20117 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20118 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20119 * config/aarch64/aarch64-option-extension.def: Add
20120 AARCH64_OPT_EXTENSION of 'sha2'.
20121 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20122 (crypto): Disable sha2 and aes if crypto disabled.
20123 (crypto): Enable aes and sha2 if enabled.
20124 (simd): Disable sha2 and aes if simd disabled.
20125 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20127 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20128 (TARGET_SHA2): New feature flag for sha2.
20129 (TARGET_AES): New feature flag for aes.
20130 * config/aarch64/aarch64-simd.md:
20131 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20132 conditional on TARGET_AES.
20133 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20134 (aarch64_crypto_sha1hsi): Make pattern conditional
20136 (aarch64_crypto_sha1hv4si): Ditto.
20137 (aarch64_be_crypto_sha1hv4si): Ditto.
20138 (aarch64_crypto_sha1su1v4si): Ditto.
20139 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20140 (aarch64_crypto_sha1su0v4si): Ditto.
20141 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20142 (aarch64_crypto_sha256su0v4si): Ditto.
20143 (aarch64_crypto_sha256su1v4si): Ditto.
20144 (doc/invoke.texi): Document new aes and sha2 options.
20146 2018-01-10 Martin Sebor <msebor@redhat.com>
20148 PR tree-optimization/83781
20149 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20152 2018-01-11 Martin Sebor <msebor@gmail.com>
20153 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20155 PR tree-optimization/83501
20156 PR tree-optimization/81703
20158 * tree-ssa-strlen.c (get_string_cst): Rename...
20159 (get_string_len): ...to this. Handle global constants.
20160 (handle_char_store): Adjust.
20162 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
20163 Jim Wilson <jimw@sifive.com>
20165 * config/riscv/riscv-protos.h (riscv_output_return): New.
20166 * config/riscv/riscv.c (struct machine_function): New naked_p field.
20167 (riscv_attribute_table, riscv_output_return),
20168 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20169 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20170 (riscv_compute_frame_info): Only compute frame->mask if not a naked
20172 (riscv_expand_prologue): Add early return for naked function.
20173 (riscv_expand_epilogue): Likewise.
20174 (riscv_function_ok_for_sibcall): Return false for naked function.
20175 (riscv_set_current_function): New.
20176 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20177 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20178 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20179 * doc/extend.texi (RISC-V Function Attributes): New.
20181 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20183 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20184 check for 128-bit long double before checking TCmode.
20185 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20186 128-bit long doubles before checking TFmode or TCmode.
20187 (FLOAT128_IBM_P): Likewise.
20189 2018-01-10 Martin Sebor <msebor@redhat.com>
20191 PR tree-optimization/83671
20192 * builtins.c (c_strlen): Unconditionally return zero for the empty
20194 Use -Warray-bounds for warnings.
20195 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20196 for non-constant array indices with COMPONENT_REF, arrays of
20197 arrays, and pointers to arrays.
20198 (gimple_fold_builtin_strlen): Determine and set length range for
20199 non-constant character arrays.
20201 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
20203 PR middle-end/81897
20204 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20207 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
20209 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20211 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20214 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20215 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20216 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20217 indexed_or_indirect_operand predicate.
20218 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20219 (*vsx_le_perm_load_v8hi): Likewise.
20220 (*vsx_le_perm_load_v16qi): Likewise.
20221 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20222 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20223 (*vsx_le_perm_store_v8hi): Likewise.
20224 (*vsx_le_perm_store_v16qi): Likewise.
20225 (eight unnamed splitters): Likewise.
20227 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20229 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20230 * config/rs6000/emmintrin.h: Likewise.
20231 * config/rs6000/mmintrin.h: Likewise.
20232 * config/rs6000/xmmintrin.h: Likewise.
20234 2018-01-10 David Malcolm <dmalcolm@redhat.com>
20237 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20239 * tree.c (tree_nop_conversion): Return true for location wrapper
20241 (maybe_wrap_with_location): New function.
20242 (selftest::check_strip_nops): New function.
20243 (selftest::test_location_wrappers): New function.
20244 (selftest::tree_c_tests): Call it.
20245 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20246 (maybe_wrap_with_location): New decl.
20247 (EXPR_LOCATION_WRAPPER_P): New macro.
20248 (location_wrapper_p): New inline function.
20249 (tree_strip_any_location_wrapper): New inline function.
20251 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
20254 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20255 stack_realign_offset for the largest alignment of stack slot
20257 (ix86_find_max_used_stack_alignment): New function.
20258 (ix86_finalize_stack_frame_flags): Use it. Set
20259 max_used_stack_alignment if we don't realign stack.
20260 * config/i386/i386.h (machine_function): Add
20261 max_used_stack_alignment.
20263 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
20265 * config/arm/arm.opt (-mbranch-cost): New option.
20266 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20269 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
20272 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20273 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20275 2018-01-10 Richard Biener <rguenther@suse.de>
20278 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20279 early out so it also covers the case where we have a non-NULL
20282 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20284 PR tree-optimization/83753
20285 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20286 for non-strided grouped accesses if the number of elements is 1.
20288 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20291 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20292 * i386.h (TARGET_USE_GATHER): Define.
20293 * x86-tune.def (X86_TUNE_USE_GATHER): New.
20295 2018-01-10 Martin Liska <mliska@suse.cz>
20298 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20299 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20301 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20302 CLEANUP_NO_PARTITIONING is not set.
20304 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20306 * doc/rtl.texi: Remove documentation of (const ...) wrappers
20307 for vectors, as a partial revert of r254296.
20308 * rtl.h (const_vec_p): Delete.
20309 (const_vec_duplicate_p): Don't test for vector CONSTs.
20310 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20311 * expmed.c (make_tree): Likewise.
20314 * common.md (E, F): Use CONSTANT_P instead of checking for
20316 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20317 checking for CONST_VECTOR.
20319 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20321 PR middle-end/83575
20322 * predict.c (force_edge_cold): Handle in more sane way edges
20323 with no prediction.
20325 2018-01-09 Carl Love <cel@us.ibm.com>
20327 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20329 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20330 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20331 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20332 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
20333 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20334 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
20335 * config/rs6000/rs6000-protos.h: Add extern defition for
20336 rs6000_generate_float2_double_code.
20337 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20339 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20340 (float2_v2df): Add define_expand.
20342 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
20345 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20346 op_mode in the force_to_mode call.
20348 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20350 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20351 instead of checking each element individually.
20352 (aarch64_evpc_uzp): Likewise.
20353 (aarch64_evpc_zip): Likewise.
20354 (aarch64_evpc_ext): Likewise.
20355 (aarch64_evpc_rev): Likewise.
20356 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20357 instead of checking each element individually. Return true without
20359 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20360 whether all selected elements come from the same input, instead of
20361 checking each element individually. Remove calls to gen_rtx_REG,
20362 start_sequence and end_sequence and instead assert that no rtl is
20365 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20367 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20368 order of HIGH and CONST checks.
20370 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20372 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20373 if the destination isn't an SSA_NAME.
20375 2018-01-09 Richard Biener <rguenther@suse.de>
20377 PR tree-optimization/83668
20378 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20380 (canonicalize_loop_form): ... here, renamed from ...
20381 (canonicalize_loop_closed_ssa_form): ... this and amended to
20382 swap successor edges for loop exit blocks to make us use
20383 the RPO order we need for initial schedule generation.
20385 2018-01-09 Joseph Myers <joseph@codesourcery.com>
20387 PR tree-optimization/64811
20388 * match.pd: When optimizing comparisons with Inf, avoid
20389 introducing or losing exceptions from comparisons with NaN.
20391 2018-01-09 Martin Liska <mliska@suse.cz>
20394 * asan.c (shadow_mem_size): Add gcc_assert.
20396 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
20398 Don't save registers in main().
20401 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20402 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20403 * config/avr/avr.c (avr_set_current_function): Don't error if
20404 naked, OS_task or OS_main are specified at the same time.
20405 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20407 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20409 * common/config/avr/avr-common.c (avr_option_optimization_table):
20410 Switch on -mmain-is-OS_task for optimizing compilations.
20412 2018-01-09 Richard Biener <rguenther@suse.de>
20414 PR tree-optimization/83572
20415 * graphite.c: Include cfganal.h.
20416 (graphite_transform_loops): Connect infinite loops to exit
20417 and remove fake edges at the end.
20419 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20421 * ipa-inline.c (edge_badness): Revert accidental checkin.
20423 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20426 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20427 symbols; not inline clones.
20429 2018-01-09 Jakub Jelinek <jakub@redhat.com>
20432 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20433 hard registers. Formatting fixes.
20435 PR preprocessor/83722
20436 * gcc.c (try_generate_repro): Pass
20437 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20438 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20441 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20442 Kito Cheng <kito.cheng@gmail.com>
20444 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20445 (riscv_leaf_function_p): Delete.
20446 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20448 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20450 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20452 (do_ifelse): New function.
20453 (do_isel): New function.
20454 (do_sub3): New function.
20455 (do_add3): New function.
20456 (do_load_mask_compare): New function.
20457 (do_overlap_load_compare): New function.
20458 (expand_compare_loop): New function.
20459 (expand_block_compare): Call expand_compare_loop() when appropriate.
20460 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20461 option description.
20462 (-mblock-compare-inline-loop-limit): New option.
20464 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20467 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20468 Reverse order of second and third operands in first alternative.
20469 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20470 of first and second elements in UNSPEC_VPERMR vector.
20471 (altivec_expand_vec_perm_le): Likewise.
20473 2018-01-08 Jeff Law <law@redhat.com>
20475 PR rtl-optimizatin/81308
20476 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20477 (process_switch): If group_case_labels makes a change, then set
20479 (pass_convert_switch::execute): If a switch is converted, then
20480 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20482 PR rtl-optimization/81308
20483 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20486 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20488 PR target/83663 - Revert r255946
20489 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20490 generation for cases where splatting a value is not useful.
20491 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20492 across a vec_duplicate and a paradoxical subreg forming a vector
20493 mode to a vec_concat.
20495 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20497 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20498 -march=armv8.3-a variants.
20499 * config/arm/t-multilib: Likewise.
20500 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20502 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20504 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20506 (cceq_ior_compare_complement): Give it a name so I can use it, and
20507 change boolean_or_operator predicate to boolean_operator so it can
20508 be used to generate a crand.
20509 (eqne): New code iterator.
20510 (bd/bd_neg): New code_attrs.
20511 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20512 a single define_insn.
20513 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20514 decrement (bdnzt/bdnzf/bdzt/bdzf).
20515 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20516 with the new names of the branch decrement patterns, and added the
20517 names of the branch decrement conditional patterns.
20519 2018-01-08 Richard Biener <rguenther@suse.de>
20521 PR tree-optimization/83563
20522 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20525 2018-01-08 Richard Biener <rguenther@suse.de>
20527 PR middle-end/83713
20528 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20530 2018-01-08 Richard Biener <rguenther@suse.de>
20532 PR tree-optimization/83685
20533 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20534 references to abnormals.
20536 2018-01-08 Richard Biener <rguenther@suse.de>
20539 * dwarf2out.c (output_indirect_strings): Handle empty
20540 skeleton_debug_str_hash.
20541 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20543 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20545 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20546 (emit_store_direct): Likewise.
20547 (arc_trampoline_adjust_address): Likewise.
20548 (arc_asm_trampoline_template): New function.
20549 (arc_initialize_trampoline): Use asm_trampoline_template.
20550 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20551 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20552 * config/arc/arc.md (flush_icache): Delete pattern.
20554 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20556 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20557 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20560 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20563 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20564 by not USED_FOR_TARGET.
20565 (make_pass_resolve_sw_modes): Likewise.
20567 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20569 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20572 2018-01-08 Richard Biener <rguenther@suse.de>
20574 PR middle-end/83580
20575 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20577 2018-01-08 Richard Biener <rguenther@suse.de>
20579 PR middle-end/83517
20580 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20582 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20584 PR middle-end/81897
20585 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20586 basic blocks with a small number of successors.
20587 (convert_control_dep_chain_into_preds): Improve handling of
20589 (dump_predicates): Split apart into...
20590 (dump_pred_chain): ...here...
20591 (dump_pred_info): ...and here.
20592 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20593 (can_chain_union_be_invalidated_p): Improve check for invalidation
20595 (uninit_uses_cannot_happen): Avoid unnecessary if
20596 convert_control_dep_chain_into_preds yielded nothing.
20598 2018-01-06 Martin Sebor <msebor@redhat.com>
20600 PR tree-optimization/83640
20601 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20602 subtracting negative offset from size.
20603 (builtin_access::overlap): Adjust offset bounds of the access to fall
20604 within the size of the object if possible.
20606 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20608 PR rtl-optimization/83699
20609 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20610 extract_bit_field_as_subreg to cases in which the extracted
20611 value is also a vector.
20613 * lra-constraints.c (process_alt_operands): Test for the equivalence
20614 substitutions when detecting a possible reload cycle.
20616 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20619 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20620 by default if flag_selective_schedling{,2}. Formatting fixes.
20622 PR rtl-optimization/83682
20623 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20624 if it has non-VECTOR_MODE element mode.
20625 (vec_duplicate_p): Likewise.
20627 PR middle-end/83694
20628 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20629 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20631 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20634 * config/i386/i386-builtin.def
20635 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20636 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20637 Require also OPTION_MASK_ISA_AVX512F in addition to
20638 OPTION_MASK_ISA_GFNI.
20639 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20640 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20641 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20642 to OPTION_MASK_ISA_GFNI.
20643 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20644 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20645 OPTION_MASK_ISA_AVX512BW.
20646 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20647 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20648 addition to OPTION_MASK_ISA_GFNI.
20649 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20650 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20651 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20652 to OPTION_MASK_ISA_GFNI.
20653 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20654 a requirement for all ISAs rather than any of them with a few
20656 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20658 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20659 bitmasks to be enabled with 3 exceptions, instead of requiring any
20660 enabled ISA with lots of exceptions.
20661 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20662 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20663 Change avx512bw in isa attribute to avx512f.
20664 * config/i386/sgxintrin.h: Add license boilerplate.
20665 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20666 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20667 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20668 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20670 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20671 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20672 temporarily sse2 rather than sse if not enabled already.
20675 * config/i386/sse.md (VI248_VLBW): Rename to ...
20676 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20677 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20678 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20679 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20680 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20681 mode iterator instead of VI248_VLBW.
20683 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20685 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20686 (record_modified): Skip clobbers; add debug output.
20687 (param_change_prob): Use sreal frequencies.
20689 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20691 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20692 punt for user-aligned variables.
20694 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20696 * tree-chrec.c (chrec_contains_symbols): Return true for
20699 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20702 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20703 of (x|y) == x for BICS pattern.
20705 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20707 PR tree-optimization/83605
20708 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20709 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20712 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20714 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20715 * config/epiphany/rtems.h: New file.
20717 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20718 Uros Bizjak <ubizjak@gmail.com>
20721 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20722 QIreg_operand instead of register_operand predicate.
20723 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20724 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20725 comments instead of -fmitigate[-_]rop.
20727 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20730 * cgraphunit.c (symbol_table::compile): Switch to text_section
20731 before calling assembly_start debug hook.
20732 * run-rtl-passes.c (run_rtl_passes): Likewise.
20735 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20737 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20738 range_int_cst_p rather than !symbolic_range_p before calling
20739 extract_range_from_multiplicative_op_1.
20741 2018-01-04 Jeff Law <law@redhat.com>
20743 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20744 redundant test in assertion.
20746 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20748 * doc/rtl.texi: Document machine_mode wrapper classes.
20750 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20752 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20753 using tree_to_uhwi.
20755 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20757 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20758 the VEC_PERM_EXPR fold to fail.
20760 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20763 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20764 to switched_sections.
20766 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20769 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20770 test for d.testing.
20772 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20775 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20776 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20778 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20781 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20782 is BLKmode and bitpos not zero or mode change is needed.
20784 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20787 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20790 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20793 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20794 instead of MULT rtx. Update all corresponding splitters.
20795 (*saddl_se): Ditto.
20796 (*ssub<modesuffix>): Ditto.
20797 (*ssubl_se): Ditto.
20798 (*cmp_sadd_di): Update split patterns.
20799 (*cmp_sadd_si): Ditto.
20800 (*cmp_sadd_sidi): Ditto.
20801 (*cmp_ssub_di): Ditto.
20802 (*cmp_ssub_si): Ditto.
20803 (*cmp_ssub_sidi): Ditto.
20804 * config/alpha/predicates.md (const23_operand): New predicate.
20805 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20806 Look for ASHIFT, not MULT inner operand.
20807 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20809 2018-01-04 Martin Liska <mliska@suse.cz>
20811 PR gcov-profile/83669
20812 * gcov.c (output_intermediate_file): Add version to intermediate
20814 * doc/gcov.texi: Document new field 'version' in intermediate
20815 file format. Fix location of '-k' option of gcov command.
20817 2018-01-04 Martin Liska <mliska@suse.cz>
20820 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20822 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20824 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20826 2018-01-03 Martin Sebor <msebor@redhat.com>
20828 PR tree-optimization/83655
20829 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20830 checking calls with invalid arguments.
20832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20834 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20835 (vectorizable_mask_load_store): Delete.
20836 (vectorizable_call): Return false for masked loads and stores.
20837 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20838 instead of gimple_assign_rhs1.
20839 (vectorizable_load): Handle IFN_MASK_LOAD.
20840 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20844 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20846 (vectorizable_mask_load_store): ...here.
20847 (vectorizable_load): ...and here.
20849 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20851 * tree-vect-stmts.c (vect_build_all_ones_mask)
20852 (vect_build_zero_merge_argument): New functions, split out from...
20853 (vectorizable_load): ...here.
20855 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20857 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20859 (vectorizable_mask_load_store): ...here.
20860 (vectorizable_store): ...and here.
20862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20864 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20866 (vectorizable_mask_load_store): ...here.
20868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20870 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20871 (vect_model_store_cost): Take a vec_load_store_type instead of a
20873 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20874 (vect_model_store_cost): Take a vec_load_store_type instead of a
20876 (vectorizable_mask_load_store): Update accordingly.
20877 (vectorizable_store): Likewise.
20878 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20882 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20883 IFN_MASK_LOAD calls here rather than...
20884 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20886 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20887 Alan Hayward <alan.hayward@arm.com>
20888 David Sherwood <david.sherwood@arm.com>
20890 * expmed.c (extract_bit_field_1): For vector extracts,
20891 fall back to extract_bit_field_as_subreg if vec_extract
20894 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20895 Alan Hayward <alan.hayward@arm.com>
20896 David Sherwood <david.sherwood@arm.com>
20898 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20899 they are variable or constant sized.
20900 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20901 slots for constant-sized data.
20903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20904 Alan Hayward <alan.hayward@arm.com>
20905 David Sherwood <david.sherwood@arm.com>
20907 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20908 handling COND_EXPRs with boolean comparisons, try to find a better
20909 basis for the mask type than the boolean itself.
20911 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20913 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20914 is calculated and how it can be overridden.
20915 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20916 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20918 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20921 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20922 Alan Hayward <alan.hayward@arm.com>
20923 David Sherwood <david.sherwood@arm.com>
20925 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20926 Remove the mode argument.
20927 (aarch64_simd_valid_immediate): Remove the mode and inverse
20929 * config/aarch64/iterators.md (bitsize): New iterator.
20930 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20931 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20932 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20933 aarch64_simd_valid_immediate.
20934 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20935 (aarch64_reg_or_bic_imm): Likewise.
20936 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20937 with an insn_type enum and msl with a modifier_type enum.
20938 Replace element_width with a scalar_mode. Change the shift
20939 to unsigned int. Add constructors for scalar_float_mode and
20940 scalar_int_mode elements.
20941 (aarch64_vect_float_const_representable_p): Delete.
20942 (aarch64_can_const_movi_rtx_p)
20943 (aarch64_simd_scalar_immediate_valid_for_move)
20944 (aarch64_simd_make_constant): Update call to
20945 aarch64_simd_valid_immediate.
20946 (aarch64_advsimd_valid_immediate_hs): New function.
20947 (aarch64_advsimd_valid_immediate): Likewise.
20948 (aarch64_simd_valid_immediate): Remove mode and inverse
20949 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20950 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20951 and aarch64_float_const_representable_p on the result.
20952 (aarch64_output_simd_mov_immediate): Remove mode argument.
20953 Update call to aarch64_simd_valid_immediate and use of
20954 simd_immediate_info.
20955 (aarch64_output_scalar_simd_mov_immediate): Update call
20958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20959 Alan Hayward <alan.hayward@arm.com>
20960 David Sherwood <david.sherwood@arm.com>
20962 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20963 (mode_nunits): Likewise CONST_MODE_NUNITS.
20964 * machmode.def (ADJUST_NUNITS): Document.
20965 * genmodes.c (mode_data::need_nunits_adj): New field.
20966 (blank_mode): Update accordingly.
20967 (adj_nunits): New variable.
20968 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20970 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20971 listed in adj_nunits.
20972 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20973 listed in adj_nunits. Don't emit case statements for such modes.
20974 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20975 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20976 nothing if adj_nunits is nonnull.
20977 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20978 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20979 (emit_mode_fbit): Update use of print_maybe_const_decl.
20980 (emit_move_size): Likewise. Treat the array as non-const
20982 (emit_mode_adjustments): Handle adj_nunits.
20984 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20986 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20987 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20988 (VECTOR_MODES): Use it.
20989 (make_vector_modes): Take the prefix as an argument.
20991 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20992 Alan Hayward <alan.hayward@arm.com>
20993 David Sherwood <david.sherwood@arm.com>
20995 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20996 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20997 for MODE_VECTOR_BOOL.
20998 * machmode.def (VECTOR_BOOL_MODE): Document.
20999 * genmodes.c (VECTOR_BOOL_MODE): New macro.
21000 (make_vector_bool_mode): New function.
21001 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21003 * lto-streamer-in.c (lto_input_mode_table): Likewise.
21004 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21006 * stor-layout.c (int_mode_for_mode): Likewise.
21007 * tree.c (build_vector_type_for_mode): Likewise.
21008 * varasm.c (output_constant_pool_2): Likewise.
21009 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21010 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
21011 for MODE_VECTOR_BOOL.
21012 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21013 of mode class checks.
21014 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21015 instead of a list of mode class checks.
21016 (expand_vector_scalar_condition): Likewise.
21017 (type_for_widest_vector_mode): Handle BImode as an inner mode.
21019 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21020 Alan Hayward <alan.hayward@arm.com>
21021 David Sherwood <david.sherwood@arm.com>
21023 * machmode.h (mode_size): Change from unsigned short to
21025 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21026 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21027 or if measurement_type is not polynomial.
21028 (fixed_size_mode::includes_p): Check for constant-sized modes.
21029 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21030 return a poly_uint16 rather than an unsigned short.
21031 (emit_mode_size): Change the type of mode_size from unsigned short
21032 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
21033 (emit_mode_adjustments): Cope with polynomial vector sizes.
21034 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21036 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21038 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21039 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21040 * caller-save.c (setup_save_areas): Likewise.
21041 (replace_reg_with_saved_mem): Likewise.
21042 * calls.c (emit_library_call_value_1): Likewise.
21043 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21044 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21045 (gen_lowpart_for_combine): Likewise.
21046 * convert.c (convert_to_integer_1): Likewise.
21047 * cse.c (equiv_constant, cse_insn): Likewise.
21048 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21049 (cselib_subst_to_values): Likewise.
21050 * dce.c (word_dce_process_block): Likewise.
21051 * df-problems.c (df_word_lr_mark_ref): Likewise.
21052 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21053 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21054 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21055 (rtl_for_decl_location): Likewise.
21056 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21057 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21058 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21059 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21060 (expand_expr_real_1): Likewise.
21061 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21062 (pad_below): Likewise.
21063 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21064 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21065 * ira.c (get_subreg_tracking_sizes): Likewise.
21066 * ira-build.c (ira_create_allocno_objects): Likewise.
21067 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21068 (ira_sort_regnos_for_alter_reg): Likewise.
21069 * ira-costs.c (record_operand_costs): Likewise.
21070 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21071 (resolve_simple_move): Likewise.
21072 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21073 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21074 (lra_constraints): Likewise.
21075 (CONST_POOL_OK_P): Reject variable-sized modes.
21076 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21077 (add_pseudo_to_slot, lra_spill): Likewise.
21078 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21079 * optabs-query.c (get_best_extraction_insn): Likewise.
21080 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21081 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21082 (expand_mult_highpart, valid_multiword_target_p): Likewise.
21083 * recog.c (offsettable_address_addr_space_p): Likewise.
21084 * regcprop.c (maybe_mode_change): Likewise.
21085 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21086 * regrename.c (build_def_use): Likewise.
21087 * regstat.c (dump_reg_info): Likewise.
21088 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21089 (find_reloads, find_reloads_subreg_address): Likewise.
21090 * reload1.c (eliminate_regs_1): Likewise.
21091 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21092 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21093 (simplify_binary_operation_1, simplify_subreg): Likewise.
21094 * targhooks.c (default_function_arg_padding): Likewise.
21095 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21096 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21097 (verify_gimple_assign_ternary): Likewise.
21098 * tree-inline.c (estimate_move_cost): Likewise.
21099 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21100 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21101 (get_address_cost_ainc): Likewise.
21102 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21103 (vect_supportable_dr_alignment): Likewise.
21104 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21105 (vectorizable_reduction): Likewise.
21106 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21107 (vectorizable_operation, vectorizable_load): Likewise.
21108 * tree.c (build_same_sized_truth_vector_type): Likewise.
21109 * valtrack.c (cleanup_auto_inc_dec): Likewise.
21110 * var-tracking.c (emit_note_insn_var_location): Likewise.
21111 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21112 (ADDR_VEC_ALIGN): Likewise.
21114 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21115 Alan Hayward <alan.hayward@arm.com>
21116 David Sherwood <david.sherwood@arm.com>
21118 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21120 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21121 or if measurement_type is polynomial.
21122 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21123 * combine.c (make_extraction): Likewise.
21124 * dse.c (find_shift_sequence): Likewise.
21125 * dwarf2out.c (mem_loc_descriptor): Likewise.
21126 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21127 (extract_bit_field, extract_low_bits): Likewise.
21128 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21129 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21130 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21131 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21132 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21133 * reload.c (find_reloads): Likewise.
21134 * reload1.c (alter_reg): Likewise.
21135 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21136 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21137 * tree-if-conv.c (predicate_mem_writes): Likewise.
21138 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21139 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21140 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21141 * valtrack.c (dead_debug_insert_temp): Likewise.
21142 * varasm.c (mergeable_constant_section): Likewise.
21143 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21146 Alan Hayward <alan.hayward@arm.com>
21147 David Sherwood <david.sherwood@arm.com>
21149 * expr.c (expand_assignment): Cope with polynomial mode sizes
21150 when assigning to a CONCAT.
21152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21153 Alan Hayward <alan.hayward@arm.com>
21154 David Sherwood <david.sherwood@arm.com>
21156 * machmode.h (mode_precision): Change from unsigned short to
21158 (mode_to_precision): Return a poly_uint16 rather than an unsigned
21160 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21161 or if measurement_type is not polynomial.
21162 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
21163 in which the mode is already known to be a scalar_int_mode.
21164 * genmodes.c (emit_mode_precision): Change the type of mode_precision
21165 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
21167 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21168 for GET_MODE_PRECISION.
21169 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21170 for GET_MODE_PRECISION.
21171 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21173 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21174 (expand_field_assignment, make_extraction): Likewise.
21175 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21176 (get_last_value): Likewise.
21177 * convert.c (convert_to_integer_1): Likewise.
21178 * cse.c (cse_insn): Likewise.
21179 * expr.c (expand_expr_real_1): Likewise.
21180 * lra-constraints.c (simplify_operand_subreg): Likewise.
21181 * optabs-query.c (can_atomic_load_p): Likewise.
21182 * optabs.c (expand_atomic_load): Likewise.
21183 (expand_atomic_store): Likewise.
21184 * ree.c (combine_reaching_defs): Likewise.
21185 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21186 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21187 * tree.h (type_has_mode_precision_p): Likewise.
21188 * ubsan.c (instrument_si_overflow): Likewise.
21190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21191 Alan Hayward <alan.hayward@arm.com>
21192 David Sherwood <david.sherwood@arm.com>
21194 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21195 polynomial numbers of units.
21196 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21197 (valid_vector_subparts_p): New function.
21198 (build_vector_type): Remove temporary shim and take the number
21199 of units as a poly_uint64 rather than an int.
21200 (build_opaque_vector_type): Take the number of units as a
21201 poly_uint64 rather than an int.
21202 * tree.c (build_vector_from_ctor): Handle polynomial
21203 TYPE_VECTOR_SUBPARTS.
21204 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21205 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21206 (build_vector_from_val): If the number of units is variable,
21207 use build_vec_duplicate_cst for constant operands and
21208 VEC_DUPLICATE_EXPR otherwise.
21209 (make_vector_type): Remove temporary is_constant ().
21210 (build_vector_type, build_opaque_vector_type): Take the number of
21211 units as a poly_uint64 rather than an int.
21212 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21214 * cfgexpand.c (expand_debug_expr): Likewise.
21215 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21216 (store_constructor, expand_expr_real_1): Likewise.
21217 (const_scalar_mask_from_tree): Likewise.
21218 * fold-const-call.c (fold_const_reduction): Likewise.
21219 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21220 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21221 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21222 (fold_relational_const): Likewise.
21223 (native_interpret_vector): Likewise. Change the size from an
21224 int to an unsigned int.
21225 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21226 TYPE_VECTOR_SUBPARTS.
21227 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21228 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21229 duplicating a non-constant operand into a variable-length vector.
21230 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21231 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21232 * ipa-icf.c (sem_variable::equals): Likewise.
21233 * match.pd: Likewise.
21234 * omp-simd-clone.c (simd_clone_subparts): Likewise.
21235 * print-tree.c (print_node): Likewise.
21236 * stor-layout.c (layout_type): Likewise.
21237 * targhooks.c (default_builtin_vectorization_cost): Likewise.
21238 * tree-cfg.c (verify_gimple_comparison): Likewise.
21239 (verify_gimple_assign_binary): Likewise.
21240 (verify_gimple_assign_ternary): Likewise.
21241 (verify_gimple_assign_single): Likewise.
21242 * tree-pretty-print.c (dump_generic_node): Likewise.
21243 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21244 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21245 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21246 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21247 (vect_shift_permute_load_chain): Likewise.
21248 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21249 (expand_vector_condition, optimize_vector_constructor): Likewise.
21250 (lower_vec_perm, get_compute_type): Likewise.
21251 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21252 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21253 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21254 (vect_recog_mask_conversion_pattern): Likewise.
21255 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21256 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21257 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21258 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21259 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21260 (vectorizable_shift, vectorizable_operation, vectorizable_store)
21261 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21262 (supportable_widening_operation): Likewise.
21263 (supportable_narrowing_operation): Likewise.
21264 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21266 * varasm.c (output_constant): Likewise.
21268 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21269 Alan Hayward <alan.hayward@arm.com>
21270 David Sherwood <david.sherwood@arm.com>
21272 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21273 so that both the length == 3 and length != 3 cases set up their
21274 own permute vectors. Add comments explaining why we know the
21275 number of elements is constant.
21276 (vect_permute_load_chain): Likewise.
21278 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21279 Alan Hayward <alan.hayward@arm.com>
21280 David Sherwood <david.sherwood@arm.com>
21282 * machmode.h (mode_nunits): Change from unsigned char to
21284 (ONLY_FIXED_SIZE_MODES): New macro.
21285 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21286 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21287 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21289 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21290 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21291 or if measurement_type is not polynomial.
21292 * genmodes.c (ZERO_COEFFS): New macro.
21293 (emit_mode_nunits_inline): Make mode_nunits_inline return a
21295 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21296 Use ZERO_COEFFS when emitting initializers.
21297 * data-streamer.h (bp_pack_poly_value): New function.
21298 (bp_unpack_poly_value): Likewise.
21299 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21300 for GET_MODE_NUNITS.
21301 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21302 for GET_MODE_NUNITS.
21303 * tree.c (make_vector_type): Remove temporary shim and make
21304 the real function take the number of units as a poly_uint64
21305 rather than an int.
21306 (build_vector_type_for_mode): Handle polynomial nunits.
21307 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21308 * emit-rtl.c (const_vec_series_p_1): Likewise.
21309 (gen_rtx_CONST_VECTOR): Likewise.
21310 * fold-const.c (test_vec_duplicate_folding): Likewise.
21311 * genrecog.c (validate_pattern): Likewise.
21312 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21313 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21314 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21315 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21316 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21317 * rtlanal.c (subreg_get_info): Likewise.
21318 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21319 (vect_grouped_load_supported): Likewise.
21320 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21321 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21322 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21323 (simplify_const_unary_operation, simplify_binary_operation_1)
21324 (simplify_const_binary_operation, simplify_ternary_operation)
21325 (test_vector_ops_duplicate, test_vector_ops): Likewise.
21326 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21327 instead of CONST_VECTOR_NUNITS.
21328 * varasm.c (output_constant_pool_2): Likewise.
21329 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21330 explicit-encoded elements in the XVEC for variable-length vectors.
21332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21334 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21337 Alan Hayward <alan.hayward@arm.com>
21338 David Sherwood <david.sherwood@arm.com>
21340 * coretypes.h (fixed_size_mode): Declare.
21341 (fixed_size_mode_pod): New typedef.
21342 * builtins.h (target_builtins::x_apply_args_mode)
21343 (target_builtins::x_apply_result_mode): Change type to
21344 fixed_size_mode_pod.
21345 * builtins.c (apply_args_size, apply_result_size, result_vector)
21346 (expand_builtin_apply_args_1, expand_builtin_apply)
21347 (expand_builtin_return): Update accordingly.
21349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21351 * cse.c (hash_rtx_cb): Hash only the encoded elements.
21352 * cselib.c (cselib_hash_rtx): Likewise.
21353 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21354 CONST_VECTOR encoding.
21356 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21357 Jeff Law <law@redhat.com>
21360 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21361 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21362 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21363 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21366 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21367 explicitly probe *sp in a noreturn function if there were any callee
21368 register saves or frame pointer is needed.
21370 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21373 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21374 BLKmode for ternary, binary or unary expressions.
21377 * var-tracking.c (delete_vta_debug_insn): New inline function.
21378 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21379 insns from get_insns () to NULL instead of each bb separately.
21380 Use delete_vta_debug_insn. No longer static.
21381 (vt_debug_insns_local, variable_tracking_main_1): Adjust
21382 delete_vta_debug_insns callers.
21383 * rtl.h (delete_vta_debug_insns): Declare.
21384 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21385 instead of variable_tracking_main.
21387 2018-01-03 Martin Sebor <msebor@redhat.com>
21389 PR tree-optimization/83603
21390 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21391 arguments past the endof the argument list in functions declared
21392 without a prototype.
21393 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21394 Avoid checking when arguments are null.
21396 2018-01-03 Martin Sebor <msebor@redhat.com>
21399 * doc/extend.texi (attribute const): Fix a typo.
21400 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21401 issuing -Wsuggest-attribute for void functions.
21403 2018-01-03 Martin Sebor <msebor@redhat.com>
21405 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21406 offset_int::from instead of wide_int::to_shwi.
21407 (maybe_diag_overlap): Remove assertion.
21408 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21409 * gimple-ssa-sprintf.c (format_directive): Same.
21410 (parse_directive): Same.
21411 (sprintf_dom_walker::compute_format_length): Same.
21412 (try_substitute_return_value): Same.
21414 2018-01-03 Jeff Law <law@redhat.com>
21416 PR middle-end/83654
21417 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21418 non-constant residual for zero at runtime and avoid probing in
21419 that case. Reorganize code for trailing problem to mirror handling
21422 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21424 PR tree-optimization/83501
21425 * tree-ssa-strlen.c (get_string_cst): New.
21426 (handle_char_store): Call get_string_cst.
21428 2018-01-03 Martin Liska <mliska@suse.cz>
21430 PR tree-optimization/83593
21431 * tree-ssa-strlen.c: Include tree-cfg.h.
21432 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21433 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21434 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21436 (strlen_dom_walker::before_dom_children): Call
21437 gimple_purge_dead_eh_edges. Dump tranformation with details
21439 (strlen_dom_walker::before_dom_children): Update call by adding
21440 new argument cleanup_eh.
21441 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21443 2018-01-03 Martin Liska <mliska@suse.cz>
21446 * cif-code.def (VARIADIC_THUNK): New enum value.
21447 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21450 2018-01-03 Jan Beulich <jbeulich@suse.com>
21452 * sse.md (mov<mode>_internal): Tighten condition for when to use
21453 vmovdqu<ssescalarsize> for TI and OI modes.
21455 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21457 Update copyright years.
21459 2018-01-03 Martin Liska <mliska@suse.cz>
21462 * ipa-visibility.c (function_and_variable_visibility): Skip
21463 functions with noipa attribure.
21465 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21467 * gcc.c (process_command): Update copyright notice dates.
21468 * gcov-dump.c (print_version): Ditto.
21469 * gcov.c (print_version): Ditto.
21470 * gcov-tool.c (print_version): Ditto.
21471 * gengtype.c (create_file): Ditto.
21472 * doc/cpp.texi: Bump @copying's copyright year.
21473 * doc/cppinternals.texi: Ditto.
21474 * doc/gcc.texi: Ditto.
21475 * doc/gccint.texi: Ditto.
21476 * doc/gcov.texi: Ditto.
21477 * doc/install.texi: Ditto.
21478 * doc/invoke.texi: Ditto.
21480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21482 * vector-builder.h (vector_builder::m_full_nelts): Change from
21483 unsigned int to poly_uint64.
21484 (vector_builder::full_nelts): Update prototype accordingly.
21485 (vector_builder::new_vector): Likewise.
21486 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21487 (vector_builder::operator ==): Likewise.
21488 (vector_builder::finalize): Likewise.
21489 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21490 Take the number of elements as a poly_uint64 rather than an
21492 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21493 from unsigned int to poly_uint64.
21494 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21495 (vec_perm_indices::new_vector): Likewise.
21496 (vec_perm_indices::length): Likewise.
21497 (vec_perm_indices::nelts_per_input): Likewise.
21498 (vec_perm_indices::input_nelts): Likewise.
21499 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21500 number of elements per input as a poly_uint64 rather than an
21501 unsigned int. Use the original encoding for variable-length
21502 vectors, rather than clamping each individual element.
21503 For the second and subsequent elements in each pattern,
21504 clamp the step and base before clamping their sum.
21505 (vec_perm_indices::series_p): Handle polynomial element counts.
21506 (vec_perm_indices::all_in_range_p): Likewise.
21507 (vec_perm_indices_to_tree): Likewise.
21508 (vec_perm_indices_to_rtx): Likewise.
21509 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21510 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21511 (tree_vector_builder::new_binary_operation): Handle polynomial
21512 element counts. Return false if we need to know the number
21513 of elements at compile time.
21514 * fold-const.c (fold_vec_perm): Punt if the number of elements
21515 isn't known at compile time.
21517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21519 * vec-perm-indices.h (vec_perm_builder): Change element type
21520 from HOST_WIDE_INT to poly_int64.
21521 (vec_perm_indices::element_type): Update accordingly.
21522 (vec_perm_indices::clamp): Handle polynomial element_types.
21523 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21524 (vec_perm_indices::all_in_range_p): Likewise.
21525 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21527 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21528 polynomial vec_perm_indices element types.
21529 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21530 * fold-const.c (fold_vec_perm): Likewise.
21531 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21532 * tree-vect-generic.c (lower_vec_perm): Likewise.
21533 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21534 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21535 element type to HOST_WIDE_INT.
21537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21538 Alan Hayward <alan.hayward@arm.com>
21539 David Sherwood <david.sherwood@arm.com>
21541 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21542 rather than an int. Use plus_constant.
21543 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21544 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21547 Alan Hayward <alan.hayward@arm.com>
21548 David Sherwood <david.sherwood@arm.com>
21550 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21551 a HOST_WIDE_INT to a poly_int64.
21553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21554 Alan Hayward <alan.hayward@arm.com>
21555 David Sherwood <david.sherwood@arm.com>
21557 * calls.c (load_register_parameters): Cope with polynomial
21558 mode sizes. Require a constant size for BLKmode parameters
21559 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21560 forces a parameter to be padded at the lsb end in order to
21561 fill a complete number of words, require the parameter size
21562 to be ordered wrt UNITS_PER_WORD.
21564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21565 Alan Hayward <alan.hayward@arm.com>
21566 David Sherwood <david.sherwood@arm.com>
21568 * reload1.c (spill_stack_slot_width): Change element type
21569 from unsigned int to poly_uint64_pod.
21570 (alter_reg): Treat mode sizes as polynomial.
21572 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21573 Alan Hayward <alan.hayward@arm.com>
21574 David Sherwood <david.sherwood@arm.com>
21576 * reload.c (complex_word_subreg_p): New function.
21577 (reload_inner_reg_of_subreg, push_reload): Use it.
21579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21580 Alan Hayward <alan.hayward@arm.com>
21581 David Sherwood <david.sherwood@arm.com>
21583 * lra-constraints.c (process_alt_operands): Reject matched
21584 operands whose sizes aren't ordered.
21585 (match_reload): Refer to this check here.
21587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21588 Alan Hayward <alan.hayward@arm.com>
21589 David Sherwood <david.sherwood@arm.com>
21591 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21592 that the mode size is in the set {1, 2, 4, 8, 16}.
21594 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21595 Alan Hayward <alan.hayward@arm.com>
21596 David Sherwood <david.sherwood@arm.com>
21598 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21599 Use plus_constant instead of gen_rtx_PLUS.
21601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21602 Alan Hayward <alan.hayward@arm.com>
21603 David Sherwood <david.sherwood@arm.com>
21605 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21606 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21607 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21608 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21609 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21610 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21611 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21612 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21613 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21614 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21616 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21617 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21618 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21619 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21620 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21621 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21622 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21623 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21624 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21625 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21627 * expr.c (emit_move_resolve_push): Treat the input and result
21628 of PUSH_ROUNDING as a poly_int64.
21629 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21630 (emit_push_insn): Likewise.
21631 * lra-eliminations.c (mark_not_eliminable): Likewise.
21632 * recog.c (push_operand): Likewise.
21633 * reload1.c (elimination_effects): Likewise.
21634 * rtlanal.c (nonzero_bits1): Likewise.
21635 * calls.c (store_one_arg): Likewise. Require the padding to be
21636 known at compile time.
21638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21639 Alan Hayward <alan.hayward@arm.com>
21640 David Sherwood <david.sherwood@arm.com>
21642 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21643 Use plus_constant instead of gen_rtx_PLUS.
21645 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21646 Alan Hayward <alan.hayward@arm.com>
21647 David Sherwood <david.sherwood@arm.com>
21649 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21650 rather than an int.
21652 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21653 Alan Hayward <alan.hayward@arm.com>
21654 David Sherwood <david.sherwood@arm.com>
21656 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21657 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21658 via stack temporaries. Treat the mode size as polynomial too.
21660 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21661 Alan Hayward <alan.hayward@arm.com>
21662 David Sherwood <david.sherwood@arm.com>
21664 * expr.c (expand_expr_real_2): When handling conversions involving
21665 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21666 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21667 as a poly_uint64 too.
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 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21676 Alan Hayward <alan.hayward@arm.com>
21677 David Sherwood <david.sherwood@arm.com>
21679 * combine.c (can_change_dest_mode): Handle polynomial
21680 REGMODE_NATURAL_SIZE.
21681 * expmed.c (store_bit_field_1): Likewise.
21682 * expr.c (store_constructor): Likewise.
21683 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21684 and polynomial REGMODE_NATURAL_SIZE.
21685 (gen_lowpart_common): Likewise.
21686 * reginfo.c (record_subregs_of_mode): Likewise.
21687 * rtlanal.c (read_modify_subreg_p): Likewise.
21689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21690 Alan Hayward <alan.hayward@arm.com>
21691 David Sherwood <david.sherwood@arm.com>
21693 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21694 numbers of 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 * match.pd: Cope with polynomial numbers of vector elements.
21702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21703 Alan Hayward <alan.hayward@arm.com>
21704 David Sherwood <david.sherwood@arm.com>
21706 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21707 in a POINTER_PLUS_EXPR.
21709 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21710 Alan Hayward <alan.hayward@arm.com>
21711 David Sherwood <david.sherwood@arm.com>
21713 * omp-simd-clone.c (simd_clone_subparts): New function.
21714 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21715 (ipa_simd_modify_function_body): Likewise.
21717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21718 Alan Hayward <alan.hayward@arm.com>
21719 David Sherwood <david.sherwood@arm.com>
21721 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21722 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21723 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21724 (expand_vector_condition, vector_element): Likewise.
21725 (subparts_gt): New function.
21726 (get_compute_type): Use subparts_gt.
21727 (count_type_subparts): Delete.
21728 (expand_vector_operations_1): Use subparts_gt instead of
21729 count_type_subparts.
21731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21732 Alan Hayward <alan.hayward@arm.com>
21733 David Sherwood <david.sherwood@arm.com>
21735 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21736 (vect_compile_time_alias): ...this new function. Do the calculation
21737 on poly_ints rather than trees.
21738 (vect_prune_runtime_alias_test_list): Update call accordingly.
21740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21741 Alan Hayward <alan.hayward@arm.com>
21742 David Sherwood <david.sherwood@arm.com>
21744 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21746 (vect_schedule_slp_instance): Likewise.
21748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21749 Alan Hayward <alan.hayward@arm.com>
21750 David Sherwood <david.sherwood@arm.com>
21752 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21753 constant and extern definitions for variable-length vectors.
21754 (vect_get_constant_vectors): Note that the number of units
21755 is known to be constant.
21757 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21758 Alan Hayward <alan.hayward@arm.com>
21759 David Sherwood <david.sherwood@arm.com>
21761 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21762 of units as polynomial. Choose between WIDE and NARROW based
21765 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21766 Alan Hayward <alan.hayward@arm.com>
21767 David Sherwood <david.sherwood@arm.com>
21769 * tree-vect-stmts.c (simd_clone_subparts): New function.
21770 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21773 Alan Hayward <alan.hayward@arm.com>
21774 David Sherwood <david.sherwood@arm.com>
21776 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21777 vectors as polynomial. Use build_index_vector for
21778 IFN_GOMP_SIMD_LANE.
21780 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21781 Alan Hayward <alan.hayward@arm.com>
21782 David Sherwood <david.sherwood@arm.com>
21784 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21785 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21786 for variable-length vectors.
21787 (vectorizable_mask_load_store): Treat the number of units as
21788 polynomial, asserting that it is constant if the condition has
21789 already been enforced.
21790 (vectorizable_store, vectorizable_load): Likewise.
21792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21793 Alan Hayward <alan.hayward@arm.com>
21794 David Sherwood <david.sherwood@arm.com>
21796 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21797 of units as polynomial. Punt if we can't tell at compile time
21798 which vector contains the final result.
21800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21801 Alan Hayward <alan.hayward@arm.com>
21802 David Sherwood <david.sherwood@arm.com>
21804 * tree-vect-loop.c (vectorizable_induction): Treat the number
21805 of units as polynomial. Punt on SLP inductions. Use an integer
21806 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21807 cast of such a series for variable-length floating-point
21810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21811 Alan Hayward <alan.hayward@arm.com>
21812 David Sherwood <david.sherwood@arm.com>
21814 * tree.h (build_index_vector): Declare.
21815 * tree.c (build_index_vector): New function.
21816 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21817 of units as polynomial, forcibly converting it to a constant if
21818 vectorizable_reduction has already enforced the condition.
21819 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21820 to create a {1,2,3,...} vector.
21821 (vectorizable_reduction): Treat the number of units as polynomial.
21822 Choose vectype_in based on the largest scalar element size rather
21823 than the smallest number of units. Enforce the restrictions
21826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21827 Alan Hayward <alan.hayward@arm.com>
21828 David Sherwood <david.sherwood@arm.com>
21830 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21831 number of units as polynomial.
21833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21834 Alan Hayward <alan.hayward@arm.com>
21835 David Sherwood <david.sherwood@arm.com>
21837 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21838 * target.def (autovectorize_vector_sizes): Return the vector sizes
21839 by pointer, using vector_sizes rather than a bitmask.
21840 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21841 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21842 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21844 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21845 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21846 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21847 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21848 * omp-general.c (omp_max_vf): Likewise.
21849 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21850 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21851 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21852 * tree-vect-slp.c (vect_slp_bb): Likewise.
21853 * doc/tm.texi: Regenerate.
21854 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21856 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21857 the vector size as a poly_uint64 rather than an unsigned int.
21858 (current_vector_size): Change from an unsigned int to a poly_uint64.
21859 (get_vectype_for_scalar_type): Update accordingly.
21860 * tree.h (build_truth_vector_type): Take the size and number of
21861 units as a poly_uint64 rather than an unsigned int.
21862 (build_vector_type): Add a temporary overload that takes
21863 the number of units as a poly_uint64 rather than an unsigned int.
21864 * tree.c (make_vector_type): Likewise.
21865 (build_truth_vector_type): Take the number of units as a poly_uint64
21866 rather than an unsigned int.
21868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21869 Alan Hayward <alan.hayward@arm.com>
21870 David Sherwood <david.sherwood@arm.com>
21872 * target.def (get_mask_mode): Take the number of units and length
21873 as poly_uint64s rather than unsigned ints.
21874 * targhooks.h (default_get_mask_mode): Update accordingly.
21875 * targhooks.c (default_get_mask_mode): Likewise.
21876 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21877 * doc/tm.texi: Regenerate.
21879 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21880 Alan Hayward <alan.hayward@arm.com>
21881 David Sherwood <david.sherwood@arm.com>
21883 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21884 * omp-general.c (omp_max_vf): Likewise.
21885 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21886 (expand_omp_simd): Handle polynomial safelen.
21887 * omp-low.c (omplow_simd_context): Add a default constructor.
21888 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21889 (lower_rec_simd_input_clauses): Update accordingly.
21890 (lower_rec_input_clauses): Likewise.
21892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21893 Alan Hayward <alan.hayward@arm.com>
21894 David Sherwood <david.sherwood@arm.com>
21896 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21897 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21898 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21899 (vect_analyze_slp_cost): Likewise.
21900 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21901 (vect_model_load_cost): Likewise.
21903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21904 Alan Hayward <alan.hayward@arm.com>
21905 David Sherwood <david.sherwood@arm.com>
21907 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21908 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21909 from an unsigned int * to a poly_uint64_pod *.
21910 (calculate_unrolling_factor): New function.
21911 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21914 Alan Hayward <alan.hayward@arm.com>
21915 David Sherwood <david.sherwood@arm.com>
21917 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21918 from an unsigned int to a poly_uint64.
21919 (_loop_vec_info::slp_unrolling_factor): Likewise.
21920 (_loop_vec_info::vectorization_factor): Change from an int
21922 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21923 (vect_get_num_vectors): New function.
21924 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21925 (vect_get_num_copies): Use vect_get_num_vectors.
21926 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21927 to an unsigned int *.
21928 (vect_analyze_data_refs): Change min_vf from an int * to a
21930 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21931 than an unsigned HOST_WIDE_INT.
21932 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21933 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21934 to an unsigned int *.
21935 (vect_analyze_data_ref_dependences): Likewise.
21936 (vect_compute_data_ref_alignment): Handle polynomial vf.
21937 (vect_enhance_data_refs_alignment): Likewise.
21938 (vect_prune_runtime_alias_test_list): Likewise.
21939 (vect_shift_permute_load_chain): Likewise.
21940 (vect_supportable_dr_alignment): Likewise.
21941 (dependence_distance_ge_vf): Take the vectorization factor as a
21942 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21943 (vect_analyze_data_refs): Change min_vf from an int * to a
21945 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21946 vfm1 as a poly_uint64 rather than an int. Make the same change
21947 for the returned bound_scalar.
21948 (vect_gen_vector_loop_niters): Handle polynomial vf.
21949 (vect_do_peeling): Likewise. Update call to
21950 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21951 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21953 * tree-vect-loop.c (vect_determine_vectorization_factor)
21954 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21955 (vect_get_known_peeling_cost): Likewise.
21956 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21957 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21958 (vect_transform_loop): Likewise. Use the lowest possible VF when
21959 updating the upper bounds of the loop.
21960 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21961 rather than an int.
21962 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21963 polynomial unroll factors.
21964 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21965 (vect_make_slp_decision): Likewise.
21966 (vect_supported_load_permutation_p): Likewise, and polynomial
21968 (vect_analyze_slp_cost): Handle polynomial vf.
21969 (vect_slp_analyze_node_operations): Likewise.
21970 (vect_slp_analyze_bb_1): Likewise.
21971 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21972 than an unsigned HOST_WIDE_INT.
21973 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21974 (vectorizable_load): Handle polynomial vf.
21975 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21977 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21980 Alan Hayward <alan.hayward@arm.com>
21981 David Sherwood <david.sherwood@arm.com>
21983 * match.pd: Handle bit operations involving three constants
21984 and try to fold one pair.
21986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21988 * tree-vect-loop-manip.c: Include gimple-fold.h.
21989 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21990 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21991 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21992 Add a path that uses a step of VF instead of 1, but disable it
21994 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21995 and niters_no_overflow parameters. Update calls to
21996 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21997 Create a new SSA name if the latter choses to use a ste other
21998 than zero, and return it via niters_vector_mult_vf_var.
21999 * tree-vect-loop.c (vect_transform_loop): Update calls to
22000 vect_do_peeling, vect_gen_vector_loop_niters and
22001 slpeel_make_loop_iterate_ntimes.
22002 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22003 (vect_gen_vector_loop_niters): Update declarations after above changes.
22005 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
22007 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22008 128-bit round to integer instructions.
22009 (ceil<mode>2): Likewise.
22010 (btrunc<mode>2): Likewise.
22011 (round<mode>2): Likewise.
22013 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22015 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22016 unaligned VSX load/store on P8/P9.
22017 (expand_block_clear): Allow the use of unaligned VSX
22018 load/store on P8/P9.
22020 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22022 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22024 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22025 swap associated with both a load and a store.
22027 2018-01-02 Andrew Waterman <andrew@sifive.com>
22029 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22030 * config/riscv/riscv.md (clear_cache): Use it.
22032 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
22034 * web.c: Remove out-of-date comment.
22036 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22038 * expr.c (fixup_args_size_notes): Check that any existing
22039 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22040 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22041 (emit_single_push_insn): ...here.
22043 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22045 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22046 (const_vector_encoded_nelts): New function.
22047 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22048 (const_vector_int_elt, const_vector_elt): Declare.
22049 * emit-rtl.c (const_vector_int_elt_1): New function.
22050 (const_vector_elt): Likewise.
22051 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22052 of CONST_VECTOR_ELT.
22054 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22056 * expr.c: Include rtx-vector-builder.h.
22057 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22058 directly on the tree encoding.
22059 (const_vector_from_tree): Likewise.
22060 * optabs.c: Include rtx-vector-builder.h.
22061 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22062 sequence of "u" values.
22063 * vec-perm-indices.c: Include rtx-vector-builder.h.
22064 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22065 directly on the vec_perm_indices encoding.
22067 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22069 * doc/rtl.texi (const_vector): Describe new encoding scheme.
22070 * Makefile.in (OBJS): Add rtx-vector-builder.o.
22071 * rtx-vector-builder.h: New file.
22072 * rtx-vector-builder.c: Likewise.
22073 * rtl.h (rtx_def::u2): Add a const_vector field.
22074 (CONST_VECTOR_NPATTERNS): New macro.
22075 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22076 (CONST_VECTOR_DUPLICATE_P): Likewise.
22077 (CONST_VECTOR_STEPPED_P): Likewise.
22078 (CONST_VECTOR_ENCODED_ELT): Likewise.
22079 (const_vec_duplicate_p): Check for a duplicated vector encoding.
22080 (unwrap_const_vec_duplicate): Likewise.
22081 (const_vec_series_p): Check for a non-duplicated vector encoding.
22082 Say that the function only returns true for integer vectors.
22083 * emit-rtl.c: Include rtx-vector-builder.h.
22084 (gen_const_vec_duplicate_1): Delete.
22085 (gen_const_vector): Call gen_const_vec_duplicate instead of
22086 gen_const_vec_duplicate_1.
22087 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22088 (gen_const_vec_duplicate): Use rtx_vector_builder.
22089 (gen_const_vec_series): Likewise.
22090 (gen_rtx_CONST_VECTOR): Likewise.
22091 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22092 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22093 Build a new vector rather than modifying a CONST_VECTOR in-place.
22094 (handle_special_swappables): Update call accordingly.
22095 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22096 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22097 Build a new vector rather than modifying a CONST_VECTOR in-place.
22098 (handle_special_swappables): Update call accordingly.
22100 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22102 * simplify-rtx.c (simplify_const_binary_operation): Use
22103 CONST_VECTOR_ELT instead of XVECEXP.
22105 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22107 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22108 the selector elements to be different from the data elements
22109 if the selector is a VECTOR_CST.
22110 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22111 ssizetype for the selector.
22113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22115 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22116 before testing each element individually.
22117 * tree-vect-generic.c (lower_vec_perm): Likewise.
22119 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22121 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22122 * selftest-run-tests.c (selftest::run_tests): Call it.
22123 * vector-builder.h (vector_builder::operator ==): New function.
22124 (vector_builder::operator !=): Likewise.
22125 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22126 (vec_perm_indices::all_from_input_p): New function.
22127 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22128 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22129 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22130 instead of reading the VECTOR_CST directly. Detect whether both
22131 vector inputs are the same before constructing the vec_perm_indices,
22132 and update the number of inputs argument accordingly. Use the
22133 utility functions added above. Only construct sel2 if we need to.
22135 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22137 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22138 the broadcast of the low byte.
22139 (expand_mult_highpart): Use an explicit encoding for the permutes.
22140 * optabs-query.c (can_mult_highpart_p): Likewise.
22141 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22142 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22143 (vectorizable_bswap): Likewise.
22144 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22145 explicit encoding for the power-of-2 permutes.
22146 (vect_permute_store_chain): Likewise.
22147 (vect_grouped_load_supported): Likewise.
22148 (vect_permute_load_chain): Likewise.
22150 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22152 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22153 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22154 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22155 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22156 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22157 (vect_gen_perm_mask_any): Likewise.
22159 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22161 * int-vector-builder.h: New file.
22162 * vec-perm-indices.h: Include int-vector-builder.h.
22163 (vec_perm_indices): Redefine as an int_vector_builder.
22164 (auto_vec_perm_indices): Delete.
22165 (vec_perm_builder): Redefine as a stand-alone class.
22166 (vec_perm_indices::vec_perm_indices): New function.
22167 (vec_perm_indices::clamp): Likewise.
22168 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22169 (vec_perm_indices::new_vector): New function.
22170 (vec_perm_indices::new_expanded_vector): Update for new
22171 vec_perm_indices class.
22172 (vec_perm_indices::rotate_inputs): New function.
22173 (vec_perm_indices::all_in_range_p): Operate directly on the
22174 encoded form, without computing elided elements.
22175 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22176 encoding. Update for new vec_perm_indices class.
22177 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22178 the given vec_perm_builder.
22179 (expand_vec_perm_var): Update vec_perm_builder constructor.
22180 (expand_mult_highpart): Use vec_perm_builder instead of
22181 auto_vec_perm_indices.
22182 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22183 vec_perm_indices instead of auto_vec_perm_indices. Use a single
22184 or double series encoding as appropriate.
22185 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22186 vec_perm_indices instead of auto_vec_perm_indices.
22187 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22188 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22189 (vect_permute_store_chain): Likewise.
22190 (vect_grouped_load_supported): Likewise.
22191 (vect_permute_load_chain): Likewise.
22192 (vect_shift_permute_load_chain): Likewise.
22193 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22194 (vect_transform_slp_perm_load): Likewise.
22195 (vect_schedule_slp_instance): Likewise.
22196 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22197 (vectorizable_mask_load_store): Likewise.
22198 (vectorizable_bswap): Likewise.
22199 (vectorizable_store): Likewise.
22200 (vectorizable_load): Likewise.
22201 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22202 vec_perm_indices instead of auto_vec_perm_indices. Use
22203 tree_to_vec_perm_builder to read the vector from a tree.
22204 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22205 vec_perm_builder instead of a vec_perm_indices.
22206 (have_whole_vector_shift): Use vec_perm_builder and
22207 vec_perm_indices instead of auto_vec_perm_indices. Leave the
22208 truncation to calc_vec_perm_mask_for_shift.
22209 (vect_create_epilog_for_reduction): Likewise.
22210 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22211 from auto_vec_perm_indices to vec_perm_indices.
22212 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22213 instead of changing individual elements.
22214 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22215 the vector in d.perm.
22216 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22217 from auto_vec_perm_indices to vec_perm_indices.
22218 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22219 instead of changing individual elements.
22220 (arm_vectorize_vec_perm_const): Use new_vector to install
22221 the vector in d.perm.
22222 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22223 Update vec_perm_builder constructor.
22224 (rs6000_expand_interleave): Likewise.
22225 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22226 (rs6000_expand_interleave): Likewise.
22228 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22230 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22231 to qimode could truncate the indices.
22232 * optabs.c (expand_vec_perm_var): Likewise.
22234 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22236 * Makefile.in (OBJS): Add vec-perm-indices.o.
22237 * vec-perm-indices.h: New file.
22238 * vec-perm-indices.c: Likewise.
22239 * target.h (vec_perm_indices): Replace with a forward class
22241 (auto_vec_perm_indices): Move to vec-perm-indices.h.
22242 * optabs.h: Include vec-perm-indices.h.
22243 (expand_vec_perm): Delete.
22244 (selector_fits_mode_p, expand_vec_perm_var): Declare.
22245 (expand_vec_perm_const): Declare.
22246 * target.def (vec_perm_const_ok): Replace with...
22247 (vec_perm_const): ...this new hook.
22248 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22249 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22250 * doc/tm.texi: Regenerate.
22251 * optabs.def (vec_perm_const): Delete.
22252 * doc/md.texi (vec_perm_const): Likewise.
22253 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22254 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22255 expand_vec_perm for constant permutation vectors. Assert that
22256 the mode of variable permutation vectors is the integer equivalent
22257 of the mode that is being permuted.
22258 * optabs-query.h (selector_fits_mode_p): Declare.
22259 * optabs-query.c: Include vec-perm-indices.h.
22260 (selector_fits_mode_p): New function.
22261 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22262 is defined, instead of checking whether the vec_perm_const_optab
22263 exists. Use targetm.vectorize.vec_perm_const instead of
22264 targetm.vectorize.vec_perm_const_ok. Check whether the indices
22265 fit in the vector mode before using a variable permute.
22266 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22267 vec_perm_indices instead of an rtx.
22268 (expand_vec_perm): Replace with...
22269 (expand_vec_perm_const): ...this new function. Take the selector
22270 as a vec_perm_indices rather than an rtx. Also take the mode of
22271 the selector. Update call to shift_amt_for_vec_perm_mask.
22272 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22273 Use vec_perm_indices::new_expanded_vector to expand the original
22274 selector into bytes. Check whether the indices fit in the vector
22275 mode before using a variable permute.
22276 (expand_vec_perm_var): Make global.
22277 (expand_mult_highpart): Use expand_vec_perm_const.
22278 * fold-const.c: Includes vec-perm-indices.h.
22279 * tree-ssa-forwprop.c: Likewise.
22280 * tree-vect-data-refs.c: Likewise.
22281 * tree-vect-generic.c: Likewise.
22282 * tree-vect-loop.c: Likewise.
22283 * tree-vect-slp.c: Likewise.
22284 * tree-vect-stmts.c: Likewise.
22285 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22287 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22288 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22289 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22290 (aarch64_vectorize_vec_perm_const): ...this new function.
22291 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22292 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22293 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22294 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22295 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22296 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22297 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22299 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
22300 check for NEON modes.
22301 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22302 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22303 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22304 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22306 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
22307 the old VEC_PERM_CONST conditions.
22308 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22309 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22310 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22311 (ia64_vectorize_vec_perm_const_ok): Merge into...
22312 (ia64_vectorize_vec_perm_const): ...this new function.
22313 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22314 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22315 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22316 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22317 * config/mips/mips.c (mips_expand_vec_perm_const)
22318 (mips_vectorize_vec_perm_const_ok): Merge into...
22319 (mips_vectorize_vec_perm_const): ...this new function.
22320 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22321 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22322 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22323 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22324 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22325 (rs6000_expand_vec_perm_const): Delete.
22326 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22328 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22329 (altivec_expand_vec_perm_const_le): Take each operand individually.
22330 Operate on constant selectors rather than rtxes.
22331 (altivec_expand_vec_perm_const): Likewise. Update call to
22332 altivec_expand_vec_perm_const_le.
22333 (rs6000_expand_vec_perm_const): Delete.
22334 (rs6000_vectorize_vec_perm_const_ok): Delete.
22335 (rs6000_vectorize_vec_perm_const): New function.
22336 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22337 an element count and rtx array.
22338 (rs6000_expand_extract_even): Update call accordingly.
22339 (rs6000_expand_interleave): Likewise.
22340 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22341 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22342 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22343 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22344 (rs6000_expand_vec_perm_const): Delete.
22345 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22346 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22347 (altivec_expand_vec_perm_const_le): Take each operand individually.
22348 Operate on constant selectors rather than rtxes.
22349 (altivec_expand_vec_perm_const): Likewise. Update call to
22350 altivec_expand_vec_perm_const_le.
22351 (rs6000_expand_vec_perm_const): Delete.
22352 (rs6000_vectorize_vec_perm_const_ok): Delete.
22353 (rs6000_vectorize_vec_perm_const): New function. Remove stray
22354 reference to the SPE evmerge intructions.
22355 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22356 an element count and rtx array.
22357 (rs6000_expand_extract_even): Update call accordingly.
22358 (rs6000_expand_interleave): Likewise.
22359 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22360 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22362 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22364 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22366 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22367 vector mode and that that mode matches the mode of the data
22369 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22370 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
22371 directly using expand_vec_perm_1 when forcing selectors into
22373 (expand_vec_perm_var): New function, split out from expand_vec_perm.
22375 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22377 * optabs-query.h (can_vec_perm_p): Delete.
22378 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22379 * optabs-query.c (can_vec_perm_p): Split into...
22380 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22381 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22382 particular selector is valid.
22383 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22384 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22385 (vect_grouped_load_supported): Likewise.
22386 (vect_shift_permute_load_chain): Likewise.
22387 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22388 (vect_transform_slp_perm_load): Likewise.
22389 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22390 (vectorizable_bswap): Likewise.
22391 (vect_gen_perm_mask_checked): Likewise.
22392 * fold-const.c (fold_ternary_loc): Likewise. Don't take
22393 implementations of variable permutation vectors into account
22394 when deciding which selector to use.
22395 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22396 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22397 with a false third argument.
22398 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22399 to test whether the constant selector is valid and can_vec_perm_var_p
22400 to test whether a variable selector is valid.
22402 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22404 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22405 * optabs-query.c (can_vec_perm_p): Likewise.
22406 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22407 instead of vec_perm_indices.
22408 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22409 (vect_gen_perm_mask_checked): Likewise,
22410 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22411 (vect_gen_perm_mask_checked): Likewise,
22413 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22415 * optabs-query.h (qimode_for_vec_perm): Declare.
22416 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22417 (qimode_for_vec_perm): ...this new function.
22418 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22420 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22422 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22423 does not have a conditional at the top.
22425 2018-01-02 Richard Biener <rguenther@suse.de>
22427 * ipa-inline.c (big_speedup_p): Fix expression.
22429 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22432 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22435 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22439 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22440 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22441 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22442 cond_taken_branch_cost 3->4.
22444 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22446 PR tree-optimization/83581
22447 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22448 TODO_cleanup_cfg if any changes have been made.
22450 PR middle-end/83608
22451 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22452 convert_modes if target mode has the right side, but different mode
22455 PR middle-end/83609
22456 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22457 last argument when extracting from CONCAT. If either from_real or
22458 from_imag is NULL, use expansion through memory. If result is not
22459 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22460 the parts directly to inner mode, if even that fails, use expansion
22463 PR middle-end/83623
22464 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22465 check for bswap in mode rather than HImode and use that in expand_unop
22468 Copyright (C) 2018 Free Software Foundation, Inc.
22470 Copying and distribution of this file, with or without modification,
22471 are permitted in any medium without royalty provided the copyright
22472 notice and this notice are preserved.