1 2018-07-31 Martin Liska <mliska@suse.cz>
4 * coverage.c (coverage_begin_function): Do not mark target
5 clones as artificial functions.
7 2018-07-31 Martin Liska <mliska@suse.cz>
13 * profile.c (branch_prob): Do not record GOTO expressions
14 for GIMPLE statements which locations are already streamed.
16 2018-07-31 Olivier Hainque <hainque@adacore.com>
18 * gcc.c (handle_spec_function): Accept a soft_matched_part
19 argument, as do_spec_1. Pass it down to ...
20 (eval_spec_function): Accept a soft_matched_part argument,
21 and pass it down to ...
22 (do_spec_2): Accept a soft_matched_part argument, and pass
24 (do_spec_1): Pass soft_matched_part to handle_spec_function.
25 (handle_braces): Update call to handle_spec_function.
26 (driver::set_up_specs): Update calls to do_spec_2.
27 (compare_debug_dump_opt_spec_function): Likewise.
28 (compare_debug_self_opt_spec_function): Likewise.
30 2018-07-31 Olivier Hainque <hainque@adacore.com>
32 * common.opt (nolibc): New option.
33 * doc/invoke.texi (Link Options): Document it.
34 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
35 * config/alpha/linux.h: Likewise.
36 * config/arc/elf.h: Likewise.
37 * config/arm/uclinux-elf.h: Likewise.
38 * config/arm/unknown-elf.h: Likewise.
39 * config/avr/avrlibc.h: Likewise.
40 * config/bfin/bfin.h: Likewise.
41 * config/bfin/linux.h: Likewise.
42 * config/bfin/uclinux.h: Likewise.
43 * config/darwin.h: Likewise.
44 * config/darwin10.h: Likewise.
45 * config/darwin12.h: Likewise.
46 * config/gnu-user.h: Likewise.
47 * config/lm32/uclinux-elf.h: Likewise.
48 * config/pa/pa-hpux11.h: Likewise.
49 * config/pa/pa64-hpux.h: Likewise.
50 * config/sparc/sparc.h: Likewise.
52 2018-07-31 Olivier Hainque <hainque@adacore.com>
54 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
57 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
60 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
63 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
65 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
66 terminated string literal.
68 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
70 PR rtl-optimization/85160
71 * combine.c (is_just_move): New function.
72 (try_combine): Allow combining two instructions into two if neither of
73 the original instructions was a move.
75 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
78 * doc/extend.texi (Global Register Variables): Discourage use of type
80 (Local Register Variables): Likewise.
82 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
84 PR tree-optimization/86506
85 * hwint.h (ceil_log2): Resync with hwint.c implementation.
87 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
90 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
91 hard_regno, make sure no insn between `from` and `to` clobbers it.
93 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
94 Tom de Vries <tdevries@suse.de>
96 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
97 (PTX_DEFAULT_RUNTIME_DIM): ... this.
98 (nvptx_goacc_validate_dims): Set default worker and gang dims to
99 PTX_DEFAULT_RUNTIME_DIM.
100 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
102 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
104 * config/pa/pa.c (pa_output_addr_vec): Align address table.
105 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
106 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
108 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
110 * config/rs6000/constraints.md (wG constraint): Delete, no longer
112 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
113 predicate to reflect toc fusion has been deleted.
114 (toc_fusion_mem_raw): Delete, no longer used.
115 (toc_fusion_mem_wrapped): Likewise.
116 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
118 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
119 Delete, no longer used.
120 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
121 meant to be used for toc fusion.
122 (rs6000_debug_print_mode): Delete toc fusion debugging.
123 (rs6000_debug_reg_global): Likewise.
124 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
125 fusion and secondary reload support that were never used.
126 (rs6000_option_override_internal): Delete TOC fusion, that was only
127 partially defined, and it did not work unless you also used the
129 (rs6000_legitimate_address_p): Delete TOC fusion support.
130 (rs6000_opt_masks): Likewise.
131 (fusion_wrap_memory_address): Delete function, no longer used.
132 (fusion_split_address); Delete TOC fusion support.
133 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
134 longer used with toc fusion being deleted.
135 (TARGET_TOC_FUSION_FP): Likewise.
136 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
138 (toc fusion spliter): Delete TOC fusion support.
139 (toc_fusionload_<mode>): Likewise.
140 (toc_fusionload_di): Likewise.
141 (fusion_gpr_load_<mode>): Delete generator function, this insn no
142 longer needs to be named. Rename predicate to delete TOC fusion.
143 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
144 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
145 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
146 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
147 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
149 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
151 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
152 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
153 __int128 in built-in function prototypes.
154 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
155 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
157 2018-07-27 Martin Sebor <msebor@redhat.com>
159 PR tree-optimization/86696
160 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
161 types, including enums.
162 (handle_char_store): Be prepared for the above function to fail.
164 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
166 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
167 when optimization level is lower than 2 or optimize for size.
169 2018-07-26 Martin Sebor <msebor@redhat.com>
171 PR tree-optimization/86043
172 PR tree-optimization/86042
173 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
174 (get_string_cst_length): Rename...
175 (get_min_string_length): ...to this. Add argument.
176 (handle_char_store): Extend to handle multi-character stores by
178 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
179 * tree.h (initializer_zerop): Add argument.
181 2018-07-26 Jakub Jelinek <jakub@redhat.com>
184 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
185 declare target to variables if they have always,{to,from,tofrom} map
188 2018-07-26 Martin Liska <mliska@suse.cz>
191 * lto-wrapper.c: Add linker_output as prefix
192 for ltrans_output_file.
194 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
196 PR rtl-optimization/85805
197 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
198 value for hard registers if that was written in the same mode.
200 2018-07-26 Martin Liska <mliska@suse.cz>
202 PR gcov-profile/86536
203 * gcov.c (format_gcov): Use printf format %.*f directly
204 and do not handle special values.
206 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
208 * common/config/arc/arc-common.c (arc_option_optimization_table):
209 Update default optimizations for size.
211 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
213 * config/arc/arc.md (movsf_insn): Add short instruction selection.
214 * config/arc/constraints.md (CfZ): New constraint.
215 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
216 (subsf3_fpu): Likewise.
217 (cmpsf_fpu): Likewise.
218 (cmpsf_fpu_uneq): Likewise.
220 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
222 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
224 (arc_is_uncached_mem_p): uncached applies to both the variable and
227 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
229 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
232 2018-07-25 David Malcolm <dmalcolm@redhat.com>
234 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
235 field "m_scopes" from vec to auto_vec.
237 2018-07-25 Martin Liska <mliska@suse.cz>
239 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
242 2018-07-25 Richard Biener <rguenther@suse.de>
245 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
246 special wrt context_die late.
247 (gen_subprogram_die): Re-use DIEs in local scope.
249 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
251 PR tree-optimization/86644
252 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
254 2018-07-25 Martin Liska <mliska@suse.cz>
257 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
258 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
260 2018-07-25 Martin Liska <mliska@suse.cz>
263 * params.def: Explain ASan abbreviation and provide
264 a documentation link.
266 2018-07-24 Martin Sebor <msebor@redhat.com>
268 PR tree-optimization/86622
269 PR tree-optimization/86532
270 * builtins.h (string_length): Declare.
271 * builtins.c (c_strlen): Correct handling of non-constant offsets.
272 (check_access): Be prepared for non-constant length ranges.
273 (string_length): Make extern.
274 * expr.c (string_constant): Only handle the minor non-constant
275 array index. Use string_constant to compute the length of
276 a generic string constant.
278 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
280 PR tree-optimization/86618
281 * tree-vect-stmts.c (vectorizable_call): Don't take the address
282 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
284 2018-07-24 David Malcolm <dmalcolm@redhat.com>
286 PR tree-optimization/86636
287 * json.cc (json::object::set): Fix comment. Add assertions.
288 (json::array::append): Move here from json.h. Add comment and an
290 (json::string::string): Likewise.
291 * json.h (json::array::append): Move to json.cc.
292 (json::string::string): Likewise.
293 * optinfo-emit-json.cc
294 (optrecord_json_writer::impl_location_to_json): Assert that we
295 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
296 wrapper around it. Expand the location once, rather than three
298 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
299 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
301 (optrecord_json_writer::optinfo_to_json): Likewise, in four
302 places. Fix some overlong lines.
304 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
306 * config/aarch64/aarch64-simd.md
307 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
308 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
309 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
310 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
311 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
312 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
313 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
314 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
315 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
317 2018-07-24 Jakub Jelinek <jakub@redhat.com>
320 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
321 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
322 and abs_d == d, do the power of two handling if profitable.
324 2018-07-24 Richard Biener <rguenther@suse.de>
326 * match.pd: Add BIT_FIELD_REF canonicalizations.
328 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
331 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
333 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
335 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
336 terminated STRING_CST object.
338 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
340 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
342 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
344 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
345 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
346 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
347 the elements into a register.
348 (rs6000_split_v4si_init_di_reg): Delete.
349 (rs6000_split_v4si_init): Delete.
350 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
351 (vsx_init_v4si): Rewrite as a define_expand.
353 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
355 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
356 zero_extend argument from memory): New.
358 2018-07-22 Martin Sebor <msebor@redhat.com>
361 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
362 diagnosing calls with unknown arguments unless -Walloca-larger-than
363 is restricted to less than PTRDIFF_MAX bytes.
365 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
367 * doc/gcov.texi (Invoking Gcov): Editorial changes.
369 2018-07-20 David Malcolm <dmalcolm@redhat.com>
371 * pretty-print.c (text_info::set_location): Remove redundant
372 "line_table" parameter from call to rich_location::set_range.
374 2018-07-20 Martin Sebor <msebor@redhat.com>
377 * builtins.c (expand_builtin_alloca): Adjust.
378 * calls.c (alloc_max_size): Simplify.
379 * cgraphunit.c (cgraph_node::expand): Adjust.
380 * common.opt (larger_than_size, warn_frame_larger_than): Remove
382 (frame_larger_than_size): Same.
383 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
384 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
386 * doc/invoke.texi (GCC Command Options): Document option arguments.
387 Explain byte-size arguments and suffixes.
388 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
389 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
390 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
391 * doc/options.texi (UInteger): Expand.
392 (Host_Wide_Int, ByteSize): Document new properties.
393 * final.c (final_start_function_1): Include sizes in an error message.
394 * function.c (frame_offset_overflow): Same.
395 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
396 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
397 Diagnose unbounded alloca calls only for limits of less than
399 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
400 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
402 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
403 only for limits of less than PTRDIFF_MAX.
404 * langhooks-def.h (lhd_handle_option): Change function argument
406 * langhooks.c (lhd_handle_option): Same.
407 * langhooks.h (handle_option): Same.
408 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
410 (var_type, var_type_struct): Same.
411 (var_set): Handle ByteSize flag.
412 * optc-gen.awk: Add comments to output to ease debugging. Make
413 use of HOST_WIDE_INT where appropriate.
414 * opts-gen-save.awk: Use %lx to format unsigned long.
415 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
416 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
417 arguments. Parse bytes-size suffixes.
418 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
419 (enum_value_to_arg): Same.
420 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
421 (handle_option): Adjust.
422 (generate_option): Change function argument to HOST_WIDE_INT.
423 (cmdline_handle_error): Adjust.
424 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
425 (set_option): Change function argument to HOST_WIDE_INT.
426 (option_enabled): Handle cl_host_wide_int.
427 (get_option_state): Handle CLVC_SIZE.
428 (control_warning_option): Same.
429 * opts.c (common_handle_option): Change function argument to
430 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
431 OPT_Wvla_larger_than_.
432 * opts.h (enum cl_var_type): Add an enumerator.
433 * stor-layout.c (layout_decl): Print a more meaningful warning.
434 * toplev.c (output_stack_usage): Adjust.
436 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
438 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
439 call to inline_expand_builtin_string_cmp.
440 (expand_builtin_strcmp): Likewise.
441 (expand_builtin_strncmp): Likewise.
442 (inline_string_cmp): Delete the last parameter, change char_type_node
443 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
445 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
446 the inlining expansion on target where the type of the call has same or
447 narrower precision than unsigned char.
449 2018-07-20 David Malcolm <dmalcolm@redhat.com>
451 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
452 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
453 * common.opt (fsave-optimization-record): New option.
454 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
455 * doc/invoke.texi (-fsave-optimization-record): New option.
456 * dumpfile.c: Include "optinfo-emit-json.h".
457 (struct kv_pair): Move to coretypes.h.
458 (optgroup_options): Make non-static.
459 (dump_context::end_scope): Call
460 optimization_records_maybe_pop_dump_scope.
461 * dumpfile.h (optgroup_options): New decl.
464 * optinfo-emit-json.cc: New file.
465 * optinfo-emit-json.h: New file.
466 * optinfo.cc: Include "optinfo-emit-json.h".
467 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
468 (optinfo_enabled_p): Check optimization_records_enabled_p.
469 (optinfo_wants_inlining_info_p): Likewise.
470 * optinfo.h: Update comment.
471 * profile-count.c (profile_quality_as_string): New function.
472 * profile-count.h (profile_quality_as_string): New decl.
473 (profile_count::quality): New accessor.
474 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
475 and optinfo_emit_json_cc_tests.
476 * selftest.h (selftest::json_cc_tests): New decl.
477 (selftest::optinfo_emit_json_cc_tests): New decl.
478 * toplev.c: Include "optinfo-emit-json.h".
479 (compile_file): Call optimization_records_finish.
480 (do_compile): Call optimization_records_start.
481 * tree-ssa-live.c: Include optinfo.h.
482 (remove_unused_scope_block_p): Retain inlining information if
483 optinfo_wants_inlining_info_p returns true.
485 2018-07-20 Richard Biener <rguenther@suse.de>
488 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
489 to cover -flto-partition=none.
491 2018-07-20 Martin Liska <mliska@suse.cz>
493 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
494 (get_decl_source_range): Remove unused function.
496 2018-07-20 Richard Biener <rguenther@suse.de>
498 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
499 (struct vn_phi_s): Likewise.
500 (struct vn_reference_s): Likewise.
501 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
502 for searching the slot of an entry known to be in the hash itself.
503 (vn_phi_hasher::equal): Likewise.
504 (vn_reference_hasher::equal): Likewise.
505 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
507 (optimistic_info, current_info): Remove, keeping only valid_info.
508 (vn_reference_lookup_1): Remove fallback lookup.
509 (vn_reference_lookup_2): Likewise.
510 (vn_nary_op_lookup_1): Likewise.
511 (vn_phi_lookup): Likewise.
512 (vn_nary_build_or_lookup_1): Make sure to not chain the built
514 (vn_reference_insert): Adjust, chain the inserted hash element
515 at last_inserted_ref.
516 (vn_reference_insert_pieces): Likewise.
517 (visit_reference_op_call): Likewise.
518 (vn_nary_op_insert_into): Chain the inserted hash element at
520 (vn_nary_op_insert_pieces): Adjust.
521 (vn_nary_op_insert): Likewise.
522 (vn_nary_op_insert_stmt): Likewise.
523 (vn_phi_insert): Adjust, chain the inserted hash element at
525 (process_scc): Remove clearing and copying the optimistic
526 table. Instead remove elements inserted during an optimistic
527 iteration from the single table we maintain.
528 (init_scc_vn): Adjust.
529 (free_scc_vn): Likewise.
530 (sccvn_dom_walker::record_cond): Likewise.
531 (sccvn_dom_walker::after_dom_children): Likewise.
533 2018-07-19 Martin Sebor <msebor@redhat.com>
535 PR tree-optimization/84047
536 PR tree-optimization/83776
537 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
538 (check_array_bounds): Call it.
540 2018-07-19 Martin Sebor <msebor@redhat.com>
542 * align.h (align_flags): Use member initialization.
544 2018-07-19 David Malcolm <dmalcolm@redhat.com>
546 * Makefile.in (OBJS): Add optinfo.o.
547 * coretypes.h (class symtab_node): New forward decl.
548 (struct cgraph_node): New forward decl.
549 (class varpool_node): New forward decl.
550 * dump-context.h: New file.
551 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
553 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
554 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
555 (set_alt_dump_file): Likewise.
556 (dump_context::~dump_context): New dtor.
557 (dump_gimple_stmt): Move implementation to...
558 (dump_context::dump_gimple_stmt): ...this new member function.
559 Add the stmt to any pending optinfo, creating one if need be.
560 (dump_gimple_stmt_loc): Move implementation to...
561 (dump_context::dump_gimple_stmt_loc): ...this new member function.
562 Start a new optinfo and add the stmt to it.
563 (dump_gimple_expr): Move implementation to...
564 (dump_context::dump_gimple_expr): ...this new member function.
565 Add the stmt to any pending optinfo, creating one if need be.
566 (dump_gimple_expr_loc): Move implementation to...
567 (dump_context::dump_gimple_expr_loc): ...this new member function.
568 Start a new optinfo and add the stmt to it.
569 (dump_generic_expr): Move implementation to...
570 (dump_context::dump_generic_expr): ...this new member function.
571 Add the tree to any pending optinfo, creating one if need be.
572 (dump_generic_expr_loc): Move implementation to...
573 (dump_context::dump_generic_expr_loc): ...this new member
574 function. Add the tree to any pending optinfo, creating one if
576 (dump_printf): Move implementation to...
577 (dump_context::dump_printf_va): ...this new member function. Add
578 the text to any pending optinfo, creating one if need be.
579 (dump_printf_loc): Move implementation to...
580 (dump_context::dump_printf_loc_va): ...this new member function.
581 Start a new optinfo and add the stmt to it.
582 (dump_dec): Move implementation to...
583 (dump_context::dump_dec): ...this new member function. Add the
584 value to any pending optinfo, creating one if need be.
585 (dump_context::dump_symtab_node): New member function.
586 (dump_context::get_scope_depth): New member function.
587 (dump_context::begin_scope): New member function.
588 (dump_context::end_scope): New member function.
589 (dump_context::ensure_pending_optinfo): New member function.
590 (dump_context::begin_next_optinfo): New member function.
591 (dump_context::end_any_optinfo): New member function.
592 (dump_context::s_current): New global.
593 (dump_context::s_default): New global.
594 (dump_scope_depth): Delete global.
595 (dumpfile_ensure_any_optinfo_are_flushed): New function.
596 (dump_symtab_node): New function.
597 (get_dump_scope_depth): Reimplement in terms of dump_context.
598 (dump_begin_scope): Likewise.
599 (dump_end_scope): Likewise.
600 (selftest::temp_dump_context::temp_dump_context): New ctor.
601 (selftest::temp_dump_context::~temp_dump_context): New dtor.
602 (selftest::verify_item): New function.
603 (ASSERT_IS_TEXT): New macro.
604 (ASSERT_IS_TREE): New macro.
605 (ASSERT_IS_GIMPLE): New macro.
606 (selftest::test_capture_of_dump_calls): New test.
607 (selftest::dumpfile_c_tests): Call it.
608 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
609 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
610 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
612 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
613 (dump_node, dump_bb): Move these unrelated decls.
614 (class dump_manager): Add leading comment.
615 * optinfo.cc: New file.
616 * optinfo.h: New file.
618 2018-07-19 Michael Collison <michael.collison@arm.com>
619 Richard Henderson <rth@redhat.com>
621 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
622 (subti): Handle op1 zero.
623 (subvti4, usub4ti4): New.
624 (*sub<GPI>3_compare1_imm): New.
625 (sub<GPI>3_carryinCV): New.
626 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
627 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
629 2018-07-19 Michael Collison <michael.collison@arm.com>
630 Richard Henderson <rth@redhat.com>
632 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
633 (addti3): Create simpler code if low part is already known to be 0.
634 (addvti4, uaddvti4): New.
635 (*add<GPI>3_compareC_cconly_imm): New.
636 (*add<GPI>3_compareC_cconly): New.
637 (*add<GPI>3_compareC_imm): New.
638 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
639 handle constants within this pattern..
640 (*add<GPI>3_compareV_cconly_imm): New.
641 (*add<GPI>3_compareV_cconly): New.
642 (*add<GPI>3_compareV_imm): New.
643 (add<GPI>3_compareV): New.
644 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
645 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
646 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
647 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
648 with 'comparison' operator.
649 (*add<GPI>3_compareV_cconly_imm): Ditto.
650 (*add<GPI>3_compareV_cconly): Ditto.
651 (*add<GPI>3_compareV_imm): Ditto.
652 (add<GPI>3_compareV): Ditto.
653 (add<mode>3_carryinC): Ditto.
654 (*add<mode>3_carryinC_zero): Ditto.
655 (*add<mode>3_carryinC): Ditto.
656 (add<mode>3_carryinV): Ditto.
657 (*add<mode>3_carryinV_zero): Ditto.
658 (*add<mode>3_carryinV): Ditto.
660 2018-07-19 Michael Collison <michael.collison@arm.com>
661 Richard Henderson <rth@redhat.com>
663 * config/aarch64/aarch64-modes.def (CC_V): New.
664 * config/aarch64/aarch64-protos.h
665 (aarch64_addti_scratch_regs): Declare
666 (aarch64_subvti_scratch_regs): Declare.
667 (aarch64_expand_subvti): Declare.
668 (aarch64_gen_unlikely_cbranch): Declare
669 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
670 for signed overflow using CC_Vmode.
671 (aarch64_get_condition_code_1): Handle CC_Vmode.
672 (aarch64_gen_unlikely_cbranch): New function.
673 (aarch64_addti_scratch_regs): New function.
674 (aarch64_subvti_scratch_regs): New function.
675 (aarch64_expand_subvti): New function.
677 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
679 * config/aarch64/aarch64-option-extensions.def: New entry for profile
681 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
682 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
685 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
688 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
689 address check not strict.
691 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
693 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
695 (store_pair_lanes<mode>): Likewise.
696 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
697 enum value 'ADDR_QUERY_LDP_STP_N'.
698 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
699 (aarch64_print_address_internal): Add declaration.
700 (aarch64_print_ldpstp_address): Remove.
701 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
702 (aarch64_print_operand): Change printing of 'y'.
703 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
704 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
705 'true' rather than '1'.
706 * config/aarch64/constraints.md (Uml): Likewise.
707 (Uml): Rename to Umn.
710 2018-07-19 Richard Biener <rguenther@suse.de>
712 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
714 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
715 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
716 (vn_reference_hasher): Likewise.
717 (struct vn_tables_s): Remove obstack and alloc-pool members.
718 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
719 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
720 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
721 (vn_reference_insert_pieces): Likewise.
722 (alloc_vn_nary_op_noinit): Adjust.
723 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
725 (shared_lookup_phiargs): Remove.
726 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
727 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
728 (visit_reference_op_call): Likewise.
729 (copy_nary, copy_phi, copy_reference): Remove.
730 (process_scc): Rewind the obstack when iterating. Do not
731 copy the elements to valid_info but just move them from one
732 hashtable to the other.
733 (allocate_vn_table): Adjust.
734 (free_vn_table): Likewise.
735 (init_scc_vn): Likewise.
736 (free_scc_vn): Likewise.
738 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
741 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
742 indirect_return as function type attribute.
743 (ix86_attribute_table): Change indirect_return to function
745 * doc/extend.texi: Update indirect_return attribute.
747 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
749 * wide-int.h (widest2_int): New.
750 * gimple-fold.c (arith_overflowed_p): Use it.
751 * tree.h (widest2_int_cst): New.
752 * tree-vrp.c (wide_int_binop_overflow): Rename from
754 Rewrite to work on trees.
755 (extract_range_from_multiplicative_op_1): Abstract code to...
756 (wide_int_range_min_max): ...here.
757 (wide_int_range_cross_product): ...and here.
758 (extract_range_from_binary_expr_1): Abstract overflow code to...
759 (wide_int_range_mult_wrapping): ...here.
760 * tree-vrp.h (wide_int_range_cross_product): New.
761 (wide_int_range_mult_wrapping): New.
763 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
764 Julia Koval <julia.koval@intel.com>
766 * config/i386/x86-tune-costs.h (skylake_memcpy,
767 skylake_memset): Replace rep_prefix with unrolling for size 512.
769 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
772 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
775 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
777 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
778 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
779 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
780 previously known as "PowerPC AltiVec Built-in Functions". Move
781 some material to new subsubsections "PowerPC AltiVec Built-in
782 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
784 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
785 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
786 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
787 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
789 2018-07-18 Richard Biener <rguenther@suse.de>
791 PR tree-optimization/86557
792 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
795 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
797 * config/s390/s390.c (s390_function_profiler): Generate CFI.
799 2018-07-17 Jeff Law <law@redhat.com>
801 * config/arm/arm.c (get_label_padding): Update for recent
802 changes to label_to_alignment.
804 PR tree-optimization/86010
805 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
807 * config/mips/mips.c (vr4130_align_insns): Update for recent
808 changes to label_to_alignment.
810 * config/frv/frv.c (frv_label_align): Update for recent changes
811 to label_to_alignment.
813 * config/nios2/nios2.c (nios2_label_align): Update for recent
814 changes which dropped ALIGN_LABELS_LOG.
816 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
818 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
819 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
821 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
823 * config/arc/arc.c (arc_label_align): Use align_labels instead of
824 deprecated align_labels_log.
826 2018-07-17 Richard Biener <rguenther@suse.de>
829 * dwarf2out.c (init_sections_and_labels): Always generate
830 a debug_line_str_section for early LTO debug.
831 (dwarf2out_finish): Reset debug_line_str_hash output early.
832 Bump counter for extra dwarf5 .debug_loc labels to not conflict
834 (dwarf2out_early_finish): Output debug_line_str.
836 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
838 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
839 index register on z196 or later.
841 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
843 * config/s390/s390.c (s390_default_align): Set default function
845 (s390_override_options_after_change): Call s390_default align.
846 (s390_option_override_internal): Call s390_default_align.
847 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
849 2018-07-17 Jakub Jelinek <jakub@redhat.com>
852 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
853 to _looptemp_ clauses, other than the first two.
855 2018-07-17 Martin Liska <mliska@suse.cz>
857 * opts.c: Do not enable OPT_falign_* for -Os.
859 2018-07-17 Martin Liska <mliska@suse.cz>
861 * align.h (MAX_CODE_ALIGN): New.
862 (MAX_CODE_ALIGN_VALUE): New.
863 * common/config/i386/i386-common.c (ix86_handle_option):
864 (MAX_CODE_ALIGN): Moved to align.h.
865 * final.c (MAX_CODE_ALIGN): Likewise.
866 * opts.c (parse_and_check_align_values):
867 (MAX_CODE_ALIGN): Likewise.
868 (MAX_CODE_ALIGN_VALUE): Likewise.
870 2018-07-17 Martin Liska <mliska@suse.cz>
872 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
873 in order to fulfil coding style.
874 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
875 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
876 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
877 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
878 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
879 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
880 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
881 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
882 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
884 2018-07-17 Martin Liska <mliska@suse.cz>
887 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
888 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
889 align_flags of label_to_alignment.
890 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
892 * config/m68k/m68k.c: Do not use removed align_labels_value and
894 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
895 (LOOP_ALIGN): Likewise.
896 (LABEL_ALIGN): Likewise.
897 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
898 Remove not used macro.
899 (rs6000_loop_align): Change return type to align_flags.
900 (rs6000_loop_align_max_skip): Remove.
901 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
902 Change return type to align_flags.
903 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
904 Remove not used macro.
905 (rs6000_loop_align): Change return type to align_flags.
906 (rs6000_loop_align_max_skip): Remove.
907 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
908 * config/rx/rx-protos.h (rx_align_for_label): Make it
910 * config/rx/rx.c (rx_align_for_label): Change return type
912 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
914 into align_flags class.
915 (LABEL_ALIGN): Likewise.
916 (LOOP_ALIGN): Likewise.
917 * config/s390/s390.c (s390_label_align): Use align_flags
919 (s390_asm_output_function_label): Likewise.
920 * config/sh/sh.c (sh_override_options_after_change):
921 Use align_flags class directly without macros.
922 (find_barrier): Likewise.
923 (barrier_align): Likewise.
924 (sh_loop_align): Likewise.
925 * config/spu/spu.c (spu_option_override):
926 Use align_flags_tuple::get_value instead of removed macros.
927 (spu_sched_init): Likewise.
928 * config/spu/spu.h (GTY): Likewise.
929 * config/visium/visium.c (visium_option_override):
930 Set "8" as default secondary alignment.
931 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
932 in order to guarantee secondary alignment of 8.
933 * coretypes.h: Include align.h header file.
934 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
935 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
936 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
937 * doc/tm.texi.in: Likewise.
938 * final.c (struct label_alignment): Remove not used structure.
939 (LABEL_ALIGN): Change type to align_flags.
940 (LOOP_ALIGN): Likewise.
941 (JUMP_ALIGN): Likewise.
942 (default_loop_align_max_skip): Remove.
943 (default_label_align_max_skip): Likewise.
944 (default_jump_align_max_skip): Likewise.
945 (default_label_align_after_barrier_max_skip):
946 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
947 (LABEL_TO_MAX_SKIP): Remove.
948 (label_to_alignment): Return align_flags type instead of integer.
949 (label_to_max_skip): Remove.
950 (align_fuzz): Use align_flags type.
951 (compute_alignments): Use align_flags type and use align_flags::max
952 to combine multiple alignments.
953 (grow_label_align): Grow vec instead of C array.
954 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
955 (shorten_branches): Use align_flags type and use align_flags::max
956 to combine multiple alignments.
957 (final_scan_insn_1): Remove usage of secondary alignment that comes
958 from label alignment, but instead use proper secondary alignment
959 which is computed in grow_label_align.
960 * flags.h (struct align_flags_tuple): Move to align.h.
961 (struct align_flags): Likewise.
962 (state_align_loops): Rename to align_loops.
963 (state_align_jumps): Rename to align_jumps.
964 (state_align_labels): Rename to align_labels.
965 (state_align_functions): Rename to align_functions.
966 (align_loops_log): Remove.
967 (align_jumps_log): Remove.
968 (align_labels_log): Remove.
969 (align_functions_log): Remove.
970 (align_loops_max_skip): Remove.
971 (align_jumps_max_skip): Remove.
972 (align_labels_max_skip): Remove.
973 (align_functions_max_skip): Remove.
974 (align_loops_value): Remove.
975 (align_jumps_value): Remove.
976 (align_labels_value): Remove.
977 (align_functions_value): Remove.
978 * output.h (label_to_alignment): Change return type to align_flags.
979 (label_to_max_skip): Remove.
980 * target.def: Remove loop_align_max_skip, label_align_max_skip,
981 jump_align_max_skip macros.
982 * targhooks.h (default_loop_align_max_skip): Remove.
983 (default_label_align_max_skip): Likewise.
984 (default_jump_align_max_skip): Likewise.
985 (default_label_align_after_barrier_max_skip): Remove.
986 * toplev.c (read_log_maxskip): Use ::normalize function.
987 (parse_N_M): Remove not used argument and also call ::normalize.
988 (parse_alignment_opts): Do not pass unused arguments.
989 * varasm.c (assemble_start_function): Use directly align_functions
990 instead of removed macros.
991 * system.h: Do not poison removed macros.
993 2018-07-17 Jakub Jelinek <jakub@redhat.com>
996 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
997 and cond temporaries don't have reference type if iterator has
998 pointer type. For init use &for_pre_body instead of pre_p if
999 for_pre_body is non-empty.
1001 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1003 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1004 double-double modes to SFmode directly directly.
1005 (trunc<mode>sf2_fprs): Delete.
1007 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1009 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1010 for conversions between IFmode and the decimal floating point modes.
1011 (init_float128_ieee): Use the correct names for conversions between
1012 KFmode and the decimal floating point modes.
1014 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1016 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1017 for the conversions between TDmode and IFmode.
1018 (init_float128_ieee): Use more correct names for the conversions
1019 between TDmode and KFmode.
1021 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1023 PR tree-optimization/86526
1024 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1025 (inline_expand_builtin_string_cmp): Likewise.
1026 (inline_string_cmp): Likewise. Use c_readstr instead of
1027 builtin_memcpy_read_str. Add unit_mode temporary.
1029 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1032 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1033 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1035 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1037 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1038 Alphabetize prototypes of built-in functions, separating out
1039 built-in functions that are listed in this section but should be
1040 described elsewhere.
1042 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1045 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1046 conditional move when trapping comparison was split to a
1047 non-trapping one (and vice versa).
1049 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1051 * config/s390/s390.c (s390_function_profiler): Generate nops
1052 instead of profiler call sequences.
1053 * config/s390/s390.opt: Add the new option.
1055 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1057 * config/s390/s390.c (s390_function_profiler): Generate
1058 __mcount_loc section.
1059 * config/s390/s390.opt: Add the new option.
1061 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1063 * common.opt: Add the new warning.
1064 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1065 %r0,__fentry__" when -mfentry is specified.
1066 (s390_option_override_internal): Disallow -mfentry for 31-bit
1068 * config/s390/s390.opt: Add the new option.
1070 2018-07-16 Richard Biener <rguenther@suse.de>
1073 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1074 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1076 2018-07-16 Martin Liska <mliska@suse.cz>
1079 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1082 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1084 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1086 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1088 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1090 * config/arc/arc-cpus.def (hs4x): New cpu.
1092 * config/arc/arc-tables.opt: Regenerate.
1093 * config/arc/arc.c (arc_sched_issue_rate): New function.
1094 (TARGET_SCHED_ISSUE_RATE): Define.
1095 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1096 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1098 (attr tune): Add ARCHS4x tune values.
1099 (attr tune_dspmpy): Define.
1100 (*tst): Correct instruction type.
1101 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1102 * config/arc/arcHS4x.md: New file.
1103 * config/arc/fpu.md: Update instruction type attributes.
1104 * config/arc/t-multilib: Regenerate.
1106 2018-07-16 Tom de Vries <tdevries@suse.de>
1109 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1111 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1113 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1116 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1118 PR tree-optimization/86514
1119 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1120 conversion to a boolean type from a type with greater precision.
1122 2018-07-16 Tom de Vries <tdevries@suse.de>
1124 * var-tracking.c (vt_initialize): Print adjusted insn slim if
1125 dump_flags request TDF_SLIM.
1127 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
1129 * fold-const.c (int_const_binop_1): Abstract...
1130 (wide_int_binop): ...wide int code here.
1131 (poly_int_binop): ...poly int code here.
1132 Abstract the rest of int_const_binop_1 into int_const_binop.
1133 * fold-const.h (wide_int_binop): New.
1134 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1135 Remove useless PLUS/MINUS_EXPR case.
1136 (zero_nonzero_bits_from_vr): Move wide int code...
1137 (zero_nonzero_bits_from_bounds): ...here.
1138 (extract_range_from_binary_expr_1): Move mask optimization code...
1139 (range_easy_mask_min_max): ...here.
1140 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1141 (range_easy_mask_min_max): New.
1143 2018-07-15 Jeff Law <law@redhat.com>
1146 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1149 2018-07-14 Jim Wilson <jimw@sifive.com>
1151 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1153 2018-07-14 Paul Koning <ni1d@arrl.net>
1155 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1157 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
1159 * lto-streamer-out.c (copy_function_or_variable): Dump info about
1162 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
1163 Steve Munroe <munroesj52@gmail.com>
1165 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1166 (_mm_andnot_si128): Likewise.
1167 (_mm_or_si128): Likewise.
1168 (_mm_xor_si128): Likewise.
1170 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
1173 * builtins.c (expand_builtin_memcmp): Inline the calls first
1174 when result_eq is false.
1175 (expand_builtin_strcmp): Inline the calls first.
1176 (expand_builtin_strncmp): Likewise.
1177 (inline_string_cmp): New routine. Expand a string compare
1178 call by using a sequence of char comparison.
1179 (inline_expand_builtin_string_cmp): New routine. Inline expansion
1180 a call to str(n)cmp/memcmp.
1181 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1183 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1185 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
1187 * config/arm/driver-arm.c: Include arm-native.h.
1188 (host_detect_local_cpu): Use auto-generated data tables.
1189 (vendors, arm_cpu_table): Delete. Move part information to ...
1190 * config/arm/arm-cpus.in: ... here.
1191 * config/arm/parsecpu.awk (gen_native): New function.
1192 (vendor, part): New CPU fields.
1193 (END): Add support for building the native CPU detection tables.
1194 * config/arm/t-arm (arm-native.h): Add build rule.
1195 (driver-arm.o): Add dependency on arm-native.h.
1197 2018-07-13 Richard Biener <rguenther@suse.de>
1200 * match.pd (addr1 - addr2): Allow either of the operand to
1203 2018-07-13 Tom de Vries <tdevries@suse.de>
1205 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1208 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
1210 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1211 arrays instead of numbered variables.
1213 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
1215 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1216 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1218 2018-07-13 Richard Biener <rguenther@suse.de>
1221 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1222 instead of get_context_die.
1224 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
1225 Richard Biener <rguenther@suse.de>
1228 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1229 that the loop latch destination where phi is defined.
1231 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
1233 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1234 (riscv_expand_epilogue): Add assertion to check interrupt mode.
1235 (riscv_set_current_function): Extract getting interrupt type to new
1237 (riscv_get_interrupt_type): New function.
1238 (riscv_merge_decl_attributes): New function, checking interrupt type is
1240 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1242 2018-07-12 Paul Koning <ni1d@arrl.net>
1244 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1247 2018-07-12 Paul Koning <ni1d@arrl.net>
1249 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1250 zero reference, add doloop_end instead.
1251 * doc/md.texi (decrement_and_branch_until_zero): Remove.
1252 (Looping patterns): Remove decrement_and_branch_until_zero. Add
1253 detail for doloop_end.
1255 2018-07-12 Martin Sebor <msebor@redhat.com>
1258 * attribs.c (decl_attributes): Reject conflicting attributes before
1259 calling attribute handlers.
1261 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1263 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1265 (gcc::dump_manager::get_dump_file_name): likewise.
1266 (dump_begin): Likewise.
1267 * dumpfile.h (dump_begin): Update prototype.
1268 (gcc::dump_manager::get_dump_file_name,
1269 gcc::dump_manager::get_dump_file_name): Update prototype.
1271 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1273 * internal-fn.h (vectorizable_internal_fn_p): New function.
1274 * tree-vect-slp.c (compatible_calls_p): Likewise.
1275 (vect_build_slp_tree_1): Remove nops argument. Handle calls
1276 to internal functions.
1277 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1279 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1281 * fold-const.h (inverse_conditions_p): Declare.
1282 * fold-const.c (inverse_conditions_p): New function.
1283 * match.pd: Use inverse_conditions_p. Add folds of view_converts
1284 that test the inverse condition of a conditional internal function.
1285 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1286 * internal-fn.c (internal_fn_mask_index): Handle conditional
1288 (vectorized_internal_fn_supported_p): New function.
1289 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1290 (any_pred_load_store): Replace with...
1291 (need_to_predicate): ...this new variable.
1292 (redundant_ssa_names): New variable.
1293 (ifcvt_can_use_mask_load_store): Move initial checks to...
1294 (ifcvt_can_predicate): ...this new function. Handle tree codes
1295 for which a conditional internal function exists.
1296 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1297 instead of ifcvt_can_use_mask_load_store. Update after variable
1299 (predicate_load_or_store): New function, split out from
1300 predicate_mem_writes.
1301 (check_redundant_cond_expr): New function.
1302 (value_available_p): Likewise.
1303 (predicate_rhs_code): Likewise.
1304 (predicate_mem_writes): Rename to...
1305 (predicate_statements): ...this. Use predicate_load_or_store
1306 and predicate_rhs_code.
1307 (combine_blocks, tree_if_conversion): Update after above name changes.
1308 (ifcvt_local_dce): Handle redundant_ssa_names.
1309 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1310 general conditional functions.
1311 * tree-vect-stmts.c (vectorizable_call): Likewise.
1313 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1314 Alan Hayward <alan.hayward@arm.com>
1315 David Sherwood <david.sherwood@arm.com>
1317 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1318 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1319 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1320 plus and minus and convert them into IFN_COND_FMA-based sequences.
1321 (convert_mult_to_fma): Handle conditional plus and minus.
1323 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1325 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1326 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1327 (cond_fnms_optab): New optabs.
1328 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1330 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1331 * internal-fn.h (get_conditional_internal_fn): Declare.
1332 (get_unconditional_internal_fn): Likewise.
1333 * internal-fn.c (cond_ternary_direct): New macro.
1334 (expand_cond_ternary_optab_fn): Likewise.
1335 (direct_cond_ternary_optab_supported_p): Likewise.
1336 (FOR_EACH_COND_FN_PAIR): Likewise.
1337 (get_conditional_internal_fn): New function.
1338 (get_unconditional_internal_fn): Likewise.
1339 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1340 (gimple_match_op::gimple_match_op): Add a new overload for 5
1342 (gimple_match_op::set_op): Likewise.
1343 (gimple_resimplify5): Declare.
1344 * genmatch.c (decision_tree::gen): Generate simplifications for
1346 * gimple-match-head.c (gimple_simplify): Define an overload for
1347 5 operands. Handle calls with 5 arguments in the top-level overload.
1348 (convert_conditional_op): Handle conversions from unconditional
1349 internal functions to conditional ones.
1350 (gimple_resimplify5): New function.
1351 (build_call_internal): Pass a fifth operand.
1352 (maybe_push_res_to_seq): Likewise.
1353 (try_conditional_simplification): Try converting conditional
1354 internal functions to unconditional internal functions.
1355 Handle 3-operand unconditional forms.
1356 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1357 Define ternary equivalents of the current rules for binary conditional
1359 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1361 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1362 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1363 (optab): Handle them.
1364 (SVE_COND_FP_TERNARY): New int iterator.
1365 (sve_fmla_op, sve_fmad_op): New int attributes.
1366 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1367 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1368 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1370 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1372 * target.def (preferred_else_value): New target hook.
1373 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1374 * doc/tm.texi: Regenerate.
1375 * targhooks.h (default_preferred_else_value): Declare.
1376 * targhooks.c (default_preferred_else_value): New function.
1377 * internal-fn.h (conditional_internal_fn_code): Declare.
1378 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1379 (get_conditional_internal_fn): Use it.
1380 (conditional_internal_fn_code): New function.
1381 * gimple-match.h (gimple_match_cond): New struct.
1382 (gimple_match_op): Add a cond member function.
1383 (gimple_match_op::gimple_match_op): Update all forms to take a
1385 * genmatch.c (expr::gen_transform): Use the same condition as res_op
1386 for the suboperation, but don't specify a particular else_value.
1387 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1388 (visit_nary_op, visit_reference_op_load): Pass
1389 gimple_match_cond::UNCOND to the gimple_match_op constructor.
1390 * gimple-match-head.c: Include tree-eh.h
1391 (convert_conditional_op): New function.
1392 (maybe_resimplify_conditional_op): Likewise.
1393 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1394 (gimple_resimplify2): Likewise.
1395 (gimple_resimplify3): Likewise.
1396 (gimple_resimplify4): Likewise.
1397 (maybe_push_res_to_seq): Return null for conditional operations.
1398 (try_conditional_simplification): New function.
1399 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
1401 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1403 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1405 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1407 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1409 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1411 (hash_tree): Do not hash DECL_FCONTEXT
1412 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1413 Do not stream DECL_FCONTEXT.
1414 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1415 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1417 2018-07-12 Richard Biener <rguenther@suse.de>
1420 * dwarf2out.c (gen_block_die): Only output blocks when they have
1421 at least one !DECL_IGNORED_P variable.
1423 2018-07-12 Richard Biener <rguenther@suse.de>
1426 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1427 Remove -mieee-fp handling.
1429 2018-07-12 Richard Biener <rguenther@suse.de>
1431 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1432 left-over from last patch.
1434 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1436 PR tree-optimization/86492
1437 * gimple-ssa-store-merging.c
1438 (imm_store_chain_info::coalesce_immediate_stores): Call
1439 check_no_overlap even for the merge_overlapping case. Formatting fix.
1441 2018-07-12 Richard Biener <rguenther@suse.de>
1444 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1445 move possibly trapping operations into the conditional.
1447 2018-07-12 Richard Biener <rguenther@suse.de>
1449 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1450 (vn_lookup_simplify_result): Remove recursion limit applied
1452 (vn_nary_build_or_lookup_1): Adjust.
1453 (try_to_simplify): Likewise.
1454 * gimple-match-head.c (gimple_resimplify1): Instead apply one
1456 (gimple_resimplify2): Likewise.
1457 (gimple_resimplify3): Likewise.
1458 (gimple_resimplify4): Likewise.
1460 2018-07-11 Jakub Jelinek <jakub@redhat.com>
1462 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1463 Use __mmask64 type instead of __mmask8 for __M argument.
1464 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1465 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1467 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1468 __mmask16 for __M argument.
1469 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1470 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1471 to __mmask16 instead of __mmask8.
1472 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1473 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1474 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1475 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1476 instead of __mmask16 for __U argument.
1477 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1478 __mmask16 instead of __mmask8 for __U argument.
1479 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1481 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1483 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1485 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1487 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1489 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1491 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1493 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1495 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1497 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1499 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1500 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1501 return type as well as __M argument type and all casts from __mmask8
1503 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1504 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1505 return type as well as __M argument type and all casts from __mmask8
1507 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1508 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1509 return type as well as __M argument type and all casts from __mmask8
1511 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1512 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1513 return type as well as __M argument type and all casts from __mmask8
1515 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1516 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1519 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
1521 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1522 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1525 2018-07-11 Paul Koning <ni1d@arrl.net>
1527 * doc/md.texi (define_subst): Document how multiple occurrences of
1528 the same argument in the replacement pattern are handled.
1530 2018-07-11 Paul Koning <ni1d@arrl.net>
1532 * doc/extend.texi (Common Variable Attributes): Move "mode" into
1534 (Common Type Attributes): Add "mode" attribute.
1536 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
1538 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1539 stream DECL_ORIGINAL_TYPE.
1540 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1541 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1542 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1543 Do not walk original type.
1544 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1546 (write_ts_decl_non_common_tree_pointers): Do not stream
1548 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1549 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1551 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1553 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1554 thread twice from the same starting edge.
1556 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1558 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1559 * gimple.c (gimple_call_nonnull_result_p): ...here...
1560 (gimple_call_nonnull_arg): ...and here.
1561 * gimple.h (gimple_call_nonnull_result_p): New.
1562 (gimple_call_nonnull_arg): New.
1564 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1566 * config/arm/arm-cpus.in: Move information from fpu field of each
1567 cpu definition to the isa field.
1568 * config/arm/parsecpu.awk (fpu): Delete match rule.
1569 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1571 2018-07-11 Richard Biener <rguenther@suse.de>
1574 * dwarf2out.c (init_sections_and_labels): Use
1575 output_asm_line_debug_info consistently.
1576 (dwarf2out_early_finish): Likewise.
1577 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1580 2018-07-11 Richard Biener <rguenther@suse.de>
1582 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1583 Rework father_bb setting in a way to avoid propagating constants
1584 multiple times on a loop body.
1586 2018-07-10 Mark Wielaard <mark@klomp.org>
1589 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1591 2018-07-10 Richard Biener <rguenther@suse.de>
1593 * hash-map.h (hash_map::iterator::operator*): Return
1594 references to key and value.
1596 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1599 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1600 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1601 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1602 (gimplify_omp_for): For composite loops, move outer
1603 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1604 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
1605 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
1606 TREE_LIST for both the original class iterator and the "last" helper
1607 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
1608 loop, remember has_decl_expr from outer composite loops for the
1609 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1611 2018-07-09 Martin Sebor <msebor@redhat.com>
1615 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1616 accessing implicitly initialized array elements.
1617 * expr.c (string_constant): Handle string initializers of
1618 character arrays within aggregates.
1619 * gimple-fold.c (fold_array_ctor_reference): Add argument.
1620 Store element offset. As a special case, handle zero size.
1621 (fold_nonarray_ctor_reference): Same.
1622 (fold_ctor_reference): Add argument. Store subobject offset.
1623 * gimple-fold.h (fold_ctor_reference): Add argument.
1625 2018-07-09 Paul Koning <ni1d@arrl.net>
1627 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1628 (pdp11_insn_cost): New function.
1629 (pdp11_md_asm_adjust): New function.
1630 (TARGET_INVALID_WITHIN_DOLOOP): Define.
1631 (pdp11_rtx_costs): Update to match machine better.
1632 (output_addr_const_pdp11): Correct format mismatch warnings.
1633 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1634 * config/pdp11/pdp11.md: General change to add base_cost and/or
1635 length attributes for use by new pdp11_insn_cost function.
1636 (MIN_BRANCH): Correct definition.
1638 (doloop_end): Use standard pattern name for looping pattern.
1639 (doloop_end_nocc): New.
1640 (movsf): Add another constraint alternative.
1641 (zero_extendqihi2): Add constraint alternatives for not in place
1643 (zero_extendhisi2): Remove.
1644 (shift patterns): Add CC handling variants.
1648 (define_peephole2): New peephole to recognize mov that sets CC for
1651 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1653 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1654 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1657 2018-07-09 Jakub Jelinek <jakub@redhat.com>
1660 * real.c (real_nextafter): Return true if result is denormal.
1662 2018-07-09 Martin Liska <mliska@suse.cz>
1664 * common.opt: Add back wrongly removed attribute.
1666 2018-07-09 Richard Biener <rguenther@suse.de>
1669 * dwarf2out.c (gen_block_die): For an early generated DIE
1670 always output high/low PC attributes.
1672 2018-07-09 Tom de Vries <tdevries@suse.de>
1674 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1675 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1676 onto VAR_DECL with abstract origin.
1678 2018-07-07 Jim Wilson <jimw@sifive.com>
1680 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1682 2018-07-07 Tom de Vries <tdevries@suse.de>
1684 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1686 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
1688 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1690 (combine_bound): Use wide-int overflow calculation instead of
1692 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1694 * fold-const.c (int_const_binop_2): Same.
1695 (extract_muldiv_1): Same.
1696 (fold_div_compare): Same.
1697 (fold_abs_const): Same.
1699 * poly-int.h (add): Same.
1703 * predict.c (predict_iv_comparison): Same.
1704 * profile-count.c (slow_safe_scale_64bit): Same.
1705 * simplify-rtx.c (simplify_const_binary_operation): Same.
1706 * tree-chrec.c (tree_fold_binomial): Same.
1707 * tree-data-ref.c (split_constant_offset_1): Same.
1708 * tree-if-conv.c (idx_within_array_bound): Same.
1709 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1710 * tree-ssa-phiopt.c (minmax_replacement): Same.
1711 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1712 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1713 * vr-values.c (vr_values::adjust_range_with_scev): Same.
1714 * wide-int.cc (wi::add_large): Same.
1715 (wi::mul_internal): Same.
1716 (wi::sub_large): Same.
1717 (wi::divmod_internal): Same.
1718 * wide-int.h: Change overflow type to overflow_type for neg, add,
1719 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1720 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1721 mul_internal, divmod_internal.
1722 (overflow_type): New enum.
1723 (accumulate_overflow): New.
1725 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1727 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1728 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1730 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1732 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1733 argument is checked for zero before entering loop, avoid checking again.
1735 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1737 * gimplify.h (generic_expr_could_trap_p): Set as global function.
1738 * gimplify.h (generic_expr_could_trap_p): Likwise.
1739 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1741 2018-07-06 Jakub Jelinek <jakub@redhat.com>
1743 PR tree-optimization/86401
1744 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1745 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1746 (fold_bit_and_mask): ... here. New helper function for match.pd.
1747 * fold-const.h (fold_bit_and_mask): Declare.
1748 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1750 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1753 * target.def (translate_mode_attribute): New hook.
1754 * targhooks.h (default_translate_mode_attribute): Declare.
1755 * targhooks.c (default_translate_mode_attribute): New function.
1756 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1757 * doc/tm.texi: Regenerate.
1758 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1759 (rs6000_translate_mode_attribute): New function.
1761 2018-07-06 Paul Koning <ni1d@arrl.net>
1763 * doc/md.texi (define_split): Document DONE and FAIL.
1764 (define_peephole2): Ditto.
1766 2018-07-05 Jeff Law <law@redhat.com>
1768 PR tree-optimization/86010
1769 * tree-ssa-dse.c (compute_trims): More aggressively trim at
1770 both the head and tail of mem* and str* calls.
1772 2018-07-05 Jim Wilson <jimw@sifive.com>
1774 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1776 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
1778 * config/aarch64/aarch64-simd.md: correct flags text for
1779 MIN_EXPR replacement.
1781 2018-07-05 James Clarke <jrtc27@jrtc27.com>
1783 * configure: Regenerated.
1785 2018-07-05 Carl Love <cel@us.ibm.com>
1787 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1788 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1789 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1790 VSX_BUILTIN_DOUBLEL_V4SF.
1792 2018-07-05 Martin Sebor <msebor@redhat.com>
1795 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1796 than its domain to compute its the upper bound of a char array.
1798 2018-07-05 Nathan Sidwell <nathan@acm.org>
1800 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1801 * doc/cpp.texi: Update comment.
1802 * doc/tm.texi: Rebuilt.
1803 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1804 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1805 * doc/extend.texi (Backwards Compatibility): Clarify it is system
1806 headers affected by extern "C".
1807 * system.h: Poison NO_IMPLICIT_EXTERN_C.
1808 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1809 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1810 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1811 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1812 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1813 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1814 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1815 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1816 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1817 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1818 config/sparc/sp64-elf.h, config/spu/spu.h,
1819 config/stormy16/stormy16.h, config/v850/v850.h,
1820 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1821 define NO_IMPLICIT_EXTERN_C.
1822 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1824 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1827 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1828 instead of GET_MODE_SIZE when comparing Units.
1830 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1833 * rtlanal.c (set_noop_p): Constrain on mode change,
1834 include hard-reg-set.h
1836 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1838 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1840 2018-07-05 Jakub Jelinek <jakub@redhat.com>
1843 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1846 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1848 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1850 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1853 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1855 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1857 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
1860 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1862 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
1864 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1865 neg_*_op* variables.
1867 2018-07-04 Martin Liska <mliska@suse.cz>
1869 * tree-switch-conversion.c: Define
1870 max_ratio_for_speed and max_ratio_for_size constants.
1872 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1873 Martin Liska <mliska@suse.cz>
1878 * common.opt: Rename align options with 'str_' prefix.
1879 * common/config/i386/i386-common.c (set_malign_value): New
1881 (ix86_handle_option): Use it to set -falign-* options/
1882 * config/aarch64/aarch64-protos.h (struct tune_params): Change
1883 type from int to string.
1884 * config/aarch64/aarch64.c: Update default values from int
1886 * config/alpha/alpha.c (alpha_override_options_after_change):
1888 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1889 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1890 max skip conditionally.
1891 * config/i386/freebsd.h (SUBALIGN_LOG): New.
1892 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1893 max skip conditionally.
1894 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1895 max skip conditionally.
1896 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1897 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1898 max skip conditionally.
1899 * config/i386/i386.c (struct ptt): Change type from int to
1901 (ix86_default_align): Set default values.
1902 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1903 max skip conditionally.
1904 * config/i386/iamcu.h (SUBALIGN_LOG): New.
1905 (ASM_OUTPUT_MAX_SKIP_ALIGN):
1906 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1907 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1908 max skip conditionally.
1909 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1910 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1911 * config/i386/x86-64.h (SUBALIGN_LOG): New.
1912 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1913 max skip conditionally.
1914 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1915 * config/ia64/ia64.c (ia64_option_override): Set default values
1916 for alignment options.
1917 * config/m68k/m68k.c: Handle new str_align_* options.
1918 * config/mips/mips.c (mips_set_compression_mode): Change
1920 (mips_option_override): Set default values for options.
1921 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1923 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1925 * config/rx/rx.c (rx_option_override): Likewise.
1926 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1927 (LABEL_ALIGN): Use align_labels_log.
1928 (LOOP_ALIGN): Use align_loops_align.
1929 * config/s390/s390.c (s390_asm_output_function_label): Use new
1931 * config/sh/sh.c (sh_override_options_after_change):
1932 Change type of constants.
1933 * config/spu/spu.c (spu_sched_init): Likewise.
1934 * config/sparc/sparc.c (sparc_option_override): Set default
1936 * config/visium/visium.c (visium_option_override): Likewise.
1937 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1938 emit p2align format with last argument if it's not needed.
1939 * doc/invoke.texi: Document extended format of -falign-*.
1940 * final.c: Use align_labels alignment.
1941 * flags.h (struct target_flag_state): Change type to use
1943 (struct align_flags_tuple): New.
1944 (struct align_flags): Likewise.
1945 (align_loops_log): Redefine macro to use new types.
1946 (align_loops_max_skip): Redefine macro to use new types.
1947 (align_jumps_log): Redefine macro to use new types.
1948 (align_jumps_max_skip): Redefine macro to use new types.
1949 (align_labels_log): Redefine macro to use new types.
1950 (align_labels_max_skip): Redefine macro to use new types.
1951 (align_functions_log): Redefine macro to use new types.
1952 (align_loops): Redefine macro to use new types.
1953 (align_jumps): Redefine macro to use new types.
1954 (align_labels): Redefine macro to use new types.
1955 (align_functions): Redefine macro to use new types.
1956 (align_functions_max_skip): Redefine macro to use new types.
1957 (align_loops_value): New macro.
1958 (align_jumps_value): New macro.
1959 (align_labels_value): New macro.
1960 (align_functions_value): New macro.
1961 * function.c (invoke_set_current_function_hook): Propagate
1962 alignment values from flags to global variables default in
1964 * ipa-icf.c (sem_function::equals_wpa): Use
1965 cl_optimization_option_eq instead of memcmp.
1966 * lto-streamer.h (cl_optimization_stream_out): Support streaming
1968 (cl_optimization_stream_in): Likewise.
1969 * optc-save-gen.awk: Support strings in cl_optimization.
1970 * opth-gen.awk: Likewise.
1971 * opts.c (finish_options): Remove error checking of invalid
1973 (MAX_CODE_ALIGN): Remove.
1974 (MAX_CODE_ALIGN_VALUE): Likewise.
1975 (parse_and_check_align_values): New function.
1976 (check_alignment_argument): Likewise.
1977 (common_handle_option): Use check_alignment_argument.
1978 * opts.h (parse_and_check_align_values): Declare.
1979 * toplev.c (init_alignments): Remove.
1980 (read_log_maxskip): New.
1981 (parse_N_M): Likewise.
1982 (parse_alignment_opts): Likewise.
1983 (backend_init_target): Remove usage of init_alignments.
1984 * toplev.h (parse_alignment_opts): Declare.
1985 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1987 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1988 * tree.c (cl_option_hasher::equal): New.
1989 * varasm.c: Use new global macros.
1991 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1993 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1994 Use a simpler align directive also if MAXSKIP = ALIGN-1.
1995 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1996 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1997 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1998 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1999 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2000 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2001 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2002 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2003 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2004 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2005 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2007 2018-07-04 Martin Liska <mliska@suse.cz>
2008 Jonathan Wakely <jwakely@redhat.com>
2010 * coverage.c: Use correct type.
2011 * doc/invoke.texi: Language correction.
2013 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2016 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2017 ENDBRANCH for non-tail call which may return via indirect branch.
2018 * doc/extend.texi: Document indirect_return attribute.
2020 2018-07-03 Martin Sebor <msebor@redhat.com>
2022 PR tree-optimization/86274
2023 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2025 (format_floating): Correct handling of infinities and NaNs.
2027 2018-07-03 Martin Sebor <msebor@redhat.com>
2029 * print-tree.c (print_real_cst): New function.
2030 (print_node_brief): Call it.
2031 (print_node): Ditto.
2033 2018-07-03 Jeff Law <law@redhat.com>
2035 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2036 into a single pattern.
2038 * config/h8300/h8300.md (ors code_iterator): New.
2039 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2040 a single pattern and single splitter.
2041 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2042 (iorqi3_1, xorqi3_1): Likewise.
2043 (iorqi3, xorqi3 expanders): Similarly.
2045 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2046 (movmd_internal) into a single pattern using the P mode iterator.
2047 (movmd splitters): Similarly.
2048 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2049 (movsd splitters): Similarly.
2051 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2052 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2053 right table based on the size of the operand.
2054 * config/h8300/h8300.md (length_table): Corresponding changes. All
2055 references to "addb", "addw" and "addl" changed to "add".
2056 (btst patterns): Merge two variants into a single pattern.
2057 (tstqi, tsthi): Likewise.
2058 (addhi3_incdec, addsi3_incdec): Likewise.
2059 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2060 (mulhi3, mulsi3): Likewise.
2061 (udivhi3, udivsi3): Likewise.
2062 (divhi3, divsi3): Likewise.
2063 (andorqi3, andorhi3, andorsi3): Likewise.
2065 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2068 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2069 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2071 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2073 PR tree-optimization/85694
2074 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2075 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2077 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2078 (<u>avg<mode>3_ceil): New patterns.
2080 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2082 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2083 scan-tree-dump directive.
2084 * gcc.dg/vect/slp-perm-2.c: Likewise.
2085 * gcc.dg/vect/slp-perm-3.c: Likewise.
2086 * gcc.dg/vect/slp-perm-5.c: Likewise.
2087 * gcc.dg/vect/slp-perm-6.c: Likewise.
2088 * gcc.dg/vect/slp-perm-7.c: Likewise.
2089 * gcc.dg/vect/slp-perm-8.c: Likewise.
2091 2018-07-03 Marek Polacek <polacek@redhat.com>
2094 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2096 2018-07-03 Richard Biener <rguenther@suse.de>
2099 * tree-ssa-structalias.c (find_func_clobbers): Properly
2100 handle indirect calls.
2102 2018-07-03 Jeff Law <law@redhat.com>
2104 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2105 (shifts): New code iterator.
2106 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2107 expander. Fix HImode handling on H8/SX.
2108 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2109 (subqi3, subhi3, subsi3 expanders): Likewise.
2110 (andqi3, andhi3, andsi3 expanders): Likewise.
2111 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2112 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2113 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2114 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2115 (zero_extendqihi2, zero_extendqisi2): Likewise.
2116 (extendqihi2, extendqisi2): Likewise.
2117 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2118 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2119 (rotlqi3_1, rotlhi3_1): Likewise.
2120 (logicalhi3_sn, logicalsi3_sn): Likewise.
2121 (logicalhi3, logicalsi3): Likewise.
2123 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2125 * tree-vect-patterns.c (vect_recog_rotate_pattern)
2126 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2127 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2128 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2129 type to append_pattern_def_seq instead of creating a stmt_vec_info
2131 (build_mask_conversion): Likewise. Remove vinfo argument.
2132 (vect_add_conversion_to_patterm): Likewise, renaming to...
2133 (vect_add_conversion_to_pattern): ...this.
2134 (vect_recog_mask_conversion_pattern): Update call to
2135 build_mask_conversion. Pass the vector type to
2136 append_pattern_def_seq here too.
2137 (vect_recog_gather_scatter_pattern): Update call to
2138 vect_add_conversion_to_pattern.
2140 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2142 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2143 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2144 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2145 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2146 STMT_VINFO_PATTERN_DEF_SEQ to null here.
2147 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2148 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2149 append_pattern_def_seq instead of new_pattern_def_seq.
2150 (vect_recog_divmod_pattern): Do both of the above.
2151 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2154 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2156 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2157 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2158 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2159 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2160 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2161 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2162 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2163 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2164 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2165 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2166 parameter with a single stmt_vec_info.
2167 (vect_recog_func_ptr): Likewise.
2168 (vect_recog_gather_scatter_pattern): Likewise, folding in...
2169 (vect_try_gather_scatter_pattern): ...this.
2170 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2171 the stmt_vec_info of the statement to be matched. Don't clear
2172 STMT_VINFO_RELATED_STMT.
2173 (vect_pattern_recog): Update call accordingly.
2175 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2177 PR tree-optimization/85694
2178 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2179 (uavgM3_ceil): Document new optabs.
2180 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2181 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2183 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2184 (savg_ceil_optab): New optabs.
2185 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2186 (vect_vect_recog_func_ptrs): Add it.
2187 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2188 constant directly from the associated lhs.
2190 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2192 * tree-vect-patterns.c (vect_split_statement): New function.
2193 (vect_convert_input): Use it to try to split an existing cast.
2195 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2197 * poly-int.h (print_hex): New function.
2198 * dumpfile.h (dump_dec, dump_hex): Declare.
2199 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2200 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2201 min_input_precision, operation_precision and operation_sign.
2202 * tree-vect-patterns.c (vect_get_range_info): New function.
2203 (vect_same_loop_or_bb_p, vect_single_imm_use)
2204 (vect_operation_fits_smaller_type): Delete.
2205 (vect_look_through_possible_promotion): Add an optional
2206 single_use_p parameter.
2207 (vect_recog_over_widening_pattern): Rewrite to use new
2208 stmt_vec_info infomration. Handle one operation at a time.
2209 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2210 (vect_truncatable_operation_p, vect_set_operation_type)
2211 (vect_set_min_input_precision): New functions.
2212 (vect_determine_min_output_precision_1): Likewise.
2213 (vect_determine_min_output_precision): Likewise.
2214 (vect_determine_precisions_from_range): Likewise.
2215 (vect_determine_precisions_from_users): Likewise.
2216 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2217 (vect_vect_recog_func_ptrs): Put over_widening first.
2219 (vect_pattern_recog): Call vect_determine_precisions.
2221 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2223 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2224 statements that have been replaced by further pattern statements.
2225 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2227 2018-07-03 Richard Biener <rguenther@suse.de>
2229 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2230 always set *dt. Dump vectype in vectype overload.
2231 * dumpfile.h (dump_gimple_expr): New function.
2232 (dump_gimple_expr_loc): Likewise.
2233 * dumpfile.c (dump_gimple_expr): New function.
2234 (dump_gimple_expr_loc): Likewise.
2236 2018-07-02 Jeff Law <law@redhat.com>
2238 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2239 the H8/300, H8/300H and H8/S variants into a single pattern.
2240 (movhi_h8300, movqi_h8300hs): Similarly.
2241 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2242 (QHI mode iterator): New.
2244 * config/h8300/h8300.md: Remove trailing whitespace.
2246 2018-07-02 Jim Wilson <jimw@sifive.com>
2248 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2249 instead of emit_insn for interrupt returns.
2250 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2251 (riscv_sret, riscv_uret): Likewise.
2253 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2255 * pretty-print.c (selftest::test_pp_format): Move save and restore
2256 of quotes to class auto_fix_quotes, and add an instance.
2257 * selftest.c: Include "intl.h".
2258 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2259 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2260 * selftest.h (selftest::auto_fix_quotes): New class.
2262 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
2264 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2265 (aarch64_sve_prepare_conditional_op): Remove.
2266 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2267 Allow aarch64_simd_reg_or_zero as select operand; remove
2268 the aarch64_sve_prepare_conditional_op call.
2269 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2270 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2271 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2272 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2273 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2274 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2275 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2276 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2277 and a splitters to match all of the *_any patterns.
2278 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2280 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2281 (SVE_COND_FP_BINARY_REV): Remove.
2282 (sve_int_op_rev, sve_fp_op_rev): New.
2283 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2284 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2285 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2286 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2287 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2288 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2289 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2290 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2291 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2293 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2294 Remove match_dup 1 from the inner unspec.
2295 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2297 * config/aarch64/aarch64.md (movprfx): New attr.
2298 (length): Default movprfx to 8.
2299 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2300 (*madd<SVE_I>, *msub<SVE_I): Likewise.
2301 (*<su>mul<SVE_I>3_highpart): Likewise.
2302 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2303 (*v<ASHIFT><SVE_I>3): Likewise.
2304 (*<su><MAXMIN><SVE_I>3): Likewise.
2305 (*<su><MAXMIN><SVE_F>3): Likewise.
2306 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2307 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2308 (*div<SVE_F>4): Likewise.
2310 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
2312 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2315 2018-07-02 Richard Biener <rguenther@suse.de>
2317 PR tree-optimization/86363
2318 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2319 memset argument refers to a non-variable address.
2321 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2323 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2324 {PLUS,MINUS}_EXPR code to...
2325 (adjust_symbolic_bound): ...here,
2326 (combine_bound): ...here,
2327 (set_value_range_with_overflow): ...and here.
2329 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2331 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2333 (extract_range_from_abs_expr): ...here.
2335 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
2337 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2338 -fno-omit-frame-pointer when not optimizing.
2340 2018-07-02 Martin Liska <mliska@suse.cz>
2343 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2344 (propagate_nothrow): Likewise.
2346 2018-07-02 Martin Liska <mliska@suse.cz>
2349 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2351 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2353 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2354 function in r262149, changing "loc" param from source_location to
2355 const dump_location_t &.
2356 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2357 declaration, as above.
2359 2018-07-01 Paul Koning <ni1d@arrl.net>
2361 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2362 -munit-asm, -mgnu-asm, -mdec-asm.
2363 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2364 (pdp11_output_labelref): New.
2365 (pdp11_output_def): New.
2366 (pdp11_output_addr_vec_elt): New.
2367 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
2368 %# and %@ format codes.
2369 (pdp11_option_override): New.
2370 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2371 (pdp11_output_ident): New.
2372 (pdp11_asm_named_section): New.
2373 (pdp11_asm_init_sections): New.
2374 (pdp11_file_start): New.
2375 (pdp11_file_end): New.
2376 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2377 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2378 %o, like %c but octal.
2379 (pdp11_option_override): New.
2380 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2382 (DATA_SECTION_ASM_OP): Ditto.
2383 (READONLY_DATA_SECTION_ASM_OP): New.
2384 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2385 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2386 (ASM_OUTPUT_LABELREF): Ditto.
2387 (ASM_OUTPUT_DEF): Ditto.
2388 (ASM_OUTPUT_EXTERNAL): New.
2389 (ASM_OUTPUT_SOURCE_FILENAME): New.
2390 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2391 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2392 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
2393 %# and %@ format codes.
2394 * config/pdp11/pdp11.opt (mgnu-asm): New.
2395 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2396 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2397 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2399 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
2401 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2402 dereferencing path[] beyond its length.
2404 (debug_all_paths): New.
2405 (rewire_first_differing_edge): New.
2406 (adjust_paths_after_duplication): New.
2407 (duplicate_thread_path): Call adjust_paths_after_duplication.
2409 (thread_through_all_blocks): Add new argument to
2410 duplicate_thread_path.
2412 2018-06-30 Jim Wilson <jimw@sifive.com>
2414 * config/riscv/predicates.md (p2m1_shift_operand): New.
2415 (high_mask_shift_operand): New.
2416 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2417 pattern using p2m1_shift_operand.
2418 (lshsi3_zero_extend_3+2): New combiner pattern using
2419 high_mask_shift_operand.
2421 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2423 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2425 (vect_recog_rotate_pattern): ...here.
2426 (vect_convert_input): Try to insert casts of invariants in the
2428 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2429 preheader to be empty.
2431 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2433 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2434 vector type. If given, install it in the new statement's
2436 (vect_element_precision): New function.
2437 (vect_unpromoted_value): New struct.
2438 (vect_unpromoted_value::vect_unpromoted_value): New function.
2439 (vect_unpromoted_value::set_op): Likewise.
2440 (vect_look_through_possible_promotion): Likewise.
2441 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2442 (vect_widened_op_tree, vect_convert_input): Likewise.
2443 (vect_convert_inputs, vect_convert_output): Likewise.
2444 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2445 to handle the optional cast of the multiplication result and
2446 vect_widened_op_tree to detect the widened multiplication itself.
2447 Do not require the input and output of promotion casts to have
2448 the same sign, but base the signedness of the operation on the
2449 input rather than the result. If the pattern includes two
2450 promotions, check that those promotions have the same sign.
2451 Do not restrict the MULT_EXPR handling to a double-width result;
2452 handle quadruple-width results and wider. Use vect_convert_inputs
2453 to convert the inputs to the common type.
2454 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
2455 to handle the optional cast of the ABS result. Also allow a sign
2456 change or a sign extension between the ABS and MINUS.
2457 Use vect_widened_op_tree to detect the widened subtraction and use
2458 vect_convert_inputs to convert the inputs to the common type.
2459 (vect_handle_widen_op_by_const): Delete.
2460 (vect_recog_widen_op_pattern): New function.
2461 (vect_recog_widen_mult_pattern): Use it.
2462 (vect_recog_widen_shift_pattern): Likewise.
2463 (vect_recog_widen_sum_pattern): Use
2464 vect_look_through_possible_promotion to handle the promoted
2467 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2469 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2470 the containing gimple_seq *.
2471 * gimple-iterator.h (gsi_for_stmt): Declare it.
2472 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2473 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2474 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2475 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2476 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2478 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2480 (vect_mark_pattern_stmts): ...here. Handle cases in which the
2481 statement being replaced is part of an existing pattern
2482 definition sequence, inserting the new pattern statements before
2484 (vect_pattern_recog_1): Don't return a bool. If the statement
2485 is already part of a pattern, instead apply pattern matching
2486 to the pattern definition statements. Don't clear the
2487 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2488 (vect_pattern_recog): Don't break after the first match;
2489 continue processing the pattern definition statements instead.
2490 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2492 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2494 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2495 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2496 (vect_recog_widen_sum_pattern): Use it.
2498 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2500 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2501 phi is not a pattern statement and has not been replaced by
2502 a pattern statement.
2503 * tree-vect-patterns.c (type_conversion_p): Don't check
2504 STMT_VINFO_IN_PATTERN_P.
2505 (vect_recog_vector_vector_shift_pattern): Likewise.
2506 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2507 the pattern statement rather than the original statement; check
2508 directly for a WIDEN_MULT_EXPR here.
2509 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2510 vect_is_simple_use to return the pattern statement rather
2511 than the original statement; use is_pattern_stmt_p to check
2512 for such a pattern statement.
2513 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2514 to return the pattern statement rather than the original statement;
2515 don't do the same transformation here.
2516 (vect_is_simple_use): If the defining statement has been replaced
2517 by a pattern statement, return the pattern statement instead.
2518 Remove the corresponding (local) transformation from the vectype
2521 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2523 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2524 end and default to null.
2525 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2526 (vectorizable_reduction): Update calls accordingly, dropping the
2527 gimple ** argument if the passed-back statement isn't needed.
2528 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2529 (vect_recog_rotate_pattern): Likewise.
2530 (vect_recog_mask_conversion_pattern): Likewise.
2531 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2532 (vect_mask_constant_operand_p): Likewise.
2533 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2534 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2535 (get_group_load_store_type, get_load_store_type): Likewise.
2536 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2537 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2538 (vectorizable_conversion, vectorizable_assignment): Likewise.
2539 (vectorizable_shift, vectorizable_operation): Likewise.
2540 (vectorizable_store, vect_is_simple_cond): Likewise.
2541 (vectorizable_condition, vectorizable_comparison): Likewise.
2542 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2543 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2544 and move it to the end. Cope with null def_stmt_outs.
2546 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2548 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2550 2018-06-29 Jeff Law <law@redhat.com>
2552 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2553 displacements for TARGET_V850E2V3 and newer.
2554 (TARGET_LRA_P): Remove. Defaults to LRA now.
2555 * config/v850/v850.md (sign23byte_load): Remove.
2556 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2557 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2559 2018-06-29 Martin Liska <mliska@suse.cz>
2562 * coverage.c (coverage_init): Mangle full path name.
2563 * doc/invoke.texi: Document the change.
2564 * gcov-io.c (mangle_path): New.
2565 * gcov-io.h (mangle_path): Likewise.
2566 * gcov.c (mangle_name): Use mangle_path for path mangling.
2568 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2570 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2571 if starting source register is not even.
2573 2018-06-29 Martin Liska <mliska@suse.cz>
2575 PR tree-optimization/86263
2576 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2577 Make edge redirection.
2579 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2581 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2582 (dump_scope_depth): New variable.
2583 (get_dump_scope_depth): New function.
2584 (dump_begin_scope): New function.
2585 (dump_end_scope): New function.
2586 * dumpfile.h (get_dump_scope_depth): New declaration.
2587 (dump_begin_scope): New declaration.
2588 (dump_end_scope): New declaration.
2589 (class auto_dump_scope): New class.
2590 (AUTO_DUMP_SCOPE): New macro.
2591 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2594 2018-06-29 Richard Biener <rguenther@suse.de>
2596 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2597 compute_all_dependences succeeds.
2598 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2599 exceed --param loop-max-datarefs-for-datadeps.
2601 2018-06-29 Jakub Jelinek <jakub@redhat.com>
2603 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2605 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
2608 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2609 alternative 0 in preferred_for_speed attribute.
2611 2018-06-28 Paul Koning <ni1d@arrl.net>
2613 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2614 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2615 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2616 * config/pdp11/pdp11.md: Correct "length" attribute calculation
2617 for shift insn patterns.
2619 2018-06-28 David Malcolm <dmalcolm@redhat.com>
2621 * cgraph.c (cgraph_node::get_body): Replace assignments to
2622 "dump_file" with calls to set_dump_file.
2623 * dumpfile.c (alt_dump_file): Make static, and group with...
2624 (alt_flags): ...this definition.
2625 (dumps_are_enabled): New variable.
2626 (refresh_dumps_are_enabled): New function.
2627 (set_dump_file): New function.
2628 (set_alt_dump_file): New function.
2629 (gcc::dump_manager::dump_start): Replace assignments to
2630 "dump_file" and "alt_dump_file" with calls to set_dump_file and
2632 (gcc::dump_manager::dump_finish): Likewise.
2633 * dumpfile.h (alt_dump_file): Delete decl.
2634 (dumps_are_enabled): New variable decl.
2635 (set_dump_file): New function decl.
2636 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2638 * tree-nested.c (lower_nested_functions): Replace assignments to
2639 "dump_file" with calls to set_dump_file.
2641 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2643 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2644 goto_locus of each outgoing edge of each basic block.
2646 2018-06-28 Richard Biener <rguenther@suse.de>
2648 * dwarf2out.c (decl_scope_table): Remove.
2649 (push_decl_scope): Likewise.
2650 (pop_decl_scope): Likewise.
2651 (gen_type_die_for_member): Do not call push/pop_decl_scope.
2652 (gen_struct_or_union_type_die): Likewise.
2653 (gen_tagged_type_die): Likewise.
2654 (dwarf2out_init): Do not initialize decl_scope_table.
2655 (dwarf2out_c_finalize): Do not free it.
2657 2018-06-28 Richard Biener <rguenther@suse.de>
2659 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2660 deciding whether to not re-use a DIE.
2662 2018-06-28 Richard Biener <rguenther@suse.de>
2664 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2665 DW_AT_abstract_origin attribute.
2667 2018-06-28 Martin Liska <mliska@suse.cz>
2669 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2670 Use newly introduced constants.
2671 * tree-switch-conversion.h (struct jump_table_cluster):
2672 Define max_ratio_for_size and max_ratio_for_speed.
2674 2018-06-28 Martin Liska <mliska@suse.cz>
2676 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2677 Add new checking assert to catch invalid state.
2678 (jump_table_cluster::can_be_handled): Handle single case
2680 (jump_table_cluster::is_beneficial): Bail out for such case.
2681 (bit_test_cluster::find_bit_tests):
2682 Add new checking assert to catch invalid state.
2683 (bit_test_cluster::can_be_handled): Handle single case
2685 (bit_test_cluster::is_beneficial): Bail out for such case.
2686 (switch_decision_tree::analyze_switch_statement):
2689 2018-06-28 Martin Liska <mliska@suse.cz>
2691 * common.opt: Introduce -completion option.
2692 * gcc.c (driver_handle_option): Handle it.
2693 (driver::main): Print completions if completion
2695 * opt-suggestions.c (option_proposer::get_completions):
2697 (option_proposer::suggest_completion): Likewise.
2698 (option_proposer::find_param_completions): Likewise.
2699 (verify_autocompletions): Likewise.
2700 (test_completion_valid_options): Likewise.
2701 (test_completion_valid_params): Likewise.
2702 (in_completion_p): Likewise.
2703 (empty_completion_p): Likewise.
2704 (test_completion_partial_match): Likewise.
2705 (test_completion_garbage): Likewise.
2706 (opt_proposer_c_tests): Likewise.
2707 * opt-suggestions.h: Declare new functions.
2708 * opts.c (common_handle_option): Handle OPT__completion_.
2709 * selftest-run-tests.c (selftest::run_tests): Add
2710 opt_proposer_c_tests.
2711 * selftest.c (assert_str_startswith): New.
2712 * selftest.h (assert_str_startswith): Likewise.
2713 (opt_proposer_c_tests): New.
2714 (ASSERT_STR_STARTSWITH): Likewise.
2716 2018-06-28 Martin Liska <mliska@suse.cz>
2718 * Makefile.in: Add opt-suggestions.o.
2719 * gcc-main.c: Include opt-suggestions.h.
2720 * gcc.c (driver::driver): Likewise.
2721 (driver::~driver): Remove m_option_suggestions.
2722 (driver::build_option_suggestions): Moved to option_proposer.
2723 (driver::suggest_option): Likewise.
2724 (driver::handle_unrecognized_options): Use option_proposer.
2725 * gcc.h (class driver): Add new memver m_option_proposer.
2726 * opt-suggestions.c: New file.
2727 * opt-suggestions.h: New file.
2729 2018-06-28 Martin Liska <mliska@suse.cz>
2731 * vec.h (class auto_string_vec): New (moved from auto_argvec).
2732 (auto_string_vec::~auto_string_vec): Likewise.
2734 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2736 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2737 prevent_decl_creation_for_types fields up and add reset_location field.
2738 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2739 statement if id->reset_location is true.
2740 (copy_edges_for_bb): Do not set goto_locus on the new edges if
2741 id->reset_location is true.
2742 (copy_phis_for_bb): Force input_location on the arguments if
2743 id->reset_location is true.
2744 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2745 is set on the function to be inlined.
2747 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
2749 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2751 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
2753 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2754 registers for Pmode.
2755 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2756 hard registers for the clobbered pseudo.
2758 2018-06-27 Paul Koning <ni1d@arrl.net>
2760 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2761 mutually exclusive options.
2762 * config/pdp11/constraints.md (h): New constraint.
2763 (O): Update definition to match shift code generation.
2764 (D): New constraint.
2765 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2767 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2769 (output_jump): Change arguments.
2770 (pdp11_fixed_cc_regs): New function.
2771 (pdp11_cc_mode): Ditto.
2772 (pdp11_expand_shift): Ditto.
2773 (pdp11_assemble_shift): Ditto.
2774 (pdp11_small_shift): Ditto.
2775 (pdp11_branch_cost): Remove.
2776 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2778 (pdp11_register_move_cost): Update for CC registers.
2779 (pdp11_rtx_costs): Add case for LSHIFTRT.
2780 (pdp11_output_jump): Add CCNZ mode conditional branches.
2781 (notice_update_cc_on_set): Remove.
2782 (pdp11_cc_mode): New function.
2783 (simple_memory_operand): Correct pre/post decrement case.
2784 (no_side_effect_operand): New function.
2785 (pdp11_regno_reg_class): Add CC_REGS class.
2786 (pdp11_fixed_cc_regs): New function.
2787 (pdp11_small_shift): New function.
2788 (pdp11_expand_shift): New function to expand shift insns.
2789 (pdp11_assemble_shift): New function to output shifts.
2790 (pdp11_branch_cost): Remove.
2791 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2792 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2793 (WCHAR_TYPE): Ditto.
2794 (PTRDIFF_TYPE): Ditto.
2795 (ADJUST_INSN_LENGTH): New macro.
2796 (FIXED_REGISTERS): Add CC registers.
2797 (CALL_USED_REGISTERS): Ditto.
2799 (REG_CLASS_NAMES): Ditto.
2800 (REG_CLASS_CONTENTS): Ditto.
2801 (SELECT_CC_MODE): Use new function.
2802 (TARGET_FLAGS_REGNUM): New macro.
2803 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2804 (cc0_reg_rtx): Remove.
2805 (CC_STATUS_MDEP): Remove.
2806 (CC_STATUS_MDEFP_INIT): Remove.
2807 (CC_IN_FPU): Remove.
2808 (NOTICE_UPDATE_CC): Remove.
2809 (REGISTER_NAMES): Add CC registers.
2810 (BRANCH_COST): Change to constant 1.
2811 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2813 * config/pdp11/pdp11.opt (mbcopy): Remove.
2814 (mbcopy-builtin): Remove.
2815 (mbranch-cheap): Remove.
2816 (mbranch-expensive): Remove.
2817 * config/pdp11/predicates.md (expand_shift_operand): Update to
2818 match shift code generation.
2819 (ccnz_operator): New predicate.
2820 * doc/invoke.texi (PDP-11 Options): Remove deleted options
2821 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2822 Remove non-existent option -mabshi, -mno-abshi. Document mutually
2824 * doc/md.texi (PDP-11): Document new D and h constraints. Update
2825 description of O constraint.
2827 2018-06-27 Jeff Law <law@redhat.com>
2828 Austin Law <austinklaw@gmail.com>
2830 * config/v850/v850.md (addsi3_set_flags): New pattern.
2831 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2832 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2833 (zero_extendhisi2_v850_set_flags): Likewise.
2834 (zero_extendqisi2_v850_set_flags): Likewise.
2835 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2836 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2837 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2839 * config/v850/v850-protos.h (notice_update_cc): Remove.
2840 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2841 (v850_print_operand): Handle 'D' and "d".
2842 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2843 Add handling of arithmetic/logical operations compared against zero.
2844 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2845 Do not look at v850_compare_op, instead get mode from last argument.
2846 (v850_gen_compare): Remove
2847 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2848 after reload for prologue insns.
2849 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2851 (construct_save_jarl): Likewise.
2852 (TARGET_FLAGS_REGNUM): Define.
2853 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2854 (NOTICE_UPDATE_CC): Remove.
2855 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2856 than cc0. Conditionalize on reload_completed.
2857 (cmpsi_insn, setfcc_insn): Likewise.
2858 (tst1 splitter): Turn into define_and_split which sets the flags
2860 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2861 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2862 (cstoresf4, cstoredf4): Clobber the flags.
2863 (cmpsi, cmpsf, cmpdf): Remove expanders.
2864 (setf_insn): Remove pattern.
2865 (addsi3): Turn into define_and_split which clobbers the flags after
2866 reload and a suitable pattern (addsi3_clobber_flags) for use after
2868 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2869 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2870 (ashrsi3, ashrsi3_v850e2): Likewise.
2871 (bins): Clobber the flags.
2872 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2873 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2874 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2875 (call_value_internal_short, call_value_internal_long): Likewise.
2876 (callt_save_interrupt, callt_return_interrupt): Likewise.
2877 (save_interrupt, return_interrupt): Likewise.
2878 (callt_save_all_interrupt, save_all_interrupt): Likewise.
2879 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2880 (restore_all_interrupt, _restore_all_interrupt): Likewise.
2881 (All FP comparisons): Only allow after reload has completed.
2883 (divh, divhu): Tweak output template.
2884 (branch_z_normal, branch_z_invert): Remove
2885 (branch_nz_normal, branch_nz_invert): Likewise.
2886 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2888 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2889 * config/v850/v850.c (notice_update_cc): Remove.
2890 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
2891 (CC_NO_CARRY): Likewise.
2892 (NOTICE_UPDATE_CC): Define to nothing.
2893 * config/v850/v850.md: Remove block comment on cc0 handling
2894 Remove "cc" attribute from all patterns. Remove cc_status handling
2895 from all patterns. Minor formatting fixes.
2897 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2899 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2900 (cortex-a76.cortex-a55): Likewise.
2901 * config/aarch64/aarch64-tune.md: Regenerate.
2902 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2903 cortex-a76.cortex-a55.
2905 2018-06-27 Jeff Law <law@redhat.com>
2907 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2908 (MULTILIB_DIRNAMES): Similarly.
2910 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
2912 * gimple.h (gimple_return_retbnd): Delete.
2913 (gimple_return_set_retbnd): Likewise.
2914 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2915 gimple_return_set_retbnd.
2916 * gimple-pretty-print.c (dump_gimple_return): Remove call to
2917 gimple_return_retbnd and adjust.
2918 * tree-inline.h (struct copy_body_data): Remove retbnd field.
2919 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2920 Explicitly return NULL in a couple more cases. Move assertion
2921 on debug statements and remove unreachable code.
2922 (reset_debug_binding): Do not test id->retbnd.
2923 (expand_call_inline): Do not set it.
2925 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2927 * configure.ac: Add --disable-gcov option.
2928 * configure: Regenerate.
2929 * Makefile.in: Honour @enable_gcov@.
2930 * doc/install.texi: Document --disable-gcov.
2932 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2934 * config/arm/arm-cpus.in (cortex-a76): New entry.
2935 (cortex-a76.cortex-a55): Likewise.
2936 * config/arm/arm-tables.opt: Regenerate.
2937 * config/arm/arm-tune.md: Likewise.
2938 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2939 * doc/invoke.texi (ARM Options): Document cortex-a76 and
2940 cortex-a76.cortex-a55.
2942 2018-06-27 Tamar Christina <tamar.christina@arm.com>
2945 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2947 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
2949 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2951 (EPILOGUE_USES): Likewise.
2953 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
2955 * tree-inline.c (remap_location): New function extracted from...
2956 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
2957 (copy_phis_for_bb): ...here. Call remap_location.
2958 (copy_cfg_body): Adjust call to copy_edges_for_bb.
2960 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2962 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2963 unaligned vsx for 16B memset.
2965 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
2968 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2969 ieee128_float_type_node to long_double_type_node unless
2970 TARGET_LONG_DOUBLE_128 is set.
2972 2018-06-26 David Malcolm <dmalcolm@redhat.com>
2974 * cfgloop.c (get_loop_location): Convert return type from
2975 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2976 by implicit construction from rtx_insn *, and using
2977 dump_user_location_t::from_function_decl for the fallback case.
2978 * cfgloop.h (get_loop_location): Convert return type from
2979 location_t to dump_user_location_t.
2980 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2981 dump_printf_loc to pass in a dump_location_t rather than a
2982 location_t, via the gimple stmt.
2983 * coverage.c (get_coverage_counts): Update calls to
2984 dump_printf_loc to pass in dump_location_t rather than a
2986 * doc/optinfo.texi (Dump types): Convert example of
2987 dump_printf_loc from taking "locus" to taking "insn". Update
2988 description of the "_loc" calls to cover dump_location_t.
2989 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2991 (dump_user_location_t::dump_user_location_t): New constructors,
2992 from gimple *stmt and rtx_insn *.
2993 (dump_user_location_t::from_function_decl): New function.
2994 (dump_loc): Make static.
2995 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2996 const dump_location_t &.
2997 (dump_generic_expr_loc): Delete.
2998 (dump_printf_loc): Convert param "loc" from location_t to
2999 const dump_location_t &.
3000 (selftest::test_impl_location): New function.
3001 (selftest::dumpfile_c_tests): New function.
3002 * dumpfile.h: Include "profile-count.h".
3003 (class dump_user_location_t): New class.
3004 (struct dump_impl_location_t): New struct.
3005 (class dump_location_t): New class.
3006 (dump_printf_loc): Convert 2nd param from source_location to
3007 const dump_location_t &.
3008 (dump_generic_expr_loc): Delete.
3009 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3010 const dump_location_t &.
3011 * gimple-fold.c (fold_gimple_assign): Update call to
3012 dump_printf_loc to pass in a dump_location_t rather than a
3013 location_t, via the gimple stmt.
3014 (gimple_fold_call): Likewise.
3015 * gimple-loop-interchange.cc
3016 (loop_cand::analyze_iloop_reduction_var): Update for change to
3017 check_reduction_path.
3018 (tree_loop_interchange::interchange): Update for change to
3020 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3021 change in return-type of find_loop_location.
3022 (graphite_regenerate_ast_isl): Likewise.
3023 * graphite-optimize-isl.c (optimize_isl): Likewise.
3024 * graphite.c (graphite_transform_loops): Likewise.
3025 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3026 pass in a dump_location_t rather than a location_t, via the
3028 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3029 * ipa.c (walk_polymorphic_call_targets): Likewise.
3030 * loop-unroll.c (report_unroll): Convert "locus" param from
3031 location_t to dump_location_t.
3032 (decide_unrolling): Update for change to get_loop_location's
3034 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3035 location_t to dump_user_location_t.
3036 (grid_find_single_omp_among_assignments_1): Updates calls to
3037 dump_printf_loc to pass in a dump_location_t rather than a
3038 location_t, via the gimple stmt.
3039 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3040 location_t to dump_location_t. Updates calls to dump_printf_loc
3041 to pass in a dump_location_t rather than a location_t, via the
3043 (grid_inner_loop_gridifiable_p): Likewise.
3044 (grid_dist_follows_simple_pattern): Likewise.
3045 (grid_gfor_follows_tiling_pattern): Likewise.
3046 (grid_target_follows_gridifiable_pattern): Likewise.
3047 (grid_attempt_target_gridification): Convert initialization
3048 of local "grid" from memset to zero-initialization; FIXME: does
3049 this require C++11? Update call to dump_printf_loc to pass in a
3050 optinfo_location rather than a location_t, via the gimple stmt.
3051 * profile.c (read_profile_edge_counts): Updates call to
3052 dump_printf_loc to pass in a dump_location_t rather than a
3054 (compute_branch_probabilities): Likewise.
3055 * selftest-run-tests.c (selftest::run_tests): Call
3057 * selftest.h (dumpfile_c_tests): New decl.
3058 * tree-loop-distribution.c (pass_loop_distribution::execute):
3059 Update for change in return type of find_loop_location.
3060 * tree-parloops.c (parallelize_loops): Likewise.
3061 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3062 "locus" from location_t to dump_user_location_t.
3063 (canonicalize_loop_induction_variables): Likewise.
3064 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3065 for change in return type of find_loop_location.
3066 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3067 to dump_printf_loc to pass in a dump_location_t rather than a
3068 location_t, via the stmt.
3069 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3071 * tree-vect-loop-manip.c (find_loop_location): Convert return
3072 type from source_location to dump_user_location_t.
3073 (vect_do_peeling): Update for above change.
3074 (vect_loop_versioning): Update for change in type of
3076 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3077 from location_t to dump_user_location_t.
3078 (vect_estimate_min_profitable_iters): Update for change in type
3080 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3081 location_t to dump_location_t.
3082 (vect_slp_bb): Update for change in type of vect_location.
3083 * tree-vectorizer.c (vect_location): Convert from source_location
3084 to dump_user_location_t.
3085 (try_vectorize_loop_1): Update for change in vect_location's type.
3086 (vectorize_loops): Likewise.
3087 (increase_alignment): Likewise.
3088 * tree-vectorizer.h (vect_location): Convert from source_location
3089 to dump_user_location_t.
3090 (find_loop_location): Convert return type from source_location to
3091 dump_user_location_t.
3092 (check_reduction_path): Convert 1st param from location_t to
3093 dump_user_location_t.
3094 * value-prof.c (check_counter): Update call to dump_printf_loc to
3095 pass in a dump_user_location_t rather than a location_t; update
3096 call to error_at for change in type of "locus".
3097 (check_ic_target): Update call to dump_printf_loc to
3098 pass in a dump_user_location_t rather than a location_t, via the
3101 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3103 * config/s390/s390.h (enum processor_flags): Do not use
3104 default tune parameter when -march was specified.
3106 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3109 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3110 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3113 2018-06-26 Richard Biener <rguenther@suse.de>
3115 PR tree-optimization/86287
3117 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3118 (vect_analyze_loop): Initialize n_stmts.
3120 2018-06-26 Richard Biener <rguenther@suse.de>
3123 * fold-const.c (fold_convertible_p): Pointer extension
3126 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
3129 * dwarf2out.c (loc_list_has_views): Adjust comments.
3130 (dw_loc_list): Split single cross-partition range with
3133 2018-06-25 Jeff Law <law@redhat.com>
3135 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3136 on -mbig-switch by default.
3138 * config/v850/predicates.md (const_float_1_operand): Fix match_code
3140 (const_float_0_operand): Remove unused predicate.
3141 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3142 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3143 (recipsf2): New expander. Original pattern now called
3145 (recipdf2, recipdf2_insn): Similarly.
3146 (rsqrtsf2, rsqrtsf2_insn): Similarly
3147 (rsqrtdf2, rsqrtdf2_insn): Similarly
3149 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
3151 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3152 Simplify logic for FreeBSD (twice).
3154 2018-06-25 Martin Sebor <msebor@redhat.com>
3156 PR tree-optimization/86204
3157 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3158 a strnlen result if it's less than the length of the string.
3160 2018-06-25 Martin Sebor <msebor@redhat.com>
3162 PR tree-optimization/85700
3163 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3164 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3165 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3167 2018-06-25 Martin Sebor <msebor@redhat.com>
3169 * doc/extend.texi (Zero-length arrays): Update and clarify.
3171 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3173 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3174 added IEEE/IBM long double multilib support on PowerPC little
3175 endian Linux systems.
3176 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3177 (MULTILIB_DEFAULTS): Likewise.
3178 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3180 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3181 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3182 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3184 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
3187 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3188 (REORDER_45): Likewise.
3190 2018-06-25 Jeff Law <law@redhat.com>
3192 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3193 dividend to 32 bits. Adjust length.
3194 (udivmodhi4): Cleanup output template. Fix length.
3196 2018-06-25 Carl Love <cel@us.ibm.com>
3198 * config/rs6000/vsx.md: Change word selector to prefered location.
3200 2018-06-25 Richard Biener <rguenther@suse.de>
3202 PR tree-optimization/86304
3203 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3204 epilogue-if-converted loops as well.
3206 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
3208 * lto-section-out.c (lto_begin_section): Do not print section
3209 name for noaddr and unnumbered dumps.
3211 2018-06-25 Richard Biener <rguenther@suse.de>
3213 * tree-vectorizer.h (struct vec_info_shared): New structure
3214 with parts split out from struct vec_info and loop_nest from
3215 struct _loop_vec_info.
3216 (struct vec_info): Adjust accordingly.
3217 (struct _loop_vec_info): Likewise.
3218 (LOOP_VINFO_LOOP_NEST): Adjust.
3219 (LOOP_VINFO_DATAREFS): Likewise.
3220 (LOOP_VINFO_DDRS): Likewise.
3221 (struct _bb_vec_info): Likewise.
3222 (BB_VINFO_DATAREFS): Likewise.
3223 (BB_VINFO_DDRS): Likewise.
3224 (struct _stmt_vec_info): Add dr_aux member.
3225 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3226 (DR_MISALIGNMENT_UNINITIALIZED): New.
3227 (set_dr_misalignment): Adjust.
3228 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3229 (vect_analyze_loop): Adjust prototype.
3230 (vect_analyze_loop_form): Likewise.
3231 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3232 Compute dependences lazily.
3233 (vect_record_base_alignments): Use shared datarefs/ddrs.
3234 (vect_verify_datarefs_alignment): Likewise.
3235 (vect_analyze_data_refs_alignment): Likewise.
3236 (vect_analyze_data_ref_accesses): Likewise.
3237 (vect_analyze_data_refs): Likewise.
3238 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3239 constructor parameter for shared part.
3240 (vect_analyze_loop_form): Pass in shared part and adjust.
3241 (vect_analyze_loop_2): Pass in storage for the number of
3242 stmts. Move loop nest finding to the caller. Compute
3244 (vect_analyze_loop): Pass in shared part.
3245 (vect_transform_loop): Verify shared datarefs are unchanged.
3246 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3247 constructor parameter for shared part.
3248 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3249 (vect_slp_bb): Verify shared datarefs are unchanged before
3251 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3253 (new_stmt_vec_info): Initialize DR_AUX misalignment to
3254 DR_MISALIGNMENT_UNINITIALIZED.
3255 * tree-vectorizer.c (vec_info::vec_info): Add constructor
3256 parameter for shared part.
3257 (vec_info::~vec_info): Adjust.
3258 (vec_info_shared::vec_info_shared): New.
3259 (vec_info_shared::~vec_info_shared): Likewise.
3260 (vec_info_shared::save_datarefs): Likewise.
3261 (vec_info_shared::check_datarefs): Likewise.
3262 (try_vectorize_loop_1): Construct shared part live for analyses
3263 of a single loop for multiple vector sizes.
3264 * tree-parloops.c (gather_scalar_reductions): Adjust.
3266 2018-06-25 Richard Biener <rguenther@suse.de>
3268 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3269 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3270 (vect_analyze_data_refs): Remove similar code from here and
3271 simplify accordingly.
3273 2018-06-25 Richard Biener <rguenther@suse.de>
3275 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3276 for reverse storage order accesses rather than asserting
3277 they cannot happen here.
3279 2018-06-25 Tom de Vries <tdevries@suse.de>
3282 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3283 Use data16 instead of .byte for insn prefix.
3285 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
3288 * parser.c (make_char_string_pack): Pass this literal chars
3289 through cpp_interpret_string.
3290 (cp_parser_userdef_numeric_literal): Check the result of
3291 make_char_string_pack.
3293 2018-06-24 Maya Rashish <coypu@sdf.org>
3295 * ginclude/stddef.h: Simplify conditions around avoiding
3296 re-definition of __size_t.
3298 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3300 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3301 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3303 2018-06-22 Maya Rashish <coypu@sdf.org>
3305 * doc/invoke.texi (mno-fancy-math-387): Update for changes
3306 made to OpenBSD and NetBSD through the years.
3308 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3310 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3311 behavior of vec_pack (vector double, vector double) to match
3312 behavior of vec_float2 (vector double, vector double).
3314 2018-06-22 Olivier Hainque <hainque@adacore.com>
3316 * gimplify.c (gimplify_function_tree): Prevent creation
3317 of a trampoline for the address of the current function
3318 passed to entry/exit instrumentation hooks.
3320 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3323 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3326 2018-06-22 Martin Liska <mliska@suse.cz>
3328 PR tree-optimization/86263
3329 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3330 Bail out if is_enabled is false.
3331 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3333 (jump_table_cluster::is_enabled): New function.
3335 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3337 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3338 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3339 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3340 (lto_input_ts_binfo_tree_pointers): Likewise.
3341 * tree-streamer-out.c (streamer_write_tree_bitfields,
3342 write_ts_binfo_tree_pointers): Likewise.
3343 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3345 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3347 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3349 2018-06-22 Martin Liska <mliska@suse.cz>
3351 * symbol-summary.h (get): Make it pure and inline move
3352 functionality from ::get function.
3353 (get): Remove and inline into ::get and ::get_create.
3354 (get_create): Move code from ::get function.
3356 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3359 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3360 -x assembler-with-cpp.
3362 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3364 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3365 _FILE_OFFSET_BITS=64 for C++.
3367 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3369 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3370 conversion insn that shows up when pr85657-3.c is compiled using
3371 IEEE 128-bit long double.
3372 (neg<mode>2_internal): Use the correct mode to check whether the
3373 mode is IBM extended.
3374 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3375 multiply and divide external functions from being created more
3378 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3380 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3382 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
3383 the edge can be forwarded.
3384 (cfg_layout_merge_blocks): Likewise.
3386 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3388 * except.c (finish_eh_generation): Commit edge insertions only after
3389 the EH edges have been redirected from post-landing to landing pads.
3391 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3393 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3394 create_tmp_var_for to create the FRAME decl.
3395 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3397 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3399 * tree-inline.c (copy_edges_for_bb): Minor tweak.
3400 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3401 debug statement when resetting its value.
3402 (expand_call_inline): Copy the locus of the call onto the assignment
3403 of the return value, if any. Use local variable in more cases.
3405 2018-06-21 Martin Liska <mliska@suse.cz>
3407 * ipa-pure-const.c (propagate_nothrow): Use
3408 funct_state_summaries->get.
3409 (dump_malloc_lattice): Likewise.
3410 (propagate_malloc): Likewise.
3412 2018-06-21 Richard Biener <rguenther@suse.de>
3414 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3415 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3416 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3418 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3419 BLOCK_ABSTRACT_ORIGIN unconditionally.
3421 2018-06-21 David Malcolm <dmalcolm@redhat.com>
3423 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3425 * ipa-reference.c (ipa_reference_c_finalize): Delete
3426 ipa_ref_opt_sum_summaries and set it to NULL.
3428 2018-06-21 Tom de Vries <tdevries@suse.de>
3430 PR tree-optimization/85859
3431 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3432 test with comment from bb_no_side_effects_p.
3434 2018-06-21 Richard Biener <rguenther@suse.de>
3436 PR tree-optimization/86232
3437 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3438 max for constant niter.
3440 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3442 * config/aarch64/aarch64-simd.md
3443 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3445 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3447 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3448 Make opernads of the unspec commutative.
3450 2018-06-21 Richard Biener <rguenther@suse.de>
3452 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3453 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3454 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3455 (vect_analyze_data_ref_dependence): Re-order checks to deal with
3457 (vect_record_base_alignments): Do not record base alignment
3458 for gathers or scatters.
3459 (vect_compute_data_ref_alignment): Drop return value that is always
3460 true. Bail out early for gathers or scatters.
3461 (vect_enhance_data_refs_alignment): Bail out early for gathers
3463 (vect_find_same_alignment_drs): Likewise.
3464 (vect_analyze_data_refs_alignment): Remove dead code.
3465 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3466 (vect_analyze_data_refs): For possible gathers or scatters do
3467 not create an alternate DR, just check their possible validity
3468 and mark them. Adjust DECL_NONALIASED handling to not rely
3470 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3471 update inits of gathers or scatters.
3472 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3473 Also copy gather/scatter flag to pattern vinfo.
3475 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3477 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3478 behavior of vec_packsu (vector unsigned long long, vector unsigned
3479 long long) to match behavior of vec_packs with same signature.
3481 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3482 Thomas Schwinge <thomas@codesourcery.com>
3483 Cesar Philippidis <cesar@codesourcery.com>
3485 * gimplify.c (gimplify_scan_omp_clauses): Add support for
3486 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3487 (gimplify_adjust_omp_clauses): Likewise.
3488 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3489 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3490 (gimplify_omp_target_update): Update handling of acc update and
3492 * omp-low.c (install_var_field): Remove unused parameter
3493 base_pointers_restrict.
3494 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3495 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3497 (omp_target_base_pointers_restrict_p): Delete.
3498 (scan_omp_target): Update call to scan_sharing_clauses.
3499 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3501 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3502 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3503 (convert_local_omp_clauses): Likewise.
3504 * tree-pretty-print.c (dump_omp_clause): Likewise.
3505 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
3507 (omp_clause_code_name): Likewise.
3509 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3512 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3515 PR tree-optimization/86231
3516 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3517 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3519 2018-06-20 Tom de Vries <tdevries@suse.de>
3521 PR tree-optimization/86097
3522 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3523 iv type if signedness of iv type is not the same as that of *nit.
3525 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3527 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
3528 EDGE_EH edges, verify they are all EDGE_EH.
3530 2018-06-20 Maya Rashish <coypu@sdf.org>
3532 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3534 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3536 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3537 * config/aarch64/aarch64.c (xgene1_tunings): Add
3538 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3539 (aarch64_mode_valid_for_sched_fusion_p):
3540 Allow 16-byte modes.
3541 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3542 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3544 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3546 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3547 * config/aarch64/iterators.md (VQ2): New mode iterator.
3549 2018-06-20 Martin Liska <mliska@suse.cz>
3551 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3552 Change default ratio from 10 to 8.
3554 2018-06-20 Martin Liska <mliska@suse.cz>
3556 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3558 (bit_test_cluster::find_bit_tests): Likewise.
3559 (switch_decision_tree::analyze_switch_statement): Find clusters.
3560 * tree-switch-conversion.h (struct jump_table_cluster): Document
3563 2018-06-20 Martin Liska <mliska@suse.cz>
3565 * tree-switch-conversion.c (switch_conversion::collect):
3566 Record m_uniq property.
3567 (switch_conversion::expand): Bail out for special conditions.
3568 (group_cluster::~group_cluster): New.
3569 (group_cluster::group_cluster): Likewise.
3570 (group_cluster::dump): Likewise.
3571 (jump_table_cluster::emit): New.
3572 (switch_decision_tree::fix_phi_operands_for_edges): New.
3573 (struct case_node): Remove struct.
3574 (jump_table_cluster::can_be_handled): New.
3575 (case_values_threshold): Moved to header.
3576 (reset_out_edges_aux): Likewise.
3577 (jump_table_cluster::is_beneficial): New.
3578 (bit_test_cluster::can_be_handled): Likewise.
3579 (add_case_node): Remove.
3580 (bit_test_cluster::is_beneficial): New.
3581 (case_bit_test::cmp): New.
3582 (bit_test_cluster::emit): New.
3583 (expand_switch_as_decision_tree_p): Remove.
3584 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3585 (fix_phi_operands_for_edge): Likewise.
3586 (switch_decision_tree::analyze_switch_statement): New.
3587 (compute_cases_per_edge): Move ...
3588 (switch_decision_tree::compute_cases_per_edge): ... here.
3589 (try_switch_expansion): Likewise.
3590 (switch_decision_tree::try_switch_expansion): Likewise.
3591 (record_phi_operand_mapping): Likewise.
3592 (switch_decision_tree::record_phi_operand_mapping): Likewise.
3593 (emit_case_decision_tree): Likewise.
3594 (switch_decision_tree::emit): Likewise.
3595 (balance_case_nodes): Likewise.
3596 (switch_decision_tree::balance_case_nodes): Likewise.
3597 (dump_case_nodes): Likewise.
3598 (switch_decision_tree::dump_case_nodes): Likewise.
3599 (emit_jump): Likewise.
3600 (switch_decision_tree::emit_jump): Likewise.
3601 (emit_cmp_and_jump_insns): Likewise.
3602 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3603 (emit_case_nodes): Likewise.
3604 (switch_decision_tree::emit_case_nodes): Likewise.
3605 (conditional_probability): Remove.
3606 * tree-switch-conversion.h (enum cluster_type): New.
3608 (struct cluster): Likewise.
3609 (cluster::cluster): Likewise.
3610 (struct simple_cluster): Likewise.
3611 (simple_cluster::simple_cluster): Likewise.
3612 (struct group_cluster): Likewise.
3613 (struct jump_table_cluster): Likewise.
3614 (struct bit_test_cluster): Likewise.
3615 (struct min_cluster_item): Likewise.
3616 (struct case_tree_node): Likewise.
3617 (case_tree_node::case_tree_node): Likewise.
3618 (jump_table_cluster::case_values_threshold): Likewise.
3619 (struct case_bit_test): Likewise.
3620 (struct switch_decision_tree): Likewise.
3621 (struct switch_conversion): Likewise.
3622 (switch_decision_tree::reset_out_edges_aux): Likewise.
3624 2018-06-20 Martin Liska <mliska@suse.cz>
3626 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3627 (hoist_edge_and_branch_if_true): Likewise.
3628 (expand_switch_using_bit_tests_p): Likewise.
3629 (struct case_bit_test): Likewise.
3630 (case_bit_test_cmp): Likewise.
3631 (emit_case_bit_tests): Likewise.
3632 (switch_conversion::switch_conversion): New class.
3633 (struct switch_conv_info): Remove old struct.
3634 (collect_switch_conv_info): More to ...
3635 (switch_conversion::collect): ... this.
3636 (check_range): Likewise.
3637 (switch_conversion::check_range): Likewise.
3638 (check_all_empty_except_final): Likewise.
3639 (switch_conversion::check_all_empty_except_final): Likewise.
3640 (check_final_bb): Likewise.
3641 (switch_conversion::check_final_bb): Likewise.
3642 (create_temp_arrays): Likewise.
3643 (switch_conversion::create_temp_arrays): Likewise.
3644 (free_temp_arrays): Likewise.
3645 (gather_default_values): Likewise.
3646 (switch_conversion::gather_default_values): Likewise.
3647 (build_constructors): Likewise.
3648 (switch_conversion::build_constructors): Likewise.
3649 (constructor_contains_same_values_p): Likewise.
3650 (switch_conversion::contains_same_values_p): Likewise.
3651 (array_value_type): Likewise.
3652 (switch_conversion::array_value_type): Likewise.
3653 (build_one_array): Likewise.
3654 (switch_conversion::build_one_array): Likewise.
3655 (build_arrays): Likewise.
3656 (switch_conversion::build_arrays): Likewise.
3657 (gen_def_assigns): Likewise.
3658 (switch_conversion::gen_def_assigns): Likewise.
3659 (prune_bbs): Likewise.
3660 (switch_conversion::prune_bbs): Likewise.
3661 (fix_phi_nodes): Likewise.
3662 (switch_conversion::fix_phi_nodes): Likewise.
3663 (gen_inbound_check): Likewise.
3664 (switch_conversion::gen_inbound_check): Likewise.
3665 (process_switch): Use the newly created class.
3666 (switch_conversion::expand): New.
3667 (switch_conversion::~switch_conversion): New.
3668 * tree-switch-conversion.h: New file.
3670 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3672 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3673 tree-vect-patterns.c.
3674 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3675 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
3676 (vect_recog_sad_pattern): Likewise.
3677 (vect_recog_widen_sum_pattern): Likewise.
3678 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
3679 (vect_recog_widen_shift_pattern): Remove the type_in argument.
3680 (vect_recog_rotate_pattern): Likewise.
3681 (vect_recog_mult_pattern): Likewise.
3682 (vect_recog_vector_vector_shift_pattern): Likewise.
3683 (vect_recog_divmod_pattern): Likewise.
3684 (vect_recog_mixed_size_cond_pattern): Likewise.
3685 (vect_recog_bool_pattern): Likewise.
3686 (vect_recog_mask_conversion_pattern): Likewise.
3687 (vect_try_gather_scatter_pattern): Likewise.
3688 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
3689 (vect_recog_over_widening_pattern): Likewise.
3690 (vect_recog_gather_scatter_pattern): Likewise.
3691 (vect_recog_func_ptr): Move from tree-vectorizer.h
3692 (vect_vect_recog_func_ptrs): Move further down the file.
3693 (vect_recog_func): Likewise. Remove the third argument.
3694 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3695 (vect_pattern_recog_1): Expect the pattern function to do any
3696 necessary target tests. Also expect it to provide a vector type.
3697 Remove the type_in handling.
3699 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3701 * tree-vect-patterns.c (vect_pattern_detected): New function.
3702 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3703 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3704 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3705 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3706 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3707 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3708 (vect_recog_mask_conversion_pattern)
3709 (vect_try_gather_scatter_pattern): Likewise.
3711 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3713 * tree-vect-patterns.c (vect_get_internal_def): New function.
3714 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3715 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3716 (search_type_for_mask_1): Use it.
3718 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3720 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3721 redundant WIDEN_SUM_EXPR handling.
3722 (vect_recog_sad_pattern): Likewise.
3724 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3726 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3727 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3728 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3729 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3730 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3732 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3734 * tree-vect-stmts.c (vectorizable_call): Make sure that we
3735 use the stmt_vec_info of the original bb statement for the
3736 new zero assignment, even if the call is part of a pattern.
3738 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3740 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3741 that the sequence is attached to the original statement rather
3742 than the pattern statement.
3743 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3744 PATTERN_DEF_SEQ from the original statement rather than
3745 the main pattern statement.
3746 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3747 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3748 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3750 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3752 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3753 definition statements before the early exit for statements that aren't
3755 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3757 (vect_transform_loop): ...here. Process pattern definition
3758 statements without first checking whether the main pattern
3759 statement is live or relevant.
3761 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3763 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3764 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3766 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
3768 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3769 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3770 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3771 (expand_block_compare): Change select_block_compare_mode call.
3772 (expand_strncmp_align_check): Use new functions, fix comment.
3773 (emit_final_str_compare_gpr): New function.
3774 (expand_strn_compare): Refactor and clean up code.
3775 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3777 2018-06-19 Tony Reix <tony.reix@atos.com>
3778 Damien Bergamini <damien.bergamini@atos.com>
3779 David Edelsohn <dje.gcc@gmail.com>
3781 * collect2.c (static_obj): New variable.
3782 (static_libs): New variable.
3783 (is_in_list): Uncomment declaration.
3784 (main): Track AIX libraries linked statically.
3785 (is_in_list): Uncomment definition.
3786 (scan_prog_file): Don't add AIX shared libraries initializer
3787 to constructor list if linking statically.
3789 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3791 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3793 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3795 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
3797 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3800 2018-06-19 Martin Liska <mliska@suse.cz>
3802 * config/i386/i386.c (ix86_can_inline_p): Do not use
3803 ipa_fn_summaries::get_create.
3804 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3806 (devirtualization_time_bonus): Likewise.
3807 (ipcp_propagate_stage): Likewise.
3808 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3809 (edge_set_predicate): Likewise.
3810 (evaluate_conditions_for_known_args): Likewise.
3811 (evaluate_properties_for_edge): Likewise.
3812 (ipa_call_summary::reset): Tranform to ...
3813 (ipa_call_summary::~ipa_call_summary): ... this.
3814 (ipa_fn_summary::reset): Transform to ...
3815 (ipa_fn_summary::~ipa_fn_summary): ... this.
3816 (ipa_fn_summary_t::remove): Rename to ...
3817 (ipa_fn_summary_t::remove_callees): ... this.
3818 (ipa_fn_summary_t::duplicate): Use placement new
3819 instead of memory copy.
3820 (ipa_call_summary_t::duplicate): Likewise.
3821 (ipa_call_summary_t::remove): Remove.
3822 (dump_ipa_call_summary): Change get_create to get.
3823 (ipa_dump_fn_summary): Dump only when summary exists.
3824 (analyze_function_body): Use symbol_summary::get instead
3826 (compute_fn_summary): Likewise.
3827 (estimate_edge_devirt_benefit): Likewise.
3828 (estimate_edge_size_and_time): Likewise.
3829 (inline_update_callee_summaries): Likewise.
3830 (remap_edge_change_prob): Likewise.
3831 (remap_edge_summaries): Likewise.
3832 (ipa_merge_fn_summary_after_inlining): Likewise.
3833 (write_ipa_call_summary): Likewise.
3834 (ipa_fn_summary_write): Likewise.
3835 (ipa_free_fn_summary): Likewise.
3836 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3837 (struct ipa_call_summary): Likewise.
3838 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3840 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3841 (estimate_size_after_inlining): Likewise.
3842 (estimate_growth): Likewise.
3843 (growth_likely_positive): Likewise.
3844 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3845 (inline_call): Likewise.
3846 * ipa-inline.c (caller_growth_limits): Likewise.
3847 (can_inline_edge_p): Likewise.
3848 (can_inline_edge_by_limits_p): Likewise.
3849 (compute_uninlined_call_time): Likewise.
3850 (compute_inlined_call_time): Likewise.
3851 (want_inline_small_function_p): Likewise.
3852 (edge_badness): Likewise.
3853 (update_caller_keys): Likewise.
3854 (update_callee_keys): Likewise.
3855 (inline_small_functions): Likewise.
3856 (inline_to_all_callers_1): Likewise.
3857 (dump_overall_stats): Likewise.
3858 (early_inline_small_functions): Likewise.
3859 (early_inliner): Likewise.
3860 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3861 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3862 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3863 * ipa-split.c (execute_split_functions): Likewise.
3864 * symbol-summary.h: Likewise.
3865 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3867 2018-06-19 Richard Biener <rguenther@suse.de>
3869 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3870 (vectorize_loops): ... here. Fix dbgcnt handling.
3871 (try_vectorize_loop): Wrap try_vectorize_loop_1.
3873 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3876 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3877 ieee128 argument takes up only one (vector) register, not two (floating
3880 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3882 * gimplify.c (gimplify_init_constructor): Really never clear for an
3883 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3885 2018-06-19 Richard Biener <rguenther@suse.de>
3887 PR tree-optimization/86179
3888 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3889 after failed recognition.
3891 2018-06-18 Martin Sebor <msebor@redhat.com>
3894 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3895 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3896 Handle integer subtraction.
3897 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3898 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3900 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3902 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3903 param from rtx to rtx_insn *.
3904 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3906 (frv_ifcvt_modify_insn): Likwise.
3907 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3908 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
3909 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3910 as_a <rtx_insn *> cast to local "unprotected_region" once
3911 it's been established that it's not NULL or pc_rtx.
3912 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3913 param "sethi" from rtx to rtx_insn *.
3914 (nds32_group_float_insns): Likewise for param "insn".
3915 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3917 (vax_output_int_subtract): Likewise.
3918 * config/vax/vax.c (vax_output_int_add): Likewise for param
3920 (vax_output_int_subtract): Likewise.
3921 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3922 (emit_pattern_after): Likewise for param "after".
3923 (emit_insn_after): Likewise.
3924 (emit_jump_insn_after): Likewise.
3925 (emit_call_insn_after): Likewise.
3926 (emit_debug_insn_after): Likewise.
3927 (emit_pattern_before): Likewise for param "before".
3928 (emit_insn_before): Likewise.
3929 (emit_jump_insn_before): Likewise.
3930 * final.c (get_insn_template): Likewise for param "insn", removing
3932 * output.h (get_insn_template): Likewise for 2nd param.
3933 * rtl.h (emit_insn_before): Likewise.
3934 (emit_jump_insn_before): Likewise.
3935 (emit_debug_insn_before_noloc): Likewise.
3936 (emit_insn_after): Likewise.
3937 (emit_jump_insn_after): Likewise.
3938 (emit_call_insn_after): Likewise.
3939 (emit_debug_insn_after): Likewise.
3940 (set_insn_deleted): Likewise for param.
3942 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3945 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3946 floating point modes, so that IFmode is numerically greater than
3947 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3948 to declare the ordering. This prevents IFmode from being
3949 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3950 machine. Include rs6000-modes.h to share the fractional values
3951 between genmodes* and the rest of the compiler.
3955 * config/rs6000/rs6000-modes.h: New file.
3956 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3957 meaning of rs6000_long_double_size so that 126..128 selects an
3958 appropriate 128-bit floating point type.
3959 (rs6000_option_override_internal): Likewise.
3960 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3961 (TARGET_LONG_DOUBLE_128): Change the meaning of
3962 rs6000_long_double_size so that 126..128 selects an appropriate
3963 128-bit floating point type.
3964 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3965 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3966 source and destination to match the standard usage.
3967 (truncifkf2): Likewise.
3968 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3969 ISA 2.07 to use an explicit clobber, instead of passing in a
3971 (copysign<mode>3_soft): Likewise.
3973 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3975 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3976 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3977 (vect_slp_analyze_instance_dependence): Likewise.
3978 (vect_enhance_data_refs_alignment): Likewise.
3979 (vect_analyze_data_refs_alignment): Likewise.
3980 (vect_slp_analyze_and_verify_instance_alignment
3981 (vect_analyze_data_ref_accesses): Likewise.
3982 (vect_prune_runtime_alias_test_list): Likewise.
3983 (vect_analyze_data_refs): Likewise.
3984 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3985 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3986 (vect_analyze_scalar_cycles_1): Likewise.
3987 (vect_get_loop_niters): Likewise.
3988 (vect_analyze_loop_form_1): Likewise.
3989 (vect_update_vf_for_slp): Likewise.
3990 (vect_analyze_loop_operations): Likewise.
3991 (vect_analyze_loop): Likewise.
3992 (vectorizable_induction): Likewise.
3993 (vect_transform_loop): Likewise.
3994 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3995 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3996 (vect_make_slp_decision): Likewise.
3997 (vect_detect_hybrid_slp): Likewise.
3998 (vect_slp_analyze_operations): Likewise.
3999 (vect_slp_bb): Likewise.
4000 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4001 (vectorizable_bswap): Likewise.
4002 (vectorizable_call): Likewise.
4003 (vectorizable_simd_clone_call): Likewise.
4004 (vectorizable_conversion): Likewise.
4005 (vectorizable_assignment): Likewise.
4006 (vectorizable_shift): Likewise.
4007 (vectorizable_operation): Likewise.
4008 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4010 2018-06-18 Martin Sebor <msebor@redhat.com>
4012 PR tree-optimization/81384
4013 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4014 * builtins.c (expand_builtin_strnlen): New function.
4015 (expand_builtin): Call it.
4016 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4017 * builtins.def (BUILT_IN_STRNLEN): New.
4018 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4019 Warn for bounds in excess of maximum object size.
4020 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4021 single-value ranges. Handle strnlen.
4022 (handle_builtin_strlen): Handle strnlen.
4023 (strlen_check_and_optimize_stmt): Same.
4024 * doc/extend.texi (Other Builtins): Document strnlen.
4026 2018-06-18 Maya Rashish <coypu@sdf.org>
4028 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4029 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4030 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4032 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4034 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4036 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4038 * tree.c (escaped_string::escape): Replace cast to char * by
4039 const_cast<char *> (unescaped).
4041 2018-06-18 Nick Clifton <nickc@redhat.com>
4044 * tree.c (escaped_string): New class. Converts an unescaped
4045 string into its escaped equivalent.
4046 (warn_deprecated_use): Use the new class to convert the
4047 deprecation message, if present.
4048 (test_escaped_strings): New self test.
4049 (test_c_tests): Add test_escaped_strings.
4050 * doc/extend.texi (deprecated): Add a note that the
4051 deprecation message is affected by the -fmessage-length
4052 option, and that control characters will be escaped.
4053 (#pragma GCC error): Document this pragma.
4054 (#pragma GCC warning): Likewise.
4055 * doc/invoke.texi (-fmessage-length): Document this option's
4056 effect on the #warning and #error preprocessor directives and
4057 the deprecated attribute.
4059 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4061 * tree.c (decl_value_expr_lookup): Revert latest change.
4062 (decl_value_expr_insert): Likewise.
4064 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4066 * gimplify.c (nonlocal_vlas): Delete.
4067 (nonlocal_vla_vars): Likewise.
4068 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4070 (gimplify_body): Do not create and destroy nonlocal_vlas.
4071 * tree-nested.c: Include diagnostic.h.
4072 (use_pointer_in_frame): Tweak.
4073 (lookup_field_for_decl): Add assertion and declare the transformation.
4074 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4075 internal error when the reference is in a wrong context. Do not
4076 create a debug decl by default.
4077 (note_nonlocal_block_vlas): Delete.
4078 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4079 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4080 create a debug decl by default.
4081 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4082 call is in a wrong context.
4083 (fixup_vla_decls): New function.
4084 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4085 debug variables were created.
4086 * tree.c (decl_value_expr_lookup): Add checking assertion.
4087 (decl_value_expr_insert): Likewise.
4089 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4092 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4093 * tree-scalar-evolution.c (interpret_expr): Likewise.
4094 (expression_expensive_p): Likewise.
4095 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4096 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4097 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4098 (ssa_defined_by_minus_one_stmt_p): New.
4100 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4103 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4104 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4105 * dojump.c (do_jump): Likewise.
4106 * expr.c (expand_expr_real_2): Check operand type's sign.
4107 * fold-const.c (const_unop): Handle ABSU_EXPR.
4108 (fold_abs_const): Likewise.
4109 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4110 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4111 (strip_sign_op_1): Likesise.
4112 * match.pd: Add new pattern to generate ABSU_EXPR.
4113 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4114 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4115 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4116 * tree-inline.c (estimate_operator_cost): Likewise.
4117 * tree-pretty-print.c (dump_generic_node): Likewise.
4118 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4119 * tree.def (ABSU_EXPR): New.
4121 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4124 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4125 documented as preserved for backward compatibility only.
4126 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4128 PR rtl-optimization/86108
4129 * bb-reorder.c (create_forwarder_block): Renamed to ...
4130 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
4131 jump from new landing pad to the second part.
4132 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4135 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4138 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4139 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4140 Only call store_expr for halves if the mode is the same.
4143 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4144 Fix up comment formatting.
4146 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4148 * typed-splay-tree.h (typed_splay_tree::remove): New function.
4149 (typed_splay_tree::closure,
4150 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4151 (typed_splay_tree::typed_splay_tree,
4152 typed_splay_tree::operator =): Declared private.
4153 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4154 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4155 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4156 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4157 typed_splay_tree::splay_tree_splay,
4158 typed_splay_tree::splay_tree_foreach_helper,
4159 typed_splay_tree::splay_tree_insert,
4160 typed_splay_tree::splay_tree_remove,
4161 typed_splay_tree::splay_tree_lookup,
4162 typed_splay_tree::splay_tree_predecessor,
4163 typed_splay_tree::splay_tree_successor,
4164 typed_splay_tree::splay_tree_min,
4165 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4166 (typed_splay_tree::root, typed_splay_tree::comp,
4167 typed_splay_tree::delete_key,
4168 typed_splay_tree::delete_value): New data members.
4169 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4170 typed_splay_tree::remove.
4172 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
4174 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4175 -mginv and -mno-ginv to the assembler.
4176 * config/mips/mips.opt (-mcrc): New option.
4178 * doc/invoke.text (-mcrc): Document.
4181 2018-06-15 Nick Clifton <nickc@redhat.com>
4184 * tree.c (escaped_string): New class. Converts an unescaped
4185 string into its escaped equivalent.
4186 (warn_deprecated_use): Use the new class to convert the
4187 deprecation message, if present.
4188 (test_escaped_strings): New self test.
4189 (test_c_tests): Add test_escaped_strings.
4190 * doc/extend.texi (deprecated): Add a note that the
4191 deprecation message is affected by the -fmessage-length
4192 option, and that control characters will be escaped.
4193 (#pragma GCC error): Document this pragma.
4194 (#pragma GCC warning): Likewise.
4195 * doc/invoke.texi (-fmessage-length): Document this option's
4196 effect on the #warning and #error preprocessor directives and
4197 the deprecated attribute.
4199 2018-06-15 Richard Biener <rguenther@suse.de>
4201 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4202 here, also noting vector size used.
4203 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
4204 size used in MSG_OPTIMIZED_LOCATIONS dump.
4205 (pass_slp_vectorize::execute): Adjust.
4207 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
4210 * config/arc/arc.c (arc_return_address_register): Fix
4213 2018-06-15 Richard Biener <rguenther@suse.de>
4216 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4217 leave useless conversion stripping to force_gimple_operand_gsi.
4218 (gimplify_build2): Likewise.
4219 (gimplify_build1): Likewise.
4221 2018-06-15 Richard Biener <rguenther@suse.de>
4224 * tree-cfg.c (move_stmt_op): unshare invariant addresses
4225 before adjusting their block.
4227 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
4229 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4230 multilibs for *-*-rtems*.
4231 * config/riscv/t-rtems: New file.
4233 2018-06-14 Jakub Jelinek <jakub@redhat.com>
4236 * match.pd ((A +- CST1) +- CST2): Punt if last resort
4237 unsigned_type_for returns NULL.
4240 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4241 subregs of multi-word pseudos unless the float mode has word size.
4243 2018-06-14 Richard Biener <rguenther@suse.de>
4246 * tree-vect-generic.c (build_word_mode_vector_type): Remove
4247 duplicate and harmful type_hash_canon.
4248 * tree.c (type_hash_canon): Assert we didn't find ourselves.
4250 2018-06-14 Richard Biener <rguenther@suse.de>
4253 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4256 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
4258 * config/rtems.h (STDINT_LONG32): Define.
4260 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
4261 Prachi Godbole <prachi.godbole@imgtec.com>
4263 * config/mips/mips-cpus.def: Define P6600.
4264 * config/mips/mips-tables.opt: Regenerate.
4265 * config/mips/mips.c (mips_ucbranch_type): New enum.
4266 (mips_rtx_cost_data): Add support for P6600.
4267 (mips_issue_rate): Likewise.
4268 (mips_multipass_dfa_lookahead): Likewise.
4269 (mips_avoid_hazard): Likewise.
4270 (mips_reorg_process_insns): Likewise.
4271 (mips_classify_branch_p6600): New function.
4272 * config/mips/mips.h (TUNE_P6600): New define.
4273 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4274 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4275 * config/mips/mips.md: Include p6600.md.
4276 (processor): Add p6600.
4277 * config/mips/p6600.md: New file.
4278 * doc/invoke.texi: Add p6600 to supported architectures.
4280 2018-06-13 Martin Sebor <msebor@redhat.com>
4282 PR tree-optimization/86114
4283 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4285 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4287 2018-06-13 Richard Biener <rguenther@suse.de>
4289 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4290 Properly set vector type of the intermediate stmt.
4291 * tree-vect-stmts.c (vectorizable_operation): The destination
4292 var always has vectype_out type.
4294 2018-06-13 Jeff Law <law@redhat.com>
4296 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4297 integer 0 for argument to print_rtl_with_bb.
4298 (rl78_reorg): Likewise.
4300 2018-06-13 David Malcolm <dmalcolm@redhat.com>
4302 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4303 from rtx to rtx_insn *.
4304 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4306 (add_sched_insns_for_speculation): Likewise for local "target",
4307 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4308 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4309 from rtx_insn ** to rtx_code_label **.
4310 (reorg_emit_nops): Likewise.
4311 (c6x_reorg): Likewise for local "call_labels".
4312 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4314 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4315 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4316 the loops over LABEL_REFS.
4317 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4319 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4320 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4321 (split_branches): Strengthen local "olabel" from rtx to
4322 rtx_insn *, adding a safe_as_a cast.
4323 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4325 (add_insn_after): Likewise for first two params.
4326 (add_insn_before): Likewise.
4327 (remove_insn): Likewise for param.
4328 (emit_pattern_before_noloc): Likewise for second and third params.
4329 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4330 (emit_call_insn_before_noloc): Likewise.
4331 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4333 (emit_barrier_before): Likewise.
4334 (emit_label_before): Strengthen "label" param from "rtx" to
4335 "rtx_code_label *". Strengthen "before" param from "rtx" to
4337 (emit_insn_after_1): Strengthen "after" param from "rtx" to
4339 (emit_pattern_after_noloc): Likewise.
4340 (emit_insn_after_noloc): Likewise.
4341 (emit_jump_insn_after_noloc): Likewise.
4342 (emit_call_insn_after_noloc): Likewise.
4343 (emit_debug_insn_after_noloc): Likewise.
4344 (emit_barrier_after): Likewise.
4345 (emit_label_after): Likewise for both params.
4346 (emit_pattern_after_setloc): Likewise for "after" param. Convert
4347 "loc" param from "int" to "location_t".
4348 (emit_insn_after_setloc): Likewise.
4349 (emit_jump_insn_after_setloc): Likewise.
4350 (emit_call_insn_after_setloc): Likewise.
4351 (emit_debug_insn_after_setloc): Likewise.
4352 (emit_pattern_before_setloc): Likewise for "before" param. Convert
4353 "loc" param from "int" to "location_t".
4354 (emit_pattern_before): Convert NULL_RTX to NULL.
4355 (emit_insn_before_setloc): Convert "loc" param from "int" to
4357 (emit_jump_insn_before_setloc): Likewise.
4358 (emit_call_insn_before_setloc): Likewise.
4359 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4360 rtx_insn *. Convert "loc" param from "int" to "location_t".
4361 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4362 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4363 Convert 3rd param from "int" to "location_t".
4364 (emit_barrier_before, emit_barrier_after, next_real_insn):
4365 Strengthen param from rtx to rtx_insn *.
4366 (emit_label_before): Strengthen 1st param from "rtx" to
4367 "rtx_code_label *". Strengthen 2nd param from "rtx" to
4369 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4370 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4371 Strengthen 2nd param from "rtx" to "rtx_insn *".
4372 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4373 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4374 Likewise. Convert 3rd param from "int" to "location_t".
4375 (emit_label_after): Strengthen 1st param from "rtx" to
4377 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4379 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4380 from "rtx" to "rtx_insn *".
4382 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
4384 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4385 bodies streamed in with -Q.
4386 * dumpfile.c (dump_files): Add lto-stream-out dump file.
4387 * dumpfile.h (tree_dump_index): Add lto_stream_out.
4388 * gimple-streamer-out.c: Include gimple-pretty-print.h
4389 (output_bb): Dump stmts streamed.
4390 * lto-section-out.c: Include print-tree.h
4391 (lto_begin_section): Dump sections created.
4392 (lto_output_decl_index): Dump decl encoded.
4393 * lto-streamer-out.c: Include print-tree.h
4394 (create_output_block): Dump output block created.
4395 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4396 (output_function): Dump function output.
4397 (output_constructor): Dump constructor streamed.
4398 (write_global_stream): Output indexes encoded.
4399 (produce_asm_for_decls): Dump streams encoded.
4400 * lto-streamer.c (streamer_dump_file): New global var.
4401 * lto-streamer.h (streamer_dump_file): Declare.
4402 * passes.c (ipa_write_summaries): Initialize streamer dump.
4403 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4406 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4409 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4410 offsets for register save directives. Emit a second batch of save
4411 directives, if need be, when the function accesses prior frames.
4413 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4415 * config/arc/fpu.md (fmasf4): Force operand to register.
4416 (fnmasf4): Likewise.
4418 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4420 * config/arc/arc-protos.h (arc_pad_return): Remove.
4421 * config/arc/arc.c (machine_function): Remove force_short_suffix
4423 (arc_print_operand): Adjust printing of '&'.
4424 (arc_verify_short): Remove conditional printing of short suffix.
4425 (arc_final_prescan_insn): Remove reference to size_reason.
4426 (pad_return): New function.
4427 (arc_reorg): Call pad_return.
4428 (arc_pad_return): Remove.
4429 (arc_init_machine_status): Remove reference to force_short_suffix.
4430 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4431 (attr length): When attribute iscompact is true force to 2
4432 regardless; in the case of maybe check if we want to force the
4433 instruction to have 4 bytes length.
4434 (nopv): Change it to generate 4 byte long nop as well.
4435 (blockage): New pattern.
4436 (simple_return): Remove call to arc_pad_return.
4437 (p_return_i): Likewise.
4439 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4441 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4443 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4445 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4448 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4450 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4451 for ARC700 and ARCv2.
4453 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
4456 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4457 operands[2] instead of operands[1].
4460 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4462 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4463 case, check whether the outer register overlaps an unallocatable
4464 register, not just whether it fits the required class.
4466 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4468 * poly-int.h (can_div_trunc_p): Add new overload in which all values
4470 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4471 (memrefs_conflict_p): Likewise.
4472 (init_alias_analysis): Likewise.
4473 * cfgexpand.c (expand_debug_expr): Likewise.
4474 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4475 * cse.c (fold_rtx): Likewise.
4476 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4477 * expr.c (emit_block_move_hints): Likewise.
4478 (clear_storage_hints, push_block, emit_push_insn): Likewise.
4479 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4480 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4481 (emit_group_store): Likewise.
4482 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
4483 to read the PRE/POST_MODIFY increment.
4484 * calls.c (store_one_arg): Use strip_offset.
4485 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4487 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4489 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4490 (simplify_binary_operation_1): Extend CONST_INT handling to
4492 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4493 than a HOST_WIDE_INT.
4494 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4496 (adjust_mems, add_stores): Update accodingly.
4497 (vt_canonicalize_addr): Track polynomial offsets.
4498 (emit_note_insn_var_location): Likewise.
4499 (vt_add_function_parameter): Likewise.
4500 (vt_initialize): Likewise.
4502 2018-06-12 Jeff Law <law@redhat.com>
4504 * config.gcc (alpha*-*-freebsd*): Remove.
4505 * config/alpha/freebsd.h: Remove.
4507 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4510 * spellcheck-tree.c (levenshtein_distance): Rename to...
4511 (get_edit_distance): ...this, and update for underlying renaming.
4512 * spellcheck-tree.h (levenshtein_distance): Rename to...
4513 (get_edit_distance): ...this.
4514 * spellcheck.c (levenshtein_distance): Rename to...
4515 (get_edit_distance): ...this. Convert from Levenshtein distance
4516 to Damerau-Levenshtein distance by supporting transpositions of
4517 adjacent characters. Rename "v1" to "v_next" and "v0" to
4519 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4520 (selftest::test_edit_distance_unit_test_oneway): ...this, and
4521 update for underlying renaming.
4522 (selftest::levenshtein_distance_unit_test): Rename to...
4523 (selftest::test_get_edit_distance_unit): ...this, and update for
4524 underlying renaming.
4525 (selftest::test_find_closest_string): Add example from PR 69968
4526 where transposition helps
4527 (selftest::test_metric_conditions): Update for renaming.
4528 (selftest::test_metric_conditions): Likewise.
4529 (selftest::spellcheck_c_tests): Likewise.
4530 * spellcheck.h (levenshtein_distance): Rename both overloads to...
4531 (get_edit_distance): ...this.
4532 (best_match::consider): Update for renaming.
4534 2018-06-12 Martin Sebor <msebor@redhat.com>
4536 PR tree-optimization/85259
4537 * builtins.c (compute_objsize): Handle constant offsets.
4538 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4539 true iff a warning has been issued.
4540 * gimple.h (gimple_nonartificial_location): New function.
4541 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4542 gimple_nonartificial_location and handle -Wno-system-headers.
4543 (handle_builtin_stxncpy): Same.
4545 2018-06-12 Martin Sebor <msebor@redhat.com>
4548 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4550 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4552 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4553 BUILTIN_VEC_XST entries for pointer to double and long long.
4555 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4558 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4560 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4563 2018-06-12 Martin Liska <mliska@suse.cz>
4565 * doc/options.texi: Document IntegerRange.
4567 2018-06-12 Martin Liska <mliska@suse.cz>
4569 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4570 * opt-functions.awk: Handle Deprecated flag.
4571 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4573 (read_cmdline_option): Report warning for a deprecated option.
4574 * opts.h (struct cl_option): Add new field cl_deprecated.
4575 (CL_ERR_DEPRECATED): New.
4577 2018-06-12 Martin Liska <mliska@suse.cz>
4579 * doc/options.texi: Document Deprecated option flag.
4581 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4583 * config/arc/arc-arch.h (arc_extras): New enum.
4584 (arc_cpu_t):Add field extra.
4585 (arc_cpu_types): Consider the extras.
4586 * config/arc/arc-cpus.def: Add extras info.
4587 * config/arc/arc-opts.h (processor_type): Consider extra field.
4588 * config/arc/arc.c (arc_override_options): Handle extra field.
4590 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4592 * config/arc/arc-arch.h: Update ARC_OPTX macro.
4593 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4595 * config/arc/arc.c (arc_init): Update pic warning.
4596 (irq_range): Update irq range parsing warnings.
4597 (arc_override_options): Update various warning messages.
4598 (arc_handle_aux_attribute): Likewise.
4600 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
4602 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4604 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4606 * doc/sourcebuild.texi: Document usage of line number 0 in verify
4607 compiler messages directives.
4609 2018-06-12 Matthew Fortune <mfortune@gmail.com>
4611 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4612 * config/mips/mips-tables.opt: Regenerate.
4613 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4615 * doc/invoke.texi: Document -march=i6500.
4617 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
4619 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4620 (i6400_gpmul): Add cpu_unit.
4621 (i6400_gpdiv): Likewise.
4622 (i6400_msa_add_d): Update reservations.
4623 (i6400_msa_int_add) Likewise.
4624 (i6400_msa_short_logic3) Likewise.
4625 (i6400_msa_short_logic2) Likewise.
4626 (i6400_msa_short_logic) Likewise.
4627 (i6400_msa_move) Likewise.
4628 (i6400_msa_cmp) Likewise.
4629 (i6400_msa_short_float2) Likewise.
4630 (i6400_msa_div_d) Likewise.
4631 (i6400_msa_long_logic1) Likewise.
4632 (i6400_msa_long_logic2) Likewise.
4633 (i6400_msa_mult) Likewise.
4634 (i6400_msa_long_float2) Likewise.
4635 (i6400_msa_long_float4) Likewise.
4636 (i6400_msa_long_float5) Likewise.
4637 (i6400_msa_long_float8) Likewise.
4638 (i6400_fpu_fadd): Include frint type.
4639 (i6400_fpu_store): New define_insn_reservation.
4640 (i6400_fpu_load): Likewise.
4641 (i6400_fpu_move): Likewise.
4642 (i6400_fpu_fcmp): Likewise.
4643 (i6400_fpu_fmadd): Likewise.
4644 (i6400_int_mult): Include imul3nc type and update reservation.
4645 (i6400_int_div): Include idiv3 type and update reservation.
4646 (i6400_int_load): Update to check type not move_type.
4647 (i6400_int_store): Likewise.
4648 (i6400_int_prefetch): Set zero latency.
4650 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
4652 * gcc.c: Document new %@{...} sequence.
4653 (LINK_COMMAND_SPEC): Use it for the -L switches.
4654 (cpp_unique_options): Use it for the -I switches.
4655 (at_file_argbuf): New global variable.
4656 (in_at_file): Likewise.
4657 (alloc_args): Create at_file_argbuf.
4658 (clear_args): Truncate at_file_argbuf.
4659 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4660 (open_at_file): New function.
4661 (close_at_file): Likewise.
4662 (create_at_file): Delete.
4663 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4666 (validate_switches_from_spec): Deal with %@{...} sequence.
4667 (validate_switches): Likewise.
4668 (driver::finalize): Call clear_args.
4670 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4672 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4674 2018-06-11 Martin Sebor <msebor@redhat.com>
4676 * doc/invoke.texi (-Wall): List -Wc++17-compat.
4677 (Wno-class-memaccess): Add @opindex.
4678 (Wno-templates, Wno-multiple-inheritance): Same.
4679 (Wno-virtual-inheritance, Wno-namespaces): Same.
4680 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4681 (Wno-format-overflow, Wno-format-truncation): Same.
4682 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4683 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4684 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4685 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4686 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4687 (Wno-misspelled-isr): Same.
4689 2018-06-11 Martin Sebor <msebor@redhat.com>
4691 * PR tree-optimization/86083
4692 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4694 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4696 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4698 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4701 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4702 on the correct operand.
4703 (*movdi_internal64): Ditto.
4705 2018-06-11 Martin Liska <mliska@suse.cz>
4707 PR tree-optimization/86089
4708 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4710 2018-06-11 Julia Koval <julia.koval@intel.com>
4712 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4713 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4714 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4716 2018-06-11 Olivier Hainque <hainque@adacore.com>
4718 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4719 for Ada with strict dwarf2.
4721 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4724 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4727 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
4729 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4731 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
4733 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4736 2018-06-08 Martin Liska <mliska@suse.cz>
4738 * tree-cfg.h (debug_function): Fix argument type to match
4741 2018-06-08 Martin Liska <mliska@suse.cz>
4743 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4744 Remove usage of MPX-related (and removed) fields.
4745 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4747 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4749 * cfg.c (debug): Use TDF_NONE rather than 0.
4750 * cfghooks.c (debug): Likewise.
4751 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4752 (struct dump_option_value_info): Convert to...
4753 (struct kv_pair): ...this template type.
4754 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4756 (optinfo_verbosity_options): Likewise.
4757 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4759 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4760 than int for "optgroup_flags" param.
4761 (dump_generic_expr_loc): Use dump_flags_t rather than int for
4763 (dump_dec): Likewise.
4764 (dump_finish): Use TDF_NONE rather than 0.
4765 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4766 rather than int for "optgroup_flags" param. Use TDF_NONE rather
4767 than 0. Update for change to option_ptr.
4768 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4769 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
4770 0. Update for changes to optinfo_verbosity_options and
4772 (opt_info_switch_p): Convert optgroup_flags from int to
4774 (dump_basic_block): Use dump_flags_t rather than int
4775 for "dump_kind" param.
4776 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4777 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4778 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4779 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4780 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4781 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4782 TDF_NONE): Convert from macros to...
4783 (enum dump_flag): ...this new enum.
4784 (dump_flags_t): Update to use enum.
4785 (operator|, operator&, operator~, operator|=, operator&=):
4786 Implement for dump_flags_t.
4787 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4788 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4789 Convert from macros to...
4790 (enum optgroup_flag): ...this new enum.
4791 (optgroup_flags_t): New typedef.
4792 (operator|, operator|=): Implement for optgroup_flags_t.
4793 (struct dump_file_info): Convert field "alt_flags" to
4794 dump_flags_t. Convert field "optgroup_flags" to
4796 (dump_basic_block): Use dump_flags_t rather than int for param.
4797 (dump_generic_expr_loc): Likewise.
4798 (dump_dec): Likewise.
4799 (dump_register): Convert param "optgroup_flags" to
4801 (opt_info_enable_passes): Likewise.
4802 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4804 * gimple-pretty-print.c (debug): Likewise.
4805 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4806 (merged_store_group::apply_stores): Likewise.
4807 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4808 * gimple.c (verify_gimple_pp): Likewise.
4809 * graphite-poly.c (print_pbb_body): Likewise.
4810 * passes.c (pass_manager::register_one_dump_file): Convert
4811 local "optgroup_flags" to optgroup_flags_t.
4812 * print-tree.c (print_node): Use TDF_NONE rather than 0.
4814 (debug_body): Likewise.
4815 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4816 to optgroup_flags_t.
4817 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4819 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4820 (convert_mult_to_fma): Likewise.
4821 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4822 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4823 * tree-vect-data-refs.c (dump_lower_bound): Convert param
4824 "dump_kind" to dump_flags_t.
4826 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4828 * config/rs6000/rs6000.c (min, max): Delete.
4830 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4832 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4833 -mabi=spe and -mabi=no-spe.
4835 2018-06-08 Martin Liska <mliska@suse.cz>
4837 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4838 where we expect an existing summary.
4840 2018-06-08 Martin Liska <mliska@suse.cz>
4842 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4843 * ipa-inline.h (estimate_edge_growth): Likewise.
4845 2018-06-08 Martin Liska <mliska@suse.cz>
4847 * cgraph.c (function_version_hasher::hash): Use
4848 cgraph_node::get_uid ().
4849 (function_version_hasher::equal):
4850 * cgraph.h (cgraph_node::get_uid): New method.
4851 * ipa-inline.c (update_caller_keys): Use
4852 cgraph_node::get_uid ().
4853 (update_callee_keys): Likewise.
4854 * ipa-utils.c (searchc): Likewise.
4855 (ipa_reduced_postorder): Likewise.
4856 * lto-cgraph.c (input_node): Likewise.
4857 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4858 * symbol-summary.h (symtab_insertion): Likewise.
4859 (symtab_removal): Likewise.
4860 (symtab_duplication): Likewise.
4861 * tree-pretty-print.c (dump_function_header): Likewise.
4862 * tree-sra.c (convert_callers_for_node): Likewise.
4864 2018-06-08 Martin Liska <mliska@suse.cz>
4866 * cgraph.c (symbol_table::create_edge): Always assign a new
4868 (symbol_table::free_edge): Do not recycle numbers.
4869 * cgraph.h (cgraph_edge::get): New method.
4870 * symbol-summary.h (symtab_removal): Use it.
4871 (symtab_duplication): Likewise.
4872 (call_summary::hashable_uid): Remove.
4874 2018-06-08 Martin Liska <mliska@suse.cz>
4876 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4877 (initialize_growth_caches): Remove.
4878 (free_growth_caches): Likewise.
4879 (do_estimate_edge_time): Use edge_growth_cache.
4880 (do_estimate_edge_size): Likewise.
4881 (do_estimate_edge_hints): Likewise.
4882 * ipa-inline.c (reset_edge_caches): Likewise.
4883 (recursive_inlining): Likewise.
4884 (inline_small_functions): Likewise.
4885 * ipa-inline.h (initialize_growth_caches): Remove.
4886 (estimate_edge_size): Likewise.
4887 (estimate_edge_time): Likewise.
4888 (estimate_edge_hints): Likewise.
4889 (reset_edge_growth_cache): Likewise.
4890 * symbol-summary.h (call_summary::remove): New method.
4892 2018-06-08 Martin Liska <mliska@suse.cz>
4894 * ipa-cp.c (class edge_clone_summary): New summary.
4895 (grow_edge_clone_vectors): Remove.
4896 (ipcp_edge_duplication_hook): Remove.
4897 (class edge_clone_summary_t): New call_summary class.
4898 (ipcp_edge_removal_hook): Remove.
4899 (edge_clone_summary_t::duplicate): New function.
4900 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4901 (create_specialized_node): Likewise.
4902 (ipcp_driver): Initialize edge_clone_summaries and do not
4905 2018-06-08 Martin Liska <mliska@suse.cz>
4907 * symbol-summary.h (get): New function.
4908 (call_summary::m_initialize_when_cloning): New class member.
4910 2018-06-08 Martin Liska <mliska@suse.cz>
4912 * cgraph.c (cgraph_node::remove): Do not recycle uid.
4913 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4914 (symbol_table::allocate_cgraph_symbol): Do not set uid.
4915 * passes.c (uid_hash_t): Record removed_nodes by their uids.
4916 (remove_cgraph_node_from_order): Use the removed_nodes set.
4917 (do_per_function_toporder): Likwise.
4918 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4919 instead of summary_uid.
4920 (symtab_removal): Likewise.
4921 (symtab_duplication): Likewise.
4923 2018-06-08 Martin Liska <mliska@suse.cz>
4925 * ipa-cp.c (ipcp_store_bits_results): Use
4926 ipcp_transformation_sum.
4927 (ipcp_store_vr_results): Likewise.
4928 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4930 (ipcp_transformation_initialize): ... this.
4931 (ipa_set_node_agg_value_chain):
4932 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4933 (write_ipcp_transformation_info): Likewise.
4934 (read_ipcp_transformation_info): Likewise.
4935 (ipcp_update_bits): Likewise.
4936 (ipcp_update_vr): Likewise.
4937 (ipcp_transform_function): Likewise.
4938 * ipa-prop.h: Rename ipcp_transformation_summary to
4939 ipcp_transformation.
4940 (class ipcp_transformation_t): New function summary.
4941 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4942 (ipa_get_agg_replacements_for_node): Likewise.
4944 2018-06-08 Martin Liska <mliska@suse.cz>
4946 * ipa-pure-const.c (struct funct_state_d): Do it class instead
4948 (class funct_state_summary_t): New function_summary class.
4949 (has_function_state): Remove.
4950 (get_function_state): Likewise.
4951 (set_function_state): Likewise.
4952 (add_new_function): Likewise.
4953 (funct_state_summary_t::insert): New function.
4954 (duplicate_node_data): Remove.
4955 (remove_node_data): Remove.
4956 (funct_state_summary_t::duplicate): New function.
4957 (register_hooks): Create new funct_state_summaries.
4958 (pure_const_generate_summary): Use it.
4959 (pure_const_write_summary): Likewise.
4960 (pure_const_read_summary): Likewise.
4961 (propagate_pure_const): Likewise.
4962 (propagate_nothrow): Likewise.
4963 (dump_malloc_lattice): Likewise.
4964 (propagate_malloc): Likewise.
4965 (execute): Do not register hooks, just remove summary
4967 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4970 2018-06-08 Martin Liska <mliska@suse.cz>
4972 * ipa-reference.c (remove_node_data): Remove.
4973 (duplicate_node_data): Likewise.
4974 (class ipa_ref_var_info_summary_t): New class.
4975 (class ipa_ref_opt_summary_t): Likewise.
4976 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4977 (get_reference_optimization_summary): Use
4978 ipa_ref_opt_sum_summaries.
4979 (set_reference_vars_info): Remove.
4980 (set_reference_optimization_summary): Likewise.
4981 (ipa_init): Create summaries.
4982 (init_function_info): Use function summary.
4983 (ipa_ref_opt_summary_t::duplicate): New function.
4984 (ipa_ref_opt_summary_t::remove): New function.
4985 (get_read_write_all_from_node): Fix GNU coding style.
4986 (propagate): Use function summary.
4987 (write_node_summary_p): Fix GNU coding style.
4988 (stream_out_bitmap): Likewise.
4989 (ipa_reference_read_optimization_summary): Use function summary.
4990 (ipa_reference_c_finalize): Do not release hooks.
4992 2018-06-08 Martin Liska <mliska@suse.cz>
4994 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4995 (analyze_function_body): Extract multiple calls of get_create.
4996 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4997 * ipa-inline.c (recursive_inlining): Use ::get method.
4998 * ipa-inline.h (estimate_edge_growth): Likewise.
5000 2018-06-08 Martin Liska <mliska@suse.cz>
5002 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5004 (hsa_function_summary::hsa_function_summary): Use the new enum
5006 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5007 * hsa-gen.c (hsa_get_host_function): Likewise.
5008 (get_brig_function_name): Likewise.
5009 * ipa-hsa.c (process_hsa_functions): Likewise.
5010 (ipa_hsa_write_summary): Likewise.
5011 * symbol-summary.h (symtab_duplication): Use ::get function/
5012 (get): New function.
5014 2018-06-08 Martin Liska <mliska@suse.cz>
5016 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5018 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5019 (hsa_register_kernel): Likewise.
5020 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5021 * hsa-gen.c (hsa_get_host_function): Likewise.
5022 (get_brig_function_name): Likewise.
5023 (generate_hsa): Likewise.
5024 (pass_gen_hsail::execute): Likewise.
5025 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5026 (devirtualization_time_bonus): Likewise.
5027 (ipcp_propagate_stage): Likewise.
5028 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5029 (edge_set_predicate): Likewise.
5030 (evaluate_conditions_for_known_args): Likewise.
5031 (evaluate_properties_for_edge): Likewise.
5032 (ipa_fn_summary::reset): Likewise.
5033 (ipa_fn_summary_t::duplicate): Likewise.
5034 (dump_ipa_call_summary): Likewise.
5035 (ipa_dump_fn_summary): Likewise.
5036 (analyze_function_body): Likewise.
5037 (compute_fn_summary): Likewise.
5038 (estimate_edge_devirt_benefit): Likewise.
5039 (estimate_edge_size_and_time): Likewise.
5040 (estimate_calls_size_and_time): Likewise.
5041 (estimate_node_size_and_time): Likewise.
5042 (inline_update_callee_summaries): Likewise.
5043 (remap_edge_change_prob): Likewise.
5044 (remap_edge_summaries): Likewise.
5045 (ipa_merge_fn_summary_after_inlining): Likewise.
5046 (ipa_update_overall_fn_summary): Likewise.
5047 (read_ipa_call_summary): Likewise.
5048 (inline_read_section): Likewise.
5049 (write_ipa_call_summary): Likewise.
5050 (ipa_fn_summary_write): Likewise.
5051 (ipa_free_fn_summary): Likewise.
5052 * ipa-hsa.c (process_hsa_functions): Likewise.
5053 (ipa_hsa_write_summary): Likewise.
5054 (ipa_hsa_read_section): Likewise.
5055 * ipa-icf.c (sem_function::merge): Likewise.
5056 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5057 (do_estimate_edge_time): Likewise.
5058 (estimate_size_after_inlining): Likewise.
5059 (estimate_growth): Likewise.
5060 (growth_likely_positive): Likewise.
5061 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5062 (inline_call): Likewise.
5063 * ipa-inline.c (caller_growth_limits): Likewise.
5064 (can_inline_edge_p): Likewise.
5065 (can_inline_edge_by_limits_p): Likewise.
5066 (compute_uninlined_call_time): Likewise.
5067 (compute_inlined_call_time): Likewise.
5068 (want_inline_small_function_p): Likewise.
5069 (edge_badness): Likewise.
5070 (update_caller_keys): Likewise.
5071 (update_callee_keys): Likewise.
5072 (recursive_inlining): Likewise.
5073 (inline_small_functions): Likewise.
5074 (inline_to_all_callers_1): Likewise.
5075 (dump_overall_stats): Likewise.
5076 (early_inline_small_functions): Likewise.
5077 (early_inliner): Likewise.
5078 * ipa-inline.h (estimate_edge_growth): Likewise.
5079 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5080 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5081 * ipa-prop.h (IPA_NODE_REF): Likewise.
5082 (IPA_EDGE_REF): Likewise.
5083 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5084 (propagate_malloc): Likewise.
5085 * ipa-split.c (execute_split_functions): Likewise.
5086 * symbol-summary.h: Rename get to get_create.
5088 (get_create): Likewise.
5089 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5091 2018-06-08 Martin Liska <mliska@suse.cz>
5093 * symbol-summary.h (release): Move definition out of class
5095 (symtab_removal): Likewise.
5096 (symtab_duplication): Likewise.
5098 2018-06-08 Martin Liska <mliska@suse.cz>
5100 * symbol-summary.h (function_summary): Move constructor
5101 implementation out of class declaration.
5102 (release): Likewise.
5103 (symtab_insertion): Likewise.
5104 (symtab_removal): Likewise.
5105 (symtab_duplication): Likewise.
5108 2018-06-08 Martin Liska <mliska@suse.cz>
5110 * Makefile.in: Remove support for MPX (macros, related functions,
5111 fields in cgraph_node, ...).
5112 * builtin-types.def (BT_BND): Likewise.
5113 (BT_FN_BND_CONST_PTR): Likewise.
5114 (BT_FN_CONST_PTR_BND): Likewise.
5115 (BT_FN_VOID_PTR_BND): Likewise.
5116 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5117 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5118 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5119 (expand_builtin_mempcpy_with_bounds): Likewise.
5120 (expand_builtin_memset_with_bounds): Likewise.
5121 (expand_builtin_memset_args): Likewise.
5122 (std_expand_builtin_va_start): Likewise.
5123 (expand_builtin): Likewise.
5124 (expand_builtin_with_bounds): Likewise.
5125 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5126 (DEF_LIB_BUILTIN_CHKP): Likewise.
5127 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5128 (DEF_CHKP_BUILTIN): Likewise.
5129 (BUILT_IN_MEMCPY): Likewise.
5130 (BUILT_IN_MEMMOVE): Likewise.
5131 (BUILT_IN_MEMPCPY): Likewise.
5132 (BUILT_IN_MEMSET): Likewise.
5133 (BUILT_IN_STPCPY): Likewise.
5134 (BUILT_IN_STRCAT): Likewise.
5135 (BUILT_IN_STRCHR): Likewise.
5136 (BUILT_IN_STRCPY): Likewise.
5137 (BUILT_IN_STRLEN): Likewise.
5138 (BUILT_IN_MEMCPY_CHK): Likewise.
5139 (BUILT_IN_MEMMOVE_CHK): Likewise.
5140 (BUILT_IN_MEMPCPY_CHK): Likewise.
5141 (BUILT_IN_MEMSET_CHK): Likewise.
5142 (BUILT_IN_STPCPY_CHK): Likewise.
5143 (BUILT_IN_STRCAT_CHK): Likewise.
5144 (BUILT_IN_STRCPY_CHK): Likewise.
5145 * calls.c (store_bounds): Likewise.
5146 (emit_call_1): Likewise.
5147 (special_function_p): Likewise.
5148 (maybe_warn_nonstring_arg): Likewise.
5149 (initialize_argument_information): Likewise.
5150 (finalize_must_preallocate): Likewise.
5151 (compute_argument_addresses): Likewise.
5152 (expand_call): Likewise.
5153 * cfgexpand.c (expand_call_stmt): Likewise.
5154 (expand_return): Likewise.
5155 (expand_gimple_stmt_1): Likewise.
5156 (pass_expand::execute): Likewise.
5157 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5158 (cgraph_node::remove): Likewise.
5159 (cgraph_node::dump): Likewise.
5160 (cgraph_node::verify_node): Likewise.
5161 * cgraph.h (chkp_function_instrumented_p): Likewise.
5162 (symtab_node::get_alias_target): Likewise.
5163 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5164 (cgraph_local_p): Likewise.
5165 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5166 (cgraph_edge::rebuild_references): Likewise.
5167 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5168 (walk_polymorphic_call_targets): Likewise.
5169 (cgraph_node::expand_thunk): Likewise.
5170 (symbol_table::output_weakrefs): Likewise.
5171 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5172 (ix86_handle_option): Likewise.
5173 * config/i386/constraints.md: Likewise.
5174 * config/i386/i386-builtin-types.def (BND): Likewise.
5178 * config/i386/i386-builtin.def (BDESC_END): Likewise.
5179 (BDESC_FIRST): Likewise.
5181 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5182 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5183 * config/i386/i386.c (enum reg_class): Likewise.
5184 (ix86_target_string): Likewise.
5185 (ix86_option_override_internal): Likewise.
5186 (ix86_conditional_register_usage): Likewise.
5187 (ix86_valid_target_attribute_inner_p): Likewise.
5188 (ix86_set_indirect_branch_type): Likewise.
5189 (ix86_set_current_function): Likewise.
5190 (ix86_function_arg_regno_p): Likewise.
5191 (init_cumulative_args): Likewise.
5192 (ix86_function_arg_advance): Likewise.
5193 (ix86_function_arg): Likewise.
5194 (ix86_pass_by_reference): Likewise.
5195 (ix86_function_value_regno_p): Likewise.
5196 (ix86_function_value_1): Likewise.
5197 (ix86_function_value_bounds): Likewise.
5198 (ix86_return_in_memory): Likewise.
5199 (ix86_setup_incoming_vararg_bounds): Likewise.
5200 (ix86_va_start): Likewise.
5201 (indirect_thunk_need_prefix): Likewise.
5202 (print_reg): Likewise.
5203 (ix86_print_operand): Likewise.
5204 (ix86_expand_call): Likewise.
5205 (ix86_output_function_return): Likewise.
5206 (reg_encoded_number): Likewise.
5207 (BDESC_VERIFYS): Likewise.
5208 (ix86_init_mpx_builtins): Likewise.
5209 (ix86_init_builtins): Likewise.
5210 (ix86_emit_cmove): Likewise.
5211 (ix86_emit_move_max): Likewise.
5212 (ix86_expand_builtin): Likewise.
5213 (ix86_builtin_mpx_function): Likewise.
5214 (ix86_get_arg_address_for_bt): Likewise.
5215 (ix86_load_bounds): Likewise.
5216 (ix86_store_bounds): Likewise.
5217 (ix86_load_returned_bounds): Likewise.
5218 (ix86_store_returned_bounds): Likewise.
5219 (ix86_class_likely_spilled_p): Likewise.
5220 (ix86_hard_regno_mode_ok): Likewise.
5221 (x86_order_regs_for_local_alloc): Likewise.
5222 (ix86_mitigate_rop): Likewise.
5223 (ix86_bnd_prefixed_insn_p): Likewise.
5224 (ix86_mpx_bound_mode): Likewise.
5225 (ix86_make_bounds_constant): Likewise.
5226 (ix86_initialize_bounds): Likewise.
5227 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5228 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5229 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5230 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5231 (TARGET_CHKP_BOUND_MODE): Likewise.
5232 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5233 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5234 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5235 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5236 * config/i386/i386.h (TARGET_MPX): Likewise.
5237 (TARGET_MPX_P): Likewise.
5238 (VALID_BND_REG_MODE): Likewise.
5239 (FIRST_BND_REG): Likewise.
5240 (LAST_BND_REG): Likewise.
5241 (enum reg_class): Likewise.
5242 (BND_REG_P): Likewise.
5243 (BND_REGNO_P): Likewise.
5244 (BNDmode): Likewise.
5245 (ADJUST_INSN_LENGTH): Likewise.
5246 * config/i386/i386.md: Likewise.
5247 * config/i386/i386.opt: Likewise.
5248 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5249 (defined): Likewise.
5250 (LINK_MPX): Likewise.
5251 (MPX_SPEC): Likewise.
5252 (LIBMPX_SPEC): Likewise.
5253 (LIBMPXWRAPPERS_SPEC): Likewise.
5254 (CHKP_SPEC): Likewise.
5255 * config/i386/predicates.md: Likewise.
5256 * dbxout.c (dbxout_type): Likewise.
5257 * doc/extend.texi: Likewise.
5258 * doc/invoke.texi: Likewise.
5259 * doc/md.texi: Likewise.
5260 * doc/tm.texi: Likewise.
5261 * doc/tm.texi.in: Likewise.
5262 * dwarf2out.c (is_base_type): Likewise.
5263 (gen_formal_types_die): Likewise.
5264 (gen_subprogram_die): Likewise.
5265 (gen_type_die_with_usage): Likewise.
5266 (gen_decl_die): Likewise.
5267 (dwarf2out_late_global_decl): Likewise.
5268 * expr.c (expand_assignment): Likewise.
5269 (emit_storent_insn): Likewise.
5270 (store_expr_with_bounds): Likewise.
5271 (store_expr): Likewise.
5272 (expand_expr_real_1): Likewise.
5273 * expr.h (store_expr_with_bounds): Likewise.
5274 * function.c (use_register_for_decl): Likewise.
5275 (struct bounds_parm_data): Likewise.
5276 (assign_parms_augmented_arg_list): Likewise.
5277 (assign_parm_find_entry_rtl): Likewise.
5278 (assign_parm_is_stack_parm): Likewise.
5279 (assign_parm_load_bounds): Likewise.
5280 (assign_bounds): Likewise.
5281 (assign_parms): Likewise.
5282 (expand_function_start): Likewise.
5283 * gcc.c (CHKP_SPEC): Likewise.
5284 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5285 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5286 (wrestrict_dom_walker::check_call): Likewise.
5287 * gimple.c (gimple_build_call_from_tree): Likewise.
5288 * gimple.h (enum gf_mask): Likewise.
5289 (gimple_call_with_bounds_p): Likewise.
5290 (gimple_call_set_with_bounds): Likewise.
5291 * gimplify.c (gimplify_init_constructor): Likewise.
5292 * ipa-cp.c (initialize_node_lattices): Likewise.
5293 (propagate_constants_across_call): Likewise.
5294 (find_more_scalar_values_for_callers_subset): Likewise.
5295 * ipa-hsa.c (process_hsa_functions): Likewise.
5296 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5297 * ipa-icf.c (sem_function::merge): Likewise.
5298 * ipa-inline.c (early_inliner): Likewise.
5299 * ipa-pure-const.c (warn_function_noreturn): Likewise.
5300 (warn_function_cold): Likewise.
5301 (propagate_pure_const): Likewise.
5302 * ipa-ref.h (enum GTY): Likewise.
5303 * ipa-split.c (find_retbnd): Likewise.
5304 (consider_split): Likewise.
5305 (split_function): Likewise.
5306 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5307 * ipa.c (walk_polymorphic_call_targets): Likewise.
5308 (symbol_table::remove_unreachable_nodes): Likewise.
5309 (process_references): Likewise.
5310 (cgraph_build_static_cdtor_1): Likewise.
5311 * lto-cgraph.c (lto_output_node): Likewise.
5312 (output_refs): Likewise.
5313 (compute_ltrans_boundary): Likewise.
5314 (input_overwrite_node): Likewise.
5315 (input_node): Likewise.
5316 (input_cgraph_1): Likewise.
5317 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5318 * passes.c (pass_manager::execute_early_local_passes): Likewise.
5319 (class pass_chkp_instrumentation_passes): Likewise.
5320 (make_pass_chkp_instrumentation_passes): Likewise.
5321 * passes.def: Likewise.
5322 * rtl.h (struct GTY): Likewise.
5323 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5324 * stor-layout.c (layout_type): Likewise.
5325 * symtab.c: Likewise.
5326 * target.def: Likewise.
5327 * targhooks.c (default_chkp_bound_type): Likewise.
5328 (default_chkp_bound_mode): Likewise.
5329 (default_builtin_chkp_function): Likewise.
5330 (default_chkp_function_value_bounds): Likewise.
5331 (default_chkp_make_bounds_constant): Likewise.
5332 (default_chkp_initialize_bounds): Likewise.
5333 * targhooks.h (default_chkp_bound_type): Likewise.
5334 (default_chkp_bound_mode): Likewise.
5335 (default_builtin_chkp_function): Likewise.
5336 (default_chkp_function_value_bounds): Likewise.
5337 (default_chkp_make_bounds_constant): Likewise.
5338 (default_chkp_initialize_bounds): Likewise.
5339 * toplev.c (compile_file): Likewise.
5340 (process_options): Likewise.
5341 * tree-core.h (DEF_BUILTIN): Likewise.
5342 (DEF_BUILTIN_CHKP): Likewise.
5343 * tree-inline.c (declare_return_variable): Likewise.
5344 (remap_gimple_stmt): Likewise.
5345 (copy_bb): Likewise.
5346 (initialize_inlined_parameters): Likewise.
5347 (expand_call_inline): Likewise.
5348 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5349 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5350 (make_pass_ipa_chkp_produce_thunks): Likewise.
5351 (make_pass_chkp): Likewise.
5352 (make_pass_chkp_opt): Likewise.
5353 (make_pass_chkp_instrumentation_passes): Likewise.
5354 * tree-pretty-print.c (dump_generic_node): Likewise.
5355 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5356 * tree-ssa-dce.c (propagate_necessity): Likewise.
5357 (eliminate_unnecessary_stmts): Likewise.
5358 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5359 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5360 * tree-ssa-sccvn.h: Likewise.
5361 * tree-ssa-strlen.c (get_string_length): Likewise.
5362 (valid_builtin_call): Likewise.
5363 (adjust_last_stmt): Likewise.
5364 (handle_builtin_strchr): Likewise.
5365 (handle_builtin_strcpy): Likewise.
5366 (handle_builtin_stxncpy): Likewise.
5367 (handle_builtin_memcpy): Likewise.
5368 (handle_builtin_strcat): Likewise.
5369 (strlen_check_and_optimize_stmt): Likewise.
5370 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5371 * tree-streamer-in.c: Likewise.
5372 * tree-streamer.c (record_common_node): Likewise.
5373 * tree.c (tree_code_size): Likewise.
5374 (wide_int_to_tree_1): Likewise.
5375 (type_contains_placeholder_1): Likewise.
5376 (build_common_tree_nodes): Likewise.
5377 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5378 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5379 (POINTER_BOUNDS_P): Likewise.
5380 (BOUNDED_TYPE_P): Likewise.
5381 (BOUNDED_P): Likewise.
5382 (CALL_WITH_BOUNDS_P): Likewise.
5383 (pointer_bounds_type_node): Likewise.
5384 * value-prof.c (gimple_ic): Likewise.
5385 * var-tracking.c (vt_add_function_parameters): Likewise.
5386 * varasm.c (make_decl_rtl): Likewise.
5387 (assemble_start_function): Likewise.
5388 (output_constant): Likewise.
5389 (maybe_assemble_visibility): Likewise.
5390 * varpool.c (ctor_for_folding): Likewise.
5391 * chkp-builtins.def: Remove.
5392 * ipa-chkp.c: Remove.
5393 * ipa-chkp.h: Remove.
5394 * rtl-chkp.c: Remove.
5395 * rtl-chkp.h: Remove.
5396 * tree-chkp-opt.c: Remove.
5397 * tree-chkp.c: Remove.
5398 * tree-chkp.h: Remove.
5400 2018-06-07 Carl Love <cel@us.ibm.com>
5402 * config/rs6000/vsx.md (vextract_fp_from_shorth,
5403 vextract_fp_from_shortl): Add BE support.
5405 2018-06-07 Paul Koning <ni1d@arrl.net>
5407 * compare-elim.c (try_merge_compare): Don't merge compare if
5408 address contains a side effect.
5409 (try_eliminate_compare): Likewise.
5411 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
5413 * config.gcc: Support "tremont".
5414 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5415 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5417 * config/i386/i386.c (m_TREMONT): Define.
5418 (processor_target_table): Add "tremont".
5419 (PTA_TREMONT): Define.
5420 (ix86_lea_outperforms): Add TARGET_TREMONT.
5421 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5422 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5423 and M_INTEL_GOLDMONT_PLUS.
5424 (fold_builtin_cpu): Add "tremont".
5425 (ix86_add_stmt_cost): Add TARGET_TREMONT.
5426 (ix86_option_override_internal): Add "tremont".
5427 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5428 (processor_type): Add PROCESSOR_TREMONT.
5429 * config/i386/x86-tune.def: Add m_TREMONT.
5430 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5432 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5434 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5435 symbol defined for msp430i* devices to be lower case.
5437 2018-06-07 Richard Biener <rguenther@suse.de>
5439 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5440 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
5441 Properly wrap signed arithmetic if overflow wraps.
5443 2018-06-07 Jakub Jelinek <jakub@redhat.com>
5445 PR tree-optimization/69615
5446 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5447 of a cast from a same precision integral SSA_NAME in a bb dominated
5448 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
5449 cast to utype if rhs2 has already a compatible type.
5451 2018-06-07 Richard Biener <rguenther@suse.de>
5453 PR tree-optimization/85935
5454 * graphite-scop-detection.c (find_params_in_bb): Analyze
5455 condition operands with respect to the correct loop. Assert
5456 the analysis doesn't fail.
5458 2018-06-04 Carl Love <cel@us.ibm.com>
5460 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5461 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
5462 as it is slightly cheaper.
5463 (first_match_or_eos_index_<mode>):
5464 Calculate index using natural element order.
5465 (first_match_index_<mode>):
5466 Calculate index using natural element order.
5467 (first_match_or_eos_index_<mode>):
5468 Calculate index using natural order.
5469 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5470 for BE and LE modes.
5471 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5472 P9V_BUILTIN_VCLZLSBB_V16QI.
5473 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5476 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5478 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5479 indentation and line wrap for many prototypes. Add missing
5480 @smallexample directives around block of prototypes for vec_xl and
5483 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
5485 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5486 track if we pass or return IEEE 128-bit floating point.
5487 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5488 C++ mangling that is compatible with GCC 8.1.
5489 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5490 (init_cumulative_args): Note if we pass or return IEEE 128-bit
5491 floating point types.
5492 (rs6000_function_arg_advance_1): Likewise.
5493 (rs6000_mangle_type): Optionally generate mangled names that match
5494 what GCC 8.1 generated for IEEE 128-bit floating point types.
5495 (rs6000_globalize_decl_name): If we have an external function that
5496 passes or returns IEEE 128-bit types, generate a weak reference
5497 from the mangled name used in GCC 8.1 to the current mangled
5499 (rs6000_init_builtins): Make __ibm128 use the long double type if
5500 long double is IBM extended double. Make __float128 use the long
5501 double type if long double is IEEE 128-bit.
5504 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5505 macro for __ibm128 built-in functions.
5506 (PACK_IF): Add __ibm128 pack/unpack functions.
5507 (UNPACK_IF): Likewise.
5508 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5509 enable long double built-in functions if long double is IEEE
5510 128-bit floating point.
5511 (rs6000_invalid_builtin): Update long double built-in function
5513 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5514 functions, adjust the built-in function to use the long double
5515 built-in function if __ibm128 and long double are the same type.
5516 * doc/extend.texi (PowerPC builtins): Update documention for
5517 __builtin_{,un}pack_longdouble. Add documentation for
5518 __builtin_{,un}pack_ibm128.
5520 2018-06-06 Jim Wilson <jimw@sifive.com>
5522 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5523 (struct machine_function): New field interrupt_mode.
5524 (riscv_handle_type_attribute): New function. Add forward declaration.
5525 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5526 (riscv_expand_epilogue): Check interrupt_mode field.
5527 (riscv_set_current_function): Check interrupt attribute args and
5528 set interrupt_mode field.
5529 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5530 (riscv_sret, riscv_uret): New.
5531 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5532 new arguments to interrupt attribute.
5534 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5537 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5538 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5540 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5542 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5543 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5544 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5545 several redundant entries.
5547 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5549 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5550 type from "rtx" to "rtx_insn *".
5551 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5552 for local "call_insn", removing cast.
5553 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5555 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5557 PR tree-optimization/86066
5558 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5559 for BIT_INSERT_EXPR stores.
5561 2018-06-06 Richard Biener <rguenther@suse.de>
5563 PR tree-optimization/86062
5564 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5565 component refs ontop
5566 of to be offsetted base.
5568 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5570 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5571 to be static and remove check on interrupt attribute name.
5573 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5575 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5576 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5578 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5581 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5583 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5584 Remove second argument, change how error is called.
5585 (aarch64_layout_arg): Remove second argument from
5586 aarch64_err_no_fpadvsimd call.
5587 (aarch64_init_cumulative_args): Ditto.
5588 (aarch64_gimplify_va_arg_expr): Ditto.
5589 * config/aarch64/aarch64.md (mov<mode>): Ditto.
5591 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
5593 * config/i386/i386.md (simple_return_indirect_internal): New expander.
5594 (*simple_return_indirect_internal<mode>): Rename from
5595 simple_return_indirect_internal. Use W mode iterator.
5596 (rstorssp): New expander.
5597 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
5598 (clrssbsy): New expander.
5599 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
5601 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
5603 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5605 (cmse_check_pointed_object): Likewise.
5607 2018-06-05 Martin Liska <mliska@suse.cz>
5609 PR gcov-profile/47618
5610 * doc/invoke.texi: Document how -fprofile-dir format
5613 2018-06-05 Richard Biener <rguenther@suse.de>
5615 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5616 removal pretend DOM info isn't available so we do not update
5617 it and only remove edges, not dominated blocks. Actually free
5618 DOM info in case we removed something. Remove unreachable blocks.
5619 (mfb_keep_latches): Work with either DOM info or marked backedges.
5620 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5621 first. Mark backedges if DOM info isn't available.
5622 (Re-)compute DOM info after cleanup_control_flow_pre.
5624 2018-06-05 Richard Biener <rguenther@suse.de>
5626 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5627 (locus_discrim_hasher::hash): Adjust.
5628 (locus_discrim_hasher::equal): Likewise.
5629 (next_discriminator_for_locus): Work on line directly.
5630 (same_line_p): Pass in expanded locus1 as well.
5631 (assign_discriminators): Avoid redundant location expansions.
5633 2018-06-05 Richard Biener <rguenther@suse.de>
5635 PR tree-optimization/86046
5636 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5637 if required after clearing TREE_ADDRESSABLE.
5639 2018-06-05 Richard Biener <rguenther@suse.de>
5641 PR tree-optimization/86047
5642 * tree-ssa-loop.c (for_each_index): Glob handling of all
5643 decls and constants and really handle all of them.
5645 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5648 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5649 qualifier_void_pointer and qualifier_const_void_pointer.
5650 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5651 (arm_init_builtins): Handle the above.
5652 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5653 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5654 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5657 2018-06-05 Martin Liska <mliska@suse.cz>
5659 * auto-profile.c (read_autofdo_file): Do not use
5660 gcov_ctr_summary struct.
5661 (afdo_callsite_hot_enough_for_early_inline): Likewise.
5662 * coverage.c (struct counts_entry): Likewise.
5663 (read_counts_file): Read just single summary entry.
5664 (get_coverage_counts): Use gcov_summary struct.
5665 * coverage.h (get_coverage_counts): Likewise.
5666 * gcov-dump.c (dump_working_sets): Likewise.
5667 (tag_summary): Dump just single summary.
5668 * gcov-io.c (gcov_write_summary): Write just histogram
5670 (gcov_read_summary): Read just single summary.
5671 (compute_working_sets): Use gcov_summary struct.
5672 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5673 of GCOV_COUNTERS_SUMMABLE.
5674 (GCOV_COUNTERS_SUMMABLE): Remove.
5675 (GCOV_FIRST_VALUE_COUNTER): Replace with
5676 GCOV_COUNTER_V_INTERVAL.
5677 (struct gcov_ctr_summary): Remove.
5678 (struct gcov_summary): Directly use fields of former
5680 (compute_working_sets): Use gcov_summary struct.
5681 * gcov.c (read_count_file): Do not use ctrs fields.
5682 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5684 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5686 * profile.c: Likewise.
5687 * profile.h: Likewise.
5689 2018-06-05 Martin Liska <mliska@suse.cz>
5691 PR gcov-profile/84846
5692 * gcov.c (output_lines): Print working directory only
5693 in intermediate format.
5695 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
5697 * config/s390/s390-builtin-types.def: Add void function type.
5698 * config/s390/s390-builtins.def: Use the function type for the
5701 2018-06-04 Jim Wilson <jimw@sifive.com>
5703 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5705 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5706 and maybe_eh_return. Change regno to unsigned int. Use new args to
5707 handle EH_RETURN_DATA_REGNO registers properly.
5708 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5709 (riscv_expand_epilogue): Update comment. Change argument name and
5710 type. Update code to use new name and type. Pass new args to
5711 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
5713 * config/riscv/riscv.md (NORMAL_RETURN): New.
5714 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5715 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5716 (eh_return): Call gen_eh_return_internal and emit barrier.
5717 (eh_return_internal): Call riscv_expand_epilogue.
5719 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
5721 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5722 bit_insertion field and declare can_be_merged_into method.
5723 (merged_store_group::can_be_merged_into): New method.
5724 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5725 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
5726 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5728 2018-06-04 Richard Biener <rguenther@suse.de>
5730 PR tree-optimization/85955
5731 * builtins.c (fold_builtin_sincos): Convert pointers to
5732 destination to appropriate type before dereferencing.
5734 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
5736 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5738 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
5740 * expr.c (expand_expr_real_1): Force the operand into memory if
5741 its TYPE_MODE is BLKmode and if there is no integer mode for
5742 the number of bits being extracted.
5744 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5748 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5749 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5751 2018-06-04 Richard Biener <rguenther@suse.de>
5753 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5754 (cleanup_tree_cfg_noloop): ... single caller. Do
5755 start_recording_case_labels later.
5757 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
5759 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5760 to _IMMINTRIN_H_INCLUDED.
5761 * config/i386/pconfigintrin.h: Ditto.
5762 * config/i386/waitpkgintrin.h: Ditto.
5763 * config/i386/immintrin.h: Add includes for sgxintrin.h,
5764 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5765 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5766 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5767 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5768 waitpkgintrin.h and cldemoteintrin.h.
5770 2018-06-04 Richard Biener <rguenther@suse.de>
5772 PR tree-optimization/86038
5773 * tracer.c (find_best_successor): Check probability for
5774 being initialized, bail out if not.
5776 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
5779 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5780 of bits to ignore when comparing architectures.
5782 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5784 PR tree-optimization/69615
5785 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5786 maximum or minimum of the type, try to merge it also as if
5787 range1 is + [-, x - 1] or + [x + 1, -].
5790 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5792 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
5794 PR tree-optimization/86034
5795 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5796 the unsigned bitfield type in a bit insertion sequence if it does not
5797 have a larger precision than the bitfield size.
5798 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5800 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
5802 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5804 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5806 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5807 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5808 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5809 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5811 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5813 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5814 Disable -fdelete-null-pointer-checks for ELF toolchain.
5816 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5817 Kito Cheng <kito.cheng@gmail.com>
5819 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5820 (nds32le-*-*, nds32be-*-*): Integrate checking process.
5821 (nds32*-*-*): Add glibc and uclibc conditions.
5822 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5823 (TARGET_EXCEPT_UNWIND_INFO): Define.
5824 * config/nds32/elf.h: New file.
5825 * config/nds32/linux.h: New file.
5826 * config/nds32/nds32-elf.opt: New file.
5827 * config/nds32/nds32-linux.opt: New file.
5828 * config/nds32/nds32-fp-as-gp.c
5829 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5830 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5832 (nds32_asm_file_end): Ditto.
5833 (nds32_print_operand): Ditto.
5834 (nds32_insert_attributes): Ditto.
5835 (nds32_init_libfuncs): New function.
5836 (TARGET_HAVE_TLS): Define.
5837 (TARGET_INIT_LIBFUNCS): Define.
5838 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5840 (TARGET_ELF): Apply different mcmodel setting.
5841 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5842 been migrated into elf.h and linux.h files.
5843 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5844 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5845 (mcmodel): The content has been migrated into nds32-elf.opt and
5846 nds32-linux.opt files.
5847 * config/nds32/t-elf: New file.
5848 * config/nds32/t-linux: New file.
5850 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5851 Shiva Chen <shiva0217@gmail.com>
5853 * config/nds32/constants.md (unspec_volatile_element): Add
5854 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5855 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5857 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5858 (make_pass_nds32_fp_as_gp): Declare.
5859 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5861 (nds32_asm_function_end_prologue): Remove unused asm output.
5862 (nds32_asm_function_begin_epilogue): Remove unused asm output.
5863 (nds32_asm_file_start): Output necessary fp_as_gp information.
5864 (nds32_option_override): Adjust register usage.
5865 (nds32_expand_prologue): Consider fp_as_gp situation.
5866 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5867 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5870 (simple_return): Ditto.
5871 (omit_fp_begin): Output special directive for fp_as_gp.
5872 (omit_fp_end): Output special directive for fp_as_gp.
5873 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5874 mforbid-fp-as-gp): New options.
5876 2018-06-01 Mark Wielaard <mark@klomp.org>
5878 * dwarf2out.c (dwarf2out_finish): Remove generation of
5879 DW_AT_loclists_base.
5881 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5883 * gimple-ssa-store-merging.c: Include gimple-fold.h.
5884 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5885 (struct merged_store_group): Add bit_insertion field.
5886 (dump_char_array): Use standard hexadecimal format.
5887 (merged_store_group::merged_store_group): Set bit_insertion to false.
5888 (merged_store_group::apply_stores): Use optimal buffer size. Deal
5889 with BIT_INSERT_EXPR stores. Move up code updating the mask and
5890 also print the mask in the dump file.
5891 (pass_store_merging::gate): Minor tweak.
5892 (imm_store_chain_info::coalesce_immediate): Fix wrong association
5893 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
5894 stores with INTEGER_CST stores.
5895 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5896 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5897 and use it throughout. Generate bit insertion sequences if need be.
5898 (pass_store_merging::process_store): Remove redundant condition.
5899 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5901 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
5903 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5904 the 128-bit floating point types. Fix function comment.
5906 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5908 * config/aarch64/aarch64-simd.md
5909 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5911 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5914 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5916 PR tree-optimization/85989
5917 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5919 (backprop::intersect_uses): Check it when deciding whether this
5920 is a backedge reference.
5921 (backprop::process_block): Add each phi to m_visited_phis
5922 after visiting it, then clear it at the end.
5924 2018-06-01 Richard Biener <rguenther@suse.de>
5926 * tree-vectorizer.h (vect_dr_stmt): New function.
5927 (vect_get_load_cost): Adjust.
5928 (vect_get_store_cost): Likewise.
5929 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5930 Use vect_dr_stmt instead of DR_SMTT.
5931 (vect_record_base_alignments): Likewise.
5932 (vect_calculate_target_alignment): Likewise.
5933 (vect_compute_data_ref_alignment): Likewise and make static.
5934 (vect_update_misalignment_for_peel): Likewise.
5935 (vect_verify_datarefs_alignment): Likewise.
5936 (vector_alignment_reachable_p): Likewise.
5937 (vect_get_data_access_cost): Likewise. Pass down
5938 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5939 (vect_get_peeling_costs_all_drs): Likewise.
5940 (vect_peeling_hash_get_lowest_cost): Likewise.
5941 (vect_enhance_data_refs_alignment): Likewise.
5942 (vect_find_same_alignment_drs): Likewise.
5943 (vect_analyze_data_refs_alignment): Likewise.
5944 (vect_analyze_group_access_1): Likewise.
5945 (vect_analyze_group_access): Likewise.
5946 (vect_analyze_data_ref_access): Likewise.
5947 (vect_analyze_data_ref_accesses): Likewise.
5948 (vect_vfa_segment_size): Likewise.
5949 (vect_small_gap_p): Likewise.
5950 (vectorizable_with_step_bound_p): Likewise.
5951 (vect_prune_runtime_alias_test_list): Likewise.
5952 (vect_analyze_data_refs): Likewise.
5953 (vect_supportable_dr_alignment): Likewise.
5954 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5955 (vect_gen_prolog_loop_niters): Likewise.
5956 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5957 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5959 (vect_recog_mask_conversion_pattern): Likewise.
5960 (vect_try_gather_scatter_pattern): Likewise.
5961 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5962 to vect_get_store_cost.
5963 (vect_get_store_cost): Get stmt_info instead of DR.
5964 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5965 (vect_get_load_cost): Get stmt_info instead of DR.
5967 2018-06-01 Richard Biener <rguenther@suse.de>
5970 * gimple-fold.c (var_decl_component_p): Also allow offsetted
5971 vars wrapped in MEM_REFs.
5973 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5975 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5976 Fix subreg tests so that we only return a choice between
5977 GENERAL_REGS and FP_REGS if the original classes included both.
5979 2018-06-01 Richard Biener <rguenther@suse.de>
5982 * tree-ssa-structalias.c (get_function_part_constraint):
5983 Handle NULL fi->decl.
5984 (find_func_aliases_for_call): Properly handle indirect
5985 fi from direct call.
5986 (find_func_clobbers): Likewise.
5987 (ipa_pta_execute): Likewise.
5988 (create_variable_info_for): For functions that are ifunc_resolver
5989 resolve to a varinfo that contains the result of the resolver call.
5990 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5993 2018-05-31 Michael Collison <michael.collison@arm.com>
5995 * config/aarch64/aarch64.md:
5996 (*fix_to_zero_extenddfdi2): New pattern.
5997 * gcc.target/aarch64/fix_extend1.c: New testcase.
5999 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6003 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6004 and BUILT_IN_STRNCMP_EQ.
6005 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6006 BUILT_IN_STRNCMP_EQ.
6007 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6008 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6009 (gimple_fold_builtin): Likewise.
6010 * tree-ssa-strlen.c (compute_string_length): New function.
6011 (determine_min_obsize): New function.
6012 (handle_builtin_string_cmp): New function to handle calls to
6013 string compare functions.
6014 (strlen_optimize_stmt): Add handling to builtin string compare
6016 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6017 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6018 * tree.c (build_common_builtin_nodes): Add new defines of
6019 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6021 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6024 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6025 functions with naked attribute.
6027 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6029 * config/i386/sse.md (avx_vec_concat<mode>):
6030 Substitute concat_tg_mode mode attribute with xtg_mode.
6031 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6032 (concat_tg_mode): Remove mode attribute.
6034 2018-05-31 Martin Sebor <msebor@redhat.com>
6037 * calls.c (alloc_max_size): Correct a logic error/typo.
6038 Treat excessive arguments as infinite. Warn for invalid arguments.
6039 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6041 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6044 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6045 and movx for Haswell.
6047 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6048 Cesar Philippidis <cesar@codesourcery.com>
6051 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6052 when emitting error on private/firstprivate reductions.
6053 * omp-low.c (lower_omp_target): Avoid reference-type processing
6054 on pointers for firstprivate clause.
6056 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6058 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6061 * config/aarch64/aarch64-simd.md
6062 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6063 (aarch64_ld1_x3_<mode>): Likewise
6064 (aarch64_st1x2<VALLDIF:mode>): Likewise
6065 (aarch64_st1_x2_<mode>): Likewise
6066 (aarch64_st1x3<VALLDIF:mode>): Likewise
6067 (aarch64_st1_x3_<mode>): Likewise
6068 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6069 (vld1_s8_x3): Likewise.
6070 (vld1_u16_x3): Likewise.
6071 (vld1_s16_x3): Likewise.
6072 (vld1_u32_x3): Likewise.
6073 (vld1_s32_x3): Likewise.
6074 (vld1_u64_x3): Likewise.
6075 (vld1_s64_x3): Likewise.
6076 (vld1_f16_x3): Likewise.
6077 (vld1_f32_x3): Likewise.
6078 (vld1_f64_x3): Likewise.
6079 (vld1_p8_x3): Likewise.
6080 (vld1_p16_x3): Likewise.
6081 (vld1_p64_x3): Likewise.
6082 (vld1q_u8_x3): Likewise.
6083 (vld1q_s8_x3): Likewise.
6084 (vld1q_u16_x3): Likewise.
6085 (vld1q_s16_x3): Likewise.
6086 (vld1q_u32_x3): Likewise.
6087 (vld1q_s32_x3): Likewise.
6088 (vld1q_u64_x3): Likewise.
6089 (vld1q_s64_x3): Likewise.
6090 (vld1q_f16_x3): Likewise.
6091 (vld1q_f32_x3): Likewise.
6092 (vld1q_f64_x3): Likewise.
6093 (vld1q_p8_x3): Likewise.
6094 (vld1q_p16_x3): Likewise.
6095 (vld1q_p64_x3): Likewise.
6096 (vst1_s64_x2): Likewise.
6097 (vst1_u64_x2): Likewise.
6098 (vst1_f64_x2): Likewise.
6099 (vst1_s8_x2): Likewise.
6100 (vst1_p8_x2): Likewise.
6101 (vst1_s16_x2): Likewise.
6102 (vst1_p16_x2): Likewise.
6103 (vst1_s32_x2): Likewise.
6104 (vst1_u8_x2): Likewise.
6105 (vst1_u16_x2): Likewise.
6106 (vst1_u32_x2): Likewise.
6107 (vst1_f16_x2): Likewise.
6108 (vst1_f32_x2): Likewise.
6109 (vst1_p64_x2): Likewise.
6110 (vst1q_s8_x2): Likewise.
6111 (vst1q_p8_x2): Likewise.
6112 (vst1q_s16_x2): Likewise.
6113 (vst1q_p16_x2): Likewise.
6114 (vst1q_s32_x2): Likewise.
6115 (vst1q_s64_x2): Likewise.
6116 (vst1q_u8_x2): Likewise.
6117 (vst1q_u16_x2): Likewise.
6118 (vst1q_u32_x2): Likewise.
6119 (vst1q_u64_x2): Likewise.
6120 (vst1q_f16_x2): Likewise.
6121 (vst1q_f32_x2): Likewise.
6122 (vst1q_f64_x2): Likewise.
6123 (vst1q_p64_x2): Likewise.
6124 (vst1_s64_x3): Likewise.
6125 (vst1_u64_x3): Likewise.
6126 (vst1_f64_x3): Likewise.
6127 (vst1_s8_x3): Likewise.
6128 (vst1_p8_x3): Likewise.
6129 (vst1_s16_x3): Likewise.
6130 (vst1_p16_x3): Likewise.
6131 (vst1_s32_x3): Likewise.
6132 (vst1_u8_x3): Likewise.
6133 (vst1_u16_x3): Likewise.
6134 (vst1_u32_x3): Likewise.
6135 (vst1_f16_x3): Likewise.
6136 (vst1_f32_x3): Likewise.
6137 (vst1_p64_x3): Likewise.
6138 (vst1q_s8_x3): Likewise.
6139 (vst1q_p8_x3): Likewise.
6140 (vst1q_s16_x3): Likewise.
6141 (vst1q_p16_x3): Likewise.
6142 (vst1q_s32_x3): Likewise.
6143 (vst1q_s64_x3): Likewise.
6144 (vst1q_u8_x3): Likewise.
6145 (vst1q_u16_x3): Likewise.
6146 (vst1q_u32_x3): Likewise.
6147 (vst1q_u64_x3): Likewise.
6148 (vst1q_f16_x3): Likewise.
6149 (vst1q_f32_x3): Likewise.
6150 (vst1q_f64_x3): Likewise.
6151 (vst1q_p64_x3): Likewise.
6153 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6155 * config/msp430/msp430.c (msp430_output_labelref): Prepend
6156 user_label_prefix to name.
6158 * tree-core.h: Update comment about the format of NAME string
6159 passed to handler in attribute_spec.
6161 * config/msp430/msp430.md: Remove erroneous subreg expression from
6162 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6163 zero_extend{q,h}isi2.
6165 2018-05-30 Borislav Petkov <bp@suse.de>
6167 * doc/extend.texi: Document some architecture specific
6168 constraints and sort entries.
6170 2018-05-30 Martin Sebor <msebor@redhat.com>
6173 * builtins.c (expand_builtin_stpcpy_1): New function.
6174 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6175 only if the former succeeds.
6177 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6179 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6182 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6184 * doc/invoke.texi (-flinker-output): Document
6186 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6188 * passes.c (ipa_write_summaries): Only modify statements if body
6190 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6191 incrementally linking.
6192 (ipa_passes): Likewise.
6193 * lto-cgraph.c (lto_output_node): When incrementally linking do not
6194 pass down resolution info.
6195 * common.opt (flag_incremental_link): Update info.
6196 * gcc.c (plugin specs): Turn flinker-output=* to
6197 -plugin-opt=-linker-output-known
6198 * toplev.c (compile_file): Also cut compilation when doing incremental
6200 * flag-types. (enum lto_partition_model): Add
6201 LTO_LINKER_OUTPUT_NOLTOREL.
6202 (invoke.texi): Add -flinker-output docs.
6203 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6204 link same way as WPA; do not stream in dead initializers.
6206 * dwarf2out.c (dwarf2out_die_ref_for_decl,
6207 darf2out_register_external_decl): Support incremental link.
6209 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6211 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6213 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6215 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6216 it down to simple_object_copy_lto_debug_sections.
6217 (run_gcc): Determine incremental LTO link time and configure
6218 lto1 into non-wpa mode, disable renaming of debug sections.
6220 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
6222 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6223 descriptions of various incorrectly documented functions.
6225 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
6228 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6229 address check not strict.
6231 2018-05-30 Richard Biener <rguenther@suse.de>
6233 PR tree-optimization/85964
6234 * tracer.c (better_p): Drop initialized count check, we only
6235 call the function with initialized counts now.
6236 (find_best_successor): Do find a best edge if one
6237 has uninitialized count.
6238 (find_best_predecessor): Likewise. Do BB frequency check only
6239 if count is initialized.
6241 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
6243 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6244 (aarch64_ldrstr_offset_compare): New.
6245 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6246 load/store orderings.
6247 (aarch64_gen_adjusted_ldpstp): Likewise.
6249 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
6251 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6252 Check for subset of GENERAL_REGS and FP_REGS.
6253 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6256 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
6258 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6259 and wi::to_poly_offset. Add the current offset and then check
6260 whether the sum fits, rather than using an unchecked addition of
6261 a checked term. Check for a shwi rather than a uhwi.
6262 * expr.c (get_bit_range): Use tree_to_poly_uint64.
6263 (store_constructor): Use poly_int_tree_p.
6264 (expand_expr_real_1): Likewise.
6265 * function.c (assign_temp): Likewise.
6266 * fold-const.c (const_binop): Use poly_int_tree_p and
6268 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
6270 * ipa-icf-gimple.c (func_checker::compare_operand): Use
6271 to_poly_offset for MEM offsets.
6272 * ipa-icf.c (sem_variable::equals): Likewise.
6273 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6274 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6275 wi::to_poly_offset for BIT_FIELD_REF offsets.
6276 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6278 * var-tracking.c (emit_note_insn_var_location): Use
6279 tree_to_poly_uint64.
6281 2018-05-29 Jim Wilson <jimw@sifive.com>
6283 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6285 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
6288 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6289 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6291 (sse4_1_round<mode>2): Use nonimmediate_operand
6292 for operand 1 predicate.
6294 2018-05-29 Martin Sebor <msebor@redhat.com>
6295 Richard Biener <rguenther@suse.de>
6298 * calls.c (get_size_range): Call determine_value_range instead
6299 of get_value_range..
6300 * tree-vrp.h (determine_value_range): Declared new function.
6301 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6303 2018-05-29 Richard Biener <rguenther@suse.de>
6305 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6306 sure to use non-pattern stmts for get_earlier_stmt arguments.
6307 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6308 called on pattern stmts.
6309 (get_later_stmt): Likewise.
6311 2018-05-29 Martin Liska <mliska@suse.cz>
6313 PR gcov-profile/85759
6314 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6317 2018-05-29 Jakub Jelinek <jakub@redhat.com>
6319 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6321 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6325 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6326 VEC_PACK_FLOAT_EXPR): New tree codes.
6327 * tree-pretty-print.c (op_code_prio): Handle
6328 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6329 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6330 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6331 * tree-inline.c (estimate_operator_cost): Likewise.
6332 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6333 * fold-const.c (const_binop): Likewise.
6334 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6335 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6336 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6337 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6338 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6339 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6340 * expr.c (expand_expr_real_2): Likewise.
6341 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6342 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6343 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6345 * optabs.c (expand_widen_pattern_expr): For
6346 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6347 sign from result type rather than operand's type.
6348 (expand_binop_directly): For vec_packu_float_optab and
6349 vec_packs_float_optab allow result type to be different from operand's
6351 * optabs-tree.c (optab_for_tree_code): Handle
6352 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6353 VEC_PACK_FLOAT_EXPR. Formatting fixes.
6354 * tree-vect-generic.c (expand_vector_operations_1): Handle
6355 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6356 VEC_PACK_FLOAT_EXPR.
6357 * tree-vect-stmts.c (supportable_widening_operation): Handle
6359 (supportable_narrowing_operation): Handle FLOAT_EXPR.
6360 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6361 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6362 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
6363 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6365 (vec_pack<floatprefix>_float_<mode>): New expander.
6366 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6368 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6369 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6370 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6371 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6372 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6374 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6375 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6376 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6377 VEC_PACK_FLOAT_EXPR): Document.
6379 2018-05-29 Richard Biener <rguenther@suse.de>
6381 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6383 (stmt_vec_info_vec): Make pointer.
6384 (init_stmt_vec_info_vec): Remove.
6385 (free_stmt_vec_info_vec): Likewise.
6386 (set_stmt_vec_info_vec): New function.
6387 (free_stmt_vec_infos): Likewise.
6388 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6389 (set_vinfo_for_stmt): Likewise.
6390 (get_earlier_stmt): Likewise.
6391 (get_later_stmt): Likewise.
6392 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6393 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6394 (vec_info::~vec_info): Free stmt_vec_infos.
6395 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6396 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6397 (pass_slp_vectorize::execute): Likewise.
6398 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6399 (free_stmt_vec_info_vec): Likewise.
6400 (set_stmt_vec_info_vec): New function.
6401 (free_stmt_vec_infos): Likewise.
6402 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6403 the global stmt_vec_info_vec.
6404 * tree-parloops.c (gather_scalar_reductions): Use
6405 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6408 2018-05-29 Richard Biener <rguenther@suse.de>
6410 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6412 2018-05-29 Martin Liska <mliska@suse.cz>
6413 David Malcolm <dmalcolm@redhat.com>
6415 * vec.c (test_reverse): New.
6416 (vec_c_tests): Add new test.
6417 * vec.h (vl_ptr>::reverse): New function.
6419 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
6421 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6423 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6426 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
6428 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6430 2018-05-28 Richard Biener <rguenther@suse.de>
6432 PR tree-optimization/85933
6433 * tree-vect-data-refs.c (vect_record_base_alignments): Only
6434 look at stmts marked as vectorizable.
6436 2018-05-28 Richard Biener <rguenther@suse.de>
6438 PR tree-optimization/85934
6439 * tree-vect-generic.c (expand_vector_operations_1): Hoist
6440 vector boolean check before scalar optimization.
6442 2018-05-28 Jakub Jelinek <jakub@redhat.com>
6444 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6447 2018-05-28 Mark Wielaard <mark@klomp.org>
6449 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6450 if it is an expression containing a minus sign.
6452 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
6454 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6456 2018-05-27 Paul Koning <ni1d@arrl.net>
6458 * config/pdp11/pdp11.md (truncsihi2): Remove.
6460 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
6461 Chung-Ju Wu <jasonwucj@gmail.com>
6463 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6465 (unaligned_store_dw): Ditto.
6466 * config/nds32/nds32-memory-manipulation.c
6467 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6468 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6469 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6470 (emit_setmem_word_loop): Rename to ...
6471 (emit_setmem_doubleword_loop): ... this.
6472 (nds32_gen_dup_4_byte_to_word_value): New function.
6473 (nds32_gen_dup_8_byte_to_double_word_value): New function.
6474 (nds32_expand_setmem_loop): Refine implementation.
6475 (nds32_expand_setmem_loop_v3m): Ditto.
6476 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6479 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6481 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6483 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6485 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6486 (nds32_init_machine_status): Initialize machine->attr_naked_p and
6487 machine->attr_no_prologue_p.
6488 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6489 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6490 (nds32_expand_epilogue): Consider attr_naked_p.
6491 (nds32_expand_epilogue_v3pop): Likewise.
6492 (nds32_can_use_return_insn): Likewise.
6493 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6494 attr_no_prologue_p fields.
6495 * config/nds32/nds32.opt (mret-in-naked-func): New option.
6497 2018-05-27 Jakub Jelinek <jakub@redhat.com>
6500 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6502 * config/i386/sse.md
6503 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6505 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6507 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6509 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6511 (*<floatsuffix>floatv2div2sf2): Rename to ...
6512 (*float<floatunssuffix>v2div2sf2): ... this.
6513 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6514 (float<floatunssuffix>v2div2sf2_mask): ... this.
6515 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6516 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6517 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6519 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6521 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6523 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6525 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6527 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6529 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6530 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6531 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6532 gen_ufix_truncv8dfv8si2.
6533 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6534 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6535 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6536 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6537 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6538 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6539 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6540 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6542 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6546 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6548 2018-05-25 Jim Wilson <jimw@sifive.com>
6550 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6551 * config/riscv/riscv.c (struct machine_function): Add
6552 interrupt_handler_p and attribute_checked_p fields.
6553 (riscv_attribute_table): Add interrupt.
6554 (riscv_interrupt_type_p): New.
6555 (riscv_save_reg_p): Save extra regs for interrupt handler.
6556 (riscv_use_save_libcall): Return false for interrupt handler.
6557 (riscv_first_stack_step): Add forward declaration.
6558 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6559 for interrupt handler with large frame. Use it for saved reg list.
6560 (riscv_expand_prologue): Move flag_stack_usage_info support to
6561 eliminate duplication.
6562 (riscv_expand_epilogue): Generate mret for interrupt handler.
6563 (riscv_epilogue_uses): New.
6564 (riscv_can_use_return_insn): Return false for interrupt handler.
6565 (riscv_function_ok_for_sibcall): Likewise.
6566 (riscv_set_current_function): Add interrupt handler support.
6567 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6568 * config/riscv/riscv.md (UNSPECV_MRET): New.
6570 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6572 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6574 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6576 PR tree-optimization/85712
6577 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6578 this candidate has already been replaced in-situ by a copy.
6580 2018-05-25 Jason Merrill <jason@redhat.com>
6582 PR c++/80485 - inline function non-zero address.
6583 * symtab.c (nonzero_address): Check DECL_COMDAT.
6585 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6588 * config/alpha/alpha.md (ashlsi3): New insn pattern.
6589 (*ashlsi_se): Rename from *ashldi_se. Define as sign
6590 extension of SImode operation. Use const123_operand predicate.
6591 (*saddsi_1): Remove.
6592 (*saddl_se_1): Ditto.
6594 (*ssubl_se_1): Ditto.
6595 * config/alpha/predicates.md (const123_operand): New predicate.
6596 * config/alpha/constraints.md (P): Use IN_RANGE.
6598 2018-05-25 Richard Biener <rguenther@suse.de>
6600 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6602 (ref_maybe_used_by_stmt_p): Likewise.
6603 (stmt_may_clobber_ref_p): Likewise.
6604 (stmt_may_clobber_ref_p_1): Likewise.
6605 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6607 (ref_maybe_used_by_stmt_p): Likewise.
6608 (stmt_may_clobber_ref_p): Likewise.
6609 (stmt_may_clobber_ref_p_1): Likewise.
6610 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6611 the alias oracle to disambiguate DRs with stmts DR analysis
6613 (vect_analyze_data_refs): Do not give up on not analyzable
6614 DRs for BB vectorization. Remove code truncating the dataref
6617 2018-05-25 Jakub Jelinek <jakub@redhat.com>
6620 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6621 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
6622 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6624 2018-05-25 Richard Biener <rguenther@suse.de>
6626 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6627 function, combining stmt data ref gathering and fatal analysis
6629 (vect_analyze_data_refs): Remove now redudnant code and simplify.
6630 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6631 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6632 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6633 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6635 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6637 PR tree-optimization/85720
6638 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6639 SCC if all partitions are builtins.
6640 (version_loop_by_alias_check): New parameter. Generate cancelable
6641 runtime alias check if all partitions are builtins.
6642 (distribute_loop): Update call to above function.
6644 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6646 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6647 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6648 (parm_default_def_partition_arg): Ditto.
6649 (set_parm_default_def_partition): Ditto.
6650 (get_parm_default_def_partitions): Ditto and make it static.
6651 (get_undefined_value_partitions): Ditto and make it static.
6652 (remove_ssa_form): Refactor call to init_var_map here.
6653 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6654 computation for loop region.
6655 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6656 (register_default_def): Delete.
6657 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6658 (parm_default_def_partition_arg): Ditto.
6659 (set_parm_default_def_partition): Ditto.
6660 (get_parm_default_def_partitions): Ditto and make it static.
6661 (get_undefined_value_partitions): Ditto and make it static.
6662 (coalesce_with_default, coalesce_with_default): Update comment.
6663 (create_coalesce_list_for_region): New func factored out from
6664 create_outofssa_var_map.
6665 (populate_coalesce_list_for_outofssa): New func factored out from
6666 create_outofssa_var_map and coalesce_ssa_name.
6667 (create_outofssa_var_map): Delete.
6668 (coalesce_ssa_name): Refactor to support live range computation.
6669 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6670 (get_parm_default_def_partitions): Delete.
6671 (get_undefined_value_partitions): Ditto.
6672 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6673 computation for loop region.
6674 (new_tree_live_info, loe_visit_block): Ditto.
6675 (live_worklist, set_var_live_on_entry): Ditto.
6676 (calculate_live_on_exit, verify_live_on_entry): Ditto.
6677 * tree-ssa-live.h (struct _var_map): New fields.
6678 (init_var_map): Change decl.
6679 (region_contains_p): New.
6681 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6683 * tree-ssa-live.h (live_merge_and_clear): Delete.
6685 2018-05-25 Richard Biener <rguenther@suse.de>
6688 * tree-dump.c (dequeue_and_dump): Remove access to removed
6689 operand 2 of a SWITCH_EXPR.
6691 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6693 * doc/sourcebuild.texi (vect_double_cond_arith): Include
6694 multiplication and division.
6695 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6696 (cond_udiv@var{m}, cond_umod@var{m}): Document.
6697 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6698 (cond_udiv_optab, cond_umod_optab): New optabs.
6699 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6700 (IFN_COND_RDIV): New internal functions.
6701 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6702 TRUNC_MOD_EXPR and RDIV_EXPR.
6703 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6704 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6706 (SVE_INT_BINARY): Include mult.
6707 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6708 (optab, sve_int_op): Handle mult.
6709 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6711 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6712 for SVE_INT_BINARY_SD.
6714 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6716 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6717 (optab, sve_int_op): Handle div and udiv.
6718 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6719 for SVE_INT_BINARY_SD.
6720 (*<optab><mode>3): New insn for the same.
6722 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6724 * tree-vect-patterns.c: Include predict.h.
6725 (vect_recog_divmod_pattern): Restrict check for division support
6726 to when optimizing for size.
6728 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6730 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6731 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6732 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6733 (gimple_match_op::set_op): Likewise.
6734 (gimple_resimplify4): Declare.
6735 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6736 (expr::gen_transform): Likewise.
6737 (decision_tree::gen): Generate a simplification routine for 4 operands.
6738 * gimple-match-head.c (gimple_simplify): Add an overload for
6739 4 operands. In the top-level function, handle up to 4 call
6740 arguments and call gimple_resimplify4.
6741 (gimple_resimplify4): New function.
6742 (build_call_internal): Pass a fourth operand.
6743 (maybe_push_to_seq): Likewise.
6744 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6745 Fold VEC_COND_EXPRs of an operation and a default value into
6746 an IFN_COND_* function if possible.
6747 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6749 (SVE_COND_FP_BINARY): Include them.
6750 (optab, sve_fp_op): Handle them.
6751 (SVE_INT_BINARY_REV): New code iterator.
6752 (SVE_COND_FP_BINARY_REV): New int iterator.
6753 (commutative): New int attribute.
6754 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6756 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6758 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6759 (*cond_<optab><mode>): New patterns for reversed operands.
6761 2018-05-25 Richard Biener <rguenther@suse.de>
6763 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6764 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6765 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6766 (STMT_VINFO_GROUPED_ACCESS): Adjust.
6767 * tree-vect-data-refs.c (everywhere): Adjust users.
6768 * tree-vect-loop.c (everywhere): Likewise.
6769 * tree-vect-slp.c (everywhere): Likewise.
6770 * tree-vect-stmts.c (everywhere): Likewise.
6771 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6773 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6775 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6777 (gcc_cv_as_section_exclude): ... this.
6778 Try Solaris as #exclude syntax.
6779 * configure: Regenerate.
6780 * config.in: Regenerate.
6781 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6783 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6784 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6786 * varasm.c (default_elf_asm_named_section): Don't check if
6787 HAVE_GAS_SECTION_EXCLUDE is defined.
6789 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6791 * doc/md.texi: Update the documentation of the cond_* optabs
6792 to mention the new final operand. Fix GET_MODE_NUNITS call.
6793 Describe the scalar case too.
6794 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6795 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6797 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6798 (get_conditional_internal_fn): Update comment.
6799 * tree-vect-loop.c (vectorizable_reduction): Pass the original
6800 accumulator value as a final argument to conditional functions.
6801 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6802 a define_expand and add an "else" operand. Assert for now that
6803 the else operand is equal to operand 2. Use SVE_INT_BINARY and
6804 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6805 (*cond_<optab><mode>): New patterns.
6806 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6807 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6808 (UNSPEC_COND_EOR): Delete.
6809 (optab): Remove associated mappings.
6810 (SVE_INT_BINARY): New code iterator.
6811 (sve_int_op): Remove int attribute and add "minus" to the code
6813 (SVE_COND_INT_OP): Delete.
6814 (SVE_COND_FP_OP): Rename to...
6815 (SVE_COND_FP_BINARY): ...this.
6817 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6819 * optabs.c (can_reuse_operands_p): New function.
6820 (maybe_legitimize_operands): Try to reuse the results for
6823 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6825 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6826 Add {q} suffix to insn mnemonic.
6828 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6830 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6831 (msp430_warn_func_return): New.
6833 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
6835 * fold-const.c (tree_nonzero_bits): New function.
6836 * fold-const.h (tree_nonzero_bits): Likewise.
6837 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6838 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6840 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6844 * varasm.c (assemble_alias): Check ifunc_resolver only on
6847 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6850 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6851 when memory input operand is handled.
6853 2018-05-24 Luis Machado <luis.machado@linaro.org>
6855 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6857 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6859 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6861 * match.pd: Delay FMA folds until after vectorization.
6863 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
6866 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6867 address check not strict.
6869 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6871 * gimple-match.h (gimple_match_op): New class.
6872 (mprts_hook): Replace parameters with a gimple_match_op *.
6873 (maybe_build_generic_op): Likewise.
6874 (gimple_simplified_result_is_gimple_val): Replace parameters with
6875 a const gimple_match_op *.
6876 (gimple_simplify): Replace code_helper * and tree * parameters with
6877 a gimple_match_op * parameter.
6878 (gimple_resimplify1): Replace code_helper *, tree and tree *
6879 parameters with a gimple_match_op * parameter.
6880 (gimple_resimplify2): Likewise.
6881 (gimple_resimplify3): Likewise.
6882 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6883 parameters with a gimple_match_op * parameter.
6884 * gimple-match-head.c (gimple_simplify): Change prototypes of
6885 auto-generated functions to take a gimple_match_op * instead of
6886 separate code_helper * and tree * parameters. Make the same
6887 change in the top-level overload and update calls to the
6888 gimple_resimplify routines. Update calls to the auto-generated
6889 functions and to maybe_push_res_to_seq in the publicly-facing
6890 operation-specific gimple_simplify overloads.
6891 (gimple_match_op::MAX_NUM_OPS): Define.
6892 (gimple_resimplify1): Replace rcode and ops with a single res_op
6893 parameter. Update call to gimple_simplify.
6894 (gimple_resimplify2): Likewise.
6895 (gimple_resimplify3): Likewise.
6896 (mprts_hook): Replace parameters with a gimple_match_op *.
6897 (maybe_build_generic_op): Likewise.
6898 (build_call_internal): Replace type, nargs and ops with
6899 a gimple_match_op *.
6900 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6901 with a single gimple_match_op *. Update calls to mprts_hook,
6902 build_call_internal and gimple_simplified_result_is_gimple_val.
6903 Factor out code that is common to the tree_code and combined_fn cases.
6904 * genmatch.c (expr::gen_transform): Replace tem_code and
6905 tem_ops with a gimple_match_op called tem_op. Update calls
6906 to the gimple_resimplify functions and maybe_push_res_to_seq.
6907 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6908 res_ops. Update call to the gimple_resimplify functions.
6909 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6910 (decision_tree::gen): Make the functions take a gimple_match_op *
6911 called res_op instead of separate res_code and res_ops parameters.
6912 Update call accordingly.
6913 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6914 and ops with a single res_op parameter. Update calls to
6915 maybe_build_generic_op and maybe_push_res_to_seq.
6916 (fold_stmt_1): Update calls to gimple_simplify and
6917 replace_stmt_with_simplification.
6918 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6919 and gimple_simplified_result_is_gimple_val.
6920 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6922 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6923 with a gimple_match_op *.
6924 (vn_nary_build_or_lookup): Likewise. Update call to
6925 vn_nary_build_or_lookup_1.
6926 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6927 gimple_match_op *. Update calls to the gimple_resimplify routines
6928 and to gimple_simplified_result_is_gimple_val.
6929 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6930 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6931 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6932 (visit_nary_op): Likewise.
6933 (visit_reference_op_load): Likewise.
6935 2018-05-23 Luis Machado <luis.machado@linaro.org>
6937 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6938 modifier for printing the step amount.
6940 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
6943 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6946 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
6948 * doc/sourcebuild.texi (Endianness): New subsubsection.
6950 2018-05-23 Luis Machado <luis.machado@linaro.org>
6952 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6953 <prefetch_dynamic_strides>: New const bool field.
6954 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6955 prefetch_dynamic_strides.
6956 (exynosm1_prefetch_tune): Likewise.
6957 (thunderxt88_prefetch_tune): Likewise.
6958 (thunderx_prefetch_tune): Likewise.
6959 (thunderx2t99_prefetch_tune): Likewise.
6960 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6962 (aarch64_override_options_internal): Update to set
6963 PARAM_PREFETCH_DYNAMIC_STRIDES.
6964 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6965 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6966 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6967 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6968 prefetch-dynamic-strides setting.
6970 2018-05-23 Luis Machado <luis.machado@linaro.org>
6972 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6973 <minimum_stride>: New const int field.
6974 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6975 minimum_stride field defaulting to -1.
6976 (exynosm1_prefetch_tune): Likewise.
6977 (thunderxt88_prefetch_tune): Likewise.
6978 (thunderx_prefetch_tune): Likewise.
6979 (thunderx2t99_prefetch_tune): Likewise.
6980 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6981 <default_opt_level>: Set to 3.
6982 (aarch64_override_options_internal): Update to set
6983 PARAM_PREFETCH_MINIMUM_STRIDE.
6984 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6985 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6986 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6987 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6988 stride is constant and is below the minimum stride threshold.
6990 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6992 * config/arm/arm-cpus.in (mode26): Delete.
6993 (armv4): Delete mode26 reference.
6994 * config/arm/arm.c (arm_configure_build_target): Delete use of
6997 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6999 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7001 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7002 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7004 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7005 (floatunsdidf2): Ditto.
7007 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7009 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7010 (fixuns_trunc<mode>si2_avx512f): Ditto.
7011 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7012 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7013 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7015 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7017 PR rtl-optimization/79985
7018 * df-scan.c (df_insn_refs_collect): Remove special case for
7019 global registers and asm statements.
7021 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7023 * extend.texi (Global Register Variables): Rewrite the bullet list.
7024 Note that the register is available for allocation. Note that access
7025 via inline asm must use constraints. Add note about async-signal
7026 handlers. Remove paragraph about automagic register selection.
7028 2018-05-23 Richard Biener <rguenther@suse.de>
7030 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7031 of fixed offset from memset VN.
7033 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7035 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7037 (alloc_cand_and_find_basis): Initialize first_interp field.
7038 (slsr_process_mul): Modify first_interp field.
7039 (slsr_process_add): Likewise.
7040 (slsr_process_cast): Modify first_interp field for each new
7042 (slsr_process_copy): Likewise.
7043 (dump_candidate): Dump first_interp field.
7044 (replace_mult_candidate): Process all interpretations, not just
7046 (replace_rhs_if_not_dup): Likewise.
7047 (replace_one_candidate): Likewise.
7049 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7051 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7053 (aarch64_needs_frame_chain): New function.
7054 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7056 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7059 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7060 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7061 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7062 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7063 as true for strict-align.
7064 (aarch64_can_inline_p): Perform checks even when callee has no
7065 attributes to check for strict alignment.
7066 * doc/extend.texi (AArch64 Function Attributes): Document
7068 * doc/invoke.texi: (AArch64 Options): Likewise.
7070 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7072 PR tree-optimization/85853
7073 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7074 the handling of the root of the node to...
7075 (vect_slp_analyze_node_operations_1): ...this new function,
7076 and run the whole thing with the child nodes' def types
7077 set according to their SLP node's def type.
7079 2018-05-23 Richard Biener <rguenther@suse.de>
7082 * tree-data-ref.c (create_runtime_alias_checks): Defer
7083 and ignore overflow warnings.
7085 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7087 PR tree-optimization/85822
7088 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7091 2018-05-23 Richard Biener <rguenther@suse.de>
7093 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7094 memset constants via native_interpret_expr.
7096 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7099 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7101 (cgraph_node::create_alias): Likewise.
7102 (cgraph_node::get_availability): Check ifunc_resolver instead
7103 of looking up ifunc attribute.
7104 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7105 * varasm.c (do_assemble_alias): Likewise.
7106 (assemble_alias): Likewise.
7107 (default_binds_local_p_3): Likewise.
7108 * cgraph.h (cgraph_node): Add ifunc_resolver.
7109 (cgraph_node::only_called_directly_or_aliased_p): Return false
7111 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7113 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7114 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7115 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7116 instead of looking up ifunc attribute.
7118 2018-05-22 Luis Machado <luis.machado@linaro.org>
7120 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7122 2018-05-22 Martin Sebor <msebor@redhat.com>
7125 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7126 only when expasion succeeds.
7127 (expand_builtin_strcmp): Same.
7128 (expand_builtin_strncmp): Same.
7130 2018-05-22 Martin Sebor <msebor@redhat.com>
7132 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7134 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7135 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7137 * config/aarch64/aarch64-ldpstp.md: Replace uses of
7138 aarch64_mem_pair_operand with memory_operand and delete operand swapping
7140 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7141 Add check for legitimate_address.
7142 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7143 (aarch64_swap_ldrstr_operands): New.
7144 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7147 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7148 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7150 * config/aarch64/aarch64.md: New patterns to generate stp
7152 (store_pair_sw, store_pair_dw): New patterns to generate stp for
7153 single words and double words.
7154 (load_pair_sw, load_pair_dw): Likewise.
7155 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7157 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7159 * config/aarch64/aarch64-ldpstp.md: Modify peephole
7160 for different mode ldpstp and add peephole for merged zero stores.
7162 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7164 (aarch64_gen_store_pair): Rename calls to match new patterns.
7165 (aarch64_gen_load_pair): Rename calls to match new patterns.
7166 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7167 (load_pair<DREG:mode><DREG2:mode>): ... This.
7168 (store_pair<mode>): Rename to...
7169 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7170 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7172 (V_INT_EQUIV): Handle SImode.
7173 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7176 2018-05-22 Martin Sebor <msebor@redhat.com>
7179 * calls.c (maybe_warn_nonstring_arg): Use string length to set
7180 or ajust the presumed bound on an operation to avoid unnecessary
7183 2018-05-22 Martin Sebor <msebor@redhat.com>
7185 PR tree-optimization/85826
7186 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7187 assuming that a DECL necesarily has a constant size.
7189 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
7192 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7194 2018-05-22 Richard Biener <rguenther@suse.de>
7196 PR tree-optimization/85834
7197 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7198 non-constant and non-zero memset arguments.
7200 2018-05-22 Martin Liska <mliska@suse.cz>
7203 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7205 2018-05-22 Richard Biener <rguenther@suse.de>
7207 PR tree-optimization/85863
7208 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7209 comparisons when vectype is specified.
7210 (vectorizable_condition): Do not specify vectype for
7211 vect_is_simple_cond when SLP vectorizing.
7213 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
7216 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7217 define __ibm128 as long double.
7218 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7219 as a distinct type when IEEE 128-bit support is enabled.
7220 (init_float128_ieee): Fix up conversions between IFmode and IEEE
7221 128-bit types to use the correct functions.
7222 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7223 convert between 128-bit floating point types that have different
7224 modes but the same representation, instead of using gen_lowpart to
7226 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7228 (IFKF_reg): New attributes to give the register constraints for
7230 (extend<mode>tf2_internal): New insns to mark an explicit
7231 conversion between 128-bit floating point types that have a
7232 different mode but share the same representation.
7234 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
7236 PR tree-optimization/85814
7237 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7238 a null return from get_strinfo when unsharing the next
7239 strinfo in the chain.
7241 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7244 * varasm.c (weak_finish): Clean up weak_decls.
7246 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7248 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7249 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7250 UNSPEC_UADALP values.
7251 * config/aarch64/iterators.md (ABAL): New int iterator.
7254 (sur): Add mappings for the above.
7255 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7257 (aarch64_<sur>abal<mode>_4): Likewise.
7258 (aarch64_<sur>adalp<mode>_3): Likewise.
7259 (<sur>sadv16qi): New define_expand.
7261 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
7263 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7264 (*movdf_internal): Ditto.
7265 (*rcpsf2_sse): Ditto.
7266 (*rsqrtsf2_sse): Ditto.
7267 (*sqrt<mode>2_sse): Ditto.
7269 2018-05-21 Tamar Christina <tamar.christina@arm.com>
7271 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7273 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7274 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7275 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7276 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7278 * config/aarch64/arm_neon.h: Likewise.
7279 * config/aarch64/iterators.md (VQ_I): New.
7281 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
7283 * config.gcc: Add arc/t-multilib-linux to tmake_file for
7285 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7288 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7290 * config/nds32/constraints.md (S): New constraint.
7291 * config/nds32/nds32.md (call_internal): Use constraint S.
7292 (call_value_internal): Likewise.
7293 (sibcall_internal): Likewise.
7294 (sibcall_value_internal): Likewise.
7296 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7297 Chung-Ju Wu <jasonwucj@gmail.com>
7299 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7302 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7303 Chung-Ju Wu <jasonwucj@gmail.com>
7305 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7306 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7307 (nds32_rtx_costs_impl): Simplify.
7308 (nds32_address_cost_impl): Simplify.
7309 (nds32_init_rtx_costs): New function.
7310 (nds32_rtx_costs_speed_prefer): Likewise.
7311 (nds32_rtx_costs_size_prefer): Likewise.
7312 (nds32_address_cost_speed_prefer): Likewise.
7313 (nds32_address_cost_speed_fwprop): Likewise.
7314 (nds32_address_cost_size_prefer): Likewise.
7315 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7316 * config/nds32/nds32.c (nds32_option_override): Use
7317 nds32_init_rtx_costs function.
7319 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7321 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7322 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7323 (TARGET_PIPELINE_N8): Likewise.
7324 (TARGET_PIPELINE_N10): Likewise.
7325 (TARGET_PIPELINE_N13): Likewise.
7326 (TARGET_PIPELINE_GRAYWOLF): Likewise.
7328 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
7330 * config/nds32/nds32-fpu.md: Update copyright year.
7332 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7334 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7336 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7338 * config/nds32/nds32.c
7339 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7340 * config/nds32/nds32.opt (minline-asm-r15): New option.
7342 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7344 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7346 * config/nds32/nds32.md (abssi2): New pattern.
7348 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
7350 * config/i386/i386.md (rex64namesuffix): New mode attribute.
7351 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7352 Merge insn pattern from sse_cvtsi2ss<round_name> and
7353 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7354 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7355 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7356 using SWI48 mode iterator.
7357 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7358 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7359 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7360 pattern from sse_cvttss2si<round_saeonly_name>
7361 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7362 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7363 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7364 using SWI48 mode iterator.
7365 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7366 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7367 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7368 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7369 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7370 using SWI48 mode iterator.
7371 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7372 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7373 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7374 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7375 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7376 SWI48 mode iterator.
7377 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7378 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7379 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7380 pattern from sse_cvttsd2si<round_saeonly_name>
7381 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7383 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7385 * config/nds32/nds32-md-auxiliary.c
7386 (nds32_valid_smw_lwm_base_p): Refine.
7387 (nds32_output_smw_single_word): Refine.
7388 (nds32_output_smw_double_word): New.
7389 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7391 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7393 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7394 (nds32_output_stack_pop): Refine.
7395 (nds32_expand_unaligned_load): Refine.
7396 (nds32_expand_unaligned_store): Refine.
7398 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7399 Chung-Ju Wu <jasonwucj@gmail.com>
7401 * config/nds32/constants.md: Add TP_REGNUM constant.
7402 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7403 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7405 * config/nds32/nds32-doubleword.md: Consider flag_pic.
7406 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7407 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7408 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7409 and PIC code generation.
7410 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7412 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7414 * config/nds32/nds32.md: Support TLS and PIC.
7415 * config/nds32/nds32.c: Support TLS and PIC.
7416 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7417 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7420 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7422 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7423 mode with E_ prefix.
7425 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7426 Chung-Ju Wu <jasonwucj@gmail.com>
7428 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7429 * config/nds32/nds32-md-auxiliary.c
7430 (symbolic_reference_mentioned_p): New.
7431 (nds32_legitimize_ict_address): New.
7432 (nds32_expand_ict_move): New.
7433 (nds32_indirect_call_referenced_p): New.
7434 (nds32_symbol_binds_local_p): Delete.
7435 (nds32_long_call_p): Modify.
7436 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7437 * config/nds32/nds32-protos.h
7438 (symbolic_reference_mentioned_p): Declare.
7439 (nds32_legitimize_ict_address): Declare.
7440 (nds32_expand_ict_move): Declare.
7441 (nds32_indirect_call_referenced_p): Declare.
7442 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7443 (nds32_relax_group): Use nds32_ict_const_p as condition.
7444 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7445 (nds32_asm_file_start): Output ict_model directive in asm code.
7446 (nds32_legitimate_address_p): Consider indirect call.
7447 (nds32_print_operand): Consider indirect call.
7448 (nds32_print_operand_address): Consider indirect call.
7449 (nds32_insert_attributes): Handle "indirect_call" attribute.
7450 (TARGET_LEGITIMATE_ADDRESS_P): Define.
7451 (TARGET_LEGITIMATE_CONSTANT_P): Define.
7452 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7453 (TARGET_DELEGITIMIZE_ADDRESS): Define.
7454 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7455 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7456 (TARGET_ICT_MODEL_SMALL): Define.
7457 (TARGET_ICT_MODEL_LARGE): Define.
7458 * config/nds32/nds32.md (movsi): Consider ict model.
7459 (call, call_value): Consider ict model.
7460 (sibcall, sibcall_value): Consider ict model.
7461 * config/nds32/nds32.opt (mict-model): New option.
7462 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7465 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
7466 Monk Chiang <sh.chiang04@gmail.com>
7467 Jim Wilson <jimw@sifive.com>
7469 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7470 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
7471 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7472 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7473 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
7474 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7475 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7476 compute save_libcall_adjustment properly.
7477 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7478 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7479 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7480 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7481 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7482 (ABI_SPEC): Handle mabi=ilp32e.
7483 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7484 (RVE): Add RVE mask.
7485 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7486 <-march>: Add rv32e as an example.
7488 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
7491 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7492 (intra_create_variable_infos): Handle C++ constructors.
7494 2018-05-18 Martin Liska <mliska@suse.cz>
7496 * passes.def: Remove a redundant pass.
7498 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
7501 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7503 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7505 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7507 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7509 (armv2, armv2a, armv3, armv3m): Delete architectures.
7510 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7511 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7512 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7514 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7515 (*mulsidi3adddi): Likewise.
7516 (mulsidi3): Likewise.
7517 (*mulsidi3_nov6): Likewise.
7518 (umulsidi3): Likewise.
7519 (umulsidi3_nov6): Likewise.
7520 (umaddsidi4): Likewise.
7521 (*umulsidi3adddi): Likewise.
7522 (smulsi3_highpart): Likewise.
7523 (*smulsi3_highpart_nov6): Likewise.
7524 (umulsi3_highpart): Likewise.
7525 (*umulsi3_highpart_nov6): Likewise.
7526 * config/arm/arm.h (arm_arch3m): Delete.
7527 * config/arm/arm.c (arm_arch3m): Delete.
7528 (arm_option_override_internal): Update armv3-related comment.
7529 (arm_configure_build_target): Delete use of isa_bit_mode32.
7530 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7531 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7532 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7534 (mulusa3): Likewise.
7535 * config/arm/arm-protos.h (arm_arch3m): Delete.
7536 * config/arm/arm-tables.opt: Regenerate.
7537 * config/arm/arm-tune.md: Likewise.
7538 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7539 deleted architectures.
7541 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7543 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7544 (armv5t, armv5te): New features.
7545 (ARMv5, ARMv5e): Delete fgroups.
7546 (ARMv5t, ARMv5te): Adjust for above changes.
7548 (armv5, armv5e): Delete arches.
7549 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7551 (*call_reg_arm): Likewise.
7552 (*call_value_reg_armv5): Likewise.
7553 (*call_value_reg_arm): Likewise.
7554 (*call_symbol): Likewise.
7555 (*call_value_symbol): Likewise.
7556 (*sibcall_insn): Likewise.
7557 (*sibcall_value_insn): Likewise.
7559 (prefetch): Likewise.
7560 (define_split and define_peephole2 dependent on arm_arch5):
7562 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7564 (TARGET_ARM_QBIT): Likewise.
7565 (TARGET_DSP_MULTIPLY): Likewise.
7566 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7567 (arm_arch5, arm_arch5e): Delete.
7568 (arm_arch5t, arm_arch5te): Declare.
7569 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7570 (arm_arch5t): Declare.
7571 (arm_option_reconfigure_globals): Update for the above.
7572 (arm_options_perform_arch_sanity_checks): Update comment, replace
7573 use of arm_arch5 with arm_arch5t.
7574 (use_return_insn): Likewise.
7575 (arm_emit_call_insn): Likewise.
7576 (output_return_instruction): Likewise.
7577 (arm_final_prescan_insn): Likewise.
7578 (arm_coproc_builtin_available): Likewise.
7579 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7580 arm_arch5e with arm_arch5t and arm_arch5te.
7581 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7582 (arm_arch5t, arm_arch5te): Declare.
7583 * config/arm/arm-tables.opt: Regenerate.
7584 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7585 * config/arm/t-multilib: Likewise.
7586 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7587 instead of arm_arch5.
7588 (*call_reg_thumb1): Likewise.
7589 (*call_value_reg_thumb1_v5): Likewise.
7590 (*call_value_reg_thumb1): Likewise.
7591 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7593 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7595 2018-05-18 Martin Liska <mliska@suse.cz>
7597 PR gcov-profile/84846
7598 * doc/gcov.texi: Document -t option of gcov tool.
7600 2018-05-18 Martin Liska <mliska@suse.cz>
7602 PR gcov-profile/84846
7603 * gcov.c (print_usage): Add new -t option.
7604 (process_args): Handle the option.
7605 (generate_results): Use stdout as output when requested by
7608 2018-05-18 Martin Liska <mliska@suse.cz>
7610 PR gcov-profile/84846
7611 * coverage.c (coverage_init): Write PWD to .gcno file.
7612 * doc/gcov.texi: Document how working directory is printed.
7613 * gcov-dump.c (dump_gcov_file): Print PWD.
7614 * gcov.c (output_intermediate_file): Likewise.
7615 (read_graph_file): Read PWD string.
7616 (output_lines): Print PWD.
7618 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7621 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7622 for retval and return false if all args to phi are zero.
7624 2018-05-18 Richard Biener <rguenther@suse.de>
7626 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7628 (evrp_dom_walker::before_dom_children): Call it.
7630 2018-05-18 Richard Biener <rguenther@suse.de>
7632 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7633 results when processing array refs with variable index.
7635 2018-05-18 Toon Moene <toon@moene.org>
7637 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7638 directly after that of -floop-interchange. Indicate that both
7639 options are enabled by default when specifying -O3.
7641 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7643 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7644 iterator. Delete separate integer-mode vec_set<mode> expander.
7645 (aarch64_simd_vec_setv2di): Delete.
7646 (vec_setv2di): Delete.
7647 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7648 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
7649 the "w, r" alternative.
7651 2018-05-18 Martin Liska <mliska@suse.cz>
7653 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7654 * tree-pass.h (make_pass_lower_switch_O0): New function.
7655 * tree-switch-conversion.c (node_has_low_bound): Remove.
7656 (node_has_high_bound): Likewise.
7657 (node_is_bounded): Likewise.
7658 (class pass_lower_switch): Make it a template type and create
7660 (pass_lower_switch::execute): Add template argument.
7661 (make_pass_lower_switch): New function.
7662 (make_pass_lower_switch_O0): New function.
7663 (do_jump_if_equal): Remove.
7664 (emit_case_nodes): Simplify to just handle all 3 cases and leave
7665 all the hard work to tree optimization passes.
7667 2018-05-18 Martin Liska <mliska@suse.cz>
7669 * dbgcnt.c (limit_low): Renamed from limit.
7670 (limit_high): New variable.
7671 (dbg_cnt_is_enabled): Check for upper limit.
7672 (dbg_cnt): Adjust dumping.
7673 (dbg_cnt_set_limit_by_index): Add new argument for high
7675 (dbg_cnt_set_limit_by_name): Likewise.
7676 (dbg_cnt_process_single_pair): Parse new format.
7677 (dbg_cnt_process_opt): Use strtok.
7678 (dbg_cnt_list_all_counters): Remove 'value' and add
7680 * doc/invoke.texi: Document changes.
7682 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
7684 * doc/sourcebuild.texi (scalar_all_fma): Document.
7685 * tree.def (FMA_EXPR): Delete.
7686 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7687 * internal-fn.c (ternary_direct): New macro.
7688 (expand_ternary_optab_fn): Likewise.
7689 (direct_ternary_optab_supported_p): Likewise.
7690 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7691 * builtins.c (fold_builtin_fma): Delete.
7692 (fold_builtin_3): Don't call it.
7693 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7694 * expr.c (expand_expr_real_2): Likewise.
7695 * fold-const.c (operand_equal_p): Likewise.
7696 (fold_ternary_loc): Likewise.
7697 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7698 * gimple.c (DEFTREECODE): Likewise.
7699 * gimplify.c (gimplify_expr): Likewise.
7700 * optabs-tree.c (optab_for_tree_code): Likewise.
7701 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7702 * tree-eh.c (operation_could_trap_p): Likewise.
7703 (stmt_could_throw_1_p): Likewise.
7704 * tree-inline.c (estimate_operator_cost): Likewise.
7705 * tree-pretty-print.c (dump_generic_node): Likewise.
7706 (op_code_prio): Likewise.
7707 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7708 * tree-ssa-operands.c (get_expr_operands): Likewise.
7709 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7710 * fold-const-call.h (fold_fma): Delete.
7711 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7712 CFN_FNMA and CFN_FNMS.
7714 * genmatch.c (combined_fn): New enum.
7715 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7716 (commutative_op): New function.
7717 (commutate): Use it. Handle more than 2 operands.
7718 (dt_operand::gen_gimple_expr): Use commutative_op.
7719 (parser::parse_expr): Allow :c to be used with non-binary
7720 operators if the commutative operand is known.
7721 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7722 CFN_FMS, CFN_FNMA and CFN_FNMS.
7723 (backprop::process_assign_use): Remove FMA_EXPR handling.
7724 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7725 (gen_hsa_fma): New function.
7726 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7727 IFN_FNMA and IFN_FNMS.
7728 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7729 * gimple-fold.h (follow_all_ssa_edges): Declare.
7730 * gimple-fold.c (follow_all_ssa_edges): New function.
7731 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7732 gimple_build interface and use follow_all_ssa_edges to fold the result.
7733 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7734 instead of checking for optabs directly.
7735 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7736 rather than FMA_EXPRs.
7737 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7738 call to IFN_FMA instead of an FMA_EXPR.
7740 2018-05-17 Jim Wilson <jimw@sifive.com>
7742 * expr.c (do_tablejump): When converting index to Pmode, if we have a
7743 sign extended promoted subreg, and the range does not have the sign bit
7744 set, then do a sign extend.
7746 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7747 test, check for sign extended subreg and/or constant operands, and
7748 do a sign extend in that case.
7750 2018-05-17 Steve Ellcey <sellcey@cavium.com>
7752 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7753 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7755 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7756 Change logics_shift_reg to logics_shift_imm.
7757 (thunderx2t99_fp_loadpair_basic): Delete.
7758 (thunderx2t99_fp_storepair_basic): Delete.
7759 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7760 (thunderx2t99_asimd_polynomial): Delete.
7761 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7762 and neon_fp_mul_d_scalar_q.
7763 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7764 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7765 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7766 (thunderx2t99_asimd_lut): Add missing tbl types.
7767 (thunderx2t99_asimd_ext): Delete.
7768 (thunderx2t99_asimd_load1_1_mult): Delete.
7769 (thunderx2t99_asimd_load1_2_mult): Delete.
7770 (thunderx2t99_asimd_load1_ldp): New.
7771 (thunderx2t99_asimd_load1): New.
7772 (thunderx2t99_asimd_load2): Add missing *load2* types.
7773 (thunderx2t99_asimd_load3): New.
7774 (thunderx2t99_asimd_load4): New.
7775 (thunderx2t99_asimd_store1_1_mult): Delete.
7776 (thunderx2t99_asimd_store1_2_mult): Delete.
7777 (thunderx2t99_asimd_store2_mult): Delete.
7778 (thunderx2t99_asimd_store2_onelane): Delete.
7779 (thunderx2t99_asimd_store_stp): New.
7780 (thunderx2t99_asimd_store1): New.
7781 (thunderx2t99_asimd_store2): New.
7782 (thunderx2t99_asimd_store3): New.
7783 (thunderx2t99_asimd_store4): New.
7785 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
7787 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7788 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
7790 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
7791 Segher Boessenkool <segher@kernel.crashing.org>
7794 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7797 2018-05-17 Richard Biener <rguenther@suse.de>
7799 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7800 for pruning loop and prune defs feeding only already visited PHIs.
7802 2018-05-17 Richard Biener <rguenther@suse.de>
7804 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7806 2018-05-17 Bin Cheng <bin.cheng@arm.com>
7807 Richard Biener <rguenther@suse.de>
7809 PR tree-optimization/85793
7810 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7811 for VMAT_ELEMENTWISE.
7813 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7815 * internal-fn.h (lookup_internal_fn): Declare
7816 * internal-fn.c (lookup_internal_fn): New function.
7817 * gimple.c (gimple_build_call_from_tree): Handle calls to
7819 * gimple-pretty-print.c (dump_gimple_call): Print "." before
7820 internal function names.
7821 * tree-pretty-print.c (dump_generic_node): Likewise.
7822 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7824 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7826 * gimple-fold.h (gimple_build): Make the function forms take
7827 combined_fn rather than built_in_function.
7828 (gimple_simplify): Likewise.
7829 * gimple-match-head.c (gimple_simplify): Likewise.
7830 * gimple-fold.c (gimple_build): Likewise.
7831 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7832 rather than gimple_build_call_internal.
7833 (get_initial_defs_for_reduction): Likewise.
7834 (vect_create_epilog_for_reduction): Likewise.
7835 (vectorizable_live_operation): Likewise.
7837 2018-05-17 Martin Liska <mliska@suse.cz>
7839 * gimple-ssa-sprintf.c (format_directive): Do not use
7840 space in between 'G_' and '('.
7842 2018-05-17 Jakub Jelinek <jakub@redhat.com>
7845 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7846 even if the mask is not all ones.
7849 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7851 (ix86_gimple_fold_builtin): Likewise.
7854 * config/i386/i386.c: Include tree-vector-builder.h.
7855 (ix86_vector_shift_count): New function.
7856 (ix86_fold_builtin): Fold shift builtins by scalar count.
7857 (ix86_gimple_fold_builtin): Likewise.
7859 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7860 _mm512_setzero): New intrinsics.
7862 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
7863 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7865 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7866 code generation for cases where splatting a value is not useful.
7867 * simplify-rtx.c (simplify_ternary_operation): Simplify
7868 vec_merge across a vec_duplicate and a paradoxical subreg forming
7869 a vector mode to a vec_concat.
7871 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
7873 * config.gcc: Support "goldmont-plus".
7874 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7876 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7877 PROCESSOR_GOLDMONT_PLUS.
7878 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7879 (processor_target_table): Add "goldmont-plus".
7880 (PTA_GOLDMONT_PLUS): Define.
7881 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7882 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7883 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7884 (fold_builtin_cpu): Add "goldmont-plus".
7885 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7886 (ix86_option_override_internal): Add "goldmont-plus".
7887 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7888 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7889 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7890 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7892 2018-05-17 Richard Biener <rguenther@suse.de>
7894 PR tree-optimization/85757
7895 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7896 remove defs that only feed that PHI from further processing.
7898 2018-05-16 Jim Wilson <jimw@sifive.com>
7900 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7902 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7904 2018-05-16 Mark Wielaard <mark@klomp.org>
7906 * dwarf2out.c (count_index_strings): New function.
7907 (output_indirect_strings): Call count_index_strings and generate
7908 header for dwarf_version >= 5.
7910 2018-05-16 Mark Wielaard <mark@klomp.org>
7912 * dwarf2out.c (dwarf_FORM): New function.
7913 (set_indirect_string): Use dwarf_FORM.
7914 (reset_indirect_string): Likewise.
7915 (size_of_die): Likewise.
7916 (value_format): Likewise.
7917 (output_die): Likewise.
7918 (add_skeleton_AT_string): Likewise.
7919 (output_macinfo_op): Likewise.
7920 (index_string): Likewise.
7921 (output_index_string_offset): Likewise.
7922 (output_index_string): Likewise.
7923 (count_index_strings): Likewise.
7925 2018-05-16 Carl Love <cel@us.ibm.com>
7927 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7928 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7930 2018-05-16 Martin Jambor <mjambor@suse.cz>
7932 * ipa-prop.c (ipa_free_all_edge_args): Remove.
7933 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7935 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
7937 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7938 (fnma<mode>4): Likewise.
7939 (fms<mode>4): Likewise.
7940 (fnms<mode>4): Likewise.
7941 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7942 (aarch64_fnma<mode>4): Likewise.
7943 (aarch64_fms<mode>4): Likewise.
7944 (aarch64_fnms<mode>4): Likewise.
7945 (aarch64_fnmadd<mode>4): Likewise.
7947 2018-05-16 Jason Merrill <jason@redhat.com>
7949 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
7951 2018-05-16 Richard Biener <rguenther@suse.de>
7953 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7954 (dump_stmt_cost): Declare.
7955 (add_stmt_cost): Dump cost we add.
7956 (add_stmt_costs): New function.
7957 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7959 (vect_analyze_stmt): Adjust prototype.
7960 (vectorizable_condition): Likewise.
7961 (vectorizable_live_operation): Likewise.
7962 (vectorizable_reduction): Likewise.
7963 (vectorizable_induction): Likewise.
7964 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7965 cost vector to pass to vectorizable_ and record afterwards.
7966 (vect_model_reduction_cost): Take cost vector argument and adjust.
7967 (vect_model_induction_cost): Likewise.
7968 (vectorizable_reduction): Likewise.
7969 (vectorizable_induction): Likewise.
7970 (vectorizable_live_operation): Likewise.
7971 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7972 SLP_TREE_NUMBER_OF_VEC_STMTS.
7973 (vect_analyze_slp_cost_1): Remove.
7974 (vect_analyze_slp_cost): Likewise.
7975 (vect_slp_analyze_node_operations): Take visited args and
7976 a target cost vector. Avoid processing already visited stmt sets.
7977 (vect_slp_analyze_operations): Use a local cost vector to gather
7978 costs and register those of non-discarded instances.
7979 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7980 (vect_schedule_slp_instance): Remove copying of
7981 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
7983 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7984 adding cost. Record cost entry location.
7985 (vect_prologue_cost_for_slp_op): Function to compute cost of
7986 a constant or invariant generated for SLP vect in the prologue,
7987 split out from vect_analyze_slp_cost_1.
7988 (vect_model_simple_cost): Make static. Adjust for SLP costing.
7989 (vect_model_promotion_demotion_cost): Likewise.
7990 (vect_model_store_cost): Likewise, make static.
7991 (vect_model_load_cost): Likewise.
7992 (vectorizable_bswap): Add cost vector arg and adjust.
7993 (vectorizable_call): Likewise.
7994 (vectorizable_simd_clone_call): Likewise.
7995 (vectorizable_conversion): Likewise.
7996 (vectorizable_assignment): Likewise.
7997 (vectorizable_shift): Likewise.
7998 (vectorizable_operation): Likewise.
7999 (vectorizable_store): Likewise.
8000 (vectorizable_load): Likewise.
8001 (vectorizable_condition): Likewise.
8002 (vectorizable_comparison): Likewise.
8003 (can_vectorize_live_stmts): Likewise.
8004 (vect_analyze_stmt): Likewise.
8005 (vect_transform_stmt): Adjust calls to vectorizable_*.
8006 * tree-vectorizer.c: Include gimple-pretty-print.h.
8007 (dump_stmt_cost): New function.
8009 2018-05-16 Richard Biener <rguenther@suse.de>
8011 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8012 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8013 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8014 (check_name): New callback.
8015 (dse_classify_store): Track cycles via a visited bitmap of PHI
8016 defs and simplify handling of in-loop and across loop dead stores
8017 and properly fail for loop-variant refs. Handle byte-tracking with
8018 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8021 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8023 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8024 (vect_get_mask_type_for_stmt): Likewise.
8025 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8027 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8028 to determine the statement's vector type and the vector type that
8029 should be used for calculating nunits. Deal with cases in which
8030 the type has to be deferred.
8031 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8032 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8033 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8034 (vect_determine_vf_for_stmt): New functions, split out from...
8035 (vect_determine_vectorization_factor): ...here.
8036 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8037 (vect_get_mask_type_for_stmt): New functions, split out from
8038 vect_determine_vectorization_factor.
8040 2018-05-16 Richard Biener <rguenther@suse.de>
8042 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8043 verify the [VEC_]COND_EXPR embedded comparison.
8045 2018-05-15 Martin Sebor <msebor@redhat.com>
8047 PR tree-optimization/85753
8048 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8049 RECORD_TYPE in addition to ARRAY_TYPE.
8051 2018-05-15 Martin Sebor <msebor@redhat.com>
8054 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8056 2018-05-15 Richard Biener <rguenther@suse.de>
8058 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8059 add by_clobber_p one. Change algorithm to collect all defs
8060 representing uses we need to walk and try reducing them to
8061 a single one before failing.
8062 (dse_dom_walker::dse_optimize_stmt): Adjust.
8064 2018-05-13 Mark Wielaard <mark@klomp.org>
8066 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8067 (size_of_loc_descr): Likewise.
8068 (output_loc_operands): Likewise.
8069 (output_loc_operands_raw): Likewise.
8070 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8071 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8072 (hash_loc_operands): Likewise.
8073 (compare_loc_operands): Likewise.
8075 2018-05-14 Mark Wielaard <mark@klomp.org>
8077 * dwarf2out.c (count_index_addrs): New function.
8078 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8080 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8082 PR tree-optimization/83648
8083 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8084 return value as malloc candidate.
8086 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8089 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8090 param as true in call to suggest_attribute.
8092 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8094 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8095 -mreadonly-in-sdata.
8097 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8099 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8101 (aarch64_crypto_aesd_fused): Likewise.
8103 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8105 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8106 (movsi_aarch64): Likewise.
8107 (load_pairsi): Likewise.
8108 (load_pairdi): Likewise.
8109 (store_pairsi): Likewise.
8110 (store_pairdi): Likewise.
8111 (load_pairsf): Likewise.
8112 (load_pairdf): Likewise.
8113 (store_pairsf): Likewise.
8114 (store_pairdf): Likewise.
8115 (zero_extend): Likewise.
8116 (trunc): Swap alternatives.
8117 (fcvt_target): Add '?' to prefer w over r.
8119 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8122 * config/i386/i386.md: Disallow non-commutative arithmetics in
8123 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8124 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
8125 in the peephole2 before it.
8127 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
8129 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8130 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8131 (ix86_handle_option): Handle -mcldemote.
8132 * config.gcc: New header.
8133 * config/i386/cldemoteintrin.h: New file.
8134 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8135 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8137 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8138 OPTION_MASK_ISA_CLDEMOTE.
8139 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8140 (ix86_valid_target_attribute_inner_p): Ditto.
8141 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8142 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8143 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8144 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8145 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8147 * config/i386/i386.opt: Add -mcldemote.
8148 * config/i386/x86intrin.h: New header.
8149 * doc/invoke.texi: Add -mcldemote.
8151 2018-05-14 Richard Biener <rguenther@suse.de>
8153 * doc/match-and-simplify.texi: Adjust :s documentation.
8155 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
8157 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8158 intended memcpy size.
8159 (REORDER_45): Likewise.
8161 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
8163 * sort.cc: New file.
8164 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8165 * vec.c (qsort_chk): Use gcc_qsort.
8166 * Makefile.in (OBJS-libcommon): Add sort.o.
8167 (build/sort.o): New target. Use it...
8168 (BUILD_RTL): ... here, and...
8169 (build/gencfn-macros): ... here, and...
8170 (build/genmatch): ... here.
8172 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8173 Chung-Ju Wu <jasonwucj@gmail.com>
8175 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8176 * config/nds32/nds32-graywolf.md: New file.
8177 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8178 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8180 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8181 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8182 * config/nds32/nds32.md (pipeline_model): Add graywolf.
8183 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8184 * config/nds32/pipelines.md: Include n15 settings.
8186 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8187 Chung-Ju Wu <jasonwucj@gmail.com>
8189 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8190 * config/nds32/nds32-n13.md: New file.
8191 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8192 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8194 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8195 * config/nds32/nds32.md (pipeline_model): Add n13.
8196 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8197 * config/nds32/pipelines.md: Include n13 settings.
8199 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8200 Chung-Ju Wu <jasonwucj@gmail.com>
8202 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8203 * config/nds32/nds32-n10.md: New file.
8204 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8205 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8207 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8208 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8209 * config/nds32/nds32.md (pipeline_model): Add n10.
8210 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8211 * config/nds32/pipelines.md: Include n10 settings.
8213 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
8214 Kito Cheng <kito.cheng@gmail.com>
8215 Chung-Ju Wu <jasonwucj@gmail.com>
8217 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8218 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8219 Add enum values for DSP extension instructions.
8220 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8222 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8223 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8225 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8226 * config/nds32/nds32-dspext.md: New file for DSP implementation.
8227 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8228 * config/nds32/nds32-intrinsic.md: Likewise.
8229 * config/nds32/nds32_intrinsic.h: Likewise.
8230 * config/nds32/nds32-md-auxiliary.c: Likewise.
8231 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8232 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8233 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8234 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8235 * config/nds32/nds32-protos.h: New declarations for DSP extension.
8236 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8237 TYPE_DMAC in switch statement.
8238 * config/nds32/nds32.c: New checking and implementation for DSP
8239 extension instructions.
8240 * config/nds32/nds32.h: Likewise.
8241 * config/nds32/nds32.md: Likewise.
8242 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8243 * config/nds32/predicates.md: Implement new predicates for DSP
8246 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8248 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8249 Reformat alternatives and attributes so it is easier to identify
8250 which constraints/attributes go with which instruction.
8251 (mov<mode>_hardfloat32, FMOVE64): Likewise.
8252 (mov<mode>_softfloat32, FMOVE64): Likewise.
8253 (mov<mode>_hardfloat64, FMOVE64): Likewise.
8254 (mov<mode>_softfloat64, FMOVE64): Likewise.
8256 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
8258 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8260 (Basic PowerPC Built-in Functions): The new name of the
8261 subsection previously known as "PowerPC Built-in Functions".
8262 (Basic PowerPC Built-in Functions Available on all Configurations):
8264 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8265 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8266 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8267 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8269 2018-05-11 Martin Jambor <mjambor@suse.cz>
8272 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8275 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8278 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8280 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
8282 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8283 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8284 (ix86_handle_option): Handle -mwaitpkg.
8285 * config.gcc: New header.
8286 * config/i386/cpuid.h (bit_WAITPKG): New bit.
8287 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8288 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8290 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8291 OPTION_MASK_ISA_WAITPKG.
8292 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8293 (ix86_option_override_internal): Add PTA_WAITPKG.
8294 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8295 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8296 IX86_BUILTIN_TPAUSE.
8297 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8298 __builtin_ia32_umwait and __builtin_ia32_tpause.
8299 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8300 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8301 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8302 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8303 UNSPECV_TPAUSE): New.
8304 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8305 * config/i386/i386.opt: Add -mwaitpkg.
8306 * config/i386/waitpkgintrin.h: New file.
8307 * config/i386/x86intrin.h: New header.
8308 * doc/invoke.texi: Add -mwaitpkg.
8310 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8313 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8315 (cortex-m0): Use armv6s-m isa.
8316 (cortex-m0plus): Likewise.
8317 (cortex-m1): Likewise.
8318 (cortex-m0.small-multiply): Likewise.
8319 (cortex-m0plus.small-multiply): Likewise.
8320 (cortex-m1.small-multiply): Likewise.
8322 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
8323 Jakub Jelinek <jakub@redhat.com>
8325 PR tree-optimization/85692
8326 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8327 source permute as well.
8329 2018-05-11 Martin Liska <mliska@suse.cz>
8332 * doc/extend.texi: Document LLVM style format for no_sanitize
8335 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
8337 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8338 mode_supports_vsx_dform_quad to mode_supports_dq_form.
8339 (mode_supports_vsx_dform_quad): Likewise.
8340 (mode_supports_vmx_dform): Move these functions to be next to the
8341 other mode_supports functions.
8342 (mode_supports_dq_form): Likewise.
8343 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8344 mode_supports_dq_form.
8345 (reg_offset_addressing_ok_p): Likewise.
8346 (offsettable_ok_by_alignment): Likewise.
8347 (rs6000_legitimate_offset_address_p): Likewise.
8348 (legitimate_lo_sum_address_p): Likewise.
8349 (rs6000_legitimize_address): Likewise.
8350 (rs6000_legitimize_reload_address): Likewise.
8351 (rs6000_secondary_reload_inner): Likewise.
8352 (rs6000_preferred_reload_class): Likewise.
8353 (rs6000_output_move_128bit): Likewise.
8355 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8357 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8358 Generate SImode target register for null target.
8359 <case IX86_BUILTIN_XGETBV>: Ditto.
8360 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8361 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8363 2018-05-10 Carl Love <cel@us.ibm.com>
8365 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8366 dcbtt and dcbtstt if operands[2] is 0.
8368 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8371 * config/i386/sse.md (usadv64qi): New expander.
8373 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8375 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8376 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8377 -maltivec=be support.
8378 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8379 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8380 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8381 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8382 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8383 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8384 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8385 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8386 altivec_vsumsws): Adjust.
8387 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8388 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8389 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8391 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8392 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8393 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8394 (altivec_lve<VI_char>x): Delete expand.
8395 (*altivec_lve<VI_char>x_internal): Rename to...
8396 (altivec_lve<VI_char>x): ... this.
8397 (altivec_lvxl_<mode>): Delete expand.
8398 (*altivec_lvxl_<mode>_internal): Rename to ...
8399 (altivec_lvxl_<mode>): ... this.
8400 (altivec_stvxl_<mode>): Delete expand.
8401 (*altivec_stvxl_<mode>_internal): Rename to ...
8402 (altivec_stvxl_<mode>): ... this.
8403 (altivec_stve<VI_char>x): Delete expand.
8404 (*altivec_stve<VI_char>x_internal): Rename to ...
8405 (altivec_stve<VI_char>x): ... this.
8406 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8407 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8408 reduc_plus_scal_<mode>): Adjust.
8409 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8411 (rs6000_cpu_cpp_builtins): Adjust.
8412 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8413 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8414 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8415 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8416 -maltivec=be support.
8417 (rs6000_split_vec_extract_var): Adjust.
8418 (rs6000_split_v4si_init): Adjust.
8419 (swap_selector_for_mode): Delete.
8420 (altivec_expand_lvx_be, altivec_expand_stvx_be,
8421 altivec_expand_stvex_be): Delete.
8422 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8423 -maltivec=be support.
8424 (rs6000_gimple_fold_builtin): Ditto.
8425 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8427 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8428 (TARGET_DIRECT_MOVE_64BIT): Adjust.
8429 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8430 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8431 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8432 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8433 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8434 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8435 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8436 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8437 anonymous split): Adjust.
8438 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8439 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8441 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
8443 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8444 when --with-gxx-include-dir is also specified.
8445 * configure: Regenerate.
8447 2018-05-09 Jim Wilson <jimw@sifive.com>
8450 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8451 * config/riscv/t-withmultilib: New.
8452 * config/riscv/withmultilib.h: New.
8453 * doc/install.texi: Document RISC-V --with-multilib-list support.
8455 2018-05-09 Richard Biener <rguenther@suse.de>
8457 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8459 (vect_bb_vectorization_profitable_p): Adjust. Compute
8460 actual scalar cost using the cost vector and the add_stmt_cost
8463 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8465 PR rtl-optimization/85645
8466 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8467 in the REG_CFA_REGISTER note for LR, don't leave it empty.
8469 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8471 PR rtl-optimization/85645
8472 * shrink-wrap.c (spread_components): Return a boolean saying if
8473 anything was changed.
8474 (try_shrink_wrapping_separate): Iterate spread_components until
8475 nothing changes anymore.
8477 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8479 PR rtl-optimization/85645
8480 * regrename.c (build_def_use): Also kill the chains that include the
8481 destination of a REG_CFA_REGISTER note.
8483 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8485 PR rtl-optimization/85645
8486 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8487 insn that has a REG_CFA_REGISTER note.
8489 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
8491 * cfgexpand.c (expand_clobber): New function.
8492 (expand_gimple_stmt_1): Use it.
8493 * tree-vect-stmts.c (vect_clobber_variable): New function,
8495 (vectorizable_simd_clone_call): ...here.
8496 (vectorizable_store): Emit a clobber either side of an
8497 IFN_STORE_LANES sequence.
8498 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8500 2018-05-09 Tom de Vries <tom@codesourcery.com>
8503 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8504 (define_insn "trap_if_false"): Add exit after trap.
8506 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
8508 PR rtl-optimization/85638
8509 * bb-reorder.c: Include common/common-target.h.
8510 (create_forwarder_block): New function extracted from...
8511 (fix_up_crossing_landing_pad): ...here. Rename into...
8512 (dw2_fix_up_crossing_landing_pad): ...this.
8513 (sjlj_fix_up_crossing_landing_pad): New function.
8514 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8515 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8516 from both partitions and exit the loop after one iteration.
8518 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8521 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8523 (Basic PowerPC Built-in Functions): The new name of the
8524 subsection previously known as "PowerPC Built-in Functions".
8525 (Basic PowerPC Built-in Functions Available on all Configurations):
8527 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8529 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8531 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8533 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8536 2018-05-08 Jim Wilson <jimw@sifive.com>
8538 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8539 (LD_EMUL_SUFFIX): New.
8540 (LINK_SPEC): Use it.
8542 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8544 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8546 (Basic PowerPC Built-in Functions): The new name of the
8547 subsection previously known as "PowerPC Built-in Functions".
8548 (Basic PowerPC Built-in Functions Available on all Configurations):
8550 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8552 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8554 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8556 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8559 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8562 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8563 after cmpelim optimization.
8565 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8567 * config.gcc: Support "goldmont".
8568 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8569 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8571 * config/i386/i386.c (m_GOLDMONT): Define.
8572 (processor_target_table): Add "goldmont".
8573 (PTA_GOLDMONT): Define.
8574 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8575 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8576 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8577 (fold_builtin_cpu): Add "goldmont".
8578 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8579 (ix86_option_override_internal): Add "goldmont".
8580 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8581 (processor_type): Add PROCESSOR_GOLDMONT.
8582 * config/i386/i386.md: Add CPU "glm".
8583 * config/i386/glm.md: New file.
8584 * config/i386/x86-tune.def: Add m_GOLDMONT.
8585 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8587 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8590 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8592 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8593 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
8594 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
8597 * config/i386/i386.c (ix86_fold_builtin): Handle
8598 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8601 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8602 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8604 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
8607 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8608 (check_arch): Likewise.
8609 (check_fpu): Return the result rather than printing it.
8610 (end arch): Fix operator precedence.
8611 (end cpu): Likewise.
8612 (END): Print the result from check_fpu.
8614 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8615 Alan Hayward <alan.hayward@arm.com>
8616 David Sherwood <david.sherwood@arm.com>
8618 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8619 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8620 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8621 (*fcmuo<mode>_and): New patterns.
8623 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8625 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8626 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8627 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8628 (cmp_op, sve_imm_con): New code attributes.
8629 (SVE_COND_INT_CMP, imm_con): Delete.
8630 (cmp_op): Remove above unspecs from int attribute.
8631 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8633 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
8634 comparison-specific unspecs.
8635 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8636 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8637 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8638 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8639 (*vec_fcm<cmp_op><mode>): Rename to...
8640 (*fcm<cmp_op><mode>): ...this and adjust likewise.
8641 (*vec_fcmuo<mode>): Rename to...
8642 (*fcmuo<mode>): ...this and adjust likewise.
8643 (*pred_fcm<cmp_op><mode>): New pattern.
8644 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8645 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8647 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8649 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8650 (aarch64_emit_sve_predicated_cond): New function.
8651 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8652 (aarch64_emit_unspec_cond_or): Replace with...
8653 (aarch64_emit_sve_or_conds): ...this new function. Use
8654 aarch64_emit_sve_ptrue_op for the individual comparisons and
8655 aarch64_emit_binop to OR them together.
8656 (aarch64_emit_inverted_unspec_cond): Replace with...
8657 (aarch64_emit_sve_inverted_cond): ...this new function. Use
8658 aarch64_emit_sve_ptrue_op for the comparison and
8659 aarch64_emit_unop to invert the result.
8660 (aarch64_expand_sve_vec_cmp_float): Update after the above
8661 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
8663 2018-05-07 Nathan Sidwell <nathan@acm.org>
8665 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8666 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8667 (Backwards Compatibility): Likewise.
8669 2018-05-07 Luis Machado <luis.machado@linaro.org>
8673 2018-05-07 Luis Machado <luis.machado@linaro.org>
8675 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8676 <prefetch_dynamic_strides>: New const bool field.
8677 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8678 prefetch_dynamic_strides.
8679 (exynosm1_prefetch_tune): Likewise.
8680 (thunderxt88_prefetch_tune): Likewise.
8681 (thunderx_prefetch_tune): Likewise.
8682 (thunderx2t99_prefetch_tune): Likewise.
8683 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8685 (aarch64_override_options_internal): Update to set
8686 PARAM_PREFETCH_DYNAMIC_STRIDES.
8687 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8688 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8689 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8690 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8691 prefetch-dynamic-strides setting.
8693 2018-05-07 Luis Machado <luis.machado@linaro.org>
8695 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8696 <minimum_stride>: New const int field.
8697 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8698 minimum_stride field.
8699 (exynosm1_prefetch_tune): Likewise.
8700 (thunderxt88_prefetch_tune): Likewise.
8701 (thunderx_prefetch_tune): Likewise.
8702 (thunderx2t99_prefetch_tune): Likewise.
8703 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8704 (aarch64_override_options_internal): Update to set
8705 PARAM_PREFETCH_MINIMUM_STRIDE.
8706 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8707 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8708 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8709 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8710 stride is constant and is below the minimum stride threshold.
8712 2018-05-07 Luis Machado <luis.machado@linaro.org>
8714 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8717 2018-05-07 Luis Machado <luis.machado@linaro.org>
8719 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8720 <prefetch_dynamic_strides>: New const bool field.
8721 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8722 prefetch_dynamic_strides.
8723 (exynosm1_prefetch_tune): Likewise.
8724 (thunderxt88_prefetch_tune): Likewise.
8725 (thunderx_prefetch_tune): Likewise.
8726 (thunderx2t99_prefetch_tune): Likewise.
8727 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8729 (aarch64_override_options_internal): Update to set
8730 PARAM_PREFETCH_DYNAMIC_STRIDES.
8731 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8732 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8733 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8734 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8735 prefetch-dynamic-strides setting.
8737 2018-05-07 Luis Machado <luis.machado@linaro.org>
8739 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8740 <minimum_stride>: New const int field.
8741 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8742 minimum_stride field.
8743 (exynosm1_prefetch_tune): Likewise.
8744 (thunderxt88_prefetch_tune): Likewise.
8745 (thunderx_prefetch_tune): Likewise.
8746 (thunderx2t99_prefetch_tune): Likewise.
8747 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8748 (aarch64_override_options_internal): Update to set
8749 PARAM_PREFETCH_MINIMUM_STRIDE.
8750 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8751 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8752 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8753 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8754 stride is constant and is below the minimum stride threshold.
8756 2018-05-06 Jakub Jelinek <jakub@redhat.com>
8759 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8760 the type is addressable. Don't force op into register if it has
8763 2018-05-05 Roland McGrath <mcgrathr@google.com>
8766 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8767 any section for which we don't know a specific type it should have,
8768 regardless of name. Previously this was done only for the exact
8769 names ".init_array", ".fini_array", and ".preinit_array".
8770 (default_elf_asm_named_section): Add comment about
8771 relationship with default_section_type_flags and SECTION_NOTYPE.
8772 (get_section): Don't consider it a type conflict if one side has
8773 SECTION_NOTYPE and the other doesn't, as long as neither has the
8774 SECTION_BSS et al used in the default_section_type_flags logic.
8776 2018-05-05 Tom de Vries <tom@codesourcery.com>
8779 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8780 (workaround_barsyncs): New function.
8781 (nvptx_reorg): Use workaround_barsyncs.
8782 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8783 (define_expand "nvptx_membar_cta"): New define_expand.
8784 (define_insn "*nvptx_membar_cta"): New insn.
8786 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
8788 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8789 To improve optimization opportunities.
8790 * builtin-types.def: The new needed builtin types for the above.
8792 2018-05-04 Richard Biener <rguenther@suse.de>
8794 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8795 * gimple-ssa-store-merging.c
8796 (imm_store_chain_info::output_merged_store): Remove redundant create,
8797 release split_store vector contents on failure.
8798 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8799 scalar stmt vector on cache hit.
8801 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
8803 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8805 * config.gcc (powerpc-xilinx-eabi*): Remove.
8806 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8808 (fusion_addis_mem_combo_load): Ditto.
8809 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8811 (rs6000_cpu_cpp_builtins): Ditto.
8812 * config/rs6000/rs6000-linux.c
8813 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8814 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8815 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8817 (rs6000_setup_reg_addr_masks): Ditto.
8818 (rs6000_init_hard_regno_mode_ok): Ditto.
8819 (rs6000_option_override_internal): Ditto.
8820 (legitimate_lo_sum_address_p): Ditto.
8821 (rs6000_legitimize_address): Ditto.
8822 (rs6000_legitimize_reload_address): Ditto.
8823 (rs6000_legitimate_address_p): Ditto.
8824 (abi_v4_pass_in_fpr): Ditto.
8825 (setup_incoming_varargs): Ditto.
8826 (rs6000_gimplify_va_arg): Ditto.
8827 (rs6000_split_multireg_move): Ditto.
8828 (rs6000_savres_strategy): Ditto.
8829 (rs6000_emit_prologue_components): Ditto.
8830 (rs6000_emit_epilogue_components): Ditto.
8831 (rs6000_emit_prologue): Ditto.
8832 (rs6000_emit_epilogue): Ditto.
8833 (rs6000_elf_file_end): Ditto.
8834 (rs6000_function_value): Ditto.
8835 (rs6000_libcall_value): Ditto.
8836 * config/rs6000/rs6000.h: Ditto.
8837 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8838 (TARGET_MINMAX): ... this. New.
8839 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8840 * config/rs6000/rs6000.md: Remove Xilinx FP support.
8841 (*movsi_internal1_single): Delete.
8842 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8843 mfpu=, mxilinx-fpu): Delete.
8844 * config/rs6000/singlefp.h: Delete.
8845 * config/rs6000/sysv4.h: Remove Xilinx FP support.
8846 * config/rs6000/t-rs6000: Ditto.
8847 * config/rs6000/t-xilinx: Delete.
8848 * config/rs6000/titan.md: Adjust for fp_type removal.
8849 * config/rs6000/vsx.md: Remove Xilinx FP support.
8850 (VStype_simple): Delete.
8851 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8852 * config/rs6000/xfpu.h: Delete.
8853 * config/rs6000/xfpu.md: Delete.
8854 * config/rs6000/xilinx.h: Delete.
8855 * config/rs6000/xilinx.opt: Delete.
8856 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8857 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8859 2018-05-04 Tom de Vries <tom@codesourcery.com>
8862 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8865 2018-05-04 Richard Biener <rguenther@suse.de>
8868 * tree-complex.c (update_complex_assignment): We are always in SSA form.
8869 (expand_complex_div_wide): Likewise.
8870 (expand_complex_operations_1): Likewise.
8871 (expand_complex_libcall): Preserve EH info of the original stmt.
8872 (tree_lower_complex): Handle removed blocks.
8873 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8874 on complex multiplication and division libcall builtins.
8876 2018-05-04 Richard Biener <rguenther@suse.de>
8879 * fold-const.c (negate_expr_p): Restrict negation of operand
8880 zero of a division to when we know that can happen without
8882 (fold_negate_expr_1): Likewise.
8884 2018-05-04 Jakub Jelinek <jakub@redhat.com>
8887 * real.h (real_nextafter): Declare.
8888 * real.c (real_nextafter): New function.
8889 * fold-const-call.c (fold_const_nextafter): New function.
8890 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8891 CASE_CFN_NEXTTOWARD.
8892 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8893 even when arg1_mode is different from arg0_mode.
8895 2018-05-03 Nathan Sidwell <nathan@acm.org>
8897 * doc/extend.texi (Deprecated Features): Remove
8899 (Backwards Compatibility): Likewise.
8900 * doc/invoke.texi (C++ Language Options): Likewise.
8901 (C++ Dialect Options): Likewise.
8903 2018-05-03 Jakub Jelinek <jakub@redhat.com>
8906 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8907 _mm512_mask_mullox_epi64): New intrinsics.
8909 2018-05-03 Tom de Vries <tom@codesourcery.com>
8912 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8913 dump files): Add offload-tree.
8915 2018-05-03 Richard Biener <rguenther@suse.de>
8917 PR tree-optimization/85615
8918 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8919 to loops not nested in BBs loop father to avoid creating multi-entry
8922 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8924 PR tree-optimization/70291
8925 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8926 arguments. Change return type to tree. Emit libcall as a new
8927 statement rather than replacing existing one when inplace_p is true.
8928 (expand_complex_multiplication_components): New function.
8929 (expand_complex_multiplication): Expand floating-point complex
8930 multiplication using the above.
8931 (expand_complex_division): Rename inner_type parameter to type.
8932 Update expand_complex_libcall call-site.
8933 (expand_complex_operations_1): Update expand_complex_multiplication
8934 and expand_complex_division call-sites.
8936 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8939 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8940 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8941 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8942 the highest significant bit of the shift count mask is clear. In
8943 check whether and[sq]i3 is needed verify that all significant bits
8944 of the shift count other than the highest are set.
8946 2018-05-02 Tom de Vries <tom@codesourcery.com>
8949 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8950 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8951 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8952 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8953 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8954 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8955 __builtin_goacc_parlevel_size.
8957 2018-05-02 Richard Biener <rguenther@suse.de>
8959 PR tree-optimization/85597
8960 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8961 do not use split vect_get_vec_defs call but call vect_get_slp_defs
8964 2018-05-02 Tom de Vries <tom@codesourcery.com>
8967 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8968 dump files): Add ltrans-tree.
8970 2018-05-02 Tom de Vries <tom@codesourcery.com>
8973 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8974 dump files): Add wpa-ipa.
8976 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
8978 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
8979 powerpc*-*-linux*paired* target.
8980 * config/rs6000/750cl.h: Delete.
8981 * config/rs6000/paired.h: Delete.
8982 * config/rs6000/paired.md: Delete.
8983 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8985 * config/rs6000/rs6000-builtin.def: Remove paired float support.
8986 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8987 comment. Remove paired float support.
8988 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8989 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8991 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8992 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8994 * config/rs6000/rs6000.c: Remove paired float support.
8995 (paired_expand_vector_init, paired_expand_vector_move,
8996 paired_emit_vector_compare, paired_emit_vector_cond_expr,
8997 (paired_expand_lv_builtin, paired_expand_stv_builtin,
8998 paired_expand_builtin, paired_expand_predicate_builtin,
8999 paired_init_builtins): Delete.
9000 * config/rs6000/rs6000.h: Remove paired float support.
9001 * config/rs6000/rs6000.md: Remove paired float support.
9002 (move_from_CR_ov_bit): Delete.
9003 * config/rs6000/rs6000.opt (mpaired): Delete.
9004 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9005 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9007 2018-05-02 Richard Biener <rguenther@suse.de>
9010 * gimplify.c (gimplify_save_expr): When in SSA form allow
9011 SAVE_EXPRs to compute to SSA vars.
9013 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9016 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9017 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9018 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9019 clobber operands[2], instead use a new pseudo. Formatting fixes.
9021 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9023 PR tree-optimization/85586
9024 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9025 exit early for statements in the same group if the accesses are
9028 2018-05-02 Tom de Vries <tom@codesourcery.com>
9031 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9034 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9036 PR tree-optimization/85143
9037 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9039 2018-05-01 Tom de Vries <tom@codesourcery.com>
9042 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9043 not found" error message.
9045 2018-05-01 Tom de Vries <tom@codesourcery.com>
9048 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9049 * vec.c (test_ordered_remove_if): New function.
9050 (vec_c_tests): Call test_ordered_remove_if.
9051 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9052 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9053 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9054 VEC_ORDERED_REMOVE_IF.
9056 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9058 PR tree-optimization/82665
9059 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9060 pointer subtraction where arguments come from a memchr call.
9062 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9064 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9065 --push-state --as-needed and --pop-state instead of --as-needed and
9066 --no-as-needed if ld supports it.
9067 * configure: Regenerated.
9070 * doc/install.texi2html: Replace _002d with - and _002a with * in
9071 generated html files using sed.
9073 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9076 * gcc-rich-location.c (blank_line_before_p): New function.
9077 (use_new_line): New function.
9078 (gcc_rich_location::add_fixit_insert_formatted): New function.
9079 * gcc-rich-location.h
9080 (gcc_rich_location::add_fixit_insert_formatted): New function.
9082 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9084 * selftest.c (assert_streq): Rename "expected" and "actual" to
9085 "val1" and "val2". Extend NULL-handling to cover both inputs
9086 symmetrically, while still requiring both to be non-NULL for a pass.
9087 * selftest.h (assert_streq): Rename "expected" and "actual" to
9089 (ASSERT_EQ): Likewise.
9090 (ASSERT_EQ_AT): Likewise.
9091 (ASSERT_KNOWN_EQ): Likewise.
9092 (ASSERT_KNOWN_EQ_AT): Likewise.
9093 (ASSERT_NE): Likewise.
9094 (ASSERT_MAYBE_NE): Likewise.
9095 (ASSERT_MAYBE_NE_AT): Likewise.
9096 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9097 the assertion to pass.
9098 (ASSERT_STREQ_AT): Likewise.
9100 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9102 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9103 interaction with -pie.
9105 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9107 * selftest.h: Fix alphabetization of per-source-file selftest
9110 2018-04-30 Jason Merrill <jason@redhat.com>
9112 PR c++/61982 - dead stores to destroyed objects.
9113 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9116 2018-04-30 Jason Merrill <jason@redhat.com>
9118 * tree.c (build_clobber): New.
9119 * tree.h: Declare it.
9120 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9122 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9124 * diagnostic-show-locus.c (layout::layout): Update for
9125 location_get_source_line returning a char_span.
9126 (struct char_span): Move to input.h.
9127 (struct correction): Update for fields in char_span becoming
9129 (struct source_line): Update for location_get_source_line
9130 returning a char_span.
9131 (layout::print_line): Likewise.
9132 * edit-context.c (edited_file::print_content): Likewise.
9133 (edited_file::print_diff_hunk): Likewise.
9134 (edited_file::print_run_of_changed_lines): Likewise.
9135 (edited_file::get_num_lines): Likewise.
9136 (edited_line::edited_line): Likewise.
9137 * final.c (asm_show_source): Likewise.
9138 * input.c (location_get_source_line): Convert return type
9139 from const char * to char_span, losing the final "line_len"
9141 (dump_location_info): Update for the above.
9142 (get_substring_ranges_for_loc): Likewise. Use a char_span
9143 when handling the literal within the line.
9144 (test_reading_source_line): Update for location_get_source_line
9145 returning a char_span.
9146 * input.h (class char_span): Move here from
9147 diagnostic-show-locus.c, converting from a struct to a class.
9148 Make data members private.
9149 (char_span::operator bool): New.
9150 (char_span::length): New.
9151 (char_span::get_buffer): New.
9152 (char_span::operator[]): New.
9153 (char_span::subspan): Make const.
9154 (char_span::xstrdup): New.
9155 (location_get_source_line): Convert return type from const char *
9156 to char_span, losing the final "line_size" param.
9158 2018-04-30 Jan Hubicka <jh@suse.cz>
9160 * lto-wrapper.c (ltrans_priorities): New static var.
9161 (cmp_priority): New.
9162 (run_gcc): Read priorities and if doing parallel build order
9163 the Makefile by them.
9165 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9167 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9169 2018-04-30 Richard Biener <rguenther@suse.de>
9171 * tree-cfg.c (verify_address): Remove base argument, add
9172 flag whether to check TREE_ADDRESSABLE and do that.
9173 (verify_expr): Remove.
9174 (verify_types_in_gimple_reference): Add pieces from verify_expr.
9175 (verify_gimple_assign_single): Likewise.
9176 (verify_gimple_switch): Likewise.
9177 (verify_expr_location_1): Dereference tp once. Add (disabled)
9178 piece from verify_expr.
9179 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9181 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9183 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9185 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9187 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9188 (small_data_pattern): Likewise.
9189 (arc_rewrite_small_data): Likewise.
9190 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9191 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9192 (get_symbol_alignment): New function.
9193 (legitimate_small_data_address_p): Likewise.
9194 (legitimate_scaled_address): Update, call
9195 legitimate_small_data_address_p.
9196 (output_sdata): New static variable.
9197 (arc_print_operand): Update how we handle small data operands.
9198 (arc_print_operand_address): Likewise.
9199 (arc_legitimate_address_p): Update, use
9200 legitimate_small_data_address_p.
9201 (arc_rewrite_small_data_p): Remove.
9202 (arc_rewrite_small_data_1): Likewise.
9203 (arc_rewrite_small_data): Likewise.
9204 (small_data_pattern): Likewise.
9205 (compact_sda_memory_operand): Update to use
9206 legitimate_small_data_address_p and get_symbol_alignment.
9207 (prepare_move_operands): Don't rewite sdata pattern.
9208 (prepare_extend_operands): Remove.
9209 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9211 (zero_extendqisi2): Likewise.
9212 (zero_extendhisi2): Likewise.
9213 (extendqihi2): Likewise.
9214 (extendqisi2): Likewise.
9215 (extendhisi2): Likewise.
9219 * config/arc/constraints.md (Usd): Change it to memory constraint.
9221 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9223 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9224 as source of std instructions.
9225 * config/arc/arc.md (movsi_insn): Update pattern predicate to
9226 allow 6-bit constants as source for store instructions.
9227 (movdi_insn): Update instruction pattern to allow 6-bit constants
9228 as source for store instructions.
9230 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9232 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9234 2018-04-30 Nathan Sidwell <nathan@acm.org>
9235 Sandra Loosemore <sandra@codesourcery.com>
9237 * dumpfile.c (dump_open): Allow '-' for stdout.
9238 * doc/invoke.texi (Developer Options): Document dump filename
9239 determination early. Document stdin/stdout selection.
9241 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
9243 Microblaze Target: PIC data text relative
9245 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9246 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9248 * config/microblaze/microblaze.h (microblaze_constant_address_p):
9249 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9250 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9251 New addressing mode for data-text relative position indepenedent code.
9252 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9253 'ADDRESS_SYMBOLIC_TXT_REL'.
9254 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9255 (microblaze_legitimate_pic_operand): Exclude function calls from
9256 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9257 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9259 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9260 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9261 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9262 for 'address + offset'.
9263 (microblaze_expand_prologue): Add new function prologue call for
9265 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9266 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9267 table in case of TARGET_PIC_DATA_TEXT_REL.
9268 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9269 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9270 Add new macros 'UNSPEC_TEXT',
9271 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9272 + exclude function calls from 'UNSPEC_PLT' in case of data text
9274 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9275 new target hook for generating address diff vector tables in case of
9277 * doc/tm.texi : Regenerate.
9278 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9279 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9280 of addr diff vector generation.
9281 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9282 target hook definition.
9283 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9284 Add default function for generate_pic_addr_diff_vec -> flag_pic.
9285 * doc/invoke.texi (Add new pic option): Add new microblaze pic
9286 option for data text relative.
9288 2018-04-30 Richard Biener <rguenther@suse.de>
9290 * tree-chrec.h (evolution_function_is_constant_p): Remove
9292 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9294 2018-04-30 Richard Biener <rguenther@suse.de>
9297 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9299 2018-04-30 Richard Biener <rguenther@suse.de>
9301 PR tree-optimization/28364
9302 PR tree-optimization/85275
9303 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9304 copying first exit test.
9306 2018-04-28 Mark Wielaard <mark@klomp.org>
9308 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9310 (dwarf_AT): Handle DW_AT_addr_base.
9311 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9313 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
9316 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9317 (*ashl<dwi>3_doubleword_mask_1): Ditto.
9318 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9319 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9321 2018-04-28 Richard Biener <rguenther@suse.de>
9323 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9324 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9325 to reflect use. Only add interesting stmts.
9327 2018-04-27 Martin Jambor <mjambor@suse.cz>
9330 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9331 the jump function allows for passing through aggregate values.
9333 2018-04-27 David Malcolm <dmalcolm@redhat.com>
9335 * input.h (in_system_header_at): Convert from macro to inline
9337 (from_macro_expansion_at): Likewise.
9338 (from_macro_definition_at): Likewise.
9340 2018-04-27 Jeff Law <law@redhat.com>
9342 * config.gcc: Mark tile* targets as deprecated/obsolete.
9344 2018-04-27 Richard Biener <rguenther@suse.de>
9346 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9349 2018-04-27 Richard Biener <rguenther@suse.de>
9351 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9353 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
9355 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9356 with Yd constraint. Set "preferred_for_speed" attribute from
9357 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9359 (*movdi_internal): Ditto.
9360 (movti_interunit splitters): Remove
9361 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9362 (movdi_interunit splitters): Ditto.
9363 * config/i386/constraints.md (Ye): Remove.
9364 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9366 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9369 * config/aarch64/constraints.md (Usg): Limit to 31.
9372 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9374 PR tree-optimization/85529
9375 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9376 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9377 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9378 zero extension or masking of the MSB bit.
9379 (optimize_range_tests): Add FIRST_BB argument, pass it through
9380 to optimize_range_tests_var_bound.
9381 (maybe_optimize_range_tests, reassociate_bb): Adjust
9382 optimize_range_tests callers.
9384 2018-04-26 Richard Biener <rguenther@suse.de>
9385 Jakub Jelinek <jakub@redhat.com>
9387 * cgraph.h (symbol_table): Just declare debug method here.
9388 * symtab.c (symbol_table::debug): Define.
9390 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
9392 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9394 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
9396 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9397 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9398 (*movdi_internal): Substitute Yi and Yj constraint with x
9399 and Ym and Yn constraint with y constraint. Update "isa"
9400 attribute and set "preferred_for_speed" attribute from
9401 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9402 (*movsi_internal): Ditto.
9403 (*movdf_internal): Ditto.
9404 (*movsf_internal): Ditto.
9405 (*zero_extendsidi2): Ditto.
9406 * config/i386/sse.md (vec_set<mode>_0): Ditto.
9407 (sse2_loadld): Ditto.
9408 (*vec_extract<ssevecmodelower>_0): Ditto.
9409 (*vec_extractv4si_0_zext_sse4): Ditto.
9410 (vec_concatv2di): Ditto.
9411 (*vec_dup<mode>): Ditto.
9412 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9413 * config/i386/constraints.md (Yi): Remove.
9418 2018-04-26 Nathan Sidwell <nathan@acm.org>
9420 * dumpfile.c (dump_open): New.
9421 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9422 (dump_finish): Detect stdio/stderr by value not name.
9424 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
9426 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9428 2018-04-26 Tom de Vries <tom@codesourcery.com>
9431 * config/nvptx/nvptx.c (verify_neutering_jumps)
9432 (verify_neutering_labels): New function
9433 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9435 2018-04-26 Tom de Vries <tom@codesourcery.com>
9438 * config/nvptx/nvptx.c (needs_neutering_p): New function.
9439 (nvptx_single): Use needs_neutering_p to skip over insns that do not
9442 2018-04-26 Richard Biener <rguenther@suse.de>
9443 Tom de Vries <tom@codesourcery.com>
9446 * lto-streamer-out.c (output_function): Fixup loops if required to match
9447 discovery done in the reader.
9449 2018-04-26 Richard Biener <rguenther@suse.de>
9451 PR tree-optimization/85116
9452 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9453 have a loop exit from the single latch predecessor. Remove
9454 case of header with just condition.
9455 (ch_base::copy_headers): Exclude infinite loops from any
9457 (pass_ch::execute): Record exits.
9459 2018-04-26 Richard Biener <rguenther@suse.de>
9461 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9462 prologue cost vector and pass it to vect_get_load_cost.
9463 (vect_get_peeling_costs_all_drs): Likewise.
9464 (vect_peeling_hash_get_lowest_cost): Likewise.
9465 (vect_enhance_data_refs_alignment): Likewise.
9467 2018-04-26 Richard Biener <rguenther@suse.de>
9470 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9471 checking of integer<->pointer conversions.
9472 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9473 sign-/zero-extending pointer types.
9474 (expand_omp_for_static_chunk): Likewise.
9476 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
9477 Jean Lee <xiaoyur347@gmail.com>
9479 * config/mips/mips.c (mips_asan_shadow_offset): New function.
9480 (TARGET_ASAN_SHADOW_OFFSET): Define.
9481 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9482 true for -fsanitize=address.
9484 2018-04-25 Mark Wielaard <mark@klomp.org>
9486 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9489 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9491 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9492 than "alu", remove explicit "memory" and "imm_disp" attributes.
9493 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9496 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9497 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9498 gen_lowpart_no_emit.
9500 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
9503 * config/i386/i386.c (ix86_expand_builtin): Change memory
9504 operand to XI, extend p0 to Pmode.
9505 * config/i386/i386.md: Change unspec volatile and operand
9506 1 mode to XI, change operand 0 mode to P.
9508 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9510 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9511 GET_MODE_MASK before any checking.
9512 (nds32_can_use_bset_p): Likewise.
9513 (nds32_can_use_btgl_p): Likewise.
9515 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9517 * config/nds32/nds32-doubleword.md: New define_split pattern for
9518 illegal register number.
9520 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9522 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9524 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9526 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9528 2018-04-25 Richard Biener <rguenther@suse.de>
9530 * lto-streamer.h (LTO_major_version): Bump to 8.
9532 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9534 * BASE-VER: Set to 9.0.0.
9536 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9538 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9539 in __abskf2 and __powikf2.
9541 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9544 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9545 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9546 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9547 Use the above on operand 2. Reindent.
9548 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9550 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9553 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9555 * config/i386/i386.opt (mcet): Removed.
9556 * doc/install.texi: Remove -mcet documentation.
9557 * doc/invoke.texi: Likewise.
9559 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9562 * doc/install.texi: Remove -mcet from bootstrap-cet.
9564 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9567 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9568 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9572 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9573 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9574 containing a CONST_VECTOR.
9576 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9578 * doc/install.texi: Update newlib dependency for nvptx.
9580 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9583 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9584 instead of INTVAL when shifting x left.
9586 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9588 PR tree-optimization/85478
9589 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9590 vect_grouped_store_supported for single element vectors.
9592 2018-04-24 Richard Biener <rguenther@suse.de>
9595 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9596 load cost increase to the case of non-constant step.
9598 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9601 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9602 destination if any_malformed_asm.
9604 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
9607 * expr.c (store_field): In the bitfield case, if the value comes from
9608 a function call and is returned in registers by means of a PARALLEL,
9609 do not change the mode of the temporary unless BLKmode and VOIDmode.
9611 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
9613 PR rtl-optimization/85423
9614 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9615 dependencies to debug insns when the previous insn is non-debug.
9617 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9619 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9620 enums into a single definition.
9621 (fls): Fix predicates and printing.
9624 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9626 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9627 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9628 and short u6 immediate.
9629 (check_if_valid_sleep_operand): Remove.
9630 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9632 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9634 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9635 flag_always_save_lp condition.
9636 * config/nds32/nds32.opt (malways-save-lp): New option.
9638 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9640 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9641 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9642 * config/nds32/nds32.h
9643 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9644 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9646 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9648 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9649 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9651 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9652 Chung-Ju Wu <jasonwucj@gmail.com>
9654 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9656 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9657 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9659 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9661 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9663 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9665 * config/nds32/nds32-protos.h (nds32_data_alignment,
9666 nds32_local_alignment): Declare.
9667 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9668 nds32_local_alignment): New functions.
9669 (TARGET_CONSTANT_ALIGNMENT): Define.
9670 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9672 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9674 * config/nds32/nds32.c
9675 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9676 (TARGET_MODES_TIEABLE_P): Likewise.
9678 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9680 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9683 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
9684 Chung-Ju Wu <jasonwucj@gmail.com>
9686 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9687 for unaligned access.
9688 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9690 * config/nds32/nds32-intrinsic.md: Likewise.
9691 * config/nds32/nds32_intrinsic.h: Likewise.
9692 * config/nds32/nds32.h (nds32_builtins): Likewise.
9693 * config/nds32/nds32.opt (munaligned-access): New option.
9694 * config/nds32/nds32.c (nds32_asm_file_start): Display
9695 flag_unaligned_access status.
9697 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9699 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9700 -mno-relax is present.
9701 * config/riscv/linux.h (LINK_SPEC): Ditto.
9703 2018-04-20 Martin Sebor <msebor@redhat.com>
9706 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9708 (gimple_fold_builtin_stxcpy_chk): Same.
9709 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9711 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
9714 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9715 __powikf2 when long double is IEEE 128-bit.
9717 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9719 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9720 step to make sure stack always aligned.
9722 2018-04-20 Carl Love <cel@us.ibm.com>
9725 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9726 size check for arg0.
9728 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
9729 Tom de Vries <tom@codesourcery.com>
9732 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9733 Emit insns for calls too.
9734 (nvptx_find_par): Always look for worker-level predecessor insn.
9735 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
9737 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9738 (nvptx_process_pars): Propagate frames for calls.
9740 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
9743 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9745 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9746 (ix86_handle_option): Don't handle OPT_mibt.
9747 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9749 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9751 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9752 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9753 (ix86_target_macros): Define __CET__ with flag_cf_protection
9754 for -fcf-protection.
9755 * config/i386/i386.c (isa2_opts): Remove -mibt.
9756 * config/i386/i386.h (TARGET_IBT): Removed.
9757 (TARGET_IBT_P): Likewise.
9758 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9759 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9760 * config/i386/i386.opt (mcet): Update help message.
9763 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
9764 -mcet as an alias for -mshstk.
9766 2018-04-20 Richard Biener <rguenther@suse.de>
9769 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9770 complexity by forcing a single use of the multiply operand.
9772 2018-04-20 Martin Jambor <mjambor@suse.cz>
9775 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9776 recursion dependency to only apply to non-clones.
9778 2018-04-20 Martin Jambor <mjambor@suse.cz>
9781 * ipa-cp.c (create_specialized_node): Check that clones of
9782 self-recursive edges exist during IPA-CP.
9784 2018-04-19 Toon Moene <toon@moene.org>
9786 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9789 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9791 PR tree-optimization/85467
9792 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9793 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
9794 VECTOR_CST element to type.
9796 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9799 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9800 * config/i386/i386.md (builtin_setjmp_setup): Removed.
9801 (builtin_longjmp): Likewise.
9802 (save_stack_nonlocal): New pattern.
9803 (restore_stack_nonlocal): Likewise.
9805 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9808 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9809 Replace ASM_OUTPUT_LABEL with fprintf.
9811 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9814 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9815 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9816 * config/i386/i386-c.c (ix86_target_macros_internal): Also
9817 define __IBT__ and __SHSTK__ for -fcf-protection.
9818 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9820 (ix86_trampoline_init): Likewise.
9821 (x86_output_mi_thunk): Likewise.
9822 (ix86_notrack_prefixed_insn_p): Likewise.
9823 (ix86_option_override_internal): Don't disallow -fcf-protection.
9824 * config/i386/i386.md (rdssp<mode>): Also enable for
9826 (incssp<mode>): Likewise.
9827 (nop_endbr): Likewise.
9828 * config/i386/i386.opt (mcet): Change help message to built-in
9832 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9833 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
9834 enable CET built-in functions.
9836 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
9838 * common/config/i386/i386-common.c
9839 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9840 OPTION_MASK_ISA_MOVDIRI_UNSET,
9841 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9842 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9843 * config.gcc (movdirintrin.h): New header.
9844 * config/i386/cpuid.h (bit_MOVDIRI,
9845 bit_MOVDIR64B): New bits.
9846 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9848 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9849 (VOID, PVOID, PCVOID)): New function types.
9850 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9851 __builtin_ia32_directstoreu_u64,
9852 __builtin_ia32_movdir64b): New builtins.
9853 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9854 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9856 (ix86_valid_target_attribute_inner_p): Ditto.
9857 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9858 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9859 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9860 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9861 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9862 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9863 (movdiri<mode>, movdir64b_<mode>): New.
9864 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9865 * config/i386/immintrin.h: Include movdirintrin.h.
9866 * config/i386/movdirintrin.h: New file.
9867 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9869 2018-04-19 Richard Biener <rguenther@suse.de>
9872 * cfg.c (clear_bb_flags): When loop state says we have
9873 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9875 2018-04-19 Richard Biener <rguenther@suse.de>
9877 PR tree-optimization/84737
9878 * tree-vect-data-refs.c (vect_copy_ref_info): New function
9879 copying restrict info.
9880 (vect_setup_realignment): Use it.
9881 * tree-vectorizer.h (vect_copy_ref_info): Declare.
9882 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9883 the first DR to all generated stores.
9884 (vectorizable_load): Likewise for loads.
9886 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9888 PR tree-optimization/85446
9889 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9890 the integral and pointer types to have the same precision.
9892 * doc/install.texi: Document --disable-cet being the default and
9895 2018-04-18 Martin Liska <mliska@suse.cz>
9897 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9900 2018-04-18 Martin Liska <mliska@suse.cz>
9903 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9906 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9907 arguments if they are comparable.
9909 2018-04-18 Martin Liska <mliska@suse.cz>
9912 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9915 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9918 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
9921 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9922 ENDBR after calling __morestack.
9924 2018-04-18 David Malcolm <dmalcolm@redhat.com>
9927 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9928 by using gcc_base_ver to generate a gcc_driver_version, and use
9929 it when generating GCC_DRIVER_NAME.
9930 * configure: Regenerate.
9932 2018-04-18 Jakub Jelinek <jakub@redhat.com>
9935 * config.gcc: Obsolete powerpc*-*-*spe*.
9937 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9940 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9941 (stabstr_D): Change type of unum from unsigned int to
9942 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
9945 2018-04-17 Jim Wilson <jimw@sifive.com>
9948 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9949 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9950 Set arg_pointer_offset after using pretend_args_size.
9952 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9954 PR rtl-optimization/85431
9955 * dse.c (record_store): Ignore zero width stores.
9958 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
9959 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9960 __builtin_stack_restore rather than after it.
9961 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9962 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9963 argument instead of virtual_dynamic_stack_rtx.
9965 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
9967 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9969 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9970 Add note to error message to explain internal mapping of overloaded
9971 built-in function name to non-overloaded built-in function name.
9972 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9975 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9978 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9979 where the inputs overlap with the output.
9981 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9983 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9984 (=v, v) alternative and explicit "memory" attribute.
9985 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
9986 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9988 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9989 "sselog1" type instead of "sselog".
9990 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9991 "sselog". Remove explicit "memory" attribute.
9992 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9993 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9995 (vec_extract_hi_v32hi): Merge all alternatives into one, use
9996 "sselog1" type instead of "sselog". Remove explicit "memory"
9998 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9999 use "sselog1" type instead of "sselog". Remove explicit "memory"
10001 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10002 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10004 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10005 "sselog1" type instead of "sselog". Remove explicit "memory"
10007 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10008 use "sselog1" type instead of "sselog". Remove explicit "memory"
10012 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10014 PR middle-end/85414
10015 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10018 2018-04-17 Martin Jambor <mjambor@suse.cz>
10021 * ipa-cp.c (create_specialized_node): Call
10022 expand_all_artificial_thunks if necessary.
10024 2018-04-17 Martin Liska <mliska@suse.cz>
10027 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10028 in message, remote space in between '_G' and '('.
10030 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10033 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10034 avx512f_vmcmp<mode>3<round_saeonly_name>,
10035 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10036 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10037 avx512f_rndscale<mode><round_saeonly_name>,
10038 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10039 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10040 Use %<iptr>2 instead of %2 for -masm=intel.
10041 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10042 avx512f_vcvttss2usi<round_saeonly_name>,
10043 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10045 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10046 avx512f_vcvttsd2usi<round_saeonly_name>,
10047 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10048 Use %q1 instead of %1 for -masm=intel.
10049 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10050 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10051 of %3 for -masm=intel.
10052 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10054 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10056 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10058 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10059 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10061 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10063 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10064 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10065 %g1 and one with %0 and %1.
10066 (avx512er_vmrcp28<mode><round_saeonly_name>,
10067 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10068 %1 for -masm=intel.
10069 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10070 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10071 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10072 of %0 and %{%4%} for -masm=intel.
10073 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10074 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10075 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10076 order of %0 and %{%5%}%{z%} for -masm=intel.
10078 2018-04-17 Jan Hubicka <jh@suse.cz>
10081 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10083 2018-04-17 Martin Liska <mliska@suse.cz>
10086 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10087 for target_clone error message. Make default implementation
10088 clone to be a local declaration.
10089 (separate_attrs): Add new argument and check for an empty
10091 (expand_target_clones): Handle it.
10092 (ipa_target_clone): Make redirection just for target_clones
10095 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10096 Tom de Vries <tom@codesourcery.com>
10098 PR middle-end/84955
10099 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10100 tiled basic blocks without omp continue statements.
10102 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10105 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10106 vec_extract expression as having side effects to make sure it gets
10109 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10112 * config/i386/i386.c (get_builtin_code_for_version): Check
10115 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10118 * config.gcc: Support "skylake".
10119 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10121 * config/i386/i386.c (m_SKYLAKE): Define.
10122 (processor_target_table): Add "skylake".
10123 (ix86_option_override_internal): Add "skylake".
10124 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10125 PROCESSOR_CANNONLAKE.
10126 (get_builtin_code_for_version): Fix priority for
10127 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10128 PROCESSOR_SKYLAKE-AVX512.
10129 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10130 (processor_type): Add PROCESSOR_SKYLAKE.
10132 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
10133 Jason Merrill <jason@redhat.com>
10136 * convert.c (convert_to_integer_1): Use direct recursion for
10137 enumeral types and types with a precision less than the number
10138 of bits in their mode.
10140 2018-04-16 Julia Koval <julia.koval@intel.com>
10143 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10144 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10146 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
10149 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10150 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10151 and -mno-direct-move.
10153 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
10156 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10157 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10158 Ensure negative shifts result in {0}.
10160 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
10162 PR rtl-optimization/79916
10163 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10164 regs (if any) to define how to gnerate SD moves when LRA is in
10167 2018-04-13 Jakub Jelinek <jakub@redhat.com>
10169 PR rtl-optimization/85393
10170 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10171 * except.c (expand_dw2_landing_pad_for_region): Make static.
10172 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10173 a label and unconditional jump to old_bb, rather than
10174 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10177 PR rtl-optimization/85376
10178 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10179 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10180 instead of a specific value.
10182 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10183 Bin Cheng <bin.cheng@arm.com>
10185 PR tree-optimization/82965
10186 PR tree-optimization/83991
10187 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10188 by_profile_only parameter.
10189 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10190 information if the loop was predicted to iterate too many times.
10191 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10193 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10196 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10199 2018-04-13 Martin Liska <mliska@suse.cz>
10200 Jakub Jelinek <jakub@redhat.com>
10202 PR middle-end/81657
10203 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10204 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10205 * builtins.c (expand_builtin_memory_copy_args): Use
10206 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10207 handle dest_addr == pc_rtx.
10209 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
10212 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10213 asked to not generate direct moves.
10214 (fix_trunc<mode>si2_stfiwx): Similar.
10215 (fix_trunc<mode>si2_internal): Similar.
10217 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10220 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10221 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10222 lookup if dest in some wider mode is known to be const0_rtx and
10223 if so, record permanent equivalence for it to be ZERO_EXTEND of
10224 the narrower mode destination.
10226 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10228 * lto-streamer-out.c (output_function): Revert 259346.
10229 * omp-expand.c (expand_oacc_for): Likewise.
10231 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
10233 PR rtl-optimization/85354
10234 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10235 * sel-sched.c (sel_global_init): ... here.
10237 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
10240 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10241 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10242 mode for PE-COFF targets.
10243 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10244 (i386_pe_asm_lto_end): Likewise.
10245 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10246 (TARGET_ASM_LTO_END): Likewise.
10247 * config/i386/winnt.c (saved_debug_info_level): New static variable.
10248 (i386_pe_asm_lto_start): New function.
10249 (i386_pe_asm_lto_end): Likewise.
10251 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10252 Richard Biener <rguenther@suse.de>
10254 PR middle-end/84955
10255 * lto-streamer-out.c (output_function): Fix CFG loop state before
10257 * omp-expand.c (expand_oacc_for): Handle calls to internal
10258 functions like regular functions.
10260 2018-04-12 Richard Biener <rguenther@suse.de>
10263 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10264 for the early LTO debug to properly generate references to it
10265 during DIE emission. Do not re-use that for the skeleton for
10267 (dwarf2out_early_finish): Likewise.
10269 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10272 * config/i386/sse.md
10273 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10274 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10275 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10276 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10277 and output is a reg, avoid creating invalid lowpart subreg, but
10278 instead split into a 512-bit move. Don't split if not AVX512VL,
10279 input is xmm16+ reg and output is a mem.
10280 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10281 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10282 xmm16+ reg and output is a mem.
10284 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10286 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10287 also for flag_dwarf2_cfi_asm.
10289 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10291 PR rtl-optimization/85342
10292 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10293 a bool scalar var inside of the loop instead. Don't try to update
10294 recog_data.operand after failed apply_change_group.
10296 2018-04-12 Tom de Vries <tom@codesourcery.com>
10299 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10300 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
10301 array with flexible array member as array without given dimension.
10302 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10303 argument for undefined param to true.
10305 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
10308 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10309 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10310 from PowerPC section.
10311 * config/rs6000/sysv4.opt (mcall-): Improve help text.
10312 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10313 help text that is too long.
10314 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10315 help text that is too long.
10316 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10317 help text that is too long.
10319 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
10321 * config/alpha/alpha.md (stack_probe_internal): Rename
10322 from "probe_stack". Update all callers.
10324 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10326 PR rtl-optimization/84566
10327 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10328 sched_macro_fuse_insns.
10330 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10333 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10334 (compute_block_dependences): ... from here.
10336 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10338 PR tree-optimization/85331
10339 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10340 from int to HOST_WIDE_INT.
10342 2018-04-11 Martin Jambor <mjambor@suse.cz>
10345 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10346 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10347 not the same as the source val.
10348 (cgraph_edge_brings_value_p): New parameter.
10349 (gather_edges_for_value): Pass destination value to
10350 cgraph_edge_brings_value_p.
10351 (perhaps_add_new_callers): Likewise.
10352 (get_info_about_necessary_edges): Likewise and exclude values brought
10353 only by self-recursive edges.
10354 (create_specialized_node): Redirect only clones of self-calling edges.
10355 (+self_recursive_pass_through_p): New function.
10356 (find_more_scalar_values_for_callers_subset): Use it.
10357 (find_aggregate_values_for_callers_subset): Likewise.
10358 (known_aggs_to_agg_replacement_list): Removed.
10359 (decide_whether_version_node): Re-calculate known constants for all
10360 remaining context clones.
10362 2018-04-11 Richard Biener <rguenther@suse.de>
10365 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10366 from early DWARF output.
10367 (dwarf2out_early_finish): Output line info unconditionally into
10368 early DWARF and add reference to it.
10370 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10373 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10374 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10375 other than V2DFmode using iptr mode attribute.
10376 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10378 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10380 PR rtl-optimization/84659
10381 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10383 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10386 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10388 (output_loc_list): Pass address of a dummy size variable even in the
10389 locview handling loop.
10390 (index_location_lists): Add comment on why skip_loc_list_entry can't
10393 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
10396 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10399 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
10402 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10403 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10404 and -mstring-compare-inline-limit.
10406 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10409 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10410 for stack clash protection in a register whenever we need it to be in
10413 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10415 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10416 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10418 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10421 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10423 (mlong-double-): Ditto.
10424 * config/rs6000/sysv4.opt (msdata=): Ditto.
10425 (mtls-size=): Ditto.
10427 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10429 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10430 erroneous entries for
10431 "vector int vec_ldl (int, long int *)", and
10432 "vector unsigned int vec_ldl (int, unsigned long int *)".
10433 Add comments and entries for
10434 "vector bool char vec_ldl (int, bool char *)",
10435 "vector bool short vec_ldl (int, bool short *)",
10436 "vector bool int vec_ldl (int, bool int *)",
10437 "vector bool long long vec_ldl (int, bool long long *)",
10438 "vector pixel vec_ldl (int, pixel *)",
10439 "vector long long vec_ldl (int, long long *)",
10440 "vector unsigned long long vec_ldl (int, unsigned long long *)".
10441 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10442 type tree bool_long_long_type_node and correct definition of
10443 bool_V2DI_type_node to make reference to this new type tree.
10444 (rs6000_mangle_type): Replace erroneous reference to
10445 bool_long_type_node with bool_long_long_type_node.
10446 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10447 comments to emphasize sign distinctions for char and int types and
10448 replace RS6000_BTI_bool_long constant with
10449 RS6000_BTI_bool_long_long constant. Also add comment to restrict
10450 use of RS6000_BTI_pixel.
10451 (bool_long_type_node): Remove this macro definition.
10452 (bool_long_long_type_node): New macro definition
10454 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10456 PR rtl-optimization/85300
10457 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10458 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10459 simplify_unary_operation fails.
10461 2018-04-10 Martin Liska <mliska@suse.cz>
10463 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10464 cgraph_edge and ipa_ref.
10466 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10470 * config/i386/sse.md
10471 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10472 computation of the VEC_MERGE selector from mask.
10473 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10474 Fix decoding of the VEC_MERGE selector into mask.
10476 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10478 PR tree-optimization/85286
10479 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10481 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10483 * final.c (final_1): Set insn_last_address as well as
10484 insn_current_address.
10486 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10489 * explow.c (emit_stack_probe): Call validize_mem on memory location
10490 before passing it to gen_probe_stack. Create address operand and
10491 legitimize it for the probe_stack_address case.
10493 2018-04-09 Jan Hubicka <jh@suse.cz>
10496 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10497 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10498 * tree.c (free_lang_data_in_type): Fix handling of binfos;
10500 (free_lang_data): Rebuild type inheritance graph.
10502 2018-04-09 Martin Sebor <msebor@redhat.com>
10504 * invoke.texi (-finline-small-functions): Mention other optimization
10506 (-findirect-inlining, -fpartial-inlining): Same.
10507 (-finline-functions-called-once): Same.
10508 (-freorder-blocks-and-partition): Same.
10510 2018-04-09 Jan Hubicka <jh@suse.cz>
10513 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10514 jumps; choose last target that matches the criteria (i.e.
10515 no partition changes for non-crossing jumps).
10516 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10517 support for redirecting crossing jumps to non-crossing.
10519 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
10521 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10522 also for naked functions.
10524 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
10526 * config/arc/arc.md (add_shift): New pattern.
10527 (add_shift2): Likewise.
10528 (sub_shift): Likewise.
10529 (sub_shift_cmp0_noout): Likewise.
10530 (compare_si_ashiftsi): Likewise.
10531 (xbfu_cmp0_noout): New combine pattern.
10532 (xbfu_cmp0"): Likewise.
10533 (movsi_set_cc_insn): Place the predicable variant first.
10534 (commutative_binary_cmp0_noout): Remove clobber.
10535 (commutative_binary_cmp0): New pattern.
10536 (noncommutative_binary_cmp0): Likewise.
10537 (noncommutative_binary_cmp0_noout): Likewise.
10538 (noncommutative_binary_comparison_result_used): Removed.
10539 (rsub_cmp0): New pattern.
10540 (rsub_cmp0_noout): Likewise.
10541 (extzvsi): Changed, keep only meaningful variants.
10542 (SQH, SEZ): New iterators.
10543 (SQH_postfix): New mode attribute.
10544 (SEZ_prefix): New code attribute.
10545 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10546 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10547 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10548 of numerical value.
10549 (noncommutative_operator): Check the availability of barrel
10552 2018-04-09 Richard Biener <rguenther@suse.de>
10554 PR tree-optimization/85284
10555 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10556 Only use the niter constraining form of simple_iv when the exit
10557 is always executed.
10559 2018-04-09 Tom de Vries <tom@codesourcery.com>
10562 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10563 (define_expand "*memory_barrier"): New define_expand.
10564 (define_insn "memory_barrier"): New insn.
10566 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10568 PR rtl-optimization/80463
10569 PR rtl-optimization/83972
10570 PR rtl-optimization/83480
10572 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10573 correct producer for the insn.
10574 (tidy_control_flow): Fixup seqnos in case of debug insns.
10576 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10578 PR rtl-optimization/83913
10580 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10581 different sched-times when merging exprs.
10583 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10585 PR rtl-optimization/83962
10587 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10588 tidy_fallthru_edge and tidy_control_flow.
10590 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10592 PR rtl-optimization/83530
10594 * sel-sched.c (force_next_insn): New global variable.
10595 (remove_insn_for_debug): When force_next_insn is true, also leave only
10596 next insn in the ready list.
10597 (sel_sched_region): When the region wasn't scheduled, make another pass
10598 over it with force_next_insn set to 1.
10600 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10602 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10604 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10605 for interrupt control.
10606 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10607 functions for interrupt control.
10608 * config/nds32/nds32-intrinsic.md: Likewise.
10609 * config/nds32/nds32_intrinsic.h: Likewise.
10610 * config/nds32/nds32.h (nds32_builtins): Likewise.
10612 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10614 * config/nds32/nds32.c (nds32_init_machine_status,
10615 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10616 strict_aligned_p field.
10617 (nds32_expand_to_rtl_hook): New function.
10618 (TARGET_EXPAND_TO_RTL_HOOK): Define.
10619 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10621 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10622 Chung-Ju Wu <jasonwucj@gmail.com>
10624 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10625 * config/nds32/nds32-n7.md: New file.
10626 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10627 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10629 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10630 * config/nds32/nds32.md (pipeline_model): Add n7.
10631 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10632 * config/nds32/pipelines.md: Include n7 settings.
10634 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10635 Chung-Ju Wu <jasonwucj@gmail.com>
10637 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10638 * config/nds32/nds32-e8.md: New file.
10639 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10640 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10642 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10643 * config/nds32/nds32.md (pipeline_model): Add e8.
10644 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10645 * config/nds32/pipelines.md: Include e8 settings.
10647 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10648 Chung-Ju Wu <jasonwucj@gmail.com>
10650 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10651 * config/nds32/nds32-n8.md: New file.
10652 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10653 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10655 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10656 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10657 * config/nds32/nds32.md (pipeline_model): Add n8.
10658 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10659 * config/nds32/pipelines.md: Include n8 settings.
10661 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10662 Chung-Ju Wu <jasonwucj@gmail.com>
10664 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10665 * config/nds32/nds32-n9-2r1w.md: New file.
10666 * config/nds32/nds32-n9-3r2w.md: New file.
10667 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10668 nds32_register_ports): New or modify for cpu n9.
10669 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10671 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10672 * config/nds32/nds32-utils.c: New file.
10673 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10674 TARGET_MUL_SLOW): Define.
10675 * config/nds32/nds32.md (pipeline_model): New attribute.
10676 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10677 New options that support cpu n9.
10678 * config/nds32/pipelines.md: Include n9 settings.
10679 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10681 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10683 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10684 information if necessary.
10685 (output_cond_branch_compare_zero): Likewise.
10686 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10687 (nds32_target_alignment): Refine for alignment.
10688 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10689 (FUNCTION_BOUNDARY): Modify.
10690 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10692 * config/nds32/nds32.opt (malways-align, malign-functions): New.
10694 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10696 * config/nds32/constants.md (unspec_volatile_element): Add values for
10697 TLB operation and data prefetch.
10698 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10699 functions for TLB operation and data prefetch.
10700 * config/nds32/nds32-intrinsic.md: Likewise.
10701 * config/nds32/nds32_intrinsic.h: Likewise.
10702 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10703 (nds32_print_operand): Likewise.
10704 * config/nds32/nds32.h (nds32_builtins): Likewise.
10706 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
10707 Andrew Pinski <pinsika@gcc.gnu.org>
10709 PR middle-end/82976
10710 * match.pd: Use constant_boolean_node of correct type instead of
10711 boolean_true_node or boolean_false_node for simplifying
10712 pointer comparisons to zero.
10714 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10716 PR tree-optimization/80021
10717 * tree.c (verify_type_variant): Make error call in verify_variant_match
10718 translatable and remove final full stop.
10720 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10722 * config/nds32/constants.md (unspec_volatile_element): Add
10723 UNSPEC_VOLATILE_EH_RETURN.
10724 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10725 nds32_output_stack_pop): Support dwarf exception handling process.
10726 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10727 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10728 exception handling process.
10729 (nds32_compute_stack_frame): Likewise.
10730 (nds32_return_addr_rtx): Likewise.
10731 (nds32_initial_elimination_offset): Likewise.
10732 (nds32_expand_prologue): Likewise.
10733 (nds32_expand_epilogue): Likewise.
10734 (nds32_dynamic_chain_address): New function.
10735 * config/nds32/nds32.h (machine_function): Add fields for dwarf
10736 exception handling.
10737 (DYNAMIC_CHAIN_ADDRESS): Define.
10738 (EH_RETURN_DATA_REGNO): Define.
10739 (EH_RETURN_STACKADJ_RTX): Define.
10740 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10741 patterns for dwarf exception handling.
10743 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10745 * config/nds32/nds32.h: Clean up obsolete macros.
10747 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10749 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10750 Add enum values for particular instructions.
10751 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10752 particular intrinsic functions.
10753 * config/nds32/nds32-intrinsic.md: Likewise.
10754 * config/nds32/nds32_intrinsic.h: Likewise.
10755 * config/nds32/nds32.h (nds32_builtins): Likewise.
10756 * config/nds32/nds32.md (type): Add pbsad and pbsada.
10757 (btst, ave): New patterns for particular instructions.
10759 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10761 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10762 Add enum values for atomic load/store and memory sync.
10763 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10765 * config/nds32/nds32-intrinsic.md: Likewise.
10766 * config/nds32/nds32_intrinsic.h: Likewise.
10767 * config/nds32/nds32.h (nds32_builtins): Likewise.
10769 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10771 PR tree-optimization/85257
10772 * fold-const.c (native_encode_vector): If not all elts could fit
10773 and off is -1, return 0 rather than offset.
10774 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10775 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10776 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
10777 adjust buffer in native_interpret_expr call.
10779 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10781 * config/nds32/constants.md (unspec_volatile_element): Add cache
10782 control enum values.
10783 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10784 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10785 * config/nds32/nds32.c (nds32_cctl_names): New.
10786 (nds32_print_operand): Handle cache control register names.
10787 * config/nds32/nds32.h (nds32_builtins): New enum values.
10788 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10790 * config/nds32/nds32.md (type): Add mmu.
10791 * config/nds32/pipelines.md (simple_insn): Add mmu.
10793 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10795 * config/nds32/nds32.md (type): Remove call.
10796 * config/nds32/pipelines.md (simple_insn): Likewise.
10798 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10800 * config/nds32/constants.md (unspec_volatile_element): Add
10801 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10802 UNSPEC_VOLATILE_FMFCFG.
10803 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10804 description for fmfcfg and fmfcsr.
10805 (bdesc_1arg): Add fmtcsr.
10806 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10807 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10808 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10809 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10810 unspec_fmfcfg): New patterns.
10811 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10812 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10813 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10814 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10815 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10816 __nds32__fmfcfg): Define.
10818 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10820 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10821 intrinsic register names.
10822 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10823 intrinsic register enum values and macros.
10825 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10827 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10828 for load/store addressing form.
10829 (nds32_print_operand_address): Likewise.
10831 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
10834 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10835 based on LABEL_REF. Remove useless assertion.
10836 (pic_address_needs_scratch): Fix formatting.
10837 (sparc_legitimize_pic_address): Minor tweaks.
10838 (sparc_delegitimize_address): Adjust assertion accordingly.
10839 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10840 into symbolic_operand.
10841 (movsi_high_pic_label_ref): Likewise.
10842 (movsi_lo_sum_pic_label_ref): Likewise.
10843 (movdi_pic_label_ref): Likewise.
10844 (movdi_high_pic_label_ref): Likewise.
10845 (movdi_lo_sum_pic_label_ref): Likewise.
10847 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
10849 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10850 custom LIB_SPEC setup.
10852 2018-04-06 Ruslan Bukin <br@bsdpad.com>
10853 Kito Cheng <kito.cheng@gmail.com>
10855 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10856 * config/riscv/freebsd.h: New.
10858 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10860 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10861 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10864 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10865 Kito Cheng <kito.cheng@gmail.com>
10867 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10868 nds32_output_call, nds32_symbol_binds_local_p): New functions.
10869 * config/nds32/nds32-protos.h (nds32_output_call,
10870 nds32_output_return): Declare.
10871 * config/nds32/nds32.md: Refine all the call and return patterns.
10873 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10876 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10877 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10879 PR rtl-optimization/84872
10880 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10881 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10882 EDGE_CROSSING edge.
10884 2018-04-06 Tamar Christina <tamar.christina@arm.com>
10886 * expr.c (copy_blkmode_to_reg): Revert 254862.
10887 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10889 2018-04-06 Richard Biener <rguenther@suse.de>
10891 PR middle-end/85244
10892 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10893 after seeing a component reference with an adjacent field. Treat
10894 refs to arrays at struct end of external decls similar to
10895 refs to unconstrained commons.
10897 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10900 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10901 look through SAVE_EXPRs with non-side-effects argument. Adjust
10903 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10906 2018-04-06 Richard Biener <rguenther@suse.de>
10908 PR middle-end/85180
10909 * alias.c (find_base_term): New wrapper around find_base_term
10910 unwinding CSELIB_VAL_PTR changes.
10911 (find_base_term): Do not restore CSELIB_VAL_PTR during the
10914 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10916 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10918 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10919 constant definitions.
10920 ("nop"): lr 0,0 -> nopr r0
10921 ("nop_lr0", "nop_lr1"): New insn definitions.
10923 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10925 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10926 NDS32_V3PUSH_AVAILABLE_P macro.
10928 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
10929 Chung-Ju Wu <jasonwucj@gmail.com>
10931 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10932 (nds32*-*-*): Add float and fpu_config into supported_defaults.
10933 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10934 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10935 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10936 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10937 * config/nds32/constraints.md: New constraints and checking for hard
10938 float configuration.
10939 * config/nds32/iterators.md: New mode iterator and attribute for hard
10940 float configuration.
10941 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10943 * config/nds32/nds32-fpu.md: New file.
10944 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10945 deal with hard float code generation.
10946 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10948 (abi_type, float_reg_number): New enum type.
10949 * config/nds32/nds32-predicates.c: New predicates for hard float.
10950 * config/nds32/nds32-protos.h: Declare functions for hard float.
10951 * config/nds32/nds32.c: Implementation for hard float configuration.
10952 * config/nds32/nds32.h: Definitions for hard float configuration.
10953 * config/nds32/nds32.md: Include hard float machine description and
10954 modify patterns for hard float configuration.
10955 * config/nds32/nds32.opt: New options for hard float configuration.
10956 * config/nds32/predicates.md: New predicates for hard float
10959 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10961 * common/config/nds32/nds32-common.c
10962 (nds32_option_optimization_table): Enable -mreleax-hint by default.
10964 2018-04-05 Jakub Jelinek <jakub@redhat.com>
10966 PR middle-end/85195
10967 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10968 CONSTRUCTOR_ELT (ctor, ...)->value.
10970 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
10973 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10975 2018-04-05 Tom de Vries <tom@codesourcery.com>
10978 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10981 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10982 Kito Cheng <kito.cheng@gmail.com>
10984 * config/nds32/constraints.md (U33): Fine-tune checking condition.
10985 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10986 * config/nds32/nds32.h (nds32_16bit_address_type): Add
10987 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10989 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10990 Kito Cheng <kito.cheng@gmail.com>
10992 * config/nds32/constraints.md (Ufe): New memory constraint.
10993 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10994 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10995 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10997 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10998 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11000 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11002 * config/nds32/nds32.md: Use optimize_size in the condition for
11003 alu-shift instructions.
11005 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11007 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11009 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11011 * config/nds32/nds32.md (negsi2): Refine pattern.
11013 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11014 Chung-Ju Wu <jasonwucj@gmail.com>
11016 * config/nds32/iterators.md (shift_rotate): New code iterator.
11017 (shift): New code attribute.
11018 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11019 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11020 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11021 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11022 bit-wise operations.
11023 (andsi3, *andsi3): Ditto.
11024 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11025 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11026 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11027 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11028 nds32_ior_operand, nds32_xor_operand): New predicates.
11030 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11032 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11033 (addsi3, subsi3): ... this.
11035 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11037 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11039 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11041 * config/nds32/nds32.md: Adjust indention.
11043 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11045 * config/nds32/nds32.md (feature): New attribute.
11047 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11049 * config/nds32/nds32.md (subtype): New attribute.
11051 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11054 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11055 expansion to perform a bitwise AND of the argument followed by a
11056 boolean negation of the result.
11058 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11060 PR rtl-optimization/84878
11061 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11062 the basic block. Assert the use reference is not artificial and that
11063 it has an associated insn.
11065 2018-04-04 Michael Matz <matz@suse.de>
11067 * builtins.c (compute_objsize): Pass correct operand
11068 to array_at_struct_end_p.
11070 2018-04-04 Richard Biener <rguenther@suse.de>
11073 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11074 from contexts for DINFO_LEVEL_TERSE and below.
11076 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11078 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11079 resiter_operand condition.
11080 * config/nds32/nds32.md (*move<mode>): Ditto.
11082 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11083 Monk Chiang <sh.chiang04@gmail.com>
11085 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11087 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11089 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11091 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11092 Kito Cheng <kito.cheng@gmail.com>
11094 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11095 nds32_cond_code_str, output_cond_branch,
11096 output_cond_branch_compare_zero, nds32_expand_cbranch,
11097 nds32_expand_cstore, nds32_expand_movcc,
11098 nds32_output_cbranchsi4_equality_zero,
11099 nds32_output_cbranchsi4_equality_reg,
11100 nds32_output_cbranchsi4_equality_reg_or_const_int,
11101 nds32_output_cbranchsi4_greater_less_zero: New functions.
11102 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11103 nds32_expand_cstore, nds32_expand_movcc,
11104 nds32_output_cbranchsi4_equality_zero,
11105 nds32_output_cbranchsi4_equality_reg,
11106 nds32_output_cbranchsi4_equality_reg_or_const_int,
11107 nds32_output_cbranchsi4_greater_less_zero): Declare.
11108 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11109 nds32_rimm11s_operand): New predicates.
11110 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11111 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11114 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11116 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11117 * config/nds32/nds32.md: Ditto.
11118 * config/nds32/pipelines.md: Ditto.
11120 2018-04-04 Richard Biener <rguenther@suse.de>
11122 PR tree-optimization/85168
11123 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11124 propagating abnormals.
11126 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11128 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11130 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11131 Kito Cheng <kito.cheng@gmail.com>
11133 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11134 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11135 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11136 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11137 * config/nds32/nds32.md (sibcall_internal): New.
11138 (sibcall_register): Remove.
11139 (sibcall_immediate): Remove.
11140 (sibcall_value_internal): New.
11141 (sibcall_value_register): Remove.
11142 (sibcall_value_immediate): Remove.
11143 * config/nds32/predicates.md (nds32_general_register_operand): New.
11144 (nds32_call_address_operand): New.
11146 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11148 PR rtl-optimization/85167
11149 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11150 bb_defs if *split_p, instead preinitialize it to NULL.
11152 PR tree-optimization/85156
11153 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11154 evaluating the argument multiple times.
11156 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
11158 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11160 (_mm_cvtpd_ps): Likewise.
11161 (_mm_cvttpd_epi32): Likewise.
11162 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11163 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11164 vector, pixel, and bool following altivec.h include.
11166 2018-04-03 Martin Sebor <msebor@redhat.com>
11168 * doc/extend.texi (Common Function Attributes): Clarify.
11169 (const attribute): Likewise.
11170 (pure attribute): Likewise.
11172 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11175 * config/i386/i386.c (ix86_expand_vector_set): Use
11176 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
11178 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
11180 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11181 instructions when changing rounding bits to preserve precision bits
11182 in the x87 control word.
11184 2018-04-03 Martin Liska <mliska@suse.cz>
11186 PR tree-optimization/82491
11187 * rtl.h (strip_offset_and_add): Replace += suboffset with
11188 poly_uint64 () + suboffset.
11190 2018-03-29 Martin Liska <mliska@suse.cz>
11191 Martin Jambor <mjambor@suse.cz>
11194 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11195 param_type is not an integral or pointer type.
11197 2018-04-03 Richard Biener <rguenther@suse.de>
11199 * sese.h (recompute_all_dominators): Remove.
11201 2018-04-02 Martin Sebor <msebor@redhat.com>
11203 * doc/invoke.texi (-Wrestrict): Fix typos.
11205 2018-04-02 Jim Wilson <jimw@sifive.com>
11207 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11208 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11209 (<optab>di3, <optab>si3_extend): Likewise.
11210 (<optab>si3_mask, <optab>si3_mask_1): New.
11211 (<optab>di3_mask, <optab>di3_mask_1): New.
11212 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11213 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11214 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11216 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
11218 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11221 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
11223 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11224 (nds32_canonicalize_comparison): New function.
11226 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11227 Kito Cheng <kito.cheng@gmail.com>
11228 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11230 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11231 * config/nds32/constants.md (unspec_volatile_element): Add
11232 UNSPEC_VOLATILE_RELAX_GROUP.
11233 * config/nds32/nds32-relax-opt.c: New file.
11234 * config/nds32/nds32-predicates.c
11235 (nds32_symbol_load_store_p): New function.
11236 * config/nds32/nds32-protos.h
11237 (nds32_symbol_load_store_p): Declare function.
11238 (make_pass_nds32_relax_opt): Declare new rtl pass function.
11239 * config/nds32/nds32.c
11240 (nds32_register_pass): New function to register pass.
11241 (nds32_register_passes): New function to register passes.
11242 * config/nds32/nds32.md (relax_group): New pattern.
11243 * config/nds32/nds32.opt (mrelax-hint): New option.
11244 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11246 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
11248 * config/nds32/t-nds32: Modify files dependency.
11250 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11252 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11253 (PROFILE_HOOK): Define its implementation.
11255 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11257 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11258 type and 32-bit size.
11260 2018-04-01 Jakub Jelinek <jakub@redhat.com>
11262 PR middle-end/85090
11263 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11264 (V_128_256): New mode iterator.
11265 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11266 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11267 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11269 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11270 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11272 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
11275 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11276 NaN inputs correctly.
11278 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
11281 * config/rs6000/vsx.md (??r): New mode attribute.
11282 (*vsx_mov<mode>_64bit): Use it.
11283 (*vsx_mov<mode>_32bit): Likewise.
11285 2018-03-30 Martin Sebor <msebor@redhat.com>
11287 PR tree-optimization/84818
11288 * builtins.c (check_access): Use warning_n.
11290 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11293 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11295 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11298 2018-03-30 Julia Koval <julia.koval@intel.com>
11301 * x86-tune.def (movx, partial_reg_dependency): Enable for
11304 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
11306 PR inline-asm/84985
11307 * lra-constraints.c (process_alt_operands): Move setting
11308 this_alternative_matches below.
11310 2018-03-29 Martin Liska <mliska@suse.cz>
11313 * doc/invoke.texi: Document how LTO works with debug info.
11314 Describe auto-load support of binutils. Mention 'x86-64'
11315 as valid option value of -march option.
11317 2018-03-29 Jakub Jelinek <jakub@redhat.com>
11319 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11322 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11323 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11324 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11327 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11330 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11331 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11332 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11333 for RS6000_BTM_POWERPC64.
11334 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11335 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11336 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11339 (DIVDEU): Likewise.
11341 2018-03-28 Carl Love <cel@us.ibm.com>
11344 2017-09-27 Carl Love <cel@us.ibm.com>
11346 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11347 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11348 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11351 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11353 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11354 instead of __vector bool.
11355 (_mm_max_pu8): Likewise.
11356 (_mm_min_pi16): Likewise.
11358 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11361 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11362 (DIVWEUO): Likewise.
11363 (DIVDEO): Likewise.
11364 (DIVDEUO): Likewise.
11365 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11366 DIVWEUO and DIVDEUO.
11367 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11368 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11369 (div_extend): Likewise.
11370 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11372 (__builtin_divweuo): Likewise.
11373 (__builtin_divdeo): Likewise.
11374 (__builtin_divdeuo): Likewise.
11376 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11379 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11380 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11382 PR tree-optimization/82004
11383 * gimple-match-head.c (optimize_pow_to_exp): New function.
11384 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11385 Don't fold to exp if optimize_pow_to_exp is false.
11387 2018-03-28 Martin Liska <mliska@suse.cz>
11390 * calls.c (initialize_argument_information): Fix trailing space.
11391 * common.opt: Fix typo and provide better explanation for
11392 -fsanitize-coverage option.
11393 * config/i386/i386.opt: Fix typo.
11395 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11396 Martin Liska <mliska@suse.cz>
11399 * gimplify.c (asan_poison_variable): Don't do the check for
11400 gimplify_omp_ctxp here.
11401 (gimplify_decl_expr): Do it here.
11402 (gimplify_target_expr): Likewise.
11404 2018-03-28 Martin Liska <mliska@suse.cz>
11407 * config/i386/i386.c (ix86_function_arg_advance): Do not call
11408 chkp_type_bounds_count if MPX is not enabled.
11410 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
11412 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11414 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
11417 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11418 function to create the function decl for complex long double
11419 multiply and divide for -mabi=ieeelongdouble.
11420 (init_float128_ieee): Call it.
11422 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
11425 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11426 -fcf-protection=branch -mibt.
11427 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11429 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11432 * config/arm/arm.c (arm_valid_symbolic_address): Handle
11433 arm_word_relocations.
11435 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
11438 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11439 extern array declarations.
11441 2018-03-27 Richard Biener <rguenther@suse.de>
11443 PR middle-end/84067
11444 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11445 explicit single_use checks.
11447 2018-03-27 Richard Biener <rguenther@suse.de>
11449 PR tree-optimization/85082
11450 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11453 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11455 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11456 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11457 Turn on fasynchronous-unwind-tables and funwind-tables.
11459 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
11462 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11463 (*bmi_blsr_<mode>_ccz): Ditto.
11465 2018-03-26 Tom de Vries <tom@codesourcery.com>
11467 PR tree-optimization/85063
11468 * omp-general.c (offloading_function_p): New function. Factor out
11470 * omp-offload.c (pass_omp_target_link::gate): ... here.
11471 * omp-general.h (offloading_function_p): Declare.
11472 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11473 with attribute omp declare target for offloading functions.
11475 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
11477 PR tree-optimization/84005
11478 * tree-data-ref.h (get_base_for_alignment): Declare.
11479 * tree-data-ref.c (get_base_for_alignment_1): New function.
11480 (get_base_for_alignment): Likewise.
11481 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11482 get_base_for_alignment to find a suitable base object, instead
11483 of always using drb->base_address.
11485 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11487 PR inline-asm/85022
11488 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11489 known size by default.
11491 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
11493 PR inline-asm/85030
11494 * lra-constraints.c (process_alt_operands): Don't match BLKmode
11495 and non BLKmode operands.
11497 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11500 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11501 Clean up attributes.
11503 2018-03-23 Richard Biener <rguenther@suse.de>
11506 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11507 we are going to emit early debug for LTO.
11509 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11511 PR inline-asm/85034
11512 * function.c (match_asm_constraints_1): Don't optimize if input
11513 doesn't satisfy general_operand predicate for output's mode.
11515 PR inline-asm/85022
11516 * alias.c (write_dependence_p): Don't require for x_canonicalized
11517 non-VOIDmode if x has VOIDmode.
11520 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11521 just don't try to optimize it rather than assert it never happens.
11523 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11525 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11526 macro expansions for definition of ST_INTERNAL_<mode> and
11527 LD_INTERNAL_<mode> builtins.
11528 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11530 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11532 (altivec_expand_st_builtin): Likewise.
11533 (altivec_expand_builtin): Remove calls to deleted functions.
11534 (rs6000_address_for_altivec): Delete this function.
11535 * config/rs6000/vector.md: Remove expands for
11536 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11538 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11541 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11542 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11543 re-computing once computed.
11544 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11545 (arm_init_machine_status): Initialize
11546 machine->static_chain_stack_bytes.
11548 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11551 * doc/extend.texi: Add four new prototypes for vec_ld.
11552 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11553 definitions for more logical presentation.
11554 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11555 entries for V1TI variants of __builtin_altivec_ld builtin.
11556 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11557 handling of V1TI variant of LVX icode pattern.
11558 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11559 (rs6000_gimple_fold_builtin): Likewise.
11560 (altivec_init_builtins): Add code to define
11561 __builtin_altivec_lvx_v1ti function.
11563 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11565 PR inline-asm/84941
11566 * function.c (match_asm_constraints_1): Don't do the optimization
11567 if input isn't a REG, SUBREG, MEM or constant.
11569 2018-03-22 Tom de Vries <tom@codesourcery.com>
11571 PR tree-optimization/84956
11572 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11573 bb_has_abnormal_pred.
11575 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11578 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11579 DECL_INITIAL (decl) to decl at the end.
11580 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11581 adjust the comment.
11583 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11585 * doc/extend.texi (__builtin_tgmath): Document when complex
11586 integer types are treated as _Complex _Float64.
11588 2018-03-21 Tom de Vries <tom@codesourcery.com>
11590 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11592 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11594 PR tree-optimization/84960
11595 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11596 if it is ENTRY block, move them into single succ of ENTRY in that case.
11598 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
11600 PR tree-optimization/84811
11601 * poly-int.h (poly_span_traits): Remove the T3 parameter and
11602 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11603 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11604 (known_subrange_p): Update accordingly. Cast each value involved
11605 in the size comparison, rather than casting the result of the
11608 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11610 PR tree-optimization/84982
11611 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11612 by flipping the least significant bit rather than all bits from
11613 bitpos to bitpos + bitsize - 1.
11615 2018-03-21 Nathan Sidwell <nathan@acm.org>
11617 * doc/extend.texi (Deprecated Features): Remove mention of
11618 long-deleted deprecations.
11620 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11623 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11624 * configure: Regenerate.
11626 2018-03-21 Tom de Vries <tom@codesourcery.com>
11628 PR tree-optimization/83126
11629 * tree-parloops.c (num_phis): New function.
11630 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11632 2018-03-21 Nathan Sidwell <nathan@acm.org>
11634 * doc/extend.texi (Deprecated Features): Update deprecated flags,
11635 mention anon-struct/union members and trailing attributes.
11637 2018-03-21 Bin Cheng <bin.cheng@arm.com>
11639 PR tree-optimization/84969
11640 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11641 builtin memset partitions if they set different rhs values.
11643 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11645 PR rtl-optimization/84989
11646 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11647 VEC_DUPLICATE with scalar result mode.
11649 2018-03-21 Martin Liska <mliska@suse.cz>
11652 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11653 not intended return statement.
11655 2018-03-21 Martin Liska <mliska@suse.cz>
11658 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11659 (chkp_find_bound_slots_1): Limit number of iterations.
11661 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
11664 * Minor grammar fixes for x86 options.
11666 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11669 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11670 holding REG_CFA_RESTORE notes, instead turn them into a USE.
11672 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
11675 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11676 (altivec_lvx_<mode>_1op): Likewise.
11677 (altivec_stvx_<mode>_2op): Likewise.
11678 (altivec_stvx_<mode>_1op): Likewise.
11679 (altivec_lvx_<VM2:mode>): New define_expand.
11680 (altivec_stvx_<VM2:mode>): Likewise.
11681 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11682 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11683 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11684 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11685 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11686 (rs6000_gen_lvx): Likewise.
11687 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11688 (altivec_expand_stv_builtin): Likewise.
11689 (altivec_expand_builtin): Likewise.
11690 * config/rs6000/vector.md: Likewise.
11692 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11695 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11698 2018-03-20 Richard Biener <rguenther@suse.de>
11701 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11702 sign-conversions as zero, fall back to standard scalar_stmt
11705 2018-03-20 Martin Liska <mliska@suse.cz>
11708 * predict.c (rebuild_frequencies): Handle case when we have
11709 PROFILE_ABSENT, but flag_guess_branch_prob is false.
11711 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11714 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11715 flag_section_anchors.
11716 * varasm.c (use_blocks_for_decl_p): Remove hack for
11717 dw2_force_const_mem.
11720 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11722 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
11723 be created, use lowpart_subreg of operands[0] rather than operands[0]
11725 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11726 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11727 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11728 and n constraint instead of aarch64_shift_imm_di and Usd.
11729 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11730 (*aarch64_<optab>_reg_minus<mode>3): ... this.
11732 2018-03-20 Sudakshina Das <sudi.das@arm.com>
11735 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11736 to favor GPR over NEON registers.
11737 (<shift>di3_neon): Likewise.
11739 2018-03-20 Tom de Vries <tom@codesourcery.com>
11742 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11743 (nvptx_process_pars): Emit bar.sync asap and alap.
11745 2018-03-20 Tom de Vries <tom@codesourcery.com>
11748 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11749 seen_label if seen_label is already set.
11751 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11754 * config/i386/i386.c (fold_builtin_cpu): For features above 31
11755 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11756 Use 1U instead of 1. Formatting fixes.
11759 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11760 instead of TREE_TYPE (s1) for the return value.
11762 2018-03-19 Jakub Jelinek <jakub@redhat.com>
11764 PR tree-optimization/84946
11765 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11766 bitsize + bitsize in poly_uint64 rather than poly_int64.
11769 * dwarf2asm.c: Include fold-const.c.
11770 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11771 of decl rather than decl itself.
11773 PR rtl-optimization/84643
11774 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11776 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
11779 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11780 calling assemble_variable.
11782 2018-03-19 Sudakshina Das <sudi.das@arm.com>
11785 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11786 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11788 2018-03-19 Jim Wilson <jimw@sifive.com>
11791 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11792 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11793 (riscv_first_stack_step): Likewise.
11794 (riscv_option_override): Use STACK_BOUNDARY instead of
11795 MIN_STACK_BOUNDARY.
11796 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11797 MIN_STACK_BOUNDARY.
11798 (BIGGEST_ALIGNMENT): Set to 128.
11799 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11800 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11803 2018-03-19 Richard Biener <rguenther@suse.de>
11805 PR tree-optimization/84933
11806 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11807 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11809 2018-03-19 Richard Biener <rguenther@suse.de>
11811 PR tree-optimization/84859
11812 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11813 (cond_if_else_store_replacement): Perform sinking operation on
11814 single-store BBs regardless of MAX_STORES_TO_SINK setting.
11815 Generalize what a BB with a single eligible store is.
11817 2018-03-19 Richard Biener <rguenther@suse.de>
11819 PR tree-optimization/84929
11820 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11821 chrec_is_positive against non-chrec arg.
11823 2018-03-19 Tamar Christina <tamar.christina@arm.com>
11826 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11828 2018-03-18 Martin Liska <mliska@suse.cz>
11830 PR rtl-optimization/84635
11831 * regrename.c (build_def_use): Use matches_mode only when
11834 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
11836 PR tree-optimization/84913
11837 * tree-vect-loop.c (vectorizable_reduction): Don't try to
11838 vectorize chains of COND_EXPRs.
11840 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11842 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11844 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11846 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11848 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11850 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11852 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11853 Kito Cheng <kito.cheng@gmail.com>
11855 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11856 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11857 (nds32_adjust_reg_alloc_order): New function.
11858 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11860 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
11862 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11863 nds32_print_operand, nds32_print_operand_address): Use
11864 HOST_WIDE_INT_PRINT_DEC instead.
11866 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11868 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11870 2018-03-17 Jakub Jelinek <jakub@redhat.com>
11873 * config/i386/i386.c (initial_ix86_tune_features,
11874 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11875 unsigned long long.
11876 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11877 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11878 rather than 1u << ix86_tune. Formatting fix.
11879 (ix86_option_override_internal): Change ix86_arch_mask from
11880 unsigned int to unsigned HOST_WIDE_INT, initialize to
11881 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11882 (ix86_function_specific_restore): Likewise.
11884 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11887 * postreload.c (reload_combine_recognize_pattern): Perform
11888 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11889 truncate_int_for_mode the result for the destination's mode.
11892 * hsa-gen.c (mem_type_for_type): Fix comment typo.
11893 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11895 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11898 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
11901 * lra-assigns.c (lra_split_hard_reg_for): Don't use
11902 regno_allocno_class_array and sorted_pseudos.
11903 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11904 insns where regno is used.
11906 2018-03-16 Martin Liska <mliska@suse.cz>
11909 * multiple_target.c (create_dispatcher_calls): Redirect
11910 reference in the symbol table.
11912 2018-03-16 Martin Liska <mliska@suse.cz>
11915 * multiple_target.c (create_dispatcher_calls): Redirect also
11918 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11922 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11923 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11924 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11926 2018-03-16 Julia Koval <julia.koval@intel.com>
11928 * doc/invoke.texi (Skylake Server): Add CLWB.
11929 Cannonlake): Remove CLWB.
11931 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11933 PR tree-optimization/84841
11934 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11936 (FLOAT_ONE_CONST_TYPE): Define.
11937 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11938 (sort_by_operand_rank): Put entries with higher constant_type last
11939 rather than first to match comments.
11941 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
11943 * config/nios2/nios2.md (movsi_internal): Fix thinko in
11946 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11949 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11950 check and use address of target always.
11952 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
11955 * config/i386/i386.c (indirect_thunk_needed): Update comments.
11956 (indirect_thunk_bnd_needed): Likewise.
11957 (indirect_thunks_used): Likewise.
11958 (indirect_thunks_bnd_used): Likewise.
11959 (indirect_return_needed): New.
11960 (indirect_return_bnd_needed): Likewise.
11961 (output_indirect_thunk_function): Add a bool argument for
11963 (output_indirect_thunk_function): Don't generate alias for
11964 function return thunk.
11965 (ix86_code_end): Call output_indirect_thunk_function to generate
11966 function return thunks.
11967 (ix86_output_function_return): Set indirect_return_bnd_needed
11968 and indirect_return_needed instead of indirect_thunk_bnd_needed
11969 and indirect_thunk_needed.
11971 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
11973 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11974 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11975 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11977 2018-03-15 David Malcolm <dmalcolm@redhat.com>
11978 Paul Hua <paul.hua.gm@gmail.com>
11981 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11983 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
11985 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11986 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11987 resp. SFmode cases.
11989 2018-03-15 Tamar Christina <tamar.christina@arm.com>
11992 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11993 instead of GET_MODE_SIZE when comparing Units.
11995 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11998 * varasm.c (hash_section): Return an unchangeble hash value
11999 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12000 Return !aarch64_can_use_per_function_literal_pools_p ().
12002 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12005 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12006 rather than address of cmode as last argument to prepare_cmp_insn.
12008 2018-03-15 Julia Koval <julia.koval@intel.com>
12010 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12011 F_AVX512VNNI, F_AVX512BITALG): New.
12013 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12016 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12017 insn for floating-point loads and stores.
12019 2018-03-14 Carl Love <cel@us.ibm.com>
12021 * config/rs6000/rs6000-c.c: Add macro definitions for
12022 ALTIVEC_BUILTIN_VEC_PERMXOR.
12023 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12024 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12025 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12026 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12028 * config/doc/extend.texi: Add prototypes for vec_permxor.
12030 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12033 * diagnostic-show-locus.c (class layout_point): Convert m_line
12034 from int to linenum_type.
12035 (line_span::comparator): Use linenum "compare" function when
12036 comparing line numbers.
12037 (test_line_span): New function.
12038 (layout_range::contains_point): Convert param "row" from int to
12040 (layout_range::intersects_line_p): Likewise.
12041 (layout::will_show_line_p): Likewise.
12042 (layout::print_source_line): Likewise.
12043 (layout::should_print_annotation_line_p): Likewise.
12044 (layout::print_annotation_line): Likewise.
12045 (layout::print_leading_fixits): Likewise.
12046 (layout::annotation_line_showed_range_p): Likewise.
12047 (struct line_corrections): Likewise for field m_row.
12048 (line_corrections::line_corrections): Likewise for param "row".
12049 (layout::print_trailing_fixits): Likewise.
12050 (layout::get_state_at_point): Likewise.
12051 (layout::get_x_bound_for_row): Likewise.
12052 (layout::print_line): Likewise.
12053 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12054 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12055 * input.c (selftest::test_linenum_comparisons): New function.
12056 (selftest::input_c_tests): Call it.
12057 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12058 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12059 * selftest.h (ASSERT_GT): New macro.
12060 (ASSERT_GT_AT): New macro.
12061 (ASSERT_LT): New macro.
12062 (ASSERT_LT_AT): New macro.
12064 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12066 PR rtl-optimization/84780
12067 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12069 2018-03-14 Martin Liska <mliska@suse.cz>
12071 * tree.c (record_node_allocation_statistics): Use
12072 get_stats_node_kind.
12073 (get_stats_node_kind): New function extracted from
12074 record_node_allocation_statistics.
12075 (free_node): Use get_stats_node_kind.
12077 2018-03-14 Richard Biener <rguenther@suse.de>
12079 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12080 that the value-set of ANTIC_IN doesn't grow.
12083 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12085 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12086 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12088 2018-03-14 Julia Koval <julia.koval@intel.com>
12090 * config.gcc (icelake-client, icelake-server): New.
12092 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12093 (initial_ix86_arch_features): Ditto.
12094 (PTA_SKYLAKE): Add SGX.
12095 (PTA_ICELAKE): Remove.
12096 (PTA_ICELAKE_CLIENT): New.
12097 (PTA_ICELAKE_SERVER): New.
12098 (ix86_option_override_internal): Split up icelake on icelake client and
12100 (get_builtin_code_for_version): Ditto.
12101 (fold_builtin_cpu): Ditto.
12102 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12103 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12104 * config/i386/i386.h (processor_type): Ditto.
12105 * doc/invoke.texi: Ditto.
12107 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12110 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12111 INTEGER_CST offset, add it together with bitpos / 8 and
12112 sign extend based on POINTER_SIZE.
12116 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12119 * config/i386/constraints.md (Yc): New register constraint.
12120 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12121 Use Yc constraint for alternative 2 of operand 0. Remove
12122 preferred_for_speed attribute.
12124 2018-03-14 Richard Biener <rguenther@suse.de>
12126 PR tree-optimization/84830
12127 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12128 with the old one to avoid oscillations.
12130 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
12133 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12135 (assign_by_spills): Return a flag of reload assignment failure.
12136 Do not process the reload assignment failures. Do not spill other
12137 reload pseudos if they has the same reg class. Update n if
12139 (lra_assign): Add a return arg. Set up from the result of
12140 assign_by_spills call.
12141 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12142 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12143 usage_insns if it is not NULL.
12144 (spill_hard_reg_in_range): New function.
12145 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12146 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12147 function prototypes.
12148 (lra_assign): Change prototype.
12149 * lra.c (lra): Add code to deal with fails by splitting hard reg
12152 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
12154 * config/riscv/riscv.opt (mrelax): New option.
12155 * config/riscv/riscv.c (riscv_file_start): Emit ".option
12156 "norelax" when riscv_mrelax is disabled.
12157 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12159 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12162 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12163 reassociation for int modes.
12165 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12167 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12168 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12170 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12171 * config/aarch64/aarch64-sve.md
12172 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12173 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12174 (*extend<mode><Vwide>2): Rename to...
12175 (aarch64_sve_extend<mode><Vwide>2): ...this.
12176 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12177 renaming the old pattern to...
12178 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
12180 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12181 define_expand, renaming the old pattern to...
12182 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12183 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12184 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12185 account when deciding which SVE instruction the optab should use.
12186 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12188 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12190 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12191 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12192 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12193 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12194 (tlsdesc_small_<mode>): Turn a define_expand and use
12195 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
12196 (tlsdesc_small_advsimd_<mode>): ...this.
12197 (tlsdesc_small_sve_<mode>): New pattern.
12199 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12201 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12202 (UNSPEC_UMUL_HIGHPART): New constants.
12203 (MUL_HIGHPART): New int iteraor.
12204 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12205 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12207 (*<su>mul<mode>3_highpart): New define_insn.
12209 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12212 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12215 2018-03-13 Martin Liska <mliska@suse.cz>
12218 * (sem_item_optimizer::sem_item_optimizer): Initialize new
12220 (sem_item_optimizer::~sem_item_optimizer): Release it.
12221 (sem_item_optimizer::merge_classes): Register variable aliases.
12222 (sem_item_optimizer::fixup_pt_set): New function.
12223 (sem_item_optimizer::fixup_points_to_sets): Likewise.
12224 * ipa-icf.h: Declare new variables and functions.
12226 2018-03-13 Jakub Jelinek <jakub@redhat.com>
12228 PR middle-end/84834
12229 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12230 integer_pow2p@2 and test integer_pow2p in condition.
12231 (A < 0 ? C : 0): Similarly for @1.
12233 PR middle-end/84831
12234 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12235 characters starting at p contain '\0' character, don't look beyond
12239 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12240 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12243 * reg-stack.c (change_stack): Change update_end var from int to
12244 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12245 also call set_block_for_insn on the newly added insns and rescan.
12248 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12249 on the last operand.
12252 * tree.c (stabilize_reference_1): Return save_expr (e) for
12253 STATEMENT_LIST even if it doesn't have side-effects.
12255 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
12257 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12259 2018-03-12 Renlin Li <renlin.li@arm.com>
12261 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12262 aarch64_output_scalar_simd_mov_immediate.
12264 2018-03-12 Martin Sebor <msebor@redhat.com>
12266 PR tree-optimization/83456
12267 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12268 for perfectly overlapping calls to memcpy.
12269 (gimple_fold_builtin_memory_chk): Same.
12270 (gimple_fold_builtin_strcpy): Handle no-warning.
12271 (gimple_fold_builtin_stxcpy_chk): Same.
12272 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12274 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12276 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12277 parameter. Use it for SFmode.
12278 (rs6000_function_arg_advance_1): Adjust.
12279 (rs6000_function_arg): Adjust.
12280 (rs6000_gimplify_va_arg): Pass false for that new parameter.
12282 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12284 PR rtl-optimization/84169
12285 PR rtl-optimization/84780
12286 * combine.c (can_combine_p): Check for a 2-insn combination whether
12287 the destination register is used between the two insns, too.
12289 2018-03-12 Richard Biener <rguenther@suse.de>
12291 PR tree-optimization/84803
12292 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12293 for refs DR analysis didn't process.
12295 2018-03-12 Richard Biener <rguenther@suse.de>
12297 PR tree-optimization/84777
12298 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12299 force-vectorize loops ignore whether we are optimizing for size.
12301 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
12303 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12304 (TARGET_MD_ASM_ADJUST): Define.
12306 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
12307 Kito Cheng <kito.cheng@gmail.com>
12308 Chung-Ju Wu <jasonwucj@gmail.com>
12310 * config/nds32/nds32.c (nds32_compute_stack_frame,
12311 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12312 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12313 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12314 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12315 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12316 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12317 * config/nds32/nds32.md (prologue, epilogue): Use macro
12318 NDS32_V3PUSH_AVAILABLE_P to do checking.
12320 2018-03-11 Jakub Jelinek <jakub@redhat.com>
12323 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12324 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12325 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
12326 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
12327 addition of most attributes on !orig_type_die or the attribute not
12328 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12330 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12331 Chung-Ju Wu <jasonwucj@gmail.com>
12333 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12334 __NDS32_VH__ macro.
12335 * config/nds32/nds32.opt (mvh): New option.
12337 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12338 Chung-Ju Wu <jasonwucj@gmail.com>
12340 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12342 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12343 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12346 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12347 Chung-Ju Wu <jasonwucj@gmail.com>
12349 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12351 * config/nds32/nds32-multiple.md (strlensi): New pattern.
12352 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12354 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
12355 Kito Cheng <kito.cheng@gmail.com>
12356 Chung-Ju Wu <jasonwucj@gmail.com>
12358 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12359 UNSPEC_FFMISM and UNSPEC_FLMISM.
12360 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12361 for ffb, ffmism and flmism.
12362 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12363 (unspec_ffmism): Ditto.
12364 (unspec_flmism): Ditto.
12365 (nds32_expand_builtin_impl): Check if string extension is available.
12366 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12367 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12369 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12372 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12375 * lra-assigns.c (assign_by_spills): Return a flag of reload
12376 assignment failure. Do not process the reload assignment
12377 failures. Do not spill other reload pseudos if they has the same
12379 (lra_assign): Add a return arg. Set up from the result of
12380 assign_by_spills call.
12381 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12382 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12383 usage_insns if it is not NULL.
12384 (spill_hard_reg_in_range): New function.
12385 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12386 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12387 function prototypes.
12388 (lra_assign): Change prototype.
12389 * lra.c (lra): Add code to deal with fails by splitting hard reg
12392 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
12395 * config/i386/i386.opt: Replace Enforcment with Enforcement.
12397 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
12400 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12401 (dw_val_node): Add val_symbolic_view.
12402 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12403 (symview_upper_bound): New.
12404 (new_line_info_table): Initialize symviews_since_reset.
12405 (dwarf2out_source_line): Count symviews_since_reset and set
12406 symview_upper_bound.
12407 (dw_val_equal_p): Handle symview.
12408 (add_AT_symview): New.
12409 (print_dw_val): Handle symview.
12410 (attr_checksum, attr_checksum_ordered): Likewise.
12411 (same_dw_val_p, size_of_die): Likewise.
12412 (value_format, output_die): Likewise.
12413 (add_high_low_attributes): Use add_AT_symview for entry_view.
12414 (dwarf2out_finish): Reset symview_upper_bound, clear
12417 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
12420 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12421 Add strict argument and use it.
12422 (rs6000_split_multireg_move): Update for new strict argument.
12423 (mem_operand_gpr): Disallow all non-offsettable addresses.
12424 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12426 2018-03-09 Jakub Jelinek <jakub@redhat.com>
12429 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12430 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12431 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12434 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12435 decl, use remap_type if we want to use the type.
12437 2018-03-09 Martin Sebor <msebor@redhat.com>
12439 PR tree-optimization/84526
12440 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12442 (builtin_access::generic_overlap): Be prepared to handle non-array
12445 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
12447 PR rtl-optimization/84682
12448 * lra-constraints.c (process_address_1): Check is_address flag
12449 for address constraints.
12450 (process_alt_operands): Likewise.
12451 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12452 preprocess_constraints.
12453 * recog.h (preprocess_constraints): Add oploc parameter.
12455 * recog.c (preprocess_constraints): Test address_operand for
12456 CT_ADDRESS constraints.
12458 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12461 * lra-assigns.c (assign_by_spills): Return a flag of reload
12462 assignment failure. Do not process the reload assignment
12463 failures. Do not spill other reload pseudos if they has the same
12465 (lra_assign): Add a return arg. Set up from the result of
12466 assign_by_spills call.
12467 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12468 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12469 usage_insns if it is not NULL.
12470 (spill_hard_reg_in_range): New function.
12471 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12472 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12473 function prototypes.
12474 (lra_assign): Change prototype.
12475 * lra.c (lra): Add code to deal with fails by splitting hard reg
12478 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12481 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12482 Accept complain bool parameter. Only emit errors if it is true.
12483 (arm_parse_cpu_option_name): Likewise.
12484 (arm_target_thumb_only): Adjust callers of the above.
12485 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12486 prototype to take a default true bool parameter.
12487 (arm_parse_arch_option_name): Likewise.
12489 2018-03-09 David Malcolm <dmalcolm@redhat.com>
12490 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12494 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12495 * configure: Regenerate.
12496 * configure.ac ("linker --version-script option"): New.
12497 ("linker soname option"): New.
12499 2018-03-09 Richard Biener <rguenther@suse.de>
12501 PR tree-optimization/84775
12502 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12503 immediate uses of predicate stmts and mark them modified.
12506 PR tree-optimization/84178
12507 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12509 (version_loop_for_if_conversion): Delay update_ssa call.
12510 (tree_if_conversion): Delay update_ssa until after predicate
12513 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
12516 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12517 when the function accesses prior frames.
12519 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12522 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12523 gen_llsym, otherwise call maybe_gen_llsym.
12525 PR inline-asm/84742
12526 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12527 has ',' character inside of it.
12529 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12532 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12533 as clobbering CC_REGNUM.
12535 2018-03-08 Richard Biener <rguenther@suse.de>
12537 PR middle-end/84552
12538 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12539 (follow_copies_to_constant): Do not follow SSA names registered
12542 2018-03-08 Richard Biener <rguenther@suse.de>
12544 PR tree-optimization/84178
12545 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12547 (version_loop_for_if_conversion): Delay update_ssa call.
12548 (tree_if_conversion): Delay update_ssa until after predicate
12551 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12553 PR tree-optimization/84178
12554 * tree-if-conv.c (release_bb_predicate): Remove the
12555 the assertion that the stmts have NULL use_ops.
12556 Discard the statements, asserting that they haven't
12557 yet been added to a BB.
12559 2018-03-08 Richard Biener <rguenther@suse.de>
12561 PR tree-optimization/84746
12562 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12563 (phi_translate): Pass in destination ANTIC_OUT set.
12564 (phi_translate_1): Likewise. For a simplified result lookup
12565 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12566 (phi_translate_set): Adjust.
12567 (do_pre_regular_insertion): Likewise.
12568 (do_pre_partial_partial_insertion): Likewise.
12570 2018-03-08 Martin Liska <mliska@suse.cz>
12572 PR gcov-profile/84735
12573 * doc/gcov.texi: Document usage of profile files.
12574 * gcov-io.h: Document changes in the format.
12576 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12580 * dwarf2out.c (struct dw_line_info_table): Update comments for
12582 (FORCE_RESET_NEXT_VIEW): New.
12583 (FORCE_RESETTING_VIEW_P): New.
12584 (RESETTING_VIEW_P): Check for -1 too.
12585 (ZERO_VIEW_P): Likewise.
12586 (new_line_info_table): Force-reset next view.
12587 (dwarf2out_begin_function): Likewise.
12588 (dwarf2out_source_line): Simplify zero_view_p initialization.
12589 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12590 view directly. Omit view when omitting .loc at line 0.
12592 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12594 PR tree-optimization/84740
12595 * tree-switch-conversion.c (process_switch): Call build_constructors
12596 only if info.phi_count is non-zero.
12598 PR tree-optimization/84739
12599 * tree-tailcall.c (find_tail_calls): Check call arguments against
12600 DECL_ARGUMENTS (current_function_decl) rather than
12601 DECL_ARGUMENTS (func) when checking for tail recursion.
12603 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12605 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12606 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12607 Volker Reichelt's entry and add entries for people that perform
12608 GCC fuzzy testing and report numerous bugs.
12610 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
12613 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12614 readonly data in sdata, if that is disabled.
12615 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12616 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12617 -mreadonly-in-sdata option.
12619 2018-03-07 Martin Sebor <msebor@redhat.com>
12621 PR tree-optimization/84468
12622 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12623 basic block when looking for nul assignment.
12625 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
12628 * except.h (output_function_exception_table): Adjust prototype.
12629 * except.c (output_function_exception_table): Remove FNNAME parameter
12630 and add SECTION parameter. Ouput one part of the table at a time.
12631 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12632 the first part of the exception table and emit unwind directives.
12633 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12634 (i386_pe_seh_cold_init): Likewise.
12635 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12636 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12637 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12638 (ix86_output_call_insn): Emit a nop in one more case for SEH.
12639 * config/i386/winnt.c: Include except.h.
12640 (struct seh_frame_state): Add reg_offset, after_prologue and
12641 in_cold_section fields.
12642 (i386_pe_seh_end_prologue): Set seh->after_prologue.
12643 (i386_pe_seh_cold_init): New function.
12644 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12645 to seh->in_cold_section.
12646 (seh_emit_push): Record the offset of the push.
12647 (seh_emit_save): Record the offet of the save.
12648 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12649 Test seh->after_prologue to disregard the epilogue.
12650 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12651 (i386_pe_end_cold_function): New function.
12653 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12656 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12657 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12660 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12662 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12663 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12665 PR middle-end/84723
12666 * multiple_target.c: Include tree-inline.h and intl.h.
12667 (expand_target_clones): Diagnose and fail if node->definition and
12668 !tree_versionable_function_p (node->decl).
12670 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
12672 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12674 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12675 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12676 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12678 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12681 * combine.c (try_combine): Use reg_or_subregno instead of handling
12682 just paradoxical SUBREGs and REGs.
12684 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
12686 * config/arc/arc.c (arc_finalize_pic): Remove function.
12687 (arc_must_save_register): We use single base PIC register, remove
12688 checks to save/restore the PIC register.
12689 (arc_expand_prologue): Likewise.
12690 * config/arc/arc-protos.h (arc_set_default_type_attributes):
12692 (arc_verify_short): Likewise.
12693 (arc_attr_type): Likewise.
12694 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12695 (walk_stores): Likewise.
12696 (arc_address_cost): Make it static.
12697 (arc_verify_short): Likewise.
12698 (branch_dest): Likewise.
12699 (arc_attr_type): Likewise.
12700 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12701 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12702 (arc_final_prescan_insn): Remove inserting the nops due to
12703 hardware hazards. It is done in reorg step.
12704 (insn_length_variant_t): Remove.
12705 (insn_length_parameters_t): Likewise.
12706 (arc_insn_length_parameters): Likewise.
12707 (arc_get_insn_variants): Likewise.
12708 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12710 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12712 PR inline-asm/84683
12713 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12716 PR tree-optimization/84687
12717 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12719 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12721 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12723 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12724 Rename to ppc_speculation_barrier.
12725 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12726 __builtin_ppc_speculation_barrier.
12728 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12731 * combine.c (combine_simplify_rtx): Don't try to simplify if
12732 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12735 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
12737 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12738 to 32 bytes when compiling for POWER9.
12740 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12743 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12744 regparm >= 3 with no arg reg available also for calls with
12745 flag_force_indirect_call. Pass decl to ix86_function_regparm.
12748 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12750 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
12752 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
12755 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12757 2018-03-05 Richard Biener <rguenther@suse.de>
12759 PR tree-optimization/84486
12760 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12761 When inserting a __builtin_assume_aligned call set the LHS
12762 SSA name alignment info accordingly.
12764 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
12766 PR tree-optimization/84114
12767 * config/aarch64/aarch64.c (aarch64_reassociation_width)
12768 Avoid reassociation of FLOAT_MODE addition.
12770 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
12772 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12773 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12774 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12775 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12776 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12777 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12778 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12780 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12781 __builtin_ia32_wbinvd): New builtins.
12782 (SPECIAL_ARGS2): New.
12783 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12784 (SPECIAL_ARGS2): New.
12785 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12786 (ix86_valid_target_attribute_inner_p): Ditto.
12787 (ix86_init_mmx_sse_builtins): Add special_args2.
12788 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12789 TARGET_WBNOINVD_P): New.
12790 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12791 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12792 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12793 * config/i386/immintrin.h (_wbinvd): New intrinsic.
12794 * config/i386/pconfigintrin.h: New file.
12795 * config/i386/wbnoinvdintrin.h: Ditto.
12796 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12798 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12800 2018-03-05 Richard Biener <rguenther@suse.de>
12802 PR tree-optimization/84670
12803 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12805 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12806 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12807 (compute_antic_aux): Only assert the number of values in ANTIC_IN
12808 doesn't grow if all successors (recursively) were visited at least
12811 2018-03-05 Richard Biener <rguenther@suse.de>
12813 PR tree-optimization/84650
12814 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12815 if executed in the loop pipeline.
12817 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
12819 * doc/configfiles.texi (Configuration Files): Move info about
12820 conditionalizing $target-protos.h to...
12821 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
12822 differs from $target-protos.h.
12824 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
12825 Chung-Ju Wu <jasonwucj@gmail.com>
12827 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12828 * config/nds32/nds32-multiple.md (setmemsi): Define.
12829 * config/nds32/nds32-memory-manipulation.c
12830 (nds32_gen_dup_4_byte_to_word_value): New.
12831 (emit_setmem_word_loop): New.
12832 (emit_setmem_byte_loop): New.
12833 (nds32_expand_setmem_loop): New.
12834 (nds32_expand_setmem_loop_v3m): New.
12835 (nds32_expand_setmem_unroll): New.
12836 (nds32_expand_setmem): New.
12838 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12839 Chung-Ju Wu <jasonwucj@gmail.com>
12841 * config/nds32/nds32-memory-manipulation.c
12842 (nds32_emit_load_store): New.
12843 (nds32_emit_post_inc_load_store): New.
12844 (nds32_emit_mem_move): New.
12845 (nds32_emit_mem_move_block): New.
12846 (nds32_expand_movmemsi_loop_unknown_size): New.
12847 (nds32_expand_movmemsi_loop_known_size): New.
12848 (nds32_expand_movmemsi_loop): New.
12849 (nds32_expand_movmemsi_unroll): New.
12850 (nds32_expand_movmemqi): Rename ...
12851 (nds32_expand_movmemsi): ... to this.
12852 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12853 (movmemsi): ... to this.
12854 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12855 (nds32_expand_movmemsi): ... to this.
12857 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12858 Monk Chiang <sh.chiang04@gmail.com>
12859 Chung-Ju Wu <jasonwucj@gmail.com>
12861 * config/nds32/nds32-protos.h
12862 (nds32_expand_load_multiple): New arguments.
12863 (nds32_expand_store_multiple): Ditto.
12864 (nds32_valid_multiple_load_store): Rename ...
12865 (nds32_valid_multiple_load_store_p): ... to this.
12866 * config/nds32/nds32-memory-manipulation.c
12867 (nds32_expand_load_multiple): Refine implementation.
12868 (nds32_expand_store_multiple): Ditto.
12869 * config/nds32/nds32-multiple.md
12870 (load_multiple): Update nds32_expand_load_multiple interface.
12871 (store_multiple): Update nds32_expand_store_multiple interface.
12872 * config/nds32/nds32-predicates.c
12873 (nds32_valid_multiple_load_store): Rename ...
12874 (nds32_valid_multiple_load_store_p): ... to this and refine
12876 * config/nds32/predicates.md
12877 (nds32_load_multiple_and_update_address_operation): New predicate.
12878 (nds32_store_multiple_and_update_address_operation): New predicate.
12880 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12881 Chung-Ju Wu <jasonwucj@gmail.com>
12883 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12884 (combo): New attribute.
12885 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12887 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
12889 * config/nds32/nds32.opt: Change -mcmodel= default value.
12891 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
12892 Monk Chiang <sh.chiang04@gmail.com>
12893 Chung-Ju Wu <jasonwucj@gmail.com>
12895 * config/nds32/constants.md (unspec_element): New enum.
12896 * config/nds32/constraints.md (Umw): New constraint.
12897 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12898 * config/nds32/nds32-intrinsic.md: Likewise.
12899 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12900 (nds32_valid_smw_lwm_base_p): New.
12901 (nds32_output_smw_single_word): New.
12902 (nds32_output_lmw_single_word): New.
12903 (nds32_expand_unaligned_load): New.
12904 (nds32_expand_unaligned_store): New.
12905 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12906 (nds32_output_smw_single_word): Declare.
12907 (nds32_output_lmw_single_word): Declare.
12908 (nds32_expand_unaligned_load): Declare.
12909 (nds32_expand_unaligned_store): Declare.
12910 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12911 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12912 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12913 NDS32_BUILTIN_UASTORE_DW.
12914 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12917 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
12918 Kito Cheng <kito.cheng@gmail.com>
12919 Chung-Ju Wu <jasonwucj@gmail.com>
12921 * config/nds32/nds32-intrinsic.c
12922 (nds32_expand_builtin_null_ftype_reg): Delete.
12923 (nds32_expand_builtin_reg_ftype_imm): Ditto.
12924 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12925 (nds32_read_argument): New.
12926 (nds32_legitimize_target): Ditto.
12927 (nds32_legitimize_argument): Ditto.
12928 (nds32_check_constant_argument): Ditto.
12929 (nds32_expand_unop_builtin): Ditto.
12930 (nds32_expand_unopimm_builtin): Ditto.
12931 (nds32_expand_binop_builtin): Ditto.
12932 (nds32_builtin_decl_impl): Ditto.
12933 (builtin_description): Ditto.
12934 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12935 (nds32_init_builtins_impl): Ditto.
12936 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12937 (nds32_builtin_decl): New.
12938 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12939 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12941 2018-03-02 Jeff Law <law@redhat.com>
12943 * reorg.c (stop_search_p): Handle DEBUG_INSN.
12944 (redundant_insn, fill_simple_delay_slots): Likewise.
12945 (fill_slots_from_thread): Likewise.
12946 * resource.c (mark_referenced_resources): Likewise.
12947 (mark_set_resources, find_dead_or_set_registers): Likewise.
12949 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12951 * substring-locations.h (format_warning_va): Formatting fix for
12952 ATTRIBUTE_GCC_DIAG.
12953 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12955 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12956 * substring-locations.c: Include intl.h.
12957 (format_warning_va): Turned into small wrapper around
12958 format_warning_n_va, renamed to ...
12959 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12960 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12962 (format_warning_at_substring_n): New function.
12963 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12964 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
12965 format_warning_at_substring with just a shorter name instead of
12966 const function pointer.
12967 (fmtwarn_n): New function.
12968 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12969 appropriate, get rid of all the fmtstr temporaries, move conditionals
12970 with G_() wrapped string literals directly into fmtwarn arguments,
12971 cast dir.len to (int), formatting fixes.
12973 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
12975 * doc/invoke.texi: Remove "Cilk Plus" references.
12977 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12978 Richard Biener <rguenther@suse.de>
12981 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12982 for error or warning attributes if CALL_FROM_THUNK_P is set.
12985 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12988 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12989 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12992 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12993 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12995 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12996 instead of -1U in last predictors element's probability member.
12998 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13001 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13002 arguments if they are comparable.
13004 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13006 PR tree-optimization/84634
13007 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13008 masks and masked_loop_p with a single loop_masks, making sure it's
13009 null for bb vectorization.
13011 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13013 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13014 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13015 loop->force_vectorize to check whether there is no alias.
13017 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13020 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13022 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13024 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13025 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13026 instead of a loop around prev_real_insn.
13027 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13030 PR inline-asm/84625
13031 * config/i386/i386.c (ix86_print_operand): Use conditional
13032 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13035 2018-03-02 Richard Biener <rguenther@suse.de>
13037 PR tree-optimization/84427
13038 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13039 (bitmap_set_subtract_values): Rewrite to handle multiple
13042 (prune_clobbered_mems): Likewise.
13043 (phi_translate): Take edge instead of pred/phiblock.
13044 (phi_translate_1): Likewise.
13045 (phi_translate_set): Likewise. Insert all translated
13046 exprs for a value into the set, keeping possibly multiple
13047 expressions per value.
13048 (compute_antic_aux): Adjust for phi_translate changes.
13049 When intersecting union the expressions and prune those
13050 not in the final value set, keeping possibly multiple
13051 expressions per value. Do not use value-insertion
13052 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13053 all expressions. Add verification that the value-sets
13054 only shrink during iteration.
13055 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13056 (do_pre_regular_insertion): Likewise.
13057 (do_pre_partial_partial_insertion): Likewise.
13059 2018-03-02 Richard Biener <rguenther@suse.de>
13062 * config/darwin.c (saved_debug_info_level): New static global.
13063 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13064 (darwin_asm_lto_end): Restore debug info generation settings.
13066 2018-03-01 Martin Liska <mliska@suse.cz>
13069 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13070 volatile arguments.
13072 2018-03-01 Richard Biener <rguenther@suse.de>
13075 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13076 type annotation with LTO when debug was disabled at compile-time.
13078 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13080 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13082 (mips_final_postscan_insn): Likewise.
13084 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13086 PR rtl-optimization/84528
13087 * alias.c (init_alias_target): Add commentary.
13088 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13089 a unique base value if the frame pointer is not eliminated
13090 to the stack pointer.
13092 2018-03-01 Tom de Vries <tom@codesourcery.com>
13094 PR rtl-optimization/83327
13095 * lra-int.h (hard_regs_spilled_into): Declare.
13096 * lra.c (hard_regs_spilled_into): Define.
13097 (init_reg_info): Init hard_regs_spilled_into.
13098 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13099 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13100 (process_bb_lives): Handle hard_regs_spilled_into.
13101 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13102 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13104 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13106 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13107 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13108 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13109 * config/rs6000/aix72.h: New file.
13111 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13113 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13114 instead of warning_at with conditional singular and plural messages
13118 * stor-layout.c (update_alignment_for_field): For
13119 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13120 && !DECL_PACKED (field), do the alignment update, just use
13121 only desired_align instead of MAX (type_align, desired_align)
13123 (place_field): Don't do known_align < desired_align handling
13124 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13125 is non-NULL, instead do it after rli->prev_field handling and
13126 only if not within a bitfield word. For DECL_PACKED (field)
13127 use type_align of BITS_PER_UNIT.
13129 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
13131 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13132 superfluous parentheses and trailing spaces.
13134 2018-02-28 Richard Biener <rguenther@suse.de>
13136 PR tree-optimization/84584
13137 * graphite-scop-detection.c (scop_detection::add_scop): Discard
13138 SCoPs with fake exit edge.
13140 2018-02-28 Martin Liska <mliska@suse.cz>
13143 * timevar.c (timer::print): Fix format to properly print 100%
13146 2018-02-28 Richard Biener <rguenther@suse.de>
13148 PR middle-end/84607
13149 * genmatch.c (capture_info::walk_match): Do not mark
13150 captured expressions without operands as expr_p given
13151 they act more like predicates and should be subject to
13152 "lost tail" side-effect preserving.
13154 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
13156 PR rtl-optimization/81611
13157 * auto-inc-dec.c (attempt_change): Move dead note from
13158 mem_insn if it's the next use of regno
13159 (find_address): Take address use of reg holding
13160 non-incremented value. Add parm to limit search to the named
13162 (merge_in_block): Attempt to use a mem insn that is the next
13163 use of the original regno.
13165 2018-02-27 Martin Sebor <msebor@redhat.com>
13168 * doc/invoke.texi (-Wmissing-attributes): New option.
13169 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13171 2018-02-27 Martin Sebor <msebor@redhat.com>
13173 PR translation/84207
13174 * diagnostic-core.h (warning_n, error_n, inform_n): Change
13175 n argument to unsigned HOST_WIDE_INT.
13176 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13177 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
13178 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13179 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13181 2018-02-27 Richard Biener <rguenther@suse.de>
13183 PR tree-optimization/84512
13184 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13185 Do not use the estimate returned from record_stmt_cost for
13186 the scalar iteration cost but sum properly using add_stmt_cost.
13188 2018-02-27 Richard Biener <rguenther@suse.de>
13190 PR tree-optimization/84466
13191 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13192 Adjust last change to less strictly validate use operands.
13194 2018-02-27 Martin Liska <mliska@suse.cz>
13196 PR gcov-profile/84548
13197 * gcov.c (process_file): Allow partial overlap and consider it
13198 also as group functions.
13199 (output_lines): Properly calculate range of lines for a group.
13201 2018-02-27 Martin Liska <mliska@suse.cz>
13203 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13204 'ggc' suffixes. Change first column width.
13205 (timer::print): Fix formatting of the column.
13207 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
13209 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13210 preserve inline entry blocks for the sake of debug inline
13211 entry point markers alone.
13212 (remove_unused_locals): Suggest in comments a better place to
13213 force the preservation of inline entry blocks that are
13214 otherwise unused, but do not preserve them.
13216 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13218 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13220 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13223 * config/i386/constraints.md (Bs): Replace
13224 ix86_indirect_branch_register with
13225 TARGET_INDIRECT_BRANCH_REGISTER.
13227 * config/i386/i386.md (indirect_jump): Likewise.
13228 (tablejump): Likewise.
13229 (*sibcall_memory): Likewise.
13230 (*sibcall_value_memory): Likewise.
13231 Peepholes of indirect call and jump via memory: Likewise.
13232 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13233 (*sibcall_value_GOT_32): Likewise.
13234 * config/i386/predicates.md (indirect_branch_operand): Likewise.
13235 (GOT_memory_operand): Likewise.
13236 (call_insn_operand): Likewise.
13237 (sibcall_insn_operand): Likewise.
13238 (GOT32_symbol_operand): Likewise.
13239 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13241 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13243 PR rtl-optimization/83496
13244 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13245 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
13246 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13247 redundant insn, if any.
13248 (relax_delay_slots): Likewise.
13249 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13251 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
13253 PR tree-optimization/83965
13254 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13255 that grouped statements are part of a reduction chain. Return
13256 true if the statement is not marked as a reduction itself but
13257 is part of a group.
13258 (vect_recog_dot_prod_pattern): Don't check whether the statement
13259 is part of a group here.
13260 (vect_recog_sad_pattern): Likewise.
13261 (vect_recog_widen_sum_pattern): Likewise.
13263 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13266 * final.c (rest_of_clean_state): Also look for calls inside sequences.
13268 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13271 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13273 (ix86_output_indirect_function_return): New prototype.
13274 (ix86_split_simple_return_pop_internal): Likewise.
13275 * config/i386/i386.c (indirect_return_via_cx): New.
13276 (indirect_return_via_cx_bnd): Likewise.
13277 (indirect_thunk_name): Handle return va CX_REG.
13278 (output_indirect_thunk_function): Create alias for
13279 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13280 (ix86_output_indirect_jmp): Remove the bool argument.
13281 (ix86_output_indirect_function_return): New function.
13282 (ix86_split_simple_return_pop_internal): Likewise.
13283 * config/i386/i386.md (*indirect_jump): Don't pass false
13284 to ix86_output_indirect_jmp.
13285 (*tablejump_1): Likewise.
13286 (simple_return_pop_internal): Change it to define_insn_and_split.
13287 Call ix86_split_simple_return_pop_internal to split it for
13288 -mfunction-return=.
13289 (simple_return_indirect_internal): Call
13290 ix86_output_indirect_function_return instead of
13291 ix86_output_indirect_jmp.
13293 2018-02-26 Jakub Jelinek <jakub@redhat.com>
13296 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13297 memset and value initialization afterwards.
13299 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
13301 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13303 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13306 * common/config/aarch64/aarch64-common.c
13307 (aarch_option_optimization_table[]): Switch
13308 off fomit-frame-pointer
13310 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13311 Chung-Ju Wu <jasonwucj@gmail.com>
13313 * config/nds32/nds32-multiple.md (load_multiple): Disallow
13315 (store_multiple): Ditto.
13317 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13319 * config.gcc: Add --with-cpu support for nds32 target.
13320 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13321 * config/nds32/nds32.opt: Add -mcpu= option.
13323 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
13325 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13326 isel=yes): Warn for these deprecated options.
13328 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
13330 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13331 ISA_2_5_MASKS_EMBEDDED.
13333 2018-02-23 Jakub Jelinek <jakub@redhat.com>
13335 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13336 p->max as pointers rather than using iterative_hash_expr.
13338 2018-02-23 Carl Love <cel@us.ibm.com>
13340 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13341 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13343 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13344 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13345 P8V_BUILTIN_VEC_VUNSIGNED2.
13347 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
13350 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13351 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13353 * lra-constraints.c (curr_insn_transform): Set up
13354 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
13356 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13357 * lra-eliminations.c (spill_pseudos): Ditto.
13358 (process_insn_for_elimination): Ditto.
13359 * lra-lives.c (reg_early_clobber_p): Use the new macros.
13360 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13361 LRA_NON_CLOBBERED_ALT.
13363 2018-02-22 Martin Sebor <msebor@redhat.com>
13365 PR tree-optimization/84480
13366 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13367 to maybe_diag_stxncpy_trunc. Call it.
13368 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13369 from gimple_fold_builtin_strcpy. Print inlining stack.
13370 (handle_builtin_stxncpy): Print inlining stack.
13371 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13373 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13376 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13377 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13378 and -fcheck-pointer-bounds are used together.
13379 (indirect_thunk_prefix): New enum.
13380 (indirect_thunk_need_prefix): New function.
13381 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
13382 "_nt" instead of "_bnd" for NOTRACK prefix.
13383 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13384 (output_indirect_thunk_function): Likewise.
13386 (ix86_code_end): Update output_indirect_thunk_function calls.
13387 (ix86_output_indirect_branch_via_reg): Replace
13388 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13389 (ix86_output_indirect_branch_via_push): Likewise.
13390 (ix86_output_function_return): Likewise.
13391 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13392 incompatible with -fcf-protection=branch and
13393 -fcheck-pointer-bounds.
13395 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13398 * config/aarch64/aarch64.c (aarch64_print_address_internal):
13399 Change gcc_assert call to output_operand_lossage.
13401 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13403 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13405 2018-02-22 DJ Delorie <dj@redhat.com>
13406 Sebastian Perta <sebastian.perta@renesas.com>
13407 Oleg Endo <olegendo@gcc.gnu.org>
13409 * config/rx/rx.c (rx_rtx_costs): New function.
13410 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13412 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
13414 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13416 2018-02-22 Martin Liska <mliska@suse.cz>
13419 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13420 Add "native" as a possible value.
13422 2018-02-22 Martin Liska <mliska@suse.cz>
13425 * config/i386/i386.c (ix86_option_override_internal):
13426 Add "native" as a possible value for -march and -mtune.
13428 2018-02-22 Jakub Jelinek <jakub@redhat.com>
13431 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13432 to all type variants.
13434 PR tree-optimization/84503
13435 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13436 width as info->bitpos + info->bitsize - start.
13437 (merged_store_group::merge_overlapping): Simplify width computation.
13438 (check_no_overlap): New function.
13439 (imm_store_chain_info::try_coalesce_bswap): Compute expected
13440 start + width and last_order of the group, fail if check_no_overlap
13442 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13443 to group if check_no_overlap fails.
13445 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13447 * config/rs6000/altivec.md: Delete contraint arguments to
13448 define_expand, define_split, and define_peephole2, and in
13449 define_insn_and_split if always unused.
13450 * config/rs6000/darwin.md: Ditto.
13451 * config/rs6000/dfp.md: Ditto.
13452 * config/rs6000/rs6000.md: Ditto.
13453 * config/rs6000/sync.md: Ditto.
13454 * config/rs6000/vector.md: Ditto.
13455 * config/rs6000/vsx.md: Ditto.
13457 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13459 * config/rs6000/altivec.md: Write output control strings as braced
13460 blocks instead of double-quoted strings.
13461 * config/rs6000/darwin.md: Ditto.
13462 * config/rs6000/rs6000.md: Ditto.
13463 * config/rs6000/vector.md: Ditto.
13464 * config/rs6000/vsx.md: Ditto.
13466 2018-02-21 Jason Merrill <jason@redhat.com>
13468 PR c++/84314 - ICE with templates and fastcall attribute.
13469 * attribs.c (build_type_attribute_qual_variant): Remove assert.
13471 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13473 * ipa-cp.c (determine_versionability): Fix comment typos.
13475 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13478 * ipa-cp.c (determine_versionability): Do not version functions caling
13481 2018-02-21 Martin Liska <mliska@suse.cz>
13484 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13485 Add "native" as a possible value.
13486 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
13487 the macro when native cpu detection is available.
13489 2018-02-21 Martin Liska <mliska@suse.cz>
13492 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13493 Add "native" as a possible value.
13494 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13495 when native cpu detection is available.
13497 2018-02-21 Jakub Jelinek <jakub@redhat.com>
13498 Martin Sebor <msebor@redhat.com>
13500 PR tree-optimization/84478
13501 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13503 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13504 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13505 support which is conservatively correct, for 2 only stay conservative
13506 for maxlen. Formatting and comment capitalization fixes. Add STRICT
13507 argument to the 2 argument get_range_strlen, adjust 6 arg
13508 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13510 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13511 (gimple_fold_builtin_strlen): Pass true as last argument to
13514 2018-02-20 Martin Sebor <msebor@redhat.com>
13516 PR middle-end/84095
13517 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13518 (builtin_memref::set_base_and_offset): Same. Handle inner references.
13519 (builtin_memref::builtin_memref): Factor out parts into
13520 set_base_and_offset and call it.
13522 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13524 PR middle-end/84406
13525 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13526 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13527 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
13528 search at the associated MODE_INT.
13530 2018-02-20 Jeff Law <law@redhat.com>
13532 PR middle-end/82123
13533 PR tree-optimization/81592
13534 PR middle-end/79257
13535 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13536 for range data rather than using global data.
13537 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13538 range data rather than using global data.
13539 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13540 pass it to children as needed.
13541 (struct directive::fmtresult): Similarly.
13542 (struct directive::set_width): Similarly.
13543 (struct directive::set_precision): Similarly.
13544 (format_integer, format_directive, parse_directive): Similarly.
13545 (format_none): Accept unnamed vr_values parameter.
13546 (format_percent, format_floating, format_character): Similarly.
13547 (format_string, format_plain): Similarly.
13548 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13549 the EVRP range analyzer for range data rather than using global data.
13550 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13551 gimple-ssa-evrp-analyze.h
13552 (class sprintf_dom_walker): Add after_dom_children member function.
13553 Add evrp_range_analyzer member.
13554 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13555 range analyzer as needed.
13556 (sprintf_dom_walker::after_dom_children): New member function.
13557 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13559 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13560 (evrp_range_analyzer::pop_to_marker): Likewise.
13562 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13564 PR tree-optimization/84419
13565 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13566 with the required type if its current type is compatible but
13569 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13571 PR middle-end/82004
13572 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13573 after vectorization.
13575 2018-02-20 Martin Liska <mliska@suse.cz>
13578 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13579 possible values if we don't have a hint.
13581 2018-02-20 Martin Liska <mliska@suse.cz>
13585 * final.c (shorten_branches): Build align_tab array with one
13587 * opts.c (finish_options): Add alignment option limit check.
13588 (MAX_CODE_ALIGN): Likewise.
13589 (MAX_CODE_ALIGN_VALUE): Likewise.
13590 * doc/invoke.texi: Document maximum allowed option value for
13591 all -falign-* options.
13593 2018-02-19 Jakub Jelinek <jakub@redhat.com>
13596 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13597 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13598 * var-tracking.c (emit_note_insn_var_location): Remove all references
13599 to NOTE_INSN_CALL_ARG_LOCATION.
13600 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13601 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13602 Use copy_rtx_if_shared.
13603 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13604 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13605 (dwarf2out_var_location): Remove handling of
13606 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13608 * final.c (final_scan_insn): Remove all references to
13609 NOTE_INSN_CALL_ARG_LOCATION.
13610 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
13611 before dumping final insns.
13612 * except.c (emit_note_eh_region_end): Remove all references to
13613 NOTE_INSN_CALL_ARG_LOCATION.
13614 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13615 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13616 * config/arc/arc.c (hwloop_optimize): Likewise.
13617 * config/arm/arm.c (create_fix_barrier): Likewise.
13618 * config/s390/s390.c (s390_chunkify_start): Likewise.
13619 * config/sh/sh.c (find_barrier): Likewise.
13620 * config/i386/i386.c (rest_of_insert_endbranch,
13621 ix86_seh_fixup_eh_fallthru): Likewise.
13622 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13623 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13624 * config/frv/frv.c (frv_function_prologue): Likewise.
13625 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
13627 (note_outside_basic_block_p): Remove all references to
13628 NOTE_INSN_CALL_ARG_LOCATION.
13629 * gengtype.c (adjust_field_rtx_def): Likewise.
13630 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13632 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13633 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13636 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13639 PR tree-optimization/84452
13640 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13641 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13644 2018-02-19 Martin Liska <mliska@suse.cz>
13647 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13649 2018-02-19 Martin Liska <mliska@suse.cz>
13650 Richard Sandiford <richard.sandiford@linaro.org>
13652 PR tree-optimization/82491
13653 * gimple-fold.c (get_base_constructor): Make earlier bail out
13656 2018-02-19 Carl Love <cel@us.ibm.com>
13658 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13659 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13661 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13662 P8V_BUILTIN_VEC_NEG.
13664 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
13666 * config/rl78/rl78.md (movdf): New define expand.
13668 2018-02-19 Martin Liska <mliska@suse.cz>
13671 * doc/invoke.texi: Fix typo.
13672 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13674 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
13676 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13677 handle rs6000_single_float and rs6000_double_float specially for
13680 2018-02-16 Jeff Law <law@redhat.com>
13682 * config/rx/rx.c (add_pop_cfi_notes): New function.;
13683 (pop_regs): Use it.
13685 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13688 * ipa-inline.c (inline_small_functions): Fix a typo.
13690 2018-02-16 Nathan Sidwell <nathan@acm.org>
13692 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13694 2018-02-16 Carl Love <cel@us.ibm.com>
13696 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13697 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13698 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13699 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13700 expansion to P8V_BUILTIN_VEC_FLOAT2.
13702 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
13704 PR rtl-optimization/70023
13705 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13706 src_regno into account.
13708 2018-02-16 Carl Love <cel@us.ibm.com>
13710 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13711 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13712 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13713 * config/rs6000/rs6000.c: Remove case statements for
13714 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13715 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13716 and P9V_BUILTIN_VEC_VINSERT4B.
13717 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13718 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13719 * config/rs6000/vsx.md:
13720 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13723 2018-02-16 Carl Love <cel@us.ibm.com>
13725 * config/rs6000/altivec.h: Add builtin names vec_extract4b
13727 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13729 * config/rs6000/rs6000-c.c: Add the definitions for
13730 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13731 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13732 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13733 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
13734 definition for insert4b and define insn *insert3b_internal.
13735 * doc/extend.texi: Add documentation for vec_extract4b.
13737 2018-02-16 Nathan Sidwell <nathan@acm.org>
13739 * doc/extend.texi (Backwards Compatibility): Mention friend
13740 injection. Note for-scope is deprecated.
13741 * doc/invoke.texi (-ffriend-injection): Deprecate.
13743 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
13745 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13746 that moved to I2, also allow destinations that are a paradoxical
13747 subreg (instead of a normal reg).
13749 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
13752 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13755 2018-02-16 Richard Biener <rguenther@suse.de>
13757 PR tree-optimization/84037
13758 PR tree-optimization/84016
13760 * config/i386/i386.c (ix86_builtin_vectorization_cost):
13761 Adjust vec_construct for the fact we need additional higher latency
13762 128bit inserts for AVX256 and AVX512 vector builds.
13763 (ix86_add_stmt_cost): Scale vector construction cost for
13766 2018-02-16 Richard Biener <rguenther@suse.de>
13768 PR tree-optimization/84417
13769 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13770 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13771 (non_rewritable_lvalue_p): Likewise, use poly-ints.
13773 2018-02-16 Martin Liska <mliska@suse.cz>
13776 * internal-fn.def (ASAN_CHECK): Set proper flags.
13777 (ASAN_MARK): Likewise.
13779 2018-02-16 Julia Koval <julia.koval@intel.com>
13781 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13782 from PTA_CANNONLAKE.
13784 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13787 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13788 Use ++iter rather than iter++ for std::list iterators.
13789 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
13790 defer deleting them until all nodes in the forest are processed. Do
13791 free even leaf nodes. Change to_process into auto_vec.
13794 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13795 * vec.h (vec_default_construct): Use memset instead of placement new
13796 if BROKEN_VALUE_INITIALIZATION is defined.
13797 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13798 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13801 PR rtl-optimization/83723
13802 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13803 * lra.c (lra_substitute_pseudo): Likewise. If true, use
13804 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
13806 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13808 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13810 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
13812 PR rtl-optimization/81443
13813 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13814 from inner REGs to paradoxical SUBREGs.
13816 2018-02-16 Richard Biener <rguenther@suse.de>
13818 PR tree-optimization/84399
13819 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13820 For operands we can analyze at their definition make sure we can
13821 analyze them at each use as well.
13823 2018-02-16 Richard Biener <rguenther@suse.de>
13825 PR tree-optimization/84190
13826 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13827 volatile accesses if the decl isn't volatile.
13829 2018-02-15 Jason Merrill <jason@redhat.com>
13831 PR c++/84314 - ICE with templates and fastcall attribute.
13832 * attribs.c (build_type_attribute_qual_variant): Don't clobber
13833 TYPE_CANONICAL on an existing type.
13835 2018-02-15 Jakub Jelinek <jakub@redhat.com>
13837 PR tree-optimization/84383
13838 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13839 dstoff nor call operand_equal_p if dstbase is NULL.
13841 PR tree-optimization/84334
13842 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13843 also a CONSTANT_CLASS_P, punt.
13845 2018-02-14 Jim Wilson <jimw@sifive.com>
13847 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13848 first SMALL_OPERAND check. New local min_second_step. Move assert
13849 to where locals are set. Add TARGET_RVC support.
13850 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13852 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
13854 * doc/invoke.texi: Correct -Wformat-overflow code sample.
13856 2018-02-14 Martin Sebor <msebor@redhat.com>
13858 PR tree-optimization/83698
13859 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13860 arrays constrain the offset range to their bounds.
13861 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13862 (builtin_access::overlap): Avoid setting the size of overlap if it's
13864 (maybe_diag_overlap): Also consider arrays when deciding what values
13865 of offsets to include in diagnostics.
13867 2018-02-14 Martin Sebor <msebor@redhat.com>
13870 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13871 that correspond to the kind of a declaration.
13873 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
13876 * config/pa/pa.md: Load address of PIC label using the linkage table
13877 if the label is nonlocal.
13879 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
13881 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13882 warning message if user requests -maltivec=be.
13883 * doc/invoke.texi: Document deprecation of -maltivec=be.
13885 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
13888 * config/rs6000/rs6000-c.c: Update definitions for
13889 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13890 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13892 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13895 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13896 add _get_ssp intrinsics. Remove argument from
13897 __builtin_ia32_rdssp[d|q].
13898 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13899 * config/i386/i386-builtin.def: Remove argument from
13900 __builtin_ia32_rdssp[d|q].
13901 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13902 ix86_expand_special_args_builtin for _rdssp[d|q].
13903 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13904 Clear register before usage.
13905 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13906 Add documentation for new _get_ssp and _inc_ssp intrinsics.
13908 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
13910 PR tree-optimization/84357
13911 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13912 operand 1 of an ARRAY_REF too.
13914 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
13917 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13918 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13920 (set_of_reg): New struct.
13921 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13922 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13923 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13925 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13926 Split into bitclr, bitset, bitinvert patterns if appropriate.
13927 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13928 use rx_fuse_in_memory_bitop.
13929 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13930 to named insn, correct maximum insn length.
13932 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
13935 * machmode.def: Define a complex mode for PARTIAL_INT.
13936 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13938 * doc/rtl.texi: Document CSPImode.
13939 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13941 (msp430_hard_regno_nregs_with_padding): Likewise.
13943 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
13946 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13948 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
13950 PR rtl-optimization/84169
13951 * combine.c (try_combine): New variable split_i2i3. Set it to true if
13952 we generated a parallel as new i3 and we split that to new i2 and i3
13953 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
13954 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
13955 those to i2, not i1. Partially rewrite this scan code.
13957 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13960 * stor-layout.c (place_field): For variable length fields, adjust
13961 offset_align afterwards not just based on the field's alignment,
13962 but also on the size.
13964 PR middle-end/84309
13965 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13966 of exps and logs in the use_exp2 case.
13968 2018-02-13 Jeff Law <law@redhat.com>
13970 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13971 entry for "vector".
13973 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13976 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
13980 * common.opt (gas-loc-support, gas-locview-support): New.
13981 (ginline-points, ginternal-reset-location-views): New.
13982 * doc/invoke.texi: Document them. Use @itemx where intended.
13983 (gvariable-location-views): Adjust.
13984 * target.def (reset_location_view): New.
13985 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13986 (TARGET_RESET_LOCATION_VIEW): New.
13987 * doc/tm.texi: Rebuilt.
13988 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13989 (dwarf2out_default_as_locview_support): New.
13990 (output_asm_line_debug_info): Use option variables.
13991 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13992 (output_loc_list): Likewise.
13993 (add_high_low_attributes): Check option variables.
13994 Don't output entry view attribute in strict mode.
13995 (gen_inlined_subroutine_die): Check option variables.
13996 (dwarf2out_inline_entry): Likewise.
13997 (init_sections_and_labels): Likewise.
13998 (dwarf2out_early_finish): Likewise.
13999 (maybe_reset_location_view): New, from...
14000 (dwarf2out_var_location): ... here. Call it.
14001 * debug.h (dwarf2out_default_as_loc_support): Declare.
14002 (dwarf2out_default_as_locview_support): Declare.
14003 * hooks.c (hook_int_rtx_insn_0): New.
14004 * hooks.h (hook_int_rtx_insn_0): Declare.
14005 * toplev.c (process_options): Take -gas-loc-support and
14006 -gas-locview-support from dwarf2out. Enable
14007 -gvariable-location-views by default only with locview
14008 assembler support. Enable -ginternal-reset-location-views by
14009 default only if the target defines the corresponding hook.
14010 Enable -ginline-points by default if location views are
14011 enabled; force it disabled if statement frontiers are
14013 * tree-inline.c (expand_call_inline): Check option variables.
14014 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14016 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14018 PR tree-optimization/84321
14019 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14020 handling. Also check whether the anti-range contains any values
14021 that satisfy the mask; switch to a VR_RANGE if not.
14023 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14026 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14028 2018-02-13 Martin Jambor <mjambor@suse.cz>
14031 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14032 of call statements, also set location of a load to a temporary.
14034 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14036 * config/rl78/rl78.c (add_vector_labels): New function.
14037 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14038 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14039 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14040 which checks that no arguments are passed.
14041 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14042 * doc/extend.texi: Documentation for the new attribute.
14044 2018-02-13 Andreas Schwab <schwab@suse.de>
14046 * config/riscv/linux.h (CPP_SPEC): Define.
14048 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14051 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14052 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14053 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14054 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14055 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14056 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14057 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14058 temporarily for AES and PCLMUL builtins.
14060 PR tree-optimization/84339
14061 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14062 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14065 PR middle-end/84309
14066 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14067 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14068 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14070 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14072 * omp-simd-clone.h: New file.
14073 * omp-simd-clone.c: Include omp-simd-clone.h.
14074 (expand_simd_clones): No longer static.
14075 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14076 cgraph.h and omp-simd-clone.h.
14077 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14078 (vect_recog_widen_shift_pattern): Formatting fix.
14079 (vect_pattern_recog_1): Don't check optab for calls.
14082 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14083 operands[2] into a REG before using gen_lowpart on it.
14085 2018-02-12 Jeff Law <law@redhat.com>
14088 * config/sh/sh.c (find_barrier): Consider a sibling call
14091 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14092 successfully back substituting a reg.
14094 2018-02-12 Richard Biener <rguenther@suse.de>
14096 PR tree-optimization/84037
14097 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14098 parameter, move visited init to caller.
14099 (vect_slp_analyze_operations): Separate cost from validity
14100 check, initialize visited once for all instances.
14101 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14103 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14105 (vect_model_promotion_demotion_cost): Likewise.
14106 (vectorizable_bswap): Guard cost modeling with !slp_node
14107 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14109 (vectorizable_call): Likewise.
14110 (vectorizable_conversion): Likewise.
14111 (vectorizable_assignment): Likewise.
14112 (vectorizable_shift): Likewise.
14113 (vectorizable_operation): Likewise.
14114 (vectorizable_store): Likewise.
14115 (vectorizable_load): Likewise.
14116 (vectorizable_condition): Likewise.
14117 (vectorizable_comparison): Likewise.
14119 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14122 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14123 (ASAN_MARK): Fix fnspec to account for return value, change pointer
14124 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14126 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14128 PR middle-end/83665
14129 * params.def (inline-min-speedup): Increase from 8 to 15.
14130 (max-inline-insns-auto): Decrease from 40 to 30.
14131 * ipa-split.c (consider_split): Add some buffer for function to
14132 be considered inlining candidate.
14133 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14136 2018-02-12 Richard Biener <rguenther@suse.de>
14138 PR tree-optimization/84037
14139 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14140 matched stmts if we cannot swap the non-matched ones.
14142 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14144 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14145 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14146 _mm_maskz_scalef_round_ss): New intrinsics.
14147 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14148 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14149 __builtin_ia32_scalefss_round): Remove.
14150 (__builtin_ia32_scalefsd_mask_round,
14151 __builtin_ia32_scalefss_mask_round): New intrinsics.
14152 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14153 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14154 ((match_operand:VF_128 2 "<round_nimm_predicate>"
14155 "<round_constraint>")): Changed to ...
14156 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14157 "<round_scalar_constraint>")): ... this.
14158 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14159 %0, %1, %2<round_op3>}"): Changed to ...
14160 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14161 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14162 %2<round_scalar_mask_op3>}"): ... this.
14163 * config/i386/subst.md (round_scalar_nimm_predicate): New.
14165 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14167 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14168 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14169 (_mm_maskz_sqrt_round_ss): New intrinsics.
14170 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14171 (__builtin_ia32_sqrtsd_mask_round)
14172 (__builtin_ia32_sqrtss_mask_round): New builtins.
14173 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14174 (__builtin_ia32_sqrtss_round): Remove.
14175 (__builtin_ia32_sqrtsd_mask_round)
14176 (__builtin_ia32_sqrtss_mask_round): New builtins.
14177 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14178 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14179 ((match_operand:VF_128 1 "vector_operand"
14180 "xBm,<round_constraint>")): Changed to ...
14181 ((match_operand:VF_128 1 "vector_operand"
14182 "xBm,<round_scalar_constraint>")): ... this.
14183 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14184 %0, %2, %<iptr>1<round_op3>}): Changed to ...
14185 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14186 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14187 %<iptr>1<round_scalar_mask_op3>}): ... this.
14188 ((set_attr "prefix" "<round_prefix>")): Changed to ...
14189 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14191 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
14194 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14195 Cast vec_cmpeq result to correct type.
14196 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14197 Cast vec_cmpgt result to correct type.
14199 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
14201 * final.c (final_scan_insn_1): Renamed from...
14202 (final_scan_insn): ... this. New wrapper, to recover
14203 seen from the outermost call in recursive ones.
14204 * config/sparc/sparc.c (output_return): Drop seen from call.
14205 (output_sibcall): Likewise.
14206 * config/visium/visium.c (output_branch): Likewise.
14208 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
14210 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14213 2018-02-10 Alan Modra <amodra@gmail.com>
14216 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14217 Specify LR as an input.
14219 2018-02-10 Jakub Jelinek <jakub@redhat.com>
14222 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14223 remove_member_access_dummy_vars): New functions.
14224 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14225 lower_omp_1, execute_lower_omp): Use them.
14227 PR rtl-optimization/84308
14228 * shrink-wrap.c (spread_components): Release todo vector.
14230 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
14232 PR rtl-optimization/57193
14233 * ira-color.c (struct allocno_color_data): Add member
14234 conflict_allocno_hard_prefs.
14235 (update_conflict_allocno_hard_prefs): New.
14236 (bucket_allocno_compare_func): Add a preference based on
14237 conflict_allocno_hard_prefs.
14238 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14239 (color_allocnos): Remove a dead code. Initiate
14240 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
14242 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14245 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14246 constraint from =wa to wa. Avoid a subreg on the output operand,
14247 instead use a pseudo and subreg it in a move.
14248 (p9_xxbrd_<mode>): Changed to ...
14249 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14250 (p9_xxbrd_v2df): New expander.
14251 (p9_xxbrw_<mode>): Changed to ...
14252 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14253 (p9_xxbrw_v4sf): New expander.
14255 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14257 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14259 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
14262 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14263 multiply in 32-bit mode.
14264 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14265 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14268 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14270 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14271 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14272 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14273 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14275 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
14278 * dwarf2out.c (is_trivial_indirect_ref): New function.
14279 (dwarf2out_late_global_decl): Do not generate a location
14280 attribute for variables that have a non-trivial DECL_VALUE_EXPR
14281 and that are not defined in the current unit.
14283 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14285 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14286 instead of a libcall for UNORDERED.
14288 2018-02-09 Tamar Christina <tamar.christina@arm.com>
14291 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14292 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14294 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14297 * config/s390/s390.c (s390_set_current_function): Invoke
14298 s390_indirect_branch_settings also if fndecl didn't change.
14300 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14302 * config/rs6000/rs6000.md (blockage): Set length to zero.
14304 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14306 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14308 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14311 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14312 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14316 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14317 PARALLEL incoming that failed vt_get_decl_and_offset check.
14319 PR middle-end/84237
14320 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14321 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14323 (get_variable_section): For decls in named .bss* sections pass true as
14324 second argument to bss_initializer_p.
14326 2018-02-09 Marek Polacek <polacek@redhat.com>
14327 Jakub Jelinek <jakub@redhat.com>
14330 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14331 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
14332 Sync some changes from cxx_fold_indirect_ref.
14334 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14336 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14338 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14339 (BLOCK_INLINE_ENTRY_LABEL): New.
14340 (dwarf2out_var_location): Disregard inline entry markers.
14341 (inline_entry_data): New struct.
14342 (inline_entry_data_hasher): New hashtable type.
14343 (inline_entry_data_hasher::hash): New.
14344 (inline_entry_data_hasher::equal): New.
14345 (inline_entry_data_table): New variable.
14346 (add_high_low_attributes): Add DW_AT_entry_pc and
14347 DW_AT_GNU_entry_view attributes if a pending entry is found
14348 in inline_entry_data_table. Add old entry_pc attribute only
14349 if debug nonbinding markers are disabled.
14350 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14351 markers are enabled.
14352 (block_within_block_p, dwarf2out_inline_entry): New.
14353 (dwarf2out_finish): Check that no entries remained in
14354 inline_entry_data_table.
14355 * final.c (reemit_insn_block_notes): Handle inline entry notes.
14356 (final_scan_insn, notice_source_line): Likewise.
14357 (rest_of_clean_state): Skip inline entry markers.
14358 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14360 * gimple.c (gimple_build_debug_inline_entry): New.
14361 * gimple.h (enum gimple_debug_subcode): Add
14362 GIMPLE_DEBUG_INLINE_ENTRY.
14363 (gimple_build_debug_inline_entry): Declare.
14364 (gimple_debug_inline_entry_p): New.
14365 (gimple_debug_nonbind_marker_p): Adjust.
14366 * insn-notes.def (INLINE_ENTRY): New.
14367 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14368 inline entry marker notes.
14369 (print_insn): Likewise.
14370 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14371 (INSN_DEBUG_MARKER_KIND): Likewise.
14372 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14373 * tree-inline.c (expand_call_inline): Build and insert
14374 debug_inline_entry stmt.
14375 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14376 inline entry blocks early, if nonbind markers are enabled.
14377 (dump_scope_block): Dump fragment info.
14378 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14379 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14380 (gimple_build_debug_inline_entry): New.
14381 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14382 Enable/disable inline entry points too.
14383 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14384 (DEBUG_INSN): Describe inline entry markers.
14386 * common.opt (gvariable-location-views): New.
14387 (gvariable-location-views=incompat5): New.
14388 * config.in: Rebuilt.
14389 * configure: Rebuilt.
14390 * configure.ac: Test assembler for view support.
14391 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14392 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14393 * dwarf2out.c (var_loc_view): New typedef.
14394 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14395 (dwarf2out_locviews_in_attribute): New.
14396 (dwarf2out_locviews_in_loclist): New.
14397 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14398 (enum dw_line_info_opcode): Add LI_adv_address.
14399 (struct dw_line_info_table): Add view.
14400 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14401 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14402 (zero_view_p): New variable.
14403 (ZERO_VIEW_P): New macro.
14404 (output_asm_line_debug_info): New.
14405 (struct var_loc_node): Add view.
14406 (add_AT_view_list, AT_loc_list): New.
14407 (add_var_loc_to_decl): Add view param. Test it against last.
14408 (new_loc_list): Add view params. Record them.
14409 (AT_loc_list_ptr): Handle loc and view lists.
14410 (view_list_to_loc_list_val_node): New.
14411 (print_dw_val): Handle dw_val_class_view_list.
14412 (size_of_die): Likewise.
14413 (value_format): Likewise.
14414 (loc_list_has_views): New.
14415 (gen_llsym): Set vl_symbol too.
14416 (maybe_gen_llsym, skip_loc_list_entry): New.
14417 (dwarf2out_maybe_output_loclist_view_pair): New.
14418 (output_loc_list): Output view list or entries too.
14419 (output_view_list_offset): New.
14420 (output_die): Handle dw_val_class_view_list.
14421 (output_dwarf_version): New.
14422 (output_compilation_unit_header): Use it.
14423 (output_skeleton_debug_sections): Likewise.
14424 (output_rnglists, output_line_info): Likewise.
14425 (output_pubnames, output_aranges): Update version comments.
14426 (output_one_line_info_table): Output view numbers in asm comments.
14427 (dw_loc_list): Determine current endview, pass it to new_loc_list.
14428 Call maybe_gen_llsym.
14429 (loc_list_from_tree_1): Adjust.
14430 (add_AT_location_description): Create view list attribute if
14431 needed, check it's absent otherwise.
14432 (convert_cfa_to_fb_loc_list): Adjust.
14433 (maybe_emit_file): Call output_asm_line_debug_info for test.
14434 (dwarf2out_var_location): Reset views as needed. Precompute
14435 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
14436 attribute. Set view.
14437 (new_line_info_table): Reset next view.
14438 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14439 (dwarf2out_source_line): Likewise. Output view resets and labels to
14440 the assembler, or select appropriate line info opcodes.
14441 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14442 (optimize_string_length): Catch it. Adjust.
14443 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
14444 dw_val_class_view_list, and remove it if no longer needed.
14445 (hash_loc_list): Hash view numbers.
14446 (loc_list_hasher::equal): Compare them.
14447 (optimize_location_lists): Check whether a view list symbol is
14448 needed, and whether the locview attribute is present, and
14449 whether they match. Remove the locview attribute if no longer
14451 (index_location_lists): Call skip_loc_list_entry for test.
14452 (dwarf2out_finish): Call output_asm_line_debug_info for test.
14453 Use output_dwarf_version.
14454 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14455 (struct dw_val_node): Add val_view_list.
14456 * final.c (SEEN_NEXT_VIEW): New.
14457 (set_next_view_needed): New.
14458 (clear_next_view_needed): New.
14459 (maybe_output_next_view): New.
14460 (final_start_function): Rename to...
14461 (final_start_function_1): ... this. Take pointer to FIRST,
14462 add SEEN parameter. Emit param bindings in the initial view.
14463 (final_start_function): Reintroduce SEEN-less interface.
14464 (final): Rename to...
14465 (final_1): ... this. Take SEEN parameter. Output final pending
14466 next view at the end.
14467 (final): Reintroduce seen-less interface.
14468 (final_scan_insn): Output pending next view before switching
14469 sections or ending a block. Mark the next view as needed when
14470 outputting variable locations. Notify debug backend of section
14471 changes, and of location view changes.
14472 (rest_of_handle_final): Adjust.
14473 * toplev.c (process_options): Autodetect value for debug variable
14474 location views option. Warn on incompat5 without -gdwarf-5.
14475 * doc/invoke.texi (gvariable-location-views): New.
14476 (gvariable-location-views=incompat5): New.
14477 (gno-variable-location-views): New.
14479 2018-02-08 David Malcolm <dmalcolm@redhat.com>
14481 PR tree-optimization/84136
14482 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14483 that the result of find_edge is non-NULL.
14485 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14488 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14489 storing integer register in SImode. Fix cost of 256 and 512
14490 byte aligned SSE register store.
14492 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14494 * config/i386/i386.c (ix86_multiplication_cost): Fix
14495 multiplication cost for TARGET_AVX512DQ.
14497 2018-02-08 Marek Polacek <polacek@redhat.com>
14499 PR tree-optimization/84238
14500 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14503 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14505 PR tree-optimization/84265
14506 * tree-vect-stmts.c (vectorizable_store): Don't treat
14507 VMAT_CONTIGUOUS accesses as grouped.
14508 (vectorizable_load): Likewise.
14510 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14512 PR tree-optimization/81635
14513 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14514 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14515 (test_round_for_mask): New functions.
14516 (wide_int_cc_tests): Call test_round_for_mask.
14517 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14518 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14519 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14520 range returned by get_range_info.
14522 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14525 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14526 * symtab.c: Include builtins.h
14527 (symtab_node::output_to_lto_symbol_table_p): Move here
14528 from lto-streamer-out.c:output_symbol_p.
14529 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14530 (output_symbol_p): Move all logic to symtab.c
14531 (produce_symtab): Update.
14533 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14535 * config/s390/s390-opts.h (enum indirect_branch): Define.
14536 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14537 (s390_indirect_branch_via_thunk)
14538 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14539 (enum s390_indirect_branch_type): Define.
14540 * config/s390/s390.c (struct s390_frame_layout, struct
14541 machine_function): Remove.
14542 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14543 (indirect_branch_table_label_no, indirect_branch_table_name):
14545 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14546 (enum s390_indirect_branch_option): Define.
14547 (s390_return_addr_from_memory): New function.
14548 (s390_handle_string_attribute): New function.
14549 (s390_attribute_table): Add new attribute handler.
14550 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14551 (s390_indirect_branch_via_thunk): New function.
14552 (s390_indirect_branch_via_inline_thunk): New function.
14553 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14554 sibling call optimization for non z10 compiles.
14555 (s390_emit_call): Force indirect branch target to be a single
14556 register. Add r1 clobber for non-z10 compiles.
14557 (s390_emit_epilogue): Emit return jump via return_use expander.
14558 (s390_reorg): Handle JUMP_INSNs as execute targets.
14559 (s390_option_override_internal): Perform validity checks for the
14560 new command line options.
14561 (s390_indirect_branch_attrvalue): New function.
14562 (s390_indirect_branch_settings): New function.
14563 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14564 (s390_output_indirect_thunk_function): New function.
14565 (s390_code_end): Implement target hook.
14566 (s390_case_values_threshold): Implement target hook.
14567 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14569 * config/s390/s390.h (struct s390_frame_layout)
14570 (struct machine_function): Move here from s390.c.
14571 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14572 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14573 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14574 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14575 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14576 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14577 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14578 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14579 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14580 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14581 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14582 (mnemonic attribute): Add values which aren't recognized
14584 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14585 pattern for branch conversion. Fix mnemonic attribute.
14586 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14587 indirect branch via thunk if requested.
14588 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14589 ("*indirect_jump"): Disable for branch conversion using out of
14591 ("indirect_jump_via_thunk<mode>_z10")
14592 ("indirect_jump_via_thunk<mode>")
14593 ("indirect_jump_via_inlinethunk<mode>_z10")
14594 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14595 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14596 ("casesi_jump_via_inlinethunk<mode>_z10")
14597 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14598 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14599 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14600 ("*indirect2_jump"): Disable for branch conversion.
14601 ("casesi_jump"): Turn into expander and expand patterns for branch
14603 ("return_use"): New expander.
14604 ("*return"): Emit return via thunk and rename it to ...
14605 ("*return<mode>"): ... this one.
14606 * config/s390/s390.opt: Add new options and and enum for the
14609 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14611 * lra-constraints.c (match_reload): Unconditionally use
14612 gen_lowpart_SUBREG, rather than selecting between that
14613 and equivalent gen_rtx_SUBREG code.
14615 2018-02-08 Richard Biener <rguenther@suse.de>
14617 PR tree-optimization/84233
14618 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14619 changed flag instead of boguously re-using phi_inserted.
14621 2018-02-08 Martin Jambor <mjambor@suse.cz>
14623 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14624 static local variables.
14626 2018-02-08 Richard Biener <rguenther@suse.de>
14628 PR tree-optimization/84278
14629 * tree-vect-stmts.c (vectorizable_store): When looking for
14630 smaller vector types to perform grouped strided loads/stores
14631 make sure the mode is supported by the target.
14632 (vectorizable_load): Likewise.
14634 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14636 * config/aarch64/aarch64.c (aarch64_components_for_bb):
14637 Increase LDP/STP opportunities by adding adjacent callee-saves.
14639 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14641 PR rtl-optimization/84068
14642 PR rtl-optimization/83459
14643 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14645 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
14647 PR tree-optimization/84224
14648 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14649 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14650 non-zero arguments.
14652 2018-02-07 Iain Sandoe <iain@codesourcery.com>
14655 * config/rs6000/altivec.md (*restore_world): Remove LR use.
14656 * config/rs6000/predicates.md (restore_world_operation): Adjust op
14657 count, remove one USE.
14659 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
14661 * doc/install.texi (Configuration): Document the
14662 --with-long-double-format={ibm,ieee} PowerPC configuration
14666 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14667 Convert from define_expand to be define_insn_and_split. Rework
14668 float/double/_Float128 conversions to QI/HI/SImode to work with
14669 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
14670 conversions to QI/HImode types did a store and then a load to
14671 truncate the value. For conversions to VSX registers, don't split
14672 the insn, instead emit the code directly. Use the code iterator
14673 any_fix to combine signed and unsigned conversions.
14674 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14675 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14676 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14677 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14678 (fix_<mode>di2_hw): Likewise.
14679 (fixuns_<mode>di2_hw): Likewise.
14680 (fix_<mode>si2_hw): Likewise.
14681 (fixuns_<mode>si2_hw): Likewise.
14682 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14683 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14684 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14685 fix<uns>_trunc<SFDF:mode>si2_p8.
14686 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14687 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14688 (fix<uns>_<mode>_mem): Likewise.
14689 (fctiw<u>z_<mode>_mem): Likewise.
14690 (fix<uns>_<mode>_mem): Likewise.
14691 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14692 the register allocator from doing a direct move to the GPRs to do
14693 a store, and instead use the ISA 3.0 store byte/half-word from
14694 vector register instruction. For IEEE 128-bit floating point,
14695 also optimize stores of 32-bit ints.
14696 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14698 2018-02-07 Alan Hayward <alan.hayward@arm.com>
14700 * genextract.c (push_pathstr_operand): New function to support
14702 (walk_rtx): Call push_pathstr_operand.
14703 (print_path): Support [a-zA-Z].
14705 2018-02-07 Richard Biener <rguenther@suse.de>
14707 PR tree-optimization/84037
14708 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14709 (cse_and_gimplify_to_preheader): Declare.
14710 (vect_get_place_in_interleaving_chain): Likewise.
14711 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14713 (_loop_vec_info::~_loop_vec_info): Delete it.
14714 (cse_and_gimplify_to_preheader): New function.
14715 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14716 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14717 (vectorizable_load): Likewise. For grouped stores always base
14718 the IV on the first element.
14719 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14720 condition before gimplifying.
14722 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14724 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14725 *DIV_EXPR and *MOD_EXPR.
14727 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
14730 * config/i386/i386.c (ix86_option_override_internal): Mask out
14731 the CF_SET bit when checking -fcf-protection.
14733 2018-02-07 Tom de Vries <tom@codesourcery.com>
14736 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14739 2018-02-07 Richard Biener <rguenther@suse.de>
14741 PR tree-optimization/84204
14742 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14745 PR tree-optimization/84205
14746 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14747 special-case isl_ast_op_zdiv_r.
14749 PR tree-optimization/84223
14750 * graphite-scop-detection.c (gather_bbs::before_dom_children):
14751 Only add conditions from within the region.
14752 (gather_bbs::after_dom_children): Adjust.
14754 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
14757 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14758 * config/avr/avr.md: Only post-reload split REG-REG moves if
14759 either register is GENERAL_REG_P.
14761 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14763 PR tree-optimization/84235
14764 * tree-ssa-scopedtables.c
14765 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14766 if the subtraction is performed in floating point type where NaNs are
14767 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14768 build 1. Formatting fix.
14770 2018-02-06 Jakub Jelinek <jakub@redhat.com>
14773 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14774 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14775 and skip it regardless of bb boundaries. Use CALL_P macro,
14776 don't test INSN_P (insn) together with CALL_P or JUMP_P check
14777 unnecessarily, formatting fix.
14779 2018-02-06 Michael Collison <michael.collison@arm.com>
14781 * config/arm/thumb2.md:
14782 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14783 (*thumb_mov_notscc): Ditto.
14785 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
14788 * config/rs6000/rs6000.md (su code attribute): Use "u" for
14789 unsigned_fix, not "s".
14791 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14793 * configure.ac (gcc_fn_eh_frame_ro): New function.
14794 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14795 correct .eh_frame permissions.
14796 * configure: Regenerate.
14798 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
14800 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14801 irrelevant options.
14803 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14805 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14806 Display warning message for -mno-speculate-indirect-jumps.
14808 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
14810 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14812 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14814 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
14816 PR tree-optimization/84225
14817 * tree-eh.c (find_trapping_overflow): Only call
14818 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14820 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14823 * config/i386/i386.c: Reimplement the check of possible options
14824 -mibt/-mshstk conbination. Change error messages.
14825 * doc/invoke.texi: Fix a typo: remove extra '='.
14827 2018-02-06 Marek Polacek <polacek@redhat.com>
14829 PR tree-optimization/84228
14830 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14832 2018-02-06 Tamar Christina <tamar.christina@arm.com>
14835 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14836 emitted arch directives.
14837 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14838 __ARM_FEATURE_COPROC before changing architectures.
14840 2018-02-06 Richard Biener <rguenther@suse.de>
14842 * config/i386/i386.c (print_reg): Fix typo.
14843 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14845 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
14847 * configure: Regenerate.
14849 2018-02-05 Martin Sebor <msebor@redhat.com>
14851 PR tree-optimization/83369
14852 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14855 2018-02-05 Martin Liska <mliska@suse.cz>
14857 * doc/invoke.texi: Cherry-pick upstream r323995.
14859 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
14861 * ira.c (ira_init_register_move_cost): Adjust comment.
14863 2018-02-05 Martin Liska <mliska@suse.cz>
14865 PR gcov-profile/84137
14866 * doc/gcov.texi: Fix typo in documentation.
14868 2018-02-05 Martin Liska <mliska@suse.cz>
14870 PR gcov-profile/83879
14871 * doc/gcov.texi: Document necessity of --dynamic-list-data when
14872 using dlopen functionality.
14874 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
14876 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14877 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14878 _mm_maskz_range_ss, _mm_mask_range_round_ss,
14879 _mm_maskz_range_round_ss): New intrinsics.
14880 (__builtin_ia32_rangesd128_round)
14881 (__builtin_ia32_rangess128_round): Remove.
14882 (__builtin_ia32_rangesd128_mask_round,
14883 __builtin_ia32_rangess128_mask_round): New builtins.
14884 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14885 __builtin_ia32_rangess128_round): Remove.
14886 (__builtin_ia32_rangesd128_mask_round,
14887 __builtin_ia32_rangess128_mask_round): New builtins.
14888 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14889 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14890 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14891 "<round_saeonly_constraint>")): Changed to ...
14892 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14893 "<round_saeonly_scalar_constraint>")): ... this.
14894 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14895 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14896 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14897 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14898 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14900 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
14902 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14904 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14905 Remove all values except native, 8540 and 8548.
14907 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
14909 * config/i386/i386.c (ix86_output_function_return): Pass
14910 INVALID_REGNUM, instead of -1, as invalid register number to
14911 indirect_thunk_name and output_indirect_thunk.
14913 2018-02-02 Julia Koval <julia.koval@intel.com>
14915 * config.gcc: Add -march=icelake.
14916 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14917 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14918 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14919 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14920 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14921 (processor_target_table): Add icelake.
14922 (ix86_option_override_internal): Handle new PTAs.
14923 (get_builtin_code_for_version): Handle icelake.
14924 (M_INTEL_COREI7_ICELAKE): New.
14925 (fold_builtin_cpu): Handle icelake.
14926 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14927 * doc/invoke.texi: Add -march=icelake.
14929 2018-02-02 Julia Koval <julia.koval@intel.com>
14931 * config/i386/i386.c (ix86_option_override_internal): Change flags type
14932 to wide_int_bitmask.
14933 * wide-int-bitmask.h: New.
14935 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14938 * config/i386/i386.md: Replace Pmode with word_mode in
14939 builtin_setjmp_setup and builtin_longjmp to support x32.
14941 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
14945 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14947 (rs6000_supported_cpu_names): New static variable.
14948 (linux_cpu_translation_table): Likewise.
14949 (elf_platform) <cpu>: Define new static variable and use it.
14950 Translate kernel AT_PLATFORM name to canonical name if needed.
14951 Error if platform name is unknown.
14953 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
14956 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14958 2018-02-01 Jeff Law <law@redhat.com>
14961 * config/i386/i386.c (release_scratch_register_on_entry): Add new
14962 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
14963 the scratch if RELEASE_VIA_POP is false.
14964 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14965 If we have to save a temporary register, decrement SIZE appropriately.
14966 Pass new arguments to release_scratch_register_on_entry.
14967 (ix86_adjust_stack_and_probe): Likewise.
14968 (ix86_emit_probe_stack_range): Pass new arguments to
14969 release_scratch_register_on_entry.
14971 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
14973 PR rtl-optimization/84157
14974 * combine.c (change_zero_ext): Use REG_P predicate in
14975 front of HARD_REGISTER_P predicate.
14977 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
14979 * config/avr/avr.c (avr_option_override): Move disabling of
14980 -fdelete-null-pointer-checks to...
14981 * common/config/avr/avr-common.c (avr_option_optimization_table):
14984 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14986 PR tree-optimization/81635
14987 * tree-data-ref.c (split_constant_offset_1): For types that
14988 wrap on overflow, try to use range info to prove that wrapping
14991 2018-02-01 Renlin Li <renlin.li@arm.com>
14994 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14995 TAILCALL_ADDR_REGS.
14996 (aarch64_register_move_cost): Likewise.
14997 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14998 TAILCALL_ADDR_REGS.
14999 (REG_CLASS_NAMES): Likewise.
15000 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15001 TAILCALL_ADDR_REGS. Remove IP registers.
15002 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15004 2018-02-01 Richard Biener <rguenther@suse.de>
15006 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15007 for specifying RPO order and allow NULL for that.
15008 * domwalk.c (dom_walker::dom_walker): Likewise.
15009 (dom_walker::walk): Handle NULL RPO order.
15010 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15012 (rewrite_update_dom_walker): Likewise.
15013 (mark_def_dom_walker): Likewise.
15015 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15017 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15018 (aarch64_maybe_expand_sve_subreg_move): Declare.
15019 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15020 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15022 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15023 that are semantically a reverse operation.
15024 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15025 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15026 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15028 (aarch64_can_change_mode_class): For big-endian, forbid changes
15029 between two SVE modes if they have different element sizes.
15031 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15033 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15034 the TImode handling for big-endian targets.
15036 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15038 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15039 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15041 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15042 Remove BSWAP handing for big-endian targets and use the form of
15043 LD1RQ appropariate for the mode.
15045 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15047 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15048 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15049 duplicated element.
15051 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15054 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15055 check for operands that need to go through aarch64_sve_reload_be.
15057 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15059 PR tree-optimization/81661
15060 PR tree-optimization/84117
15061 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15062 * tree-eh.c: Include gimplify.h.
15063 (find_trapping_overflow, replace_trapping_overflow,
15064 rewrite_to_non_trapping_overflow): New functions.
15065 * tree-vect-loop.c: Include tree-eh.h.
15066 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15067 * tree-data-ref.c: Include tree-eh.h.
15068 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15070 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15072 PR rtl-optimization/84123
15073 * combine.c (change_zero_ext): Check if hard register satisfies
15074 can_change_dest_mode before calling gen_lowpart_SUBREG.
15076 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15079 * ira.c (ira_init_register_move_cost): Remove assert.
15081 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15083 PR rtl-optimization/84071
15084 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15085 * doc/tm.texi: Regenerate.
15087 2018-01-31 Richard Biener <rguenther@suse.de>
15089 PR tree-optimization/84132
15090 * tree-data-ref.c (analyze_miv_subscript): Properly
15091 check whether evolution_function_is_affine_multivariate_p
15092 before calling gcd_of_steps_may_divide_p.
15094 2018-01-31 Julia Koval <julia.koval@intel.com>
15097 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15098 * config/i386/i386.md (rdpid_rex64) New.
15099 (rdpid): Make 32bit only.
15101 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15104 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15105 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15107 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15110 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15112 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15114 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15116 PR rtl-optimization/84071
15117 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15118 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15120 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15122 * config/arc/arc.c (arc_handle_aux_attribute): New function.
15123 (arc_attribute_table): Add 'aux' attribute.
15124 (arc_in_small_data_p): Consider aux like variables.
15125 (arc_is_aux_reg_p): New function.
15126 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15127 (arc_get_aux_arg): New function.
15128 (prepare_move_operands): Handle aux-register access.
15129 (arc_handle_aux_attribute): New function.
15130 * doc/extend.texi (ARC Variable attributes): Add subsection.
15132 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15134 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15135 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15136 (arc_attribute_table): Add 'uncached' attribute.
15137 (arc_print_operand): Print '.di' flag for uncached memory
15139 (arc_in_small_data_p): Do not consider for small data the uncached
15141 (arc_is_uncached_mem_p): New function.
15142 * config/arc/predicates.md (compact_store_memory_operand): Check
15143 for uncached memory accesses.
15144 (nonvol_nonimm_operand): Likewise.
15145 * doc/extend.texi (ARC Type Attribute): New subsection.
15147 2018-01-31 Jakub Jelinek <jakub@redhat.com>
15150 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15151 falign-loops=): Add Optimization flag.
15153 2018-01-30 Jeff Law <law@redhat.com>
15156 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15157 INT_REGISTERS_SAVED. Check it prior to calling
15158 get_scratch_register_on_entry.
15159 (ix86_adjust_stack_and_probe): Similarly.
15160 (ix86_emit_probe_stack_range): Similarly.
15161 (ix86_expand_prologue): Corresponding changes.
15163 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15166 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15167 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15169 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
15172 * lra-constraints.c (curr_insn_transform): Process AND in the
15175 2018-01-30 Jakub Jelinek <jakub@redhat.com>
15177 PR rtl-optimization/83986
15178 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15179 dependence against last_pending_memory_flush in addition to
15180 pending_jump_insns.
15182 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
15184 PR tree-optimization/81611
15185 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15188 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15191 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15194 2018-01-30 Richard Biener <rguenther@suse.de>
15195 Jakub Jelinek <jakub@redhat.com>
15197 PR tree-optimization/84111
15198 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15199 inner loops added during recursion, as they don't have up-to-date
15202 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15205 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15206 (can_inline_edge_by_limits_p): ... here.
15207 (can_early_inline_edge_p, check_callers,
15208 update_caller_keys, update_callee_keys, recursive_inlining,
15209 add_new_edges_to_heap, speculation_useful_p,
15210 inline_small_functions,
15211 inline_small_functions, flatten_function,
15212 inline_to_all_callers_1): Update.
15214 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15216 * profile-count.c (profile_count::combine_with_ipa_count): Handle
15219 2018-01-30 Richard Biener <rguenther@suse.de>
15221 PR tree-optimization/83008
15222 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15223 invariant and constant vector uses in stmts when they need
15224 more than one stmt.
15226 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15229 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15230 * configure: Regenerate.
15232 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15234 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15236 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15237 Use gen_rtx_REG rather than gen_lowpart.
15239 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15241 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15242 rather than 0 when creating partial subregs.
15244 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15246 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15249 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
15252 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15253 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15254 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15255 flags. This restores the settings used before the 2017-07-24.
15256 Turning off pre increment/decrement/modify allows IVOPTS to
15257 optimize DF/SF loops where the index is an int.
15259 2018-01-29 Richard Biener <rguenther@suse.de>
15260 Kelvin Nilsen <kelvin@gcc.gnu.org>
15263 * tree-vect-stmts.c (vectorizable_call): Don't call
15264 targetm.vectorize_builtin_md_vectorized_function if callee is
15267 2018-01-22 Carl Love <cel@us.ibm.com>
15269 * doc/extend.tex: Fix typo in second arg in
15270 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15272 2018-01-29 Richard Biener <rguenther@suse.de>
15274 PR tree-optimization/84086
15275 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15276 (flush_ssaname_freelist): When SSA names were released reset
15277 the SCEV hash table.
15279 2018-01-29 Richard Biener <rguenther@suse.de>
15281 PR tree-optimization/84057
15282 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15283 removed paths when removing edges.
15285 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
15287 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15288 -mfunction-return=@var{choice}.
15290 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
15292 PR diagnostic/84034
15293 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15294 Handle CR like TAB.
15295 (layout::print_source_line): Likewise.
15296 (test_get_line_width_without_trailing_whitespace): Add test cases.
15298 2018-01-27 Jakub Jelinek <jakub@redhat.com>
15300 PR middle-end/84040
15301 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15304 2018-01-26 Jim Wilson <jimw@sifive.com>
15306 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15308 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15311 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15313 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15314 and CMP + SUB-immediate -> SUBS.
15316 2018-01-26 Martin Sebor <msebor@redhat.com>
15318 PR tree-optimization/83896
15319 * tree-ssa-strlen.c (get_string_len): Rename...
15320 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
15321 Avoid assuming length is constant.
15322 (handle_char_store): Use HOST_WIDE_INT for string length.
15324 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
15327 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15328 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15330 2018-01-26 Richard Biener <rguenther@suse.de>
15332 PR rtl-optimization/84003
15333 * dse.c (record_store): Only record redundant stores when
15334 the earlier store aliases at least all accesses the later one does.
15336 2018-01-26 Jakub Jelinek <jakub@redhat.com>
15338 PR rtl-optimization/83985
15339 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15340 REG_CFA_RESTORE insns.
15341 (delete_unmarked_insns): Don't ignore separate shrink wrapping
15342 REG_CFA_RESTORE insns here.
15345 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15346 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15348 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15350 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15351 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15352 (arc_init): Likewise.
15353 (arc_override_options): Likewise.
15354 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15356 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15358 * config/arc/arc.h (TARGET_DBNZ): Define.
15359 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15360 properly set the tune attribute.
15361 (dbnz): Use TARGET_DBNZ guard.
15362 * config/arc/arc.opt (mtune): Add core3 option.
15364 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15366 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15367 recognize new pic like addresses.
15368 (arc_delegitimize_address): Clean up.
15370 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15372 * config/arc/arc-arches.def: Option mrf16 valid for all
15374 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15375 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15376 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15377 * config/arc/arc-tables.opt: Regenerate.
15378 * config/arc/arc.c (arc_conditional_register_usage): Handle
15379 reduced register file case.
15380 (arc_file_start): Set must have build attributes.
15381 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15382 mrf16 option value.
15383 * config/arc/arc.opt (mrf16): Add new option.
15384 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15385 * config/arc/genmultilib.awk: Handle new mrf16 option.
15386 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15387 * config/arc/t-multilib: Regenerate.
15388 * doc/invoke.texi (ARC Options): Document mrf16 option.
15390 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15392 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15393 * config/arc/arc.c (arc_handle_secure_attribute): New function.
15394 (arc_attribute_table): Add 'secure_call' attribute.
15395 (arc_print_operand): Print secure call operand.
15396 (arc_function_ok_for_sibcall): Don't optimize tail calls when
15398 (arc_is_secure_call_p): New function. * config/arc/arc.md
15399 (call_i): Add support for sjli instruction.
15400 (call_value_i): Likewise.
15401 * config/arc/constraints.md (Csc): New constraint.
15403 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15404 John Eric Martin <John.Martin@emmicro-us.com>
15406 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15407 * config/arc/arc.c (_arc_jli_section): New struct.
15408 (arc_jli_section): New type.
15409 (rc_jli_sections): New static variable.
15410 (arc_handle_jli_attribute): New function.
15411 (arc_attribute_table): Add jli_always and jli_fixed attribute.
15412 (arc_file_end): New function.
15413 (TARGET_ASM_FILE_END): Define.
15414 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15415 (arc_add_jli_section): New function.
15416 (jli_call_scan): Likewise.
15417 (arc_reorg): Call jli_call_scan.
15418 (arc_output_addsi): Remove 'S' from printing asm operand.
15419 (arc_is_jli_call_p): New function.
15420 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15422 (movhi_insn): Likewise.
15423 (movsi_insn): Likewise.
15424 (movsi_set_cc_insn): Likewise.
15425 (loadqi_update): Likewise.
15426 (load_zeroextendqisi_update): Likewise.
15427 (load_signextendqisi_update): Likewise.
15428 (loadhi_update): Likewise.
15429 (load_zeroextendhisi_update): Likewise.
15430 (load_signextendhisi_update): Likewise.
15431 (loadsi_update): Likewise.
15432 (loadsf_update): Likewise.
15433 (movsicc_insn): Likewise.
15434 (bset_insn): Likewise.
15435 (bxor_insn): Likewise.
15436 (bclr_insn): Likewise.
15437 (bmsk_insn): Likewise.
15438 (bicsi3_insn): Likewise.
15439 (cmpsi_cc_c_insn): Likewise.
15440 (movsi_ne): Likewise.
15441 (movsi_cond_exec): Likewise.
15442 (clrsbsi2): Likewise.
15443 (norm_f): Likewise.
15453 (call_i): Remove 'S' asm letter, add jli instruction.
15454 (call_value_i): Likewise.
15455 * config/arc/arc.op (mjli-always): New option.
15456 * config/arc/constraints.md (Cji): New constraint.
15457 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15459 (subsf3_fpx): Likewise.
15460 (mulsf3_fpx): Likewise.
15461 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15463 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15464 function attrbutes.
15465 * doc/invoke.texi (ARC): Document mjli-always option.
15467 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
15469 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15470 avoid addition with 0 and use incw and decw where possible.
15472 2018-01-26 Richard Biener <rguenther@suse.de>
15474 PR tree-optimization/81082
15475 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15476 association if it requires casting to unsigned.
15477 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15478 from fold_plusminus_mult_expr to catch important cases late when
15479 range info is available.
15481 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15483 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15484 * configure.ac (hidden_linkonce): New test.
15485 * configure: Regenerate.
15486 * config.in: Regenerate.
15488 2018-01-26 Julia Koval <julia.koval@intel.com>
15490 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15491 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15492 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15493 _mm_mask_bitshuffle_epi64_mask): Fix type.
15494 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15495 USI_FTYPE_V4DI_V4DI_USI): Remove.
15496 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15497 __builtin_ia32_vpshufbitqmb256_mask,
15498 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15499 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15500 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15502 2018-01-26 Alan Modra <amodra@gmail.com>
15505 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15506 UNSPEC_VBPERMQ. Sort other unspecs.
15508 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
15510 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15512 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
15514 PR middle-end/83055
15515 * predict.c (drop_profile): Do not push/pop cfun; update also
15517 (handle_missing_profiles): Fix logic looking for zero profiles.
15519 2018-01-25 Jakub Jelinek <jakub@redhat.com>
15521 PR middle-end/83977
15522 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15523 on functions with #pragma omp declare simd or functions with simd
15525 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15526 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15527 Remove trailing \n from warning_at calls.
15529 2018-01-25 Tom de Vries <tom@codesourcery.com>
15532 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15533 for neutered workers.
15535 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15538 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15539 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15541 2018-01-24 Jeff Law <law@redhat.com>
15544 * i386.c (get_probe_interval): Move to earlier point.
15545 (ix86_compute_frame_layout): If -fstack-clash-protection and
15546 the frame is larger than the probe interval, then use pushes
15547 to save registers rather than reg->mem moves.
15548 (ix86_expand_prologue): Remove conditional for int_registers_saved
15551 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15554 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15555 min/max for never referenced object.
15557 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15559 PR middle-end/83977
15560 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15562 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15563 attributes from DECL_ATTRIBUTES (decl) without affecting
15564 DECL_ATTRIBUTES (current_function_decl).
15565 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15566 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15568 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15570 PR tree-optimization/83979
15571 * fold-const.c (fold_comparison): Use constant_boolean_node
15572 instead of boolean_{true,false}_node.
15574 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15576 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15579 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15581 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15582 Simplify the clause that sets the length attribute.
15583 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15584 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15585 clause that sets the length attribute.
15586 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15588 2018-01-24 Tom de Vries <tom@codesourcery.com>
15591 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15592 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15593 Add strict parameter.
15594 (prevent_branch_around_nothing): Insert dummy insn between branch to
15595 label and label with no ptx insn inbetween.
15596 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15598 2018-01-24 Tom de Vries <tom@codesourcery.com>
15601 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15602 for neutered threads in warp.
15603 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15605 2018-01-24 Richard Biener <rguenther@suse.de>
15607 PR tree-optimization/83176
15608 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15611 2018-01-24 Richard Biener <rguenther@suse.de>
15613 PR tree-optimization/82819
15614 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15615 code generating pluses that are no-ops in the target precision.
15617 2018-01-24 Richard Biener <rguenther@suse.de>
15619 PR middle-end/84000
15620 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15622 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15624 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15625 to merge probabilities.
15626 * predict.c (probably_never_executed): Also mark as cold functions
15627 with global 0 profile and guessed local profile.
15628 * profile-count.c (profile_probability::combine_with_count): New
15630 * profile-count.h (profile_probability::operator*,
15631 profile_probability::operator*=, profile_probability::operator/,
15632 profile_probability::operator/=): Reduce precision to adjusted
15633 and set value to guessed on contradictory divisions.
15634 (profile_probability::combine_with_freq): Remove.
15635 (profile_probability::combine_wiht_count): Declare.
15636 (profile_count::force_nonzero):: Set to adjusted.
15637 (profile_count::probability_in):: Set quality to adjusted.
15638 * tree-ssa-tail-merge.c (replace_block_by): Use
15639 combine_with_count.
15641 2018-01-23 Andrew Waterman <andrew@sifive.com>
15642 Jim Wilson <jimw@sifive.com>
15644 * config/riscv/riscv.c (riscv_stack_boundary): New.
15645 (riscv_option_override): Set riscv_stack_boundary. Handle
15646 riscv_preferred_stack_boundary_arg.
15647 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15648 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15649 (STACK_BOUNDARY): Set to riscv_stack_boundary.
15650 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15651 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15652 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15654 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
15657 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15658 of struct ix86_frame.
15659 (ix86_expand_epilogue): Likewise. Add a local variable for
15660 the reg_save_offset field in struct ix86_frame.
15662 2018-01-23 Bin Cheng <bin.cheng@arm.com>
15664 PR tree-optimization/82604
15665 * tree-loop-distribution.c (enum partition_kind): New enum item
15666 PKIND_PARTIAL_MEMSET.
15667 (partition_builtin_p): Support above new enum item.
15668 (generate_code_for_partition): Ditto.
15669 (compute_access_range): Differentiate cases that equality can be
15670 proven at all loops, the innermost loops or no loops.
15671 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15672 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
15673 (finalize_partitions, distribute_loop): Don't fuse partition of
15674 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15675 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15676 parloop is enabled.
15678 2018-01-23 Martin Liska <mliska@suse.cz>
15680 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15681 order to ignore the predictor.
15682 (PRED_POLYMORPHIC_CALL): Likewise.
15683 (PRED_RECURSIVE_CALL): Likewise.
15685 2018-01-23 Martin Liska <mliska@suse.cz>
15687 * tree-profile.c (tree_profiling): Print function header to
15688 aware reader which function we are working on.
15689 * value-prof.c (gimple_find_values_to_profile): Do not print
15690 not interesting value histograms.
15692 2018-01-23 Martin Liska <mliska@suse.cz>
15694 * profile-count.h (enum profile_quality): Add
15695 profile_uninitialized as the first value. Do not number values
15696 as they are zero based.
15697 (profile_count::verify): Update sanity check.
15698 (profile_probability::verify): Likewise.
15700 2018-01-23 Nathan Sidwell <nathan@acm.org>
15702 * doc/invoke.texi (ffor-scope): Deprecate.
15704 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15706 PR tree-optimization/83510
15707 * domwalk.c (set_all_edges_as_executable): New function.
15708 (dom_walker::dom_walker): Convert bool param
15709 "skip_unreachable_blocks" to enum reachability. Move setup of
15710 edge flags to set_all_edges_as_executable and only do it when
15711 reachability is REACHABLE_BLOCKS.
15712 * domwalk.h (enum dom_walker::reachability): New enum.
15713 (dom_walker::dom_walker): Convert bool param
15714 "skip_unreachable_blocks" to enum reachability.
15715 (set_all_edges_as_executable): New decl.
15716 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
15717 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15719 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15720 but converting true to REACHABLE_BLOCKS.
15721 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15723 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15724 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15725 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15727 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15728 if check_all_array_refs will be called.
15730 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15732 * tree.c (selftest::test_location_wrappers): Add more test
15735 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15737 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15738 (selftest::test_bit_in_range): Likewise.
15740 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15743 * doc/sourcebuild.texi (vect_float): Say that the selector
15744 only describes the situation when -funsafe-math-optimizations is on.
15745 (vect_float_strict): Document.
15747 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15749 PR tree-optimization/83965
15750 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15751 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15752 instead of checking only for a reduction.
15753 (vect_recog_widen_sum_pattern): Likewise.
15755 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15757 * predict.c (probably_never_executed): Only use precise profile info.
15758 (compute_function_frequency): Skip after inlining hack since we now
15759 have quality checking.
15761 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15763 * profile-count.h (profile_probability::very_unlikely,
15764 profile_probability::unlikely, profile_probability::even): Set
15765 precision to guessed.
15767 2018-01-23 Richard Biener <rguenther@suse.de>
15769 PR tree-optimization/83963
15770 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15771 Properly terminate dominator walk when crossing the exit edge not
15772 when visiting its source block.
15774 2018-01-23 Jakub Jelinek <jakub@redhat.com>
15777 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15778 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15780 2018-01-22 Jakub Jelinek <jakub@redhat.com>
15782 PR tree-optimization/83957
15783 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
15784 semicolon after for body surrounded by braces.
15786 PR tree-optimization/83081
15787 * profile-count.h (profile_probability::split): New method.
15788 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15789 Use profile_probability::split.
15790 (do_compare_rtx_and_jump): Fix adjustment of probabilities
15791 when splitting a single conditional jump into 2.
15793 2018-01-22 David Malcolm <dmalcolm@redhat.com>
15795 PR tree-optimization/69452
15796 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15799 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15801 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15802 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15803 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15805 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15807 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15809 * config/rl78/rl78.md (movdi): New define_expand.
15810 * config/rl78/rl78.c (rl78_split_movdi): New function.
15812 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
15815 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15817 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15818 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15819 128-bit to produce an UNSPEC move to get the double word with the
15820 signbit and then a shift directly to do signbit.
15821 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15822 implementation with a new version that just does either a direct
15823 move or a regular move. Move memory interface to separate insns.
15824 Move insns so they are next to the expander.
15825 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15826 with signbit move. Split big and little endian case.
15827 (signbit<mode>2_dm_mem_le): Likewise.
15828 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15829 (signbit<mode>2_dm2): Likewise.
15831 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15833 * config/rl78/rl78.md (anddi3): New define_expand.
15835 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15837 * config/rl78/rl78.md (umindi3): New define_expand.
15839 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15841 * config/rl78/rl78.md (smindi3): New define_expand.
15843 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15845 * config/rl78/rl78.md (smaxdi3): New define_expand.
15847 2018-01-22 Carl Love <cel@us.ibm.com>
15849 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15850 LVX_V1TI): Add macro expansion.
15851 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15852 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15853 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15854 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15855 Change check to determine if the instruction is a byte reversing
15856 entry. Fix typo in comment.
15857 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15858 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15859 Add def_builtin calls for new builtins.
15860 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15861 Add define_insn expansion.
15863 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15865 * config/rl78/rl78.md (umaxdi3): New define_expand.
15867 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15869 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15870 for non-QImode registers.
15872 2018-01-22 Richard Biener <rguenther@suse.de>
15874 PR tree-optimization/83963
15875 * graphite-scop-detection.c (scop_detection::get_sese): Delay
15876 including the loop exit block.
15877 (scop_detection::merge_sese): Likewise.
15878 (scop_detection::add_scop): Do it here instead.
15880 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15882 * doc/sourcebuild.texi (arm_softfloat): Document.
15884 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
15887 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15888 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15889 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15891 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15892 David Edelsohn <dje.gcc@gmail.com>
15895 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15896 Change "crset eq" to "crset 2".
15897 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15898 (*call_indirect_aix<mode>_nospec): Likewise.
15899 (*call_value_indirect_aix<mode>_nospec): Likewise.
15900 (*call_indirect_elfv2<mode>_nospec): Likewise.
15901 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15902 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15903 change assembly output from . to $.
15904 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15905 (indirect_jump<mode>_nospec): Change assembly output from . to $.
15906 (*tablejump<mode>_internal1_nospec): Likewise.
15908 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
15911 * config/sh/sh_optimize_sett_clrt.cc:
15912 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15914 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
15916 PR tree-optimization/83940
15917 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15918 offset_dt to vect_constant_def rather than vect_unknown_def_type.
15919 (vect_check_load_store_mask): Add a mask_dt_out parameter and
15920 use it to pass back the definition type.
15921 (vect_check_store_rhs): Likewise rhs_dt_out.
15922 (vect_build_gather_load_calls): Add a mask_dt argument and use
15923 it instead of a call to vect_is_simple_use.
15924 (vectorizable_store): Update calls to vect_check_load_store_mask
15925 and vect_check_store_rhs. Use the dt returned by the latter instead
15926 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
15927 instead of calls to vect_is_simple_use. Pass the scalar rather
15928 than the vector operand to vect_is_simple_use when handling
15929 second and subsequent copies of an rhs value.
15930 (vectorizable_load): Update calls to vect_check_load_store_mask
15931 and vect_build_gather_load_calls. Use the cached mask_dt and
15932 gs_info.offset_dt instead of calls to vect_is_simple_use.
15934 2018-01-20 Jakub Jelinek <jakub@redhat.com>
15936 PR middle-end/83945
15937 * tree-emutls.c: Include gimplify.h.
15938 (lower_emutls_2): New function.
15939 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15940 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15941 it before further processing.
15944 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15945 UINTVAL (trueop1) instead of INTVAL (op1).
15947 2018-01-19 Jakub Jelinek <jakub@redhat.com>
15951 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15952 INCOMING_FRAME_SP_OFFSET if not defined.
15953 (scan_trace): Add ENTRY argument. If true and
15954 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15955 emit a note to adjust the CFA offset.
15956 (create_cfi_notes): Adjust scan_trace callers.
15957 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15958 INCOMING_FRAME_SP_OFFSET in the CIE.
15959 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15960 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15962 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15963 * doc/tm.texi: Regenerated.
15965 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15967 PR rtl-optimization/83147
15968 * lra-constraints.c (remove_inheritance_pseudos): Use
15969 lra_substitute_pseudo_within_insn.
15971 2018-01-19 Tom de Vries <tom@codesourcery.com>
15972 Cesar Philippidis <cesar@codesourcery.com>
15975 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15977 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
15980 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15981 spaces for function labels.
15983 2018-01-19 Martin Liska <mliska@suse.cz>
15985 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15986 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15987 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15988 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15989 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15990 (PRED_CONST_RETURN): Change from 69 to 65.
15991 (PRED_NULL_RETURN): Change from 91 to 71.
15992 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15993 (PRED_LOOP_GUARD): Change from 66 to 73.
15995 2018-01-19 Martin Liska <mliska@suse.cz>
15997 * predict.c (predict_insn_def): Add new assert.
15998 (struct branch_predictor): Change type to signed integer.
15999 (test_prediction_value_range): Amend test to cover
16000 PROB_UNINITIALIZED.
16001 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16002 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16003 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16004 (PRED_LOOP_IV_COMPARE): Likewise.
16005 * predict.h (PROB_UNINITIALIZED): Define new constant.
16007 2018-01-19 Martin Liska <mliska@suse.cz>
16009 * predict.c (dump_prediction): Add new format for
16010 analyze_brprob.py script which is enabled with -details
16012 * profile-count.h (precise_p): New function.
16014 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16016 PR tree-optimization/83922
16017 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16018 there are no statements that need masking.
16019 (vect_active_double_reduction_p): New function.
16020 (vect_analyze_loop_operations): Use it when handling phis that
16021 are not in the loop header.
16023 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16025 PR tree-optimization/83914
16026 * tree-vect-loop.c (vectorizable_induction): Don't convert
16027 init_expr or apply the peeling adjustment for inductions
16028 that are nested within the vectorized loop.
16030 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16032 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16035 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16039 * function.h (gimplify_parameters): Add gimple_seq * argument.
16040 * function.c: Include gimple.h and options.h.
16041 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16042 for the added local temporaries if needed.
16043 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16044 if there are any parameter cleanups, wrap whole body into a
16045 try/finally with the cleanups.
16047 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16050 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16051 Use GET_MODE_CLASS for scalar floating point.
16053 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16057 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16058 Fix call of call_cgraph_insertion_hooks.
16060 2018-01-18 Martin Sebor <msebor@redhat.com>
16062 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16064 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16067 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16070 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16073 * common.opt: (-ffile-prefix-map): New option.
16074 * opts.c (common_handle_option): Defer it.
16075 * opts-global.c (handle_common_deferred_options): Handle it.
16076 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16077 * file-prefix-map.h: New file.
16078 (remap_debug_filename, add_debug_prefix_map): ...here.
16079 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16080 * final.c (debug_prefix_map, add_debug_prefix_map
16081 remap_debug_filename): Move to...
16082 * file-prefix-map.c: New file.
16083 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16084 generalize, get rid of alloca(), use strrchr() instead of strchr().
16085 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16086 Implement in terms of add_prefix_map().
16087 (remap_macro_filename, remap_debug_filename): Implement in term of
16089 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16090 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16091 * dbxout.c: Include file-prefix-map.h.
16092 * varasm.c: Likewise.
16093 * vmsdbgout.c: Likewise.
16094 * xcoffout.c: Likewise.
16095 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16096 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16097 * doc/invoke.texi (-ffile-prefix-map): Document.
16098 (-fdebug-prefix-map): Update description.
16100 2018-01-18 Martin Liska <mliska@suse.cz>
16102 * config/i386/i386.c (indirect_thunk_name): Document that also
16104 (output_indirect_thunk): Document why both instructions
16105 (pause and lfence) are generated.
16107 2018-01-18 Richard Biener <rguenther@suse.de>
16109 PR tree-optimization/83887
16110 * graphite-scop-detection.c
16111 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16112 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16113 (scop_detection::merge_sese): Re-implement with a flood-fill
16114 algorithm that properly finds a SESE region if it exists.
16116 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16119 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16120 pointer_diff optimizations use view_convert instead of convert.
16122 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16124 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16125 Generate different code for -mno-speculate-indirect-jumps.
16126 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16127 (*call_indirect_aix<mode>): Disable for
16128 -mno-speculate-indirect-jumps.
16129 (*call_indirect_aix<mode>_nospec): New define_insn.
16130 (*call_value_indirect_aix<mode>): Disable for
16131 -mno-speculate-indirect-jumps.
16132 (*call_value_indirect_aix<mode>_nospec): New define_insn.
16133 (*sibcall_nonlocal_sysv<mode>): Generate different code for
16134 -mno-speculate-indirect-jumps.
16135 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16137 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16139 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16140 long double type, set the flags for noting the default long double
16141 type, even if we don't pass or return a long double type.
16143 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
16146 * ipa-inline.c (flatten_function): Do not overwrite final inlining
16149 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
16151 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16152 support for merge[hl].
16153 (fold_mergehl_helper): New helper function.
16154 (tree-vector-builder.h): New #include for tree_vector_builder usage.
16155 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16156 (altivec_vmrglw_direct): Add xxmrglw insn.
16158 2018-01-17 Andrew Waterman <andrew@sifive.com>
16160 * config/riscv/riscv.c (riscv_conditional_register_usage): If
16161 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16163 2018-01-17 David Malcolm <dmalcolm@redhat.com>
16166 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16167 call the lto_location_cache before reading the
16168 DECL_SOURCE_LOCATION of the types.
16170 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
16171 Richard Sandiford <richard.sandiford@linaro.org>
16173 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16174 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16175 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16176 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16177 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16179 * config/aarch64/constraints.md (aarch64_movti_operand):
16181 * config/aarch64/predicates.md (Uti): Add new constraint.
16183 2018-01-17 Carl Love <cel@us.ibm.com>
16185 * config/rs6000/vsx.md (define_expand xl_len_r,
16186 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16187 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16189 (define_expand, define_insn): Move the shift left from the
16190 define_insn to the define_expand for lxvl and stxvl instructions.
16191 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16192 and XL_LEN_R definitions to PURE.
16194 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
16196 * config/i386/i386.c (indirect_thunk_name): Declare regno
16197 as unsigned int. Compare regno with INVALID_REGNUM.
16198 (output_indirect_thunk): Ditto.
16199 (output_indirect_thunk_function): Ditto.
16200 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
16201 in the call to output_indirect_thunk_function.
16203 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
16205 PR middle-end/83884
16206 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16207 rather than the size of inner_type to determine the stack slot size
16208 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16210 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
16213 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16216 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
16218 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16219 endian Linux systems to optionally enable multilibs for selecting
16220 the long double type if the user configured an explicit type.
16221 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16222 have no long double multilibs if not defined.
16223 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16224 warn if the user used -mabi={ieee,ibm}longdouble and we built
16225 multilibs for long double.
16226 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16227 appropriate multilib option.
16228 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16230 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16231 for building long double multilibs.
16232 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16234 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
16236 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16239 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16241 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16244 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16247 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16250 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16252 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16253 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16255 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16257 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16258 different rtl trees depending on TARGET_64BIT.
16259 (rs6000_gen_lvx): Likewise.
16261 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16263 * config/visium/visium.md (nop): Tweak comment.
16264 (hazard_nop): Likewise.
16266 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16268 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16269 -mspeculate-indirect-jumps.
16270 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16271 for -mno-speculate-indirect-jumps.
16272 (*call_indirect_elfv2<mode>_nospec): New define_insn.
16273 (*call_value_indirect_elfv2<mode>): Disable for
16274 -mno-speculate-indirect-jumps.
16275 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16276 (indirect_jump): Emit different RTL for
16277 -mno-speculate-indirect-jumps.
16278 (*indirect_jump<mode>): Disable for
16279 -mno-speculate-indirect-jumps.
16280 (*indirect_jump<mode>_nospec): New define_insn.
16281 (tablejump): Emit different RTL for
16282 -mno-speculate-indirect-jumps.
16283 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16284 (tablejumpsi_nospec): New define_expand.
16285 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16286 (tablejumpdi_nospec): New define_expand.
16287 (*tablejump<mode>_internal1): Disable for
16288 -mno-speculate-indirect-jumps.
16289 (*tablejump<mode>_internal1_nospec): New define_insn.
16290 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16293 2018-01-16 Artyom Skrobov tyomitch@gmail.com
16295 * caller-save.c (insert_save): Drop unnecessary parameter. All
16298 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16299 Richard Biener <rguenth@suse.de>
16302 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16303 return early, inline manually is_gimple_sizepos. Make sure if we
16304 call gimplify_expr we don't end up with a gimple constant.
16305 * tree.c (variably_modified_type_p): Don't return true for
16306 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
16307 * gimplify.h (is_gimple_sizepos): Remove.
16309 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16311 PR tree-optimization/83857
16312 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16313 vectorizable_live_operation for pure SLP statements.
16314 (vectorizable_live_operation): Handle PHIs.
16316 2018-01-16 Richard Biener <rguenther@suse.de>
16318 PR tree-optimization/83867
16319 * tree-vect-stmts.c (vect_transform_stmt): Precompute
16320 nested_in_vect_loop_p since the scalar stmt may get invalidated.
16322 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16325 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16326 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16327 If off is not INTEGER_CST, issue a may not be aligned warning
16328 rather than isn't aligned. Use isn%'t rather than isn't.
16329 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16331 <case MULT_EXPR>: Improve the case when bottom and one of the
16332 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16333 operand, in that case check if the other operand is multiple of
16334 bottom divided by the INTEGER_CST operand.
16336 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16339 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16340 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16341 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16342 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16343 * config/pa/pa.c (pa_function_arg_advance): Likewise.
16344 (pa_function_arg, pa_arg_partial_bytes): Likewise.
16345 (pa_function_arg_size): New function.
16347 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16349 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16350 in a separate statement.
16352 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16354 PR tree-optimization/83847
16355 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16356 group gathers and scatters.
16358 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16360 PR rtl-optimization/86620
16361 * params.def (max-sched-ready-insns): Bump minimum value to 1.
16363 PR rtl-optimization/83213
16364 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16365 to last if both are JUMP_INSNs.
16367 PR tree-optimization/83843
16368 * gimple-ssa-store-merging.c
16369 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16370 store_immediate_info for bswap/nop orig_stores.
16372 2018-01-15 Andrew Waterman <andrew@sifive.com>
16374 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16376 <UDIV>: Increase cost if !TARGET_DIV.
16378 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
16380 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16381 (define_attr "cr_logical_3op"): New.
16382 (cceq_ior_compare): Adjust.
16383 (cceq_ior_compare_complement): Adjust.
16384 (*cceq_rev_compare): Adjust.
16385 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16386 (is_cracked_insn): Adjust.
16387 (insn_must_be_first_in_group): Adjust.
16388 * config/rs6000/40x.md: Adjust.
16389 * config/rs6000/440.md: Adjust.
16390 * config/rs6000/476.md: Adjust.
16391 * config/rs6000/601.md: Adjust.
16392 * config/rs6000/603.md: Adjust.
16393 * config/rs6000/6xx.md: Adjust.
16394 * config/rs6000/7450.md: Adjust.
16395 * config/rs6000/7xx.md: Adjust.
16396 * config/rs6000/8540.md: Adjust.
16397 * config/rs6000/cell.md: Adjust.
16398 * config/rs6000/e300c2c3.md: Adjust.
16399 * config/rs6000/e500mc.md: Adjust.
16400 * config/rs6000/e500mc64.md: Adjust.
16401 * config/rs6000/e5500.md: Adjust.
16402 * config/rs6000/e6500.md: Adjust.
16403 * config/rs6000/mpc.md: Adjust.
16404 * config/rs6000/power4.md: Adjust.
16405 * config/rs6000/power5.md: Adjust.
16406 * config/rs6000/power6.md: Adjust.
16407 * config/rs6000/power7.md: Adjust.
16408 * config/rs6000/power8.md: Adjust.
16409 * config/rs6000/power9.md: Adjust.
16410 * config/rs6000/rs64.md: Adjust.
16411 * config/rs6000/titan.md: Adjust.
16413 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16415 * config/i386/predicates.md (indirect_branch_operand): Rewrite
16416 ix86_indirect_branch_register logic.
16418 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16420 * config/i386/constraints.md (Bs): Update
16421 ix86_indirect_branch_register check. Don't check
16422 ix86_indirect_branch_register with GOT_memory_operand.
16424 * config/i386/predicates.md (GOT_memory_operand): Don't check
16425 ix86_indirect_branch_register here.
16426 (GOT32_symbol_operand): Likewise.
16428 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16430 * config/i386/predicates.md (constant_call_address_operand):
16431 Rewrite ix86_indirect_branch_register logic.
16432 (sibcall_insn_operand): Likewise.
16434 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16436 * config/i386/constraints.md (Bs): Replace
16437 ix86_indirect_branch_thunk_register with
16438 ix86_indirect_branch_register.
16440 * config/i386/i386.md (indirect_jump): Likewise.
16441 (tablejump): Likewise.
16442 (*sibcall_memory): Likewise.
16443 (*sibcall_value_memory): Likewise.
16444 Peepholes of indirect call and jump via memory: Likewise.
16445 * config/i386/i386.opt: Likewise.
16446 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16447 (GOT_memory_operand): Likewise.
16448 (call_insn_operand): Likewise.
16449 (sibcall_insn_operand): Likewise.
16450 (GOT32_symbol_operand): Likewise.
16452 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16454 PR middle-end/83837
16455 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16456 type rather than type addr's type points to.
16457 (expand_omp_atomic_mutex): Likewise.
16458 (expand_omp_atomic): Likewise.
16460 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16463 * config/i386/i386.c (output_indirect_thunk_function): Use
16464 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16465 for __x86_return_thunk.
16467 2018-01-15 Richard Biener <rguenther@suse.de>
16469 PR middle-end/83850
16470 * expmed.c (extract_bit_field_1): Fix typo.
16472 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16475 * config/arm/iterators.md (VF): New mode iterator.
16476 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16477 Remove integer-related logic from pattern.
16478 (neon_vabd<mode>_3): Likewise.
16480 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16482 PR middle-end/82694
16483 * common.opt (fstrict-overflow): No longer an alias.
16484 (fwrapv-pointer): New option.
16485 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16486 also for pointer types based on flag_wrapv_pointer.
16487 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16488 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16489 opts->x_flag_wrapv got set.
16490 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16491 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16492 POINTER_TYPE_OVERFLOW_UNDEFINED.
16493 * match.pd: Likewise in address comparison pattern.
16494 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16496 2018-01-15 Richard Biener <rguenther@suse.de>
16499 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16500 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
16501 Reset type names to their identifier if their TYPE_DECL doesn't
16502 have linkage (and thus is used for ODR and devirt).
16503 (save_debug_info_for_decl): Remove.
16504 (save_debug_info_for_type): Likewise.
16505 (add_tree_to_fld_list): Adjust.
16506 * tree-pretty-print.c (dump_generic_node): Make dumping of
16507 type names more robust.
16509 2018-01-15 Richard Biener <rguenther@suse.de>
16511 * BASE-VER: Bump to 8.0.1.
16513 2018-01-14 Martin Sebor <msebor@redhat.com>
16516 * builtins.c (check_access): Avoid warning when the no-warning bit
16519 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
16521 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16522 * ira-color (allocno_hard_regs_compare): Likewise.
16524 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
16527 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16528 Use .pushsection/.popsection.
16530 2018-01-14 Martin Sebor <msebor@redhat.com>
16533 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16535 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16537 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16538 entry from extra_headers.
16539 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16540 extra_headers, make the list bitwise identical to the i?86-*-* one.
16542 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16544 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16545 -mcmodel=large with -mindirect-branch=thunk,
16546 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16547 -mfunction-return=thunk-extern.
16548 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16549 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16550 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16552 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16554 * config/i386/i386.c (print_reg): Print the name of the full
16555 integer register without '%'.
16556 (ix86_print_operand): Handle 'V'.
16557 * doc/extend.texi: Document 'V' modifier.
16559 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16561 * config/i386/constraints.md (Bs): Disallow memory operand for
16562 -mindirect-branch-register.
16564 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16565 (GOT_memory_operand): Likewise.
16566 (call_insn_operand): Likewise.
16567 (sibcall_insn_operand): Likewise.
16568 (GOT32_symbol_operand): Likewise.
16569 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16570 for -mindirect-branch-register.
16571 (tablejump): Likewise.
16572 (*sibcall_memory): Likewise.
16573 (*sibcall_value_memory): Likewise.
16574 Disallow peepholes of indirect call and jump via memory for
16575 -mindirect-branch-register.
16576 (*call_pop): Replace m with Bw.
16577 (*call_value_pop): Likewise.
16578 (*sibcall_pop_memory): Replace m with Bs.
16579 * config/i386/i386.opt (mindirect-branch-register): New option.
16580 * doc/invoke.texi: Document -mindirect-branch-register option.
16582 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16584 * config/i386/i386-protos.h (ix86_output_function_return): New.
16585 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16586 set function_return_type.
16587 (indirect_thunk_name): Add ret_p to indicate thunk for function
16589 (output_indirect_thunk_function): Pass false to
16590 indirect_thunk_name.
16591 (ix86_output_indirect_branch_via_reg): Likewise.
16592 (ix86_output_indirect_branch_via_push): Likewise.
16593 (output_indirect_thunk_function): Create alias for function
16594 return thunk if regno < 0.
16595 (ix86_output_function_return): New function.
16596 (ix86_handle_fndecl_attribute): Handle function_return.
16597 (ix86_attribute_table): Add function_return.
16598 * config/i386/i386.h (machine_function): Add
16599 function_return_type.
16600 * config/i386/i386.md (simple_return_internal): Use
16601 ix86_output_function_return.
16602 (simple_return_internal_long): Likewise.
16603 * config/i386/i386.opt (mfunction-return=): New option.
16604 (indirect_branch): Mention -mfunction-return=.
16605 * doc/extend.texi: Document function_return function attribute.
16606 * doc/invoke.texi: Document -mfunction-return= option.
16608 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16610 * config/i386/i386-opts.h (indirect_branch): New.
16611 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16612 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16613 with local indirect jump when converting indirect call and jump.
16614 (ix86_set_indirect_branch_type): New.
16615 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16616 (indirectlabelno): New.
16617 (indirect_thunk_needed): Likewise.
16618 (indirect_thunk_bnd_needed): Likewise.
16619 (indirect_thunks_used): Likewise.
16620 (indirect_thunks_bnd_used): Likewise.
16621 (INDIRECT_LABEL): Likewise.
16622 (indirect_thunk_name): Likewise.
16623 (output_indirect_thunk): Likewise.
16624 (output_indirect_thunk_function): Likewise.
16625 (ix86_output_indirect_branch_via_reg): Likewise.
16626 (ix86_output_indirect_branch_via_push): Likewise.
16627 (ix86_output_indirect_branch): Likewise.
16628 (ix86_output_indirect_jmp): Likewise.
16629 (ix86_code_end): Call output_indirect_thunk_function if needed.
16630 (ix86_output_call_insn): Call ix86_output_indirect_branch if
16632 (ix86_handle_fndecl_attribute): Handle indirect_branch.
16633 (ix86_attribute_table): Add indirect_branch.
16634 * config/i386/i386.h (machine_function): Add indirect_branch_type
16635 and has_local_indirect_jump.
16636 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16638 (tablejump): Likewise.
16639 (*indirect_jump): Use ix86_output_indirect_jmp.
16640 (*tablejump_1): Likewise.
16641 (simple_return_indirect_internal): Likewise.
16642 * config/i386/i386.opt (mindirect-branch=): New option.
16643 (indirect_branch): New.
16646 (thunk-inline): Likewise.
16647 (thunk-extern): Likewise.
16648 * doc/extend.texi: Document indirect_branch function attribute.
16649 * doc/invoke.texi: Document -mindirect-branch= option.
16651 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
16654 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16656 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
16658 * ipa-inline.c (want_inline_small_function_p): Return false if
16659 inlining has already failed with CIF_FINAL_ERROR.
16660 (update_caller_keys): Call want_inline_small_function_p before
16662 (update_callee_keys): Likewise.
16664 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16666 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16668 (rs6000_quadword_masked_address_p): Likewise.
16669 (quad_aligned_load_p): Likewise.
16670 (quad_aligned_store_p): Likewise.
16671 (const_load_sequence_p): Add comment to describe the outer-most loop.
16672 (mimic_memory_attributes_and_flags): New function.
16673 (rs6000_gen_stvx): Likewise.
16674 (replace_swapped_aligned_store): Likewise.
16675 (rs6000_gen_lvx): Likewise.
16676 (replace_swapped_aligned_load): Likewise.
16677 (replace_swapped_load_constant): Capitalize argument name in
16678 comment describing this function.
16679 (rs6000_analyze_swaps): Add a third pass to search for vector loads
16680 and stores that access quad-word aligned addresses and replace
16681 with stvx or lvx instructions when appropriate.
16682 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16683 New function prototype.
16684 (rs6000_quadword_masked_address_p): Likewise.
16685 (rs6000_gen_lvx): Likewise.
16686 (rs6000_gen_stvx): Likewise.
16687 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16688 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16689 when memory address is aligned.
16690 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16691 this split to select lvx instruction when memory address is aligned.
16692 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16693 instruction when memory address is aligned.
16694 (*vsx_le_perm_load_v16qi): Likewise.
16695 (four unnamed splitters): Modify to select the stvx instruction
16696 when memory is aligned.
16698 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
16700 * predict.c (determine_unlikely_bbs): Handle correctly BBs
16701 which appears in the queue multiple times.
16703 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16704 Alan Hayward <alan.hayward@arm.com>
16705 David Sherwood <david.sherwood@arm.com>
16707 * tree-vectorizer.h (vec_lower_bound): New structure.
16708 (_loop_vec_info): Add check_nonzero and lower_bounds.
16709 (LOOP_VINFO_CHECK_NONZERO): New macro.
16710 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16711 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16712 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16713 fields. Make seg_len the distance travelled, not including the
16715 (dr_direction_indicator): Declare.
16716 (dr_zero_step_indicator): Likewise.
16717 (dr_known_forward_stride_p): Likewise.
16718 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16720 (runtime_alias_check_p): Allow runtime alias checks with
16722 (operator ==): Compare access_size and align.
16723 (prune_runtime_alias_test_list): Rework for new distinction between
16724 the access_size and seg_len.
16725 (create_intersect_range_checks_index): Likewise. Cope with polynomial
16727 (get_segment_min_max): New function.
16728 (create_intersect_range_checks): Use it.
16729 (dr_step_indicator): New function.
16730 (dr_direction_indicator): Likewise.
16731 (dr_zero_step_indicator): Likewise.
16732 (dr_known_forward_stride_p): Likewise.
16733 * tree-loop-distribution.c (data_ref_segment_size): Return
16734 DR_STEP * (niters - 1).
16735 (compute_alias_check_pairs): Update call to the dr_with_seg_len
16737 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16738 (vect_preserves_scalar_order_p): New function, split out from...
16739 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
16740 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16741 (vect_vfa_access_size): New function.
16742 (vect_vfa_align): Likewise.
16743 (vect_compile_time_alias): Take access_size_a and access_b arguments.
16744 (dump_lower_bound): New function.
16745 (vect_check_lower_bound): Likewise.
16746 (vect_small_gap_p): Likewise.
16747 (vectorizable_with_step_bound_p): Likewise.
16748 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16749 depencies if the vectorization factor is 1. Convert the checks
16750 for nonzero steps into checks on the bounds of DR_STEP. Try using
16751 a bunds check for variable steps if the minimum required step is
16752 relatively small. Update calls to the dr_with_seg_len
16753 constructor and to vect_compile_time_alias.
16754 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16756 (vect_loop_versioning): Call it.
16757 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16759 (vect_estimate_min_profitable_iters): Account for any bounds checks.
16761 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16762 Alan Hayward <alan.hayward@arm.com>
16763 David Sherwood <david.sherwood@arm.com>
16765 * doc/sourcebuild.texi (vect_scatter_store): Document.
16766 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16768 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16770 * genopinit.c (main): Add supports_vec_scatter_store and
16771 supports_vec_scatter_store_cached to target_optabs.
16772 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16773 IFN_MASK_SCATTER_STORE.
16774 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16776 * internal-fn.h (internal_store_fn_p): Declare.
16777 (internal_fn_stored_value_index): Likewise.
16778 * internal-fn.c (scatter_store_direct): New macro.
16779 (expand_scatter_store_optab_fn): New function.
16780 (direct_scatter_store_optab_supported_p): New macro.
16781 (internal_store_fn_p): New function.
16782 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16783 IFN_MASK_SCATTER_STORE.
16784 (internal_fn_mask_index): Likewise.
16785 (internal_fn_stored_value_index): New function.
16786 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16787 for scatter stores.
16788 * optabs-query.h (supports_vec_scatter_store_p): Declare.
16789 * optabs-query.c (supports_vec_scatter_store_p): New function.
16790 * tree-vectorizer.h (vect_get_store_rhs): Declare.
16791 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16792 true for scatter stores.
16793 (vect_gather_scatter_fn_p): Handle scatter stores too.
16794 (vect_check_gather_scatter): Consider using scatter stores if
16795 supports_vec_scatter_store_p.
16796 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16797 scatter stores too.
16798 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16799 internal_fn_stored_value_index.
16800 (check_load_store_masking): Handle scatter stores too.
16801 (vect_get_store_rhs): Make public.
16802 (vectorizable_call): Use internal_store_fn_p.
16803 (vectorizable_store): Handle scatter store internal functions.
16804 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16805 when deciding whether the end of the group has been reached.
16806 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16807 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16808 (mask_scatter_store<mode>): New insns.
16810 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16811 Alan Hayward <alan.hayward@arm.com>
16812 David Sherwood <david.sherwood@arm.com>
16814 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16815 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16816 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16818 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16819 Use vect_truncate_gather_scatter_offset if we can't treat the
16820 operation as a normal gather load or scatter store.
16821 (get_group_load_store_type): Take the gather_scatter_info
16822 as argument. Try using a gather load or scatter store for
16823 single-element groups.
16824 (get_load_store_type): Update calls to get_group_load_store_type
16825 and vect_use_strided_gather_scatters_p.
16827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16828 Alan Hayward <alan.hayward@arm.com>
16829 David Sherwood <david.sherwood@arm.com>
16831 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16832 optional tree argument.
16833 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16835 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16836 but continue to use the current value as a fallback.
16837 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16838 to compare the updates.
16839 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16840 (get_load_store_type): Use it when handling a strided access.
16841 (vect_get_strided_load_store_ops): New function.
16842 (vect_get_data_ptr_increment): Likewise.
16843 (vectorizable_load): Handle strided gather loads. Always pass
16844 a step to vect_create_data_ref_ptr and bump_vector_ptr.
16846 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16847 Alan Hayward <alan.hayward@arm.com>
16848 David Sherwood <david.sherwood@arm.com>
16850 * doc/md.texi (gather_load@var{m}): Document.
16851 (mask_gather_load@var{m}): Likewise.
16852 * genopinit.c (main): Add supports_vec_gather_load and
16853 supports_vec_gather_load_cached to target_optabs.
16854 * optabs-tree.c (init_tree_optimization_optabs): Use
16855 ggc_cleared_alloc to allocate target_optabs.
16856 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16857 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16859 * internal-fn.h (internal_load_fn_p): Declare.
16860 (internal_gather_scatter_fn_p): Likewise.
16861 (internal_fn_mask_index): Likewise.
16862 (internal_gather_scatter_fn_supported_p): Likewise.
16863 * internal-fn.c (gather_load_direct): New macro.
16864 (expand_gather_load_optab_fn): New function.
16865 (direct_gather_load_optab_supported_p): New macro.
16866 (direct_internal_fn_optab): New function.
16867 (internal_load_fn_p): Likewise.
16868 (internal_gather_scatter_fn_p): Likewise.
16869 (internal_fn_mask_index): Likewise.
16870 (internal_gather_scatter_fn_supported_p): Likewise.
16871 * optabs-query.c (supports_at_least_one_mode_p): New function.
16872 (supports_vec_gather_load_p): Likewise.
16873 * optabs-query.h (supports_vec_gather_load_p): Declare.
16874 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16875 and memory_type field.
16876 (NUM_PATTERNS): Bump to 15.
16877 * tree-vect-data-refs.c: Include internal-fn.h.
16878 (vect_gather_scatter_fn_p): New function.
16879 (vect_describe_gather_scatter_call): Likewise.
16880 (vect_check_gather_scatter): Try using internal functions for
16881 gather loads. Recognize existing calls to a gather load function.
16882 (vect_analyze_data_refs): Consider using gather loads if
16883 supports_vec_gather_load_p.
16884 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16885 (vect_get_gather_scatter_offset_type): Likewise.
16886 (vect_convert_mask_for_vectype): Likewise.
16887 (vect_add_conversion_to_patterm): Likewise.
16888 (vect_try_gather_scatter_pattern): Likewise.
16889 (vect_recog_gather_scatter_pattern): New pattern recognizer.
16890 (vect_vect_recog_func_ptrs): Add it.
16891 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16892 internal_fn_mask_index and internal_gather_scatter_fn_p.
16893 (check_load_store_masking): Take the gather_scatter_info as an
16894 argument and handle gather loads.
16895 (vect_get_gather_scatter_ops): New function.
16896 (vectorizable_call): Check internal_load_fn_p.
16897 (vectorizable_load): Likewise. Handle gather load internal
16899 (vectorizable_store): Update call to check_load_store_masking.
16900 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16901 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16902 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16903 (aarch64_gather_scale_operand_d): New predicates.
16904 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16905 (mask_gather_load<mode>): New insns.
16907 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16908 Alan Hayward <alan.hayward@arm.com>
16909 David Sherwood <david.sherwood@arm.com>
16911 * optabs.def (fold_left_plus_optab): New optab.
16912 * doc/md.texi (fold_left_plus_@var{m}): Document.
16913 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16914 * internal-fn.c (fold_left_direct): Define.
16915 (expand_fold_left_optab_fn): Likewise.
16916 (direct_fold_left_optab_supported_p): Likewise.
16917 * fold-const-call.c (fold_const_fold_left): New function.
16918 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16919 * tree-parloops.c (valid_reduction_p): New function.
16920 (gather_scalar_reductions): Use it.
16921 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16922 (vect_finish_replace_stmt): Declare.
16923 * tree-vect-loop.c (fold_left_reduction_fn): New function.
16924 (needs_fold_left_reduction_p): New function, split out from...
16925 (vect_is_simple_reduction): ...here. Accept reductions that
16926 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16927 (vect_force_simple_reduction): Also store the reduction type in
16928 the assignment's STMT_VINFO_REDUC_TYPE.
16929 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16930 (merge_with_identity): New function.
16931 (vect_expand_fold_left): Likewise.
16932 (vectorize_fold_left_reduction): Likewise.
16933 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
16934 scalar phi in place for it. Check for target support and reject
16935 cases that would reassociate the operation. Defer the transform
16936 phase to vectorize_fold_left_reduction.
16937 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16938 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16939 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16941 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16943 * tree-if-conv.c (predicate_mem_writes): Remove redundant
16944 call to ifc_temp_var.
16946 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16947 Alan Hayward <alan.hayward@arm.com>
16948 David Sherwood <david.sherwood@arm.com>
16950 * target.def (legitimize_address_displacement): Take the original
16951 offset as a poly_int.
16952 * targhooks.h (default_legitimize_address_displacement): Update
16954 * targhooks.c (default_legitimize_address_displacement): Likewise.
16955 * doc/tm.texi: Regenerate.
16956 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16957 as an argument, moving assert of ad->disp == ad->disp_term to...
16958 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
16959 Try calling targetm.legitimize_address_displacement before expanding
16960 the address rather than afterwards, and adjust for the new interface.
16961 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16962 Match the new hook interface. Handle SVE addresses.
16963 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16964 new hook interface.
16966 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16968 * Makefile.in (OBJS): Add early-remat.o.
16969 * target.def (select_early_remat_modes): New hook.
16970 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16971 * doc/tm.texi: Regenerate.
16972 * targhooks.h (default_select_early_remat_modes): Declare.
16973 * targhooks.c (default_select_early_remat_modes): New function.
16974 * timevar.def (TV_EARLY_REMAT): New timevar.
16975 * passes.def (pass_early_remat): New pass.
16976 * tree-pass.h (make_pass_early_remat): Declare.
16977 * early-remat.c: New file.
16978 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16980 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16982 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16983 Alan Hayward <alan.hayward@arm.com>
16984 David Sherwood <david.sherwood@arm.com>
16986 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16987 vfm1 with a bound_epilog parameter.
16988 (vect_do_peeling): Update calls accordingly, and move the prologue
16989 call earlier in the function. Treat the base bound_epilog as 0 for
16990 fully-masked loops and retain vf - 1 for other loops. Add 1 to
16991 this base when peeling for gaps.
16992 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16993 with fully-masked loops.
16994 (vect_estimate_min_profitable_iters): Handle the single peeled
16995 iteration in that case.
16997 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16998 Alan Hayward <alan.hayward@arm.com>
16999 David Sherwood <david.sherwood@arm.com>
17001 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17002 single-element interleaving even if the size is not a power of 2.
17003 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17004 accesses for single-element interleaving if the group size is
17007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17008 Alan Hayward <alan.hayward@arm.com>
17009 David Sherwood <david.sherwood@arm.com>
17011 * doc/md.texi (fold_extract_last_@var{m}): Document.
17012 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17013 * optabs.def (fold_extract_last_optab): New optab.
17014 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17015 * internal-fn.c (fold_extract_direct): New macro.
17016 (expand_fold_extract_optab_fn): Likewise.
17017 (direct_fold_extract_optab_supported_p): Likewise.
17018 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17019 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17020 EXTRACT_LAST_REDUCTION.
17021 (get_initial_def_for_reduction): Do not create an initial vector
17022 for EXTRACT_LAST_REDUCTION reductions.
17023 (vectorizable_reduction): Leave the scalar phi in place for
17024 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17025 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17026 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17027 transform phase to vectorizable_condition.
17028 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17030 (vect_finish_stmt_generation): ...here.
17031 (vect_finish_replace_stmt): New function.
17032 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17033 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17035 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17037 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17038 Alan Hayward <alan.hayward@arm.com>
17039 David Sherwood <david.sherwood@arm.com>
17041 * doc/md.texi (extract_last_@var{m}): Document.
17042 * optabs.def (extract_last_optab): New optab.
17043 * internal-fn.def (EXTRACT_LAST): New internal function.
17044 * internal-fn.c (cond_unary_direct): New macro.
17045 (expand_cond_unary_optab_fn): Likewise.
17046 (direct_cond_unary_optab_supported_p): Likewise.
17047 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17048 loops using EXTRACT_LAST.
17049 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17050 (extract_last_<mode>): ...this optab.
17051 (vec_extract<mode><Vel>): Update accordingly.
17053 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17054 Alan Hayward <alan.hayward@arm.com>
17055 David Sherwood <david.sherwood@arm.com>
17057 * target.def (empty_mask_is_expensive): New hook.
17058 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17059 * doc/tm.texi: Regenerate.
17060 * targhooks.h (default_empty_mask_is_expensive): Declare.
17061 * targhooks.c (default_empty_mask_is_expensive): New function.
17062 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17063 if the target says that empty masks are expensive.
17064 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17066 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17068 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17069 Alan Hayward <alan.hayward@arm.com>
17070 David Sherwood <david.sherwood@arm.com>
17072 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17073 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17074 (vect_use_loop_mask_for_alignment_p): New function.
17075 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17076 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17077 niters_skip argument. Make sure that the first niters_skip elements
17078 of the first iteration are inactive.
17079 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17080 Update call to vect_set_loop_masks_directly.
17081 (get_misalign_in_elems): New function, split out from...
17082 (vect_gen_prolog_loop_niters): ...here.
17083 (vect_update_init_of_dr): Take a code argument that specifies whether
17084 the adjustment should be added or subtracted.
17085 (vect_update_init_of_drs): Likewise.
17086 (vect_prepare_for_masked_peels): New function.
17087 (vect_do_peeling): Skip prologue peeling if we're using a mask
17088 instead. Update call to vect_update_inits_of_drs.
17089 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17091 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17092 alignment. Do not include the number of peeled iterations in
17093 the minimum threshold in that case.
17094 (vectorizable_induction): Adjust the start value down by
17095 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17096 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17097 Take the number of skipped iterations into account when calculating
17099 * tree-vect-stmts.c (vect_gen_while_not): New function.
17101 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17102 Alan Hayward <alan.hayward@arm.com>
17103 David Sherwood <david.sherwood@arm.com>
17105 * doc/sourcebuild.texi (vect_fully_masked): Document.
17106 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17107 default value to 0.
17108 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17110 (vect_analyze_loop_2): ...here. Don't check the vectorization
17111 factor against the number of loop iterations if the loop is
17114 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17115 Alan Hayward <alan.hayward@arm.com>
17116 David Sherwood <david.sherwood@arm.com>
17118 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17119 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17120 (dump_groups): Update accordingly.
17121 (iv_use::mem_type): New member variable.
17122 (address_p): New function.
17123 (record_use): Add a mem_type argument and initialize the new
17125 (record_group_use): Add a mem_type argument. Use address_p.
17126 Remove obsolete null checks of base_object. Update call to record_use.
17127 (find_interesting_uses_op): Update call to record_group_use.
17128 (find_interesting_uses_cond): Likewise.
17129 (find_interesting_uses_address): Likewise.
17130 (get_mem_type_for_internal_fn): New function.
17131 (find_address_like_use): Likewise.
17132 (find_interesting_uses_stmt): Try find_address_like_use before
17133 calling find_interesting_uses_op.
17134 (addr_offset_valid_p): Use the iv mem_type field as the type
17135 of the addressed memory.
17136 (add_autoinc_candidates): Likewise.
17137 (get_address_cost): Likewise.
17138 (split_small_address_groups_p): Use address_p.
17139 (split_address_groups): Likewise.
17140 (add_iv_candidate_for_use): Likewise.
17141 (autoinc_possible_for_pair): Likewise.
17142 (rewrite_groups): Likewise.
17143 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17144 (determine_group_iv_cost): Update after split of USE_ADDRESS.
17145 (get_alias_ptr_type_for_ptr_address): New function.
17146 (rewrite_use_address): Rewrite address uses in calls that were
17147 identified by find_address_like_use.
17149 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17150 Alan Hayward <alan.hayward@arm.com>
17151 David Sherwood <david.sherwood@arm.com>
17153 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17155 * gimple-expr.h (is_gimple_addressable: Likewise.
17156 * gimple-expr.c (is_gimple_address): Likewise.
17157 * internal-fn.c (expand_call_mem_ref): New function.
17158 (expand_mask_load_optab_fn): Use it.
17159 (expand_mask_store_optab_fn): Likewise.
17161 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17162 Alan Hayward <alan.hayward@arm.com>
17163 David Sherwood <david.sherwood@arm.com>
17165 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17166 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17167 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17168 (cond_umax@var{mode}): Document.
17169 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17170 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17171 (cond_umin_optab, cond_umax_optab): New optabs.
17172 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17173 (COND_IOR, COND_XOR): New internal functions.
17174 * internal-fn.h (get_conditional_internal_fn): Declare.
17175 * internal-fn.c (cond_binary_direct): New macro.
17176 (expand_cond_binary_optab_fn): Likewise.
17177 (direct_cond_binary_optab_supported_p): Likewise.
17178 (get_conditional_internal_fn): New function.
17179 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17180 Cope with reduction statements that are vectorized as calls rather
17182 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17183 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17184 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17185 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17186 (UNSPEC_COND_EOR): New unspecs.
17187 (optab): Add mappings for them.
17188 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17189 (sve_int_op, sve_fp_op): New int attributes.
17191 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17192 Alan Hayward <alan.hayward@arm.com>
17193 David Sherwood <david.sherwood@arm.com>
17195 * optabs.def (while_ult_optab): New optab.
17196 * doc/md.texi (while_ult@var{m}@var{n}): Document.
17197 * internal-fn.def (WHILE_ULT): New internal function.
17198 * internal-fn.h (direct_internal_fn_supported_p): New override
17199 that takes two types as argument.
17200 * internal-fn.c (while_direct): New macro.
17201 (expand_while_optab_fn): New function.
17202 (convert_optab_supported_p): Likewise.
17203 (direct_while_optab_supported_p): New macro.
17204 * wide-int.h (wi::udiv_ceil): New function.
17205 * tree-vectorizer.h (rgroup_masks): New structure.
17206 (vec_loop_masks): New typedef.
17207 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17208 and fully_masked_p.
17209 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17210 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17211 (vect_max_vf): New function.
17212 (slpeel_make_loop_iterate_ntimes): Delete.
17213 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17214 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17215 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17216 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17217 internal-fn.h, stor-layout.h and optabs-query.h.
17218 (vect_set_loop_mask): New function.
17219 (add_preheader_seq): Likewise.
17220 (add_header_seq): Likewise.
17221 (interleave_supported_p): Likewise.
17222 (vect_maybe_permute_loop_masks): Likewise.
17223 (vect_set_loop_masks_directly): Likewise.
17224 (vect_set_loop_condition_masked): Likewise.
17225 (vect_set_loop_condition_unmasked): New function, split out from
17226 slpeel_make_loop_iterate_ntimes.
17227 (slpeel_make_loop_iterate_ntimes): Rename to..
17228 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
17229 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17230 (vect_do_peeling): Update call accordingly.
17231 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17233 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17234 mask_compare_type, can_fully_mask_p and fully_masked_p.
17235 (release_vec_loop_masks): New function.
17236 (_loop_vec_info): Use it to free the loop masks.
17237 (can_produce_all_loop_masks_p): New function.
17238 (vect_get_max_nscalars_per_iter): Likewise.
17239 (vect_verify_full_masking): Likewise.
17240 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17241 retries, and free the mask rgroups before retrying. Check loop-wide
17242 reasons for disallowing fully-masked loops. Make the final decision
17243 about whether use a fully-masked loop or not.
17244 (vect_estimate_min_profitable_iters): Do not assume that peeling
17245 for the number of iterations will be needed for fully-masked loops.
17246 (vectorizable_reduction): Disable fully-masked loops.
17247 (vectorizable_live_operation): Likewise.
17248 (vect_halve_mask_nunits): New function.
17249 (vect_double_mask_nunits): Likewise.
17250 (vect_record_loop_mask): Likewise.
17251 (vect_get_loop_mask): Likewise.
17252 (vect_transform_loop): Handle the case in which the final loop
17253 iteration might handle a partial vector. Call vect_set_loop_condition
17254 instead of slpeel_make_loop_iterate_ntimes.
17255 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17256 (check_load_store_masking): New function.
17257 (prepare_load_store_mask): Likewise.
17258 (vectorizable_store): Handle fully-masked loops.
17259 (vectorizable_load): Likewise.
17260 (supportable_widening_operation): Use vect_halve_mask_nunits for
17262 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17263 (vect_gen_while): New function.
17264 * config/aarch64/aarch64.md (umax<mode>3): New expander.
17265 (aarch64_uqdec<mode>): New insn.
17267 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17268 Alan Hayward <alan.hayward@arm.com>
17269 David Sherwood <david.sherwood@arm.com>
17271 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17272 (reduc_xor_scal_optab): New optabs.
17273 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17274 (reduc_xor_scal_@var{m}): Document.
17275 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17276 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17277 internal functions.
17278 * fold-const-call.c (fold_const_call): Handle them.
17279 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17280 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17281 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17282 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17283 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17284 (UNSPEC_XORV): New unspecs.
17285 (optab): Add entries for them.
17286 (BITWISEV): New int iterator.
17287 (bit_reduc_op): New int attributes.
17289 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17290 Alan Hayward <alan.hayward@arm.com>
17291 David Sherwood <david.sherwood@arm.com>
17293 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17294 * internal-fn.def (VEC_SHL_INSERT): New internal function.
17295 * optabs.def (vec_shl_insert_optab): New optab.
17296 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17297 (duplicate_and_interleave): Likewise.
17298 * tree-vect-loop.c: Include internal-fn.h.
17299 (neutral_op_for_slp_reduction): New function, split out from
17300 get_initial_defs_for_reduction.
17301 (get_initial_def_for_reduction): Handle option 2 for variable-length
17302 vectors by loading the neutral value into a vector and then shifting
17303 the initial value into element 0.
17304 (get_initial_defs_for_reduction): Replace the code argument with
17305 the neutral value calculated by neutral_op_for_slp_reduction.
17306 Use gimple_build_vector for constant-length vectors.
17307 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17308 but the first group_size elements have a neutral value.
17309 Use duplicate_and_interleave otherwise.
17310 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17311 Update call to get_initial_defs_for_reduction. Handle SLP
17312 reductions for variable-length vectors by creating one vector
17313 result for each scalar result, with the elements associated
17314 with other scalar results stubbed out with the neutral value.
17315 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17316 Require IFN_VEC_SHL_INSERT for double reductions on
17317 variable-length vectors, or SLP reductions that have
17318 a neutral value. Require can_duplicate_and_interleave_p
17319 support for variable-length unchained SLP reductions if there
17320 is no neutral value, such as for MIN/MAX reductions. Also require
17321 the number of vector elements to be a multiple of the number of
17322 SLP statements when doing variable-length unchained SLP reductions.
17323 Update call to vect_create_epilog_for_reduction.
17324 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17325 and remove initial values.
17326 (duplicate_and_interleave): Make public.
17327 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17328 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17330 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17331 Alan Hayward <alan.hayward@arm.com>
17332 David Sherwood <david.sherwood@arm.com>
17334 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17335 (can_duplicate_and_interleave_p): New function.
17336 (vect_get_and_check_slp_defs): Take the vector of statements
17337 rather than just the current one. Remove excess parentheses.
17338 Restriction rejectinon of vect_constant_def and vect_external_def
17339 for variable-length vectors to boolean types, or types for which
17340 can_duplicate_and_interleave_p is false.
17341 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17342 (duplicate_and_interleave): New function.
17343 (vect_get_constant_vectors): Use gimple_build_vector for
17344 constant-length vectors and suitable variable-length constant
17345 vectors. Use duplicate_and_interleave for other variable-length
17346 vectors. Don't defer the update when inserting new statements.
17348 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17349 Alan Hayward <alan.hayward@arm.com>
17350 David Sherwood <david.sherwood@arm.com>
17352 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17353 min_profitable_iters doesn't go negative.
17355 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17356 Alan Hayward <alan.hayward@arm.com>
17357 David Sherwood <david.sherwood@arm.com>
17359 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17360 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17361 * optabs.def (vec_mask_load_lanes_optab): New optab.
17362 (vec_mask_store_lanes_optab): Likewise.
17363 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17364 (MASK_STORE_LANES): Likewise.
17365 * internal-fn.c (mask_load_lanes_direct): New macro.
17366 (mask_store_lanes_direct): Likewise.
17367 (expand_mask_load_optab_fn): Handle masked operations.
17368 (expand_mask_load_lanes_optab_fn): New macro.
17369 (expand_mask_store_optab_fn): Handle masked operations.
17370 (expand_mask_store_lanes_optab_fn): New macro.
17371 (direct_mask_load_lanes_optab_supported_p): Likewise.
17372 (direct_mask_store_lanes_optab_supported_p): Likewise.
17373 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17375 (vect_load_lanes_supported): Likewise.
17376 * tree-vect-data-refs.c (strip_conversion): New function.
17377 (can_group_stmts_p): Likewise.
17378 (vect_analyze_data_ref_accesses): Use it instead of checking
17379 for a pair of assignments.
17380 (vect_store_lanes_supported): Take a masked_p parameter.
17381 (vect_load_lanes_supported): Likewise.
17382 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17383 vect_store_lanes_supported and vect_load_lanes_supported.
17384 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17385 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17386 parameter. Don't allow gaps for masked accesses.
17387 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
17388 and vect_load_lanes_supported.
17389 (get_load_store_type): Take a masked_p parameter and update
17390 call to get_group_load_store_type.
17391 (vectorizable_store): Update call to get_load_store_type.
17392 Handle IFN_MASK_STORE_LANES.
17393 (vectorizable_load): Update call to get_load_store_type.
17394 Handle IFN_MASK_LOAD_LANES.
17396 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17397 Alan Hayward <alan.hayward@arm.com>
17398 David Sherwood <david.sherwood@arm.com>
17400 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17402 * config/aarch64/aarch64-protos.h
17403 (aarch64_sve_struct_memory_operand_p): Declare.
17404 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17405 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17406 (VPRED, vpred): Handle SVE structure modes.
17407 * config/aarch64/constraints.md (Utx): New constraint.
17408 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17409 (aarch64_sve_struct_nonimmediate_operand): New predicates.
17410 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17411 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17412 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17413 structure modes. Split into pieces after RA.
17414 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17415 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17417 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17418 SVE structure modes.
17419 (aarch64_classify_address): Likewise.
17420 (sizetochar): Move earlier in file.
17421 (aarch64_print_operand): Handle SVE register lists.
17422 (aarch64_array_mode): New function.
17423 (aarch64_sve_struct_memory_operand_p): Likewise.
17424 (TARGET_ARRAY_MODE): Redefine.
17426 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17427 Alan Hayward <alan.hayward@arm.com>
17428 David Sherwood <david.sherwood@arm.com>
17430 * target.def (array_mode): New target hook.
17431 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17432 * doc/tm.texi: Regenerate.
17433 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17434 * hooks.c (hook_optmode_mode_uhwi_none): New function.
17435 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17436 targetm.array_mode.
17437 * stor-layout.c (mode_for_array): Likewise. Support polynomial
17440 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17441 Alan Hayward <alan.hayward@arm.com>
17442 David Sherwood <david.sherwood@arm.com>
17444 * fold-const.c (fold_binary_loc): Check the argument types
17445 rather than the result type when testing for a vector operation.
17447 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17449 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17450 * doc/tm.texi: Regenerate.
17452 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17453 Alan Hayward <alan.hayward@arm.com>
17454 David Sherwood <david.sherwood@arm.com>
17456 * doc/invoke.texi (-msve-vector-bits=): Document new option.
17457 (sve): Document new AArch64 extension.
17458 * doc/md.texi (w): Extend the description of the AArch64
17459 constraint to include SVE vectors.
17460 (Upl, Upa): Document new AArch64 predicate constraints.
17461 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17463 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17464 (msve-vector-bits=): New option.
17465 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17466 SVE when these are disabled.
17467 (sve): New extension.
17468 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17469 modes. Adjust their number of units based on aarch64_sve_vg.
17470 (MAX_BITSIZE_MODE_ANY_MODE): Define.
17471 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17472 aarch64_addr_query_type.
17473 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17474 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17475 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17476 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17477 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17478 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17479 (aarch64_simd_imm_zero_p): Delete.
17480 (aarch64_check_zero_based_sve_index_immediate): Declare.
17481 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17482 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17483 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17484 (aarch64_sve_float_mul_immediate_p): Likewise.
17485 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17486 rather than an rtx.
17487 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17488 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17489 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17490 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17491 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17492 (aarch64_regmode_natural_size): Likewise.
17493 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17494 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17496 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17497 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17498 for VG and the SVE predicate registers.
17499 (V_ALIASES): Add a "z"-prefixed alias.
17500 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17501 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17502 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17503 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17504 (REG_CLASS_NAMES): Add entries for them.
17505 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
17506 and the predicate registers.
17507 (aarch64_sve_vg): Declare.
17508 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17509 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17510 (REGMODE_NATURAL_SIZE): Define.
17511 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17513 * config/aarch64/aarch64.c: Include cfgrtl.h.
17514 (simd_immediate_info): Add a constructor for series vectors,
17515 and an associated step field.
17516 (aarch64_sve_vg): New variable.
17517 (aarch64_dbx_register_number): Handle VG and the predicate registers.
17518 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17519 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17520 (VEC_ANY_DATA, VEC_STRUCT): New constants.
17521 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17522 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17523 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17524 (aarch64_get_mask_mode): New functions.
17525 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17526 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17527 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
17528 predicate modes and predicate registers. Explicitly restrict
17529 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17530 to store a vector mode if it is recognized by
17531 aarch64_classify_vector_mode.
17532 (aarch64_regmode_natural_size): New function.
17533 (aarch64_hard_regno_caller_save_mode): Return the original mode
17535 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17536 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17537 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17538 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17540 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17541 does not overlap dest if the function is frame-related. Handle
17543 (aarch64_split_add_offset): New function.
17544 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17545 them aarch64_add_offset.
17546 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17547 and update call to aarch64_sub_sp.
17548 (aarch64_add_cfa_expression): New function.
17549 (aarch64_expand_prologue): Pass extra temporary registers to the
17550 functions above. Handle the case in which we need to emit new
17551 DW_CFA_expressions for registers that were originally saved
17552 relative to the stack pointer, but now have to be expressed
17553 relative to the frame pointer.
17554 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17556 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17557 IP0 and IP1 values for SVE frames.
17558 (aarch64_expand_vec_series): New function.
17559 (aarch64_expand_sve_widened_duplicate): Likewise.
17560 (aarch64_expand_sve_const_vector): Likewise.
17561 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17562 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17563 into the register, rather than emitting a SET directly.
17564 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17565 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17566 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17567 (offset_9bit_signed_scaled_p): New functions.
17568 (aarch64_replicate_bitmask_imm): New function.
17569 (aarch64_bitmask_imm): Use it.
17570 (aarch64_cannot_force_const_mem): Reject expressions involving
17571 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17572 (aarch64_classify_index): Handle SVE indices, by requiring
17573 a plain register index with a scale that matches the element size.
17574 (aarch64_classify_address): Handle SVE addresses. Assert that
17575 the mode of the address is VOIDmode or an integer mode.
17576 Update call to aarch64_classify_symbol.
17577 (aarch64_classify_symbolic_expression): Update call to
17578 aarch64_classify_symbol.
17579 (aarch64_const_vec_all_in_range_p): New function.
17580 (aarch64_print_vector_float_operand): Likewise.
17581 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17582 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17583 and the FP immediates 1.0 and 0.5.
17584 (aarch64_print_address_internal): Handle SVE addresses.
17585 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17586 (aarch64_regno_regclass): Handle predicate registers.
17587 (aarch64_secondary_reload): Handle big-endian reloads of SVE
17589 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17590 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17591 (aarch64_convert_sve_vector_bits): New function.
17592 (aarch64_override_options): Use it to handle -msve-vector-bits=.
17593 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17594 rather than an rtx.
17595 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17596 Handle SVE vector and predicate modes. Accept VL-based constants
17597 that need only one temporary register, and VL offsets that require
17598 no temporary registers.
17599 (aarch64_conditional_register_usage): Mark the predicate registers
17600 as fixed if SVE isn't available.
17601 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17602 Return true for SVE vector and predicate modes.
17603 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17604 rather than an unsigned int. Handle SVE modes.
17605 (aarch64_preferred_simd_mode): Update call accordingly. Handle
17607 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17609 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17610 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17611 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17612 (aarch64_sve_float_mul_immediate_p): New functions.
17613 (aarch64_sve_valid_immediate): New function.
17614 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17615 Explicitly reject structure modes. Check for INDEX constants.
17616 Handle PTRUE and PFALSE constants.
17617 (aarch64_check_zero_based_sve_index_immediate): New function.
17618 (aarch64_simd_imm_zero_p): Delete.
17619 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17620 vector modes. Accept constants in the range of CNT[BHWD].
17621 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17622 ask for an Advanced SIMD mode.
17623 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17624 (aarch64_simd_vector_alignment): Handle SVE predicates.
17625 (aarch64_vectorize_preferred_vector_alignment): New function.
17626 (aarch64_simd_vector_alignment_reachable): Use it instead of
17628 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17629 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17631 (MAX_VECT_LEN): Delete.
17632 (expand_vec_perm_d): Add a vec_flags field.
17633 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17634 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17635 (aarch64_evpc_ext): Don't apply a big-endian lane correction
17637 (aarch64_evpc_rev): Rename to...
17638 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
17639 (aarch64_evpc_rev_global): New function.
17640 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17641 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17643 (aarch64_evpc_sve_tbl): New function.
17644 (aarch64_expand_vec_perm_const_1): Update after rename of
17645 aarch64_evpc_rev. Handle SVE permutes too, trying
17646 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17647 than aarch64_evpc_tbl.
17648 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17649 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17650 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17651 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17652 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17653 (aarch64_expand_sve_vcond): New functions.
17654 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17655 of aarch64_vector_mode_p.
17656 (aarch64_dwarf_poly_indeterminate_value): New function.
17657 (aarch64_compute_pressure_classes): Likewise.
17658 (aarch64_can_change_mode_class): Likewise.
17659 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17660 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17661 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17662 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17663 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17664 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17665 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17666 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17668 (Dn, Dl, Dr): Accept const as well as const_vector.
17669 (Dz): Likewise. Compare against CONST0_RTX.
17670 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17671 of "vector" where appropriate.
17672 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17673 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17674 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17675 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17676 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17677 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17678 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17679 (v_int_equiv): Extend to SVE modes.
17680 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17682 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17683 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17684 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17685 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17686 (SVE_COND_FP_CMP): New int iterators.
17687 (perm_hilo): Handle the new unpack unspecs.
17688 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17690 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17691 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17692 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17693 (aarch64_equality_operator, aarch64_constant_vector_operand)
17694 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17695 (aarch64_sve_nonimmediate_operand): Likewise.
17696 (aarch64_sve_general_operand): Likewise.
17697 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17698 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17699 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17700 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17701 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17702 (aarch64_sve_float_arith_immediate): Likewise.
17703 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17704 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17705 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17706 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17707 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17708 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17709 (aarch64_sve_float_arith_operand): Likewise.
17710 (aarch64_sve_float_arith_with_sub_operand): Likewise.
17711 (aarch64_sve_float_mul_operand): Likewise.
17712 (aarch64_sve_vec_perm_operand): Likewise.
17713 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17714 (aarch64_mov_operand): Accept const_poly_int and const_vector.
17715 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17716 as well as const_vector.
17717 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17718 in file. Use CONST0_RTX and CONSTM1_RTX.
17719 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
17720 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17721 Use aarch64_simd_imm_zero.
17722 * config/aarch64/aarch64-sve.md: New file.
17723 * config/aarch64/aarch64.md: Include it.
17724 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17725 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17726 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17727 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17728 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17729 (sve): New attribute.
17730 (enabled): Disable instructions with the sve attribute unless
17732 (movqi, movhi): Pass CONST_POLY_INT operaneds through
17733 aarch64_expand_mov_immediate.
17734 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17735 CNT[BHSD] immediates.
17736 (movti): Split CONST_POLY_INT moves into two halves.
17737 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17738 Split additions that need a temporary here if the destination
17739 is the stack pointer.
17740 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17741 (*add<mode>3_poly_1): New instruction.
17742 (set_clobber_cc): New expander.
17744 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17746 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17747 parameter and use it instead of GET_MODE_SIZE (innermode). Use
17748 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17749 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17750 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
17751 Change innermode from fixed_mode_size to machine_mode.
17752 (simplify_subreg): Update call accordingly. Handle a constant-sized
17753 subreg of a variable-length CONST_VECTOR.
17755 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17756 Alan Hayward <alan.hayward@arm.com>
17757 David Sherwood <david.sherwood@arm.com>
17759 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17760 (add_offset_to_base): New function, split out from...
17761 (create_mem_ref): ...here. When handling a scale other than 1,
17762 check first whether the address is valid without the offset.
17763 Add it into the base if so, leaving the index and scale as-is.
17765 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17768 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17769 fold_for_warn before checking if arg2 is INTEGER_CST.
17771 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
17773 * config/rs6000/predicates.md (load_multiple_operation): Delete.
17774 (store_multiple_operation): Delete.
17775 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17776 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17777 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17778 guarded by TARGET_STRING.
17779 (rs6000_output_load_multiple): Delete.
17780 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17781 OPTION_MASK_STRING / TARGET_STRING handling.
17782 (print_operand) <'N', 'O'>: Add comment that these are unused now.
17783 (const rs6000_opt_masks) <"string">: Change mask to 0.
17784 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17785 (MASK_STRING): Delete.
17786 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17788 (load_multiple): Delete.
17795 (store_multiple): Delete.
17802 (movmemsi_8reg): Delete.
17803 (corresponding unnamed define_insn): Delete.
17804 (movmemsi_6reg): Delete.
17805 (corresponding unnamed define_insn): Delete.
17806 (movmemsi_4reg): Delete.
17807 (corresponding unnamed define_insn): Delete.
17808 (movmemsi_2reg): Delete.
17809 (corresponding unnamed define_insn): Delete.
17810 (movmemsi_1reg): Delete.
17811 (corresponding unnamed define_insn): Delete.
17812 * config/rs6000/rs6000.opt (mno-string): New.
17813 (mstring): Replace by deprecation warning stub.
17814 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17816 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17818 * regrename.c (regrename_do_replace): If replacing the same
17819 reg multiple times, try to reuse last created gen_raw_REG.
17822 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17823 main to workaround a bug in GDB.
17825 2018-01-12 Tom de Vries <tom@codesourcery.com>
17828 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17830 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
17832 PR rtl-optimization/80481
17833 * ira-color.c (get_cap_member): New function.
17834 (allocnos_conflict_by_live_ranges_p): Use it.
17835 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17836 (setup_slot_coalesced_allocno_live_ranges): Ditto.
17838 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
17841 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17842 (*saddl_se_1): Ditto.
17843 (*ssubsi_1): Ditto.
17844 (*ssubl_se_1): Ditto.
17846 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17848 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17849 rather than wi::to_widest for DR_INITs.
17850 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17851 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17852 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17854 (vect_analyze_group_access_1): Note that here.
17856 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17858 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17859 polynomial type sizes.
17861 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17863 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17864 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17865 (gimple_add_tmp_var): Likewise.
17867 2018-01-12 Martin Liska <mliska@suse.cz>
17869 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17870 (gimple_alloc_sizes): Likewise.
17871 (dump_gimple_statistics): Use PRIu64 in printf format.
17872 * gimple.h: Change uint64_t to int.
17874 2018-01-12 Martin Liska <mliska@suse.cz>
17876 * tree-core.h: Use uint64_t instead of int.
17877 * tree.c (tree_node_counts): Likewise.
17878 (tree_node_sizes): Likewise.
17879 (dump_tree_statistics): Use PRIu64 in printf format.
17881 2018-01-12 Martin Liska <mliska@suse.cz>
17883 * Makefile.in: As qsort_chk is implemented in vec.c, add
17884 vec.o to linkage of gencfn-macros.
17885 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17886 passing the info to record_node_allocation_statistics.
17887 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17889 * ggc-common.c (struct ggc_usage): Add operator== and use
17890 it in operator< and compare function.
17891 * mem-stats.h (struct mem_usage): Likewise.
17892 * vec.c (struct vec_usage): Remove operator< and compare
17893 function. Can be simply inherited.
17895 2018-01-12 Martin Jambor <mjambor@suse.cz>
17898 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17899 * tree-ssa-math-opts.c: Include domwalk.h.
17900 (convert_mult_to_fma_1): New function.
17901 (fma_transformation_info): New type.
17902 (fma_deferring_state): Likewise.
17903 (cancel_fma_deferring): New function.
17904 (result_of_phi): Likewise.
17905 (last_fma_candidate_feeds_initial_phi): Likewise.
17906 (convert_mult_to_fma): Added deferring logic, split actual
17907 transformation to convert_mult_to_fma_1.
17908 (math_opts_dom_walker): New type.
17909 (math_opts_dom_walker::after_dom_children): New method, body moved
17910 here from pass_optimize_widening_mul::execute, added deferring logic
17912 (pass_optimize_widening_mul::execute): Moved most of code to
17913 math_opts_dom_walker::after_dom_children.
17914 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17915 * config/i386/i386.c (ix86_option_override_internal): Added
17916 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17918 2018-01-12 Richard Biener <rguenther@suse.de>
17921 * dwarf2out.c (gen_variable_die): Do not reset old_die for
17922 inline instance vars.
17924 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
17927 * config/rx/rx.c (rx_is_restricted_memory_address):
17928 Handle SUBREG case.
17930 2018-01-12 Richard Biener <rguenther@suse.de>
17932 PR tree-optimization/80846
17933 * target.def (split_reduction): New target hook.
17934 * targhooks.c (default_split_reduction): New function.
17935 * targhooks.h (default_split_reduction): Declare.
17936 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17937 target requests first reduce vectors by combining low and high
17939 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17940 (get_vectype_for_scalar_type_and_size): Export.
17941 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17942 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17943 * doc/tm.texi: Regenerate.
17944 * config/i386/i386.c (ix86_split_reduction): Implement
17945 TARGET_VECTORIZE_SPLIT_REDUCTION.
17947 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17950 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17951 in PIC mode except for TARGET_VXWORKS_RTP.
17952 * config/sparc/sparc.c: Include cfgrtl.h.
17953 (TARGET_INIT_PIC_REG): Define.
17954 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17955 (sparc_pic_register_p): New predicate.
17956 (sparc_legitimate_address_p): Use it.
17957 (sparc_legitimize_pic_address): Likewise.
17958 (sparc_delegitimize_address): Likewise.
17959 (sparc_mode_dependent_address_p): Likewise.
17960 (gen_load_pcrel_sym): Remove 4th parameter.
17961 (load_got_register): Adjust call to above. Remove obsolete stuff.
17962 (sparc_expand_prologue): Do not call load_got_register here.
17963 (sparc_flat_expand_prologue): Likewise.
17964 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17965 (sparc_use_pseudo_pic_reg): New function.
17966 (sparc_init_pic_reg): Likewise.
17967 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17968 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17970 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
17972 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17973 Add item for branch_cost.
17975 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17977 PR rtl-optimization/83565
17978 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17979 not extend the result to a larger mode for rotate operations.
17980 (num_sign_bit_copies1): Likewise.
17982 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17985 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17987 Use values-Xc.o for -pedantic.
17988 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17990 2018-01-12 Martin Liska <mliska@suse.cz>
17993 * ipa-devirt.c (final_warning_record::grow_type_warnings):
17995 (possible_polymorphic_call_targets): Use it.
17996 (ipa_devirt): Likewise.
17998 2018-01-12 Martin Liska <mliska@suse.cz>
18000 * profile-count.h (enum profile_quality): Use 0 as invalid
18001 enum value of profile_quality.
18003 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18005 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18006 -mext-string options.
18008 2018-01-12 Richard Biener <rguenther@suse.de>
18010 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18011 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18012 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18014 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18016 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18018 * configure.ac (--with-long-double-format): Add support for the
18019 configuration option to change the default long double format on
18021 * config.gcc (powerpc*-linux*-*): Likewise.
18022 * configure: Regenerate.
18023 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18024 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18025 used without modification.
18027 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18029 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18030 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18031 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18032 MISC_BUILTIN_SPEC_BARRIER.
18033 (rs6000_init_builtins): Likewise.
18034 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18036 (speculation_barrier): New define_insn.
18037 * doc/extend.texi: Document __builtin_speculation_barrier.
18039 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18042 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18043 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18044 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18046 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18047 integral modes instead of "ss" and "sd".
18048 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18049 vectors with 32-bit and 64-bit elements.
18050 (vecdupssescalarmodesuffix): New mode attribute.
18051 (vec_dup<mode>): Use it.
18053 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18056 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18057 frame if argument is passed on stack.
18059 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18062 * ree.c (combine_reaching_defs): Optimize also
18063 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18064 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18066 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18068 PR middle-end/83189
18069 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18071 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18073 PR middle-end/83718
18074 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18075 after they are computed.
18077 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18079 PR tree-optimization/83695
18080 * gimple-loop-linterchange.cc
18081 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18082 reset cached scev information after interchange.
18083 (pass_linterchange::execute): Remove call to scev_reset_htab.
18085 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18087 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18088 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18089 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18090 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18091 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18092 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18093 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18094 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18095 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18096 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18097 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18098 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18099 (V_lane_reg): Likewise.
18100 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18102 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18103 (vfmal_lane_low<mode>_intrinsic,
18104 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18105 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18106 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18107 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18108 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18109 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18111 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18113 * config/arm/arm-cpus.in (fp16fml): New feature.
18114 (ALL_SIMD): Add fp16fml.
18115 (armv8.2-a): Add fp16fml as an option.
18116 (armv8.3-a): Likewise.
18117 (armv8.4-a): Add fp16fml as part of fp16.
18118 * config/arm/arm.h (TARGET_FP16FML): Define.
18119 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18121 * config/arm/arm-modes.def (V2HF): Define.
18122 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18123 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18124 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18125 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18126 vfmsl_low, vfmsl_high): New set of builtins.
18127 * config/arm/iterators.md (PLUSMINUS): New code iterator.
18128 (vfml_op): New code attribute.
18129 (VFMLHALVES): New int iterator.
18130 (VFML, VFMLSEL): New mode attributes.
18131 (V_reg): Define mapping for V2HF.
18132 (V_hi, V_lo): New mode attributes.
18133 (VF_constraint): Likewise.
18134 (vfml_half, vfml_half_selector): New int attributes.
18135 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18137 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18138 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18140 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18141 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18142 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18143 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
18145 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18146 Document new effective target and option set.
18148 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18150 * config/arm/arm-cpus.in (armv8_4): New feature.
18151 (ARMv8_4a): New fgroup.
18152 (armv8.4-a): New arch.
18153 * config/arm/arm-tables.opt: Regenerate.
18154 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18155 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18156 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18157 Add matching rules for -march=armv8.4-a and extensions.
18158 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18160 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
18163 * config/rx/rx.md (BW): New mode attribute.
18164 (sync_lock_test_and_setsi): Add mode suffix to insn output.
18166 2018-01-11 Richard Biener <rguenther@suse.de>
18168 PR tree-optimization/83435
18169 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18170 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18171 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18173 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18174 Alan Hayward <alan.hayward@arm.com>
18175 David Sherwood <david.sherwood@arm.com>
18177 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18179 (aarch64_classify_address): Initialize it. Track polynomial offsets.
18180 (aarch64_print_address_internal): Use it to check for a zero offset.
18182 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18183 Alan Hayward <alan.hayward@arm.com>
18184 David Sherwood <david.sherwood@arm.com>
18186 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18187 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18188 Return a poly_int64 rather than a HOST_WIDE_INT.
18189 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18190 rather than a HOST_WIDE_INT.
18191 * config/aarch64/aarch64.h (aarch64_frame): Protect with
18192 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
18193 hard_fp_offset, frame_size, initial_adjust, callee_offset and
18194 final_offset from HOST_WIDE_INT to poly_int64.
18195 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18196 to_constant when getting the number of units in an Advanced SIMD
18198 (aarch64_builtin_vectorized_function): Check for a constant number
18200 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18202 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18203 attribute instead of GET_MODE_NUNITS.
18204 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18205 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18206 GET_MODE_SIZE for fixed-size registers.
18207 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18208 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18209 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18210 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18211 (aarch64_print_operand, aarch64_print_address_internal)
18212 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18213 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18214 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18215 Handle polynomial GET_MODE_SIZE.
18216 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
18217 wider than SImode without modification.
18218 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18219 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18220 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18221 passing and returning SVE modes.
18222 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18223 rather than GEN_INT.
18224 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18225 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18226 (aarch64_allocate_and_probe_stack_space): Likewise.
18227 (aarch64_layout_frame): Cope with polynomial offsets.
18228 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18229 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
18230 polynomial offsets.
18231 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18232 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18233 poly_int64 rather than a HOST_WIDE_INT.
18234 (aarch64_get_separate_components, aarch64_process_components)
18235 (aarch64_expand_prologue, aarch64_expand_epilogue)
18236 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18237 (aarch64_anchor_offset): New function, split out from...
18238 (aarch64_legitimize_address): ...here.
18239 (aarch64_builtin_vectorization_cost): Handle polynomial
18240 TYPE_VECTOR_SUBPARTS.
18241 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18243 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18244 number of elements from the PARALLEL rather than the mode.
18245 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18246 rather than GET_MODE_BITSIZE.
18247 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18248 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18249 (aarch64_expand_vec_perm_const_1): Handle polynomial
18250 d->perm.length () and d->perm elements.
18251 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
18252 Apply to_constant to d->perm elements.
18253 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18254 polynomial CONST_VECTOR_NUNITS.
18255 (aarch64_move_pointer): Take amount as a poly_int64 rather
18257 (aarch64_progress_pointer): Avoid temporary variable.
18258 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18259 the mode attribute instead of GET_MODE.
18261 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18262 Alan Hayward <alan.hayward@arm.com>
18263 David Sherwood <david.sherwood@arm.com>
18265 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18266 x exists before using it.
18267 (aarch64_add_constant_internal): Rename to...
18268 (aarch64_add_offset_1): ...this. Replace regnum with separate
18269 src and dest rtxes. Handle the case in which they're different,
18270 including when the offset is zero. Replace scratchreg with an rtx.
18271 Use 2 additions if there is no spare register into which we can
18272 move a 16-bit constant.
18273 (aarch64_add_constant): Delete.
18274 (aarch64_add_offset): Replace reg with separate src and dest
18275 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
18276 Use aarch64_add_offset_1.
18277 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18278 an rtx rather than an int. Take the delta as a poly_int64
18279 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
18280 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18281 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18282 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18283 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18284 and aarch64_add_sp.
18285 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18286 aarch64_add_constant.
18288 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18290 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18291 Use scalar_float_mode.
18293 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18295 * config/aarch64/aarch64-simd.md
18296 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18297 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18298 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18299 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18300 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18301 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18302 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18303 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18304 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18305 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18307 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18310 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18311 targ_options->x_arm_arch_string is non NULL.
18313 2018-01-11 Tamar Christina <tamar.christina@arm.com>
18315 * config/aarch64/aarch64.h
18316 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
18318 2018-01-11 Sudakshina Das <sudi.das@arm.com>
18321 * expmed.c (emit_store_flag_force): Swap if const op0
18322 and change VOIDmode to mode of op0.
18324 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18326 PR rtl-optimization/83761
18327 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18328 than bytes to mode_for_size.
18330 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18332 PR middle-end/83189
18333 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18334 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18337 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18339 PR middle-end/83575
18340 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18341 when in layout mode.
18342 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18343 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18346 2018-01-10 Michael Collison <michael.collison@arm.com>
18348 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18349 * config/aarch64/aarch64-option-extension.def: Add
18350 AARCH64_OPT_EXTENSION of 'fp16fml'.
18351 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18352 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18353 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18354 * config/aarch64/constraints.md (Ui7): New constraint.
18355 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18356 (VFMLA_SEL_W): Ditto.
18359 (VFMLA16_LOW): New int iterator.
18360 (VFMLA16_HIGH): Ditto.
18361 (UNSPEC_FMLAL): New unspec.
18362 (UNSPEC_FMLSL): Ditto.
18363 (UNSPEC_FMLAL2): Ditto.
18364 (UNSPEC_FMLSL2): Ditto.
18365 (f16mac): New code attribute.
18366 * config/aarch64/aarch64-simd-builtins.def
18367 (aarch64_fmlal_lowv2sf): Ditto.
18368 (aarch64_fmlsl_lowv2sf): Ditto.
18369 (aarch64_fmlalq_lowv4sf): Ditto.
18370 (aarch64_fmlslq_lowv4sf): Ditto.
18371 (aarch64_fmlal_highv2sf): Ditto.
18372 (aarch64_fmlsl_highv2sf): Ditto.
18373 (aarch64_fmlalq_highv4sf): Ditto.
18374 (aarch64_fmlslq_highv4sf): Ditto.
18375 (aarch64_fmlal_lane_lowv2sf): Ditto.
18376 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18377 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18378 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18379 (aarch64_fmlalq_lane_lowv4sf): Ditto.
18380 (aarch64_fmlsl_lane_lowv4sf): Ditto.
18381 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18382 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18383 (aarch64_fmlal_lane_highv2sf): Ditto.
18384 (aarch64_fmlsl_lane_highv2sf): Ditto.
18385 (aarch64_fmlal_laneq_highv2sf): Ditto.
18386 (aarch64_fmlsl_laneq_highv2sf): Ditto.
18387 (aarch64_fmlalq_lane_highv4sf): Ditto.
18388 (aarch64_fmlsl_lane_highv4sf): Ditto.
18389 (aarch64_fmlalq_laneq_highv4sf): Ditto.
18390 (aarch64_fmlsl_laneq_highv4sf): Ditto.
18391 * config/aarch64/aarch64-simd.md:
18392 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18393 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18394 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18395 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18396 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18397 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18398 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18399 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18400 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18401 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18402 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18403 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18404 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18405 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18406 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18407 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18408 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18409 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18410 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18411 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18412 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18413 (vfmlsl_low_u32): Ditto.
18414 (vfmlalq_low_u32): Ditto.
18415 (vfmlslq_low_u32): Ditto.
18416 (vfmlal_high_u32): Ditto.
18417 (vfmlsl_high_u32): Ditto.
18418 (vfmlalq_high_u32): Ditto.
18419 (vfmlslq_high_u32): Ditto.
18420 (vfmlal_lane_low_u32): Ditto.
18421 (vfmlsl_lane_low_u32): Ditto.
18422 (vfmlal_laneq_low_u32): Ditto.
18423 (vfmlsl_laneq_low_u32): Ditto.
18424 (vfmlalq_lane_low_u32): Ditto.
18425 (vfmlslq_lane_low_u32): Ditto.
18426 (vfmlalq_laneq_low_u32): Ditto.
18427 (vfmlslq_laneq_low_u32): Ditto.
18428 (vfmlal_lane_high_u32): Ditto.
18429 (vfmlsl_lane_high_u32): Ditto.
18430 (vfmlal_laneq_high_u32): Ditto.
18431 (vfmlsl_laneq_high_u32): Ditto.
18432 (vfmlalq_lane_high_u32): Ditto.
18433 (vfmlslq_lane_high_u32): Ditto.
18434 (vfmlalq_laneq_high_u32): Ditto.
18435 (vfmlslq_laneq_high_u32): Ditto.
18436 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18437 (AARCH64_FL_FOR_ARCH8_4): New.
18438 (AARCH64_ISA_F16FML): New ISA flag.
18439 (TARGET_F16FML): New feature flag for fp16fml.
18440 (doc/invoke.texi): Document new fp16fml option.
18442 2018-01-10 Michael Collison <michael.collison@arm.com>
18444 * config/aarch64/aarch64-builtins.c:
18445 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18446 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18447 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18448 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18449 (AARCH64_ISA_SHA3): New ISA flag.
18450 (TARGET_SHA3): New feature flag for sha3.
18451 * config/aarch64/iterators.md (sha512_op): New int attribute.
18452 (CRYPTO_SHA512): New int iterator.
18453 (UNSPEC_SHA512H): New unspec.
18454 (UNSPEC_SHA512H2): Ditto.
18455 (UNSPEC_SHA512SU0): Ditto.
18456 (UNSPEC_SHA512SU1): Ditto.
18457 * config/aarch64/aarch64-simd-builtins.def
18458 (aarch64_crypto_sha512hqv2di): New builtin.
18459 (aarch64_crypto_sha512h2qv2di): Ditto.
18460 (aarch64_crypto_sha512su0qv2di): Ditto.
18461 (aarch64_crypto_sha512su1qv2di): Ditto.
18462 (aarch64_eor3qv8hi): Ditto.
18463 (aarch64_rax1qv2di): Ditto.
18464 (aarch64_xarqv2di): Ditto.
18465 (aarch64_bcaxqv8hi): Ditto.
18466 * config/aarch64/aarch64-simd.md:
18467 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18468 (aarch64_crypto_sha512su0qv2di): Ditto.
18469 (aarch64_crypto_sha512su1qv2di): Ditto.
18470 (aarch64_eor3qv8hi): Ditto.
18471 (aarch64_rax1qv2di): Ditto.
18472 (aarch64_xarqv2di): Ditto.
18473 (aarch64_bcaxqv8hi): Ditto.
18474 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18475 (vsha512h2q_u64): Ditto.
18476 (vsha512su0q_u64): Ditto.
18477 (vsha512su1q_u64): Ditto.
18478 (veor3q_u16): Ditto.
18479 (vrax1q_u64): Ditto.
18480 (vxarq_u64): Ditto.
18481 (vbcaxq_u16): Ditto.
18482 * config/arm/types.md (crypto_sha512): New type attribute.
18483 (crypto_sha3): Ditto.
18484 (doc/invoke.texi): Document new sha3 option.
18486 2018-01-10 Michael Collison <michael.collison@arm.com>
18488 * config/aarch64/aarch64-builtins.c:
18489 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18490 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18491 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18492 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18493 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18494 (AARCH64_ISA_SM4): New ISA flag.
18495 (TARGET_SM4): New feature flag for sm4.
18496 * config/aarch64/aarch64-simd-builtins.def
18497 (aarch64_sm3ss1qv4si): Ditto.
18498 (aarch64_sm3tt1aq4si): Ditto.
18499 (aarch64_sm3tt1bq4si): Ditto.
18500 (aarch64_sm3tt2aq4si): Ditto.
18501 (aarch64_sm3tt2bq4si): Ditto.
18502 (aarch64_sm3partw1qv4si): Ditto.
18503 (aarch64_sm3partw2qv4si): Ditto.
18504 (aarch64_sm4eqv4si): Ditto.
18505 (aarch64_sm4ekeyqv4si): Ditto.
18506 * config/aarch64/aarch64-simd.md:
18507 (aarch64_sm3ss1qv4si): Ditto.
18508 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18509 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18510 (aarch64_sm4eqv4si): Ditto.
18511 (aarch64_sm4ekeyqv4si): Ditto.
18512 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18513 (sm3part_op): Ditto.
18514 (CRYPTO_SM3TT): Ditto.
18515 (CRYPTO_SM3PART): Ditto.
18516 (UNSPEC_SM3SS1): New unspec.
18517 (UNSPEC_SM3TT1A): Ditto.
18518 (UNSPEC_SM3TT1B): Ditto.
18519 (UNSPEC_SM3TT2A): Ditto.
18520 (UNSPEC_SM3TT2B): Ditto.
18521 (UNSPEC_SM3PARTW1): Ditto.
18522 (UNSPEC_SM3PARTW2): Ditto.
18523 (UNSPEC_SM4E): Ditto.
18524 (UNSPEC_SM4EKEY): Ditto.
18525 * config/aarch64/constraints.md (Ui2): New constraint.
18526 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18527 * config/arm/types.md (crypto_sm3): New type attribute.
18528 (crypto_sm4): Ditto.
18529 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18530 (vsm3tt1aq_u32): Ditto.
18531 (vsm3tt1bq_u32): Ditto.
18532 (vsm3tt2aq_u32): Ditto.
18533 (vsm3tt2bq_u32): Ditto.
18534 (vsm3partw1q_u32): Ditto.
18535 (vsm3partw2q_u32): Ditto.
18536 (vsm4eq_u32): Ditto.
18537 (vsm4ekeyq_u32): Ditto.
18538 (doc/invoke.texi): Document new sm4 option.
18540 2018-01-10 Michael Collison <michael.collison@arm.com>
18542 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18543 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18544 (AARCH64_FL_FOR_ARCH8_4): New.
18545 (AARCH64_FL_V8_4): New flag.
18546 (doc/invoke.texi): Document new armv8.4-a option.
18548 2018-01-10 Michael Collison <michael.collison@arm.com>
18550 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18551 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18552 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18553 * config/aarch64/aarch64-option-extension.def: Add
18554 AARCH64_OPT_EXTENSION of 'sha2'.
18555 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18556 (crypto): Disable sha2 and aes if crypto disabled.
18557 (crypto): Enable aes and sha2 if enabled.
18558 (simd): Disable sha2 and aes if simd disabled.
18559 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18561 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18562 (TARGET_SHA2): New feature flag for sha2.
18563 (TARGET_AES): New feature flag for aes.
18564 * config/aarch64/aarch64-simd.md:
18565 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18566 conditional on TARGET_AES.
18567 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18568 (aarch64_crypto_sha1hsi): Make pattern conditional
18570 (aarch64_crypto_sha1hv4si): Ditto.
18571 (aarch64_be_crypto_sha1hv4si): Ditto.
18572 (aarch64_crypto_sha1su1v4si): Ditto.
18573 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18574 (aarch64_crypto_sha1su0v4si): Ditto.
18575 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18576 (aarch64_crypto_sha256su0v4si): Ditto.
18577 (aarch64_crypto_sha256su1v4si): Ditto.
18578 (doc/invoke.texi): Document new aes and sha2 options.
18580 2018-01-10 Martin Sebor <msebor@redhat.com>
18582 PR tree-optimization/83781
18583 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18586 2018-01-11 Martin Sebor <msebor@gmail.com>
18587 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18589 PR tree-optimization/83501
18590 PR tree-optimization/81703
18592 * tree-ssa-strlen.c (get_string_cst): Rename...
18593 (get_string_len): ...to this. Handle global constants.
18594 (handle_char_store): Adjust.
18596 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
18597 Jim Wilson <jimw@sifive.com>
18599 * config/riscv/riscv-protos.h (riscv_output_return): New.
18600 * config/riscv/riscv.c (struct machine_function): New naked_p field.
18601 (riscv_attribute_table, riscv_output_return),
18602 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18603 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18604 (riscv_compute_frame_info): Only compute frame->mask if not a naked
18606 (riscv_expand_prologue): Add early return for naked function.
18607 (riscv_expand_epilogue): Likewise.
18608 (riscv_function_ok_for_sibcall): Return false for naked function.
18609 (riscv_set_current_function): New.
18610 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18611 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18612 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18613 * doc/extend.texi (RISC-V Function Attributes): New.
18615 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18617 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18618 check for 128-bit long double before checking TCmode.
18619 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18620 128-bit long doubles before checking TFmode or TCmode.
18621 (FLOAT128_IBM_P): Likewise.
18623 2018-01-10 Martin Sebor <msebor@redhat.com>
18625 PR tree-optimization/83671
18626 * builtins.c (c_strlen): Unconditionally return zero for the empty
18628 Use -Warray-bounds for warnings.
18629 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18630 for non-constant array indices with COMPONENT_REF, arrays of
18631 arrays, and pointers to arrays.
18632 (gimple_fold_builtin_strlen): Determine and set length range for
18633 non-constant character arrays.
18635 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
18637 PR middle-end/81897
18638 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18641 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
18643 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18645 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18648 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18649 VECTOR_MEM_ALTIVEC_OR_VSX_P.
18650 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18651 indexed_or_indirect_operand predicate.
18652 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18653 (*vsx_le_perm_load_v8hi): Likewise.
18654 (*vsx_le_perm_load_v16qi): Likewise.
18655 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18656 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18657 (*vsx_le_perm_store_v8hi): Likewise.
18658 (*vsx_le_perm_store_v16qi): Likewise.
18659 (eight unnamed splitters): Likewise.
18661 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18663 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18664 * config/rs6000/emmintrin.h: Likewise.
18665 * config/rs6000/mmintrin.h: Likewise.
18666 * config/rs6000/xmmintrin.h: Likewise.
18668 2018-01-10 David Malcolm <dmalcolm@redhat.com>
18671 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18673 * tree.c (tree_nop_conversion): Return true for location wrapper
18675 (maybe_wrap_with_location): New function.
18676 (selftest::check_strip_nops): New function.
18677 (selftest::test_location_wrappers): New function.
18678 (selftest::tree_c_tests): Call it.
18679 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18680 (maybe_wrap_with_location): New decl.
18681 (EXPR_LOCATION_WRAPPER_P): New macro.
18682 (location_wrapper_p): New inline function.
18683 (tree_strip_any_location_wrapper): New inline function.
18685 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
18688 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18689 stack_realign_offset for the largest alignment of stack slot
18691 (ix86_find_max_used_stack_alignment): New function.
18692 (ix86_finalize_stack_frame_flags): Use it. Set
18693 max_used_stack_alignment if we don't realign stack.
18694 * config/i386/i386.h (machine_function): Add
18695 max_used_stack_alignment.
18697 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
18699 * config/arm/arm.opt (-mbranch-cost): New option.
18700 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18703 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
18706 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18707 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18709 2018-01-10 Richard Biener <rguenther@suse.de>
18712 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18713 early out so it also covers the case where we have a non-NULL
18716 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18718 PR tree-optimization/83753
18719 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18720 for non-strided grouped accesses if the number of elements is 1.
18722 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18725 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18726 * i386.h (TARGET_USE_GATHER): Define.
18727 * x86-tune.def (X86_TUNE_USE_GATHER): New.
18729 2018-01-10 Martin Liska <mliska@suse.cz>
18732 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18733 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18735 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18736 CLEANUP_NO_PARTITIONING is not set.
18738 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18740 * doc/rtl.texi: Remove documentation of (const ...) wrappers
18741 for vectors, as a partial revert of r254296.
18742 * rtl.h (const_vec_p): Delete.
18743 (const_vec_duplicate_p): Don't test for vector CONSTs.
18744 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18745 * expmed.c (make_tree): Likewise.
18748 * common.md (E, F): Use CONSTANT_P instead of checking for
18750 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18751 checking for CONST_VECTOR.
18753 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18755 PR middle-end/83575
18756 * predict.c (force_edge_cold): Handle in more sane way edges
18757 with no prediction.
18759 2018-01-09 Carl Love <cel@us.ibm.com>
18761 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18763 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18764 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18765 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18766 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
18767 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18768 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
18769 * config/rs6000/rs6000-protos.h: Add extern defition for
18770 rs6000_generate_float2_double_code.
18771 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18773 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18774 (float2_v2df): Add define_expand.
18776 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
18779 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18780 op_mode in the force_to_mode call.
18782 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18784 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18785 instead of checking each element individually.
18786 (aarch64_evpc_uzp): Likewise.
18787 (aarch64_evpc_zip): Likewise.
18788 (aarch64_evpc_ext): Likewise.
18789 (aarch64_evpc_rev): Likewise.
18790 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18791 instead of checking each element individually. Return true without
18793 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18794 whether all selected elements come from the same input, instead of
18795 checking each element individually. Remove calls to gen_rtx_REG,
18796 start_sequence and end_sequence and instead assert that no rtl is
18799 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18801 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18802 order of HIGH and CONST checks.
18804 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18806 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18807 if the destination isn't an SSA_NAME.
18809 2018-01-09 Richard Biener <rguenther@suse.de>
18811 PR tree-optimization/83668
18812 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18814 (canonicalize_loop_form): ... here, renamed from ...
18815 (canonicalize_loop_closed_ssa_form): ... this and amended to
18816 swap successor edges for loop exit blocks to make us use
18817 the RPO order we need for initial schedule generation.
18819 2018-01-09 Joseph Myers <joseph@codesourcery.com>
18821 PR tree-optimization/64811
18822 * match.pd: When optimizing comparisons with Inf, avoid
18823 introducing or losing exceptions from comparisons with NaN.
18825 2018-01-09 Martin Liska <mliska@suse.cz>
18828 * asan.c (shadow_mem_size): Add gcc_assert.
18830 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
18832 Don't save registers in main().
18835 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18836 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18837 * config/avr/avr.c (avr_set_current_function): Don't error if
18838 naked, OS_task or OS_main are specified at the same time.
18839 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18841 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18843 * common/config/avr/avr-common.c (avr_option_optimization_table):
18844 Switch on -mmain-is-OS_task for optimizing compilations.
18846 2018-01-09 Richard Biener <rguenther@suse.de>
18848 PR tree-optimization/83572
18849 * graphite.c: Include cfganal.h.
18850 (graphite_transform_loops): Connect infinite loops to exit
18851 and remove fake edges at the end.
18853 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18855 * ipa-inline.c (edge_badness): Revert accidental checkin.
18857 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18860 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18861 symbols; not inline clones.
18863 2018-01-09 Jakub Jelinek <jakub@redhat.com>
18866 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18867 hard registers. Formatting fixes.
18869 PR preprocessor/83722
18870 * gcc.c (try_generate_repro): Pass
18871 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18872 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18875 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
18876 Kito Cheng <kito.cheng@gmail.com>
18878 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18879 (riscv_leaf_function_p): Delete.
18880 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18882 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18884 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18886 (do_ifelse): New function.
18887 (do_isel): New function.
18888 (do_sub3): New function.
18889 (do_add3): New function.
18890 (do_load_mask_compare): New function.
18891 (do_overlap_load_compare): New function.
18892 (expand_compare_loop): New function.
18893 (expand_block_compare): Call expand_compare_loop() when appropriate.
18894 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18895 option description.
18896 (-mblock-compare-inline-loop-limit): New option.
18898 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18901 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18902 Reverse order of second and third operands in first alternative.
18903 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18904 of first and second elements in UNSPEC_VPERMR vector.
18905 (altivec_expand_vec_perm_le): Likewise.
18907 2018-01-08 Jeff Law <law@redhat.com>
18909 PR rtl-optimizatin/81308
18910 * tree-switch-conversion.c (cfg_altered): New file scoped static.
18911 (process_switch): If group_case_labels makes a change, then set
18913 (pass_convert_switch::execute): If a switch is converted, then
18914 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
18916 PR rtl-optimization/81308
18917 * recog.c (split_all_insns): Conditionally cleanup the CFG after
18920 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
18922 PR target/83663 - Revert r255946
18923 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18924 generation for cases where splatting a value is not useful.
18925 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18926 across a vec_duplicate and a paradoxical subreg forming a vector
18927 mode to a vec_concat.
18929 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18931 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18932 -march=armv8.3-a variants.
18933 * config/arm/t-multilib: Likewise.
18934 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
18936 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18938 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18940 (cceq_ior_compare_complement): Give it a name so I can use it, and
18941 change boolean_or_operator predicate to boolean_operator so it can
18942 be used to generate a crand.
18943 (eqne): New code iterator.
18944 (bd/bd_neg): New code_attrs.
18945 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18946 a single define_insn.
18947 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18948 decrement (bdnzt/bdnzf/bdzt/bdzf).
18949 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18950 with the new names of the branch decrement patterns, and added the
18951 names of the branch decrement conditional patterns.
18953 2018-01-08 Richard Biener <rguenther@suse.de>
18955 PR tree-optimization/83563
18956 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18959 2018-01-08 Richard Biener <rguenther@suse.de>
18961 PR middle-end/83713
18962 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18964 2018-01-08 Richard Biener <rguenther@suse.de>
18966 PR tree-optimization/83685
18967 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18968 references to abnormals.
18970 2018-01-08 Richard Biener <rguenther@suse.de>
18973 * dwarf2out.c (output_indirect_strings): Handle empty
18974 skeleton_debug_str_hash.
18975 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18977 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18979 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18980 (emit_store_direct): Likewise.
18981 (arc_trampoline_adjust_address): Likewise.
18982 (arc_asm_trampoline_template): New function.
18983 (arc_initialize_trampoline): Use asm_trampoline_template.
18984 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18985 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18986 * config/arc/arc.md (flush_icache): Delete pattern.
18988 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18990 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18991 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18994 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18997 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18998 by not USED_FOR_TARGET.
18999 (make_pass_resolve_sw_modes): Likewise.
19001 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19003 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19006 2018-01-08 Richard Biener <rguenther@suse.de>
19008 PR middle-end/83580
19009 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19011 2018-01-08 Richard Biener <rguenther@suse.de>
19013 PR middle-end/83517
19014 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19016 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19018 PR middle-end/81897
19019 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19020 basic blocks with a small number of successors.
19021 (convert_control_dep_chain_into_preds): Improve handling of
19023 (dump_predicates): Split apart into...
19024 (dump_pred_chain): ...here...
19025 (dump_pred_info): ...and here.
19026 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19027 (can_chain_union_be_invalidated_p): Improve check for invalidation
19029 (uninit_uses_cannot_happen): Avoid unnecessary if
19030 convert_control_dep_chain_into_preds yielded nothing.
19032 2018-01-06 Martin Sebor <msebor@redhat.com>
19034 PR tree-optimization/83640
19035 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19036 subtracting negative offset from size.
19037 (builtin_access::overlap): Adjust offset bounds of the access to fall
19038 within the size of the object if possible.
19040 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19042 PR rtl-optimization/83699
19043 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19044 extract_bit_field_as_subreg to cases in which the extracted
19045 value is also a vector.
19047 * lra-constraints.c (process_alt_operands): Test for the equivalence
19048 substitutions when detecting a possible reload cycle.
19050 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19053 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19054 by default if flag_selective_schedling{,2}. Formatting fixes.
19056 PR rtl-optimization/83682
19057 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19058 if it has non-VECTOR_MODE element mode.
19059 (vec_duplicate_p): Likewise.
19061 PR middle-end/83694
19062 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19063 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19065 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19068 * config/i386/i386-builtin.def
19069 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19070 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19071 Require also OPTION_MASK_ISA_AVX512F in addition to
19072 OPTION_MASK_ISA_GFNI.
19073 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19074 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19075 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19076 to OPTION_MASK_ISA_GFNI.
19077 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19078 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19079 OPTION_MASK_ISA_AVX512BW.
19080 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19081 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19082 addition to OPTION_MASK_ISA_GFNI.
19083 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19084 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19085 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19086 to OPTION_MASK_ISA_GFNI.
19087 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19088 a requirement for all ISAs rather than any of them with a few
19090 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19092 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19093 bitmasks to be enabled with 3 exceptions, instead of requiring any
19094 enabled ISA with lots of exceptions.
19095 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19096 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19097 Change avx512bw in isa attribute to avx512f.
19098 * config/i386/sgxintrin.h: Add license boilerplate.
19099 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19100 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19101 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19102 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19104 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19105 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19106 temporarily sse2 rather than sse if not enabled already.
19109 * config/i386/sse.md (VI248_VLBW): Rename to ...
19110 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19111 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19112 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19113 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19114 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19115 mode iterator instead of VI248_VLBW.
19117 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19119 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19120 (record_modified): Skip clobbers; add debug output.
19121 (param_change_prob): Use sreal frequencies.
19123 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19125 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19126 punt for user-aligned variables.
19128 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19130 * tree-chrec.c (chrec_contains_symbols): Return true for
19133 2018-01-05 Sudakshina Das <sudi.das@arm.com>
19136 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19137 of (x|y) == x for BICS pattern.
19139 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19141 PR tree-optimization/83605
19142 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19143 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19146 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
19148 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19149 * config/epiphany/rtems.h: New file.
19151 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19152 Uros Bizjak <ubizjak@gmail.com>
19155 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19156 QIreg_operand instead of register_operand predicate.
19157 * config/i386/i386.c (ix86_rop_should_change_byte_p,
19158 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19159 comments instead of -fmitigate[-_]rop.
19161 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19164 * cgraphunit.c (symbol_table::compile): Switch to text_section
19165 before calling assembly_start debug hook.
19166 * run-rtl-passes.c (run_rtl_passes): Likewise.
19169 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19171 * tree-vrp.c (extract_range_from_binary_expr_1): Check
19172 range_int_cst_p rather than !symbolic_range_p before calling
19173 extract_range_from_multiplicative_op_1.
19175 2018-01-04 Jeff Law <law@redhat.com>
19177 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19178 redundant test in assertion.
19180 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19182 * doc/rtl.texi: Document machine_mode wrapper classes.
19184 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19186 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19187 using tree_to_uhwi.
19189 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19191 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19192 the VEC_PERM_EXPR fold to fail.
19194 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19197 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19198 to switched_sections.
19200 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19203 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19204 test for d.testing.
19206 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
19209 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19210 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19212 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19215 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19216 is BLKmode and bitpos not zero or mode change is needed.
19218 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19221 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19224 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
19227 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19228 instead of MULT rtx. Update all corresponding splitters.
19229 (*saddl_se): Ditto.
19230 (*ssub<modesuffix>): Ditto.
19231 (*ssubl_se): Ditto.
19232 (*cmp_sadd_di): Update split patterns.
19233 (*cmp_sadd_si): Ditto.
19234 (*cmp_sadd_sidi): Ditto.
19235 (*cmp_ssub_di): Ditto.
19236 (*cmp_ssub_si): Ditto.
19237 (*cmp_ssub_sidi): Ditto.
19238 * config/alpha/predicates.md (const23_operand): New predicate.
19239 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19240 Look for ASHIFT, not MULT inner operand.
19241 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19243 2018-01-04 Martin Liska <mliska@suse.cz>
19245 PR gcov-profile/83669
19246 * gcov.c (output_intermediate_file): Add version to intermediate
19248 * doc/gcov.texi: Document new field 'version' in intermediate
19249 file format. Fix location of '-k' option of gcov command.
19251 2018-01-04 Martin Liska <mliska@suse.cz>
19254 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19256 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19258 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19260 2018-01-03 Martin Sebor <msebor@redhat.com>
19262 PR tree-optimization/83655
19263 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19264 checking calls with invalid arguments.
19266 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19268 * tree-vect-stmts.c (vect_get_store_rhs): New function.
19269 (vectorizable_mask_load_store): Delete.
19270 (vectorizable_call): Return false for masked loads and stores.
19271 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
19272 instead of gimple_assign_rhs1.
19273 (vectorizable_load): Handle IFN_MASK_LOAD.
19274 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19278 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19280 (vectorizable_mask_load_store): ...here.
19281 (vectorizable_load): ...and here.
19283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19285 * tree-vect-stmts.c (vect_build_all_ones_mask)
19286 (vect_build_zero_merge_argument): New functions, split out from...
19287 (vectorizable_load): ...here.
19289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19291 * tree-vect-stmts.c (vect_check_store_rhs): New function,
19293 (vectorizable_mask_load_store): ...here.
19294 (vectorizable_store): ...and here.
19296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19298 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19300 (vectorizable_mask_load_store): ...here.
19302 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19304 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19305 (vect_model_store_cost): Take a vec_load_store_type instead of a
19307 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19308 (vect_model_store_cost): Take a vec_load_store_type instead of a
19310 (vectorizable_mask_load_store): Update accordingly.
19311 (vectorizable_store): Likewise.
19312 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19316 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19317 IFN_MASK_LOAD calls here rather than...
19318 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19321 Alan Hayward <alan.hayward@arm.com>
19322 David Sherwood <david.sherwood@arm.com>
19324 * expmed.c (extract_bit_field_1): For vector extracts,
19325 fall back to extract_bit_field_as_subreg if vec_extract
19328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19329 Alan Hayward <alan.hayward@arm.com>
19330 David Sherwood <david.sherwood@arm.com>
19332 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19333 they are variable or constant sized.
19334 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19335 slots for constant-sized data.
19337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19338 Alan Hayward <alan.hayward@arm.com>
19339 David Sherwood <david.sherwood@arm.com>
19341 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19342 handling COND_EXPRs with boolean comparisons, try to find a better
19343 basis for the mask type than the boolean itself.
19345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19347 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19348 is calculated and how it can be overridden.
19349 * genmodes.c (max_bitsize_mode_any_mode): New variable.
19350 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19352 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19356 Alan Hayward <alan.hayward@arm.com>
19357 David Sherwood <david.sherwood@arm.com>
19359 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19360 Remove the mode argument.
19361 (aarch64_simd_valid_immediate): Remove the mode and inverse
19363 * config/aarch64/iterators.md (bitsize): New iterator.
19364 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19365 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19366 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19367 aarch64_simd_valid_immediate.
19368 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19369 (aarch64_reg_or_bic_imm): Likewise.
19370 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19371 with an insn_type enum and msl with a modifier_type enum.
19372 Replace element_width with a scalar_mode. Change the shift
19373 to unsigned int. Add constructors for scalar_float_mode and
19374 scalar_int_mode elements.
19375 (aarch64_vect_float_const_representable_p): Delete.
19376 (aarch64_can_const_movi_rtx_p)
19377 (aarch64_simd_scalar_immediate_valid_for_move)
19378 (aarch64_simd_make_constant): Update call to
19379 aarch64_simd_valid_immediate.
19380 (aarch64_advsimd_valid_immediate_hs): New function.
19381 (aarch64_advsimd_valid_immediate): Likewise.
19382 (aarch64_simd_valid_immediate): Remove mode and inverse
19383 arguments. Rewrite to use the above. Use const_vec_duplicate_p
19384 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19385 and aarch64_float_const_representable_p on the result.
19386 (aarch64_output_simd_mov_immediate): Remove mode argument.
19387 Update call to aarch64_simd_valid_immediate and use of
19388 simd_immediate_info.
19389 (aarch64_output_scalar_simd_mov_immediate): Update call
19392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19393 Alan Hayward <alan.hayward@arm.com>
19394 David Sherwood <david.sherwood@arm.com>
19396 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19397 (mode_nunits): Likewise CONST_MODE_NUNITS.
19398 * machmode.def (ADJUST_NUNITS): Document.
19399 * genmodes.c (mode_data::need_nunits_adj): New field.
19400 (blank_mode): Update accordingly.
19401 (adj_nunits): New variable.
19402 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19404 (emit_mode_size_inline): Set need_bytesize_adj for all modes
19405 listed in adj_nunits.
19406 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19407 listed in adj_nunits. Don't emit case statements for such modes.
19408 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19409 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
19410 nothing if adj_nunits is nonnull.
19411 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19412 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19413 (emit_mode_fbit): Update use of print_maybe_const_decl.
19414 (emit_move_size): Likewise. Treat the array as non-const
19416 (emit_mode_adjustments): Handle adj_nunits.
19418 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19420 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19421 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19422 (VECTOR_MODES): Use it.
19423 (make_vector_modes): Take the prefix as an argument.
19425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19426 Alan Hayward <alan.hayward@arm.com>
19427 David Sherwood <david.sherwood@arm.com>
19429 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19430 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19431 for MODE_VECTOR_BOOL.
19432 * machmode.def (VECTOR_BOOL_MODE): Document.
19433 * genmodes.c (VECTOR_BOOL_MODE): New macro.
19434 (make_vector_bool_mode): New function.
19435 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19437 * lto-streamer-in.c (lto_input_mode_table): Likewise.
19438 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19440 * stor-layout.c (int_mode_for_mode): Likewise.
19441 * tree.c (build_vector_type_for_mode): Likewise.
19442 * varasm.c (output_constant_pool_2): Likewise.
19443 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19444 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
19445 for MODE_VECTOR_BOOL.
19446 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19447 of mode class checks.
19448 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19449 instead of a list of mode class checks.
19450 (expand_vector_scalar_condition): Likewise.
19451 (type_for_widest_vector_mode): Handle BImode as an inner mode.
19453 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19454 Alan Hayward <alan.hayward@arm.com>
19455 David Sherwood <david.sherwood@arm.com>
19457 * machmode.h (mode_size): Change from unsigned short to
19459 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19460 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19461 or if measurement_type is not polynomial.
19462 (fixed_size_mode::includes_p): Check for constant-sized modes.
19463 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19464 return a poly_uint16 rather than an unsigned short.
19465 (emit_mode_size): Change the type of mode_size from unsigned short
19466 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
19467 (emit_mode_adjustments): Cope with polynomial vector sizes.
19468 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19470 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19472 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19473 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19474 * caller-save.c (setup_save_areas): Likewise.
19475 (replace_reg_with_saved_mem): Likewise.
19476 * calls.c (emit_library_call_value_1): Likewise.
19477 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19478 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19479 (gen_lowpart_for_combine): Likewise.
19480 * convert.c (convert_to_integer_1): Likewise.
19481 * cse.c (equiv_constant, cse_insn): Likewise.
19482 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19483 (cselib_subst_to_values): Likewise.
19484 * dce.c (word_dce_process_block): Likewise.
19485 * df-problems.c (df_word_lr_mark_ref): Likewise.
19486 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19487 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19488 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19489 (rtl_for_decl_location): Likewise.
19490 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19491 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19492 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19493 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19494 (expand_expr_real_1): Likewise.
19495 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19496 (pad_below): Likewise.
19497 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19498 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19499 * ira.c (get_subreg_tracking_sizes): Likewise.
19500 * ira-build.c (ira_create_allocno_objects): Likewise.
19501 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19502 (ira_sort_regnos_for_alter_reg): Likewise.
19503 * ira-costs.c (record_operand_costs): Likewise.
19504 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19505 (resolve_simple_move): Likewise.
19506 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19507 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19508 (lra_constraints): Likewise.
19509 (CONST_POOL_OK_P): Reject variable-sized modes.
19510 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19511 (add_pseudo_to_slot, lra_spill): Likewise.
19512 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19513 * optabs-query.c (get_best_extraction_insn): Likewise.
19514 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19515 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19516 (expand_mult_highpart, valid_multiword_target_p): Likewise.
19517 * recog.c (offsettable_address_addr_space_p): Likewise.
19518 * regcprop.c (maybe_mode_change): Likewise.
19519 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19520 * regrename.c (build_def_use): Likewise.
19521 * regstat.c (dump_reg_info): Likewise.
19522 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19523 (find_reloads, find_reloads_subreg_address): Likewise.
19524 * reload1.c (eliminate_regs_1): Likewise.
19525 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19526 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19527 (simplify_binary_operation_1, simplify_subreg): Likewise.
19528 * targhooks.c (default_function_arg_padding): Likewise.
19529 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19530 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19531 (verify_gimple_assign_ternary): Likewise.
19532 * tree-inline.c (estimate_move_cost): Likewise.
19533 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19534 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19535 (get_address_cost_ainc): Likewise.
19536 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19537 (vect_supportable_dr_alignment): Likewise.
19538 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19539 (vectorizable_reduction): Likewise.
19540 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19541 (vectorizable_operation, vectorizable_load): Likewise.
19542 * tree.c (build_same_sized_truth_vector_type): Likewise.
19543 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19544 * var-tracking.c (emit_note_insn_var_location): Likewise.
19545 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19546 (ADDR_VEC_ALIGN): Likewise.
19548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19549 Alan Hayward <alan.hayward@arm.com>
19550 David Sherwood <david.sherwood@arm.com>
19552 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19554 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19555 or if measurement_type is polynomial.
19556 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19557 * combine.c (make_extraction): Likewise.
19558 * dse.c (find_shift_sequence): Likewise.
19559 * dwarf2out.c (mem_loc_descriptor): Likewise.
19560 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19561 (extract_bit_field, extract_low_bits): Likewise.
19562 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19563 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19564 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19565 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19566 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19567 * reload.c (find_reloads): Likewise.
19568 * reload1.c (alter_reg): Likewise.
19569 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19570 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19571 * tree-if-conv.c (predicate_mem_writes): Likewise.
19572 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19573 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19574 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19575 * valtrack.c (dead_debug_insert_temp): Likewise.
19576 * varasm.c (mergeable_constant_section): Likewise.
19577 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19580 Alan Hayward <alan.hayward@arm.com>
19581 David Sherwood <david.sherwood@arm.com>
19583 * expr.c (expand_assignment): Cope with polynomial mode sizes
19584 when assigning to a CONCAT.
19586 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19587 Alan Hayward <alan.hayward@arm.com>
19588 David Sherwood <david.sherwood@arm.com>
19590 * machmode.h (mode_precision): Change from unsigned short to
19592 (mode_to_precision): Return a poly_uint16 rather than an unsigned
19594 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19595 or if measurement_type is not polynomial.
19596 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
19597 in which the mode is already known to be a scalar_int_mode.
19598 * genmodes.c (emit_mode_precision): Change the type of mode_precision
19599 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
19601 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19602 for GET_MODE_PRECISION.
19603 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19604 for GET_MODE_PRECISION.
19605 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19607 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19608 (expand_field_assignment, make_extraction): Likewise.
19609 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19610 (get_last_value): Likewise.
19611 * convert.c (convert_to_integer_1): Likewise.
19612 * cse.c (cse_insn): Likewise.
19613 * expr.c (expand_expr_real_1): Likewise.
19614 * lra-constraints.c (simplify_operand_subreg): Likewise.
19615 * optabs-query.c (can_atomic_load_p): Likewise.
19616 * optabs.c (expand_atomic_load): Likewise.
19617 (expand_atomic_store): Likewise.
19618 * ree.c (combine_reaching_defs): Likewise.
19619 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19620 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19621 * tree.h (type_has_mode_precision_p): Likewise.
19622 * ubsan.c (instrument_si_overflow): Likewise.
19624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19625 Alan Hayward <alan.hayward@arm.com>
19626 David Sherwood <david.sherwood@arm.com>
19628 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19629 polynomial numbers of units.
19630 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19631 (valid_vector_subparts_p): New function.
19632 (build_vector_type): Remove temporary shim and take the number
19633 of units as a poly_uint64 rather than an int.
19634 (build_opaque_vector_type): Take the number of units as a
19635 poly_uint64 rather than an int.
19636 * tree.c (build_vector_from_ctor): Handle polynomial
19637 TYPE_VECTOR_SUBPARTS.
19638 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19639 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19640 (build_vector_from_val): If the number of units is variable,
19641 use build_vec_duplicate_cst for constant operands and
19642 VEC_DUPLICATE_EXPR otherwise.
19643 (make_vector_type): Remove temporary is_constant ().
19644 (build_vector_type, build_opaque_vector_type): Take the number of
19645 units as a poly_uint64 rather than an int.
19646 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19648 * cfgexpand.c (expand_debug_expr): Likewise.
19649 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19650 (store_constructor, expand_expr_real_1): Likewise.
19651 (const_scalar_mask_from_tree): Likewise.
19652 * fold-const-call.c (fold_const_reduction): Likewise.
19653 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19654 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19655 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19656 (fold_relational_const): Likewise.
19657 (native_interpret_vector): Likewise. Change the size from an
19658 int to an unsigned int.
19659 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19660 TYPE_VECTOR_SUBPARTS.
19661 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19662 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19663 duplicating a non-constant operand into a variable-length vector.
19664 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19665 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19666 * ipa-icf.c (sem_variable::equals): Likewise.
19667 * match.pd: Likewise.
19668 * omp-simd-clone.c (simd_clone_subparts): Likewise.
19669 * print-tree.c (print_node): Likewise.
19670 * stor-layout.c (layout_type): Likewise.
19671 * targhooks.c (default_builtin_vectorization_cost): Likewise.
19672 * tree-cfg.c (verify_gimple_comparison): Likewise.
19673 (verify_gimple_assign_binary): Likewise.
19674 (verify_gimple_assign_ternary): Likewise.
19675 (verify_gimple_assign_single): Likewise.
19676 * tree-pretty-print.c (dump_generic_node): Likewise.
19677 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19678 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19679 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19680 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19681 (vect_shift_permute_load_chain): Likewise.
19682 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19683 (expand_vector_condition, optimize_vector_constructor): Likewise.
19684 (lower_vec_perm, get_compute_type): Likewise.
19685 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19686 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19687 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19688 (vect_recog_mask_conversion_pattern): Likewise.
19689 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19690 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19691 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19692 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19693 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19694 (vectorizable_shift, vectorizable_operation, vectorizable_store)
19695 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19696 (supportable_widening_operation): Likewise.
19697 (supportable_narrowing_operation): Likewise.
19698 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19700 * varasm.c (output_constant): Likewise.
19702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19703 Alan Hayward <alan.hayward@arm.com>
19704 David Sherwood <david.sherwood@arm.com>
19706 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19707 so that both the length == 3 and length != 3 cases set up their
19708 own permute vectors. Add comments explaining why we know the
19709 number of elements is constant.
19710 (vect_permute_load_chain): Likewise.
19712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19713 Alan Hayward <alan.hayward@arm.com>
19714 David Sherwood <david.sherwood@arm.com>
19716 * machmode.h (mode_nunits): Change from unsigned char to
19718 (ONLY_FIXED_SIZE_MODES): New macro.
19719 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19720 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19721 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19723 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19724 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19725 or if measurement_type is not polynomial.
19726 * genmodes.c (ZERO_COEFFS): New macro.
19727 (emit_mode_nunits_inline): Make mode_nunits_inline return a
19729 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19730 Use ZERO_COEFFS when emitting initializers.
19731 * data-streamer.h (bp_pack_poly_value): New function.
19732 (bp_unpack_poly_value): Likewise.
19733 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19734 for GET_MODE_NUNITS.
19735 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19736 for GET_MODE_NUNITS.
19737 * tree.c (make_vector_type): Remove temporary shim and make
19738 the real function take the number of units as a poly_uint64
19739 rather than an int.
19740 (build_vector_type_for_mode): Handle polynomial nunits.
19741 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19742 * emit-rtl.c (const_vec_series_p_1): Likewise.
19743 (gen_rtx_CONST_VECTOR): Likewise.
19744 * fold-const.c (test_vec_duplicate_folding): Likewise.
19745 * genrecog.c (validate_pattern): Likewise.
19746 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19747 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19748 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19749 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19750 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19751 * rtlanal.c (subreg_get_info): Likewise.
19752 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19753 (vect_grouped_load_supported): Likewise.
19754 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19755 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19756 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19757 (simplify_const_unary_operation, simplify_binary_operation_1)
19758 (simplify_const_binary_operation, simplify_ternary_operation)
19759 (test_vector_ops_duplicate, test_vector_ops): Likewise.
19760 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19761 instead of CONST_VECTOR_NUNITS.
19762 * varasm.c (output_constant_pool_2): Likewise.
19763 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19764 explicit-encoded elements in the XVEC for variable-length vectors.
19766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19768 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19771 Alan Hayward <alan.hayward@arm.com>
19772 David Sherwood <david.sherwood@arm.com>
19774 * coretypes.h (fixed_size_mode): Declare.
19775 (fixed_size_mode_pod): New typedef.
19776 * builtins.h (target_builtins::x_apply_args_mode)
19777 (target_builtins::x_apply_result_mode): Change type to
19778 fixed_size_mode_pod.
19779 * builtins.c (apply_args_size, apply_result_size, result_vector)
19780 (expand_builtin_apply_args_1, expand_builtin_apply)
19781 (expand_builtin_return): Update accordingly.
19783 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19785 * cse.c (hash_rtx_cb): Hash only the encoded elements.
19786 * cselib.c (cselib_hash_rtx): Likewise.
19787 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19788 CONST_VECTOR encoding.
19790 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19791 Jeff Law <law@redhat.com>
19794 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19795 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19796 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19797 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19800 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19801 explicitly probe *sp in a noreturn function if there were any callee
19802 register saves or frame pointer is needed.
19804 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19807 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19808 BLKmode for ternary, binary or unary expressions.
19811 * var-tracking.c (delete_vta_debug_insn): New inline function.
19812 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19813 insns from get_insns () to NULL instead of each bb separately.
19814 Use delete_vta_debug_insn. No longer static.
19815 (vt_debug_insns_local, variable_tracking_main_1): Adjust
19816 delete_vta_debug_insns callers.
19817 * rtl.h (delete_vta_debug_insns): Declare.
19818 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19819 instead of variable_tracking_main.
19821 2018-01-03 Martin Sebor <msebor@redhat.com>
19823 PR tree-optimization/83603
19824 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19825 arguments past the endof the argument list in functions declared
19826 without a prototype.
19827 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19828 Avoid checking when arguments are null.
19830 2018-01-03 Martin Sebor <msebor@redhat.com>
19833 * doc/extend.texi (attribute const): Fix a typo.
19834 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19835 issuing -Wsuggest-attribute for void functions.
19837 2018-01-03 Martin Sebor <msebor@redhat.com>
19839 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19840 offset_int::from instead of wide_int::to_shwi.
19841 (maybe_diag_overlap): Remove assertion.
19842 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19843 * gimple-ssa-sprintf.c (format_directive): Same.
19844 (parse_directive): Same.
19845 (sprintf_dom_walker::compute_format_length): Same.
19846 (try_substitute_return_value): Same.
19848 2018-01-03 Jeff Law <law@redhat.com>
19850 PR middle-end/83654
19851 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19852 non-constant residual for zero at runtime and avoid probing in
19853 that case. Reorganize code for trailing problem to mirror handling
19856 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19858 PR tree-optimization/83501
19859 * tree-ssa-strlen.c (get_string_cst): New.
19860 (handle_char_store): Call get_string_cst.
19862 2018-01-03 Martin Liska <mliska@suse.cz>
19864 PR tree-optimization/83593
19865 * tree-ssa-strlen.c: Include tree-cfg.h.
19866 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19867 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19868 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19870 (strlen_dom_walker::before_dom_children): Call
19871 gimple_purge_dead_eh_edges. Dump tranformation with details
19873 (strlen_dom_walker::before_dom_children): Update call by adding
19874 new argument cleanup_eh.
19875 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19877 2018-01-03 Martin Liska <mliska@suse.cz>
19880 * cif-code.def (VARIADIC_THUNK): New enum value.
19881 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19884 2018-01-03 Jan Beulich <jbeulich@suse.com>
19886 * sse.md (mov<mode>_internal): Tighten condition for when to use
19887 vmovdqu<ssescalarsize> for TI and OI modes.
19889 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19891 Update copyright years.
19893 2018-01-03 Martin Liska <mliska@suse.cz>
19896 * ipa-visibility.c (function_and_variable_visibility): Skip
19897 functions with noipa attribure.
19899 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19901 * gcc.c (process_command): Update copyright notice dates.
19902 * gcov-dump.c (print_version): Ditto.
19903 * gcov.c (print_version): Ditto.
19904 * gcov-tool.c (print_version): Ditto.
19905 * gengtype.c (create_file): Ditto.
19906 * doc/cpp.texi: Bump @copying's copyright year.
19907 * doc/cppinternals.texi: Ditto.
19908 * doc/gcc.texi: Ditto.
19909 * doc/gccint.texi: Ditto.
19910 * doc/gcov.texi: Ditto.
19911 * doc/install.texi: Ditto.
19912 * doc/invoke.texi: Ditto.
19914 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19916 * vector-builder.h (vector_builder::m_full_nelts): Change from
19917 unsigned int to poly_uint64.
19918 (vector_builder::full_nelts): Update prototype accordingly.
19919 (vector_builder::new_vector): Likewise.
19920 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19921 (vector_builder::operator ==): Likewise.
19922 (vector_builder::finalize): Likewise.
19923 * int-vector-builder.h (int_vector_builder::int_vector_builder):
19924 Take the number of elements as a poly_uint64 rather than an
19926 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19927 from unsigned int to poly_uint64.
19928 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19929 (vec_perm_indices::new_vector): Likewise.
19930 (vec_perm_indices::length): Likewise.
19931 (vec_perm_indices::nelts_per_input): Likewise.
19932 (vec_perm_indices::input_nelts): Likewise.
19933 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19934 number of elements per input as a poly_uint64 rather than an
19935 unsigned int. Use the original encoding for variable-length
19936 vectors, rather than clamping each individual element.
19937 For the second and subsequent elements in each pattern,
19938 clamp the step and base before clamping their sum.
19939 (vec_perm_indices::series_p): Handle polynomial element counts.
19940 (vec_perm_indices::all_in_range_p): Likewise.
19941 (vec_perm_indices_to_tree): Likewise.
19942 (vec_perm_indices_to_rtx): Likewise.
19943 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19944 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19945 (tree_vector_builder::new_binary_operation): Handle polynomial
19946 element counts. Return false if we need to know the number
19947 of elements at compile time.
19948 * fold-const.c (fold_vec_perm): Punt if the number of elements
19949 isn't known at compile time.
19951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19953 * vec-perm-indices.h (vec_perm_builder): Change element type
19954 from HOST_WIDE_INT to poly_int64.
19955 (vec_perm_indices::element_type): Update accordingly.
19956 (vec_perm_indices::clamp): Handle polynomial element_types.
19957 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19958 (vec_perm_indices::all_in_range_p): Likewise.
19959 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19961 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19962 polynomial vec_perm_indices element types.
19963 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19964 * fold-const.c (fold_vec_perm): Likewise.
19965 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19966 * tree-vect-generic.c (lower_vec_perm): Likewise.
19967 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19968 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19969 element type to HOST_WIDE_INT.
19971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19972 Alan Hayward <alan.hayward@arm.com>
19973 David Sherwood <david.sherwood@arm.com>
19975 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19976 rather than an int. Use plus_constant.
19977 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19978 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19981 Alan Hayward <alan.hayward@arm.com>
19982 David Sherwood <david.sherwood@arm.com>
19984 * calls.c (emit_call_1, expand_call): Change struct_value_size from
19985 a HOST_WIDE_INT to a poly_int64.
19987 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19988 Alan Hayward <alan.hayward@arm.com>
19989 David Sherwood <david.sherwood@arm.com>
19991 * calls.c (load_register_parameters): Cope with polynomial
19992 mode sizes. Require a constant size for BLKmode parameters
19993 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
19994 forces a parameter to be padded at the lsb end in order to
19995 fill a complete number of words, require the parameter size
19996 to be ordered wrt UNITS_PER_WORD.
19998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19999 Alan Hayward <alan.hayward@arm.com>
20000 David Sherwood <david.sherwood@arm.com>
20002 * reload1.c (spill_stack_slot_width): Change element type
20003 from unsigned int to poly_uint64_pod.
20004 (alter_reg): Treat mode sizes as polynomial.
20006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20007 Alan Hayward <alan.hayward@arm.com>
20008 David Sherwood <david.sherwood@arm.com>
20010 * reload.c (complex_word_subreg_p): New function.
20011 (reload_inner_reg_of_subreg, push_reload): Use it.
20013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20014 Alan Hayward <alan.hayward@arm.com>
20015 David Sherwood <david.sherwood@arm.com>
20017 * lra-constraints.c (process_alt_operands): Reject matched
20018 operands whose sizes aren't ordered.
20019 (match_reload): Refer to this check here.
20021 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20022 Alan Hayward <alan.hayward@arm.com>
20023 David Sherwood <david.sherwood@arm.com>
20025 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20026 that the mode size is in the set {1, 2, 4, 8, 16}.
20028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20029 Alan Hayward <alan.hayward@arm.com>
20030 David Sherwood <david.sherwood@arm.com>
20032 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20033 Use plus_constant instead of gen_rtx_PLUS.
20035 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20036 Alan Hayward <alan.hayward@arm.com>
20037 David Sherwood <david.sherwood@arm.com>
20039 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20040 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20041 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20042 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20043 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20044 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20045 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20046 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20047 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20048 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20050 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20051 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20052 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20053 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20054 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20055 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20056 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20057 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20058 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20059 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20061 * expr.c (emit_move_resolve_push): Treat the input and result
20062 of PUSH_ROUNDING as a poly_int64.
20063 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20064 (emit_push_insn): Likewise.
20065 * lra-eliminations.c (mark_not_eliminable): Likewise.
20066 * recog.c (push_operand): Likewise.
20067 * reload1.c (elimination_effects): Likewise.
20068 * rtlanal.c (nonzero_bits1): Likewise.
20069 * calls.c (store_one_arg): Likewise. Require the padding to be
20070 known at compile time.
20072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20073 Alan Hayward <alan.hayward@arm.com>
20074 David Sherwood <david.sherwood@arm.com>
20076 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20077 Use plus_constant instead of gen_rtx_PLUS.
20079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20080 Alan Hayward <alan.hayward@arm.com>
20081 David Sherwood <david.sherwood@arm.com>
20083 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20084 rather than an int.
20086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20087 Alan Hayward <alan.hayward@arm.com>
20088 David Sherwood <david.sherwood@arm.com>
20090 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20091 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20092 via stack temporaries. Treat the mode size as polynomial too.
20094 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20095 Alan Hayward <alan.hayward@arm.com>
20096 David Sherwood <david.sherwood@arm.com>
20098 * expr.c (expand_expr_real_2): When handling conversions involving
20099 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20100 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20101 as a poly_uint64 too.
20103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20104 Alan Hayward <alan.hayward@arm.com>
20105 David Sherwood <david.sherwood@arm.com>
20107 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20109 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20110 Alan Hayward <alan.hayward@arm.com>
20111 David Sherwood <david.sherwood@arm.com>
20113 * combine.c (can_change_dest_mode): Handle polynomial
20114 REGMODE_NATURAL_SIZE.
20115 * expmed.c (store_bit_field_1): Likewise.
20116 * expr.c (store_constructor): Likewise.
20117 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20118 and polynomial REGMODE_NATURAL_SIZE.
20119 (gen_lowpart_common): Likewise.
20120 * reginfo.c (record_subregs_of_mode): Likewise.
20121 * rtlanal.c (read_modify_subreg_p): Likewise.
20123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20124 Alan Hayward <alan.hayward@arm.com>
20125 David Sherwood <david.sherwood@arm.com>
20127 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20128 numbers of elements.
20130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20131 Alan Hayward <alan.hayward@arm.com>
20132 David Sherwood <david.sherwood@arm.com>
20134 * match.pd: Cope with polynomial numbers of vector elements.
20136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20137 Alan Hayward <alan.hayward@arm.com>
20138 David Sherwood <david.sherwood@arm.com>
20140 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20141 in a POINTER_PLUS_EXPR.
20143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20144 Alan Hayward <alan.hayward@arm.com>
20145 David Sherwood <david.sherwood@arm.com>
20147 * omp-simd-clone.c (simd_clone_subparts): New function.
20148 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20149 (ipa_simd_modify_function_body): Likewise.
20151 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20152 Alan Hayward <alan.hayward@arm.com>
20153 David Sherwood <david.sherwood@arm.com>
20155 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20156 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20157 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20158 (expand_vector_condition, vector_element): Likewise.
20159 (subparts_gt): New function.
20160 (get_compute_type): Use subparts_gt.
20161 (count_type_subparts): Delete.
20162 (expand_vector_operations_1): Use subparts_gt instead of
20163 count_type_subparts.
20165 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20166 Alan Hayward <alan.hayward@arm.com>
20167 David Sherwood <david.sherwood@arm.com>
20169 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20170 (vect_compile_time_alias): ...this new function. Do the calculation
20171 on poly_ints rather than trees.
20172 (vect_prune_runtime_alias_test_list): Update call accordingly.
20174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20175 Alan Hayward <alan.hayward@arm.com>
20176 David Sherwood <david.sherwood@arm.com>
20178 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20180 (vect_schedule_slp_instance): Likewise.
20182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20183 Alan Hayward <alan.hayward@arm.com>
20184 David Sherwood <david.sherwood@arm.com>
20186 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20187 constant and extern definitions for variable-length vectors.
20188 (vect_get_constant_vectors): Note that the number of units
20189 is known to be constant.
20191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20192 Alan Hayward <alan.hayward@arm.com>
20193 David Sherwood <david.sherwood@arm.com>
20195 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20196 of units as polynomial. Choose between WIDE and NARROW based
20199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20200 Alan Hayward <alan.hayward@arm.com>
20201 David Sherwood <david.sherwood@arm.com>
20203 * tree-vect-stmts.c (simd_clone_subparts): New function.
20204 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20207 Alan Hayward <alan.hayward@arm.com>
20208 David Sherwood <david.sherwood@arm.com>
20210 * tree-vect-stmts.c (vectorizable_call): Treat the number of
20211 vectors as polynomial. Use build_index_vector for
20212 IFN_GOMP_SIMD_LANE.
20214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20215 Alan Hayward <alan.hayward@arm.com>
20216 David Sherwood <david.sherwood@arm.com>
20218 * tree-vect-stmts.c (get_load_store_type): Treat the number of
20219 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20220 for variable-length vectors.
20221 (vectorizable_mask_load_store): Treat the number of units as
20222 polynomial, asserting that it is constant if the condition has
20223 already been enforced.
20224 (vectorizable_store, vectorizable_load): Likewise.
20226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20227 Alan Hayward <alan.hayward@arm.com>
20228 David Sherwood <david.sherwood@arm.com>
20230 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
20231 of units as polynomial. Punt if we can't tell at compile time
20232 which vector contains the final result.
20234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20235 Alan Hayward <alan.hayward@arm.com>
20236 David Sherwood <david.sherwood@arm.com>
20238 * tree-vect-loop.c (vectorizable_induction): Treat the number
20239 of units as polynomial. Punt on SLP inductions. Use an integer
20240 VEC_SERIES_EXPR for variable-length integer reductions. Use a
20241 cast of such a series for variable-length floating-point
20244 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20245 Alan Hayward <alan.hayward@arm.com>
20246 David Sherwood <david.sherwood@arm.com>
20248 * tree.h (build_index_vector): Declare.
20249 * tree.c (build_index_vector): New function.
20250 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20251 of units as polynomial, forcibly converting it to a constant if
20252 vectorizable_reduction has already enforced the condition.
20253 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
20254 to create a {1,2,3,...} vector.
20255 (vectorizable_reduction): Treat the number of units as polynomial.
20256 Choose vectype_in based on the largest scalar element size rather
20257 than the smallest number of units. Enforce the restrictions
20260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20261 Alan Hayward <alan.hayward@arm.com>
20262 David Sherwood <david.sherwood@arm.com>
20264 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20265 number of units as polynomial.
20267 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20268 Alan Hayward <alan.hayward@arm.com>
20269 David Sherwood <david.sherwood@arm.com>
20271 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20272 * target.def (autovectorize_vector_sizes): Return the vector sizes
20273 by pointer, using vector_sizes rather than a bitmask.
20274 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20275 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20276 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20278 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20279 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20280 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20281 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20282 * omp-general.c (omp_max_vf): Likewise.
20283 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20284 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20285 * tree-vect-loop.c (vect_analyze_loop): Likewise.
20286 * tree-vect-slp.c (vect_slp_bb): Likewise.
20287 * doc/tm.texi: Regenerate.
20288 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20290 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20291 the vector size as a poly_uint64 rather than an unsigned int.
20292 (current_vector_size): Change from an unsigned int to a poly_uint64.
20293 (get_vectype_for_scalar_type): Update accordingly.
20294 * tree.h (build_truth_vector_type): Take the size and number of
20295 units as a poly_uint64 rather than an unsigned int.
20296 (build_vector_type): Add a temporary overload that takes
20297 the number of units as a poly_uint64 rather than an unsigned int.
20298 * tree.c (make_vector_type): Likewise.
20299 (build_truth_vector_type): Take the number of units as a poly_uint64
20300 rather than an unsigned int.
20302 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20303 Alan Hayward <alan.hayward@arm.com>
20304 David Sherwood <david.sherwood@arm.com>
20306 * target.def (get_mask_mode): Take the number of units and length
20307 as poly_uint64s rather than unsigned ints.
20308 * targhooks.h (default_get_mask_mode): Update accordingly.
20309 * targhooks.c (default_get_mask_mode): Likewise.
20310 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20311 * doc/tm.texi: Regenerate.
20313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20314 Alan Hayward <alan.hayward@arm.com>
20315 David Sherwood <david.sherwood@arm.com>
20317 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20318 * omp-general.c (omp_max_vf): Likewise.
20319 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20320 (expand_omp_simd): Handle polynomial safelen.
20321 * omp-low.c (omplow_simd_context): Add a default constructor.
20322 (omplow_simd_context::max_vf): Change from int to poly_uint64.
20323 (lower_rec_simd_input_clauses): Update accordingly.
20324 (lower_rec_input_clauses): Likewise.
20326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20327 Alan Hayward <alan.hayward@arm.com>
20328 David Sherwood <david.sherwood@arm.com>
20330 * tree-vectorizer.h (vect_nunits_for_cost): New function.
20331 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20332 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20333 (vect_analyze_slp_cost): Likewise.
20334 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20335 (vect_model_load_cost): Likewise.
20337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20338 Alan Hayward <alan.hayward@arm.com>
20339 David Sherwood <david.sherwood@arm.com>
20341 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20342 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20343 from an unsigned int * to a poly_uint64_pod *.
20344 (calculate_unrolling_factor): New function.
20345 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
20347 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20348 Alan Hayward <alan.hayward@arm.com>
20349 David Sherwood <david.sherwood@arm.com>
20351 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20352 from an unsigned int to a poly_uint64.
20353 (_loop_vec_info::slp_unrolling_factor): Likewise.
20354 (_loop_vec_info::vectorization_factor): Change from an int
20356 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20357 (vect_get_num_vectors): New function.
20358 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20359 (vect_get_num_copies): Use vect_get_num_vectors.
20360 (vect_analyze_data_ref_dependences): Change max_vf from an int *
20361 to an unsigned int *.
20362 (vect_analyze_data_refs): Change min_vf from an int * to a
20364 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20365 than an unsigned HOST_WIDE_INT.
20366 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20367 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20368 to an unsigned int *.
20369 (vect_analyze_data_ref_dependences): Likewise.
20370 (vect_compute_data_ref_alignment): Handle polynomial vf.
20371 (vect_enhance_data_refs_alignment): Likewise.
20372 (vect_prune_runtime_alias_test_list): Likewise.
20373 (vect_shift_permute_load_chain): Likewise.
20374 (vect_supportable_dr_alignment): Likewise.
20375 (dependence_distance_ge_vf): Take the vectorization factor as a
20376 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20377 (vect_analyze_data_refs): Change min_vf from an int * to a
20379 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20380 vfm1 as a poly_uint64 rather than an int. Make the same change
20381 for the returned bound_scalar.
20382 (vect_gen_vector_loop_niters): Handle polynomial vf.
20383 (vect_do_peeling): Likewise. Update call to
20384 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20385 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20387 * tree-vect-loop.c (vect_determine_vectorization_factor)
20388 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20389 (vect_get_known_peeling_cost): Likewise.
20390 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20391 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20392 (vect_transform_loop): Likewise. Use the lowest possible VF when
20393 updating the upper bounds of the loop.
20394 (vect_min_worthwhile_factor): Make static. Return an unsigned int
20395 rather than an int.
20396 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20397 polynomial unroll factors.
20398 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20399 (vect_make_slp_decision): Likewise.
20400 (vect_supported_load_permutation_p): Likewise, and polynomial
20402 (vect_analyze_slp_cost): Handle polynomial vf.
20403 (vect_slp_analyze_node_operations): Likewise.
20404 (vect_slp_analyze_bb_1): Likewise.
20405 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20406 than an unsigned HOST_WIDE_INT.
20407 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20408 (vectorizable_load): Handle polynomial vf.
20409 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20411 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20414 Alan Hayward <alan.hayward@arm.com>
20415 David Sherwood <david.sherwood@arm.com>
20417 * match.pd: Handle bit operations involving three constants
20418 and try to fold one pair.
20420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20422 * tree-vect-loop-manip.c: Include gimple-fold.h.
20423 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20424 niters_maybe_zero parameters. Handle other cases besides a step of 1.
20425 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20426 Add a path that uses a step of VF instead of 1, but disable it
20428 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20429 and niters_no_overflow parameters. Update calls to
20430 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20431 Create a new SSA name if the latter choses to use a ste other
20432 than zero, and return it via niters_vector_mult_vf_var.
20433 * tree-vect-loop.c (vect_transform_loop): Update calls to
20434 vect_do_peeling, vect_gen_vector_loop_niters and
20435 slpeel_make_loop_iterate_ntimes.
20436 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20437 (vect_gen_vector_loop_niters): Update declarations after above changes.
20439 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
20441 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20442 128-bit round to integer instructions.
20443 (ceil<mode>2): Likewise.
20444 (btrunc<mode>2): Likewise.
20445 (round<mode>2): Likewise.
20447 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20449 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20450 unaligned VSX load/store on P8/P9.
20451 (expand_block_clear): Allow the use of unaligned VSX
20452 load/store on P8/P9.
20454 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20456 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20458 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20459 swap associated with both a load and a store.
20461 2018-01-02 Andrew Waterman <andrew@sifive.com>
20463 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20464 * config/riscv/riscv.md (clear_cache): Use it.
20466 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
20468 * web.c: Remove out-of-date comment.
20470 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20472 * expr.c (fixup_args_size_notes): Check that any existing
20473 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20474 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20475 (emit_single_push_insn): ...here.
20477 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20479 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20480 (const_vector_encoded_nelts): New function.
20481 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20482 (const_vector_int_elt, const_vector_elt): Declare.
20483 * emit-rtl.c (const_vector_int_elt_1): New function.
20484 (const_vector_elt): Likewise.
20485 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20486 of CONST_VECTOR_ELT.
20488 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20490 * expr.c: Include rtx-vector-builder.h.
20491 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20492 directly on the tree encoding.
20493 (const_vector_from_tree): Likewise.
20494 * optabs.c: Include rtx-vector-builder.h.
20495 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20496 sequence of "u" values.
20497 * vec-perm-indices.c: Include rtx-vector-builder.h.
20498 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20499 directly on the vec_perm_indices encoding.
20501 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20503 * doc/rtl.texi (const_vector): Describe new encoding scheme.
20504 * Makefile.in (OBJS): Add rtx-vector-builder.o.
20505 * rtx-vector-builder.h: New file.
20506 * rtx-vector-builder.c: Likewise.
20507 * rtl.h (rtx_def::u2): Add a const_vector field.
20508 (CONST_VECTOR_NPATTERNS): New macro.
20509 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20510 (CONST_VECTOR_DUPLICATE_P): Likewise.
20511 (CONST_VECTOR_STEPPED_P): Likewise.
20512 (CONST_VECTOR_ENCODED_ELT): Likewise.
20513 (const_vec_duplicate_p): Check for a duplicated vector encoding.
20514 (unwrap_const_vec_duplicate): Likewise.
20515 (const_vec_series_p): Check for a non-duplicated vector encoding.
20516 Say that the function only returns true for integer vectors.
20517 * emit-rtl.c: Include rtx-vector-builder.h.
20518 (gen_const_vec_duplicate_1): Delete.
20519 (gen_const_vector): Call gen_const_vec_duplicate instead of
20520 gen_const_vec_duplicate_1.
20521 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20522 (gen_const_vec_duplicate): Use rtx_vector_builder.
20523 (gen_const_vec_series): Likewise.
20524 (gen_rtx_CONST_VECTOR): Likewise.
20525 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20526 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20527 Build a new vector rather than modifying a CONST_VECTOR in-place.
20528 (handle_special_swappables): Update call accordingly.
20529 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20530 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20531 Build a new vector rather than modifying a CONST_VECTOR in-place.
20532 (handle_special_swappables): Update call accordingly.
20534 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20536 * simplify-rtx.c (simplify_const_binary_operation): Use
20537 CONST_VECTOR_ELT instead of XVECEXP.
20539 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20541 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20542 the selector elements to be different from the data elements
20543 if the selector is a VECTOR_CST.
20544 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20545 ssizetype for the selector.
20547 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20549 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20550 before testing each element individually.
20551 * tree-vect-generic.c (lower_vec_perm): Likewise.
20553 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20555 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20556 * selftest-run-tests.c (selftest::run_tests): Call it.
20557 * vector-builder.h (vector_builder::operator ==): New function.
20558 (vector_builder::operator !=): Likewise.
20559 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20560 (vec_perm_indices::all_from_input_p): New function.
20561 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20562 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20563 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20564 instead of reading the VECTOR_CST directly. Detect whether both
20565 vector inputs are the same before constructing the vec_perm_indices,
20566 and update the number of inputs argument accordingly. Use the
20567 utility functions added above. Only construct sel2 if we need to.
20569 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20571 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20572 the broadcast of the low byte.
20573 (expand_mult_highpart): Use an explicit encoding for the permutes.
20574 * optabs-query.c (can_mult_highpart_p): Likewise.
20575 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20576 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20577 (vectorizable_bswap): Likewise.
20578 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20579 explicit encoding for the power-of-2 permutes.
20580 (vect_permute_store_chain): Likewise.
20581 (vect_grouped_load_supported): Likewise.
20582 (vect_permute_load_chain): Likewise.
20584 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20586 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20587 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20588 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20589 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20590 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20591 (vect_gen_perm_mask_any): Likewise.
20593 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20595 * int-vector-builder.h: New file.
20596 * vec-perm-indices.h: Include int-vector-builder.h.
20597 (vec_perm_indices): Redefine as an int_vector_builder.
20598 (auto_vec_perm_indices): Delete.
20599 (vec_perm_builder): Redefine as a stand-alone class.
20600 (vec_perm_indices::vec_perm_indices): New function.
20601 (vec_perm_indices::clamp): Likewise.
20602 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20603 (vec_perm_indices::new_vector): New function.
20604 (vec_perm_indices::new_expanded_vector): Update for new
20605 vec_perm_indices class.
20606 (vec_perm_indices::rotate_inputs): New function.
20607 (vec_perm_indices::all_in_range_p): Operate directly on the
20608 encoded form, without computing elided elements.
20609 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20610 encoding. Update for new vec_perm_indices class.
20611 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20612 the given vec_perm_builder.
20613 (expand_vec_perm_var): Update vec_perm_builder constructor.
20614 (expand_mult_highpart): Use vec_perm_builder instead of
20615 auto_vec_perm_indices.
20616 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20617 vec_perm_indices instead of auto_vec_perm_indices. Use a single
20618 or double series encoding as appropriate.
20619 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20620 vec_perm_indices instead of auto_vec_perm_indices.
20621 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20622 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20623 (vect_permute_store_chain): Likewise.
20624 (vect_grouped_load_supported): Likewise.
20625 (vect_permute_load_chain): Likewise.
20626 (vect_shift_permute_load_chain): Likewise.
20627 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20628 (vect_transform_slp_perm_load): Likewise.
20629 (vect_schedule_slp_instance): Likewise.
20630 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20631 (vectorizable_mask_load_store): Likewise.
20632 (vectorizable_bswap): Likewise.
20633 (vectorizable_store): Likewise.
20634 (vectorizable_load): Likewise.
20635 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20636 vec_perm_indices instead of auto_vec_perm_indices. Use
20637 tree_to_vec_perm_builder to read the vector from a tree.
20638 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20639 vec_perm_builder instead of a vec_perm_indices.
20640 (have_whole_vector_shift): Use vec_perm_builder and
20641 vec_perm_indices instead of auto_vec_perm_indices. Leave the
20642 truncation to calc_vec_perm_mask_for_shift.
20643 (vect_create_epilog_for_reduction): Likewise.
20644 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20645 from auto_vec_perm_indices to vec_perm_indices.
20646 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20647 instead of changing individual elements.
20648 (aarch64_vectorize_vec_perm_const): Use new_vector to install
20649 the vector in d.perm.
20650 * config/arm/arm.c (expand_vec_perm_d::perm): Change
20651 from auto_vec_perm_indices to vec_perm_indices.
20652 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20653 instead of changing individual elements.
20654 (arm_vectorize_vec_perm_const): Use new_vector to install
20655 the vector in d.perm.
20656 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20657 Update vec_perm_builder constructor.
20658 (rs6000_expand_interleave): Likewise.
20659 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20660 (rs6000_expand_interleave): Likewise.
20662 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20664 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20665 to qimode could truncate the indices.
20666 * optabs.c (expand_vec_perm_var): Likewise.
20668 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20670 * Makefile.in (OBJS): Add vec-perm-indices.o.
20671 * vec-perm-indices.h: New file.
20672 * vec-perm-indices.c: Likewise.
20673 * target.h (vec_perm_indices): Replace with a forward class
20675 (auto_vec_perm_indices): Move to vec-perm-indices.h.
20676 * optabs.h: Include vec-perm-indices.h.
20677 (expand_vec_perm): Delete.
20678 (selector_fits_mode_p, expand_vec_perm_var): Declare.
20679 (expand_vec_perm_const): Declare.
20680 * target.def (vec_perm_const_ok): Replace with...
20681 (vec_perm_const): ...this new hook.
20682 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20683 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20684 * doc/tm.texi: Regenerate.
20685 * optabs.def (vec_perm_const): Delete.
20686 * doc/md.texi (vec_perm_const): Likewise.
20687 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20688 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20689 expand_vec_perm for constant permutation vectors. Assert that
20690 the mode of variable permutation vectors is the integer equivalent
20691 of the mode that is being permuted.
20692 * optabs-query.h (selector_fits_mode_p): Declare.
20693 * optabs-query.c: Include vec-perm-indices.h.
20694 (selector_fits_mode_p): New function.
20695 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20696 is defined, instead of checking whether the vec_perm_const_optab
20697 exists. Use targetm.vectorize.vec_perm_const instead of
20698 targetm.vectorize.vec_perm_const_ok. Check whether the indices
20699 fit in the vector mode before using a variable permute.
20700 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20701 vec_perm_indices instead of an rtx.
20702 (expand_vec_perm): Replace with...
20703 (expand_vec_perm_const): ...this new function. Take the selector
20704 as a vec_perm_indices rather than an rtx. Also take the mode of
20705 the selector. Update call to shift_amt_for_vec_perm_mask.
20706 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20707 Use vec_perm_indices::new_expanded_vector to expand the original
20708 selector into bytes. Check whether the indices fit in the vector
20709 mode before using a variable permute.
20710 (expand_vec_perm_var): Make global.
20711 (expand_mult_highpart): Use expand_vec_perm_const.
20712 * fold-const.c: Includes vec-perm-indices.h.
20713 * tree-ssa-forwprop.c: Likewise.
20714 * tree-vect-data-refs.c: Likewise.
20715 * tree-vect-generic.c: Likewise.
20716 * tree-vect-loop.c: Likewise.
20717 * tree-vect-slp.c: Likewise.
20718 * tree-vect-stmts.c: Likewise.
20719 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20721 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20722 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20723 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20724 (aarch64_vectorize_vec_perm_const): ...this new function.
20725 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20726 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20727 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20728 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20729 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20730 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20731 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20733 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
20734 check for NEON modes.
20735 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20736 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20737 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20738 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20740 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
20741 the old VEC_PERM_CONST conditions.
20742 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20743 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20744 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20745 (ia64_vectorize_vec_perm_const_ok): Merge into...
20746 (ia64_vectorize_vec_perm_const): ...this new function.
20747 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20748 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20749 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20750 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20751 * config/mips/mips.c (mips_expand_vec_perm_const)
20752 (mips_vectorize_vec_perm_const_ok): Merge into...
20753 (mips_vectorize_vec_perm_const): ...this new function.
20754 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20755 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20756 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20757 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20758 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20759 (rs6000_expand_vec_perm_const): Delete.
20760 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20762 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20763 (altivec_expand_vec_perm_const_le): Take each operand individually.
20764 Operate on constant selectors rather than rtxes.
20765 (altivec_expand_vec_perm_const): Likewise. Update call to
20766 altivec_expand_vec_perm_const_le.
20767 (rs6000_expand_vec_perm_const): Delete.
20768 (rs6000_vectorize_vec_perm_const_ok): Delete.
20769 (rs6000_vectorize_vec_perm_const): New function.
20770 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20771 an element count and rtx array.
20772 (rs6000_expand_extract_even): Update call accordingly.
20773 (rs6000_expand_interleave): Likewise.
20774 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20775 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20776 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20777 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20778 (rs6000_expand_vec_perm_const): Delete.
20779 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20780 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20781 (altivec_expand_vec_perm_const_le): Take each operand individually.
20782 Operate on constant selectors rather than rtxes.
20783 (altivec_expand_vec_perm_const): Likewise. Update call to
20784 altivec_expand_vec_perm_const_le.
20785 (rs6000_expand_vec_perm_const): Delete.
20786 (rs6000_vectorize_vec_perm_const_ok): Delete.
20787 (rs6000_vectorize_vec_perm_const): New function. Remove stray
20788 reference to the SPE evmerge intructions.
20789 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20790 an element count and rtx array.
20791 (rs6000_expand_extract_even): Update call accordingly.
20792 (rs6000_expand_interleave): Likewise.
20793 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20794 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20796 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20798 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20800 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20801 vector mode and that that mode matches the mode of the data
20803 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20804 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
20805 directly using expand_vec_perm_1 when forcing selectors into
20807 (expand_vec_perm_var): New function, split out from expand_vec_perm.
20809 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20811 * optabs-query.h (can_vec_perm_p): Delete.
20812 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20813 * optabs-query.c (can_vec_perm_p): Split into...
20814 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20815 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20816 particular selector is valid.
20817 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20818 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20819 (vect_grouped_load_supported): Likewise.
20820 (vect_shift_permute_load_chain): Likewise.
20821 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20822 (vect_transform_slp_perm_load): Likewise.
20823 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20824 (vectorizable_bswap): Likewise.
20825 (vect_gen_perm_mask_checked): Likewise.
20826 * fold-const.c (fold_ternary_loc): Likewise. Don't take
20827 implementations of variable permutation vectors into account
20828 when deciding which selector to use.
20829 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20830 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20831 with a false third argument.
20832 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20833 to test whether the constant selector is valid and can_vec_perm_var_p
20834 to test whether a variable selector is valid.
20836 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20838 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20839 * optabs-query.c (can_vec_perm_p): Likewise.
20840 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20841 instead of vec_perm_indices.
20842 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20843 (vect_gen_perm_mask_checked): Likewise,
20844 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20845 (vect_gen_perm_mask_checked): Likewise,
20847 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20849 * optabs-query.h (qimode_for_vec_perm): Declare.
20850 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20851 (qimode_for_vec_perm): ...this new function.
20852 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20854 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20856 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20857 does not have a conditional at the top.
20859 2018-01-02 Richard Biener <rguenther@suse.de>
20861 * ipa-inline.c (big_speedup_p): Fix expression.
20863 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20866 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20869 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20873 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20874 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20875 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20876 cond_taken_branch_cost 3->4.
20878 2018-01-01 Jakub Jelinek <jakub@redhat.com>
20880 PR tree-optimization/83581
20881 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20882 TODO_cleanup_cfg if any changes have been made.
20884 PR middle-end/83608
20885 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20886 convert_modes if target mode has the right side, but different mode
20889 PR middle-end/83609
20890 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20891 last argument when extracting from CONCAT. If either from_real or
20892 from_imag is NULL, use expansion through memory. If result is not
20893 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20894 the parts directly to inner mode, if even that fails, use expansion
20897 PR middle-end/83623
20898 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20899 check for bswap in mode rather than HImode and use that in expand_unop
20902 Copyright (C) 2018 Free Software Foundation, Inc.
20904 Copying and distribution of this file, with or without modification,
20905 are permitted in any medium without royalty provided the copyright
20906 notice and this notice are preserved.