2018-08-23 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blob89dfeb9f81fbfd0461d55d260c80be7af8d0ccc5
1 2018-08-23  Richard Biener  <rguenther@suse.de>
3         PR middle-end/87024
4         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5         calls.
7 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
9         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
10         of single-vector TBLs.
11         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
12         one input is given.
14 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
16         PR target/85910
17         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
18         aarch64_evpc_tbl guard.
20 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
23         behaviour.
25 2018-08-22  Martin Sebor  <msebor@redhat.com>
27         PR middle-end/87052
28         * tree-pretty-print.c (pretty_print_string): Add argument.
29         (dump_generic_node): Call to pretty_print_string with string size.
31 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
33         PR rtl-optimization/86771
34         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
35         of two SETs into those two SETs, one to be placed at i2, if that SETs
36         destination is modified between i2 and i3.
38 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
40         PR tree-optimization/86725
41         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
42         function.
43         (vect_analyze_scalar_cycles_1): Check it.
45 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
47         PR tree-optimization/86725
48         * tree-vect-loop.c (vect_is_simple_reduction): When treating
49         an outer loop phi as a double reduction, make sure that the
50         single user of the phi result is an inner loop phi.
52 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
54         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
55         grouped stores with gaps to a strided group.
57 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
59         * tree-vect-stmts.c (get_group_load_store_type)
60         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
61         first statement in a group.
63 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
65         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
66         the sequence used in gcc/gcc.c.
68 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
70         PR other/704
71         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
72         building it.
74 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
76         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
77         Darwin10-specific unwinder-shim.
78         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
79         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
80         New to cater for Darwin10 Rosetta.
82 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
84         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
85         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
87 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
89         PR bootstrap/81033
90         PR target/81733
91         PR target/52795
92         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
93         (dwarf2out_switch_text_section): Generate a local label for the
94         second function sub-section and apply it as the second FDE start
95         label.
96         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
97         second sub-section start.
99 2018-08-22  Richard Biener  <rguenther@suse.de>
101         PR tree-optimization/86988
102         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
104 2018-08-22  Richard Biener  <rguenther@suse.de>
106         PR tree-optimization/86945
107         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
109 2018-08-22  Alexandre Oliva <oliva@adacore.com>
111         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
112         a comment about how uses of r2 for .sdata2 come about.
114 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
116         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
118 2018-08-21  Marek Polacek  <polacek@redhat.com>
120         PR c++/86981, Implement -Wpessimizing-move.
121         * doc/invoke.texi: Document -Wpessimizing-move.
123 2018-08-21  Jan Hubicka  <jh@suse.cz>
125         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
126         * tree.h (is_redundant_typedef): Remove.
127         * dwarf2out.c (is_redundant_typedef): Turn into static function.
129 2018-08-21  Jan Hubicka  <jh@suse.cz>
131         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
132         when possible.
134 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
136         * expmed.c (extract_low_bits): Reject invalid subregs early.
138 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
140         PR middle-end/86121
141         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
142         behaviour.
144 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
146         * config/vxworks.h: Guard vxworks_asm_out_constructor and
147         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
148         * config/vxworks.c: Likewise.
150 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
152         * config/vxworks.c: Set targetm.have_ctors_dtors
153         if HAVE_INITFINI_ARRAY_SUPPORT.
154         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
155         if HAVE_INITFINI_ARRAY_SUPPORT.
157 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
159         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
160         default search path for VxWorks < 7.
162 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
164         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
165         (get_format_string): Refer to c_getstr.
167 2018-08-21  Tom de Vries  <tdevries@suse.de>
169         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
170         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
171         (debuginfo_early_stop): Declare.
172         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
173         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
174         (debuginfo_early_stop): New function.
175         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
176         and debuginfo_early_stop.
177         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
178         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
179         (general_init): Call debuginfo_early_init.
180         (finalize): Call debuginfo_fini.
181         (do_compile): Call debuginfo_init.
182         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
183         -fdump-early-debug.
184         (@item -fdump-debug, @item -fdump-earlydebug): Add.
186 2018-08-21  Tom de Vries  <tdevries@suse.de>
188         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
189         flag_dump_noaddr and flag_dump_unnumbered.
191 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
193         * wide-int-range.cc (wide_int_range_abs): New.
194         (wide_int_range_order_set): Rename from wide_int_range_min_max.
195         * wide-int-range.h (wide_int_range_abs): New.
196         (wide_int_range_min_max): New.
197         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
198         case to call wide_int_range_abs.
199         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
200         (extract_range_from_abs_expr): Delete.
202 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
204         PR target/87033
205         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
206         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
207         for indexed loads.
209 2018-08-20  Nathan Sidwell  <nathan@acm.org>
210             Jeff Law <law@redhat.com>
212         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
213         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
215 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
217         PR other/84889
218         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
219         (decl_attributes): Likewise.
220         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
221         instance.
222         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
223         * diagnostic-core.h (class auto_diagnostic_group): New class.
224         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
225         (diagnostic_report_diagnostic): Handle the first diagnostics within
226         a group.
227         (emit_diagnostic): Add auto_diagnostic_group instance.
228         (inform): Likewise.
229         (inform_n): Likewise.
230         (warning): Likewise.
231         (warning_at): Likewise.
232         (warning_n): Likewise.
233         (pedwarn): Likewise.
234         (permerror): Likewise.
235         (error): Likewise.
236         (error_n): Likewise.
237         (error_at): Likewise.
238         (sorry): Likewise.
239         (fatal_error): Likewise.
240         (internal_error): Likewise.
241         (internal_error_no_backtrace): Likewise.
242         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
243         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
244         * diagnostic.h (struct diagnostic_context): Add fields
245         "diagnostic_group_nesting_depth",
246         "diagnostic_group_emission_count", "begin_group_cb",
247         "end_group_cb".
248         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
249         Add auto_diagnostic_group instance(s).
250         (find_explicit_erroneous_behavior): Likewise.
251         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
252         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
253         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
254         (gimplify_va_arg_expr): Likewise.
255         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
256         (HSA_SORRY_AT): Likewise.
257         * ipa-devirt.c (compare_virtual_tables): Likewise.
258         (warn_odr): Likewise.
259         * multiple_target.c (expand_target_clones): Likewise.
260         * opts-common.c (cmdline_handle_error): Likewise.
261         * reginfo.c (globalize_reg): Likewise.
262         * substring-locations.c (format_warning_n_va): Likewise.
263         * tree-inline.c (expand_call_inline): Likewise.
264         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
265         * tree-ssa-loop-niter.c
266         (do_warn_aggressive_loop_optimizations): Likewise.
267         * tree-ssa-uninit.c (warn_uninit): Likewise.
268         * tree.c (warn_deprecated_use): Likewise.
270 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
272         PR target/87014
273         * config/i386/i386.md (eh_return): Always update EH return
274         address in word_mode.
276 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
278         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
279         TARGET_SPLIT_COMPLEX_ARG is defined.
281 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
283         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
285 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
287         PR target/86984
288         * expr.c (expand_assignment): Assert that bitpos is positive.
289         (store_field): Likewise
290         (expand_expr_real_1): Make sure that bitpos is positive.
291         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
292         integer overflow.
294 2018-08-20  Nathan Sidwell  <nathan@acm.org>
296         * Makefile.in (CPP_ID_DATA_H): Delete.
297         (CPP_INTERNAL_H): Don't add it.
298         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
299         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
301 2018-08-20  Richard Biener  <rguenther@suse.de>
303         PR tree-optimization/78655
304         * tree-vrp.c (extract_range_from_binary_expr_1): Make
305         pointer + offset nonnull if either operand is nonnull work.
307 2018-08-20  Tom de Vries  <tdevries@suse.de>
309         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
310         unless the referenced die describes the added property using
311         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
312         Otherwise, add a DW_AT_location to the referenced die.
314 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
316         PR target/86994
317         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
318         register_operand when calling ix86_set_reg_reg_cost.
319         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
320         Set *total to 0 for operands that satisfy x86_64_immediate_operand
321         predicate and to 1 otherwise.
323 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
325         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
326         emit a diagnostic that it is not supported and reset the option.
327         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
328         supported and consume the option.  (ASM_FINAL_SPEC): New.
330 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
332         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
333         a sentence.
335 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
337         C-SKY port: Documentation
339         * doc/extend.texi (C-SKY Function Attributes): New section.
340         * doc/invoke.texi (Option Summary): Add C-SKY options.
341         (C-SKY Options): New section.
342         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
344 2018-08-17  Jojo  <jijie_rong@c-sky.com>
345             Huibin Wang  <huibin_wang@c-sky.com>
346             Sandra Loosemore  <sandra@codesourcery.com>
347             Chung-Lin Tang  <cltang@codesourcery.com>
349         C-SKY port: Backend implementation
351         * config/csky/*: New.
352         * common/config/csky/*: New.
354 2018-08-17  Jojo  <jijie_rong@c-sky.com>
355             Huibin Wang  <huibin_wang@c-sky.com>
356             Sandra Loosemore  <sandra@codesourcery.com>
357             Chung-Lin Tang  <cltang@codesourcery.com>
358             Andrew Jenner  <andrew@codesourcery.com>
360         C-SKY port: Configury
362         * config.gcc (csky-*-*): New.
363         * configure.ac: Add csky to targets for dwarf2 debug_line support.
364         * configure: Regenerated.
366 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
368         * dump-context.h: Include "dumpfile.h".
369         (dump_context::dump_printf_va): Convert final param from va_list
370         to va_list *.  Convert from ATTRIBUTE_PRINTF to
371         ATTRIBUTE_GCC_DUMP_PRINTF.
372         (dump_context::dump_printf_loc_va): Likewise.
373         * dumpfile.c: Include "stringpool.h".
374         (make_item_for_dump_printf_va): Delete.
375         (make_item_for_dump_printf): Delete.
376         (class dump_pretty_printer): New class.
377         (dump_pretty_printer::dump_pretty_printer): New ctor.
378         (dump_pretty_printer::emit_items): New member function.
379         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
380         function.
381         (dump_pretty_printer::emit_item): New member function.
382         (dump_pretty_printer::stash_item): New member function.
383         (dump_pretty_printer::format_decoder_cb): New member function.
384         (dump_pretty_printer::decode_format): New member function.
385         (dump_context::dump_printf_va): Reimplement in terms of
386         dump_pretty_printer.
387         (dump_context::dump_printf_loc_va): Convert final param from va_list
388         to va_list *.
389         (dump_context::begin_scope): Reimplement call to
390         make_item_for_dump_printf.
391         (dump_printf): Update for change to dump_printf_va.
392         (dump_printf_loc): Likewise.
393         (selftest::test_capture_of_dump_calls): Convert "stmt" from
394         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
395         with %T, %E, and %G.
396         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
397         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
398         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
399         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
400         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
401         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
402         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
403         within a dump_printf_loc call to "%wu".
404         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
405         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
406         missing space after "=".
407         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
408         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
409         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
410         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
411         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
412         duplicate "vectorized" from message.
414 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
416         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
417         polyNxK_t element's TYPE_STRING_FLAG.
419 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
421         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
422         (they were unnamed before).  Fix comments.
424 2018-08-17  Nathan Sidwell  <nathan@acm.org>
426         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
428 2018-08-17  Richard Biener  <rguenther@suse.de>
430         PR tree-optimization/86841
431         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
433 2018-08-17  Martin Liska  <mliska@suse.cz>
435         * common.opt: Remove Warn, Init and Report for options with
436         Ignore/Deprecated flag. Warning is done automatically for
437         Deprecated flags.
438         * config/i386/i386.opt: Likewise.
439         * config/ia64/ia64.opt: Likewise.
440         * config/rs6000/rs6000.opt: Likewise.
441         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
442         Remove usage of flag_check_pointer_bounds.
443         * lto-wrapper.c (merge_and_complain): Do not handle
444         OPT_fcheck_pointer_bounds.
445         (append_compiler_options): Likewise.
446         * opt-functions.awk: Do not handle Deprecated.
447         * optc-gen.awk: Check that Var, Report and Init are not
448         used for an option with Ignore/Deprecated flag.
449         * opts-common.c (decode_cmdline_option): Do not report
450         CL_ERR_DEPRECATED.
451         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
452         options.
453         * opts.h (struct cl_option): Remove cl_deprecated flag.
454         (CL_ERR_DEPRECATED): Remove error enum value.
456 2018-08-17  Richard Biener  <rguenther@suse.de>
458         PR middle-end/86505
459         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
460         across a va-arg-pack using call adjust its return value accordingly.
462 2018-08-16  Martin Sebor  <msebor@redhat.com>
464         PR tree-optimization/86853
465         * gimple-ssa-sprintf.c (struct format_result): Rename member.
466         (struct fmtresult): Add member and initialize it in ctors.
467         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
468         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
469         (format_directive): Set POSUNDER4K when MAYFAIL is set.
470         (parse_directive): Handle %C same as %c.
471         (sprintf_dom_walker::compute_format_length): Adjust.
472         (is_call_safe): Adjust.
474 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
476         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
477         for determining how to count the elements.
478         * builtins.h (c_strlen): Adjust prototype.
479         * expr.c (string_constant): Add new parameter mem_size.
480         Set *mem_size appropriately.
481         * expr.h (string_constant): Adjust protoype.
482         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
483         * gimple-fold.h (get_range_strlen): Adjust prototype.
484         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
485         (format_string): Call get_string_length with eltsize.
487 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
489         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
490         to emit the span, rather than setting it as the prefix.
492 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
494         * diagnostic-show-locus.c (layout::start_annotation_line): Add
495         "margin_char" parameter, defaulting to space.  Use it in place
496         of pp_space for the initial part of the margin.
497         (layout::print_leading_fixits): Use '+' when filling the margin
498         of line-insertion fix-it hints.
500 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
502         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
503         Delete.
505 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
507         * config/rs6000/altivec.md: Don't set length attribute to the default
508         value.
509         * config/rs6000/darwin.md: Ditto.
510         * config/rs6000/dfp.md: Ditto.
511         * config/rs6000/htm.md: Ditto.
512         * config/rs6000/rs6000.md: Ditto.
513         * config/rs6000/sync.md: Ditto.
514         * config/rs6000/vsx.md: Ditto.
516 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
518         * config/rs6000/altivec.md: Don't set length attribute to the default
519         value, for branch instructions.
520         * config/rs6000/darwin.md: Ditto.
521         * config/rs6000/rs6000.md: Ditto.
523 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
525         * config/rs6000/rs6000.md (length): Always define as const_int 4.
526         (unnamed conditional branch define_insn): Set length to 4 or 8
527         depending on offset.
528         (<bd>_<mode>): Similar, for alternative 0.
529         (<bd>tf_<mode>): Ditto.
531 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
533         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
535 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
537         * doc/rtl.texi: Replace old RTX class names with new names.
540 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
542         * expmed.h (canonicalize_comparison): New declaration.
543         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
544         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
545         * optabs.c (prepare_cmp_insn): Likewise.
546         * rtl.h (unsigned_condition_p): New function which checks if a
547         comparison operator is unsigned.
549 2018-08-16  Nathan Sidwell  <nathan@acm.org>
551         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
552         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
554 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
556         PR target/84711
557         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
558         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
559         (mov<mov>): ..this and enable unconditionally.
561 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
563         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
565 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
567         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
568         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
569         "Common" with "Target".
571 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
573         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
574         * doc/invoke.texi (mmitigate-rop): Remove.
575         * config/i386/i386.c: Do not include "regrename.h".
576         (ix86_rop_should_change_byte_p, reg_encoded_number)
577         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
578         Remove.
579         (ix86_reorg): Remove call to ix86_mitigate_rop.
580         * config/i386/i386.md (attr "modrm_class"): Remove.
581         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
582         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
583         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
585 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
587         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
588         allow folding of mergeh() and mergel() for the float and double types.
589         (fold_mergehl_helper): Rework to handle building a permute tree
590         for float vectors.
592 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
594         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
595         for TARGET_SSE.
597 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
599         * common.opt (fdiagnostics-show-labels): New option.
600         * diagnostic-show-locus.c (class layout_range): Add field
601         "m_label".
602         (class layout): Add field "m_show_labels_p".
603         (layout_range::layout_range): Add param "label" and use it to
604         initialize m_label.
605         (make_range): Pass in NULL for new "label" param of layout_range's
606         ctor.
607         (layout::layout): Initialize m_show_labels_p.
608         (layout::maybe_add_location_range): Pass in loc_range->m_label
609         when constructing layout_range instances.
610         (struct line_label): New struct.
611         (layout::print_any_labels): New member function.
612         (layout::print_line): Call it if label-printing is enabled.
613         (selftest::test_one_liner_labels): New test.
614         (selftest::test_diagnostic_show_locus_one_liner): Call it.
615         * diagnostic.c (diagnostic_initialize): Initialize
616         context->show_labels_p.
617         * diagnostic.h (struct diagnostic_context): Add field
618         "show_labels_p".
619         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
620         -fno-diagnostics-show-labels.
621         * dwarf2out.c (gen_producer_string): Add
622         OPT_fdiagnostics_show_labels to the ignored options.
623         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
624         param.
625         (gcc_rich_location::maybe_add_expr): Likewise.
626         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
627         label" param, defaulting to NULL.
628         (gcc_rich_location::add_expr): Add "label" param.
629         (gcc_rich_location::maybe_add_expr): Likewise.
630         (class text_range_label): New class.
631         (class range_label_for_type_mismatch): New class.
632         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
633         of format_warning_va.
634         (fmtwarn_n): Likewise for new params of format_warning_n_va.
635         * lto-wrapper.c (merge_and_complain): Add
636         OPT_fdiagnostics_show_labels to the "pick one setting" options.
637         (append_compiler_options): Likewise to the dropped options.
638         (append_diag_options): Likewise to the passed-on options.
639         * opts.c (common_handle_option): Handle the new option.
640         * selftest-diagnostic.c
641         (test_diagnostic_context::test_diagnostic_context): Enable
642         show_labels_p.
643         * substring-locations.c: Include "gcc-rich-location.h".
644         (format_warning_n_va): Add "fmt_label" and "param_label" params
645         and use them as appropriate.
646         (format_warning_va): Add "fmt_label" and "param_label" params,
647         passing them on to format_warning_n_va.
648         (format_warning_at_substring): Likewise.
649         (format_warning_at_substring_n): Likewise.
650         * substring-locations.h (format_warning_va): Add "fmt_label" and
651         "param_label" params.
652         (format_warning_n_va): Likewise.
653         (format_warning_at_substring): Likewise.
654         (format_warning_at_substring_n): Likewise.
655         * toplev.c (general_init): Initialize global_dc->show_labels_p.
657 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
659         PR testsuite/86519
660         * builtins.c (expand_builtin_memcmp): Do not expand the call
661         when overflow is detected.
663 2018-08-15  Martin Sebor  <msebor@redhat.com>
665         PR tree-optimization/71625
666         * config/aarch64/aarch64-builtins.c
667         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
669 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
671         * config/s390/s390.c (s390_reorg): Remove loop.
673 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
675         * config/darwin.c
676          (darwin_function_switched_text_sections): Delete.
677         * gcc/config/darwin.h
678          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
680 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
682         PR target/81685
683         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
684         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
685         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
687 2018-08-15  Martin Liska  <mliska@suse.cz>
689         PR tree-optimization/86925
690         * predict.c (expr_expected_value_1): When taking
691         later predictor, assign also probability.
692         Use fold_build2_initializer_loc in order to fold
693         the expression in -frounding-math.
695 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
697         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
698         patterns.
699         (expand_vec_perm_1): Try the new method.
701 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
703         PR target/86547
704         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
705         Check whether lra_live_max_point is 0 before dividing.
707 2018-08-14  Martin Sebor  <msebor@redhat.com>
709         PR tree-optimization/86650
710         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
711         (vrp_prop::check_mem_ref): Same.
713 2018-08-13  Liu Hao <lh_mouse@126.com>
715         * pretty-print.c (eat_esc_sequence): Swap the foreground and
716         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
717         and clear it thereafter, as it only works for DBCS.
719 2018-08-13  Liu Hao <lh_mouse@126.com>
721         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
722         handle returned by _get_osf_handle().
724 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
726         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
727         for folding vec_perm.
729 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
731         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
732         Add support for gimple-folding of vec_pack() and vec_unpack()
733         intrinsics.
735 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
737         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
738         vec_xst variants to the list.
739         (rs6000_gimple_fold_builtin): Add support for folding unaligned
740         vector loads and stores.
742 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
744         * config.gcc (rs6000-ibm-aix4.x): Delete.
745         (rs6000-ibm-aix5.1): Delete.
746         (rs6000-ibm-aix5.2): Delete.
747         (rs6000-ibm-aix5.3): Delete.
748         * config/rs6000/aix43.h: Delete.
749         * config/rs6000/aix51.h: Delete.
750         * config/rs6000/aix52.h: Delete.
751         * config/rs6000/t-aix43: Delete.
753 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
755         * config/s390/s390.c (s390_decompose_constant_pool_ref):
756         New function.
757         (s390_decompose_address): Factor out constant pool ref
758         decomposition.
760 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
762         * config/nds32/nds32-predicates.c
763         (nds32_can_use_bclr_p): Change return type as bool.
764         (nds32_can_use_bset_p): Ditto.
765         (nds32_can_use_btgl_p): Ditto.
766         (nds32_can_use_bitci_p): Ditto.
767         * config/nds32/nds32-protos.h
768         (nds32_can_use_bclr_p): Change declaration.
769         (nds32_can_use_bset_p): Ditto.
770         (nds32_can_use_btgl_p): Ditto.
771         (nds32_can_use_bitci_p): Ditto.
773 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
775         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
776         Support -msched-prolog-epilog option.
777         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
779 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
781         * common/config/nds32/nds32-common.c
782         (nds32_option_optimization_table): Enalbe -malways-align.
784 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
786         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
787         extra_headers.
788         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
789         OPT_misr_secure_ case.
790         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
791         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
792         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
793         secure attribute.
794         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
795         (nds32_isr_info): New field security_level.
796         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
797         * config/nds32/nds32.md (return_internal): Consider critical attribute.
798         * config/nds32/nds32.opt (misr-secure): New option.
799         * config/nds32/nds32_init.inc: New file.
800         * config/nds32/nds32_isr.h: New file.
802 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
804         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
805         Update comment for atomic instructions.
806         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
807         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
808         Remove.
809         (atomic_loaddi): Revise fence expansion to only emit fence prior to
810         load for __ATOMIC_SEQ_CST model.
811         (atomic_loaddi_1): Remove float register target.
812         (atomic_storedi): Handle CONST_INT values.
813         (atomic_storedi_1): Remove float register source.  Add special case
814         for zero value.
815         (memory_barrier): New expander and insn.
817 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
819         PR tree-optimization/86835
820         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
821         new_stmt after def_gsi, make sure to insert new_square_stmt after
822         that stmt, not 2 stmts before it.
824 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
826         PR target/82418
827         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
828         instead of SWI48.
830 2018-08-10  Martin Liska  <mliska@suse.cz>
832         PR target/83610
833         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
834         function type.
835         * builtins.c (expand_builtin_expect_with_probability):
836         New function.
837         (expand_builtin_expect_with_probability): New function.
838         (build_builtin_expect_predicate): Add new argumnet probability
839         for BUILT_IN_EXPECT_WITH_PROBABILITY.
840         (fold_builtin_expect):
841         (fold_builtin_2):
842         (fold_builtin_3):
843         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
844         * builtins.h (fold_builtin_expect): Set new argument.
845         * doc/extend.texi: Document __builtin_expect_with_probability.
846         * doc/invoke.texi: Likewise.
847         * gimple-fold.c (gimple_fold_call): Pass new argument.
848         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
849         also BUILT_IN_EXPECT_WITH_PROBABILITY.
850         * predict.c (get_predictor_value): New function.
851         (expr_expected_value): Add new argument probability. Assume
852         that predictor and probability are always non-null.
853         (expr_expected_value_1): Likewise.  For __builtin_expect and
854         __builtin_expect_with_probability set probability.  Handle
855         combination in binary expressions.
856         (tree_predict_by_opcode): Simplify code by simply calling
857         get_predictor_value.
858         (pass_strip_predict_hints::execute): Add handling of
859         BUILT_IN_EXPECT_WITH_PROBABILITY.
860         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
861         new predictor.
862         * tree.h (DECL_BUILT_IN_P): New function.
864 2018-08-10  Martin Liska  <mliska@suse.cz>
866         PR tree-optimization/85799
867         * passes.def: Add argument for pass_strip_predict_hints.
868         * predict.c (class pass_strip_predict_hints): Add new argument
869         early_p.
870         (strip_predictor_early): New function.
871         (pass_strip_predict_hints::execute): Call the function to
872         strip predictors.
873         (strip_predict_hints): New function.
874         * predict.def: Fix comment.
876 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
878         * Makefile.in: Clarify which tm.texi to copy over to assert the
879         right to grant a GFDL license for all.
881 2018-08-09  Jeff Law  <law@redhat.com>
883         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
884         unused variable.
886 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
888         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
889         prototype.
891 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
893         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
894         reductions for variable-length vectors.
896 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
898         PR other/84889
899         * common.opt (fdiagnostics-show-line-numbers): New option.
900         * diagnostic-show-locus.c (class layout): Add fields
901         "m_show_line_numbers_p" and "m_linenum_width";
902         (num_digits): New function.
903         (test_num_digits): New function.
904         (layout::layout): Initialize new fields.  Update m_x_offset
905         logic to handle any left margin.
906         (layout::print_source_line): Print line number when requested.
907         (layout::start_annotation_line): New member function.
908         (layout::print_annotation_line): Call it.
909         (layout::print_leading_fixits): Likewise.
910         (layout::print_trailing_fixits): Likewise.  Update calls to
911         move_to_column for new parameter.
912         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
913         it to potentially call start_annotation_line.
914         (layout::show_ruler): Call start_annotation_line.
915         (selftest::test_line_numbers_multiline_range): New selftest.
916         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
917         and selftest::test_line_numbers_multiline_range.
918         * diagnostic.c (diagnostic_initialize): Initialize
919         show_line_numbers_p.
920         * diagnostic.h (struct diagnostic_context): Add field
921         "show_line_numbers_p".
922         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
923         -fno-diagnostics-show-line-numbers.
924         * dwarf2out.c (gen_producer_string): Add
925         OPT_fdiagnostics_show_line_numbers to the ignored options.
926         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
927         one setting" options.
928         (append_compiler_options): Likewise to the dropped options.
929         (append_diag_options): Likewise to the passed-on options.
930         * opts.c (common_handle_option): Handle the new option.
931         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
933 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
935         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
936         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
937         third argument of type "const signed char" to descriptions of
938         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
939         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
940         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
941         __builtin_bcdsub_ov functions.
943 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
945         PR tree-optimization/86858
946         * tree-vect-loop.c (vect_is_simple_reduction): Restore
947         flow_bb_inside_loop_p calls.
949 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
951         PR tree-optimization/86871
952         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
953         instead of gimple_assign_lhs.
955 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
957         PR target/86887
958         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
959         register constraint to operand 0.
960         (add<mode>3_carryinC): Likewise.
961         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
963 2018-08-09  Martin Liska  <mliska@suse.cz>
965         PR c/86895
966         * common.opt: Remove extra line.
968 2018-08-09  Martin Liska  <mliska@suse.cz>
970         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
971         at the end of a line, make first letter capital and end up
972         a sentence with a dot.
973         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
974         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
975         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
976         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
977         (PARAM_MAX_ISL_OPERATIONS): Likewise.
978         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
979         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
980         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
981         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
982         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
983         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
984         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
985         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
986         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
987         (PARAM_TREE_REASSOC_WIDTH): Likewise.
988         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
989         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
990         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
992 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
994         PR target/84332
995         * config/s390/s390.c (s390_option_override_internal): Reduce the
996         stack-clash-protection-probe-interval param if it would be too big
997         for z900.
999 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
1001         PR target/46179
1002         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1003         * config/m68k/m68k.c (handle_move_double): Don't call
1004         m68k_final_prescan_insn.
1005         (m68k_adjust_decorated_operand): Renamed from
1006         m68k_final_prescan_insn, remove first and third operand and
1007         simplify.
1008         (print_operand): Call it.
1009         (print_operand_address): Call it.
1011 2018-08-08  Nathan Sidwell  <nathan@acm.org>
1013         * diagnostic.c (diagnostic_report_current_module): Use
1014         linemap_included_from & linemap_included_from_linemap.
1016 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
1018         * config/aarch64/aarch64-cores.def: Add phecda core.
1019         * config/aarch64/aarch64-tune.md: Regenerate.
1020         * doc/invoke.texi: Add phecda core.
1022 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1024         PR target/85295
1025         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1026         definitions.
1027         * config/s390/s390.md ("movti"): Add more alternatives for
1028         constant to GPR copies.
1030 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1032         * config/s390/s390.c: Fix whitespace damage throughout the file.
1033         * config/s390/s390.h: Likewise.
1034         * config/s390/tpf.h: Likewise.
1036 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1038         * config/s390/s390.c (s390_loadrelative_operand_p):
1039         Remove TARGET_CPU_ZARCH usages.
1040         (s390_rtx_costs): Likewise.
1041         (s390_legitimate_constant_p): Likewise.
1042         (s390_cannot_force_const_mem): Likewise.
1043         (legitimate_reload_constant_p): Likewise.
1044         (s390_preferred_reload_class): Likewise.
1045         (legitimize_pic_address): Likewise.
1046         (legitimize_tls_address): Likewise.
1047         (s390_split_branches): Removed.
1048         (s390_add_execute): Removed.
1049         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1050         (s390_mainpool_start): Likewise.
1051         (s390_mainpool_finish): Likewise.
1052         (s390_mainpool_cancel): Removed.
1053         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1054         (s390_chunkify_cancel): Likewise.
1055         (s390_return_addr_rtx): Likewise.
1056         (s390_register_info): Remove split_branches_pending_p uages.
1057         (s390_optimize_register_info): Likewise.
1058         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1059         split_branches_pending_p usages.
1060         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1061         (s390_load_got): Likewise.
1062         (s390_expand_split_stack_prologue): Likewise.
1063         (output_asm_nops): Likewise.
1064         (s390_function_profiler): Likewise.
1065         (s390_emit_call): Likewise.
1066         (s390_conditional_register_usage): Likewise.
1067         (s390_optimize_prologue): Likewise.
1068         (s390_reorg): Remove TARGET_CPU_ZARCH and
1069         split_branches_pending_p usages.
1070         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1071         usages.
1072         (s390_output_indirect_thunk_function): Likewise.
1073         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1074         (TARGET_CPU_ZARCH_P): Removed.
1075         (struct machine_function): Remove split_branches_pending_p.
1076         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1078 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1080         * common/config/s390/s390-common.c (processor_flags_table):
1081         Remove flags.
1082         * config.gcc: Remove with_arch/with_tune support.
1083         * config/s390/2064.md: Remove cpu attribute comparisons.
1084         * config/s390/driver-native.c (s390_host_detect_local_cpu):
1085         Remove MTN.
1086         * config/s390/linux.h (ASM_SPEC):
1087         Remove -march support.
1088         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1089         Use a table to get an arch level.
1090         * config/s390/s390-opts.h (enum processor_type):
1091         Remove enum values.
1092         * config/s390/s390.c
1093         (processor_table): Remove entries, add arch_level values.
1094         (s390_issue_rate): Remove cases.
1095         (s390_option_override): Adjust
1096         s390_option_override_internal() call.
1097         (s390_option_override_internal): Remove deprecation warning.
1098         (s390_valid_target_attribute_tree): Adjust
1099         s390_option_override_internal() call.
1100         * config/s390/s390.h (struct s390_processor):
1101         Share with s390-c.c, add arch_level field.
1102         * config/s390/s390.md:
1103         Remove occurrences in cpu attribute.
1104         * config/s390/s390.opt: Remove -march/-mtune support.
1105         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1106         * doc/invoke.texi: Remove deprecation warning.
1108 2018-08-08  Luis Machado  <luis.machado@linaro.org>
1110         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1111         global.
1112         (qdf24xx_tunings): Set vector cost structure to
1113         qdf24xx_vector_cost.
1115         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1116         <register_sextend>: Set to 3.
1118 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
1120         PR target/86838
1121         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1122         * config/aarch64/aarch64-simd.md
1123         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1124         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1125         (aarch64_frecpx<mode>): ...this new pattern.
1126         * config/aarch64/aarch64-simd-builtins.def: Remove comment
1127         about aarch64_frecp<FRECP:frecp_suffix><mode>.
1129 2018-08-07  Martin Liska  <mliska@suse.cz>
1131         PR middle-end/83023
1132         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1133         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1134         * predict.def (PRED_MALLOC_NONNULL): New predictor.
1135         * doc/extend.texi: Document that malloc attribute adds
1136         hit to compiler.
1138 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
1140         PR target/86785
1141         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1142         Define to speculation_safe_value_not_needed.
1144 2018-08-06  Jeff Law  <law@redhat.com>
1146         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1147         the vr_values instance to cprop_into_stmt.
1148         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1149         (cprop_operand): Also query EVRP to determine if OP is a constant.
1151 2018-08-06  Nathan Sidwell  <nathan@acm.org>
1153         * diagnostic.c (diagnostic_report_current_module): Reroll
1154         included-at loop.  Translate text.
1156 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
1158         * function-tests.c (selftest::test_expansion_to_rtl): Call
1159         free_after_compilation.
1161 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1163         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1165 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1167         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1168         loops with memory block operations from getting unrolled.
1170 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
1172         PR target/86807
1173         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1174         Define to speculation_safe_value_not_needed.
1176 2018-08-06  Jeff Law  <law@redhat.com>
1178         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1179         assert.
1181 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1183         PR target/86662
1184         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1185         with all enabled __intN types.
1187         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1189 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1191         * alias.c (record_set): Check for clobber high.
1192         * cfgexpand.c (expand_gimple_stmt): Likewise.
1193         * combine-stack-adj.c (single_set_for_csa): Likewise.
1194         * combine.c (find_single_use_1): Likewise.
1195         (set_nonzero_bits_and_sign_copies): Likewise.
1196         (get_combine_src_dest): Likewise.
1197         (is_parallel_of_n_reg_sets): Likewise.
1198         (try_combine): Likewise.
1199         (record_dead_and_set_regs_1): Likewise.
1200         (reg_dead_at_p_1): Likewise.
1201         (reg_dead_at_p): Likewise.
1202         * dce.c (deletable_insn_p): Likewise.
1203         (mark_nonreg_stores_1): Likewise.
1204         (mark_nonreg_stores_2): Likewise.
1205         * df-scan.c (df_find_hard_reg_defs): Likewise.
1206         (df_uses_record): Likewise.
1207         (df_get_call_refs): Likewise.
1208         * dwarf2out.c (mem_loc_descriptor): Likewise.
1209         * haifa-sched.c (haifa_classify_rtx): Likewise.
1210         * ira-build.c (create_insn_allocnos): Likewise.
1211         * ira-costs.c (scan_one_insn): Likewise.
1212         * ira.c (equiv_init_movable_p): Likewise.
1213         (rtx_moveable_p): Likewise.
1214         (interesting_dest_for_shprep): Likewise.
1215         * jump.c (mark_jump_label_1): Likewise.
1216         * postreload-gcse.c (record_opr_changes): Likewise.
1217         * postreload.c (reload_cse_simplify): Likewise.
1218         (struct reg_use): Add source expr.
1219         (reload_combine): Check for clobber high.
1220         (reload_combine_note_use): Likewise.
1221         (reload_cse_move2add): Likewise.
1222         (move2add_note_store): Likewise.
1223         * print-rtl.c (print_pattern): Likewise.
1224         * recog.c (decode_asm_operands): Likewise.
1225         (store_data_bypass_p): Likewise.
1226         (if_test_bypass_p): Likewise.
1227         * regcprop.c (kill_clobbered_value): Likewise.
1228         (kill_set_value): Likewise.
1229         * reginfo.c (reg_scan_mark_refs): Likewise.
1230         * reload1.c (maybe_fix_stack_asms): Likewise.
1231         (eliminate_regs_1): Likewise.
1232         (elimination_effects): Likewise.
1233         (mark_not_eliminable): Likewise.
1234         (scan_paradoxical_subregs): Likewise.
1235         (forget_old_reloads_1): Likewise.
1236         * reorg.c (find_end_label): Likewise.
1237         (try_merge_delay_insns): Likewise.
1238         (redundant_insn): Likewise.
1239         (own_thread_p): Likewise.
1240         (fill_simple_delay_slots): Likewise.
1241         (fill_slots_from_thread): Likewise.
1242         (dbr_schedule): Likewise.
1243         * resource.c (update_live_status): Likewise.
1244         (mark_referenced_resources): Likewise.
1245         (mark_set_resources): Likewise.
1246         * rtl.c (copy_rtx): Likewise.
1247         * rtlanal.c (reg_referenced_p): Likewise.
1248         (single_set_2): Likewise.
1249         (noop_move_p): Likewise.
1250         (note_stores): Likewise.
1251         * sched-deps.c (sched_analyze_reg): Likewise.
1252         (sched_analyze_insn): Likewise.
1254 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1256         * cse.c (invalidate_reg): New function extracted from...
1257         (invalidate): ...here.
1258         (canonicalize_insn): Check for clobber high.
1259         (invalidate_from_clobbers): invalidate clobber highs.
1260         (invalidate_from_sets_and_clobbers): Likewise.
1261         (count_reg_usage): Check for clobber high.
1262         (insn_live_p): Likewise.
1263         * cselib.c (cselib_expand_value_rtx_1):Likewise.
1264         (cselib_invalidate_regno): Check for clobber in setter.
1265         (cselib_invalidate_rtx): Pass through setter.
1266         (cselib_invalidate_rtx_note_stores):
1267         (cselib_process_insn): Check for clobber high.
1268         * cselib.h (cselib_invalidate_rtx): Add operand.
1270 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1272         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1273         (mark_not_eliminable): Likewise.
1274         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1275         * lra-lives.c (process_bb_lives): Check for clobber high.
1276         * lra.c (new_insn_reg): Remember clobber highs.
1277         (collect_non_operand_hard_regs): Check for clobber high.
1278         (lra_set_insn_recog_data): Likewise.
1279         (add_regs_to_insn_regno_info): Likewise.
1280         (lra_update_insn_regno_info): Likewise.
1282 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1284         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1285         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1287 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1289         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1290         (copy_insn_1): Likewise.
1291         (gen_hard_reg_clobber_high): New gen function.
1292         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1293         * genemit.c (gen_exp): Likewise.
1294         (gen_emit_seq): Pass through info.
1295         (gen_insn): Check for CLOBBER_HIGH.
1296         (gen_expand): Pass through info.
1297         (gen_split): Likewise.
1298         (output_add_clobbers): Likewise.
1299         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1300         (remove_clobbers): Likewise.
1301         * rtl.h (gen_hard_reg_clobber_high): New declaration.
1303 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1305         * doc/rtl.texi (clobber_high): Add.
1306         (parallel): Add in clobber high
1307         * rtl.c (rtl_check_failed_code3): Add function.
1308         * rtl.def (CLOBBER_HIGH): Add expression.
1309         * rtl.h (RTL_CHECKC3): Add macro.
1310         (rtl_check_failed_code3): Add declaration.
1311         (XC3EXP): Add macro.
1313 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1315         PR target/86386
1316         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1317         cfun->machine->max_used_stack_alignment if needed.
1319 2018-08-04  Martin Sebor  <msebor@redhat.com>
1321         PR tree-optimization/86571
1322         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1323         NaN output to 4.
1325 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1327         PR target/86799
1328         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1329         Define.
1331 2018-08-03  Jeff Law  <law@redhat.com>
1333         PR target/86795
1334         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1335         Define to speculation_safe_value_not_needed.
1337 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
1339         * doc/gcov.texi (-x): Remove duplicate "to".
1340         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1341         (-Wif-not-aligned): Remove duplicate "is".
1342         (-flto): Remove duplicate "the".
1343         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1344         duplicate "v5.00.b".
1345         (MSP430 Options): Remove duplicate "and" from the description
1346         of "-mgprel-sec=regexp".
1347         (x86 Options): Remove duplicate copies of "vmldLog102" and
1348         vmlsLog104 from description of "-mveclibabi=type".
1350 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
1352         * internal-fn.h (first_commutative_argument): Declare.
1353         * internal-fn.c (first_commutative_argument): New function.
1354         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1355         restrictions for pattern statements.  Use first_commutative_argument
1356         to look for commutative operands in calls to internal functions.
1358 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
1360         * Makefile.in (wide-int-range.o): New.
1361         * tree-vrp.c: Move all the wide_int_* functions to...
1362         * wide-int-range.cc: ...here.
1363         * tree-vrp.h: Move all the wide_int_* prototypes to...
1364         * wide-int-range.h: ...here.
1366 2018-08-03  Tom de Vries  <tdevries@suse.de>
1368         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1369         UI_NONE.
1370         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1371         * except.c (output_function_exception_table): Do early exit if
1372         targetm_common.except_unwind_info (&global_options) == UI_NONE.
1374 2018-08-03  Martin Liska  <mliska@suse.cz>
1376         * predict.c (dump_prediction): Change to 2 digits
1377         in fraction part.
1379 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1381         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1382         neon_dup_q to...
1383         (falkor_am_1_gtov_gtov): ... a new insn reservation.
1385 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1387         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1388         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1389         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1390         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1391         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1393 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1395         * diagnostic-show-locus.c (diagnostic_show_locus): Use
1396         pp_take_prefix when saving the existing prefix.
1397         * diagnostic.c (diagnostic_append_note): Likewise.
1398         * langhooks.c (lhd_print_error_function): Likewise.
1399         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1400         param's type.  Free the existing prefix.
1401         (pp_take_prefix): New function.
1402         (pretty_printer::pretty_printer): Drop the prefix parameter.
1403         Rename the length parameter to match the comment.
1404         (pretty_printer::~pretty_printer): Free the prefix.
1405         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1406         parameter.
1407         (struct pretty_printer): Drop the "const" from "prefix" field's
1408         type and clarify memory management.
1409         (pp_set_prefix): Drop the "const" from the 2nd param.
1410         (pp_take_prefix): New decl.
1412 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1414         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1415         for word_mode_ok here instead of passing as argument.
1416         (expand_block_compare): Change select_block_compare_mode() call.
1417         (expand_strncmp_gpr_sequence): New function.
1418         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1420 2018-08-02  Jeff Law  <law@redhat.com>
1422         PR target/86790
1423         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1424         Define to speculation_safe_value_not_needed.
1426         PR target/86784
1427         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1428         Define to speculation_safe_value_not_needed.
1430 2018-08-02  Tom de Vries  <tdevries@suse.de>
1432         PR target/86660
1433         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1434         function.  Return UI_TARGET unconditionally.
1435         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1436         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1438 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1440         * genemit.c (print_overload_test): Fix typo.
1442 2018-08-02  Richard Biener  <rguenther@suse.de>
1444         PR tree-optimization/86816
1445         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1446         which checks for value availability before querying it.
1447         (gvn_uses_equal): Use it.
1448         (same_succ_hash): Likewise.
1449         (gimple_equal_p): Likewise.
1451 2018-08-02  Nick Clifton  <nickc@redhat.com>
1453         PR target/86813
1454         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1455         Define to speculation_safe_value_not_needed.
1457         PR target/86810
1458         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1459         Define to speculation_safe_value_not_needed.
1461         PR target/86810
1462         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1463         Define to speculation_safe_value_not_needed.
1465         PR target/86803
1466         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1467         Define to speculation_safe_value_not_needed.
1469         PR target/86797
1470         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1471         Define to speculation_safe_value_not_needed.
1473         PR target/86791
1474         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1475         Define to speculation_safe_value_not_needed.
1477         PR target/86789
1478         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1479         Define to speculation_safe_value_not_needed.
1481         PR target/86787
1482         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1483         Define to speculation_safe_value_not_needed.
1485         PR target/86782
1486         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1487         speculation_safe_value_not_needed.
1489         PR target/86781
1490         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1491         to speculation_safe_value_not_needed.
1493 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1495         * doc/md.texi: Expand the documentation of instruction names
1496         to mention port-local uses.  Document '@' in pattern names.
1497         * read-md.h (overloaded_instance, overloaded_name): New structs.
1498         (mapping): Declare.
1499         (md_reader::handle_overloaded_name): New member function.
1500         (md_reader::get_overloads): Likewise.
1501         (md_reader::m_first_overload): New member variable.
1502         (md_reader::m_next_overload_ptr): Likewise.
1503         (md_reader::m_overloads_htab): Likewise.
1504         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1505         m_next_overload_ptr and m_overloads_htab.
1506         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1507         (get_mode_token, get_code_token, get_int_token): New functions.
1508         (map_attr_string): Add an optional argument that passes back
1509         the associated iterator.
1510         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1511         (md_reader::handle_overloaded_name, add_overload_instance): New
1512         functions.
1513         (apply_iterators): Handle '@' names.  Report an error if '@'
1514         is used without iterators.
1515         (initialize_iterators): Initialize the new iterator_group fields.
1516         * genopinit.c (handle_overloaded_code_for)
1517         (handle_overloaded_gen): New functions.
1518         (main): Use them to print declarations of maybe_code_for_* and
1519         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1520         * genemit.c (print_overload_arguments, print_overload_test)
1521         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1522         (main): Use it to print definitions of maybe_code_for_* and
1523         maybe_gen_* functions.
1524         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1525         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1526         instead of explicit mode checks.
1527         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1528         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1529         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1530         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1531         (aarch64_expand_compare_and_swap): Likewise
1532         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1533         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1534         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1535         (aarch64_constant_pool_reload_icode): Delete.
1536         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1537         instead of aarch64_constant_pool_reload_icode.  Use
1538         code_for_aarch64_reload_mov instead of explicit mode checks.
1539         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1540         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1541         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1542         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1543         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1544         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1545         (aarch64_atomic_load_op_code): Delete.
1546         (aarch64_emit_atomic_load_op): Likewise.
1547         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1548         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1549         instead of aarch64_emit_atomic_load_op.
1550         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1551         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1552         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1553         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1554         character before the pattern name.
1555         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1556         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1557         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1558         (aarch64_frecps<mode>): Likewise.
1559         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1560         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1561         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1562         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1563         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1565 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1567         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1568         Allow HFmode constants if TARGET_FP_F16INST.
1570 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1572         PR target/86014
1573         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1574         No longer check last store for clobber of address register.
1576 2018-08-02  Martin Liska  <mliska@suse.cz>
1578         PR gcov-profile/86817
1579         * gcov.c (process_all_functions): New function.
1580         (main): Call it.
1581         (process_file): Move functions processing to
1582         process_all_functions.
1584 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1586         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1587         "const" to the "gimple *" and "rtx_insn *" parameters.
1588         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1589         Likewise.
1590         (dump_location_t::dump_location_t): Likewise.
1592 2018-08-01  Martin Sebor  <msebor@redhat.com>
1594         PR tree-optimization/86650
1595         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1596         rather than a "gcall *".  Directly pass the data of interest
1597         to percent_K_format, rather than building a temporary CALL_EXPR
1598         to hold it.
1599         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1600         (gimple_fold_builtin_strncat): Adjust.
1601         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1602         gcall* argument with gimple*.
1603         * gimple-ssa-warn-restrict.c (check_call): Same.
1604         (wrestrict_dom_walker::before_dom_children): Same.
1605         (builtin_access::builtin_access): Same.
1606         (check_bounds_or_overlap): Same
1607         (maybe_diag_overlap): Same.
1608         (maybe_diag_offset_bounds): Same.
1609         * tree-diagnostic.c (default_tree_printer): Move usage of
1610         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1611         to this callsite.
1612         * tree-pretty-print.c (percent_K_format): Add argument.
1613         * tree-pretty-print.h: Add argument.
1614         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1615         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1616         (maybe_diag_stxncpy_trunc): Same.
1617         (handle_builtin_stxncpy): Same.
1618         (handle_builtin_strcat): Same.
1620 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1622         * match.pd: Optimise pointer range checks.
1624 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1626         PR tree-optimization/86758
1627         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1628         to remove pattern statements.
1630 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1632         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1633         result of dfs_enumerate_from when constructing stmt_vec_infos,
1634         instead of additionally calling get_loop_body.
1636 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1638         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1639         parameter.
1640         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1641         When creating an iv, assert that the step is not known to be zero.
1642         (vect_setup_realignment): Update call accordingly.
1643         * tree-vect-stmts.c (vectorizable_store): Likewise.
1644         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1646 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1648         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1649         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1650         (vectorizable_reduction): Likewise.
1651         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1652         (vect_detect_hybrid_slp_stmts): Likewise.
1653         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1655 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1657         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1658         (wide_int_set_zero_nonzero_bits): ...this.
1659         (zero_nonzero_bits_from_vr): Rename to...
1660         (vrp_set_zero_nonzero_bits): ...this.
1661         (extract_range_from_multiplicative_op_1): Abstract wide int
1662         code...
1663         (wide_int_range_multiplicative_op): ...here.
1664         (extract_range_from_binary_expr_1): Extract wide int binary
1665         operations into their own functions.
1666         (wide_int_range_lshift): New.
1667         (wide_int_range_can_optimize_bit_op): New.
1668         (wide_int_range_shift_undefined_p): New.
1669         (wide_int_range_bit_xor): New.
1670         (wide_int_range_bit_ior): New.
1671         (wide_int_range_bit_and): New.
1672         (wide_int_range_trunc_mod): New.
1673         (extract_range_into_wide_ints): New.
1674         (vrp_shift_undefined_p): New.
1675         (extract_range_from_multiplicative_op): New.
1676         (vrp_can_optimize_bit_op): New.
1677         * tree-vrp.h (value_range::dump): New.
1678         (wide_int_range_multiplicative_op): New.
1679         (wide_int_range_lshift):New.
1680         (wide_int_range_shift_undefined_p): New.
1681         (wide_int_range_bit_xor): New.
1682         (wide_int_range_bit_ior): New.
1683         (wide_int_range_bit_and): New.
1684         (wide_int_range_trunc_mod): New.
1685         (zero_nonzero_bits_from_bounds): Rename to...
1686         (wide_int_set_zero_nonzero_bits): ...this.
1687         (zero_nonzero_bits_from_vr): Rename to...
1688         (vrp_set_zero_nonzero_bits): ...this.
1689         (range_easy_mask_min_max): Rename to...
1690         (wide_int_range_can_optimize_bit_op): this.
1691         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1692         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1694 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1696         * tree-vectorizer.h (vect_orig_stmt): New function.
1697         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1698         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1699         (vect_create_epilog_for_reduction): Likewise.
1700         (vectorizable_live_operation): Likewise.
1701         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1702         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1703         * tree-vect-stmts.c (vectorizable_call): Likewise.
1704         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1706 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1708         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1709         argument.
1710         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1711         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1712         (vect_transform_loop): Likewise.
1713         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1715 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1717         * tree-vectorizer.h (vect_schedule_slp): Return void.
1718         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1719         (vect_schedule_slp): Likewise.
1721 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1723         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1724         argument.
1725         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1726         instances before the main loop, if any exist.
1728 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1730         PR tree-optimization/86749
1731         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1732         If the lhs is used in a COND_EXPR, check that it is being used
1733         as the "then" or "else" value.
1735 2018-08-01  Tom de Vries  <tdevries@suse.de>
1737         PR target/86800
1738         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1739         speculation_safe_value_not_needed.
1741 2018-08-01  Richard Biener  <rguenther@suse.de>
1743         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1744         as base and offset.
1746 2018-08-01  Martin Liska  <mliska@suse.cz>
1748         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1749         format how successful transformation is dumped.
1750         (gimple_mod_pow2_value_transform): Likewise.
1751         (gimple_mod_subtract_transform): Likewise.
1752         (gimple_stringops_transform): Likewise.
1754 2018-08-01  Martin Liska  <mliska@suse.cz>
1756         PR value-prof/35543
1757         * value-prof.c (interesting_stringop_to_profile_p):
1758         Simplify the code and add BUILT_IN_MEMMOVE.
1759         (gimple_stringops_transform): Likewise.
1761 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1763         * config/aarch64/aarch64-simd.md
1764         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1765         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1766         use GPI iterator instead of SI mode.
1768 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1770         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1771         rs6000_speculation_barrier.
1772         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1773         new barrier pattern name.
1775 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1777         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1778         (speculation_barrier): New insn.
1780 2018-08-01  Richard Biener  <rguenther@suse.de>
1782         PR bootstrap/86724
1783         * graphite.h: Include isl/id.h and isl/space.h to allow build
1784         with ISL 0.20.
1786 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1788         PR target/86651
1789         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1790         mode for COFF targets.
1791         * defaults.h (TARGET_COFF): Define.
1792         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1793         TARGET_COFF): Define.
1794         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1795         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1796         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1798 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1800         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1801         * gimple-streamer-out.c (output_bb): Save it.
1802         * lto-streamer-in.c (input_struct_function_base): Restore
1803         instance discriminator if available.  Create map on demand.
1804         * lto-streamer-out.c (output_struct_function_base): Save it if
1805         available.
1806         * final.c (decl_to_instance_map): Document LTO strategy.
1808 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1809             Olivier Hainque  <hainque@adacore.com>
1811         * debug.h (decl_to_instance_map_t): New type.
1812         (decl_to_instance_map): Declare.
1813         (maybe_create_decl_to_instance_map): New inline function.
1814         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1815         to track basic block discriminators.
1816         (final_start_function_1): Initialize them.
1817         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1818         bb_discriminator.
1819         (decl_to_instance_map): New variable.
1820         (map_decl_to_instance, maybe_set_discriminator): New functions.
1821         (notice_source_line): Set discriminator.
1823 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1825         * targhooks.c (default_have_speculation_safe_value): Add
1826         ATTRIBUTE_UNUSED.
1828 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1830         * dump-context.h: Include "pretty-print.h".
1831         (dump_context::refresh_dumps_are_enabled): New decl.
1832         (dump_context::emit_item): New decl.
1833         (class dump_context): Add fields "m_test_pp" and
1834         "m_test_pp_flags".
1835         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1836         (temp_dump_context::get_dumped_text): New decl.
1837         (class temp_dump_context): Add field "m_pp".
1838         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1839         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1840         m_test_pp.
1841         (set_dump_file): Update for above change.
1842         (set_alt_dump_file): Likewise.
1843         (dump_loc): New overload, taking a pretty_printer *.
1844         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1845         to any test pretty-printer.
1846         (make_item_for_dump_gimple_stmt): New function, adapted from
1847         optinfo::add_gimple_stmt.
1848         (dump_context::dump_gimple_stmt): Call it, and use the result,
1849         eliminating the direct usage of dump_file and alt_dump_file in
1850         favor of indirectly using them via emit_item.
1851         (make_item_for_dump_gimple_expr): New function, adapted from
1852         optinfo::add_gimple_expr.
1853         (dump_context::dump_gimple_expr): Call it, and use the result,
1854         eliminating the direct usage of dump_file and alt_dump_file in
1855         favor of indirectly using them via emit_item.
1856         (make_item_for_dump_generic_expr): New function, adapted from
1857         optinfo::add_tree.
1858         (dump_context::dump_generic_expr): Call it, and use the result,
1859         eliminating the direct usage of dump_file and alt_dump_file in
1860         favor of indirectly using them via emit_item.
1861         (make_item_for_dump_printf_va): New function, adapted from
1862         optinfo::add_printf_va.
1863         (make_item_for_dump_printf): New function.
1864         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1865         and use the result, eliminating the direct usage of dump_file and
1866         alt_dump_file in favor of indirectly using them via emit_item.
1867         (make_item_for_dump_dec): New function.
1868         (dump_context::dump_dec): Call it, and use the result,
1869         eliminating the direct usage of dump_file and alt_dump_file in
1870         favor of indirectly using them via emit_item.
1871         (make_item_for_dump_symtab_node): New function, adapted from
1872         optinfo::add_symtab_node.
1873         (dump_context::dump_symtab_node): Call it, and use the result,
1874         eliminating the direct usage of dump_file and alt_dump_file in
1875         favor of indirectly using them via emit_item.
1876         (dump_context::begin_scope): Reimplement, avoiding direct usage
1877         of dump_file and alt_dump_file in favor of indirectly using them
1878         via emit_item.
1879         (dump_context::emit_item): New member function.
1880         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1881         Set up test pretty-printer on the underlying context.  Call
1882         refresh_dumps_are_enabled.
1883         (temp_dump_context::~temp_dump_context): Call
1884         refresh_dumps_are_enabled.
1885         (temp_dump_context::get_dumped_text): New member function.
1886         (selftest::verify_dumped_text): New function.
1887         (ASSERT_DUMPED_TEXT_EQ): New macro.
1888         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1889         and then without optinfo enabled.  Add uses of
1890         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1891         * dumpfile.h: Update comment for the dump_* API.
1892         * optinfo-emit-json.cc
1893         (selftest::test_building_json_from_dump_calls): Update for new
1894         param for temp_dump_context ctor.
1895         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1896         and "m_owned" field.
1897         (optinfo_item::~optinfo_item): Likewise.
1898         (optinfo::add_item): New member function.
1899         (optinfo::emit): Update comment.
1900         (optinfo::add_string): Delete.
1901         (optinfo::add_printf): Delete.
1902         (optinfo::add_printf_va): Delete.
1903         (optinfo::add_gimple_stmt): Delete.
1904         (optinfo::add_gimple_expr): Delete.
1905         (optinfo::add_tree): Delete.
1906         (optinfo::add_symtab_node): Delete.
1907         (optinfo::add_dec): Delete.
1908         * optinfo.h (class dump_context): New forward decl.
1909         (optinfo::add_item): New decl.
1910         (optinfo::add_string): Delete.
1911         (optinfo::add_printf): Delete.
1912         (optinfo::add_printf_va): Delete.
1913         (optinfo::add_gimple_stmt): Delete.
1914         (optinfo::add_gimple_expr): Delete.
1915         (optinfo::add_tree): Delete.
1916         (optinfo::add_symtab_node): Delete.
1917         (optinfo::add_dec): Delete.
1918         (optinfo::add_poly_int): Delete.
1919         (optinfo_item::optinfo_item): Remove "owned" param.
1920         (class optinfo_item): Remove field "m_owned".
1922 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1924         PR middle-end/86705
1925         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1926         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1927         requested variable alignment.
1928         (expand_one_ssa_partition): Likewise.
1929         (expand_one_var): Likewise.
1931 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1933         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1934         to speculation_safe_value_not_needed.
1936 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1938         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1939         * targhooks.c (speculation_safe_value_not_needed): New function.
1940         * target.def (have_speculation_safe_value): Update documentation.
1941         * doc/tm.texi: Regenerated.
1943 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1945         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1946         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1947         expand.
1948         (despeculate_copy<ALLI:mode>_insn): New insn.
1949         (despeculate_copyti_insn): New insn.
1950         (despeculate_simple<ALLI:mode>): New insn
1951         (despeculate_simpleti): New insn.
1952         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1953         function.
1954         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1955         aarch64_speculation_safe_value.
1956         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1958 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1960         * config/aarch64/aarch64-speculation.cc: New file.
1961         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1962         before pass_reorder_blocks.
1963         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1964         prototype.
1965         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1966         X14 and X15 when tracking speculation.
1967         * config/aarch64/aarch64.md (register name constants): Add
1968         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1969         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1970         (speculation_barrier): New insn attribute.
1971         (cmp<mode>): Allow SP in comparisons.
1972         (speculation_tracker): New insn.
1973         (speculation_barrier): Add speculation_barrier attribute.
1974         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1975         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1976         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1978 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1980         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1981         aarch64_track_speculation is true.
1982         (tb<optab><mode>1): Likewise.
1983         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1984         generate CB[N]Z when tracking speculation.
1985         (aarch64_split_compare_and_swap): Likewise.
1986         (aarch64_split_atomic_op): Likewise.
1988 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1990         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1992 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1994         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1995         (speculation_barrier): New insn.
1997 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1999         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2000         * config/arm/arm.md (speculation_barrier): New expand.
2001         (speculation_barrier_insn): New pattern.
2003 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
2005         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2006         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2007         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2008         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2009         list.
2010         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2011         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2012         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2013         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2014         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2015         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2016         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2017         * builtins.c (expand_speculation_safe_value): New function.
2018         (expand_builtin): Call it.
2019         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2020         * doc/extend.texi: Document __builtin_speculation_safe_value.
2021         * doc/md.texi: Document "speculation_barrier" pattern.
2022         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2023         TARGET_HAVE_SPECULATION_SAFE_VALUE.
2024         * doc/tm.texi: Regenerated.
2025         * target.def (have_speculation_safe_value, speculation_safe_value): New
2026         hooks.
2027         * targhooks.c (default_have_speculation_safe_value): New function.
2028         (default_speculation_safe_value): New function.
2029         * targhooks.h (default_have_speculation_safe_value): Add prototype.
2030         (default_speculation_safe_value): Add prototype.
2032 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
2034         * dump-context.h (dump_context::dump_loc): New decl.
2035         * dumpfile.c (dump_context::dump_loc): New member function.
2036         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2037         and dump_gimple_stmt.
2038         (dump_context::dump_gimple_expr_loc): Likewise, using
2039         dump_gimple_expr.
2040         (dump_context::dump_generic_expr_loc): Likewise, using
2041         dump_generic_expr.
2042         (dump_context::dump_printf_loc_va): Likewise, using
2043         dump_printf_va.
2044         (dump_context::begin_scope): Explicitly using the global function
2045         "dump_loc", rather than the member function.
2047 2018-07-31  Martin Sebor  <msebor@redhat.com>
2049         PR tree-optimization/86741
2050         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2052 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
2054         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2055         depend on whether prefetch instructions will be emitted or not.
2056         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2057         will be emitted or not.
2058         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2059         (TARGET_SETMEM_PFD): New macros.
2061 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2063         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2064         (NULL_STMT_VEC_INFO): Delete.
2065         (stmt_vec_info::operator*): Likewise.
2066         (stmt_vec_info::operator gimple *): Likewise.
2067         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2068         of NULL_STMT_VEC_INFO.
2069         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2070         (vect_reassociating_reduction_p): Likewise.
2071         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2072         (vectorizable_store): Likewise.
2073         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2074         (vec_info::free_stmt_vec_infos): Likewise.
2076 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2078         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2079         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2081 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2083         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2084         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2085         (vec_info::free_stmt_vec_info): New private member functions.
2086         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2087         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2088         * tree-parloops.c (gather_scalar_reductions): Remove calls to
2089         set_stmt_vec_info_vec and free_stmt_vec_infos.
2090         * tree-vect-loop.c (_loop_vec_info): Remove call to
2091         set_stmt_vec_info_vec.
2092         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2093         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2094         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2095         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2096         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
2097         assignments in {vec_info::,}new_stmt_vec_info that are redundant
2098         with the clearing in the xcalloc.
2099         (stmt_vec_info_vec): Delete.
2100         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2101         (vectorize_loops): Likewise.
2102         (vec_info::~vec_info): Remove argument from call to
2103         free_stmt_vec_infos.
2104         (vec_info::add_stmt): Remove vinfo argument from call to
2105         new_stmt_vec_info.
2107 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2109         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2110         rather than a gimple stmt.
2111         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
2112         information for pattern statements when passed the original
2113         statement; instead wait to be passed the pattern statement itself.
2114         Don't call set_vinfo_for_stmt here.
2115         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2116         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2117         stmt_vec_infos here.
2118         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2119         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2120         stmt_vec_infos entry.
2122 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2124         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2125         * tree-vectorizer.c (vec_info::replace_stmt): New function.
2126         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2127         * tree-vect-stmts.c (vectorizable_call): Likewise.
2128         (vectorizable_simd_clone_call): Likewise.
2130 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2132         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2133         * tree-vectorizer.c (vec_info::remove_stmt): New function.
2134         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2135         * tree-vect-loop.c (vect_transform_loop): Likewise.
2136         * tree-vect-slp.c (vect_schedule_slp): Likewise.
2137         * tree-vect-stmts.c (vect_remove_stores): Likewise.
2139 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2141         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2142         (vect_dr_stmt): Delete.
2143         * tree-vectorizer.c (vec_info::lookup_dr): New function.
2144         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2145         of DR_VECT_AUX.
2146         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2147         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2148         (vect_verify_datarefs_alignment, vect_peeling_supportable)
2149         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2150         (vect_analyze_data_refs): Likewise.
2151         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
2152         argument.
2153         (vect_find_same_alignment_drs): Likewise.
2154         (vect_slp_analyze_node_dependences): Update calls accordingly.
2155         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2156         instead of DR_VECT_AUX.
2157         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2158         of a vector data references.  Use vec_info::lookup_dr instead of
2159         DR_VECT_AUX.
2160         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2161         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2162         instead of DR_VECT_AUX.
2164 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2166         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2167         dr_vec_info.
2168         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2169         accordingly.
2170         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2171         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2172         (vect_gen_prolog_loop_niters): Likewise.
2174 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2176         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2177         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2178         (vect_known_alignment_in_bytes, vect_dr_behavior)
2179         (vect_get_scalar_dr_size): Take references as dr_vec_infos
2180         instead of data_references.  Update calls to other routines for
2181         which the same change has been made.
2182         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2183         dr_vec_infos instead of stmt_vec_infos.
2184         (vect_analyze_data_ref_dependence): Update call accordingly.
2185         (vect_slp_analyze_data_ref_dependence)
2186         (vect_record_base_alignments): Use DR_VECT_AUX.
2187         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2188         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2189         (vector_alignment_reachable_p, vect_get_data_access_cost)
2190         (vect_peeling_supportable, vect_analyze_group_access_1)
2191         (vect_analyze_group_access, vect_analyze_data_ref_access)
2192         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2193         (vect_compile_time_alias, vect_small_gap_p)
2194         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2195         (vect_supportable_dr_alignment): Take references as dr_vec_infos
2196         instead of data_references.  Update calls to other routines for
2197         which the same change has been made.
2198         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2199         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2200         (vect_slp_analyze_and_verify_node_alignment)
2201         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2202         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2203         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
2204         above changes.
2205         (_vect_peel_info::dr): Replace with...
2206         (_vect_peel_info::dr_info): ...this new field.
2207         (vect_peeling_hash_get_most_frequent)
2208         (vect_peeling_hash_choose_best_peeling): Update accordingly.
2209         (vect_peeling_hash_get_lowest_cost):
2210         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
2211         routines for which the same change has been made.
2212         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
2213         data_reference.
2214         * tree-vect-loop-manip.c (get_misalign_in_elems)
2215         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
2216         above changes.
2217         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2218         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2219         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2220         (get_group_load_store_type, get_negative_load_store_type)
2221         (vect_get_data_ptr_increment, vectorizable_store)
2222         (vectorizable_load): Likewise.
2223         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2224         Update calls to other routines for which the same change has been made.
2226 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2228         * tree-vectorizer.h (vec_info::move_dr): New member function.
2229         (dataref_aux): Rename to...
2230         (dr_vec_info): ...this and add "dr" and "stmt" fields.
2231         (_stmt_vec_info::dr_aux): Update accordingly.
2232         (_stmt_vec_info::data_ref_info): Delete.
2233         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2234         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2235         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2236         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2237         of data_ref.
2238         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
2239         (STMT_VINFO_DR_INFO): New macro.
2240         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2241         (set_dr_misalignment): Update after rename of dataref_aux.
2242         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
2243         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2244         initialization of STMT_VINFO_DATA_REF.
2245         * tree-vectorizer.c (vec_info::move_dr): New function.
2246         * tree-vect-patterns.c (vect_recog_bool_pattern)
2247         (vect_recog_mask_conversion_pattern)
2248         (vect_recog_gather_scatter_pattern): Use it.
2249         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2250         the "dr" and "stmt" fields of dr_vec_info instead of
2251         STMT_VINFO_DATA_REF.
2253 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2255         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2256         (is_pattern_stmt_p): Use it.
2257         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2258         on pattern statements.
2260 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2262         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2263         original stmt as a stmt_vec_info rather than a gimple stmt.
2264         (vect_pattern_recog_1): Take the statement directly as a
2265         stmt_vec_info, rather than via a gimple_stmt_iterator.
2266         Update call to vect_mark_pattern_stmts.
2267         (vect_pattern_recog): Update calls accordingly.
2269 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2271         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2272         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2273         a vect_def_type for the first argument.
2274         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2275         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
2276         operand if it isn't defined by a vectorized statement.
2277         (vect_build_gather_load_calls): Remove the mask_dt argument and
2278         update calls to vect_get_vec_def_for_stmt_copy.
2279         (vectorizable_bswap): Likewise the dt argument.
2280         (vectorizable_call): Update calls to vectorizable_bswap and
2281         vect_get_vec_def_for_stmt_copy.
2282         (vectorizable_simd_clone_call, vectorizable_assignment)
2283         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2284         (vectorizable_comparison): Update calls to
2285         vect_get_vec_def_for_stmt_copy.
2286         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
2287         vect_is_simple_use.
2288         (vect_get_loop_based_defs): Remove dt argument and update call
2289         to vect_get_vec_def_for_stmt_copy.
2290         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2291         and vect_get_vec_def_for_stmt_copy.
2292         (vectorizable_load): Update calls to vect_build_gather_load_calls
2293         and vect_get_vec_def_for_stmt_copy.
2294         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2295         (vectorizable_reduction, vectorizable_live_operation): Update calls
2296         to vect_get_vec_def_for_stmt_copy.
2298 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2300         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2301         and gimple stmt arguments with a stmt_vec_info.
2302         (vect_record_base_alignments): Update calls accordingly.
2303         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2304         and gimple stmt arguments with a stmt_vec_info.
2305         (vect_build_slp_tree_1): Remove vinfo argument and update call
2306         to vect_record_max_nunits.
2307         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2308         and vect_record_max_nunits.
2310 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2312         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2313         file and take a stmt_vec_info instead of a gimple stmt.
2314         (supportable_widening_operation, vect_finish_replace_stmt)
2315         (vect_finish_stmt_generation, vect_get_store_rhs)
2316         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2317         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2318         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2319         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2320         (vect_create_data_ref_ptr, bump_vector_ptr)
2321         (vect_permute_store_chain, vect_setup_realignment)
2322         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2323         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2324         (vectorizable_reduction, vectorizable_induction)
2325         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2326         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2327         than gimple stmts as arguments.
2328         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2329         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2330         (can_group_stmts_p, vect_check_gather_scatter)
2331         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2332         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2333         (vect_permute_load_chain, vect_shift_permute_load_chain)
2334         (vect_transform_grouped_load)
2335         (vect_record_grouped_load_vectors): Likewise.
2336         * tree-vect-loop.c (vect_fixup_reduc_chain)
2337         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2338         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2339         (vectorizable_reduction, vectorizable_induction)
2340         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2341         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2342         (vect_get_load_store_mask): Likewise.
2343         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2344         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2345         * tree-vect-stmts.c (vect_mark_relevant)
2346         (is_simple_and_all_uses_invariant)
2347         (exist_non_indexing_operands_for_use_p, process_use)
2348         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2349         (vect_get_vec_def_for_operand, vect_get_vec_defs)
2350         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2351         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2352         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2353         (get_negative_load_store_type, get_load_store_type)
2354         (vect_check_load_store_mask, vect_check_store_rhs)
2355         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2356         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2357         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2358         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2359         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2360         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2361         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2362         (supportable_widening_operation): Likewise.
2364 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2366         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2367         a stmt_vec_info instead of a gcall.
2368         (vect_check_gather_scatter): Update call accordingly.
2369         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2370         of a gphi.
2371         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2372         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2373         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2374         instead of a gimple stmt.
2375         (vect_transform_loop): Update calls accordingly.
2376         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2377         stmt_vec_infos instead of gimple stmts.
2378         (vect_analyze_slp_instance): Update use accordingly.
2379         * tree-vect-stmts.c (read_vector_array, write_vector_array)
2380         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2381         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2382         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2383         (vect_gen_widened_results_half, vect_get_loop_based_defs)
2384         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2385         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2386         down to subroutines.
2388 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2390         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2391         of the worklist from a vector of gimple stmts to a vector of
2392         stmt_vec_infos.
2393         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2394         (vect_mark_stmts_to_be_vectorized): Likewise
2396 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2398         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2399         statement before passing it to vect_analyze_stmt.
2400         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2401         the chain of phi vector definitions.  Track the exit phi via its
2402         stmt_vec_info.
2403         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2404         STMT_VINFO_REDUC_DEF.
2405         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2406         stmt_vec_infos to handle the statement chains.
2407         (vect_get_slp_defs): Record the first statement in the node
2408         using a stmt_vec_info.
2409         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2410         statements here and pass their stmt_vec_info down to subroutines.
2411         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2412         down to vect_finish_stmt_generation.
2413         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2414         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2415         stmt_vec_infos to subroutines.
2416         (vect_remove_stores): Use stmt_vec_infos to handle the statement
2417         chains.
2419 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2421         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2422         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2423         (vect_permute_store_chain, vect_setup_realignment)
2424         (vect_permute_load_chain, vect_shift_permute_load_chain)
2425         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2426         stmts internally, and when passing values to other vectorizer routines.
2427         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2428         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2429         (vect_analyze_loop_operations, get_initial_def_for_reduction)
2430         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2431         (vectorizable_reduction, vectorizable_induction)
2432         (vectorizable_live_operation, vect_transform_loop_stmt)
2433         (vect_transform_loop): Likewise.
2434         * tree-vect-patterns.c (vect_reassociating_reduction_p)
2435         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2436         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2437         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2438         (vect_slp_analyze_node_operations_1): Likewise.
2439         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2440         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2441         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2442         (vect_finish_stmt_generation_1, get_group_load_store_type)
2443         (get_load_store_type, vect_build_gather_load_calls)
2444         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2445         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2446         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2447         (vectorizable_store, vectorizable_load, vectorizable_condition)
2448         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2449         (supportable_widening_operation): Likewise.
2450         (vect_get_vector_types_for_stmt): Likewise.
2451         * tree-vectorizer.h (vect_dr_behavior): Likewise.
2453 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2455         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2456         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2457         (vect_permute_store_chain, vect_permute_load_chain)
2458         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2459         repeated stmt_vec_info lookups.
2460         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2461         (vect_update_ivs_after_vectorizer): Likewise.
2462         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2463         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2464         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2465         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2466         (vect_bb_slp_scalar_cost): Likewise.
2467         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2469 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2471         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2472         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2473         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2474         to get gassigns and gcalls, rather than operating on generc gimple
2475         stmts.
2476         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2477         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2478         (vectorizable_load, vect_analyze_stmt): Likewise.
2479         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2481 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2483         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2484         return stmt_vec_infos rather than gimple stmts.  Do not accept
2485         null arguments.
2486         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2487         of a gimple stmt.
2488         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2489         Update use of get_later_stmt.
2490         (vect_get_constant_vectors): Update call accordingly.
2491         (vect_schedule_slp_instance): Likewise
2492         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2493         (vect_slp_analyze_instance_dependence): Likewise.
2494         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2496 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2498         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2499         (stmt_info_for_cost::stmt_info): ...this new field.
2500         (add_stmt_costs): Update accordingly.
2501         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2502         (vect_get_known_peeling_cost): Likewise.
2503         (vect_estimate_min_profitable_iters): Likewise.
2504         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2506 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2508         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2509         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2510         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2511         accordingly.
2512         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2514 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2516         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2517         a gimple stmt to a stmt_vec_info.
2518         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2520 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2522         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2523         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2524         (_loop_vec_info::reduction_chains): Likewise.
2525         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2526         accordingly.
2527         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2529 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2531         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2532         a gimple stmt to a stmt_vec_info.
2533         (_stmt_vec_info::next_element): Likewise.
2534         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2535         (vect_slp_analyze_and_verify_node_alignment)
2536         (vect_analyze_group_access_1, vect_analyze_group_access)
2537         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2538         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2539         (vect_supportable_dr_alignment): Update accordingly.
2540         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2541         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2542         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2543         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2544         * tree-vect-slp.c (vect_build_slp_tree_1)
2545         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2546         (vect_split_slp_store_group, vect_analyze_slp_instance)
2547         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2548         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2549         (get_group_load_store_type, get_load_store_type)
2550         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2551         (vect_transform_stmt, vect_remove_stores): Likewise.
2553 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2555         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2556         than a gimple stmt.
2557         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2558         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2559         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2560         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2561         (vector_alignment_reachable_p, vect_get_data_access_cost)
2562         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2563         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2564         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2565         (vect_analyze_group_access_1, vect_analyze_group_access)
2566         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2567         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2568         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2569         result of vect_dr_stmt and use the stmt_vec_info instead of
2570         the associated gimple stmt.
2571         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2572         (vect_gen_prolog_loop_niters): Likewise.
2573         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2575 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2577         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2578         to a vec<stmt_vec_info>.
2579         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2580         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2581         vec<stmt_vec_info>.
2582         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2583         to a vec<stmt_vec_info>.
2584         (bst_traits::value_type, bst_traits::value_type): Likewise.
2585         (bst_traits::hash): Update accordingly.
2586         (vect_get_and_check_slp_defs): Change the stmts parameter from
2587         a vec<gimple *> to a vec<stmt_vec_info>.
2588         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2589         (vect_build_slp_tree): Likewise.
2590         (vect_build_slp_tree_2): Likewise.  Update uses of
2591         SLP_TREE_SCALAR_STMTS.
2592         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2593         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2594         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2595         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2596         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2597         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2598         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2599         (vect_get_constant_vectors, vect_get_slp_defs)
2600         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2601         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2602         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2603         instead of gimple stmts.
2604         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2605         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2606         (vect_slp_analyze_instance_dependence): Update uses of
2607         SLP_TREE_SCALAR_STMTS.
2608         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2609         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2610         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2611         (get_initial_defs_for_reduction): Likewise.
2612         (vect_create_epilog_for_reduction): Likewise.
2613         (vectorize_fold_left_reduction): Likewise.
2614         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2615         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2616         (can_vectorize_live_stmts): Likewise.
2618 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2620         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2621         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2622         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2623         than gimple stmts.
2624         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2625         of a gimple stmt.
2626         (gather_scalar_reductions): Update after above interface changes.
2627         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2628         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2629         than gimple stmts.
2630         (vect_force_simple_reduction): Likewise.
2631         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2632         LOOP_VINFO_REDUCTIONS.
2633         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2635 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2637         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2638         a gimple stmt to a stmt_vec_info.
2639         * tree-vect-loop.c (vect_active_double_reduction_p)
2640         (vect_force_simple_reduction, vectorizable_reduction): Update
2641         accordingly.
2643 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2645         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2646         vec<gimple *> to a vec<stmt_vec_info>.
2647         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2648         the reduction_phis argument from a vec<gimple *> to a
2649         vec<stmt_vec_info>.
2650         (vectorizable_reduction): Likewise the phis local variable that
2651         is passed to vect_create_epilog_for_reduction.  Update for new type
2652         of SLP_TREE_VEC_STMTS.
2653         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2654         (vectorizable_live_operation): Likewise.
2655         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2656         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2658 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2660         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2661         a gimple stmt to a stmt_vec_info.
2662         (vectorizable_condition, vectorizable_live_operation)
2663         (vectorizable_reduction, vectorizable_induction): Pass back the
2664         vectorized statement as a stmt_vec_info.
2665         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2666         use of STMT_VINFO_VEC_STMT.
2667         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2668         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2669         as stmt_vec_infos rather than gimple stmts.
2670         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2671         to a stmt_vec_info.
2672         (vectorizable_live_operation): Likewise.
2673         (vectorizable_reduction, vectorizable_induction): Likewise,
2674         updating use of STMT_VINFO_VEC_STMT.
2675         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2676         of STMT_VINFO_VEC_STMT.
2677         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2678         (vectorizable_simd_clone_call, vectorizable_conversion)
2679         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2680         (vectorizable_store, vectorizable_load, vectorizable_condition)
2681         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2682         from a gimple stmt to a stmt_vec_info.
2683         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2684         pointer to a stmt_vec_info to the vectorizable_* routines.
2686 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2688         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2689         a gimple stmt to a stmt_vec_info.
2690         (is_pattern_stmt_p): Update accordingly.
2691         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2692         (vect_record_grouped_load_vectors): Likewise.
2693         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2694         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2695         (vect_model_reduction_cost): Likewise.
2696         (vect_create_epilog_for_reduction): Likewise.
2697         (vectorizable_reduction, vectorizable_induction): Likewise.
2698         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2699         Return the stmt_vec_info for the pattern statement.
2700         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2701         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2702         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2703         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2704         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2705         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2706         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2707         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2709 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2711         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2712         (vect_finish_stmt_generation): Likewise.
2713         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2714         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2715         (vect_build_gather_load_calls): Use the return value of the above
2716         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2717         scopes for the input gimple stmt and wider scopes for the associated
2718         stmt_vec_info.  Use vec_info::lookup_def when setting these
2719         stmt_vec_infos from an SSA_NAME definition.
2720         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2721         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2722         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2723         (vectorizable_store, vectorizable_load, vectorizable_condition)
2724         (vectorizable_comparison): Likewise.
2725         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2726         (vectorizable_reduction): Likewise.
2728 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2730         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2731         stmt_vec_info * parameter before the optional gimple **.
2732         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2733         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2734         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2735         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2736         (vectorizable_live_operation): Likewise.
2737         * tree-vect-patterns.c (type_conversion_p): Likewise.
2738         (vect_look_through_possible_promotion): Likewise.
2739         (vect_recog_rotate_pattern): Likewise.
2740         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2742 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2744         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2745         a typedef to a wrapper class.
2746         (NULL_STMT_VEC_INFO): New macro.
2747         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2748         (stmt_vec_info::operator*): New function.
2749         (stmt_vec_info::operator gimple *): Likewise.
2750         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2751         (add_stmt_costs): Likewise.
2752         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2753         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2754         (vect_get_known_peeling_cost): Likewise.
2755         (vect_estimate_min_profitable_iters): Likewise.
2756         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2757         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2758         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2759         (vectorizable_store, free_stmt_vec_infos): Likewise.
2760         (new_stmt_vec_info): Change return type of xcalloc to
2761         _stmt_vec_info *.
2763 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2765         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2766         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2767         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2768         a single_imm_use-based sequence.
2769         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2771 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2773         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2774         * tree-vectorizer.c (vec_info::lookup_def): New function.
2775         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2776         (vect_widened_op_tree): Likewise.
2777         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2778         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2779         (vectorizable_reduction): Likewise.
2780         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2781         of a gimple *.
2782         (vect_is_slp_reduction): Update calls accordingly.  Use
2783         vec_info::lookup_def.
2784         (vect_is_simple_reduction): Likewise
2785         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2787 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2789         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2790         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2791         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2792         of vinfo_for_stmt.
2793         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2794         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2795         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2796         (vect_is_slp_reduction, vectorizable_induction)
2797         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2798         * tree-vect-patterns.c (vect_init_pattern_stmt):
2799         (vect_determine_min_output_precision_1, vect_determine_precisions)
2800         (vect_pattern_recog): Likewise.
2801         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2802         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2803         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2804         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2805         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2806         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2807         info field from a loop to a loop_vec_info.
2809 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2811         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2812         (vec_info::add_stmt): Declare.
2813         * tree-vectorizer.c (vec_info::add_stmt): New function.
2814         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2815         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2816         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2817         (vectorizable_induction): Likewise.
2818         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2819         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2820         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2821         (vectorizable_load): Likewise.
2822         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2823         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2824         (vect_recog_gather_scatter_pattern): Likewise.
2825         (append_pattern_def_seq): Likewise.  Remove a check that is
2826         performed by add_stmt itself.
2828 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2830         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2831         which make_ssa_name was called with new_stmt before new_stmt
2832         had been created.
2834 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2836         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2837         split out from...
2838         (vect_is_slp_reduction): ...here...
2839         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2840         that are already known to be false.
2842 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2844         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2845         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2846         STMT_VINFO_NUM_SLP_USES when it's true.
2847         (vect_free_slp_instance): Add a final_p parameter and pass it to
2848         vect_free_slp_tree.
2849         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2850         (vect_analyze_slp_instance): Likewise.
2851         (vect_slp_analyze_operations): Likewise.
2852         (vect_slp_analyze_bb_1): Likewise.
2853         * tree-vectorizer.c (vec_info): Likewise.
2854         * tree-vect-loop.c (vect_transform_loop): Likewise.
2856 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2858         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2859         function is not called for second and subsequent members of
2860         a reduction group.
2862 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2864         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2865         cases for nested loops from here to ...
2866         (vect_create_epilog_for_reduction): ...here.  Only call
2867         vect_is_simple_use for inner-loop reductions.
2869 2018-07-31  Martin Liska  <mliska@suse.cz>
2871         PR gcov-profile/85338
2872         PR gcov-profile/85350
2873         PR gcov-profile/85372
2874         * profile.c (struct location_triplet): New.
2875         (struct location_triplet_hash): Likewise.
2876         (output_location): Do not output a BB that
2877         is already recorded for a line.
2878         (branch_prob): Use streamed_locations.
2880 2018-07-31  Martin Liska  <mliska@suse.cz>
2882         PR gcov-profile/85370
2883         * coverage.c (coverage_begin_function): Do not mark target
2884         clones as artificial functions.
2886 2018-07-31  Martin Liska  <mliska@suse.cz>
2888         PR gcov-profile/83813
2889         PR gcov-profile/84758
2890         PR gcov-profile/85217
2891         PR gcov-profile/85332
2892         * profile.c (branch_prob): Do not record GOTO expressions
2893         for GIMPLE statements which locations are already streamed.
2895 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2897         * gcc.c (handle_spec_function): Accept a soft_matched_part
2898         argument, as do_spec_1.  Pass it down to ...
2899         (eval_spec_function): Accept a soft_matched_part argument,
2900         and pass it down to ...
2901         (do_spec_2): Accept a soft_matched_part argument, and pass
2902         it down to do_spec_1.
2903         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2904         (handle_braces): Update call to handle_spec_function.
2905         (driver::set_up_specs): Update calls to do_spec_2.
2906         (compare_debug_dump_opt_spec_function): Likewise.
2907         (compare_debug_self_opt_spec_function): Likewise.
2909 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2911         * common.opt (nolibc): New option.
2912         * doc/invoke.texi (Link Options): Document it.
2913         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2914         * config/alpha/linux.h: Likewise.
2915         * config/arc/elf.h: Likewise.
2916         * config/arm/uclinux-elf.h: Likewise.
2917         * config/arm/unknown-elf.h: Likewise.
2918         * config/avr/avrlibc.h: Likewise.
2919         * config/bfin/bfin.h: Likewise.
2920         * config/bfin/linux.h: Likewise.
2921         * config/bfin/uclinux.h: Likewise.
2922         * config/darwin.h: Likewise.
2923         * config/darwin10.h: Likewise.
2924         * config/darwin12.h: Likewise.
2925         * config/gnu-user.h: Likewise.
2926         * config/lm32/uclinux-elf.h: Likewise.
2927         * config/pa/pa-hpux11.h: Likewise.
2928         * config/pa/pa64-hpux.h: Likewise.
2929         * config/sparc/sparc.h: Likewise.
2931 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2933         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2934         undefined variables.
2936 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2938         PR target/86640
2939         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2940         instead of GEN_INT.
2942 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2944         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2945         terminated string literal.
2947 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2949         PR rtl-optimization/85160
2950         * combine.c (is_just_move): New function.
2951         (try_combine): Allow combining two instructions into two if neither of
2952         the original instructions was a move.
2954 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2956         PR target/86673
2957         * doc/extend.texi (Global Register Variables): Discourage use of type
2958         qualifiers.
2959         (Local Register Variables): Likewise.
2961 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2963         PR tree-optimization/86506
2964         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2966 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2968         PR target/86547
2969         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2970         hard_regno, make sure no insn between `from` and `to` clobbers it.
2972 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2973             Tom de Vries  <tdevries@suse.de>
2975         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2976         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2977         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2978         PTX_DEFAULT_RUNTIME_DIM.
2979         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2981 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2983         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2984         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2985         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2987 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2989         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2990         used.
2991         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2992         predicate to reflect toc fusion has been deleted.
2993         (toc_fusion_mem_raw): Delete, no longer used.
2994         (toc_fusion_mem_wrapped): Likewise.
2995         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2996         fusion mask bit.
2997         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2998         Delete, no longer used.
2999         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3000         meant to be used for toc fusion.
3001         (rs6000_debug_print_mode): Delete toc fusion debugging.
3002         (rs6000_debug_reg_global): Likewise.
3003         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3004         fusion and secondary reload support that were never used.
3005         (rs6000_option_override_internal): Delete TOC fusion, that was only
3006         partially defined, and it did not work unless you also used the
3007         -mcmodel= switch.
3008         (rs6000_legitimate_address_p): Delete TOC fusion support.
3009         (rs6000_opt_masks): Likewise.
3010         (fusion_wrap_memory_address): Delete function, no longer used.
3011         (fusion_split_address); Delete TOC fusion support.
3012         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3013         longer used with toc fusion being deleted.
3014         (TARGET_TOC_FUSION_FP): Likewise.
3015         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3016         UNSPEC.
3017         (toc fusion spliter): Delete TOC fusion support.
3018         (toc_fusionload_<mode>): Likewise.
3019         (toc_fusionload_di): Likewise.
3020         (fusion_gpr_load_<mode>): Delete generator function, this insn no
3021         longer needs to be named.  Rename predicate to delete TOC fusion.
3022         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3023         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3024         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3025         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3026         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3028 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3030         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3031         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
3032         __int128 in built-in function prototypes.
3033         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3034         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3036 2018-07-27  Martin Sebor  <msebor@redhat.com>
3038         PR tree-optimization/86696
3039         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3040         types, including enums.
3041         (handle_char_store): Be prepared for the above function to fail.
3043 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
3045         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3046         when optimization level is lower than 2 or optimize for size.
3048 2018-07-26  Martin Sebor  <msebor@redhat.com>
3050         PR tree-optimization/86043
3051         PR tree-optimization/86042
3052         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3053         (get_string_cst_length): Rename...
3054         (get_min_string_length): ...to this.  Add argument.
3055         (handle_char_store): Extend to handle multi-character stores by
3056         MEM_REF.
3057         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
3058         * tree.h (initializer_zerop): Add argument.
3060 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
3062         PR middle-end/86660
3063         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3064         declare target to variables if they have always,{to,from,tofrom} map
3065         kinds.
3067 2018-07-26  Martin Liska  <mliska@suse.cz>
3069         PR lto/86548
3070         * lto-wrapper.c: Add linker_output as prefix
3071         for ltrans_output_file.
3073 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
3075         PR rtl-optimization/85805
3076         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3077         value for hard registers if that was written in the same mode.
3079 2018-07-26  Martin Liska  <mliska@suse.cz>
3081         PR gcov-profile/86536
3082         * gcov.c (format_gcov): Use printf format %.*f directly
3083         and do not handle special values.
3085 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3087         * common/config/arc/arc-common.c (arc_option_optimization_table):
3088         Update default optimizations for size.
3090 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3092         * config/arc/arc.md (movsf_insn): Add short instruction selection.
3093         * config/arc/constraints.md (CfZ): New constraint.
3094         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3095         (subsf3_fpu): Likewise.
3096         (cmpsf_fpu): Likewise.
3097         (cmpsf_fpu_uneq): Likewise.
3099 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3101         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3102         accesses as well.
3103         (arc_is_uncached_mem_p): uncached applies to both the variable and
3104         the pointer.
3106 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3108         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3109         register names.
3111 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
3113         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3114         field "m_scopes" from vec to auto_vec.
3116 2018-07-25  Martin Liska  <mliska@suse.cz>
3118         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3119         return type.
3121 2018-07-25  Richard Biener  <rguenther@suse.de>
3123         PR debug/86654
3124         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3125         special wrt context_die late.
3126         (gen_subprogram_die): Re-use DIEs in local scope.
3128 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
3130         PR tree-optimization/86644
3131         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
3133 2018-07-25  Martin Liska  <mliska@suse.cz>
3135         PR middle-end/86645
3136         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3137         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3139 2018-07-25  Martin Liska  <mliska@suse.cz>
3141         PR sanitizer/79635
3142         * params.def: Explain ASan abbreviation and provide
3143         a documentation link.
3145 2018-07-24  Martin Sebor  <msebor@redhat.com>
3147         PR tree-optimization/86622
3148         PR tree-optimization/86532
3149         * builtins.h (string_length): Declare.
3150         * builtins.c (c_strlen): Correct handling of non-constant offsets.
3151         (check_access): Be prepared for non-constant length ranges.
3152         (string_length): Make extern.
3153         * expr.c (string_constant): Only handle the minor non-constant
3154         array index.  Use string_constant to compute the length of
3155         a generic string constant.
3157 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
3159         PR tree-optimization/86618
3160         * tree-vect-stmts.c (vectorizable_call): Don't take the address
3161         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3163 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
3165         PR tree-optimization/86636
3166         * json.cc (json::object::set): Fix comment.  Add assertions.
3167         (json::array::append): Move here from json.h.  Add comment and an
3168         assertion.
3169         (json::string::string): Likewise.
3170         * json.h (json::array::append): Move to json.cc.
3171         (json::string::string): Likewise.
3172         * optinfo-emit-json.cc
3173         (optrecord_json_writer::impl_location_to_json): Assert that we
3174         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3175         wrapper around it.  Expand the location once, rather than three
3176         times.
3177         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3178         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3179         wrappers.
3180         (optrecord_json_writer::optinfo_to_json): Likewise, in four
3181         places.  Fix some overlong lines.
3183 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
3185         * config/aarch64/aarch64-simd.md
3186         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3187         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3188         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3189         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3190         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3191         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3192         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3193         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3194         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3196 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
3198         PR middle-end/86627
3199         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3200         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
3201         and abs_d == d, do the power of two handling if profitable.
3203 2018-07-24  Richard Biener  <rguenther@suse.de>
3205         * match.pd: Add BIT_FIELD_REF canonicalizations.
3207 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3209         PR c/86617
3210         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3212 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3214         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3215         terminated STRING_CST object.
3217 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3219         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3221 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3223         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3224         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3225         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3226         the elements into a register.
3227         (rs6000_split_v4si_init_di_reg): Delete.
3228         (rs6000_split_v4si_init): Delete.
3229         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3230         (vsx_init_v4si): Rewrite as a define_expand.
3232 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3234         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3235         zero_extend argument from memory): New.
3237 2018-07-22  Martin Sebor  <msebor@redhat.com>
3239         PR bootstrap/86621
3240         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3241         diagnosing calls with unknown arguments unless -Walloca-larger-than
3242         is restricted to less than PTRDIFF_MAX bytes.
3244 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
3246         * doc/gcov.texi (Invoking Gcov): Editorial changes.
3248 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3250         * pretty-print.c (text_info::set_location): Remove redundant
3251         "line_table" parameter from call to rich_location::set_range.
3253 2018-07-20  Martin Sebor  <msebor@redhat.com>
3255         PR middle-end/82063
3256         * builtins.c (expand_builtin_alloca): Adjust.
3257         * calls.c (alloc_max_size): Simplify.
3258         * cgraphunit.c (cgraph_node::expand): Adjust.
3259         * common.opt (larger_than_size, warn_frame_larger_than): Remove
3260         variables.
3261         (frame_larger_than_size): Same.
3262         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3263         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3264         Initialize.
3265         * doc/invoke.texi (GCC Command Options): Document option arguments.
3266         Explain byte-size arguments and suffixes.
3267         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3268         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3269         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3270         * doc/options.texi (UInteger): Expand.
3271         (Host_Wide_Int, ByteSize): Document new properties.
3272         * final.c (final_start_function_1): Include sizes in an error message.
3273         * function.c (frame_offset_overflow): Same.
3274         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3275         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3276         Diagnose unbounded alloca calls only for limits of less than
3277         PTRDIFF_MAX.
3278         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
3279         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
3280         for alloca(0).
3281         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
3282         only for limits of less than PTRDIFF_MAX.
3283         * langhooks-def.h (lhd_handle_option): Change function argument
3284         to HOST_WIDE_INT.
3285         * langhooks.c (lhd_handle_option): Same.
3286         * langhooks.h (handle_option): Same.
3287         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3288         ByteSize flags.
3289         (var_type, var_type_struct): Same.
3290         (var_set): Handle ByteSize flag.
3291         * optc-gen.awk: Add comments to output to ease debugging.  Make
3292         use of HOST_WIDE_INT where appropriate.
3293         * opts-gen-save.awk:  Use %lx to format unsigned long.
3294         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3295         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3296         arguments.  Parse bytes-size suffixes.
3297         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3298         (enum_value_to_arg): Same.
3299         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
3300         (handle_option): Adjust.
3301         (generate_option): Change function argument to HOST_WIDE_INT.
3302         (cmdline_handle_error): Adjust.
3303         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3304         (set_option): Change function argument to HOST_WIDE_INT.
3305         (option_enabled): Handle cl_host_wide_int.
3306         (get_option_state): Handle CLVC_SIZE.
3307         (control_warning_option): Same.
3308         * opts.c (common_handle_option): Change function argument to
3309         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
3310         OPT_Wvla_larger_than_.
3311         * opts.h (enum cl_var_type): Add an enumerator.
3312         * stor-layout.c (layout_decl): Print a more meaningful warning.
3313         * toplev.c (output_stack_usage): Adjust.
3315 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
3317         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3318         call to inline_expand_builtin_string_cmp.
3319         (expand_builtin_strcmp): Likewise.
3320         (expand_builtin_strncmp): Likewise.
3321         (inline_string_cmp): Delete the last parameter, change char_type_node
3322         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3323         two operands.
3324         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3325         the inlining expansion on target where the type of the call has same or
3326         narrower precision than unsigned char.
3328 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3330         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3331         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3332         * common.opt (fsave-optimization-record): New option.
3333         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3334         * doc/invoke.texi (-fsave-optimization-record): New option.
3335         * dumpfile.c: Include "optinfo-emit-json.h".
3336         (struct kv_pair): Move to coretypes.h.
3337         (optgroup_options): Make non-static.
3338         (dump_context::end_scope): Call
3339         optimization_records_maybe_pop_dump_scope.
3340         * dumpfile.h (optgroup_options): New decl.
3341         * json.cc: New file.
3342         * json.h: New file.
3343         * optinfo-emit-json.cc: New file.
3344         * optinfo-emit-json.h: New file.
3345         * optinfo.cc: Include "optinfo-emit-json.h".
3346         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3347         (optinfo_enabled_p): Check optimization_records_enabled_p.
3348         (optinfo_wants_inlining_info_p): Likewise.
3349         * optinfo.h: Update comment.
3350         * profile-count.c (profile_quality_as_string): New function.
3351         * profile-count.h (profile_quality_as_string): New decl.
3352         (profile_count::quality): New accessor.
3353         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3354         and optinfo_emit_json_cc_tests.
3355         * selftest.h (selftest::json_cc_tests): New decl.
3356         (selftest::optinfo_emit_json_cc_tests): New decl.
3357         * toplev.c: Include "optinfo-emit-json.h".
3358         (compile_file): Call optimization_records_finish.
3359         (do_compile): Call optimization_records_start.
3360         * tree-ssa-live.c: Include optinfo.h.
3361         (remove_unused_scope_block_p): Retain inlining information if
3362         optinfo_wants_inlining_info_p returns true.
3364 2018-07-20  Richard Biener  <rguenther@suse.de>
3366         PR debug/86585
3367         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3368         to cover -flto-partition=none.
3370 2018-07-20  Martin Liska  <mliska@suse.cz>
3372         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3373         (get_decl_source_range): Remove unused function.
3375 2018-07-20  Richard Biener  <rguenther@suse.de>
3377         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3378         (struct vn_phi_s): Likewise.
3379         (struct vn_reference_s): Likewise.
3380         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3381         for searching the slot of an entry known to be in the hash itself.
3382         (vn_phi_hasher::equal): Likewise.
3383         (vn_reference_hasher::equal): Likewise.
3384         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3385         globals.
3386         (optimistic_info, current_info): Remove, keeping only valid_info.
3387         (vn_reference_lookup_1): Remove fallback lookup.
3388         (vn_reference_lookup_2): Likewise.
3389         (vn_nary_op_lookup_1): Likewise.
3390         (vn_phi_lookup): Likewise.
3391         (vn_nary_build_or_lookup_1): Make sure to not chain the built
3392         hash element.
3393         (vn_reference_insert): Adjust, chain the inserted hash element
3394         at last_inserted_ref.
3395         (vn_reference_insert_pieces): Likewise.
3396         (visit_reference_op_call): Likewise.
3397         (vn_nary_op_insert_into): Chain the inserted hash element at
3398         last_inserted_nary.
3399         (vn_nary_op_insert_pieces): Adjust.
3400         (vn_nary_op_insert): Likewise.
3401         (vn_nary_op_insert_stmt): Likewise.
3402         (vn_phi_insert): Adjust, chain the inserted hash element at
3403         last_inserted_phi.
3404         (process_scc): Remove clearing and copying the optimistic
3405         table.  Instead remove elements inserted during an optimistic
3406         iteration from the single table we maintain.
3407         (init_scc_vn): Adjust.
3408         (free_scc_vn): Likewise.
3409         (sccvn_dom_walker::record_cond): Likewise.
3410         (sccvn_dom_walker::after_dom_children): Likewise.
3412 2018-07-19  Martin Sebor  <msebor@redhat.com>
3414         PR tree-optimization/84047
3415         PR tree-optimization/83776
3416         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3417         (check_array_bounds): Call it.
3419 2018-07-19  Martin Sebor  <msebor@redhat.com>
3421         * align.h (align_flags): Use member initialization.
3423 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
3425         * Makefile.in (OBJS): Add optinfo.o.
3426         * coretypes.h (class symtab_node): New forward decl.
3427         (struct cgraph_node): New forward decl.
3428         (class varpool_node): New forward decl.
3429         * dump-context.h: New file.
3430         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3431         "tree-pass.h".
3432         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3433         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3434         (set_alt_dump_file): Likewise.
3435         (dump_context::~dump_context): New dtor.
3436         (dump_gimple_stmt): Move implementation to...
3437         (dump_context::dump_gimple_stmt): ...this new member function.
3438         Add the stmt to any pending optinfo, creating one if need be.
3439         (dump_gimple_stmt_loc): Move implementation to...
3440         (dump_context::dump_gimple_stmt_loc): ...this new member function.
3441         Start a new optinfo and add the stmt to it.
3442         (dump_gimple_expr): Move implementation to...
3443         (dump_context::dump_gimple_expr): ...this new member function.
3444         Add the stmt to any pending optinfo, creating one if need be.
3445         (dump_gimple_expr_loc): Move implementation to...
3446         (dump_context::dump_gimple_expr_loc): ...this new member function.
3447         Start a new optinfo and add the stmt to it.
3448         (dump_generic_expr): Move implementation to...
3449         (dump_context::dump_generic_expr): ...this new member function.
3450         Add the tree to any pending optinfo, creating one if need be.
3451         (dump_generic_expr_loc): Move implementation to...
3452         (dump_context::dump_generic_expr_loc): ...this new member
3453         function.  Add the tree to any pending optinfo, creating one if
3454         need be.
3455         (dump_printf): Move implementation to...
3456         (dump_context::dump_printf_va): ...this new member function.  Add
3457         the text to any pending optinfo, creating one if need be.
3458         (dump_printf_loc): Move implementation to...
3459         (dump_context::dump_printf_loc_va): ...this new member function.
3460         Start a new optinfo and add the stmt to it.
3461         (dump_dec): Move implementation to...
3462         (dump_context::dump_dec): ...this new member function.  Add the
3463         value to any pending optinfo, creating one if need be.
3464         (dump_context::dump_symtab_node): New member function.
3465         (dump_context::get_scope_depth): New member function.
3466         (dump_context::begin_scope): New member function.
3467         (dump_context::end_scope): New member function.
3468         (dump_context::ensure_pending_optinfo): New member function.
3469         (dump_context::begin_next_optinfo): New member function.
3470         (dump_context::end_any_optinfo): New member function.
3471         (dump_context::s_current): New global.
3472         (dump_context::s_default): New global.
3473         (dump_scope_depth): Delete global.
3474         (dumpfile_ensure_any_optinfo_are_flushed): New function.
3475         (dump_symtab_node): New function.
3476         (get_dump_scope_depth): Reimplement in terms of dump_context.
3477         (dump_begin_scope): Likewise.
3478         (dump_end_scope): Likewise.
3479         (selftest::temp_dump_context::temp_dump_context): New ctor.
3480         (selftest::temp_dump_context::~temp_dump_context): New dtor.
3481         (selftest::verify_item): New function.
3482         (ASSERT_IS_TEXT): New macro.
3483         (ASSERT_IS_TREE): New macro.
3484         (ASSERT_IS_GIMPLE): New macro.
3485         (selftest::test_capture_of_dump_calls): New test.
3486         (selftest::dumpfile_c_tests): Call it.
3487         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3488         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3489         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3490         descriptive comment.
3491         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3492         (dump_node, dump_bb): Move these unrelated decls.
3493         (class dump_manager): Add leading comment.
3494         * optinfo.cc: New file.
3495         * optinfo.h: New file.
3497 2018-07-19  Michael Collison  <michael.collison@arm.com>
3498             Richard Henderson <rth@redhat.com>
3500         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3501         (subti): Handle op1 zero.
3502         (subvti4, usub4ti4): New.
3503         (*sub<GPI>3_compare1_imm): New.
3504         (sub<GPI>3_carryinCV): New.
3505         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3506         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3508 2018-07-19  Michael Collison  <michael.collison@arm.com>
3509             Richard Henderson <rth@redhat.com>
3511         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3512         (addti3): Create simpler code if low part is already known to be 0.
3513         (addvti4, uaddvti4): New.
3514         (*add<GPI>3_compareC_cconly_imm): New.
3515         (*add<GPI>3_compareC_cconly): New.
3516         (*add<GPI>3_compareC_imm): New.
3517         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3518         handle constants within this pattern..
3519         (*add<GPI>3_compareV_cconly_imm): New.
3520         (*add<GPI>3_compareV_cconly): New.
3521         (*add<GPI>3_compareV_imm): New.
3522         (add<GPI>3_compareV): New.
3523         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3524         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3525         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3526         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3527         with 'comparison' operator.
3528         (*add<GPI>3_compareV_cconly_imm): Ditto.
3529         (*add<GPI>3_compareV_cconly): Ditto.
3530         (*add<GPI>3_compareV_imm): Ditto.
3531         (add<GPI>3_compareV): Ditto.
3532         (add<mode>3_carryinC): Ditto.
3533         (*add<mode>3_carryinC_zero): Ditto.
3534         (*add<mode>3_carryinC): Ditto.
3535         (add<mode>3_carryinV): Ditto.
3536         (*add<mode>3_carryinV_zero): Ditto.
3537         (*add<mode>3_carryinV): Ditto.
3539 2018-07-19  Michael Collison  <michael.collison@arm.com>
3540             Richard Henderson <rth@redhat.com>
3542         * config/aarch64/aarch64-modes.def (CC_V): New.
3543         * config/aarch64/aarch64-protos.h
3544         (aarch64_addti_scratch_regs): Declare
3545         (aarch64_subvti_scratch_regs): Declare.
3546         (aarch64_expand_subvti): Declare.
3547         (aarch64_gen_unlikely_cbranch): Declare
3548         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3549         for signed overflow using CC_Vmode.
3550         (aarch64_get_condition_code_1): Handle CC_Vmode.
3551         (aarch64_gen_unlikely_cbranch): New function.
3552         (aarch64_addti_scratch_regs): New function.
3553         (aarch64_subvti_scratch_regs): New function.
3554         (aarch64_expand_subvti): New function.
3556 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3558         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3559         extension.
3560         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3561         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3562         extension.
3564 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3566         PR target/83009
3567         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3568         address check not strict.
3570 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3572         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3573         Umq with Umn.
3574         (store_pair_lanes<mode>): Likewise.
3575         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3576         enum value 'ADDR_QUERY_LDP_STP_N'.
3577         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3578         (aarch64_print_address_internal): Add declaration.
3579         (aarch64_print_ldpstp_address): Remove.
3580         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3581         (aarch64_print_operand): Change printing of 'y'.
3582         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3583         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3584         'true' rather than '1'.
3585         * config/aarch64/constraints.md (Uml): Likewise.
3586         (Uml): Rename to Umn.
3587         (Umq): Remove.
3589 2018-07-19  Richard Biener  <rguenther@suse.de>
3591         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3592         a trailing array.
3593         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3594         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3595         (vn_reference_hasher): Likewise.
3596         (struct vn_tables_s): Remove obstack and alloc-pool members.
3597         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3598         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3599         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3600         (vn_reference_insert_pieces): Likewise.
3601         (alloc_vn_nary_op_noinit): Adjust.
3602         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3603         (vn_phi_eq): Adjust.
3604         (shared_lookup_phiargs): Remove.
3605         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3606         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3607         (visit_reference_op_call): Likewise.
3608         (copy_nary, copy_phi, copy_reference): Remove.
3609         (process_scc): Rewind the obstack when iterating.  Do not
3610         copy the elements to valid_info but just move them from one
3611         hashtable to the other.
3612         (allocate_vn_table): Adjust.
3613         (free_vn_table): Likewise.
3614         (init_scc_vn): Likewise.
3615         (free_scc_vn): Likewise.
3617 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3619         PR target/86560
3620         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3621         indirect_return as function type attribute.
3622         (ix86_attribute_table): Change indirect_return to function
3623         type attribute.
3624         * doc/extend.texi: Update indirect_return attribute.
3626 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3628         * wide-int.h (widest2_int): New.
3629         * gimple-fold.c (arith_overflowed_p): Use it.
3630         * tree.h (widest2_int_cst): New.
3631         * tree-vrp.c (wide_int_binop_overflow): Rename from
3632         vrp_int_const_binop.
3633         Rewrite to work on trees.
3634         (extract_range_from_multiplicative_op_1): Abstract code to...
3635         (wide_int_range_min_max): ...here.
3636         (wide_int_range_cross_product): ...and here.
3637         (extract_range_from_binary_expr_1): Abstract overflow code to...
3638         (wide_int_range_mult_wrapping): ...here.
3639         * tree-vrp.h (wide_int_range_cross_product): New.
3640         (wide_int_range_mult_wrapping): New.
3642 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3643             Julia Koval  <julia.koval@intel.com>
3645         * config/i386/x86-tune-costs.h (skylake_memcpy,
3646         skylake_memset): Replace rep_prefix with unrolling for size 512.
3648 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3650         PR middle-end/86544
3651         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3652         comparision with EQ_EXPR in last stmt.
3654 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3656         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3657         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3658         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3659         previously known as "PowerPC AltiVec Built-in Functions".  Move
3660         some material to new subsubsections "PowerPC AltiVec Built-in
3661         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3662         ISA 2.07".
3663         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3664         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3665         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3666         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3668 2018-07-18  Richard Biener  <rguenther@suse.de>
3670         PR tree-optimization/86557
3671         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3672         EXACT_DIV_EXPR.
3674 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3676         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3678 2018-07-17  Jeff Law  <law@redhat.com>
3680         * config/arm/arm.c (get_label_padding): Update for recent
3681         changes to label_to_alignment.
3683         PR tree-optimization/86010
3684         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3686         * config/mips/mips.c (vr4130_align_insns): Update for recent
3687         changes to label_to_alignment.
3689         * config/frv/frv.c (frv_label_align): Update for recent changes
3690         to label_to_alignment.
3692         * config/nios2/nios2.c (nios2_label_align): Update for recent
3693         changes which dropped ALIGN_LABELS_LOG.
3695 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3697         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3698         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3700 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3702         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3703         deprecated align_labels_log.
3705 2018-07-17  Richard Biener  <rguenther@suse.de>
3707         PR lto/86456
3708         * dwarf2out.c (init_sections_and_labels): Always generate
3709         a debug_line_str_section for early LTO debug.
3710         (dwarf2out_finish): Reset debug_line_str_hash output early.
3711         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3712         with fat LTO part.
3713         (dwarf2out_early_finish): Output debug_line_str.
3715 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3717         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3718         index register on z196 or later.
3720 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3722         * config/s390/s390.c (s390_default_align): Set default function
3723         alignment to 16.
3724         (s390_override_options_after_change): Call s390_default align.
3725         (s390_option_override_internal): Call s390_default_align.
3726         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3728 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3730         PR middle-end/86542
3731         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3732         to _looptemp_ clauses, other than the first two.
3734 2018-07-17  Martin Liska  <mliska@suse.cz>
3736         * opts.c: Do not enable OPT_falign_* for -Os.
3738 2018-07-17  Martin Liska  <mliska@suse.cz>
3740         * align.h (MAX_CODE_ALIGN): New.
3741         (MAX_CODE_ALIGN_VALUE): New.
3742         * common/config/i386/i386-common.c (ix86_handle_option):
3743         (MAX_CODE_ALIGN): Moved to align.h.
3744         * final.c (MAX_CODE_ALIGN): Likewise.
3745         * opts.c (parse_and_check_align_values):
3746         (MAX_CODE_ALIGN): Likewise.
3747         (MAX_CODE_ALIGN_VALUE): Likewise.
3749 2018-07-17  Martin Liska  <mliska@suse.cz>
3751         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3752         in order to fulfil coding style.
3753         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3754         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3755         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3756         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3757         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3758         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3759         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3760         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3761         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3763 2018-07-17  Martin Liska  <mliska@suse.cz>
3765         * align.h: New file.
3766         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3767         directly.
3768         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3769         align_flags of label_to_alignment.
3770         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3771         align_flags class.
3772         * config/m68k/m68k.c: Do not use removed align_labels_value and
3773         align_loops_value.
3774         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3775         (LOOP_ALIGN): Likewise.
3776         (LABEL_ALIGN): Likewise.
3777         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3778         Remove not used macro.
3779         (rs6000_loop_align): Change return type to align_flags.
3780         (rs6000_loop_align_max_skip): Remove.
3781         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3782         Change return type to align_flags.
3783         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3784         Remove not used macro.
3785         (rs6000_loop_align):  Change return type to align_flags.
3786         (rs6000_loop_align_max_skip): Remove.
3787         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3788         * config/rx/rx-protos.h (rx_align_for_label): Make it
3789         static function.
3790         * config/rx/rx.c (rx_align_for_label): Change return type
3791         to align_flags.
3792         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3793         macro definitions.
3794         into align_flags class.
3795         (LABEL_ALIGN): Likewise.
3796         (LOOP_ALIGN): Likewise.
3797         * config/s390/s390.c (s390_label_align): Use align_flags
3798         class member.
3799         (s390_asm_output_function_label): Likewise.
3800         * config/sh/sh.c (sh_override_options_after_change):
3801         Use align_flags class directly without macros.
3802         (find_barrier): Likewise.
3803         (barrier_align): Likewise.
3804         (sh_loop_align): Likewise.
3805         * config/spu/spu.c (spu_option_override):
3806         Use align_flags_tuple::get_value instead of removed macros.
3807         (spu_sched_init): Likewise.
3808         * config/spu/spu.h (GTY): Likewise.
3809         * config/visium/visium.c (visium_option_override):
3810         Set "8" as default secondary alignment.
3811         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3812         in order to guarantee secondary alignment of 8.
3813         * coretypes.h: Include align.h header file.
3814         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3815         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3816         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3817         * doc/tm.texi.in: Likewise.
3818         * final.c (struct label_alignment): Remove not used structure.
3819         (LABEL_ALIGN): Change type to align_flags.
3820         (LOOP_ALIGN): Likewise.
3821         (JUMP_ALIGN): Likewise.
3822         (default_loop_align_max_skip): Remove.
3823         (default_label_align_max_skip): Likewise.
3824         (default_jump_align_max_skip): Likewise.
3825         (default_label_align_after_barrier_max_skip):
3826         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3827         (LABEL_TO_MAX_SKIP): Remove.
3828         (label_to_alignment): Return align_flags type instead of integer.
3829         (label_to_max_skip): Remove.
3830         (align_fuzz): Use align_flags type.
3831         (compute_alignments): Use align_flags type and use align_flags::max
3832         to combine multiple alignments.
3833         (grow_label_align): Grow vec instead of C array.
3834         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3835         (shorten_branches):  Use align_flags type and use align_flags::max
3836         to combine multiple alignments.
3837         (final_scan_insn_1): Remove usage of secondary alignment that comes
3838         from label alignment, but instead use proper secondary alignment
3839         which is computed in grow_label_align.
3840         * flags.h (struct align_flags_tuple): Move to align.h.
3841         (struct align_flags): Likewise.
3842         (state_align_loops): Rename to align_loops.
3843         (state_align_jumps): Rename to align_jumps.
3844         (state_align_labels): Rename to align_labels.
3845         (state_align_functions): Rename to align_functions.
3846         (align_loops_log): Remove.
3847         (align_jumps_log): Remove.
3848         (align_labels_log): Remove.
3849         (align_functions_log): Remove.
3850         (align_loops_max_skip): Remove.
3851         (align_jumps_max_skip): Remove.
3852         (align_labels_max_skip): Remove.
3853         (align_functions_max_skip): Remove.
3854         (align_loops_value): Remove.
3855         (align_jumps_value): Remove.
3856         (align_labels_value): Remove.
3857         (align_functions_value): Remove.
3858         * output.h (label_to_alignment): Change return type to align_flags.
3859         (label_to_max_skip): Remove.
3860         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3861         jump_align_max_skip macros.
3862         * targhooks.h (default_loop_align_max_skip): Remove.
3863         (default_label_align_max_skip): Likewise.
3864         (default_jump_align_max_skip): Likewise.
3865         (default_label_align_after_barrier_max_skip): Remove.
3866         * toplev.c (read_log_maxskip): Use ::normalize function.
3867         (parse_N_M): Remove not used argument and also call ::normalize.
3868         (parse_alignment_opts): Do not pass unused arguments.
3869         * varasm.c (assemble_start_function): Use directly align_functions
3870         instead of removed macros.
3871         * system.h: Do not poison removed macros.
3873 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3875         PR middle-end/86539
3876         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3877         and cond temporaries don't have reference type if iterator has
3878         pointer type.  For init use &for_pre_body instead of pre_p if
3879         for_pre_body is non-empty.
3881 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3883         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3884         double-double modes to SFmode directly directly.
3885         (trunc<mode>sf2_fprs): Delete.
3887 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3889         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3890         for conversions between IFmode and the decimal floating point modes.
3891         (init_float128_ieee): Use the correct names for conversions between
3892         KFmode and the decimal floating point modes.
3894 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3896         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3897         for the conversions between TDmode and IFmode.
3898         (init_float128_ieee): Use more correct names for the conversions
3899         between TDmode and KFmode.
3901 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3903         PR tree-optimization/86526
3904         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3905         (inline_expand_builtin_string_cmp): Likewise.
3906         (inline_string_cmp): Likewise.  Use c_readstr instead of
3907         builtin_memcpy_read_str.  Add unit_mode temporary.
3909 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3911         PR middle-end/86528
3912         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3913         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3915 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3917         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3918         Alphabetize prototypes of built-in functions, separating out
3919         built-in functions that are listed in this section but should be
3920         described elsewhere.
3922 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3924         PR target/86511
3925         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3926         conditional move when trapping comparison was split to a
3927         non-trapping one (and vice versa).
3929 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3931         * config/s390/s390.c (s390_function_profiler): Generate nops
3932         instead of profiler call sequences.
3933         * config/s390/s390.opt: Add the new option.
3935 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3937         * config/s390/s390.c (s390_function_profiler): Generate
3938         __mcount_loc section.
3939         * config/s390/s390.opt: Add the new option.
3941 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3943         * common.opt: Add the new warning.
3944         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3945         %r0,__fentry__" when -mfentry is specified.
3946         (s390_option_override_internal): Disallow -mfentry for 31-bit
3947         CPUs.
3948         * config/s390/s390.opt: Add the new option.
3950 2018-07-16  Richard Biener  <rguenther@suse.de>
3952         PR lto/86523
3953         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3954         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3956 2018-07-16  Martin Liska  <mliska@suse.cz>
3958         PR ipa/86529
3959         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3960         to ::get_create.
3962 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3964         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3966 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3968         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3969         for ARCHS4x.
3970         * config/arc/arc-cpus.def (hs4x): New cpu.
3971         (hs4xd): Likewise.
3972         * config/arc/arc-tables.opt: Regenerate.
3973         * config/arc/arc.c (arc_sched_issue_rate): New function.
3974         (TARGET_SCHED_ISSUE_RATE): Define.
3975         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3976         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3977         fpu_cvt.
3978         (attr tune): Add ARCHS4x tune values.
3979         (attr tune_dspmpy): Define.
3980         (*tst): Correct instruction type.
3981         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3982         * config/arc/arcHS4x.md: New file.
3983         * config/arc/fpu.md: Update instruction type attributes.
3984         * config/arc/t-multilib: Regenerate.
3986 2018-07-16  Tom de Vries  <tdevries@suse.de>
3988         PR debug/86455
3989         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3991 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3993         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3994         early clobber.
3996 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3998         PR tree-optimization/86514
3999         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4000         conversion to a boolean type from a type with greater precision.
4002 2018-07-16  Tom de Vries  <tdevries@suse.de>
4004         * var-tracking.c (vt_initialize): Print adjusted insn slim if
4005         dump_flags request TDF_SLIM.
4007 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
4009         * fold-const.c (int_const_binop_1): Abstract...
4010         (wide_int_binop): ...wide int code here.
4011         (poly_int_binop): ...poly int code here.
4012         Abstract the rest of int_const_binop_1 into int_const_binop.
4013         * fold-const.h (wide_int_binop): New.
4014         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4015         Remove useless PLUS/MINUS_EXPR case.
4016         (zero_nonzero_bits_from_vr): Move wide int code...
4017         (zero_nonzero_bits_from_bounds): ...here.
4018         (extract_range_from_binary_expr_1): Move mask optimization code...
4019         (range_easy_mask_min_max): ...here.
4020         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4021         (range_easy_mask_min_max): New.
4023 2018-07-15  Jeff Law  <law@redhat.com>
4025         PR target/85993
4026         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4027         block.
4029 2018-07-14  Jim Wilson  <jimw@sifive.com>
4031         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4033 2018-07-14  Paul Koning  <ni1d@arrl.net>
4035         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4037 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
4039         * lto-streamer-out.c (copy_function_or_variable): Dump info about
4040         copying section.
4042 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
4043             Steve Munroe  <munroesj52@gmail.com>
4045         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4046         (_mm_andnot_si128): Likewise.
4047         (_mm_or_si128): Likewise.
4048         (_mm_xor_si128): Likewise.
4050 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
4052         PR middle-end/78809
4053         * builtins.c (expand_builtin_memcmp): Inline the calls first
4054         when result_eq is false.
4055         (expand_builtin_strcmp): Inline the calls first.
4056         (expand_builtin_strncmp): Likewise.
4057         (inline_string_cmp): New routine. Expand a string compare
4058         call by using a sequence of char comparison.
4059         (inline_expand_builtin_string_cmp): New routine. Inline expansion
4060         a call to str(n)cmp/memcmp.
4061         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4062         New option.
4063         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4065 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
4067         * config/arm/driver-arm.c: Include arm-native.h.
4068         (host_detect_local_cpu): Use auto-generated data tables.
4069         (vendors, arm_cpu_table): Delete.  Move part information to ...
4070         * config/arm/arm-cpus.in: ... here.
4071         * config/arm/parsecpu.awk (gen_native): New function.
4072         (vendor, part): New CPU fields.
4073         (END): Add support for building the native CPU detection tables.
4074         * config/arm/t-arm (arm-native.h): Add build rule.
4075         (driver-arm.o): Add dependency on arm-native.h.
4077 2018-07-13  Richard Biener  <rguenther@suse.de>
4079         PR middle-end/85974
4080         * match.pd (addr1 - addr2): Allow either of the operand to
4081         have a conversion.
4083 2018-07-13  Tom de Vries  <tdevries@suse.de>
4085         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4086         in remap_ssa_name.
4088 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
4090         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4091         arrays instead of numbered variables.
4093 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
4095         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4096         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4098 2018-07-13  Richard Biener  <rguenther@suse.de>
4100         PR debug/86452
4101         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4102         instead of get_context_die.
4104 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
4105             Richard Biener  <rguenther@suse.de>
4107         PR middle-end/86489
4108         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4109         that the loop latch destination where phi is defined.
4111 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
4113         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4114         (riscv_expand_epilogue): Add assertion to check interrupt mode.
4115         (riscv_set_current_function): Extract getting interrupt type to new
4116         function.
4117         (riscv_get_interrupt_type): New function.
4118         (riscv_merge_decl_attributes): New function, checking interrupt type is
4119         same.
4120         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4122 2018-07-12  Paul Koning  <ni1d@arrl.net>
4124         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4125         directive.
4127 2018-07-12  Paul Koning  <ni1d@arrl.net>
4129         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4130         zero reference, add doloop_end instead.
4131         * doc/md.texi (decrement_and_branch_until_zero): Remove.
4132         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
4133         detail for doloop_end.
4135 2018-07-12  Martin Sebor  <msebor@redhat.com>
4137         PR c/86453
4138         * attribs.c (decl_attributes): Reject conflicting attributes before
4139         calling attribute handlers.
4141 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4143         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4144          parameter.
4145         (gcc::dump_manager::get_dump_file_name): likewise.
4146         (dump_begin): Likewise.
4147         * dumpfile.h (dump_begin): Update prototype.
4148         (gcc::dump_manager::get_dump_file_name,
4149         gcc::dump_manager::get_dump_file_name): Update prototype.
4151 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4153         * internal-fn.h (vectorizable_internal_fn_p): New function.
4154         * tree-vect-slp.c (compatible_calls_p): Likewise.
4155         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
4156         to internal functions.
4157         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4159 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4161         * fold-const.h (inverse_conditions_p): Declare.
4162         * fold-const.c (inverse_conditions_p): New function.
4163         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
4164         that test the inverse condition of a conditional internal function.
4165         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4166         * internal-fn.c (internal_fn_mask_index): Handle conditional
4167         internal functions.
4168         (vectorized_internal_fn_supported_p): New function.
4169         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4170         (any_pred_load_store): Replace with...
4171         (need_to_predicate): ...this new variable.
4172         (redundant_ssa_names): New variable.
4173         (ifcvt_can_use_mask_load_store): Move initial checks to...
4174         (ifcvt_can_predicate): ...this new function.  Handle tree codes
4175         for which a conditional internal function exists.
4176         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4177         instead of ifcvt_can_use_mask_load_store.  Update after variable
4178         name change.
4179         (predicate_load_or_store): New function, split out from
4180         predicate_mem_writes.
4181         (check_redundant_cond_expr): New function.
4182         (value_available_p): Likewise.
4183         (predicate_rhs_code): Likewise.
4184         (predicate_mem_writes): Rename to...
4185         (predicate_statements): ...this.  Use predicate_load_or_store
4186         and predicate_rhs_code.
4187         (combine_blocks, tree_if_conversion): Update after above name changes.
4188         (ifcvt_local_dce): Handle redundant_ssa_names.
4189         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4190         general conditional functions.
4191         * tree-vect-stmts.c (vectorizable_call): Likewise.
4193 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4194             Alan Hayward  <alan.hayward@arm.com>
4195             David Sherwood  <david.sherwood@arm.com>
4197         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4198         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4199         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4200         plus and minus and convert them into IFN_COND_FMA-based sequences.
4201         (convert_mult_to_fma): Handle conditional plus and minus.
4203 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4205         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4206         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4207         (cond_fnms_optab): New optabs.
4208         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4209         internal functions.
4210         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4211         * internal-fn.h (get_conditional_internal_fn): Declare.
4212         (get_unconditional_internal_fn): Likewise.
4213         * internal-fn.c (cond_ternary_direct): New macro.
4214         (expand_cond_ternary_optab_fn): Likewise.
4215         (direct_cond_ternary_optab_supported_p): Likewise.
4216         (FOR_EACH_COND_FN_PAIR): Likewise.
4217         (get_conditional_internal_fn): New function.
4218         (get_unconditional_internal_fn): Likewise.
4219         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4220         (gimple_match_op::gimple_match_op): Add a new overload for 5
4221         operands.
4222         (gimple_match_op::set_op): Likewise.
4223         (gimple_resimplify5): Declare.
4224         * genmatch.c (decision_tree::gen): Generate simplifications for
4225         5 operands.
4226         * gimple-match-head.c (gimple_simplify): Define an overload for
4227         5 operands.  Handle calls with 5 arguments in the top-level overload.
4228         (convert_conditional_op): Handle conversions from unconditional
4229         internal functions to conditional ones.
4230         (gimple_resimplify5): New function.
4231         (build_call_internal): Pass a fifth operand.
4232         (maybe_push_res_to_seq): Likewise.
4233         (try_conditional_simplification): Try converting conditional
4234         internal functions to unconditional internal functions.
4235         Handle 3-operand unconditional forms.
4236         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4237         Define ternary equivalents of the current rules for binary conditional
4238         internal functions.
4239         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4240         ternary operations.
4241         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4242         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4243         (optab): Handle them.
4244         (SVE_COND_FP_TERNARY): New int iterator.
4245         (sve_fmla_op, sve_fmad_op): New int attributes.
4246         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4247         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4248         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4250 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4252         * target.def (preferred_else_value): New target hook.
4253         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4254         * doc/tm.texi: Regenerate.
4255         * targhooks.h (default_preferred_else_value): Declare.
4256         * targhooks.c (default_preferred_else_value): New function.
4257         * internal-fn.h (conditional_internal_fn_code): Declare.
4258         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4259         (get_conditional_internal_fn): Use it.
4260         (conditional_internal_fn_code): New function.
4261         * gimple-match.h (gimple_match_cond): New struct.
4262         (gimple_match_op): Add a cond member function.
4263         (gimple_match_op::gimple_match_op): Update all forms to take a
4264         gimple_match_cond.
4265         * genmatch.c (expr::gen_transform): Use the same condition as res_op
4266         for the suboperation, but don't specify a particular else_value.
4267         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4268         (visit_nary_op, visit_reference_op_load): Pass
4269         gimple_match_cond::UNCOND to the gimple_match_op constructor.
4270         * gimple-match-head.c: Include tree-eh.h
4271         (convert_conditional_op): New function.
4272         (maybe_resimplify_conditional_op): Likewise.
4273         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4274         (gimple_resimplify2): Likewise.
4275         (gimple_resimplify3): Likewise.
4276         (gimple_resimplify4): Likewise.
4277         (maybe_push_res_to_seq): Return null for conditional operations.
4278         (try_conditional_simplification): New function.
4279         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
4280         constructor.
4281         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4282         IFN_COND_* call.
4283         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4284         function.
4285         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4287 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4289         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4290         DECL_FCONTEXT
4291         (hash_tree): Do not hash DECL_FCONTEXT
4292         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4293         Do not stream DECL_FCONTEXT.
4294         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4295         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4297 2018-07-12  Richard Biener  <rguenther@suse.de>
4299         PR debug/86462
4300         * dwarf2out.c (gen_block_die): Only output blocks when they have
4301         at least one !DECL_IGNORED_P variable.
4303 2018-07-12  Richard Biener  <rguenther@suse.de>
4305         PR target/84829
4306         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4307         Remove -mieee-fp handling.
4309 2018-07-12  Richard Biener  <rguenther@suse.de>
4311         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4312         left-over from last patch.
4314 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4316         PR tree-optimization/86492
4317         * gimple-ssa-store-merging.c
4318         (imm_store_chain_info::coalesce_immediate_stores): Call
4319         check_no_overlap even for the merge_overlapping case.  Formatting fix.
4321 2018-07-12  Richard Biener  <rguenther@suse.de>
4323         PR middle-end/86479
4324         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4325         move possibly trapping operations into the conditional.
4327 2018-07-12  Richard Biener  <rguenther@suse.de>
4329         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4330         (vn_lookup_simplify_result): Remove recursion limit applied
4331         here.
4332         (vn_nary_build_or_lookup_1): Adjust.
4333         (try_to_simplify): Likewise.
4334         * gimple-match-head.c (gimple_resimplify1): Instead apply one
4335         here.
4336         (gimple_resimplify2): Likewise.
4337         (gimple_resimplify3): Likewise.
4338         (gimple_resimplify4): Likewise.
4340 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
4342         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4343         Use __mmask64 type instead of __mmask8 for __M argument.
4344         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4345         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4346         __U argument.
4347         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4348         __mmask16 for __M argument.
4349         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4350         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4351         to __mmask16 instead of __mmask8.
4352         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4353         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4354         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4355         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4356         instead of __mmask16 for __U argument.
4357         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4358         __mmask16 instead of __mmask8 for __U argument.
4359         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4360         __U argument.
4361         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4362         __mmask16.
4363         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4364         argument.
4365         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4366         __U argument.
4367         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4368         __mmask16.
4369         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4370         of __mmask16.
4371         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4372         __U argument.
4373         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4374         __U argument.
4375         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4376         __U argument.
4377         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4378         __U argument.
4379         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4380         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4381         return type as well as __M argument type and all casts from __mmask8
4382         to __mmask32.
4383         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4384         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4385         return type as well as __M argument type and all casts from __mmask8
4386         to __mmask16.
4387         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4388         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4389         return type as well as __M argument type and all casts from __mmask8
4390         to __mmask32.
4391         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4392         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4393         return type as well as __M argument type and all casts from __mmask8
4394         to __mmask16.
4395         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4396         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4397         __mmask16.
4399 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
4401         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4402         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4403         for __U argument.
4405 2018-07-11  Paul Koning  <ni1d@arrl.net>
4407         * doc/md.texi (define_subst): Document how multiple occurrences of
4408         the same argument in the replacement pattern are handled.
4410 2018-07-11  Paul Koning  <ni1d@arrl.net>
4412         * doc/extend.texi (Common Variable Attributes): Move "mode" into
4413         alphabetical order.
4414         (Common Type Attributes): Add "mode" attribute.
4416 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
4418         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4419         stream DECL_ORIGINAL_TYPE.
4420         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4421         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4422         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4423         Do not walk original type.
4424         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4425         external decls.
4426         (write_ts_decl_non_common_tree_pointers): Do not stream
4427         DECL_ORIGINAL_TYPE
4428         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4429         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4431 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4433         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4434         thread twice from the same starting edge.
4436 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4438         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4439         * gimple.c (gimple_call_nonnull_result_p): ...here...
4440         (gimple_call_nonnull_arg): ...and here.
4441         * gimple.h (gimple_call_nonnull_result_p): New.
4442         (gimple_call_nonnull_arg): New.
4444 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
4446         * config/arm/arm-cpus.in: Move information from fpu field of each
4447         cpu definition to the isa field.
4448         * config/arm/parsecpu.awk (fpu): Delete match rule.
4449         (gen_comm_data): Don't add bits from the CPU's FPU entry.
4451 2018-07-11  Richard Biener  <rguenther@suse.de>
4453         PR debug/86457
4454         * dwarf2out.c (init_sections_and_labels): Use
4455         output_asm_line_debug_info consistently.
4456         (dwarf2out_early_finish): Likewise.
4457         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4458         type units.
4460 2018-07-11  Richard Biener  <rguenther@suse.de>
4462         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4463         Rework father_bb setting in a way to avoid propagating constants
4464         multiple times on a loop body.
4466 2018-07-10  Mark Wielaard  <mark@klomp.org>
4468         PR debug/86459
4469         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4471 2018-07-10  Richard Biener  <rguenther@suse.de>
4473         * hash-map.h (hash_map::iterator::operator*): Return
4474         references to key and value.
4476 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
4478         PR c++/86443
4479         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4480         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4481         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4482         (gimplify_omp_for): For composite loops, move outer
4483         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4484         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
4485         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
4486         TREE_LIST for both the original class iterator and the "last" helper
4487         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
4488         loop, remember has_decl_expr from outer composite loops for the
4489         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4491 2018-07-09  Martin Sebor  <msebor@redhat.com>
4493         PR middle-end/77357
4494         PR middle-end/86428
4495         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4496         accessing implicitly initialized array elements.
4497         * expr.c (string_constant): Handle string initializers of
4498         character arrays within aggregates.
4499         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4500         Store element offset.  As a special case, handle zero size.
4501         (fold_nonarray_ctor_reference): Same.
4502         (fold_ctor_reference): Add argument.  Store subobject offset.
4503         * gimple-fold.h (fold_ctor_reference): Add argument.
4505 2018-07-09  Paul Koning  <ni1d@arrl.net>
4507         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4508         (pdp11_insn_cost): New function.
4509         (pdp11_md_asm_adjust): New function.
4510         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4511         (pdp11_rtx_costs): Update to match machine better.
4512         (output_addr_const_pdp11): Correct format mismatch warnings.
4513         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4514         * config/pdp11/pdp11.md: General change to add base_cost and/or
4515         length attributes for use by new pdp11_insn_cost function.
4516         (MIN_BRANCH): Correct definition.
4517         (MIN_SOB): Ditto.
4518         (doloop_end): Use standard pattern name for looping pattern.
4519         (doloop_end_nocc): New.
4520         (movsf): Add another constraint alternative.
4521         (zero_extendqihi2): Add constraint alternatives for not in place
4522         extend.
4523         (zero_extendhisi2): Remove.
4524         (shift patterns): Add CC handling variants.
4525         (bswaphi2): New.
4526         (bswapsi2): New.
4527         (rothi3): New.
4528         (define_peephole2): New peephole to recognize mov that sets CC for
4529         subsequent test.
4531 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4533         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4534         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4535         wi::add.
4537 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4539         PR c/86420
4540         * real.c (real_nextafter): Return true if result is denormal.
4542 2018-07-09  Martin Liska  <mliska@suse.cz>
4544         * common.opt: Add back wrongly removed attribute.
4546 2018-07-09  Richard Biener  <rguenther@suse.de>
4548         PR debug/86413
4549         * dwarf2out.c (gen_block_die): For an early generated DIE
4550         always output high/low PC attributes.
4552 2018-07-09  Tom de Vries  <tdevries@suse.de>
4554         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4555         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4556         onto VAR_DECL with abstract origin.
4558 2018-07-07  Jim Wilson  <jimw@sifive.com>
4560         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4562 2018-07-07  Tom de Vries  <tdevries@suse.de>
4564         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4566 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4568         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4569         overflow_type.
4570         (combine_bound): Use wide-int overflow calculation instead of
4571         rolling our own.
4572         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4573         overflow_type.
4574         * fold-const.c (int_const_binop_2): Same.
4575         (extract_muldiv_1): Same.
4576         (fold_div_compare): Same.
4577         (fold_abs_const): Same.
4578         * match.pd: Same.
4579         * poly-int.h (add): Same.
4580         (sub): Same.
4581         (neg): Same.
4582         (mul): Same.
4583         * predict.c (predict_iv_comparison): Same.
4584         * profile-count.c (slow_safe_scale_64bit): Same.
4585         * simplify-rtx.c (simplify_const_binary_operation): Same.
4586         * tree-chrec.c (tree_fold_binomial): Same.
4587         * tree-data-ref.c (split_constant_offset_1): Same.
4588         * tree-if-conv.c (idx_within_array_bound): Same.
4589         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4590         * tree-ssa-phiopt.c (minmax_replacement): Same.
4591         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4592         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4593         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4594         * wide-int.cc (wi::add_large): Same.
4595         (wi::mul_internal): Same.
4596         (wi::sub_large): Same.
4597         (wi::divmod_internal): Same.
4598         * wide-int.h: Change overflow type to overflow_type for neg, add,
4599         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4600         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4601         mul_internal, divmod_internal.
4602         (overflow_type): New enum.
4603         (accumulate_overflow): New.
4605 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4607         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4608         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4610 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4612         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4613         argument is checked for zero before entering loop, avoid checking again.
4615 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4617         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4618         * gimplify.h (generic_expr_could_trap_p): Likwise.
4619         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4621 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4623         PR tree-optimization/86401
4624         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4625         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4626         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4627         * fold-const.h (fold_bit_and_mask): Declare.
4628         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4630 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4632         PR target/86324
4633         * target.def (translate_mode_attribute): New hook.
4634         * targhooks.h (default_translate_mode_attribute): Declare.
4635         * targhooks.c (default_translate_mode_attribute): New function.
4636         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4637         * doc/tm.texi: Regenerate.
4638         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4639         (rs6000_translate_mode_attribute): New function.
4641 2018-07-06  Paul Koning  <ni1d@arrl.net>
4643         * doc/md.texi (define_split): Document DONE and FAIL.
4644         (define_peephole2): Ditto.
4646 2018-07-05  Jeff Law  <law@redhat.com>
4648         PR tree-optimization/86010
4649         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4650         both the head and tail of mem* and str* calls.
4652 2018-07-05  Jim Wilson  <jimw@sifive.com>
4654         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4656 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4658         * config/aarch64/aarch64-simd.md: correct flags text for
4659         MIN_EXPR replacement.
4661 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4663         * configure: Regenerated.
4665 2018-07-05  Carl Love  <cel@us.ibm.com>
4667         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4668         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4669         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4670         VSX_BUILTIN_DOUBLEL_V4SF.
4672 2018-07-05  Martin Sebor  <msebor@redhat.com>
4674         PR c++/86400
4675         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4676         than its domain to compute its the upper bound of a char array.
4678 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4680         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4681         * doc/cpp.texi: Update comment.
4682         * doc/tm.texi: Rebuilt.
4683         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4684         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4685         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4686         headers affected by extern "C".
4687         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4688         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4689         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4690         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4691         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4692         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4693         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4694         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4695         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4696         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4697         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4698         config/sparc/sp64-elf.h, config/spu/spu.h,
4699         config/stormy16/stormy16.h, config/v850/v850.h,
4700         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4701         define NO_IMPLICIT_EXTERN_C.
4702         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4704 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4706         PR target/84711
4707         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4708         instead of GET_MODE_SIZE when comparing Units.
4710 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4712         PR target/84711
4713         * rtlanal.c (set_noop_p): Constrain on mode change,
4714         include hard-reg-set.h
4716 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4718         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4720 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4722         Revert
4723         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4725         PR sanitizer/84250
4726         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4727         libasan.
4728         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4730 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4732         PR sanitizer/84250
4733         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4734         libasan.
4735         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4737 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4739         PR middle-end/86380
4740         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4742 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4744         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4745         neg_*_op* variables.
4747 2018-07-04  Martin Liska  <mliska@suse.cz>
4749         * tree-switch-conversion.c: Define
4750         max_ratio_for_speed and max_ratio_for_size constants.
4752 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4753             Martin Liska  <mliska@suse.cz>
4755         PR middle-end/66240
4756         PR target/45996
4757         PR c/84100
4758         * common.opt: Rename align options with 'str_' prefix.
4759         * common/config/i386/i386-common.c (set_malign_value): New
4760         function.
4761         (ix86_handle_option): Use it to set -falign-* options/
4762         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4763         type from int to string.
4764         * config/aarch64/aarch64.c: Update default values from int
4765         to string.
4766         * config/alpha/alpha.c (alpha_override_options_after_change):
4767         Likewise.
4768         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4769         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4770         max skip conditionally.
4771         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4772         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4773         max skip conditionally.
4774         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4775         max skip conditionally.
4776         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4777         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4778         max skip conditionally.
4779         * config/i386/i386.c (struct ptt): Change type from int to
4780         string.
4781         (ix86_default_align): Set default values.
4782         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4783         max skip conditionally.
4784         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4785         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4786         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4787         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4788         max skip conditionally.
4789         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4790         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4791         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4792         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4793         max skip conditionally.
4794         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4795         * config/ia64/ia64.c (ia64_option_override): Set default values
4796         for alignment options.
4797         * config/m68k/m68k.c: Handle new str_align_* options.
4798         * config/mips/mips.c (mips_set_compression_mode): Change
4799         type of constants.
4800         (mips_option_override): Set default values for options.
4801         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4802         Likewise.
4803         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4804         Likewise.
4805         * config/rx/rx.c (rx_option_override): Likewise.
4806         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4807         (LABEL_ALIGN): Use align_labels_log.
4808         (LOOP_ALIGN): Use align_loops_align.
4809         * config/s390/s390.c (s390_asm_output_function_label): Use new
4810         macros.
4811         * config/sh/sh.c (sh_override_options_after_change):
4812         Change type of constants.
4813         * config/spu/spu.c (spu_sched_init): Likewise.
4814         * config/sparc/sparc.c (sparc_option_override): Set default
4815         values for options.
4816         * config/visium/visium.c (visium_option_override): Likewise.
4817         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4818         emit p2align format with last argument if it's not needed.
4819         * doc/invoke.texi: Document extended format of -falign-*.
4820         * final.c: Use align_labels alignment.
4821         * flags.h (struct target_flag_state): Change type to use
4822         align_flags.
4823         (struct align_flags_tuple): New.
4824         (struct align_flags): Likewise.
4825         (align_loops_log): Redefine macro to use new types.
4826         (align_loops_max_skip): Redefine macro to use new types.
4827         (align_jumps_log): Redefine macro to use new types.
4828         (align_jumps_max_skip): Redefine macro to use new types.
4829         (align_labels_log): Redefine macro to use new types.
4830         (align_labels_max_skip): Redefine macro to use new types.
4831         (align_functions_log): Redefine macro to use new types.
4832         (align_loops): Redefine macro to use new types.
4833         (align_jumps): Redefine macro to use new types.
4834         (align_labels): Redefine macro to use new types.
4835         (align_functions): Redefine macro to use new types.
4836         (align_functions_max_skip): Redefine macro to use new types.
4837         (align_loops_value): New macro.
4838         (align_jumps_value): New macro.
4839         (align_labels_value): New macro.
4840         (align_functions_value): New macro.
4841         * function.c (invoke_set_current_function_hook): Propagate
4842         alignment values from flags to global variables default in
4843         topleev.h.
4844         * ipa-icf.c (sem_function::equals_wpa): Use
4845         cl_optimization_option_eq instead of memcmp.
4846         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4847         of string types.
4848         (cl_optimization_stream_in): Likewise.
4849         * optc-save-gen.awk: Support strings in cl_optimization.
4850         * opth-gen.awk: Likewise.
4851         * opts.c (finish_options): Remove error checking of invalid
4852         value ranges.
4853         (MAX_CODE_ALIGN): Remove.
4854         (MAX_CODE_ALIGN_VALUE): Likewise.
4855         (parse_and_check_align_values): New function.
4856         (check_alignment_argument): Likewise.
4857         (common_handle_option): Use check_alignment_argument.
4858         * opts.h (parse_and_check_align_values): Declare.
4859         * toplev.c (init_alignments): Remove.
4860         (read_log_maxskip): New.
4861         (parse_N_M): Likewise.
4862         (parse_alignment_opts): Likewise.
4863         (backend_init_target): Remove usage of init_alignments.
4864         * toplev.h (parse_alignment_opts): Declare.
4865         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4866         argument.
4867         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4868         * tree.c (cl_option_hasher::equal): New.
4869         * varasm.c: Use new global macros.
4871 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4873         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4874         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4875         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4876         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4877         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4878         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4879         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4880         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4881         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4882         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4883         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4884         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4885         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4887 2018-07-04  Martin Liska  <mliska@suse.cz>
4888             Jonathan Wakely  <jwakely@redhat.com>
4890         * coverage.c: Use correct type.
4891         * doc/invoke.texi: Language correction.
4893 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4895         PR target/85620
4896         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4897         ENDBRANCH for non-tail call which may return via indirect branch.
4898         * doc/extend.texi: Document indirect_return attribute.
4900 2018-07-03  Martin Sebor  <msebor@redhat.com>
4902         PR tree-optimization/86274
4903         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4904         precondition.
4905         (format_floating): Correct handling of infinities and NaNs.
4907 2018-07-03  Martin Sebor  <msebor@redhat.com>
4909         * print-tree.c (print_real_cst): New function.
4910         (print_node_brief): Call it.
4911         (print_node): Ditto.
4913 2018-07-03  Jeff Law  <law@redhat.com>
4915         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4916         into a single pattern.
4918         * config/h8300/h8300.md (ors code_iterator): New.
4919         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4920         a single pattern and single splitter.
4921         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4922         (iorqi3_1, xorqi3_1): Likewise.
4923         (iorqi3, xorqi3 expanders): Similarly.
4925         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4926         (movmd_internal) into a single pattern using the P mode iterator.
4927         (movmd splitters): Similarly.
4928         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4929         (movsd splitters): Similarly.
4931         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4932         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4933         right table based on the size of the operand.
4934         * config/h8300/h8300.md (length_table): Corresponding changes. All
4935         references to "addb", "addw" and "addl" changed to "add".
4936         (btst patterns): Merge two variants into a single pattern.
4937         (tstqi, tsthi): Likewise.
4938         (addhi3_incdec, addsi3_incdec): Likewise.
4939         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4940         (mulhi3, mulsi3): Likewise.
4941         (udivhi3, udivsi3): Likewise.
4942         (divhi3, divsi3): Likewise.
4943         (andorqi3, andorhi3, andorsi3): Likewise.
4945 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4947         PR target/85694
4948         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4949         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4951 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4953         PR tree-optimization/85694
4954         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4955         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4956         UNSPEC_URHADD.
4957         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4958         (<u>avg<mode>3_ceil): New patterns.
4960 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4962         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4963         scan-tree-dump directive.
4964         * gcc.dg/vect/slp-perm-2.c: Likewise.
4965         * gcc.dg/vect/slp-perm-3.c: Likewise.
4966         * gcc.dg/vect/slp-perm-5.c: Likewise.
4967         * gcc.dg/vect/slp-perm-6.c: Likewise.
4968         * gcc.dg/vect/slp-perm-7.c: Likewise.
4969         * gcc.dg/vect/slp-perm-8.c: Likewise.
4971 2018-07-03  Marek Polacek  <polacek@redhat.com>
4973         PR middle-end/86202
4974         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4976 2018-07-03  Richard Biener  <rguenther@suse.de>
4978         PR ipa/86389
4979         * tree-ssa-structalias.c (find_func_clobbers): Properly
4980         handle indirect calls.
4982 2018-07-03  Jeff Law  <law@redhat.com>
4984         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4985         (shifts): New code iterator.
4986         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4987         expander.  Fix HImode handling on H8/SX.
4988         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4989         (subqi3, subhi3, subsi3 expanders): Likewise.
4990         (andqi3, andhi3, andsi3 expanders): Likewise.
4991         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4992         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4993         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4994         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4995         (zero_extendqihi2, zero_extendqisi2): Likewise.
4996         (extendqihi2, extendqisi2): Likewise.
4997         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4998         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4999         (rotlqi3_1, rotlhi3_1): Likewise.
5000         (logicalhi3_sn, logicalsi3_sn): Likewise.
5001         (logicalhi3, logicalsi3): Likewise.
5003 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5005         * tree-vect-patterns.c (vect_recog_rotate_pattern)
5006         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5007         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5008         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5009         type to append_pattern_def_seq instead of creating a stmt_vec_info
5010         directly.
5011         (build_mask_conversion): Likewise.  Remove vinfo argument.
5012         (vect_add_conversion_to_patterm): Likewise, renaming to...
5013         (vect_add_conversion_to_pattern): ...this.
5014         (vect_recog_mask_conversion_pattern): Update call to
5015         build_mask_conversion.  Pass the vector type to
5016         append_pattern_def_seq here too.
5017         (vect_recog_gather_scatter_pattern): Update call to
5018         vect_add_conversion_to_pattern.
5020 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5022         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5023         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5024         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5025         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5026         STMT_VINFO_PATTERN_DEF_SEQ to null here.
5027         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5028         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5029         append_pattern_def_seq instead of new_pattern_def_seq.
5030         (vect_recog_divmod_pattern): Do both of the above.
5031         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5032         is null.
5034 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5036         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5037         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5038         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5039         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5040         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5041         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5042         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5043         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5044         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5045         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5046         parameter with a single stmt_vec_info.
5047         (vect_recog_func_ptr): Likewise.
5048         (vect_recog_gather_scatter_pattern): Likewise, folding in...
5049         (vect_try_gather_scatter_pattern): ...this.
5050         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5051         the stmt_vec_info of the statement to be matched.  Don't clear
5052         STMT_VINFO_RELATED_STMT.
5053         (vect_pattern_recog): Update call accordingly.
5055 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5057         PR tree-optimization/85694
5058         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5059         (uavgM3_ceil): Document new optabs.
5060         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5061         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5062         functions.
5063         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5064         (savg_ceil_optab): New optabs.
5065         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5066         (vect_vect_recog_func_ptrs): Add it.
5067         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5068         constant directly from the associated lhs.
5070 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5072         * tree-vect-patterns.c (vect_split_statement): New function.
5073         (vect_convert_input): Use it to try to split an existing cast.
5075 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5077         * poly-int.h (print_hex): New function.
5078         * dumpfile.h (dump_dec, dump_hex): Declare.
5079         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5080         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5081         min_input_precision, operation_precision and operation_sign.
5082         * tree-vect-patterns.c (vect_get_range_info): New function.
5083         (vect_same_loop_or_bb_p, vect_single_imm_use)
5084         (vect_operation_fits_smaller_type): Delete.
5085         (vect_look_through_possible_promotion): Add an optional
5086         single_use_p parameter.
5087         (vect_recog_over_widening_pattern): Rewrite to use new
5088         stmt_vec_info infomration.  Handle one operation at a time.
5089         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5090         (vect_truncatable_operation_p, vect_set_operation_type)
5091         (vect_set_min_input_precision): New functions.
5092         (vect_determine_min_output_precision_1): Likewise.
5093         (vect_determine_min_output_precision): Likewise.
5094         (vect_determine_precisions_from_range): Likewise.
5095         (vect_determine_precisions_from_users): Likewise.
5096         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5097         (vect_vect_recog_func_ptrs): Put over_widening first.
5098         Add cast_forwprop.
5099         (vect_pattern_recog): Call vect_determine_precisions.
5101 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5103         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5104         statements that have been replaced by further pattern statements.
5105         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5107 2018-07-03  Richard Biener  <rguenther@suse.de>
5109         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5110         always set *dt.  Dump vectype in vectype overload.
5111         * dumpfile.h (dump_gimple_expr): New function.
5112         (dump_gimple_expr_loc): Likewise.
5113         * dumpfile.c (dump_gimple_expr): New function.
5114         (dump_gimple_expr_loc): Likewise.
5116 2018-07-02  Jeff Law  <law@redhat.com>
5118         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5119         the H8/300, H8/300H and H8/S variants into a single pattern.
5120         (movhi_h8300, movqi_h8300hs): Similarly.
5121         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5122         (QHI mode iterator): New.
5124         * config/h8300/h8300.md: Remove trailing whitespace.
5126 2018-07-02  Jim Wilson  <jimw@sifive.com>
5128         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5129         instead of emit_insn for interrupt returns.
5130         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5131         (riscv_sret, riscv_uret): Likewise.
5133 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5135         * pretty-print.c (selftest::test_pp_format): Move save and restore
5136         of quotes to class auto_fix_quotes, and add an instance.
5137         * selftest.c: Include "intl.h".
5138         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5139         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5140         * selftest.h (selftest::auto_fix_quotes): New class.
5142 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
5144         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5145         (aarch64_sve_prepare_conditional_op): Remove.
5146         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5147         Allow aarch64_simd_reg_or_zero as select operand; remove
5148         the aarch64_sve_prepare_conditional_op call.
5149         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5150         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5151         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5152         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5153         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5154         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5155         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5156         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5157         and a splitters to match all of the *_any patterns.
5158         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5160         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5161         (SVE_COND_FP_BINARY_REV): Remove.
5162         (sve_int_op_rev, sve_fp_op_rev): New.
5163         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5164         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5165         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5166         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5167         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5168         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5169         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5170         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5171         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5173         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5174         Remove match_dup 1 from the inner unspec.
5175         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5177         * config/aarch64/aarch64.md (movprfx): New attr.
5178         (length): Default movprfx to 8.
5179         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5180         (*madd<SVE_I>, *msub<SVE_I): Likewise.
5181         (*<su>mul<SVE_I>3_highpart): Likewise.
5182         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5183         (*v<ASHIFT><SVE_I>3): Likewise.
5184         (*<su><MAXMIN><SVE_I>3): Likewise.
5185         (*<su><MAXMIN><SVE_F>3): Likewise.
5186         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5187         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5188         (*div<SVE_F>4): Likewise.
5190 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
5192         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5193         in dump string.
5195 2018-07-02  Richard Biener  <rguenther@suse.de>
5197         PR tree-optimization/86363
5198         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5199         memset argument refers to a non-variable address.
5201 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5203         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5204         {PLUS,MINUS}_EXPR code to...
5205         (adjust_symbolic_bound): ...here,
5206         (combine_bound): ...here,
5207         (set_value_range_with_overflow): ...and here.
5209 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5211         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5212         code...
5213         (extract_range_from_abs_expr): ...here.
5215 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
5217         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5218         -fno-omit-frame-pointer when not optimizing.
5220 2018-07-02  Martin Liska  <mliska@suse.cz>
5222         PR ipa/86279
5223         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5224         (propagate_nothrow): Likewise.
5226 2018-07-02  Martin Liska  <mliska@suse.cz>
5228         PR ipa/86323
5229         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5231 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5233         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5234         function in r262149, changing "loc" param from source_location to
5235         const dump_location_t &.
5236         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5237         declaration, as above.
5239 2018-07-01  Paul Koning  <ni1d@arrl.net>
5241         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5242         -munit-asm, -mgnu-asm, -mdec-asm.
5243         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5244         (pdp11_output_labelref): New.
5245         (pdp11_output_def): New.
5246         (pdp11_output_addr_vec_elt): New.
5247         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
5248         %# and %@ format codes.
5249         (pdp11_option_override): New.
5250         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5251         (pdp11_output_ident): New.
5252         (pdp11_asm_named_section): New.
5253         (pdp11_asm_init_sections): New.
5254         (pdp11_file_start): New.
5255         (pdp11_file_end): New.
5256         (output_ascii): Use .ascii/.asciz for -mdec-asm.
5257         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
5258         %o, like %c but octal.
5259         (pdp11_option_override): New.
5260         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5261         -mdec-asm.
5262         (DATA_SECTION_ASM_OP): Ditto.
5263         (READONLY_DATA_SECTION_ASM_OP): New.
5264         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5265         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5266         (ASM_OUTPUT_LABELREF): Ditto.
5267         (ASM_OUTPUT_DEF): Ditto.
5268         (ASM_OUTPUT_EXTERNAL): New.
5269         (ASM_OUTPUT_SOURCE_FILENAME): New.
5270         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5271         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5272         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
5273         %# and %@ format codes.
5274         * config/pdp11/pdp11.opt (mgnu-asm): New.
5275         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5276         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5277         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5279 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
5281         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5282         dereferencing path[] beyond its length.
5283         (debug_path): New.
5284         (debug_all_paths): New.
5285         (rewire_first_differing_edge): New.
5286         (adjust_paths_after_duplication): New.
5287         (duplicate_thread_path): Call adjust_paths_after_duplication.
5288         Add new argument.
5289         (thread_through_all_blocks): Add new argument to
5290         duplicate_thread_path.
5292 2018-06-30  Jim Wilson  <jimw@sifive.com>
5294         * config/riscv/predicates.md (p2m1_shift_operand): New.
5295         (high_mask_shift_operand): New.
5296         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5297         pattern using p2m1_shift_operand.
5298         (lshsi3_zero_extend_3+2): New combiner pattern using
5299         high_mask_shift_operand.
5301 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5303         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5304         split out from...
5305         (vect_recog_rotate_pattern): ...here.
5306         (vect_convert_input): Try to insert casts of invariants in the
5307         preheader.
5308         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5309         preheader to be empty.
5311 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5313         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5314         vector type.  If given, install it in the new statement's
5315         STMT_VINFO_VECTYPE.
5316         (vect_element_precision): New function.
5317         (vect_unpromoted_value): New struct.
5318         (vect_unpromoted_value::vect_unpromoted_value): New function.
5319         (vect_unpromoted_value::set_op): Likewise.
5320         (vect_look_through_possible_promotion): Likewise.
5321         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5322         (vect_widened_op_tree, vect_convert_input): Likewise.
5323         (vect_convert_inputs, vect_convert_output): Likewise.
5324         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5325         to handle the optional cast of the multiplication result and
5326         vect_widened_op_tree to detect the widened multiplication itself.
5327         Do not require the input and output of promotion casts to have
5328         the same sign, but base the signedness of the operation on the
5329         input rather than the result.  If the pattern includes two
5330         promotions, check that those promotions have the same sign.
5331         Do not restrict the MULT_EXPR handling to a double-width result;
5332         handle quadruple-width results and wider.  Use vect_convert_inputs
5333         to convert the inputs to the common type.
5334         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
5335         to handle the optional cast of the ABS result.  Also allow a sign
5336         change or a sign extension between the ABS and MINUS.
5337         Use vect_widened_op_tree to detect the widened subtraction and use
5338         vect_convert_inputs to convert the inputs to the common type.
5339         (vect_handle_widen_op_by_const): Delete.
5340         (vect_recog_widen_op_pattern): New function.
5341         (vect_recog_widen_mult_pattern): Use it.
5342         (vect_recog_widen_shift_pattern): Likewise.
5343         (vect_recog_widen_sum_pattern): Use
5344         vect_look_through_possible_promotion to handle the promoted
5345         PLUS_EXPR operand.
5347 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5349         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5350         the containing gimple_seq *.
5351         * gimple-iterator.h (gsi_for_stmt): Declare it.
5352         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5353         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5354         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5355         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5356         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5357         checks.
5358         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5359         split out from...
5360         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
5361         statement being replaced is part of an existing pattern
5362         definition sequence, inserting the new pattern statements before
5363         the original one.
5364         (vect_pattern_recog_1): Don't return a bool.  If the statement
5365         is already part of a pattern, instead apply pattern matching
5366         to the pattern definition statements.  Don't clear the
5367         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5368         (vect_pattern_recog): Don't break after the first match;
5369         continue processing the pattern definition statements instead.
5370         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5372 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5374         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5375         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5376         (vect_recog_widen_sum_pattern): Use it.
5378 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5380         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5381         phi is not a pattern statement and has not been replaced by
5382         a pattern statement.
5383         * tree-vect-patterns.c (type_conversion_p): Don't check
5384         STMT_VINFO_IN_PATTERN_P.
5385         (vect_recog_vector_vector_shift_pattern): Likewise.
5386         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5387         the pattern statement rather than the original statement; check
5388         directly for a WIDEN_MULT_EXPR here.
5389         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5390         vect_is_simple_use to return the pattern statement rather
5391         than the original statement; use is_pattern_stmt_p to check
5392         for such a pattern statement.
5393         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5394         to return the pattern statement rather than the original statement;
5395         don't do the same transformation here.
5396         (vect_is_simple_use): If the defining statement has been replaced
5397         by a pattern statement, return the pattern statement instead.
5398         Remove the corresponding (local) transformation from the vectype
5399         overload.
5401 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5403         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5404         end and default to null.
5405         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5406         (vectorizable_reduction): Update calls accordingly, dropping the
5407         gimple ** argument if the passed-back statement isn't needed.
5408         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5409         (vect_recog_rotate_pattern): Likewise.
5410         (vect_recog_mask_conversion_pattern): Likewise.
5411         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5412         (vect_mask_constant_operand_p): Likewise.
5413         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5414         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5415         (get_group_load_store_type, get_load_store_type): Likewise.
5416         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5417         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5418         (vectorizable_conversion, vectorizable_assignment): Likewise.
5419         (vectorizable_shift, vectorizable_operation): Likewise.
5420         (vectorizable_store, vect_is_simple_cond): Likewise.
5421         (vectorizable_condition, vectorizable_comparison): Likewise.
5422         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5423         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5424         and move it to the end.  Cope with null def_stmt_outs.
5426 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5428         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5430 2018-06-29  Jeff Law  <law@redhat.com>
5432         * config/v850/v850.c (v850_legitimate_address_p): Handle large
5433         displacements for TARGET_V850E2V3 and newer.
5434         (TARGET_LRA_P): Remove.  Defaults to LRA now.
5435         * config/v850/v850.md (sign23byte_load): Remove.
5436         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5437         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5439 2018-06-29  Martin Liska  <mliska@suse.cz>
5441         PR lto/85759
5442         * coverage.c (coverage_init): Mangle full path name.
5443         * doc/invoke.texi: Document the change.
5444         * gcov-io.c (mangle_path): New.
5445         * gcov-io.h (mangle_path): Likewise.
5446         * gcov.c (mangle_name): Use mangle_path for path mangling.
5448 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5450         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5451         if starting source register is not even.
5453 2018-06-29  Martin Liska  <mliska@suse.cz>
5455         PR tree-optimization/86263
5456         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5457         Make edge redirection.
5459 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5461         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5462         (dump_scope_depth): New variable.
5463         (get_dump_scope_depth): New function.
5464         (dump_begin_scope): New function.
5465         (dump_end_scope): New function.
5466         * dumpfile.h (get_dump_scope_depth): New declaration.
5467         (dump_begin_scope): New declaration.
5468         (dump_end_scope): New declaration.
5469         (class auto_dump_scope): New class.
5470         (AUTO_DUMP_SCOPE): New macro.
5471         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5472         AUTO_DUMP_SCOPE.
5474 2018-06-29  Richard Biener  <rguenther@suse.de>
5476         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5477         compute_all_dependences succeeds.
5478         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5479         exceed --param loop-max-datarefs-for-datadeps.
5481 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
5483         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5485 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
5487         PR target/86348
5488         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5489         alternative 0 in preferred_for_speed attribute.
5491 2018-06-28  Paul Koning  <ni1d@arrl.net>
5493         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5494         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5495         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5496         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5497         for shift insn patterns.
5499 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5501         * cgraph.c (cgraph_node::get_body): Replace assignments to
5502         "dump_file" with calls to set_dump_file.
5503         * dumpfile.c (alt_dump_file): Make static, and group with...
5504         (alt_flags): ...this definition.
5505         (dumps_are_enabled): New variable.
5506         (refresh_dumps_are_enabled): New function.
5507         (set_dump_file): New function.
5508         (set_alt_dump_file): New function.
5509         (gcc::dump_manager::dump_start): Replace assignments to
5510         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5511         set_alt_dump_file.
5512         (gcc::dump_manager::dump_finish): Likewise.
5513         * dumpfile.h (alt_dump_file): Delete decl.
5514         (dumps_are_enabled): New variable decl.
5515         (set_dump_file): New function decl.
5516         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5517         global.
5518         * tree-nested.c (lower_nested_functions): Replace assignments to
5519         "dump_file" with calls to set_dump_file.
5521 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5523         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5524         goto_locus of each outgoing edge of each basic block.
5526 2018-06-28  Richard Biener  <rguenther@suse.de>
5528         * dwarf2out.c (decl_scope_table): Remove.
5529         (push_decl_scope): Likewise.
5530         (pop_decl_scope): Likewise.
5531         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5532         (gen_struct_or_union_type_die): Likewise.
5533         (gen_tagged_type_die): Likewise.
5534         (dwarf2out_init): Do not initialize decl_scope_table.
5535         (dwarf2out_c_finalize): Do not free it.
5537 2018-06-28  Richard Biener  <rguenther@suse.de>
5539         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5540         deciding whether to not re-use a DIE.
5542 2018-06-28  Richard Biener  <rguenther@suse.de>
5544         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5545         DW_AT_abstract_origin attribute.
5547 2018-06-28  Martin Liska  <mliska@suse.cz>
5549         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5550         Use newly introduced constants.
5551         * tree-switch-conversion.h (struct jump_table_cluster):
5552         Define max_ratio_for_size and max_ratio_for_speed.
5554 2018-06-28  Martin Liska  <mliska@suse.cz>
5556         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5557         Add new checking assert to catch invalid state.
5558         (jump_table_cluster::can_be_handled): Handle single case
5559         clusters.
5560         (jump_table_cluster::is_beneficial): Bail out for such case.
5561         (bit_test_cluster::find_bit_tests):
5562         Add new checking assert to catch invalid state.
5563         (bit_test_cluster::can_be_handled): Handle single case
5564         clusters.
5565         (bit_test_cluster::is_beneficial): Bail out for such case.
5566         (switch_decision_tree::analyze_switch_statement):
5567         Fix comment.
5569 2018-06-28  Martin Liska  <mliska@suse.cz>
5571         * common.opt: Introduce -completion option.
5572         * gcc.c (driver_handle_option): Handle it.
5573         (driver::main): Print completions if completion
5574         is set.
5575         * opt-suggestions.c (option_proposer::get_completions):
5576         New function.
5577         (option_proposer::suggest_completion): Likewise.
5578         (option_proposer::find_param_completions): Likewise.
5579         (verify_autocompletions): Likewise.
5580         (test_completion_valid_options): Likewise.
5581         (test_completion_valid_params): Likewise.
5582         (in_completion_p): Likewise.
5583         (empty_completion_p): Likewise.
5584         (test_completion_partial_match): Likewise.
5585         (test_completion_garbage): Likewise.
5586         (opt_proposer_c_tests): Likewise.
5587         * opt-suggestions.h: Declare new functions.
5588         * opts.c (common_handle_option): Handle OPT__completion_.
5589         * selftest-run-tests.c (selftest::run_tests): Add
5590         opt_proposer_c_tests.
5591         * selftest.c (assert_str_startswith): New.
5592         * selftest.h (assert_str_startswith): Likewise.
5593         (opt_proposer_c_tests): New.
5594         (ASSERT_STR_STARTSWITH): Likewise.
5596 2018-06-28  Martin Liska  <mliska@suse.cz>
5598         * Makefile.in: Add opt-suggestions.o.
5599         * gcc-main.c: Include opt-suggestions.h.
5600         * gcc.c (driver::driver): Likewise.
5601         (driver::~driver): Remove m_option_suggestions.
5602         (driver::build_option_suggestions): Moved to option_proposer.
5603         (driver::suggest_option): Likewise.
5604         (driver::handle_unrecognized_options): Use option_proposer.
5605         * gcc.h (class driver): Add new memver m_option_proposer.
5606         * opt-suggestions.c: New file.
5607         * opt-suggestions.h: New file.
5609 2018-06-28  Martin Liska  <mliska@suse.cz>
5611         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5612         (auto_string_vec::~auto_string_vec): Likewise.
5614 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5616         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5617         prevent_decl_creation_for_types fields up and add reset_location field.
5618         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5619         statement if id->reset_location is true.
5620         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5621         id->reset_location is true.
5622         (copy_phis_for_bb): Force input_location on the arguments if
5623         id->reset_location is true.
5624         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5625         is set on the function to be inlined.
5627 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5629         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5631 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5633         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5634         registers for Pmode.
5635         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5636         hard registers for the clobbered pseudo.
5638 2018-06-27  Paul Koning  <ni1d@arrl.net>
5640         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5641         mutually exclusive options.
5642         * config/pdp11/constraints.md (h): New constraint.
5643         (O): Update definition to match shift code generation.
5644         (D): New constraint.
5645         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5646         (CCFP): Remove.
5647         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5648         function.
5649         (output_jump): Change arguments.
5650         (pdp11_fixed_cc_regs): New function.
5651         (pdp11_cc_mode): Ditto.
5652         (pdp11_expand_shift): Ditto.
5653         (pdp11_assemble_shift): Ditto.
5654         (pdp11_small_shift): Ditto.
5655         (pdp11_branch_cost): Remove.
5656         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5657         from output.
5658         (pdp11_register_move_cost): Update for CC registers.
5659         (pdp11_rtx_costs): Add case for LSHIFTRT.
5660         (pdp11_output_jump): Add CCNZ mode conditional branches.
5661         (notice_update_cc_on_set): Remove.
5662         (pdp11_cc_mode): New function.
5663         (simple_memory_operand): Correct pre/post decrement case.
5664         (no_side_effect_operand): New function.
5665         (pdp11_regno_reg_class): Add CC_REGS class.
5666         (pdp11_fixed_cc_regs): New function.
5667         (pdp11_small_shift): New function.
5668         (pdp11_expand_shift): New function to expand shift insns.
5669         (pdp11_assemble_shift): New function to output shifts.
5670         (pdp11_branch_cost): Remove.
5671         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5672         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5673         (WCHAR_TYPE): Ditto.
5674         (PTRDIFF_TYPE): Ditto.
5675         (ADJUST_INSN_LENGTH): New macro.
5676         (FIXED_REGISTERS): Add CC registers.
5677         (CALL_USED_REGISTERS): Ditto.
5678         (reg_class): Ditto.
5679         (REG_CLASS_NAMES): Ditto.
5680         (REG_CLASS_CONTENTS): Ditto.
5681         (SELECT_CC_MODE): Use new function.
5682         (TARGET_FLAGS_REGNUM): New macro.
5683         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5684         (cc0_reg_rtx): Remove.
5685         (CC_STATUS_MDEP): Remove.
5686         (CC_STATUS_MDEFP_INIT): Remove.
5687         (CC_IN_FPU): Remove.
5688         (NOTICE_UPDATE_CC): Remove.
5689         (REGISTER_NAMES): Add CC registers.
5690         (BRANCH_COST): Change to constant 1.
5691         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5692         handling.
5693         * config/pdp11/pdp11.opt (mbcopy): Remove.
5694         (mbcopy-builtin): Remove.
5695         (mbranch-cheap): Remove.
5696         (mbranch-expensive): Remove.
5697         * config/pdp11/predicates.md (expand_shift_operand): Update to
5698         match shift code generation.
5699         (ccnz_operator): New predicate.
5700         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5701         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5702         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5703         exclusive options.
5704         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5705         description of O constraint.
5707 2018-06-27  Jeff Law  <law@redhat.com>
5708             Austin Law  <austinklaw@gmail.com>
5710         * config/v850/v850.md (addsi3_set_flags): New pattern.
5711         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5712         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5713         (zero_extendhisi2_v850_set_flags): Likewise.
5714         (zero_extendqisi2_v850_set_flags): Likewise.
5715         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5716         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5717         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5719         * config/v850/v850-protos.h (notice_update_cc): Remove.
5720         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5721         (v850_print_operand): Handle 'D' and "d".
5722         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5723         Add handling of arithmetic/logical operations compared against zero.
5724         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5725         Do not look at v850_compare_op, instead get mode from last argument.
5726         (v850_gen_compare): Remove
5727         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5728         after reload for prologue insns.
5729         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5730         patterns.
5731         (construct_save_jarl): Likewise.
5732         (TARGET_FLAGS_REGNUM): Define.
5733         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5734         (NOTICE_UPDATE_CC): Remove.
5735         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5736         than cc0.  Conditionalize on reload_completed.
5737         (cmpsi_insn, setfcc_insn): Likewise.
5738         (tst1 splitter): Turn into define_and_split which sets the flags
5739         after reload.
5740         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5741         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5742         (cstoresf4, cstoredf4): Clobber the flags.
5743         (cmpsi, cmpsf, cmpdf): Remove expanders.
5744         (setf_insn): Remove pattern.
5745         (addsi3): Turn into define_and_split which clobbers the flags after
5746         reload and a suitable pattern (addsi3_clobber_flags) for use after
5747         reload.
5748         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5749         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5750         (ashrsi3, ashrsi3_v850e2): Likewise.
5751         (bins): Clobber the flags.
5752         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5753         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5754         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5755         (call_value_internal_short, call_value_internal_long): Likewise.
5756         (callt_save_interrupt, callt_return_interrupt): Likewise.
5757         (save_interrupt, return_interrupt): Likewise.
5758         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5759         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5760         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5761         (All FP comparisons): Only allow after reload has completed.
5762         (trfsr): Likewise.
5763         (divh, divhu): Tweak output template.
5764         (branch_z_normal, branch_z_invert): Remove
5765         (branch_nz_normal, branch_nz_invert): Likewise.
5766         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5768         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5769         * config/v850/v850.c (notice_update_cc): Remove.
5770         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5771         (CC_NO_CARRY): Likewise.
5772         (NOTICE_UPDATE_CC): Define to nothing.
5773         * config/v850/v850.md: Remove block comment on cc0 handling
5774         Remove "cc" attribute from all patterns.  Remove cc_status handling
5775         from all patterns.  Minor formatting fixes.
5777 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5779         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5780         (cortex-a76.cortex-a55): Likewise.
5781         * config/aarch64/aarch64-tune.md: Regenerate.
5782         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5783         cortex-a76.cortex-a55.
5785 2018-06-27  Jeff Law  <law@redhat.com>
5787         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5788         (MULTILIB_DIRNAMES): Similarly.
5790 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5792         * gimple.h (gimple_return_retbnd): Delete.
5793         (gimple_return_set_retbnd): Likewise.
5794         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5795         gimple_return_set_retbnd.
5796         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5797         gimple_return_retbnd and adjust.
5798         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5799         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5800         Explicitly return NULL in a couple more cases.  Move assertion
5801         on debug statements and remove unreachable code.
5802         (reset_debug_binding): Do not test id->retbnd.
5803         (expand_call_inline): Do not set it.
5805 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5807         * configure.ac: Add --disable-gcov option.
5808         * configure: Regenerate.
5809         * Makefile.in: Honour @enable_gcov@.
5810         * doc/install.texi: Document --disable-gcov.
5812 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5814         * config/arm/arm-cpus.in (cortex-a76): New entry.
5815         (cortex-a76.cortex-a55): Likewise.
5816         * config/arm/arm-tables.opt: Regenerate.
5817         * config/arm/arm-tune.md: Likewise.
5818         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5819         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5820         cortex-a76.cortex-a55.
5822 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5824         PR target/85769
5825         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5827 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5829         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5830         comment.
5831         (EPILOGUE_USES): Likewise.
5833 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5835         * tree-inline.c (remap_location): New function extracted from...
5836         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5837         (copy_phis_for_bb): ...here.  Call remap_location.
5838         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5840 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5842         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5843         unaligned vsx for 16B memset.
5845 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5847         PR target/86285
5848         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5849         ieee128_float_type_node to long_double_type_node unless
5850         TARGET_LONG_DOUBLE_128 is set.
5852 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5854         * cfgloop.c (get_loop_location): Convert return type from
5855         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5856         by implicit construction from rtx_insn *, and using
5857         dump_user_location_t::from_function_decl for the fallback case.
5858         * cfgloop.h (get_loop_location): Convert return type from
5859         location_t to dump_user_location_t.
5860         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5861         dump_printf_loc to pass in a dump_location_t rather than a
5862         location_t, via the gimple stmt.
5863         * coverage.c (get_coverage_counts): Update calls to
5864         dump_printf_loc to pass in dump_location_t rather than a
5865         location_t.
5866         * doc/optinfo.texi (Dump types): Convert example of
5867         dump_printf_loc from taking "locus" to taking "insn".  Update
5868         description of the "_loc" calls to cover dump_location_t.
5869         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5870         "selftest.h".
5871         (dump_user_location_t::dump_user_location_t): New constructors,
5872         from gimple *stmt and rtx_insn *.
5873         (dump_user_location_t::from_function_decl): New function.
5874         (dump_loc): Make static.
5875         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5876         const dump_location_t &.
5877         (dump_generic_expr_loc): Delete.
5878         (dump_printf_loc): Convert param "loc" from location_t to
5879         const dump_location_t &.
5880         (selftest::test_impl_location): New function.
5881         (selftest::dumpfile_c_tests): New function.
5882         * dumpfile.h: Include "profile-count.h".
5883         (class dump_user_location_t): New class.
5884         (struct dump_impl_location_t): New struct.
5885         (class dump_location_t): New class.
5886         (dump_printf_loc): Convert 2nd param from source_location to
5887         const dump_location_t &.
5888         (dump_generic_expr_loc): Delete.
5889         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5890         const dump_location_t &.
5891         * gimple-fold.c (fold_gimple_assign): Update call to
5892         dump_printf_loc to pass in a dump_location_t rather than a
5893         location_t, via the gimple stmt.
5894         (gimple_fold_call): Likewise.
5895         * gimple-loop-interchange.cc
5896         (loop_cand::analyze_iloop_reduction_var): Update for change to
5897         check_reduction_path.
5898         (tree_loop_interchange::interchange): Update for change to
5899         find_loop_location.
5900         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5901         change in return-type of find_loop_location.
5902         (graphite_regenerate_ast_isl): Likewise.
5903         * graphite-optimize-isl.c (optimize_isl): Likewise.
5904         * graphite.c (graphite_transform_loops): Likewise.
5905         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5906         pass in a dump_location_t rather than a location_t, via the
5907         gimple stmt.
5908         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5909         * ipa.c (walk_polymorphic_call_targets): Likewise.
5910         * loop-unroll.c (report_unroll): Convert "locus" param from
5911         location_t to dump_location_t.
5912         (decide_unrolling): Update for change to get_loop_location's
5913         return type.
5914         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5915         location_t to dump_user_location_t.
5916         (grid_find_single_omp_among_assignments_1): Updates calls to
5917         dump_printf_loc to pass in a dump_location_t rather than a
5918         location_t, via the gimple stmt.
5919         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5920         location_t to dump_location_t.  Updates calls to dump_printf_loc
5921         to pass in a dump_location_t rather than a location_t, via the
5922         gimple stmt.
5923         (grid_inner_loop_gridifiable_p): Likewise.
5924         (grid_dist_follows_simple_pattern): Likewise.
5925         (grid_gfor_follows_tiling_pattern): Likewise.
5926         (grid_target_follows_gridifiable_pattern): Likewise.
5927         (grid_attempt_target_gridification): Convert initialization
5928         of local "grid" from memset to zero-initialization; FIXME: does
5929         this require C++11?  Update call to dump_printf_loc to pass in a
5930         optinfo_location rather than a location_t, via the gimple stmt.
5931         * profile.c (read_profile_edge_counts): Updates call to
5932         dump_printf_loc to pass in a dump_location_t rather than a
5933         location_t
5934         (compute_branch_probabilities): Likewise.
5935         * selftest-run-tests.c (selftest::run_tests): Call
5936         dumpfile_c_tests.
5937         * selftest.h (dumpfile_c_tests): New decl.
5938         * tree-loop-distribution.c (pass_loop_distribution::execute):
5939         Update for change in return type of find_loop_location.
5940         * tree-parloops.c (parallelize_loops): Likewise.
5941         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5942         "locus" from location_t to dump_user_location_t.
5943         (canonicalize_loop_induction_variables): Likewise.
5944         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5945         for change in return type of find_loop_location.
5946         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5947         to dump_printf_loc to pass in a dump_location_t rather than a
5948         location_t, via the stmt.
5949         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5950         Likewise.
5951         * tree-vect-loop-manip.c (find_loop_location): Convert return
5952         type from source_location to dump_user_location_t.
5953         (vect_do_peeling): Update for above change.
5954         (vect_loop_versioning): Update for change in type of
5955         vect_location.
5956         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5957         from location_t to dump_user_location_t.
5958         (vect_estimate_min_profitable_iters): Update for change in type
5959         of vect_location.
5960         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5961         location_t to dump_location_t.
5962         (vect_slp_bb): Update for change in type of vect_location.
5963         * tree-vectorizer.c (vect_location): Convert from source_location
5964         to dump_user_location_t.
5965         (try_vectorize_loop_1): Update for change in vect_location's type.
5966         (vectorize_loops): Likewise.
5967         (increase_alignment): Likewise.
5968         * tree-vectorizer.h (vect_location): Convert from source_location
5969         to dump_user_location_t.
5970         (find_loop_location): Convert return type from source_location to
5971         dump_user_location_t.
5972         (check_reduction_path): Convert 1st param from location_t to
5973         dump_user_location_t.
5974         * value-prof.c (check_counter): Update call to dump_printf_loc to
5975         pass in a dump_user_location_t rather than a location_t; update
5976         call to error_at for change in type of "locus".
5977         (check_ic_target): Update call to dump_printf_loc to
5978         pass in a dump_user_location_t rather than a location_t, via the
5979         call_stmt.
5981 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5983         * config/s390/s390.h (enum processor_flags): Do not use
5984         default tune parameter when -march was specified.
5986 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5988         PR target/86314
5989         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5990         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5991         operands.
5993 2018-06-26  Richard Biener  <rguenther@suse.de>
5995         PR tree-optimization/86287
5996         PR bootstrap/86316
5997         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5998         (vect_analyze_loop): Initialize n_stmts.
6000 2018-06-26  Richard Biener  <rguenther@suse.de>
6002         PR middle-end/86271
6003         * fold-const.c (fold_convertible_p): Pointer extension
6004         isn't valid.
6006 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
6008         PR debug/86064
6009         * dwarf2out.c (loc_list_has_views): Adjust comments.
6010         (dw_loc_list): Split single cross-partition range with
6011         nonzero locview.
6013 2018-06-25  Jeff Law  <law@redhat.com>
6015         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6016         on -mbig-switch by default.
6018         * config/v850/predicates.md (const_float_1_operand): Fix match_code
6019         test.
6020         (const_float_0_operand): Remove unused predicate.
6021         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6022         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6023         (recipsf2): New expander.  Original pattern now called
6024         (recipsf2_insn).
6025         (recipdf2, recipdf2_insn): Similarly.
6026         (rsqrtsf2, rsqrtsf2_insn): Similarly
6027         (rsqrtdf2, rsqrtdf2_insn): Similarly
6029 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
6031         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6032         Simplify logic for FreeBSD (twice).
6034 2018-06-25  Martin Sebor  <msebor@redhat.com>
6036         PR tree-optimization/86204
6037         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6038         a strnlen result if it's less than the length of the string.
6040 2018-06-25  Martin Sebor  <msebor@redhat.com>
6042         PR tree-optimization/85700
6043         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6044         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6045         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6047 2018-06-25  Martin Sebor  <msebor@redhat.com>
6049         * doc/extend.texi (Zero-length arrays): Update and clarify.
6051 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
6053         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6054         added IEEE/IBM long double multilib support on PowerPC little
6055         endian Linux systems.
6056         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6057         (MULTILIB_DEFAULTS): Likewise.
6058         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6059         Likewise.
6060         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6061         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6062         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6064 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
6066         PR middle-end/86311
6067         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6068         (REORDER_45): Likewise.
6070 2018-06-25  Jeff Law  <law@redhat.com>
6072         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6073         dividend to 32 bits.  Adjust length.
6074         (udivmodhi4): Cleanup output template.  Fix length.
6076 2018-06-25  Carl Love  <cel@us.ibm.com>
6078         * config/rs6000/vsx.md: Change word selector to prefered location.
6080 2018-06-25  Richard Biener  <rguenther@suse.de>
6082         PR tree-optimization/86304
6083         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6084         epilogue-if-converted loops as well.
6086 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
6088         * lto-section-out.c (lto_begin_section): Do not print section
6089         name for noaddr and unnumbered dumps.
6091 2018-06-25  Richard Biener  <rguenther@suse.de>
6093         * tree-vectorizer.h (struct vec_info_shared): New structure
6094         with parts split out from struct vec_info and loop_nest from
6095         struct _loop_vec_info.
6096         (struct vec_info): Adjust accordingly.
6097         (struct _loop_vec_info): Likewise.
6098         (LOOP_VINFO_LOOP_NEST): Adjust.
6099         (LOOP_VINFO_DATAREFS): Likewise.
6100         (LOOP_VINFO_DDRS): Likewise.
6101         (struct _bb_vec_info): Likewise.
6102         (BB_VINFO_DATAREFS): Likewise.
6103         (BB_VINFO_DDRS): Likewise.
6104         (struct _stmt_vec_info): Add dr_aux member.
6105         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6106         (DR_MISALIGNMENT_UNINITIALIZED): New.
6107         (set_dr_misalignment): Adjust.
6108         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6109         (vect_analyze_loop): Adjust prototype.
6110         (vect_analyze_loop_form): Likewise.
6111         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6112         Compute dependences lazily.
6113         (vect_record_base_alignments): Use shared datarefs/ddrs.
6114         (vect_verify_datarefs_alignment): Likewise.
6115         (vect_analyze_data_refs_alignment): Likewise.
6116         (vect_analyze_data_ref_accesses): Likewise.
6117         (vect_analyze_data_refs): Likewise.
6118         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6119         constructor parameter for shared part.
6120         (vect_analyze_loop_form): Pass in shared part and adjust.
6121         (vect_analyze_loop_2): Pass in storage for the number of
6122         stmts.  Move loop nest finding to the caller.  Compute
6123         datarefs lazily.
6124         (vect_analyze_loop): Pass in shared part.
6125         (vect_transform_loop): Verify shared datarefs are unchanged.
6126         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6127         constructor parameter for shared part.
6128         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6129         (vect_slp_bb): Verify shared datarefs are unchanged before
6130         transform.
6131         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6132         change.
6133         (new_stmt_vec_info): Initialize DR_AUX misalignment to
6134         DR_MISALIGNMENT_UNINITIALIZED.
6135         * tree-vectorizer.c (vec_info::vec_info): Add constructor
6136         parameter for shared part.
6137         (vec_info::~vec_info): Adjust.
6138         (vec_info_shared::vec_info_shared): New.
6139         (vec_info_shared::~vec_info_shared): Likewise.
6140         (vec_info_shared::save_datarefs): Likewise.
6141         (vec_info_shared::check_datarefs): Likewise.
6142         (try_vectorize_loop_1): Construct shared part live for analyses
6143         of a single loop for multiple vector sizes.
6144         * tree-parloops.c (gather_scalar_reductions): Adjust.
6146 2018-06-25  Richard Biener  <rguenther@suse.de>
6148         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6149         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6150         (vect_analyze_data_refs): Remove similar code from here and
6151         simplify accordingly.
6153 2018-06-25  Richard Biener  <rguenther@suse.de>
6155         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6156         for reverse storage order accesses rather than asserting
6157         they cannot happen here.
6159 2018-06-25  Tom de Vries  <tdevries@suse.de>
6161         PR debug/86257
6162         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6163         Use data16 instead of .byte for insn prefix.
6165 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
6167         PR C++/86082
6168         * parser.c (make_char_string_pack): Pass this literal chars
6169         through cpp_interpret_string.
6170         (cp_parser_userdef_numeric_literal): Check the result of
6171         make_char_string_pack.
6173 2018-06-24  Maya Rashish  <coypu@sdf.org>
6175         * ginclude/stddef.h: Simplify conditions around avoiding
6176         re-definition of __size_t.
6178 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6180         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6181         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6183 2018-06-22  Maya Rashish  <coypu@sdf.org>
6185         * doc/invoke.texi (mno-fancy-math-387): Update for changes
6186         made to OpenBSD and NetBSD through the years.
6188 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6190         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6191         behavior of vec_pack (vector double, vector double) to match
6192         behavior of vec_float2 (vector double, vector double).
6194 2018-06-22  Olivier Hainque  <hainque@adacore.com>
6196         * gimplify.c (gimplify_function_tree): Prevent creation
6197         of a trampoline for the address of the current function
6198         passed to entry/exit instrumentation hooks.
6200 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
6202         PR target/86222
6203         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6204         correctly.
6206 2018-06-22  Martin Liska  <mliska@suse.cz>
6208         PR tree-optimization/86263
6209         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6210         Bail out if is_enabled is false.
6211         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6212         New declaration.
6213         (jump_table_cluster::is_enabled): New function.
6215 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6217         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6218         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6219         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6220         (lto_input_ts_binfo_tree_pointers): Likewise.
6221         * tree-streamer-out.c (streamer_write_tree_bitfields,
6222         write_ts_binfo_tree_pointers): Likewise.
6223         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6225 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6227         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6229 2018-06-22  Martin Liska  <mliska@suse.cz>
6231         * symbol-summary.h (get): Make it pure and inline move
6232         functionality from ::get function.
6233         (get): Remove and inline into ::get and ::get_create.
6234         (get_create): Move code from ::get function.
6236 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6238         PR target/85994
6239         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6240         -x assembler-with-cpp.
6242 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6244         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6245         _FILE_OFFSET_BITS=64 for C++.
6247 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
6249         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6250         conversion insn that shows up when pr85657-3.c is compiled using
6251         IEEE 128-bit long double.
6252         (neg<mode>2_internal): Use the correct mode to check whether the
6253         mode is IBM extended.
6254         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6255         multiply and divide external functions from being created more
6256         than once.
6258 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6260         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6261         functions.
6262         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
6263         the edge can be forwarded.
6264         (cfg_layout_merge_blocks): Likewise.
6266 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6268         * except.c (finish_eh_generation): Commit edge insertions only after
6269         the EH edges have been redirected from post-landing to landing pads.
6271 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6273         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6274         create_tmp_var_for to create the FRAME decl.
6275         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6277 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6279         * tree-inline.c (copy_edges_for_bb): Minor tweak.
6280         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6281         debug statement when resetting its value.
6282         (expand_call_inline): Copy the locus of the call onto the assignment
6283         of the return value, if any.  Use local variable in more cases.
6285 2018-06-21  Martin Liska  <mliska@suse.cz>
6287         * ipa-pure-const.c (propagate_nothrow): Use
6288         funct_state_summaries->get.
6289         (dump_malloc_lattice): Likewise.
6290         (propagate_malloc): Likewise.
6292 2018-06-21  Richard Biener  <rguenther@suse.de>
6294         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6295         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6296         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6297         comment.
6298         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6299         BLOCK_ABSTRACT_ORIGIN unconditionally.
6301 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
6303         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6304         deleting it.
6305         * ipa-reference.c (ipa_reference_c_finalize): Delete
6306         ipa_ref_opt_sum_summaries and set it to NULL.
6308 2018-06-21  Tom de Vries  <tdevries@suse.de>
6310         PR tree-optimization/85859
6311         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6312         test with comment from bb_no_side_effects_p.
6314 2018-06-21  Richard Biener  <rguenther@suse.de>
6316         PR tree-optimization/86232
6317         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6318         max for constant niter.
6320 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6322         * config/aarch64/aarch64-simd.md
6323         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6325 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6327         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6328         Make opernads of the unspec commutative.
6330 2018-06-21  Richard Biener  <rguenther@suse.de>
6332         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6333         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6334         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6335         (vect_analyze_data_ref_dependence): Re-order checks to deal with
6336         NULL DR_STEP.
6337         (vect_record_base_alignments): Do not record base alignment
6338         for gathers or scatters.
6339         (vect_compute_data_ref_alignment): Drop return value that is always
6340         true.  Bail out early for gathers or scatters.
6341         (vect_enhance_data_refs_alignment): Bail out early for gathers
6342         or scatters.
6343         (vect_find_same_alignment_drs): Likewise.
6344         (vect_analyze_data_refs_alignment): Remove dead code.
6345         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6346         (vect_analyze_data_refs): For possible gathers or scatters do
6347         not create an alternate DR, just check their possible validity
6348         and mark them.  Adjust DECL_NONALIASED handling to not rely
6349         on DR_BASE_ADDRESS.
6350         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6351         update inits of gathers or scatters.
6352         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6353         Also copy gather/scatter flag to pattern vinfo.
6355 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6357         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6358         behavior of vec_packsu (vector unsigned long long, vector unsigned
6359         long long) to match behavior of vec_packs with same signature.
6361 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
6362             Thomas Schwinge <thomas@codesourcery.com>
6363             Cesar Philippidis  <cesar@codesourcery.com>
6365         * gimplify.c (gimplify_scan_omp_clauses): Add support for
6366         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6367         (gimplify_adjust_omp_clauses): Likewise.
6368         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6369         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6370         (gimplify_omp_target_update): Update handling of acc update and
6371         enter/exit data.
6372         * omp-low.c (install_var_field): Remove unused parameter
6373         base_pointers_restrict.
6374         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6375         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6376         FINALIZE}
6377         (omp_target_base_pointers_restrict_p): Delete.
6378         (scan_omp_target): Update call to scan_sharing_clauses.
6379         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6380         FINALIZE}.
6381         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6382         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6383         (convert_local_omp_clauses): Likewise.
6384         * tree-pretty-print.c (dump_omp_clause): Likewise.
6385         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
6386         FINALIZE}.
6387         (omp_clause_code_name): Likewise.
6389 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6391         PR debug/86194
6392         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6393         be narrowed.
6395         PR tree-optimization/86231
6396         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
6397         anti-range don't overwrite *vr0min before using it to compute *vr0max.
6399 2018-06-20  Tom de Vries  <tdevries@suse.de>
6401         PR tree-optimization/86097
6402         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6403         iv type if signedness of iv type is not the same as that of *nit.
6405 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6407         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
6408         EDGE_EH edges, verify they are all EDGE_EH.
6410 2018-06-20  Maya Rashish  <coypu@sdf.org>
6412         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6414 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6416         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6417         * config/aarch64/aarch64.c (xgene1_tunings): Add
6418         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6419         (aarch64_mode_valid_for_sched_fusion_p):
6420         Allow 16-byte modes.
6421         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6422         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6423         128-bit modes.
6424         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6425         New pattern.
6426         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6427         * config/aarch64/iterators.md (VQ2): New mode iterator.
6429 2018-06-20  Martin Liska  <mliska@suse.cz>
6431         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6432         Change default ratio from 10 to 8.
6434 2018-06-20  Martin Liska  <mliska@suse.cz>
6436         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6437         New.
6438         (bit_test_cluster::find_bit_tests): Likewise.
6439         (switch_decision_tree::analyze_switch_statement): Find clusters.
6440         * tree-switch-conversion.h (struct jump_table_cluster): Document
6441         hierarchy.
6443 2018-06-20  Martin Liska  <mliska@suse.cz>
6445         * tree-switch-conversion.c (switch_conversion::collect):
6446         Record m_uniq property.
6447         (switch_conversion::expand): Bail out for special conditions.
6448         (group_cluster::~group_cluster): New.
6449         (group_cluster::group_cluster): Likewise.
6450         (group_cluster::dump): Likewise.
6451         (jump_table_cluster::emit): New.
6452         (switch_decision_tree::fix_phi_operands_for_edges): New.
6453         (struct case_node): Remove struct.
6454         (jump_table_cluster::can_be_handled): New.
6455         (case_values_threshold): Moved to header.
6456         (reset_out_edges_aux): Likewise.
6457         (jump_table_cluster::is_beneficial): New.
6458         (bit_test_cluster::can_be_handled): Likewise.
6459         (add_case_node): Remove.
6460         (bit_test_cluster::is_beneficial): New.
6461         (case_bit_test::cmp): New.
6462         (bit_test_cluster::emit): New.
6463         (expand_switch_as_decision_tree_p): Remove.
6464         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6465         (fix_phi_operands_for_edge): Likewise.
6466         (switch_decision_tree::analyze_switch_statement): New.
6467         (compute_cases_per_edge): Move ...
6468         (switch_decision_tree::compute_cases_per_edge): ... here.
6469         (try_switch_expansion): Likewise.
6470         (switch_decision_tree::try_switch_expansion): Likewise.
6471         (record_phi_operand_mapping): Likewise.
6472         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6473         (emit_case_decision_tree): Likewise.
6474         (switch_decision_tree::emit): Likewise.
6475         (balance_case_nodes): Likewise.
6476         (switch_decision_tree::balance_case_nodes): Likewise.
6477         (dump_case_nodes): Likewise.
6478         (switch_decision_tree::dump_case_nodes): Likewise.
6479         (emit_jump): Likewise.
6480         (switch_decision_tree::emit_jump): Likewise.
6481         (emit_cmp_and_jump_insns): Likewise.
6482         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6483         (emit_case_nodes): Likewise.
6484         (switch_decision_tree::emit_case_nodes): Likewise.
6485         (conditional_probability): Remove.
6486         * tree-switch-conversion.h (enum cluster_type): New.
6487         (PRINT_CASE): New.
6488         (struct cluster): Likewise.
6489         (cluster::cluster): Likewise.
6490         (struct simple_cluster): Likewise.
6491         (simple_cluster::simple_cluster): Likewise.
6492         (struct group_cluster): Likewise.
6493         (struct jump_table_cluster): Likewise.
6494         (struct bit_test_cluster): Likewise.
6495         (struct min_cluster_item): Likewise.
6496         (struct case_tree_node): Likewise.
6497         (case_tree_node::case_tree_node): Likewise.
6498         (jump_table_cluster::case_values_threshold): Likewise.
6499         (struct case_bit_test): Likewise.
6500         (struct switch_decision_tree): Likewise.
6501         (struct switch_conversion): Likewise.
6502         (switch_decision_tree::reset_out_edges_aux): Likewise.
6504 2018-06-20  Martin Liska  <mliska@suse.cz>
6506         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6507         (hoist_edge_and_branch_if_true): Likewise.
6508         (expand_switch_using_bit_tests_p): Likewise.
6509         (struct case_bit_test): Likewise.
6510         (case_bit_test_cmp): Likewise.
6511         (emit_case_bit_tests): Likewise.
6512         (switch_conversion::switch_conversion): New class.
6513         (struct switch_conv_info): Remove old struct.
6514         (collect_switch_conv_info): More to ...
6515         (switch_conversion::collect): ... this.
6516         (check_range): Likewise.
6517         (switch_conversion::check_range): Likewise.
6518         (check_all_empty_except_final): Likewise.
6519         (switch_conversion::check_all_empty_except_final): Likewise.
6520         (check_final_bb): Likewise.
6521         (switch_conversion::check_final_bb): Likewise.
6522         (create_temp_arrays): Likewise.
6523         (switch_conversion::create_temp_arrays): Likewise.
6524         (free_temp_arrays): Likewise.
6525         (gather_default_values): Likewise.
6526         (switch_conversion::gather_default_values): Likewise.
6527         (build_constructors): Likewise.
6528         (switch_conversion::build_constructors): Likewise.
6529         (constructor_contains_same_values_p): Likewise.
6530         (switch_conversion::contains_same_values_p): Likewise.
6531         (array_value_type): Likewise.
6532         (switch_conversion::array_value_type): Likewise.
6533         (build_one_array): Likewise.
6534         (switch_conversion::build_one_array): Likewise.
6535         (build_arrays): Likewise.
6536         (switch_conversion::build_arrays): Likewise.
6537         (gen_def_assigns): Likewise.
6538         (switch_conversion::gen_def_assigns): Likewise.
6539         (prune_bbs): Likewise.
6540         (switch_conversion::prune_bbs): Likewise.
6541         (fix_phi_nodes): Likewise.
6542         (switch_conversion::fix_phi_nodes): Likewise.
6543         (gen_inbound_check): Likewise.
6544         (switch_conversion::gen_inbound_check): Likewise.
6545         (process_switch): Use the newly created class.
6546         (switch_conversion::expand): New.
6547         (switch_conversion::~switch_conversion): New.
6548         * tree-switch-conversion.h: New file.
6550 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6552         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6553         tree-vect-patterns.c.
6554         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6555         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6556         (vect_recog_sad_pattern): Likewise.
6557         (vect_recog_widen_sum_pattern): Likewise.
6558         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6559         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6560         (vect_recog_rotate_pattern): Likewise.
6561         (vect_recog_mult_pattern): Likewise.
6562         (vect_recog_vector_vector_shift_pattern): Likewise.
6563         (vect_recog_divmod_pattern): Likewise.
6564         (vect_recog_mixed_size_cond_pattern): Likewise.
6565         (vect_recog_bool_pattern): Likewise.
6566         (vect_recog_mask_conversion_pattern): Likewise.
6567         (vect_try_gather_scatter_pattern): Likewise.
6568         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6569         (vect_recog_over_widening_pattern): Likewise.
6570         (vect_recog_gather_scatter_pattern): Likewise.
6571         (vect_recog_func_ptr): Move from tree-vectorizer.h
6572         (vect_vect_recog_func_ptrs): Move further down the file.
6573         (vect_recog_func): Likewise.  Remove the third argument.
6574         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6575         (vect_pattern_recog_1): Expect the pattern function to do any
6576         necessary target tests.  Also expect it to provide a vector type.
6577         Remove the type_in handling.
6579 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6581         * tree-vect-patterns.c (vect_pattern_detected): New function.
6582         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6583         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6584         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6585         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6586         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6587         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6588         (vect_recog_mask_conversion_pattern)
6589         (vect_try_gather_scatter_pattern): Likewise.
6591 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6593         * tree-vect-patterns.c (vect_get_internal_def): New function.
6594         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6595         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6596         (search_type_for_mask_1): Use it.
6598 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6600         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6601         redundant WIDEN_SUM_EXPR handling.
6602         (vect_recog_sad_pattern): Likewise.
6604 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6606         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6607         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6608         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6609         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6610         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6612 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6614         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6615         use the stmt_vec_info of the original bb statement for the
6616         new zero assignment, even if the call is part of a pattern.
6618 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6620         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6621         that the sequence is attached to the original statement rather
6622         than the pattern statement.
6623         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6624         PATTERN_DEF_SEQ from the original statement rather than
6625         the main pattern statement.
6626         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6627         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6628         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6630 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6632         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6633         definition statements before the early exit for statements that aren't
6634         live or relevant.
6635         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6636         split out from...
6637         (vect_transform_loop): ...here.  Process pattern definition
6638         statements without first checking whether the main pattern
6639         statement is live or relevant.
6641 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6643         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6644         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6646 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6648         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6649         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6650         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6651         (expand_block_compare): Change select_block_compare_mode call.
6652         (expand_strncmp_align_check): Use new functions, fix comment.
6653         (emit_final_str_compare_gpr): New function.
6654         (expand_strn_compare): Refactor and clean up code.
6655         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6657 2018-06-19  Tony Reix  <tony.reix@atos.com>
6658             Damien Bergamini  <damien.bergamini@atos.com>
6659             David Edelsohn  <dje.gcc@gmail.com>
6661         * collect2.c (static_obj): New variable.
6662         (static_libs): New variable.
6663         (is_in_list): Uncomment declaration.
6664         (main): Track AIX libraries linked statically.
6665         (is_in_list): Uncomment definition.
6666         (scan_prog_file): Don't add AIX shared libraries initializer
6667         to constructor list if linking statically.
6669 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6671         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6672         constant.
6673         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6675 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6677         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6678         blocks.
6680 2018-06-19  Martin Liska  <mliska@suse.cz>
6682         * config/i386/i386.c (ix86_can_inline_p): Do not use
6683         ipa_fn_summaries::get_create.
6684         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6685         get.
6686         (devirtualization_time_bonus): Likewise.
6687         (ipcp_propagate_stage): Likewise.
6688         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6689         (edge_set_predicate): Likewise.
6690         (evaluate_conditions_for_known_args): Likewise.
6691         (evaluate_properties_for_edge): Likewise.
6692         (ipa_call_summary::reset): Tranform to ...
6693         (ipa_call_summary::~ipa_call_summary): ... this.
6694         (ipa_fn_summary::reset): Transform to ...
6695         (ipa_fn_summary::~ipa_fn_summary): ... this.
6696         (ipa_fn_summary_t::remove): Rename to ...
6697         (ipa_fn_summary_t::remove_callees): ... this.
6698         (ipa_fn_summary_t::duplicate): Use placement new
6699         instead of memory copy.
6700         (ipa_call_summary_t::duplicate): Likewise.
6701         (ipa_call_summary_t::remove): Remove.
6702         (dump_ipa_call_summary): Change get_create to get.
6703         (ipa_dump_fn_summary): Dump only when summary exists.
6704         (analyze_function_body): Use symbol_summary::get instead
6705         of get_create.
6706         (compute_fn_summary): Likewise.
6707         (estimate_edge_devirt_benefit): Likewise.
6708         (estimate_edge_size_and_time): Likewise.
6709         (inline_update_callee_summaries): Likewise.
6710         (remap_edge_change_prob): Likewise.
6711         (remap_edge_summaries): Likewise.
6712         (ipa_merge_fn_summary_after_inlining): Likewise.
6713         (write_ipa_call_summary): Likewise.
6714         (ipa_fn_summary_write): Likewise.
6715         (ipa_free_fn_summary): Likewise.
6716         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6717         (struct ipa_call_summary): Likewise.
6718         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6719         of get_create.
6720         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6721         (estimate_size_after_inlining): Likewise.
6722         (estimate_growth): Likewise.
6723         (growth_likely_positive): Likewise.
6724         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6725         (inline_call): Likewise.
6726         * ipa-inline.c (caller_growth_limits): Likewise.
6727         (can_inline_edge_p): Likewise.
6728         (can_inline_edge_by_limits_p): Likewise.
6729         (compute_uninlined_call_time): Likewise.
6730         (compute_inlined_call_time): Likewise.
6731         (want_inline_small_function_p): Likewise.
6732         (edge_badness): Likewise.
6733         (update_caller_keys): Likewise.
6734         (update_callee_keys): Likewise.
6735         (inline_small_functions): Likewise.
6736         (inline_to_all_callers_1): Likewise.
6737         (dump_overall_stats): Likewise.
6738         (early_inline_small_functions): Likewise.
6739         (early_inliner): Likewise.
6740         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6741         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6742         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6743         * ipa-split.c (execute_split_functions): Likewise.
6744         * symbol-summary.h: Likewise.
6745         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6747 2018-06-19  Richard Biener  <rguenther@suse.de>
6749         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6750         (vectorize_loops): ... here.  Fix dbgcnt handling.
6751         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6753 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6755         PR target/86197
6756         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6757         ieee128 argument takes up only one (vector) register, not two (floating
6758         point) registers.
6760 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6762         * gimplify.c (gimplify_init_constructor): Really never clear for an
6763         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6765 2018-06-19  Richard Biener  <rguenther@suse.de>
6767         PR tree-optimization/86179
6768         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6769         after failed recognition.
6771 2018-06-18  Martin Sebor  <msebor@redhat.com>
6773         PR middle-end/85602
6774         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6775         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6776         Handle integer subtraction.
6777         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6778         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6780 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6782         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6783         param from rtx to rtx_insn *.
6784         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6785         param.
6786         (frv_ifcvt_modify_insn): Likwise.
6787         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6788         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6789         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6790         as_a <rtx_insn *> cast to local "unprotected_region" once
6791         it's been established that it's not NULL or pc_rtx.
6792         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6793         param "sethi" from rtx to rtx_insn *.
6794         (nds32_group_float_insns): Likewise for param "insn".
6795         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6796         param.
6797         (vax_output_int_subtract): Likewise.
6798         * config/vax/vax.c (vax_output_int_add): Likewise for param
6799         "insn".
6800         (vax_output_int_subtract): Likewise.
6801         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6802         (emit_pattern_after): Likewise for param "after".
6803         (emit_insn_after): Likewise.
6804         (emit_jump_insn_after): Likewise.
6805         (emit_call_insn_after): Likewise.
6806         (emit_debug_insn_after): Likewise.
6807         (emit_pattern_before): Likewise for param "before".
6808         (emit_insn_before): Likewise.
6809         (emit_jump_insn_before): Likewise.
6810         * final.c (get_insn_template): Likewise for param "insn", removing
6811         a cast.
6812         * output.h (get_insn_template): Likewise for 2nd param.
6813         * rtl.h (emit_insn_before): Likewise.
6814         (emit_jump_insn_before): Likewise.
6815         (emit_debug_insn_before_noloc): Likewise.
6816         (emit_insn_after): Likewise.
6817         (emit_jump_insn_after): Likewise.
6818         (emit_call_insn_after): Likewise.
6819         (emit_debug_insn_after): Likewise.
6820         (set_insn_deleted): Likewise for param.
6822 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6824         PR target/85358
6825         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6826         floating point modes, so that IFmode is numerically greater than
6827         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6828         to declare the ordering.  This prevents IFmode from being
6829         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6830         machine.  Include rs6000-modes.h to share the fractional values
6831         between genmodes* and the rest of the compiler.
6832         (IFmode): Likewise.
6833         (KFmode): Likewise.
6834         (TFmode): Likewise.
6835         * config/rs6000/rs6000-modes.h: New file.
6836         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6837         meaning of rs6000_long_double_size so that 126..128 selects an
6838         appropriate 128-bit floating point type.
6839         (rs6000_option_override_internal): Likewise.
6840         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6841         (TARGET_LONG_DOUBLE_128): Change the meaning of
6842         rs6000_long_double_size so that 126..128 selects an appropriate
6843         128-bit floating point type.
6844         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6845         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6846         source and destination to match the standard usage.
6847         (truncifkf2): Likewise.
6848         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6849         ISA 2.07 to use an explicit clobber, instead of passing in a
6850         temporary.
6851         (copysign<mode>3_soft): Likewise.
6853 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6855         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6856         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6857         (vect_slp_analyze_instance_dependence): Likewise.
6858         (vect_enhance_data_refs_alignment): Likewise.
6859         (vect_analyze_data_refs_alignment): Likewise.
6860         (vect_slp_analyze_and_verify_instance_alignment
6861         (vect_analyze_data_ref_accesses): Likewise.
6862         (vect_prune_runtime_alias_test_list): Likewise.
6863         (vect_analyze_data_refs): Likewise.
6864         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6865         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6866         (vect_analyze_scalar_cycles_1): Likewise.
6867         (vect_get_loop_niters): Likewise.
6868         (vect_analyze_loop_form_1): Likewise.
6869         (vect_update_vf_for_slp): Likewise.
6870         (vect_analyze_loop_operations): Likewise.
6871         (vect_analyze_loop): Likewise.
6872         (vectorizable_induction): Likewise.
6873         (vect_transform_loop): Likewise.
6874         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6875         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6876         (vect_make_slp_decision): Likewise.
6877         (vect_detect_hybrid_slp): Likewise.
6878         (vect_slp_analyze_operations): Likewise.
6879         (vect_slp_bb): Likewise.
6880         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6881         (vectorizable_bswap): Likewise.
6882         (vectorizable_call): Likewise.
6883         (vectorizable_simd_clone_call): Likewise.
6884         (vectorizable_conversion): Likewise.
6885         (vectorizable_assignment): Likewise.
6886         (vectorizable_shift): Likewise.
6887         (vectorizable_operation): Likewise.
6888         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6890 2018-06-18  Martin Sebor  <msebor@redhat.com>
6892         PR tree-optimization/81384
6893         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6894         * builtins.c (expand_builtin_strnlen): New function.
6895         (expand_builtin): Call it.
6896         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6897         * builtins.def (BUILT_IN_STRNLEN): New.
6898         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6899         Warn for bounds in excess of maximum object size.
6900         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6901         single-value ranges.  Handle strnlen.
6902         (handle_builtin_strlen): Handle strnlen.
6903         (strlen_check_and_optimize_stmt): Same.
6904         * doc/extend.texi (Other Builtins): Document strnlen.
6906 2018-06-18  Maya Rashish  <coypu@sdf.org>
6908         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6909         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6910         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6912         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6913         here to ...
6914         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6916 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6918         * tree.c (escaped_string::escape): Replace cast to char * by
6919         const_cast<char *> (unescaped).
6921 2018-06-18  Nick Clifton  <nickc@redhat.com>
6923         PR 84195
6924         * tree.c (escaped_string): New class.  Converts an unescaped
6925         string into its escaped equivalent.
6926         (warn_deprecated_use): Use the new class to convert the
6927         deprecation message, if present.
6928         (test_escaped_strings): New self test.
6929         (test_c_tests): Add test_escaped_strings.
6930         * doc/extend.texi (deprecated): Add a note that the
6931         deprecation message is affected by the -fmessage-length
6932         option, and that control characters will be escaped.
6933         (#pragma GCC error): Document this pragma.
6934         (#pragma GCC warning): Likewise.
6935         * doc/invoke.texi (-fmessage-length): Document this option's
6936         effect on the #warning and #error preprocessor directives and
6937         the deprecated attribute.
6939 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6941         * tree.c (decl_value_expr_lookup): Revert latest change.
6942         (decl_value_expr_insert): Likewise.
6944 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6946         * gimplify.c (nonlocal_vlas): Delete.
6947         (nonlocal_vla_vars): Likewise.
6948         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6949         referenced VLAs.
6950         (gimplify_body): Do not create and destroy nonlocal_vlas.
6951         * tree-nested.c: Include diagnostic.h.
6952         (use_pointer_in_frame): Tweak.
6953         (lookup_field_for_decl): Add assertion and declare the transformation.
6954         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6955         internal error when the reference is in a wrong context.  Do not
6956         create a debug decl by default.
6957         (note_nonlocal_block_vlas): Delete.
6958         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6959         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6960         create a debug decl by default.
6961         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6962         call is in a wrong context.
6963         (fixup_vla_decls): New function.
6964         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6965         debug variables were created.
6966         * tree.c (decl_value_expr_lookup): Add checking assertion.
6967         (decl_value_expr_insert): Likewise.
6969 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6971         PR middle-end/82479
6972         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6973         * tree-scalar-evolution.c (interpret_expr): Likewise.
6974         (expression_expensive_p): Likewise.
6975         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6976         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6977         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6978         (ssa_defined_by_minus_one_stmt_p): New.
6980 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6982         PR middle-end/64946
6983         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6984         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6985         * dojump.c (do_jump): Likewise.
6986         * expr.c (expand_expr_real_2): Check operand type's sign.
6987         * fold-const.c (const_unop): Handle ABSU_EXPR.
6988         (fold_abs_const): Likewise.
6989         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6990         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6991         (strip_sign_op_1): Likesise.
6992         * match.pd: Add new pattern to generate ABSU_EXPR.
6993         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6994         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6995         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6996         * tree-inline.c (estimate_operator_cost): Likewise.
6997         * tree-pretty-print.c (dump_generic_node): Likewise.
6998         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6999         * tree.def (ABSU_EXPR): New.
7001 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
7003         PR middle-end/86095
7004         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7005         documented as preserved for backward compatibility only.
7006         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7008         PR rtl-optimization/86108
7009         * bb-reorder.c (create_forwarder_block): Renamed to ...
7010         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
7011         jump from new landing pad to the second part.
7012         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7013         Adjust callers.
7015 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
7017         PR middle-end/85878
7018         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7019         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7020         Only call store_expr for halves if the mode is the same.
7022         PR middle-end/86123
7023         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7024         Fix up comment formatting.
7026 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7028         * typed-splay-tree.h (typed_splay_tree::remove): New function.
7029         (typed_splay_tree::closure,
7030         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7031         (typed_splay_tree::typed_splay_tree,
7032         typed_splay_tree::operator =): Declared private.
7033         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7034         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7035         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7036         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7037         typed_splay_tree::splay_tree_splay,
7038         typed_splay_tree::splay_tree_foreach_helper,
7039         typed_splay_tree::splay_tree_insert,
7040         typed_splay_tree::splay_tree_remove,
7041         typed_splay_tree::splay_tree_lookup,
7042         typed_splay_tree::splay_tree_predecessor,
7043         typed_splay_tree::splay_tree_successor,
7044         typed_splay_tree::splay_tree_min,
7045         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7046         (typed_splay_tree::root, typed_splay_tree::comp,
7047         typed_splay_tree::delete_key,
7048         typed_splay_tree::delete_value): New data members.
7049         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7050         typed_splay_tree::remove.
7052 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
7054         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7055         -mginv and -mno-ginv to the assembler.
7056         * config/mips/mips.opt (-mcrc): New option.
7057         (-mginv): Likewise.
7058         * doc/invoke.text (-mcrc): Document.
7059         (-mginv): Likewise.
7061 2018-06-15  Nick Clifton  <nickc@redhat.com>
7063         PR 84195
7064         * tree.c (escaped_string): New class.  Converts an unescaped
7065         string into its escaped equivalent.
7066         (warn_deprecated_use): Use the new class to convert the
7067         deprecation message, if present.
7068         (test_escaped_strings): New self test.
7069         (test_c_tests): Add test_escaped_strings.
7070         * doc/extend.texi (deprecated): Add a note that the
7071         deprecation message is affected by the -fmessage-length
7072         option, and that control characters will be escaped.
7073         (#pragma GCC error): Document this pragma.
7074         (#pragma GCC warning): Likewise.
7075         * doc/invoke.texi (-fmessage-length): Document this option's
7076         effect on the #warning and #error preprocessor directives and
7077         the deprecated attribute.
7079 2018-06-15  Richard Biener  <rguenther@suse.de>
7081         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7082         here, also noting vector size used.
7083         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
7084         size used in MSG_OPTIMIZED_LOCATIONS dump.
7085         (pass_slp_vectorize::execute): Adjust.
7087 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
7089         PR target/85968
7090         * config/arc/arc.c (arc_return_address_register): Fix
7091         if-condition.
7093 2018-06-15  Richard Biener  <rguenther@suse.de>
7095         PR middle-end/86159
7096         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7097         leave useless conversion stripping to force_gimple_operand_gsi.
7098         (gimplify_build2): Likewise.
7099         (gimplify_build1): Likewise.
7101 2018-06-15  Richard Biener  <rguenther@suse.de>
7103         PR middle-end/86076
7104         * tree-cfg.c (move_stmt_op): unshare invariant addresses
7105         before adjusting their block.
7107 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7109         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7110         multilibs for *-*-rtems*.
7111         * config/riscv/t-rtems: New file.
7113 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
7115         PR middle-end/86122
7116         * match.pd ((A +- CST1) +- CST2): Punt if last resort
7117         unsigned_type_for returns NULL.
7119         PR target/85945
7120         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7121         subregs of multi-word pseudos unless the float mode has word size.
7123 2018-06-14  Richard Biener  <rguenther@suse.de>
7125         PR middle-end/86139
7126         * tree-vect-generic.c (build_word_mode_vector_type): Remove
7127         duplicate and harmful type_hash_canon.
7128         * tree.c (type_hash_canon): Assert we didn't find ourselves.
7130 2018-06-14  Richard Biener  <rguenther@suse.de>
7132         PR ipa/86124
7133         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7134         NULL cgraph_node.
7136 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7138         * config/rtems.h (STDINT_LONG32): Define.
7140 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
7141             Prachi Godbole  <prachi.godbole@imgtec.com>
7143         * config/mips/mips-cpus.def: Define P6600.
7144         * config/mips/mips-tables.opt: Regenerate.
7145         * config/mips/mips.c (mips_ucbranch_type): New enum.
7146         (mips_rtx_cost_data): Add support for P6600.
7147         (mips_issue_rate): Likewise.
7148         (mips_multipass_dfa_lookahead): Likewise.
7149         (mips_avoid_hazard): Likewise.
7150         (mips_reorg_process_insns): Likewise.
7151         (mips_classify_branch_p6600): New function.
7152         * config/mips/mips.h (TUNE_P6600): New define.
7153         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7154         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7155         * config/mips/mips.md: Include p6600.md.
7156         (processor): Add p6600.
7157         * config/mips/p6600.md: New file.
7158         * doc/invoke.texi: Add p6600 to supported architectures.
7160 2018-06-13  Martin Sebor  <msebor@redhat.com>
7162         PR tree-optimization/86114
7163         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7164         of integer types.
7165         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7167 2018-06-13  Richard Biener  <rguenther@suse.de>
7169         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7170         Properly set vector type of the intermediate stmt.
7171         * tree-vect-stmts.c (vectorizable_operation): The destination
7172         var always has vectype_out type.
7174 2018-06-13  Jeff Law  <law@redhat.com>
7176         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7177         integer 0 for argument to print_rtl_with_bb.
7178         (rl78_reorg): Likewise.
7180 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
7182         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7183         from rtx to rtx_insn *.
7184         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7185         "label".
7186         (add_sched_insns_for_speculation): Likewise for local "target",
7187         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7188         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7189         from rtx_insn ** to rtx_code_label **.
7190         (reorg_emit_nops): Likewise.
7191         (c6x_reorg): Likewise for local "call_labels".
7192         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7193         rtx to rtx_insn *.
7194         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7195         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7196         the loops over LABEL_REFS.
7197         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7198         braf_label.
7199         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7200         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7201         (split_branches): Strengthen local "olabel" from rtx to
7202         rtx_insn *, adding a safe_as_a cast.
7203         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7204         to "rtx_insn *".
7205         (add_insn_after): Likewise for first two params.
7206         (add_insn_before): Likewise.
7207         (remove_insn): Likewise for param.
7208         (emit_pattern_before_noloc): Likewise for second and third params.
7209         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7210         (emit_call_insn_before_noloc): Likewise.
7211         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7212         to "rtx_insn *".
7213         (emit_barrier_before): Likewise.
7214         (emit_label_before): Strengthen "label" param from "rtx" to
7215         "rtx_code_label *".  Strengthen "before" param from "rtx" to
7216         "rtx_insn *".
7217         (emit_insn_after_1): Strengthen "after" param from "rtx" to
7218         "rtx_insn *".
7219         (emit_pattern_after_noloc): Likewise.
7220         (emit_insn_after_noloc): Likewise.
7221         (emit_jump_insn_after_noloc): Likewise.
7222         (emit_call_insn_after_noloc): Likewise.
7223         (emit_debug_insn_after_noloc): Likewise.
7224         (emit_barrier_after): Likewise.
7225         (emit_label_after): Likewise for both params.
7226         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
7227         "loc" param from "int" to "location_t".
7228         (emit_insn_after_setloc): Likewise.
7229         (emit_jump_insn_after_setloc): Likewise.
7230         (emit_call_insn_after_setloc): Likewise.
7231         (emit_debug_insn_after_setloc): Likewise.
7232         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
7233         "loc" param from "int" to "location_t".
7234         (emit_pattern_before): Convert NULL_RTX to NULL.
7235         (emit_insn_before_setloc): Convert "loc" param from "int" to
7236         "location_t".
7237         (emit_jump_insn_before_setloc): Likewise.
7238         (emit_call_insn_before_setloc): Likewise.
7239         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7240         rtx_insn *.  Convert "loc" param from "int" to "location_t".
7241         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7242         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7243         Convert 3rd param from "int" to "location_t".
7244         (emit_barrier_before, emit_barrier_after, next_real_insn):
7245         Strengthen param from rtx to rtx_insn *.
7246         (emit_label_before): Strengthen 1st param from "rtx" to
7247         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
7248         "rtx_insn *".
7249         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7250         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7251         Strengthen 2nd param from "rtx" to "rtx_insn *".
7252         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7253         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7254         Likewise. Convert 3rd param from "int" to "location_t".
7255         (emit_label_after): Strengthen 1st param from "rtx" to
7256         "rtx_code_label *".
7257         (next_real_insn, remove_insn): Strengthen param from "rtx" to
7258         "rtx_insn *".
7259         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7260         from "rtx" to "rtx_insn *".
7262 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
7264         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7265         bodies streamed in with -Q.
7266         * dumpfile.c (dump_files): Add lto-stream-out dump file.
7267         * dumpfile.h (tree_dump_index): Add lto_stream_out.
7268         * gimple-streamer-out.c: Include gimple-pretty-print.h
7269         (output_bb): Dump stmts streamed.
7270         * lto-section-out.c: Include print-tree.h
7271         (lto_begin_section): Dump sections created.
7272         (lto_output_decl_index): Dump decl encoded.
7273         * lto-streamer-out.c: Include print-tree.h
7274         (create_output_block): Dump output block created.
7275         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7276         (output_function): Dump function output.
7277         (output_constructor): Dump constructor streamed.
7278         (write_global_stream): Output indexes encoded.
7279         (produce_asm_for_decls): Dump streams encoded.
7280         * lto-streamer.c (streamer_dump_file): New global var.
7281         * lto-streamer.h (streamer_dump_file): Declare.
7282         * passes.c (ipa_write_summaries): Initialize streamer dump.
7283         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7284         in.
7286 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7288         PR target/86048
7289         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7290         offsets for register save directives.  Emit a second batch of save
7291         directives, if need be, when the function accesses prior frames.
7293 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7295         * config/arc/fpu.md (fmasf4): Force operand to register.
7296         (fnmasf4): Likewise.
7298 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7300         * config/arc/arc-protos.h (arc_pad_return): Remove.
7301         * config/arc/arc.c (machine_function): Remove force_short_suffix
7302         and size_reason.
7303         (arc_print_operand): Adjust printing of '&'.
7304         (arc_verify_short): Remove conditional printing of short suffix.
7305         (arc_final_prescan_insn): Remove reference to size_reason.
7306         (pad_return): New function.
7307         (arc_reorg): Call pad_return.
7308         (arc_pad_return): Remove.
7309         (arc_init_machine_status): Remove reference to force_short_suffix.
7310         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7311         (attr length): When attribute iscompact is true force to 2
7312         regardless; in the case of maybe check if we want to force the
7313         instruction to have 4 bytes length.
7314         (nopv): Change it to generate 4 byte long nop as well.
7315         (blockage): New pattern.
7316         (simple_return): Remove call to arc_pad_return.
7317         (p_return_i): Likewise.
7319 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7321         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7323 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7325         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7326         ARC cores.
7328 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7330         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7331         for ARC700 and ARCv2.
7333 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
7335         PR target/86076
7336         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7337         operands[2] instead of operands[1].
7340 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7342         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7343         case, check whether the outer register overlaps an unallocatable
7344         register, not just whether it fits the required class.
7346 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7348         * poly-int.h (can_div_trunc_p): Add new overload in which all values
7349         are poly_ints.
7350         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7351         (memrefs_conflict_p): Likewise.
7352         (init_alias_analysis): Likewise.
7353         * cfgexpand.c (expand_debug_expr): Likewise.
7354         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7355         * cse.c (fold_rtx): Likewise.
7356         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7357         * expr.c (emit_block_move_hints): Likewise.
7358         (clear_storage_hints, push_block, emit_push_insn): Likewise.
7359         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7360         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7361         (emit_group_store): Likewise.
7362         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
7363         to read the PRE/POST_MODIFY increment.
7364         * calls.c (store_one_arg): Use strip_offset.
7365         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7366         poly_int_rtx_p.
7367         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7368         by a VEC_SELECT.
7369         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7370         (simplify_binary_operation_1): Extend CONST_INT handling to
7371         poly_int_rtx_p.
7372         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7373         than a HOST_WIDE_INT.
7374         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7375         poly_int64.
7376         (adjust_mems, add_stores): Update accodingly.
7377         (vt_canonicalize_addr): Track polynomial offsets.
7378         (emit_note_insn_var_location): Likewise.
7379         (vt_add_function_parameter): Likewise.
7380         (vt_initialize): Likewise.
7382 2018-06-12  Jeff Law  <law@redhat.com>
7384         * config.gcc (alpha*-*-freebsd*): Remove.
7385         * config/alpha/freebsd.h: Remove.
7387 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
7389         PR other/69968
7390         * spellcheck-tree.c (levenshtein_distance): Rename to...
7391         (get_edit_distance): ...this, and update for underlying renaming.
7392         * spellcheck-tree.h (levenshtein_distance): Rename to...
7393         (get_edit_distance): ...this.
7394         * spellcheck.c (levenshtein_distance): Rename to...
7395         (get_edit_distance): ...this.  Convert from Levenshtein distance
7396         to Damerau-Levenshtein distance by supporting transpositions of
7397         adjacent characters.  Rename "v1" to "v_next" and "v0" to
7398         "v_one_ago".
7399         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7400         (selftest::test_edit_distance_unit_test_oneway): ...this, and
7401         update for underlying renaming.
7402         (selftest::levenshtein_distance_unit_test): Rename to...
7403         (selftest::test_get_edit_distance_unit): ...this, and update for
7404         underlying renaming.
7405         (selftest::test_find_closest_string): Add example from PR 69968
7406         where transposition helps
7407         (selftest::test_metric_conditions): Update for renaming.
7408         (selftest::test_metric_conditions): Likewise.
7409         (selftest::spellcheck_c_tests): Likewise.
7410         * spellcheck.h (levenshtein_distance): Rename both overloads to...
7411         (get_edit_distance): ...this.
7412         (best_match::consider): Update for renaming.
7414 2018-06-12  Martin Sebor  <msebor@redhat.com>
7416         PR tree-optimization/85259
7417         * builtins.c (compute_objsize): Handle constant offsets.
7418         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7419         true iff a warning has been issued.
7420         * gimple.h (gimple_nonartificial_location): New function.
7421         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7422         gimple_nonartificial_location and handle -Wno-system-headers.
7423         (handle_builtin_stxncpy): Same.
7425 2018-06-12  Martin Sebor  <msebor@redhat.com>
7427         PR c/85931
7428         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7430 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
7432         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7433         BUILTIN_VEC_XST entries for pointer to double and long long.
7435 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
7437         PR target/85990
7438         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7439         Update comments.
7440         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7441         Likewise.
7443 2018-06-12  Martin Liska  <mliska@suse.cz>
7445         * doc/options.texi: Document IntegerRange.
7447 2018-06-12  Martin Liska  <mliska@suse.cz>
7449         * config/i386/i386.opt: Make MPX-related options as Deprecated.
7450         * opt-functions.awk: Handle Deprecated flag.
7451         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7452         and report error.
7453         (read_cmdline_option): Report warning for a deprecated option.
7454         * opts.h (struct cl_option): Add new field cl_deprecated.
7455         (CL_ERR_DEPRECATED): New.
7457 2018-06-12  Martin Liska  <mliska@suse.cz>
7459         * doc/options.texi: Document Deprecated option flag.
7461 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7463         * config/arc/arc-arch.h (arc_extras): New enum.
7464         (arc_cpu_t):Add field extra.
7465         (arc_cpu_types): Consider the extras.
7466         * config/arc/arc-cpus.def: Add extras info.
7467         * config/arc/arc-opts.h (processor_type): Consider extra field.
7468         * config/arc/arc.c (arc_override_options): Handle extra field.
7470 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7472         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7473         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7474         field.
7475         * config/arc/arc.c (arc_init): Update pic warning.
7476         (irq_range): Update irq range parsing warnings.
7477         (arc_override_options): Update various warning messages.
7478         (arc_handle_aux_attribute): Likewise.
7480 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
7482         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7484 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7486         * doc/sourcebuild.texi: Document usage of line number 0 in verify
7487         compiler messages directives.
7489 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7491         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7492         * config/mips/mips-tables.opt: Regenerate.
7493         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7494         mips64r6.
7495         * doc/invoke.texi: Document -march=i6500.
7497 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7499         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7500         (i6400_gpmul): Add cpu_unit.
7501         (i6400_gpdiv): Likewise.
7502         (i6400_msa_add_d): Update reservations.
7503         (i6400_msa_int_add) Likewise.
7504         (i6400_msa_short_logic3) Likewise.
7505         (i6400_msa_short_logic2) Likewise.
7506         (i6400_msa_short_logic) Likewise.
7507         (i6400_msa_move) Likewise.
7508         (i6400_msa_cmp) Likewise.
7509         (i6400_msa_short_float2) Likewise.
7510         (i6400_msa_div_d) Likewise.
7511         (i6400_msa_long_logic1) Likewise.
7512         (i6400_msa_long_logic2) Likewise.
7513         (i6400_msa_mult) Likewise.
7514         (i6400_msa_long_float2) Likewise.
7515         (i6400_msa_long_float4) Likewise.
7516         (i6400_msa_long_float5) Likewise.
7517         (i6400_msa_long_float8) Likewise.
7518         (i6400_fpu_fadd): Include frint type.
7519         (i6400_fpu_store): New define_insn_reservation.
7520         (i6400_fpu_load): Likewise.
7521         (i6400_fpu_move): Likewise.
7522         (i6400_fpu_fcmp): Likewise.
7523         (i6400_fpu_fmadd): Likewise.
7524         (i6400_int_mult): Include imul3nc type and update reservation.
7525         (i6400_int_div): Include idiv3 type and update reservation.
7526         (i6400_int_load): Update to check type not move_type.
7527         (i6400_int_store): Likewise.
7528         (i6400_int_prefetch): Set zero latency.
7530 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7532         * gcc.c: Document new %@{...} sequence.
7533         (LINK_COMMAND_SPEC): Use it for the -L switches.
7534         (cpp_unique_options): Use it for the -I switches.
7535         (at_file_argbuf): New global variable.
7536         (in_at_file): Likewise.
7537         (alloc_args): Create at_file_argbuf.
7538         (clear_args): Truncate at_file_argbuf.
7539         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7540         (open_at_file): New function.
7541         (close_at_file): Likewise.
7542         (create_at_file): Delete.
7543         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7544         <'o'>: Likewise.
7545         <'@'>: New case.
7546         (validate_switches_from_spec): Deal with %@{...} sequence.
7547         (validate_switches): Likewise.
7548         (driver::finalize): Call clear_args.
7550 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7552         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7554 2018-06-11  Martin Sebor  <msebor@redhat.com>
7556         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7557         (Wno-class-memaccess): Add @opindex.
7558         (Wno-templates, Wno-multiple-inheritance): Same.
7559         (Wno-virtual-inheritance, Wno-namespaces): Same.
7560         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7561         (Wno-format-overflow, Wno-format-truncation): Same.
7562         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7563         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7564         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7565         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7566         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7567         (Wno-misspelled-isr): Same.
7569 2018-06-11  Martin Sebor  <msebor@redhat.com>
7571         * PR tree-optimization/86083
7572         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7574 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7576         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7578 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7580         PR target/85755
7581         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7582         on the correct operand.
7583         (*movdi_internal64): Ditto.
7585 2018-06-11  Martin Liska  <mliska@suse.cz>
7587         PR tree-optimization/86089
7588         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7590 2018-06-11  Julia Koval  <julia.koval@intel.com>
7592         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7593         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7594         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7596 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7598         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7599         for Ada with strict dwarf2.
7601 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7603         PR target/85755
7604         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7605         addresses.
7607 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7609         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7611 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7613         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7614         TARGET_ELF.
7616 2018-06-08  Martin Liska  <mliska@suse.cz>
7618         * tree-cfg.h (debug_function): Fix argument type to match
7619         implementation.
7621 2018-06-08  Martin Liska  <mliska@suse.cz>
7623         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7624         Remove usage of MPX-related (and removed) fields.
7625         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7627 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7629         * cfg.c (debug): Use TDF_NONE rather than 0.
7630         * cfghooks.c (debug): Likewise.
7631         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7632         (struct dump_option_value_info): Convert to...
7633         (struct kv_pair): ...this template type.
7634         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7635         rather than 0.
7636         (optinfo_verbosity_options): Likewise.
7637         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7638         OPTGROUP_NONE.
7639         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7640         than int for "optgroup_flags" param.
7641         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7642         "dump_kind" param.
7643         (dump_dec): Likewise.
7644         (dump_finish): Use TDF_NONE rather than 0.
7645         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7646         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7647         than 0.  Update for change to option_ptr.
7648         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7649         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7650         0.  Update for changes to optinfo_verbosity_options and
7651         optgroup_options.
7652         (opt_info_switch_p): Convert optgroup_flags from int to
7653         optgroup_flags_t.
7654         (dump_basic_block): Use dump_flags_t rather than int
7655         for "dump_kind" param.
7656         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7657         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7658         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7659         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7660         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7661         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7662         TDF_NONE): Convert from macros to...
7663         (enum dump_flag): ...this new enum.
7664         (dump_flags_t): Update to use enum.
7665         (operator|, operator&, operator~, operator|=, operator&=):
7666         Implement for dump_flags_t.
7667         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7668         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7669         Convert from macros to...
7670         (enum optgroup_flag): ...this new enum.
7671         (optgroup_flags_t): New typedef.
7672         (operator|, operator|=): Implement for optgroup_flags_t.
7673         (struct dump_file_info): Convert field "alt_flags" to
7674         dump_flags_t.  Convert field "optgroup_flags" to
7675         optgroup_flags_t.
7676         (dump_basic_block): Use dump_flags_t rather than int for param.
7677         (dump_generic_expr_loc): Likewise.
7678         (dump_dec): Likewise.
7679         (dump_register): Convert param "optgroup_flags" to
7680         optgroup_flags_t.
7681         (opt_info_enable_passes): Likewise.
7682         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7683         than 0.
7684         * gimple-pretty-print.c (debug): Likewise.
7685         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7686         (merged_store_group::apply_stores): Likewise.
7687         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7688         * gimple.c (verify_gimple_pp): Likewise.
7689         * graphite-poly.c (print_pbb_body): Likewise.
7690         * passes.c (pass_manager::register_one_dump_file): Convert
7691         local "optgroup_flags" to optgroup_flags_t.
7692         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7693         (debug): Likewise.
7694         (debug_body): Likewise.
7695         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7696         to optgroup_flags_t.
7697         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7698         than 0.
7699         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7700         (convert_mult_to_fma): Likewise.
7701         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7702         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7703         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7704         "dump_kind" to dump_flags_t.
7706 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7708         * config/rs6000/rs6000.c (min, max): Delete.
7710 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7712         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7713         -mabi=spe and -mabi=no-spe.
7715 2018-06-08  Martin Liska  <mliska@suse.cz>
7717         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7718         where we expect an existing summary.
7720 2018-06-08  Martin Liska  <mliska@suse.cz>
7722         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7723         * ipa-inline.h (estimate_edge_growth): Likewise.
7725 2018-06-08  Martin Liska  <mliska@suse.cz>
7727         * cgraph.c (function_version_hasher::hash): Use
7728         cgraph_node::get_uid ().
7729         (function_version_hasher::equal):
7730         * cgraph.h (cgraph_node::get_uid): New method.
7731         * ipa-inline.c (update_caller_keys): Use
7732         cgraph_node::get_uid ().
7733         (update_callee_keys): Likewise.
7734         * ipa-utils.c (searchc): Likewise.
7735         (ipa_reduced_postorder): Likewise.
7736         * lto-cgraph.c (input_node): Likewise.
7737         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7738         * symbol-summary.h (symtab_insertion): Likewise.
7739         (symtab_removal): Likewise.
7740         (symtab_duplication): Likewise.
7741         * tree-pretty-print.c (dump_function_header): Likewise.
7742         * tree-sra.c (convert_callers_for_node): Likewise.
7744 2018-06-08  Martin Liska  <mliska@suse.cz>
7746         * cgraph.c (symbol_table::create_edge): Always assign a new
7747         unique number.
7748         (symbol_table::free_edge): Do not recycle numbers.
7749         * cgraph.h (cgraph_edge::get): New method.
7750         * symbol-summary.h (symtab_removal): Use it.
7751         (symtab_duplication): Likewise.
7752         (call_summary::hashable_uid): Remove.
7754 2018-06-08  Martin Liska  <mliska@suse.cz>
7756         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7757         (initialize_growth_caches): Remove.
7758         (free_growth_caches): Likewise.
7759         (do_estimate_edge_time): Use edge_growth_cache.
7760         (do_estimate_edge_size): Likewise.
7761         (do_estimate_edge_hints): Likewise.
7762         * ipa-inline.c (reset_edge_caches): Likewise.
7763         (recursive_inlining): Likewise.
7764         (inline_small_functions): Likewise.
7765         * ipa-inline.h (initialize_growth_caches): Remove.
7766         (estimate_edge_size): Likewise.
7767         (estimate_edge_time): Likewise.
7768         (estimate_edge_hints): Likewise.
7769         (reset_edge_growth_cache): Likewise.
7770         * symbol-summary.h (call_summary::remove): New method.
7772 2018-06-08  Martin Liska  <mliska@suse.cz>
7774         * ipa-cp.c (class edge_clone_summary): New summary.
7775         (grow_edge_clone_vectors): Remove.
7776         (ipcp_edge_duplication_hook): Remove.
7777         (class edge_clone_summary_t): New call_summary class.
7778         (ipcp_edge_removal_hook): Remove.
7779         (edge_clone_summary_t::duplicate): New function.
7780         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7781         (create_specialized_node): Likewise.
7782         (ipcp_driver): Initialize edge_clone_summaries and do not
7783         register hooks.
7785 2018-06-08  Martin Liska  <mliska@suse.cz>
7787         * symbol-summary.h (get): New function.
7788         (call_summary::m_initialize_when_cloning): New class member.
7790 2018-06-08  Martin Liska  <mliska@suse.cz>
7792         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7793         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7794         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7795         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7796         (remove_cgraph_node_from_order): Use the removed_nodes set.
7797         (do_per_function_toporder): Likwise.
7798         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7799         instead of summary_uid.
7800         (symtab_removal): Likewise.
7801         (symtab_duplication): Likewise.
7803 2018-06-08  Martin Liska  <mliska@suse.cz>
7805         * ipa-cp.c (ipcp_store_bits_results): Use
7806         ipcp_transformation_sum.
7807         (ipcp_store_vr_results): Likewise.
7808         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7809         to ...
7810         (ipcp_transformation_initialize): ... this.
7811         (ipa_set_node_agg_value_chain):
7812         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7813         (write_ipcp_transformation_info): Likewise.
7814         (read_ipcp_transformation_info): Likewise.
7815         (ipcp_update_bits): Likewise.
7816         (ipcp_update_vr): Likewise.
7817         (ipcp_transform_function): Likewise.
7818         * ipa-prop.h: Rename ipcp_transformation_summary to
7819         ipcp_transformation.
7820         (class ipcp_transformation_t): New function summary.
7821         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7822         (ipa_get_agg_replacements_for_node): Likewise.
7824 2018-06-08  Martin Liska  <mliska@suse.cz>
7826         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7827         of struct.
7828         (class funct_state_summary_t): New function_summary class.
7829         (has_function_state): Remove.
7830         (get_function_state): Likewise.
7831         (set_function_state): Likewise.
7832         (add_new_function): Likewise.
7833         (funct_state_summary_t::insert): New function.
7834         (duplicate_node_data): Remove.
7835         (remove_node_data): Remove.
7836         (funct_state_summary_t::duplicate): New function.
7837         (register_hooks): Create new funct_state_summaries.
7838         (pure_const_generate_summary): Use it.
7839         (pure_const_write_summary): Likewise.
7840         (pure_const_read_summary): Likewise.
7841         (propagate_pure_const): Likewise.
7842         (propagate_nothrow): Likewise.
7843         (dump_malloc_lattice): Likewise.
7844         (propagate_malloc): Likewise.
7845         (execute): Do not register hooks, just remove summary
7846         instead.
7847         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7848         constructor.
7850 2018-06-08  Martin Liska  <mliska@suse.cz>
7852         * ipa-reference.c (remove_node_data): Remove.
7853         (duplicate_node_data): Likewise.
7854         (class ipa_ref_var_info_summary_t): New class.
7855         (class ipa_ref_opt_summary_t): Likewise.
7856         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7857         (get_reference_optimization_summary): Use
7858         ipa_ref_opt_sum_summaries.
7859         (set_reference_vars_info): Remove.
7860         (set_reference_optimization_summary): Likewise.
7861         (ipa_init): Create summaries.
7862         (init_function_info): Use function summary.
7863         (ipa_ref_opt_summary_t::duplicate): New function.
7864         (ipa_ref_opt_summary_t::remove): New function.
7865         (get_read_write_all_from_node): Fix GNU coding style.
7866         (propagate): Use function summary.
7867         (write_node_summary_p): Fix GNU coding style.
7868         (stream_out_bitmap): Likewise.
7869         (ipa_reference_read_optimization_summary): Use function summary.
7870         (ipa_reference_c_finalize): Do not release hooks.
7872 2018-06-08  Martin Liska  <mliska@suse.cz>
7874         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7875         (analyze_function_body): Extract multiple calls of get_create.
7876         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7877         * ipa-inline.c (recursive_inlining): Use ::get method.
7878         * ipa-inline.h (estimate_edge_growth): Likewise.
7880 2018-06-08  Martin Liska  <mliska@suse.cz>
7882         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7883         HSA_INVALID.
7884         (hsa_function_summary::hsa_function_summary): Use the new enum
7885         value.
7886         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7887         * hsa-gen.c (hsa_get_host_function): Likewise.
7888         (get_brig_function_name): Likewise.
7889         * ipa-hsa.c (process_hsa_functions): Likewise.
7890         (ipa_hsa_write_summary): Likewise.
7891         * symbol-summary.h (symtab_duplication): Use ::get function/
7892         (get): New function.
7894 2018-06-08  Martin Liska  <mliska@suse.cz>
7896         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7897         of get.
7898         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7899         (hsa_register_kernel): Likewise.
7900         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7901         * hsa-gen.c (hsa_get_host_function): Likewise.
7902         (get_brig_function_name): Likewise.
7903         (generate_hsa): Likewise.
7904         (pass_gen_hsail::execute): Likewise.
7905         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7906         (devirtualization_time_bonus): Likewise.
7907         (ipcp_propagate_stage): Likewise.
7908         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7909         (edge_set_predicate): Likewise.
7910         (evaluate_conditions_for_known_args): Likewise.
7911         (evaluate_properties_for_edge): Likewise.
7912         (ipa_fn_summary::reset): Likewise.
7913         (ipa_fn_summary_t::duplicate): Likewise.
7914         (dump_ipa_call_summary): Likewise.
7915         (ipa_dump_fn_summary): Likewise.
7916         (analyze_function_body): Likewise.
7917         (compute_fn_summary): Likewise.
7918         (estimate_edge_devirt_benefit): Likewise.
7919         (estimate_edge_size_and_time): Likewise.
7920         (estimate_calls_size_and_time): Likewise.
7921         (estimate_node_size_and_time): Likewise.
7922         (inline_update_callee_summaries): Likewise.
7923         (remap_edge_change_prob): Likewise.
7924         (remap_edge_summaries): Likewise.
7925         (ipa_merge_fn_summary_after_inlining): Likewise.
7926         (ipa_update_overall_fn_summary): Likewise.
7927         (read_ipa_call_summary): Likewise.
7928         (inline_read_section): Likewise.
7929         (write_ipa_call_summary): Likewise.
7930         (ipa_fn_summary_write): Likewise.
7931         (ipa_free_fn_summary): Likewise.
7932         * ipa-hsa.c (process_hsa_functions): Likewise.
7933         (ipa_hsa_write_summary): Likewise.
7934         (ipa_hsa_read_section): Likewise.
7935         * ipa-icf.c (sem_function::merge): Likewise.
7936         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7937         (do_estimate_edge_time): Likewise.
7938         (estimate_size_after_inlining): Likewise.
7939         (estimate_growth): Likewise.
7940         (growth_likely_positive): Likewise.
7941         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7942         (inline_call): Likewise.
7943         * ipa-inline.c (caller_growth_limits): Likewise.
7944         (can_inline_edge_p): Likewise.
7945         (can_inline_edge_by_limits_p): Likewise.
7946         (compute_uninlined_call_time): Likewise.
7947         (compute_inlined_call_time): Likewise.
7948         (want_inline_small_function_p): Likewise.
7949         (edge_badness): Likewise.
7950         (update_caller_keys): Likewise.
7951         (update_callee_keys): Likewise.
7952         (recursive_inlining): Likewise.
7953         (inline_small_functions): Likewise.
7954         (inline_to_all_callers_1): Likewise.
7955         (dump_overall_stats): Likewise.
7956         (early_inline_small_functions): Likewise.
7957         (early_inliner): Likewise.
7958         * ipa-inline.h (estimate_edge_growth): Likewise.
7959         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7960         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7961         * ipa-prop.h (IPA_NODE_REF): Likewise.
7962         (IPA_EDGE_REF): Likewise.
7963         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7964         (propagate_malloc): Likewise.
7965         * ipa-split.c (execute_split_functions): Likewise.
7966         * symbol-summary.h: Rename get to get_create.
7967         (get): Likewise.
7968         (get_create): Likewise.
7969         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7971 2018-06-08  Martin Liska  <mliska@suse.cz>
7973         * symbol-summary.h (release): Move definition out of class
7974         declaration.
7975         (symtab_removal): Likewise.
7976         (symtab_duplication): Likewise.
7978 2018-06-08  Martin Liska  <mliska@suse.cz>
7980         * symbol-summary.h (function_summary): Move constructor
7981         implementation out of class declaration.
7982         (release): Likewise.
7983         (symtab_insertion): Likewise.
7984         (symtab_removal): Likewise.
7985         (symtab_duplication): Likewise.
7986         (get): Likewise.
7988 2018-06-08  Martin Liska  <mliska@suse.cz>
7990         * Makefile.in: Remove support for MPX (macros, related functions,
7991         fields in cgraph_node, ...).
7992         * builtin-types.def (BT_BND): Likewise.
7993         (BT_FN_BND_CONST_PTR): Likewise.
7994         (BT_FN_CONST_PTR_BND): Likewise.
7995         (BT_FN_VOID_PTR_BND): Likewise.
7996         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7997         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7998         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7999         (expand_builtin_mempcpy_with_bounds): Likewise.
8000         (expand_builtin_memset_with_bounds): Likewise.
8001         (expand_builtin_memset_args): Likewise.
8002         (std_expand_builtin_va_start): Likewise.
8003         (expand_builtin): Likewise.
8004         (expand_builtin_with_bounds): Likewise.
8005         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8006         (DEF_LIB_BUILTIN_CHKP): Likewise.
8007         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8008         (DEF_CHKP_BUILTIN): Likewise.
8009         (BUILT_IN_MEMCPY): Likewise.
8010         (BUILT_IN_MEMMOVE): Likewise.
8011         (BUILT_IN_MEMPCPY): Likewise.
8012         (BUILT_IN_MEMSET): Likewise.
8013         (BUILT_IN_STPCPY): Likewise.
8014         (BUILT_IN_STRCAT): Likewise.
8015         (BUILT_IN_STRCHR): Likewise.
8016         (BUILT_IN_STRCPY): Likewise.
8017         (BUILT_IN_STRLEN): Likewise.
8018         (BUILT_IN_MEMCPY_CHK): Likewise.
8019         (BUILT_IN_MEMMOVE_CHK): Likewise.
8020         (BUILT_IN_MEMPCPY_CHK): Likewise.
8021         (BUILT_IN_MEMSET_CHK): Likewise.
8022         (BUILT_IN_STPCPY_CHK): Likewise.
8023         (BUILT_IN_STRCAT_CHK): Likewise.
8024         (BUILT_IN_STRCPY_CHK): Likewise.
8025         * calls.c (store_bounds): Likewise.
8026         (emit_call_1): Likewise.
8027         (special_function_p): Likewise.
8028         (maybe_warn_nonstring_arg): Likewise.
8029         (initialize_argument_information): Likewise.
8030         (finalize_must_preallocate): Likewise.
8031         (compute_argument_addresses): Likewise.
8032         (expand_call): Likewise.
8033         * cfgexpand.c (expand_call_stmt): Likewise.
8034         (expand_return): Likewise.
8035         (expand_gimple_stmt_1): Likewise.
8036         (pass_expand::execute): Likewise.
8037         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8038         (cgraph_node::remove): Likewise.
8039         (cgraph_node::dump): Likewise.
8040         (cgraph_node::verify_node): Likewise.
8041         * cgraph.h (chkp_function_instrumented_p): Likewise.
8042         (symtab_node::get_alias_target): Likewise.
8043         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8044         (cgraph_local_p): Likewise.
8045         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8046         (cgraph_edge::rebuild_references): Likewise.
8047         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8048         (walk_polymorphic_call_targets): Likewise.
8049         (cgraph_node::expand_thunk): Likewise.
8050         (symbol_table::output_weakrefs): Likewise.
8051         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8052         (ix86_handle_option): Likewise.
8053         * config/i386/constraints.md: Likewise.
8054         * config/i386/i386-builtin-types.def (BND): Likewise.
8055         (VOID): Likewise.
8056         (PVOID): Likewise.
8057         (ULONG): Likewise.
8058         * config/i386/i386-builtin.def (BDESC_END): Likewise.
8059         (BDESC_FIRST): Likewise.
8060         (BDESC): Likewise.
8061         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8062         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8063         * config/i386/i386.c (enum reg_class): Likewise.
8064         (ix86_target_string): Likewise.
8065         (ix86_option_override_internal): Likewise.
8066         (ix86_conditional_register_usage): Likewise.
8067         (ix86_valid_target_attribute_inner_p): Likewise.
8068         (ix86_set_indirect_branch_type): Likewise.
8069         (ix86_set_current_function): Likewise.
8070         (ix86_function_arg_regno_p): Likewise.
8071         (init_cumulative_args): Likewise.
8072         (ix86_function_arg_advance): Likewise.
8073         (ix86_function_arg): Likewise.
8074         (ix86_pass_by_reference): Likewise.
8075         (ix86_function_value_regno_p): Likewise.
8076         (ix86_function_value_1): Likewise.
8077         (ix86_function_value_bounds): Likewise.
8078         (ix86_return_in_memory): Likewise.
8079         (ix86_setup_incoming_vararg_bounds): Likewise.
8080         (ix86_va_start): Likewise.
8081         (indirect_thunk_need_prefix): Likewise.
8082         (print_reg): Likewise.
8083         (ix86_print_operand): Likewise.
8084         (ix86_expand_call): Likewise.
8085         (ix86_output_function_return): Likewise.
8086         (reg_encoded_number): Likewise.
8087         (BDESC_VERIFYS): Likewise.
8088         (ix86_init_mpx_builtins): Likewise.
8089         (ix86_init_builtins): Likewise.
8090         (ix86_emit_cmove): Likewise.
8091         (ix86_emit_move_max): Likewise.
8092         (ix86_expand_builtin): Likewise.
8093         (ix86_builtin_mpx_function): Likewise.
8094         (ix86_get_arg_address_for_bt): Likewise.
8095         (ix86_load_bounds): Likewise.
8096         (ix86_store_bounds): Likewise.
8097         (ix86_load_returned_bounds): Likewise.
8098         (ix86_store_returned_bounds): Likewise.
8099         (ix86_class_likely_spilled_p): Likewise.
8100         (ix86_hard_regno_mode_ok): Likewise.
8101         (x86_order_regs_for_local_alloc): Likewise.
8102         (ix86_mitigate_rop): Likewise.
8103         (ix86_bnd_prefixed_insn_p): Likewise.
8104         (ix86_mpx_bound_mode): Likewise.
8105         (ix86_make_bounds_constant): Likewise.
8106         (ix86_initialize_bounds): Likewise.
8107         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8108         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8109         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8110         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8111         (TARGET_CHKP_BOUND_MODE): Likewise.
8112         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8113         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8114         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8115         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8116         * config/i386/i386.h (TARGET_MPX): Likewise.
8117         (TARGET_MPX_P): Likewise.
8118         (VALID_BND_REG_MODE): Likewise.
8119         (FIRST_BND_REG): Likewise.
8120         (LAST_BND_REG): Likewise.
8121         (enum reg_class): Likewise.
8122         (BND_REG_P): Likewise.
8123         (BND_REGNO_P): Likewise.
8124         (BNDmode): Likewise.
8125         (ADJUST_INSN_LENGTH): Likewise.
8126         * config/i386/i386.md: Likewise.
8127         * config/i386/i386.opt: Likewise.
8128         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8129         (defined): Likewise.
8130         (LINK_MPX): Likewise.
8131         (MPX_SPEC): Likewise.
8132         (LIBMPX_SPEC): Likewise.
8133         (LIBMPXWRAPPERS_SPEC): Likewise.
8134         (CHKP_SPEC): Likewise.
8135         * config/i386/predicates.md: Likewise.
8136         * dbxout.c (dbxout_type): Likewise.
8137         * doc/extend.texi: Likewise.
8138         * doc/invoke.texi: Likewise.
8139         * doc/md.texi: Likewise.
8140         * doc/tm.texi: Likewise.
8141         * doc/tm.texi.in: Likewise.
8142         * dwarf2out.c (is_base_type): Likewise.
8143         (gen_formal_types_die): Likewise.
8144         (gen_subprogram_die): Likewise.
8145         (gen_type_die_with_usage): Likewise.
8146         (gen_decl_die): Likewise.
8147         (dwarf2out_late_global_decl): Likewise.
8148         * expr.c (expand_assignment): Likewise.
8149         (emit_storent_insn): Likewise.
8150         (store_expr_with_bounds): Likewise.
8151         (store_expr): Likewise.
8152         (expand_expr_real_1): Likewise.
8153         * expr.h (store_expr_with_bounds): Likewise.
8154         * function.c (use_register_for_decl): Likewise.
8155         (struct bounds_parm_data): Likewise.
8156         (assign_parms_augmented_arg_list): Likewise.
8157         (assign_parm_find_entry_rtl): Likewise.
8158         (assign_parm_is_stack_parm): Likewise.
8159         (assign_parm_load_bounds): Likewise.
8160         (assign_bounds): Likewise.
8161         (assign_parms): Likewise.
8162         (expand_function_start): Likewise.
8163         * gcc.c (CHKP_SPEC): Likewise.
8164         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8165         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8166         (wrestrict_dom_walker::check_call): Likewise.
8167         * gimple.c (gimple_build_call_from_tree): Likewise.
8168         * gimple.h (enum gf_mask): Likewise.
8169         (gimple_call_with_bounds_p): Likewise.
8170         (gimple_call_set_with_bounds): Likewise.
8171         * gimplify.c (gimplify_init_constructor): Likewise.
8172         * ipa-cp.c (initialize_node_lattices): Likewise.
8173         (propagate_constants_across_call): Likewise.
8174         (find_more_scalar_values_for_callers_subset): Likewise.
8175         * ipa-hsa.c (process_hsa_functions): Likewise.
8176         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8177         * ipa-icf.c (sem_function::merge): Likewise.
8178         * ipa-inline.c (early_inliner): Likewise.
8179         * ipa-pure-const.c (warn_function_noreturn): Likewise.
8180         (warn_function_cold): Likewise.
8181         (propagate_pure_const): Likewise.
8182         * ipa-ref.h (enum GTY): Likewise.
8183         * ipa-split.c (find_retbnd): Likewise.
8184         (consider_split): Likewise.
8185         (split_function): Likewise.
8186         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8187         * ipa.c (walk_polymorphic_call_targets): Likewise.
8188         (symbol_table::remove_unreachable_nodes): Likewise.
8189         (process_references): Likewise.
8190         (cgraph_build_static_cdtor_1): Likewise.
8191         * lto-cgraph.c (lto_output_node): Likewise.
8192         (output_refs): Likewise.
8193         (compute_ltrans_boundary): Likewise.
8194         (input_overwrite_node): Likewise.
8195         (input_node): Likewise.
8196         (input_cgraph_1): Likewise.
8197         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8198         * passes.c (pass_manager::execute_early_local_passes): Likewise.
8199         (class pass_chkp_instrumentation_passes): Likewise.
8200         (make_pass_chkp_instrumentation_passes): Likewise.
8201         * passes.def: Likewise.
8202         * rtl.h (struct GTY): Likewise.
8203         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8204         * stor-layout.c (layout_type): Likewise.
8205         * symtab.c: Likewise.
8206         * target.def: Likewise.
8207         * targhooks.c (default_chkp_bound_type): Likewise.
8208         (default_chkp_bound_mode): Likewise.
8209         (default_builtin_chkp_function): Likewise.
8210         (default_chkp_function_value_bounds): Likewise.
8211         (default_chkp_make_bounds_constant): Likewise.
8212         (default_chkp_initialize_bounds): Likewise.
8213         * targhooks.h (default_chkp_bound_type): Likewise.
8214         (default_chkp_bound_mode): Likewise.
8215         (default_builtin_chkp_function): Likewise.
8216         (default_chkp_function_value_bounds): Likewise.
8217         (default_chkp_make_bounds_constant): Likewise.
8218         (default_chkp_initialize_bounds): Likewise.
8219         * toplev.c (compile_file): Likewise.
8220         (process_options): Likewise.
8221         * tree-core.h (DEF_BUILTIN): Likewise.
8222         (DEF_BUILTIN_CHKP): Likewise.
8223         * tree-inline.c (declare_return_variable): Likewise.
8224         (remap_gimple_stmt): Likewise.
8225         (copy_bb): Likewise.
8226         (initialize_inlined_parameters): Likewise.
8227         (expand_call_inline): Likewise.
8228         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8229         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8230         (make_pass_ipa_chkp_produce_thunks): Likewise.
8231         (make_pass_chkp): Likewise.
8232         (make_pass_chkp_opt): Likewise.
8233         (make_pass_chkp_instrumentation_passes): Likewise.
8234         * tree-pretty-print.c (dump_generic_node): Likewise.
8235         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8236         * tree-ssa-dce.c (propagate_necessity): Likewise.
8237         (eliminate_unnecessary_stmts): Likewise.
8238         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8239         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8240         * tree-ssa-sccvn.h: Likewise.
8241         * tree-ssa-strlen.c (get_string_length): Likewise.
8242         (valid_builtin_call): Likewise.
8243         (adjust_last_stmt): Likewise.
8244         (handle_builtin_strchr): Likewise.
8245         (handle_builtin_strcpy): Likewise.
8246         (handle_builtin_stxncpy): Likewise.
8247         (handle_builtin_memcpy): Likewise.
8248         (handle_builtin_strcat): Likewise.
8249         (strlen_check_and_optimize_stmt): Likewise.
8250         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8251         * tree-streamer-in.c: Likewise.
8252         * tree-streamer.c (record_common_node): Likewise.
8253         * tree.c (tree_code_size): Likewise.
8254         (wide_int_to_tree_1): Likewise.
8255         (type_contains_placeholder_1): Likewise.
8256         (build_common_tree_nodes): Likewise.
8257         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8258         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8259         (POINTER_BOUNDS_P): Likewise.
8260         (BOUNDED_TYPE_P): Likewise.
8261         (BOUNDED_P): Likewise.
8262         (CALL_WITH_BOUNDS_P): Likewise.
8263         (pointer_bounds_type_node): Likewise.
8264         * value-prof.c (gimple_ic): Likewise.
8265         * var-tracking.c (vt_add_function_parameters): Likewise.
8266         * varasm.c (make_decl_rtl): Likewise.
8267         (assemble_start_function): Likewise.
8268         (output_constant): Likewise.
8269         (maybe_assemble_visibility): Likewise.
8270         * varpool.c (ctor_for_folding): Likewise.
8271         * chkp-builtins.def: Remove.
8272         * ipa-chkp.c: Remove.
8273         * ipa-chkp.h: Remove.
8274         * rtl-chkp.c: Remove.
8275         * rtl-chkp.h: Remove.
8276         * tree-chkp-opt.c: Remove.
8277         * tree-chkp.c: Remove.
8278         * tree-chkp.h: Remove.
8280 2018-06-07  Carl Love  <cel@us.ibm.com>
8282         * config/rs6000/vsx.md (vextract_fp_from_shorth,
8283         vextract_fp_from_shortl): Add BE support.
8285 2018-06-07  Paul Koning  <ni1d@arrl.net>
8287         * compare-elim.c (try_merge_compare): Don't merge compare if
8288         address contains a side effect.
8289         (try_eliminate_compare): Likewise.
8291 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
8293         * config.gcc: Support "tremont".
8294         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8295         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8296         PROCESSOR_TREMONT.
8297         * config/i386/i386.c (m_TREMONT): Define.
8298         (processor_target_table): Add "tremont".
8299         (PTA_TREMONT): Define.
8300         (ix86_lea_outperforms): Add TARGET_TREMONT.
8301         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8302         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8303         and M_INTEL_GOLDMONT_PLUS.
8304         (fold_builtin_cpu): Add "tremont".
8305         (ix86_add_stmt_cost): Add TARGET_TREMONT.
8306         (ix86_option_override_internal): Add "tremont".
8307         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8308         (processor_type): Add PROCESSOR_TREMONT.
8309         * config/i386/x86-tune.def: Add m_TREMONT.
8310         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8312 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8314         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8315         symbol defined for msp430i* devices to be lower case.
8317 2018-06-07  Richard Biener  <rguenther@suse.de>
8319         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8320         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
8321         Properly wrap signed arithmetic if overflow wraps.
8323 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
8325         PR tree-optimization/69615
8326         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8327         of a cast from a same precision integral SSA_NAME in a bb dominated
8328         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
8329         cast to utype if rhs2 has already a compatible type.
8331 2018-06-07  Richard Biener  <rguenther@suse.de>
8333         PR tree-optimization/85935
8334         * graphite-scop-detection.c (find_params_in_bb): Analyze
8335         condition operands with respect to the correct loop.  Assert
8336         the analysis doesn't fail.
8338 2018-06-04  Carl Love  <cel@us.ibm.com>
8340         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8341         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
8342         as it is slightly cheaper.
8343         (first_match_or_eos_index_<mode>):
8344         Calculate index using natural element order.
8345         (first_match_index_<mode>):
8346         Calculate index using natural element order.
8347         (first_match_or_eos_index_<mode>):
8348         Calculate index using natural order.
8349         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8350         for BE and LE modes.
8351         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8352         P9V_BUILTIN_VCLZLSBB_V16QI.
8353         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8354         specific.
8356 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8358         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8359         indentation and line wrap for many prototypes.  Add missing
8360         @smallexample directives around block of prototypes for vec_xl and
8361         vec_xst.
8363 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
8365         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8366         track if we pass or return IEEE 128-bit floating point.
8367         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8368         C++ mangling that is compatible with GCC 8.1.
8369         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8370         (init_cumulative_args): Note if we pass or return IEEE 128-bit
8371         floating point types.
8372         (rs6000_function_arg_advance_1): Likewise.
8373         (rs6000_mangle_type): Optionally generate mangled names that match
8374         what GCC 8.1 generated for IEEE 128-bit floating point types.
8375         (rs6000_globalize_decl_name): If we have an external function that
8376         passes or returns IEEE 128-bit types, generate a weak reference
8377         from the mangled name used in GCC 8.1 to the current mangled
8378         name.
8379         (rs6000_init_builtins): Make __ibm128 use the long double type if
8380         long double is IBM extended double.  Make __float128 use the long
8381         double type if long double is IEEE 128-bit.
8383         PR target/85657
8384         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8385         macro for __ibm128 built-in functions.
8386         (PACK_IF): Add __ibm128 pack/unpack functions.
8387         (UNPACK_IF): Likewise.
8388         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8389         enable long double built-in functions if long double is IEEE
8390         128-bit floating point.
8391         (rs6000_invalid_builtin): Update long double built-in function
8392         error message.
8393         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8394         functions, adjust the built-in function to use the long double
8395         built-in function if __ibm128 and long double are the same type.
8396         * doc/extend.texi (PowerPC builtins): Update documention for
8397         __builtin_{,un}pack_longdouble.  Add documentation for
8398         __builtin_{,un}pack_ibm128.
8400 2018-06-06  Jim Wilson  <jimw@sifive.com>
8402         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8403         (struct machine_function): New field interrupt_mode.
8404         (riscv_handle_type_attribute): New function.  Add forward declaration.
8405         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8406         (riscv_expand_epilogue): Check interrupt_mode field.
8407         (riscv_set_current_function): Check interrupt attribute args and
8408         set interrupt_mode field.
8409         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8410         (riscv_sret, riscv_uret): New.
8411         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8412         new arguments to interrupt attribute.
8414 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
8416         PR target/63177
8417         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8418         Don't handle -mcpu=power8 if -mpower9-vector is also used.
8420 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8422         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8423         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8424         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8425         several redundant entries.
8427 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
8429         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8430         type from "rtx" to "rtx_insn *".
8431         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8432         for local "call_insn", removing cast.
8433         (ix86_expand_call): Likewise, introducing a "call_insn" local.
8435 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8437         PR tree-optimization/86066
8438         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8439         for BIT_INSERT_EXPR stores.
8441 2018-06-06  Richard Biener  <rguenther@suse.de>
8443         PR tree-optimization/86062
8444         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8445         component refs ontop
8446         of to be offsetted base.
8448 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8450         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8451         to be static and remove check on interrupt attribute name.
8453 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8455         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8456         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8458 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
8460         PR target/79924
8461         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8462         second argument.
8463         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8464         Remove second argument, change how error is called.
8465         (aarch64_layout_arg): Remove second argument from
8466         aarch64_err_no_fpadvsimd call.
8467         (aarch64_init_cumulative_args): Ditto.
8468         (aarch64_gimplify_va_arg_expr): Ditto.
8469         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8471 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8473         * config/i386/i386.md (simple_return_indirect_internal): New expander.
8474         (*simple_return_indirect_internal<mode>): Rename from
8475         simple_return_indirect_internal.  Use W mode iterator.
8476         (rstorssp): New expander.
8477         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
8478         (clrssbsy): New expander.
8479         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
8481 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8483         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8484         __typeof__.
8485         (cmse_check_pointed_object): Likewise.
8487 2018-06-05  Martin Liska  <mliska@suse.cz>
8489         PR gcov-profile/47618
8490         * doc/invoke.texi: Document how -fprofile-dir format
8491         is extended.
8493 2018-06-05  Richard Biener  <rguenther@suse.de>
8495         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8496         removal pretend DOM info isn't available so we do not update
8497         it and only remove edges, not dominated blocks.  Actually free
8498         DOM info in case we removed something.  Remove unreachable blocks.
8499         (mfb_keep_latches): Work with either DOM info or marked backedges.
8500         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8501         first.  Mark backedges if DOM info isn't available.
8502         (Re-)compute DOM info after cleanup_control_flow_pre.
8504 2018-06-05  Richard Biener  <rguenther@suse.de>
8506         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8507         (locus_discrim_hasher::hash): Adjust.
8508         (locus_discrim_hasher::equal): Likewise.
8509         (next_discriminator_for_locus): Work on line directly.
8510         (same_line_p): Pass in expanded locus1 as well.
8511         (assign_discriminators): Avoid redundant location expansions.
8513 2018-06-05  Richard Biener  <rguenther@suse.de>
8515         PR tree-optimization/86046
8516         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8517         if required after clearing TREE_ADDRESSABLE.
8519 2018-06-05  Richard Biener  <rguenther@suse.de>
8521         PR tree-optimization/86047
8522         * tree-ssa-loop.c (for_each_index): Glob handling of all
8523         decls and constants and really handle all of them.
8525 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8527         PR target/81497
8528         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8529         qualifier_void_pointer and qualifier_const_void_pointer.
8530         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8531         (arm_init_builtins): Handle the above.
8532         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8533         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8534         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8535         void intrinsics.
8537 2018-06-05  Martin Liska  <mliska@suse.cz>
8539         * auto-profile.c (read_autofdo_file): Do not use
8540         gcov_ctr_summary struct.
8541         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8542         * coverage.c (struct counts_entry): Likewise.
8543         (read_counts_file): Read just single summary entry.
8544         (get_coverage_counts): Use gcov_summary struct.
8545         * coverage.h (get_coverage_counts): Likewise.
8546         * gcov-dump.c (dump_working_sets): Likewise.
8547         (tag_summary): Dump just single summary.
8548         * gcov-io.c (gcov_write_summary): Write just histogram
8549         summary.
8550         (gcov_read_summary): Read just single summary.
8551         (compute_working_sets): Use gcov_summary struct.
8552         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8553         of GCOV_COUNTERS_SUMMABLE.
8554         (GCOV_COUNTERS_SUMMABLE): Remove.
8555         (GCOV_FIRST_VALUE_COUNTER): Replace with
8556         GCOV_COUNTER_V_INTERVAL.
8557         (struct gcov_ctr_summary): Remove.
8558         (struct gcov_summary): Directly use fields of former
8559         gcov_ctr_summary.
8560         (compute_working_sets): Use gcov_summary struct.
8561         * gcov.c (read_count_file): Do not use ctrs fields.
8562         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8563         struct.
8564         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8565         struct.
8566         * profile.c: Likewise.
8567         * profile.h: Likewise.
8569 2018-06-05  Martin Liska  <mliska@suse.cz>
8571         PR gcov-profile/84846
8572         * gcov.c (output_lines): Print working directory only
8573         in intermediate format.
8575 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8577         * config/s390/s390-builtin-types.def: Add void function type.
8578         * config/s390/s390-builtins.def: Use the function type for the
8579         tbeginc builtin.
8581 2018-06-04  Jim Wilson  <jimw@sifive.com>
8583         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8584         to int.
8585         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8586         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8587         handle EH_RETURN_DATA_REGNO registers properly.
8588         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8589         (riscv_expand_epilogue): Update comment.  Change argument name and
8590         type.  Update code to use new name and type.  Pass new args to
8591         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8592         EXCEPTION_RETURN.
8593         * config/riscv/riscv.md (NORMAL_RETURN): New.
8594         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8595         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8596         (eh_return): Call gen_eh_return_internal and emit barrier.
8597         (eh_return_internal): Call riscv_expand_epilogue.
8599 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8601         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8602         bit_insertion field and declare can_be_merged_into method.
8603         (merged_store_group::can_be_merged_into): New method.
8604         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8605         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8606         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8608 2018-06-04  Richard Biener  <rguenther@suse.de>
8610         PR tree-optimization/85955
8611         * builtins.c (fold_builtin_sincos): Convert pointers to
8612         destination to appropriate type before dereferencing.
8614 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8616         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8618 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8620         * expr.c (expand_expr_real_1): Force the operand into memory if
8621         its TYPE_MODE is BLKmode and if there is no integer mode for
8622         the number of bits being extracted.
8624 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8626         PR target/85832
8627         PR target/86036
8628         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8629         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8631 2018-06-04  Richard Biener  <rguenther@suse.de>
8633         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8634         (cleanup_tree_cfg_noloop): ... single caller.  Do
8635         start_recording_case_labels later.
8637 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8639         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8640         to _IMMINTRIN_H_INCLUDED.
8641         * config/i386/pconfigintrin.h: Ditto.
8642         * config/i386/waitpkgintrin.h: Ditto.
8643         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8644         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8645         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8646         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8647         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8648         waitpkgintrin.h and cldemoteintrin.h.
8650 2018-06-04  Richard Biener  <rguenther@suse.de>
8652         PR tree-optimization/86038
8653         * tracer.c (find_best_successor): Check probability for
8654         being initialized, bail out if not.
8656 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8658         PR target/86003
8659         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8660         of bits to ignore when comparing architectures.
8662 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8664         PR tree-optimization/69615
8665         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8666         maximum or minimum of the type, try to merge it also as if
8667         range1 is + [-, x - 1] or + [x + 1, -].
8669         PR c++/86025
8670         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8672 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8674         PR tree-optimization/86034
8675         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8676         the unsigned bitfield type in a bit insertion sequence if it does not
8677         have a larger precision than the bitfield size.
8678         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8680 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8682         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8684 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8686         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8687         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8688         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8689         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8691 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8693         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8694         Disable -fdelete-null-pointer-checks for ELF toolchain.
8696 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8697             Kito Cheng  <kito.cheng@gmail.com>
8699         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8700         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8701         (nds32*-*-*): Add glibc and uclibc conditions.
8702         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8703         (TARGET_EXCEPT_UNWIND_INFO): Define.
8704         * config/nds32/elf.h: New file.
8705         * config/nds32/linux.h: New file.
8706         * config/nds32/nds32-elf.opt: New file.
8707         * config/nds32/nds32-linux.opt: New file.
8708         * config/nds32/nds32-fp-as-gp.c
8709         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8710         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8711         TARGET_LINUX_ABI.
8712         (nds32_asm_file_end): Ditto.
8713         (nds32_print_operand): Ditto.
8714         (nds32_insert_attributes): Ditto.
8715         (nds32_init_libfuncs): New function.
8716         (TARGET_HAVE_TLS): Define.
8717         (TARGET_INIT_LIBFUNCS): Define.
8718         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8719         spec content.
8720         (TARGET_ELF): Apply different mcmodel setting.
8721         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8722         been migrated into elf.h and linux.h files.
8723         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8724         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8725         (mcmodel): The content has been migrated into nds32-elf.opt and
8726         nds32-linux.opt files.
8727         * config/nds32/t-elf: New file.
8728         * config/nds32/t-linux: New file.
8730 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8731             Shiva Chen  <shiva0217@gmail.com>
8733         * config/nds32/constants.md (unspec_volatile_element): Add
8734         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8735         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8736         optimization.
8737         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8738         (make_pass_nds32_fp_as_gp): Declare.
8739         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8740         optmization pass.
8741         (nds32_asm_function_end_prologue): Remove unused asm output.
8742         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8743         (nds32_asm_file_start): Output necessary fp_as_gp information.
8744         (nds32_option_override): Adjust register usage.
8745         (nds32_expand_prologue): Consider fp_as_gp situation.
8746         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8747         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8748         (epilogue): Ditto.
8749         (return): Ditto.
8750         (simple_return): Ditto.
8751         (omit_fp_begin): Output special directive for fp_as_gp.
8752         (omit_fp_end): Output special directive for fp_as_gp.
8753         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8754         mforbid-fp-as-gp): New options.
8756 2018-06-01  Mark Wielaard  <mark@klomp.org>
8758         * dwarf2out.c (dwarf2out_finish): Remove generation of
8759         DW_AT_loclists_base.
8761 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8763         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8764         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8765         (struct merged_store_group): Add bit_insertion field.
8766         (dump_char_array): Use standard hexadecimal format.
8767         (merged_store_group::merged_store_group): Set bit_insertion to false.
8768         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8769         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8770         also print the mask in the dump file.
8771         (pass_store_merging::gate): Minor tweak.
8772         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8773         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8774         stores with INTEGER_CST stores.
8775         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8776         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8777         and use it throughout.  Generate bit insertion sequences if need be.
8778         (pass_store_merging::process_store): Remove redundant condition.
8779         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8781 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8783         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8784         the 128-bit floating point types.  Fix function comment.
8786 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8788         * config/aarch64/aarch64-simd.md
8789         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8790         mnemonics.
8791         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8792         mnemonics.
8794 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8796         PR tree-optimization/85989
8797         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8798         variable.
8799         (backprop::intersect_uses): Check it when deciding whether this
8800         is a backedge reference.
8801         (backprop::process_block): Add each phi to m_visited_phis
8802         after visiting it, then clear it at the end.
8804 2018-06-01  Richard Biener  <rguenther@suse.de>
8806         * tree-vectorizer.h (vect_dr_stmt): New function.
8807         (vect_get_load_cost): Adjust.
8808         (vect_get_store_cost): Likewise.
8809         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8810         Use vect_dr_stmt instead of DR_SMTT.
8811         (vect_record_base_alignments): Likewise.
8812         (vect_calculate_target_alignment): Likewise.
8813         (vect_compute_data_ref_alignment): Likewise and make static.
8814         (vect_update_misalignment_for_peel): Likewise.
8815         (vect_verify_datarefs_alignment): Likewise.
8816         (vector_alignment_reachable_p): Likewise.
8817         (vect_get_data_access_cost): Likewise.  Pass down
8818         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8819         (vect_get_peeling_costs_all_drs): Likewise.
8820         (vect_peeling_hash_get_lowest_cost): Likewise.
8821         (vect_enhance_data_refs_alignment): Likewise.
8822         (vect_find_same_alignment_drs): Likewise.
8823         (vect_analyze_data_refs_alignment): Likewise.
8824         (vect_analyze_group_access_1): Likewise.
8825         (vect_analyze_group_access): Likewise.
8826         (vect_analyze_data_ref_access): Likewise.
8827         (vect_analyze_data_ref_accesses): Likewise.
8828         (vect_vfa_segment_size): Likewise.
8829         (vect_small_gap_p): Likewise.
8830         (vectorizable_with_step_bound_p): Likewise.
8831         (vect_prune_runtime_alias_test_list): Likewise.
8832         (vect_analyze_data_refs): Likewise.
8833         (vect_supportable_dr_alignment): Likewise.
8834         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8835         (vect_gen_prolog_loop_niters): Likewise.
8836         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8837         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8838         modify DR_STMT.
8839         (vect_recog_mask_conversion_pattern): Likewise.
8840         (vect_try_gather_scatter_pattern): Likewise.
8841         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8842         to vect_get_store_cost.
8843         (vect_get_store_cost): Get stmt_info instead of DR.
8844         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8845         (vect_get_load_cost): Get stmt_info instead of DR.
8847 2018-06-01  Richard Biener  <rguenther@suse.de>
8849         PR middle-end/86017
8850         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8851         vars wrapped in MEM_REFs.
8853 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8855         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8856         Fix subreg tests so that we only return a choice between
8857         GENERAL_REGS and FP_REGS if the original classes included both.
8859 2018-06-01  Richard Biener  <rguenther@suse.de>
8861         PR ipa/85960
8862         * tree-ssa-structalias.c (get_function_part_constraint):
8863         Handle NULL fi->decl.
8864         (find_func_aliases_for_call): Properly handle indirect
8865         fi from direct call.
8866         (find_func_clobbers): Likewise.
8867         (ipa_pta_execute): Likewise.
8868         (create_variable_info_for): For functions that are ifunc_resolver
8869         resolve to a varinfo that contains the result of the resolver call.
8870         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8871         aliases.
8873 2018-05-31  Michael Collison  <michael.collison@arm.com>
8875         * config/aarch64/aarch64.md:
8876         (*fix_to_zero_extenddfdi2): New pattern.
8877         * gcc.target/aarch64/fix_extend1.c: New testcase.
8879 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8881         PR middle-end/78809
8882         PR middle-end/83026
8883         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8884         and BUILT_IN_STRNCMP_EQ.
8885         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8886         BUILT_IN_STRNCMP_EQ.
8887         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8888         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8889         (gimple_fold_builtin): Likewise.
8890         * tree-ssa-strlen.c (compute_string_length): New function.
8891         (determine_min_obsize): New function.
8892         (handle_builtin_string_cmp): New function to handle calls to
8893         string compare functions.
8894         (strlen_optimize_stmt): Add handling to builtin string compare
8895         calls.
8896         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8897         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8898         * tree.c (build_common_builtin_nodes): Add new defines of
8899         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8901 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8903         PR target/85984
8904         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8905         functions with naked attribute.
8907 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8909         * config/i386/sse.md (avx_vec_concat<mode>):
8910         Substitute concat_tg_mode mode attribute with xtg_mode.
8911         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8912         (concat_tg_mode): Remove mode attribute.
8914 2018-05-31  Martin Sebor  <msebor@redhat.com>
8916         PR c/82063
8917         * calls.c (alloc_max_size): Correct a logic error/typo.
8918         Treat excessive arguments as infinite.  Warn for invalid arguments.
8919         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8921 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8923         PR target/85829
8924         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8925         and movx for Haswell.
8927 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8928             Cesar Philippidis  <cesar@codesourcery.com>
8930         PR middle-end/85879
8931         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8932         when emitting error on private/firstprivate reductions.
8933         * omp-low.c (lower_omp_target): Avoid reference-type processing
8934         on pointers for firstprivate clause.
8936 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8938         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8939         (st1x2): Likewise.
8940         (st1x3): Likewise.
8941         * config/aarch64/aarch64-simd.md
8942         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8943         (aarch64_ld1_x3_<mode>): Likewise
8944         (aarch64_st1x2<VALLDIF:mode>): Likewise
8945         (aarch64_st1_x2_<mode>): Likewise
8946         (aarch64_st1x3<VALLDIF:mode>): Likewise
8947         (aarch64_st1_x3_<mode>): Likewise
8948         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8949         (vld1_s8_x3): Likewise.
8950         (vld1_u16_x3): Likewise.
8951         (vld1_s16_x3): Likewise.
8952         (vld1_u32_x3): Likewise.
8953         (vld1_s32_x3): Likewise.
8954         (vld1_u64_x3): Likewise.
8955         (vld1_s64_x3): Likewise.
8956         (vld1_f16_x3): Likewise.
8957         (vld1_f32_x3): Likewise.
8958         (vld1_f64_x3): Likewise.
8959         (vld1_p8_x3): Likewise.
8960         (vld1_p16_x3): Likewise.
8961         (vld1_p64_x3): Likewise.
8962         (vld1q_u8_x3): Likewise.
8963         (vld1q_s8_x3): Likewise.
8964         (vld1q_u16_x3): Likewise.
8965         (vld1q_s16_x3): Likewise.
8966         (vld1q_u32_x3): Likewise.
8967         (vld1q_s32_x3): Likewise.
8968         (vld1q_u64_x3): Likewise.
8969         (vld1q_s64_x3): Likewise.
8970         (vld1q_f16_x3): Likewise.
8971         (vld1q_f32_x3): Likewise.
8972         (vld1q_f64_x3): Likewise.
8973         (vld1q_p8_x3): Likewise.
8974         (vld1q_p16_x3): Likewise.
8975         (vld1q_p64_x3): Likewise.
8976         (vst1_s64_x2): Likewise.
8977         (vst1_u64_x2): Likewise.
8978         (vst1_f64_x2): Likewise.
8979         (vst1_s8_x2): Likewise.
8980         (vst1_p8_x2): Likewise.
8981         (vst1_s16_x2): Likewise.
8982         (vst1_p16_x2): Likewise.
8983         (vst1_s32_x2): Likewise.
8984         (vst1_u8_x2): Likewise.
8985         (vst1_u16_x2): Likewise.
8986         (vst1_u32_x2): Likewise.
8987         (vst1_f16_x2): Likewise.
8988         (vst1_f32_x2): Likewise.
8989         (vst1_p64_x2): Likewise.
8990         (vst1q_s8_x2): Likewise.
8991         (vst1q_p8_x2): Likewise.
8992         (vst1q_s16_x2): Likewise.
8993         (vst1q_p16_x2): Likewise.
8994         (vst1q_s32_x2): Likewise.
8995         (vst1q_s64_x2): Likewise.
8996         (vst1q_u8_x2): Likewise.
8997         (vst1q_u16_x2): Likewise.
8998         (vst1q_u32_x2): Likewise.
8999         (vst1q_u64_x2): Likewise.
9000         (vst1q_f16_x2): Likewise.
9001         (vst1q_f32_x2): Likewise.
9002         (vst1q_f64_x2): Likewise.
9003         (vst1q_p64_x2): Likewise.
9004         (vst1_s64_x3): Likewise.
9005         (vst1_u64_x3): Likewise.
9006         (vst1_f64_x3): Likewise.
9007         (vst1_s8_x3): Likewise.
9008         (vst1_p8_x3): Likewise.
9009         (vst1_s16_x3): Likewise.
9010         (vst1_p16_x3): Likewise.
9011         (vst1_s32_x3): Likewise.
9012         (vst1_u8_x3): Likewise.
9013         (vst1_u16_x3): Likewise.
9014         (vst1_u32_x3): Likewise.
9015         (vst1_f16_x3): Likewise.
9016         (vst1_f32_x3): Likewise.
9017         (vst1_p64_x3): Likewise.
9018         (vst1q_s8_x3): Likewise.
9019         (vst1q_p8_x3): Likewise.
9020         (vst1q_s16_x3): Likewise.
9021         (vst1q_p16_x3): Likewise.
9022         (vst1q_s32_x3): Likewise.
9023         (vst1q_s64_x3): Likewise.
9024         (vst1q_u8_x3): Likewise.
9025         (vst1q_u16_x3): Likewise.
9026         (vst1q_u32_x3): Likewise.
9027         (vst1q_u64_x3): Likewise.
9028         (vst1q_f16_x3): Likewise.
9029         (vst1q_f32_x3): Likewise.
9030         (vst1q_f64_x3): Likewise.
9031         (vst1q_p64_x3): Likewise.
9033 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9035         * config/msp430/msp430.c (msp430_output_labelref): Prepend
9036         user_label_prefix to name.
9038         * tree-core.h: Update comment about the format of NAME string
9039         passed to handler in attribute_spec.
9041         * config/msp430/msp430.md: Remove erroneous subreg expression from
9042         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9043         zero_extend{q,h}isi2.
9045 2018-05-30  Borislav Petkov  <bp@suse.de>
9047         * doc/extend.texi: Document some architecture specific
9048         constraints and sort entries.
9050 2018-05-30  Martin Sebor  <msebor@redhat.com>
9052         PR middle-end/85369
9053         * builtins.c (expand_builtin_stpcpy_1): New function.
9054         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9055         only if the former succeeds.
9057 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
9059         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9060         in saphira.
9062 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9064         * doc/invoke.texi (-flinker-output): Document
9066 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9068         * passes.c (ipa_write_summaries): Only modify statements if body
9069         is in memory.
9070         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9071         incrementally linking.
9072         (ipa_passes): Likewise.
9073         * lto-cgraph.c (lto_output_node): When incrementally linking do not
9074         pass down resolution info.
9075         * common.opt (flag_incremental_link): Update info.
9076         * gcc.c (plugin specs): Turn flinker-output=* to
9077         -plugin-opt=-linker-output-known
9078         * toplev.c (compile_file): Also cut compilation when doing incremental
9079         link.
9080         * flag-types. (enum lto_partition_model): Add
9081         LTO_LINKER_OUTPUT_NOLTOREL.
9082         (invoke.texi): Add -flinker-output docs.
9083         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9084         link same way as WPA; do not stream in dead initializers.
9086         * dwarf2out.c (dwarf2out_die_ref_for_decl,
9087         darf2out_register_external_decl): Support incremental link.
9089 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9091         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9093 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9095         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9096         it down to simple_object_copy_lto_debug_sections.
9097         (run_gcc): Determine incremental LTO link time and configure
9098         lto1 into non-wpa mode, disable renaming of debug sections.
9100 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9102         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9103         descriptions of various incorrectly documented functions.
9105 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9107         Revert:
9108         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9109         address check not strict.
9111 2018-05-30  Richard Biener  <rguenther@suse.de>
9113         PR tree-optimization/85964
9114         * tracer.c (better_p): Drop initialized count check, we only
9115         call the function with initialized counts now.
9116         (find_best_successor): Do find a best edge if one
9117         has uninitialized count.
9118         (find_best_predecessor): Likewise.  Do BB frequency check only
9119         if count is initialized.
9121 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
9123         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9124         (aarch64_ldrstr_offset_compare): New.
9125         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9126         load/store orderings.
9127         (aarch64_gen_adjusted_ldpstp): Likewise.
9129 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
9131         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9132         Check for subset of GENERAL_REGS and FP_REGS.
9133         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9134         r=w alternative.
9136 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
9138         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9139         and wi::to_poly_offset.  Add the current offset and then check
9140         whether the sum fits, rather than using an unchecked addition of
9141         a checked term.  Check for a shwi rather than a uhwi.
9142         * expr.c (get_bit_range): Use tree_to_poly_uint64.
9143         (store_constructor): Use poly_int_tree_p.
9144         (expand_expr_real_1): Likewise.
9145         * function.c (assign_temp): Likewise.
9146         * fold-const.c (const_binop): Use poly_int_tree_p and
9147         wi::to_poly_offset.
9148         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
9149         division.
9150         * ipa-icf-gimple.c (func_checker::compare_operand): Use
9151         to_poly_offset for MEM offsets.
9152         * ipa-icf.c (sem_variable::equals): Likewise.
9153         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9154         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9155         wi::to_poly_offset for BIT_FIELD_REF offsets.
9156         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9157         wi::to_poly_offset.
9158         * var-tracking.c (emit_note_insn_var_location): Use
9159         tree_to_poly_uint64.
9161 2018-05-29  Jim Wilson  <jimw@sifive.com>
9163         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9165 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
9167         PR target/85950
9168         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9169         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9170         sequence.
9171         (sse4_1_round<mode>2): Use nonimmediate_operand
9172         for operand 1 predicate.
9174 2018-05-29  Martin Sebor  <msebor@redhat.com>
9175             Richard Biener  <rguenther@suse.de>
9177         PR testsuite/85888
9178         * calls.c (get_size_range): Call determine_value_range instead
9179         of get_value_range..
9180         * tree-vrp.h (determine_value_range): Declared new function.
9181         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9183 2018-05-29  Richard Biener  <rguenther@suse.de>
9185         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9186         sure to use non-pattern stmts for get_earlier_stmt arguments.
9187         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9188         called on pattern stmts.
9189         (get_later_stmt): Likewise.
9191 2018-05-29  Martin Liska  <mliska@suse.cz>
9193         PR gcov-profile/85759
9194         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9195         env variables.
9197 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
9199         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9200         VEC_UNPACK_*_EXPR.
9201         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9202         VEC_PACK_*_EXPR.
9204         PR target/85918
9205         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9206         VEC_PACK_FLOAT_EXPR): New tree codes.
9207         * tree-pretty-print.c (op_code_prio): Handle
9208         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9209         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9210         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9211         * tree-inline.c (estimate_operator_cost): Likewise.
9212         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9213         * fold-const.c (const_binop): Likewise.
9214         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9215         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9216         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9217         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9218         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9219         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9220         * expr.c (expand_expr_real_2): Likewise.
9221         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9222         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9223         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9224         optabs.
9225         * optabs.c (expand_widen_pattern_expr): For
9226         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9227         sign from result type rather than operand's type.
9228         (expand_binop_directly): For vec_packu_float_optab and
9229         vec_packs_float_optab allow result type to be different from operand's
9230         type.
9231         * optabs-tree.c (optab_for_tree_code): Handle
9232         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9233         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
9234         * tree-vect-generic.c (expand_vector_operations_1):  Handle
9235         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9236         VEC_PACK_FLOAT_EXPR.
9237         * tree-vect-stmts.c (supportable_widening_operation): Handle
9238         FIX_TRUNC_EXPR.
9239         (supportable_narrowing_operation): Handle FLOAT_EXPR.
9240         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9241         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9242         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
9243         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9244         mode attributes.
9245         (vec_pack<floatprefix>_float_<mode>): New expander.
9246         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9247         attributes.
9248         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9249         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9250         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9251         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9252         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9253         Document.
9254         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9255         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9256         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9257         VEC_PACK_FLOAT_EXPR): Document.
9259 2018-05-29  Richard Biener  <rguenther@suse.de>
9261         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9262         member.
9263         (stmt_vec_info_vec): Make pointer.
9264         (init_stmt_vec_info_vec): Remove.
9265         (free_stmt_vec_info_vec): Likewise.
9266         (set_stmt_vec_info_vec): New function.
9267         (free_stmt_vec_infos): Likewise.
9268         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9269         (set_vinfo_for_stmt): Likewise.
9270         (get_earlier_stmt): Likewise.
9271         (get_later_stmt): Likewise.
9272         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9273         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9274         (vec_info::~vec_info): Free stmt_vec_infos.
9275         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9276         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9277         (pass_slp_vectorize::execute): Likewise.
9278         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9279         (free_stmt_vec_info_vec): Likewise.
9280         (set_stmt_vec_info_vec): New function.
9281         (free_stmt_vec_infos): Likewise.
9282         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9283         the global stmt_vec_info_vec.
9284         * tree-parloops.c (gather_scalar_reductions): Use
9285         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9286         vector.
9288 2018-05-29  Richard Biener  <rguenther@suse.de>
9290         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9292 2018-05-29  Martin Liska  <mliska@suse.cz>
9293             David Malcolm  <dmalcolm@redhat.com>
9295         * vec.c (test_reverse): New.
9296         (vec_c_tests): Add new test.
9297         * vec.h (vl_ptr>::reverse): New function.
9299 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
9301         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9303         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9304         and later.
9306 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9308         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9310 2018-05-28  Richard Biener  <rguenther@suse.de>
9312         PR tree-optimization/85933
9313         * tree-vect-data-refs.c (vect_record_base_alignments): Only
9314         look at stmts marked as vectorizable.
9316 2018-05-28  Richard Biener  <rguenther@suse.de>
9318         PR tree-optimization/85934
9319         * tree-vect-generic.c (expand_vector_operations_1): Hoist
9320         vector boolean check before scalar optimization.
9322 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
9324         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9325         for armv5te.
9327 2018-05-28  Mark Wielaard  <mark@klomp.org>
9329         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9330         if it is an expression containing a minus sign.
9332 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
9334         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9336 2018-05-27  Paul Koning  <ni1d@arrl.net>
9338         * config/pdp11/pdp11.md (truncsihi2): Remove.
9340 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
9341             Chung-Ju Wu  <jasonwucj@gmail.com>
9343         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9344         implementation.
9345         (unaligned_store_dw): Ditto.
9346         * config/nds32/nds32-memory-manipulation.c
9347         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9348         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9349         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9350         (emit_setmem_word_loop): Rename to ...
9351         (emit_setmem_doubleword_loop): ... this.
9352         (nds32_gen_dup_4_byte_to_word_value): New function.
9353         (nds32_gen_dup_8_byte_to_double_word_value): New function.
9354         (nds32_expand_setmem_loop): Refine implementation.
9355         (nds32_expand_setmem_loop_v3m): Ditto.
9356         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9357         pattern.
9359 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9361         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9363 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9365         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9366         (nds32_init_machine_status): Initialize machine->attr_naked_p and
9367         machine->attr_no_prologue_p.
9368         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9369         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9370         (nds32_expand_epilogue): Consider attr_naked_p.
9371         (nds32_expand_epilogue_v3pop): Likewise.
9372         (nds32_can_use_return_insn): Likewise.
9373         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9374         attr_no_prologue_p fields.
9375         * config/nds32/nds32.opt (mret-in-naked-func): New option.
9377 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
9379         PR target/85918
9380         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9381         attributes.
9382         * config/i386/sse.md
9383         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9384         Rename to ...
9385         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9386         ... this.
9387         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9388         Rename to ...
9389         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9390         ... this.
9391         (*<floatsuffix>floatv2div2sf2): Rename to ...
9392         (*float<floatunssuffix>v2div2sf2): ... this.
9393         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9394         (float<floatunssuffix>v2div2sf2_mask): ... this.
9395         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9396         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9397         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9398         to ...
9399         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9400         ... this.
9401         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9402         Rename to ...
9403         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9404         ... this.
9405         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9406         Rename to ...
9407         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9408         ... this.
9409         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9410         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9411         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9412         gen_ufix_truncv8dfv8si2.
9413         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9414         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9415         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9416         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9417         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9418         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9419         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9420         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9422 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9424         PR target/85900
9425         PR target/85345
9426         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9428 2018-05-25  Jim Wilson  <jimw@sifive.com>
9430         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9431         * config/riscv/riscv.c (struct machine_function): Add
9432         interrupt_handler_p and attribute_checked_p fields.
9433         (riscv_attribute_table): Add interrupt.
9434         (riscv_interrupt_type_p): New.
9435         (riscv_save_reg_p): Save extra regs for interrupt handler.
9436         (riscv_use_save_libcall): Return false  for interrupt handler.
9437         (riscv_first_stack_step): Add forward declaration.
9438         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
9439         for interrupt handler with large frame.  Use it for saved reg list.
9440         (riscv_expand_prologue): Move flag_stack_usage_info support to
9441         eliminate duplication.
9442         (riscv_expand_epilogue): Generate mret for interrupt handler.
9443         (riscv_epilogue_uses): New.
9444         (riscv_can_use_return_insn): Return false for interrupt handler.
9445         (riscv_function_ok_for_sibcall): Likewise.
9446         (riscv_set_current_function): Add interrupt handler support.
9447         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9448         * config/riscv/riscv.md (UNSPECV_MRET): New.
9449         (GP_REGNUM): New.
9450         (riscv_frflags, riscv_fsflags): Use tab after opcode.
9451         (riscv_mret): New.
9452         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9454 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
9456         PR tree-optimization/85712
9457         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9458         this candidate has already been replaced in-situ by a copy.
9460 2018-05-25  Jason Merrill  <jason@redhat.com>
9462         PR c++/80485 - inline function non-zero address.
9463         * symtab.c (nonzero_address): Check DECL_COMDAT.
9465 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9467         PR target/83628
9468         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9469         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9470         extension of SImode operation.  Use const123_operand predicate.
9471         (*saddsi_1): Remove.
9472         (*saddl_se_1): Ditto.
9473         (*ssubsi_1): Ditto.
9474         (*ssubl_se_1): Ditto.
9475         * config/alpha/predicates.md (const123_operand): New predicate.
9476         * config/alpha/constraints.md (P): Use IN_RANGE.
9478 2018-05-25  Richard Biener  <rguenther@suse.de>
9480         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9481         defaulted to true.
9482         (ref_maybe_used_by_stmt_p): Likewise.
9483         (stmt_may_clobber_ref_p): Likewise.
9484         (stmt_may_clobber_ref_p_1): Likewise.
9485         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9486         and pass it along.
9487         (ref_maybe_used_by_stmt_p): Likewise.
9488         (stmt_may_clobber_ref_p): Likewise.
9489         (stmt_may_clobber_ref_p_1): Likewise.
9490         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9491         the alias oracle to disambiguate DRs with stmts DR analysis
9492         couldn't handle.
9493         (vect_analyze_data_refs): Do not give up on not analyzable
9494         DRs for BB vectorization.  Remove code truncating the dataref
9495         vector.
9497 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9499         PR target/85832
9500         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9501         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9502         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9504 2018-05-25  Richard Biener  <rguenther@suse.de>
9506         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9507         function, combining stmt data ref gathering and fatal analysis
9508         parts.
9509         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9510         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9511         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9512         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9513         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9515 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9517         PR tree-optimization/85720
9518         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9519         SCC if all partitions are builtins.
9520         (version_loop_by_alias_check): New parameter.  Generate cancelable
9521         runtime alias check if all partitions are builtins.
9522         (distribute_loop): Update call to above function.
9524 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9526         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9527         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9528         (parm_default_def_partition_arg): Ditto.
9529         (set_parm_default_def_partition): Ditto.
9530         (get_parm_default_def_partitions): Ditto and make it static.
9531         (get_undefined_value_partitions): Ditto and make it static.
9532         (remove_ssa_form): Refactor call to init_var_map here.
9533         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9534         computation for loop region.
9535         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9536         (register_default_def): Delete.
9537         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9538         (parm_default_def_partition_arg): Ditto.
9539         (set_parm_default_def_partition): Ditto.
9540         (get_parm_default_def_partitions): Ditto and make it static.
9541         (get_undefined_value_partitions): Ditto and make it static.
9542         (coalesce_with_default, coalesce_with_default): Update comment.
9543         (create_coalesce_list_for_region): New func factored out from
9544         create_outofssa_var_map.
9545         (populate_coalesce_list_for_outofssa): New func factored out from
9546         create_outofssa_var_map and coalesce_ssa_name.
9547         (create_outofssa_var_map): Delete.
9548         (coalesce_ssa_name): Refactor to support live range computation.
9549         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9550         (get_parm_default_def_partitions): Delete.
9551         (get_undefined_value_partitions): Ditto.
9552         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9553         computation for loop region.
9554         (new_tree_live_info, loe_visit_block): Ditto.
9555         (live_worklist, set_var_live_on_entry): Ditto.
9556         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9557         * tree-ssa-live.h (struct _var_map): New fields.
9558         (init_var_map): Change decl.
9559         (region_contains_p): New.
9561 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9563         * tree-ssa-live.h (live_merge_and_clear): Delete.
9565 2018-05-25  Richard Biener  <rguenther@suse.de>
9567         PR c++/85912
9568         * tree-dump.c (dequeue_and_dump): Remove access to removed
9569         operand 2 of a SWITCH_EXPR.
9571 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9573         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9574         multiplication and division.
9575         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9576         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9577         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9578         (cond_udiv_optab, cond_umod_optab): New optabs.
9579         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9580         (IFN_COND_RDIV): New internal functions.
9581         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9582         TRUNC_MOD_EXPR and RDIV_EXPR.
9583         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9584         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9585         New unspecs.
9586         (SVE_INT_BINARY): Include mult.
9587         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9588         (optab, sve_int_op): Handle mult.
9589         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9590         UNSPEC_COND_DIV.
9591         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9592         for SVE_INT_BINARY_SD.
9594 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9596         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9597         (optab, sve_int_op): Handle div and udiv.
9598         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9599         for SVE_INT_BINARY_SD.
9600         (*<optab><mode>3): New insn for the same.
9602 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9604         * tree-vect-patterns.c: Include predict.h.
9605         (vect_recog_divmod_pattern): Restrict check for division support
9606         to when optimizing for size.
9608 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9610         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9611         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9612         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9613         (gimple_match_op::set_op): Likewise.
9614         (gimple_resimplify4): Declare.
9615         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9616         (expr::gen_transform): Likewise.
9617         (decision_tree::gen): Generate a simplification routine for 4 operands.
9618         * gimple-match-head.c (gimple_simplify): Add an overload for
9619         4 operands.  In the top-level function, handle up to 4 call
9620         arguments and call gimple_resimplify4.
9621         (gimple_resimplify4): New function.
9622         (build_call_internal): Pass a fourth operand.
9623         (maybe_push_to_seq): Likewise.
9624         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9625         Fold VEC_COND_EXPRs of an operation and a default value into
9626         an IFN_COND_* function if possible.
9627         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9628         New unspecs.
9629         (SVE_COND_FP_BINARY): Include them.
9630         (optab, sve_fp_op): Handle them.
9631         (SVE_INT_BINARY_REV): New code iterator.
9632         (SVE_COND_FP_BINARY_REV): New int iterator.
9633         (commutative): New int attribute.
9634         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9635         Declare.
9636         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9637         function.
9638         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9639         (*cond_<optab><mode>): New patterns for reversed operands.
9641 2018-05-25  Richard Biener  <rguenther@suse.de>
9643         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9644         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9645         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9646         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9647         * tree-vect-data-refs.c (everywhere): Adjust users.
9648         * tree-vect-loop.c (everywhere): Likewise.
9649         * tree-vect-slp.c (everywhere): Likewise.
9650         * tree-vect-stmts.c (everywhere): Likewise.
9651         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9653 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9655         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9656         Rename to...
9657         (gcc_cv_as_section_exclude): ... this.
9658         Try Solaris as #exclude syntax.
9659         * configure: Regenerate.
9660         * config.in: Regenerate.
9661         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9662         SECTION_EXCLUDE.
9663         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9664         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9666         * varasm.c (default_elf_asm_named_section): Don't check if
9667         HAVE_GAS_SECTION_EXCLUDE is defined.
9669 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9671         * doc/md.texi: Update the documentation of the cond_* optabs
9672         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9673         Describe the scalar case too.
9674         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9675         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9676         instead of 2.
9677         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9678         (get_conditional_internal_fn): Update comment.
9679         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9680         accumulator value as a final argument to conditional functions.
9681         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9682         a define_expand and add an "else" operand.  Assert for now that
9683         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9684         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9685         (*cond_<optab><mode>): New patterns.
9686         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9687         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9688         (UNSPEC_COND_EOR): Delete.
9689         (optab): Remove associated mappings.
9690         (SVE_INT_BINARY): New code iterator.
9691         (sve_int_op): Remove int attribute and add "minus" to the code
9692         attribute.
9693         (SVE_COND_INT_OP): Delete.
9694         (SVE_COND_FP_OP): Rename to...
9695         (SVE_COND_FP_BINARY): ...this.
9697 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9699         * optabs.c (can_reuse_operands_p): New function.
9700         (maybe_legitimize_operands): Try to reuse the results for
9701         earlier operands.
9703 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9705         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9706         Add {q} suffix to insn mnemonic.
9708 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9710         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9711         (msp430_warn_func_return): New.
9713 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9715         * fold-const.c (tree_nonzero_bits): New function.
9716         * fold-const.h (tree_nonzero_bits): Likewise.
9717         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9718         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9720 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9722         PR target/85900
9723         PR target/85345
9724         * varasm.c (assemble_alias): Check ifunc_resolver only on
9725         FUNCTION_DECL.
9727 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9729         PR target/85903
9730         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9731         when memory input operand is handled.
9733 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9735         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9736         global.
9737         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9739 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9741         * match.pd: Delay FMA folds until after vectorization.
9743 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9745         PR target/83009
9746         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9747         address check not strict.
9749 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9751         * gimple-match.h (gimple_match_op): New class.
9752         (mprts_hook): Replace parameters with a gimple_match_op *.
9753         (maybe_build_generic_op): Likewise.
9754         (gimple_simplified_result_is_gimple_val): Replace parameters with
9755         a const gimple_match_op *.
9756         (gimple_simplify): Replace code_helper * and tree * parameters with
9757         a gimple_match_op * parameter.
9758         (gimple_resimplify1): Replace code_helper *, tree and tree *
9759         parameters with a gimple_match_op * parameter.
9760         (gimple_resimplify2): Likewise.
9761         (gimple_resimplify3): Likewise.
9762         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9763         parameters with a gimple_match_op * parameter.
9764         * gimple-match-head.c (gimple_simplify): Change prototypes of
9765         auto-generated functions to take a gimple_match_op * instead of
9766         separate code_helper * and tree * parameters.  Make the same
9767         change in the top-level overload and update calls to the
9768         gimple_resimplify routines.  Update calls to the auto-generated
9769         functions and to maybe_push_res_to_seq in the publicly-facing
9770         operation-specific gimple_simplify overloads.
9771         (gimple_match_op::MAX_NUM_OPS): Define.
9772         (gimple_resimplify1): Replace rcode and ops with a single res_op
9773         parameter.  Update call to gimple_simplify.
9774         (gimple_resimplify2): Likewise.
9775         (gimple_resimplify3): Likewise.
9776         (mprts_hook): Replace parameters with a gimple_match_op *.
9777         (maybe_build_generic_op): Likewise.
9778         (build_call_internal): Replace type, nargs and ops with
9779         a gimple_match_op *.
9780         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9781         with a single gimple_match_op *.  Update calls to mprts_hook,
9782         build_call_internal and gimple_simplified_result_is_gimple_val.
9783         Factor out code that is common to the tree_code and combined_fn cases.
9784         * genmatch.c (expr::gen_transform): Replace tem_code and
9785         tem_ops with a gimple_match_op called tem_op.  Update calls
9786         to the gimple_resimplify functions and maybe_push_res_to_seq.
9787         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9788         res_ops.  Update call to the gimple_resimplify functions.
9789         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9790         (decision_tree::gen): Make the functions take a gimple_match_op *
9791         called res_op instead of separate res_code and res_ops parameters.
9792         Update call accordingly.
9793         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9794         and ops with a single res_op parameter.  Update calls to
9795         maybe_build_generic_op and maybe_push_res_to_seq.
9796         (fold_stmt_1): Update calls to gimple_simplify and
9797         replace_stmt_with_simplification.
9798         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9799         and gimple_simplified_result_is_gimple_val.
9800         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9801         gimple_simplify.
9802         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9803         with a gimple_match_op *.
9804         (vn_nary_build_or_lookup): Likewise.  Update call to
9805         vn_nary_build_or_lookup_1.
9806         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9807         gimple_match_op *.  Update calls to the gimple_resimplify routines
9808         and to gimple_simplified_result_is_gimple_val.
9809         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9810         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9811         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9812         (visit_nary_op): Likewise.
9813         (visit_reference_op_load): Likewise.
9815 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9817         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9818         modifier for printing the step amount.
9820 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9822         PR target/78849
9823         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9824         types.
9826 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9828         * doc/sourcebuild.texi (Endianness): New subsubsection.
9830 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9832         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9833         <prefetch_dynamic_strides>: New const bool field.
9834         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9835         prefetch_dynamic_strides.
9836         (exynosm1_prefetch_tune): Likewise.
9837         (thunderxt88_prefetch_tune): Likewise.
9838         (thunderx_prefetch_tune): Likewise.
9839         (thunderx2t99_prefetch_tune): Likewise.
9840         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9841         false.
9842         (aarch64_override_options_internal): Update to set
9843         PARAM_PREFETCH_DYNAMIC_STRIDES.
9844         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9845         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9846         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9847         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9848         prefetch-dynamic-strides setting.
9850 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9852         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9853         <minimum_stride>: New const int field.
9854         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9855         minimum_stride field defaulting to -1.
9856         (exynosm1_prefetch_tune): Likewise.
9857         (thunderxt88_prefetch_tune): Likewise.
9858         (thunderx_prefetch_tune): Likewise.
9859         (thunderx2t99_prefetch_tune): Likewise.
9860         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9861         <default_opt_level>: Set to 3.
9862         (aarch64_override_options_internal): Update to set
9863         PARAM_PREFETCH_MINIMUM_STRIDE.
9864         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9865         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9866         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9867         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9868         stride is constant and is below the minimum stride threshold.
9870 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9872         * config/arm/arm-cpus.in (mode26): Delete.
9873         (armv4): Delete mode26 reference.
9874         * config/arm/arm.c (arm_configure_build_target): Delete use of
9875         isa_bit_mode26.
9877 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9879         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9880         New insn pattern.
9881         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9882         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9883         for non-SSE modes.
9884         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9885         (floatunsdidf2): Ditto.
9887 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9889         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9890         (fixuns_trunc<mode>si2_avx512f): Ditto.
9891         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9892         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9893         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9895 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9897         PR rtl-optimization/79985
9898         * df-scan.c (df_insn_refs_collect): Remove special case for
9899         global registers and asm statements.
9901 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9903         * extend.texi (Global Register Variables): Rewrite the bullet list.
9904         Note that the register is available for allocation. Note that access
9905         via inline asm must use constraints. Add note about async-signal
9906         handlers. Remove paragraph about automagic register selection.
9908 2018-05-23  Richard Biener  <rguenther@suse.de>
9910         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9911         of fixed offset from memset VN.
9913 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9915         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9916         first_interp field.
9917         (alloc_cand_and_find_basis): Initialize first_interp field.
9918         (slsr_process_mul): Modify first_interp field.
9919         (slsr_process_add): Likewise.
9920         (slsr_process_cast): Modify first_interp field for each new
9921         interpretation.
9922         (slsr_process_copy): Likewise.
9923         (dump_candidate): Dump first_interp field.
9924         (replace_mult_candidate): Process all interpretations, not just
9925         subsequent ones.
9926         (replace_rhs_if_not_dup): Likewise.
9927         (replace_one_candidate): Likewise.
9929 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9931         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9932         Add new boolean.
9933         (aarch64_needs_frame_chain): New function.
9934         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9936 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9938         PR target/84882
9939         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9940         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9941         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9942         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9943         as true for strict-align.
9944         (aarch64_can_inline_p): Perform checks even when callee has no
9945         attributes to check for strict alignment.
9946         * doc/extend.texi (AArch64 Function Attributes): Document
9947         no-strict-align.
9948         * doc/invoke.texi: (AArch64 Options): Likewise.
9950 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9952         PR tree-optimization/85853
9953         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9954         the handling of the root of the node to...
9955         (vect_slp_analyze_node_operations_1): ...this new function,
9956         and run the whole thing with the child nodes' def types
9957         set according to their SLP node's def type.
9959 2018-05-23  Richard Biener  <rguenther@suse.de>
9961         PR middle-end/85874
9962         * tree-data-ref.c (create_runtime_alias_checks): Defer
9963         and ignore overflow warnings.
9965 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9967         PR tree-optimization/85822
9968         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9969         constants.
9971 2018-05-23  Richard Biener  <rguenther@suse.de>
9973         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9974         memset constants via native_interpret_expr.
9976 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9978         PR target/85345
9979         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9980         attribute.
9981         (cgraph_node::create_alias): Likewise.
9982         (cgraph_node::get_availability): Check ifunc_resolver instead
9983         of looking up ifunc attribute.
9984         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9985         * varasm.c (do_assemble_alias): Likewise.
9986         (assemble_alias): Likewise.
9987         (default_binds_local_p_3): Likewise.
9988         * cgraph.h (cgraph_node): Add ifunc_resolver.
9989         (cgraph_node::only_called_directly_or_aliased_p): Return false
9990         for IFUNC resolver.
9991         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9992         attribute.
9993         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9994         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9995         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9996         instead of looking up ifunc attribute.
9998 2018-05-22  Luis Machado  <luis.machado@linaro.org>
10000         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10002 2018-05-22  Martin Sebor  <msebor@redhat.com>
10004         PR middle-end/85359
10005         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10006         only when expasion succeeds.
10007         (expand_builtin_strcmp): Same.
10008         (expand_builtin_strncmp): Same.
10010 2018-05-22  Martin Sebor  <msebor@redhat.com>
10012         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10014 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10015             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10017         * config/aarch64/aarch64-ldpstp.md: Replace uses of
10018         aarch64_mem_pair_operand with memory_operand and delete operand swapping
10019         code.
10020         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10021         Add check for legitimate_address.
10022         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10023         (aarch64_swap_ldrstr_operands): New.
10024         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10025         Define prototype.
10027 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10028             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10030         * config/aarch64/aarch64.md: New patterns to generate stp
10031         and ldp.
10032         (store_pair_sw, store_pair_dw): New patterns to generate stp for
10033         single words and double words.
10034         (load_pair_sw, load_pair_dw): Likewise.
10035         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10036         Delete.
10037         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10038         Delete.
10039         * config/aarch64/aarch64-ldpstp.md: Modify peephole
10040         for different mode ldpstp and add peephole for merged zero stores.
10041         Likewise for loads.
10042         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10043         Add size check.
10044         (aarch64_gen_store_pair): Rename calls to match new patterns.
10045         (aarch64_gen_load_pair): Rename calls to match new patterns.
10046         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10047         (load_pair<DREG:mode><DREG2:mode>): ... This.
10048         (store_pair<mode>): Rename to...
10049         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10050         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10051         New mode iterators.
10052         (V_INT_EQUIV): Handle SImode.
10053         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10054         New predicate.
10056 2018-05-22  Martin Sebor  <msebor@redhat.com>
10058         PR c/85623
10059         * calls.c (maybe_warn_nonstring_arg): Use string length to set
10060         or ajust the presumed bound on an operation to avoid unnecessary
10061         warnings.
10063 2018-05-22  Martin Sebor  <msebor@redhat.com>
10065         PR tree-optimization/85826
10066         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10067         assuming that a DECL necesarily has a constant size.
10069 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
10071         PR middle-end/85862
10072         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10074 2018-05-22  Richard Biener  <rguenther@suse.de>
10076         PR tree-optimization/85834
10077         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10078         non-constant and non-zero memset arguments.
10080 2018-05-22  Martin Liska  <mliska@suse.cz>
10082         PR ipa/85607
10083         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10085 2018-05-22  Richard Biener  <rguenther@suse.de>
10087         PR tree-optimization/85863
10088         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10089         comparisons when vectype is specified.
10090         (vectorizable_condition): Do not specify vectype for
10091         vect_is_simple_cond when SLP vectorizing.
10093 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
10095         PR target/85657
10096         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10097         define __ibm128 as long double.
10098         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10099         as a distinct type when IEEE 128-bit support is enabled.
10100         (init_float128_ieee): Fix up conversions between IFmode and IEEE
10101         128-bit types to use the correct functions.
10102         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10103         convert between 128-bit floating point types that have different
10104         modes but the same representation, instead of using gen_lowpart to
10105         makean alias.
10106         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10107         KFmode.
10108         (IFKF_reg): New attributes to give the register constraints for
10109         IFmode and KFmode.
10110         (extend<mode>tf2_internal): New insns to mark an explicit
10111         conversion between 128-bit floating point types that have a
10112         different mode but share the same representation.
10114 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
10116         PR tree-optimization/85814
10117         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10118         a null return from get_strinfo when unsharing the next
10119         strinfo in the chain.
10121 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10123         PR gcc/84923
10124         * varasm.c (weak_finish): Clean up weak_decls.
10126 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10128         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10129         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10130         UNSPEC_UADALP values.
10131         * config/aarch64/iterators.md (ABAL): New int iterator.
10132         (ABDL2): Likewise.
10133         (ADALP): Likewise.
10134         (sur): Add mappings for the above.
10135         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10136         New define_insn.
10137         (aarch64_<sur>abal<mode>_4): Likewise.
10138         (aarch64_<sur>adalp<mode>_3): Likewise.
10139         (<sur>sadv16qi): New define_expand.
10141 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
10143         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10144         (*movdf_internal): Ditto.
10145         (*rcpsf2_sse): Ditto.
10146         (*rsqrtsf2_sse): Ditto.
10147         (*sqrt<mode>2_sse): Ditto.
10149 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
10151         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10152         eor3q<mode>4.
10153         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10154         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10155         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10156         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10157         vbcaxq_s64): New.
10158         * config/aarch64/arm_neon.h: Likewise.
10159         * config/aarch64/iterators.md (VQ_I): New.
10161 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
10163         * config.gcc: Add arc/t-multilib-linux to tmake_file for
10164         arc*-*-linux*.
10165         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10166         MULTILIB_DIRNAMES
10168 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10170         * config/nds32/constraints.md (S): New constraint.
10171         * config/nds32/nds32.md (call_internal): Use constraint S.
10172         (call_value_internal): Likewise.
10173         (sibcall_internal): Likewise.
10174         (sibcall_value_internal): Likewise.
10176 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10177             Chung-Ju Wu  <jasonwucj@gmail.com>
10179         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10180         into consideration.
10182 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10183             Chung-Ju Wu  <jasonwucj@gmail.com>
10185         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10186         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10187         (nds32_rtx_costs_impl): Simplify.
10188         (nds32_address_cost_impl): Simplify.
10189         (nds32_init_rtx_costs): New function.
10190         (nds32_rtx_costs_speed_prefer): Likewise.
10191         (nds32_rtx_costs_size_prefer): Likewise.
10192         (nds32_address_cost_speed_prefer): Likewise.
10193         (nds32_address_cost_speed_fwprop): Likewise.
10194         (nds32_address_cost_size_prefer): Likewise.
10195         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10196         * config/nds32/nds32.c (nds32_option_override): Use
10197         nds32_init_rtx_costs function.
10199 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10201         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10202         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10203         (TARGET_PIPELINE_N8): Likewise.
10204         (TARGET_PIPELINE_N10): Likewise.
10205         (TARGET_PIPELINE_N13): Likewise.
10206         (TARGET_PIPELINE_GRAYWOLF): Likewise.
10208 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
10210         * config/nds32/nds32-fpu.md: Update copyright year.
10212 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10214         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10216 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10218         * config/nds32/nds32.c
10219         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10220         * config/nds32/nds32.opt (minline-asm-r15): New option.
10222 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10224         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10225         MASK_HW_ABS.
10226         * config/nds32/nds32.md (abssi2): New pattern.
10228 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
10230         * config/i386/i386.md (rex64namesuffix): New mode attribute.
10231         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10232         Merge insn pattern from sse_cvtsi2ss<round_name> and
10233         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10234         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10235         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10236         using SWI48 mode iterator.
10237         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10238         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10239         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10240         pattern from sse_cvttss2si<round_saeonly_name>
10241         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10242         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10243         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10244         using SWI48 mode iterator.
10245         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10246         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10247         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10248         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10249         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10250         using SWI48 mode iterator.
10251         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10252         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10253         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10254         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10255         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10256         SWI48 mode iterator.
10257         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10258         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10259         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10260         pattern from sse_cvttsd2si<round_saeonly_name>
10261         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10263 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10265         * config/nds32/nds32-md-auxiliary.c
10266         (nds32_valid_smw_lwm_base_p): Refine.
10267         (nds32_output_smw_single_word): Refine.
10268         (nds32_output_smw_double_word): New.
10269         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10271 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10273         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10274         (nds32_output_stack_pop): Refine.
10275         (nds32_expand_unaligned_load): Refine.
10276         (nds32_expand_unaligned_store): Refine.
10278 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10279             Chung-Ju Wu  <jasonwucj@gmail.com>
10281         * config/nds32/constants.md: Add TP_REGNUM constant.
10282         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10283         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10284         UNSPEC_ADD32.
10285         * config/nds32/nds32-doubleword.md: Consider flag_pic.
10286         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10287         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10288         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10289         and PIC code generation.
10290         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10291         code generation.
10292         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10293         optimization.
10294         * config/nds32/nds32.md: Support TLS and PIC.
10295         * config/nds32/nds32.c: Support TLS and PIC.
10296         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10297         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10298         predicate.
10300 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10302         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10303         mode with E_ prefix.
10305 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10306             Chung-Ju Wu  <jasonwucj@gmail.com>
10308         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10309         * config/nds32/nds32-md-auxiliary.c
10310         (symbolic_reference_mentioned_p): New.
10311         (nds32_legitimize_ict_address): New.
10312         (nds32_expand_ict_move): New.
10313         (nds32_indirect_call_referenced_p): New.
10314         (nds32_symbol_binds_local_p): Delete.
10315         (nds32_long_call_p): Modify.
10316         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10317         * config/nds32/nds32-protos.h
10318         (symbolic_reference_mentioned_p): Declare.
10319         (nds32_legitimize_ict_address): Declare.
10320         (nds32_expand_ict_move): Declare.
10321         (nds32_indirect_call_referenced_p): Declare.
10322         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10323         (nds32_relax_group): Use nds32_ict_const_p as condition.
10324         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10325         (nds32_asm_file_start): Output ict_model directive in asm code.
10326         (nds32_legitimate_address_p): Consider indirect call.
10327         (nds32_print_operand): Consider indirect call.
10328         (nds32_print_operand_address): Consider indirect call.
10329         (nds32_insert_attributes): Handle "indirect_call" attribute.
10330         (TARGET_LEGITIMATE_ADDRESS_P): Define.
10331         (TARGET_LEGITIMATE_CONSTANT_P): Define.
10332         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10333         (TARGET_DELEGITIMIZE_ADDRESS): Define.
10334         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10335         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10336         (TARGET_ICT_MODEL_SMALL): Define.
10337         (TARGET_ICT_MODEL_LARGE): Define.
10338         * config/nds32/nds32.md (movsi): Consider ict model.
10339         (call, call_value): Consider ict model.
10340         (sibcall, sibcall_value): Consider ict model.
10341         * config/nds32/nds32.opt (mict-model): New option.
10342         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10343         model.
10345 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
10346             Monk Chiang  <sh.chiang04@gmail.com>
10347             Jim Wilson <jimw@sifive.com>
10349         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10350         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
10351         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10352         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10353         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
10354         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10355         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10356         compute save_libcall_adjustment properly.
10357         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10358         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10359         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10360         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10361         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10362         (ABI_SPEC): Handle mabi=ilp32e.
10363         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10364         (RVE): Add RVE mask.
10365         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10366         <-march>: Add rv32e as an example.
10368 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
10370         PR c++/82899
10371         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10372         (intra_create_variable_infos): Handle C++ constructors.
10374 2018-05-18  Martin Liska  <mliska@suse.cz>
10376         * passes.def: Remove a redundant pass.
10378 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10380         PR bootstrap/85838
10381         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10383 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10385         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10386         (ARMv4): Update.
10387         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10388         (ARMv6m): Update.
10389         (armv2, armv2a, armv3, armv3m): Delete architectures.
10390         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10391         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10392         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10393         Delete cpus.
10394         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10395         (*mulsidi3adddi): Likewise.
10396         (mulsidi3): Likewise.
10397         (*mulsidi3_nov6): Likewise.
10398         (umulsidi3): Likewise.
10399         (umulsidi3_nov6): Likewise.
10400         (umaddsidi4): Likewise.
10401         (*umulsidi3adddi): Likewise.
10402         (smulsi3_highpart): Likewise.
10403         (*smulsi3_highpart_nov6): Likewise.
10404         (umulsi3_highpart): Likewise.
10405         (*umulsi3_highpart_nov6): Likewise.
10406         * config/arm/arm.h (arm_arch3m): Delete.
10407         * config/arm/arm.c (arm_arch3m): Delete.
10408         (arm_option_override_internal): Update armv3-related comment.
10409         (arm_configure_build_target): Delete use of isa_bit_mode32.
10410         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10411         (arm_rtx_costs_internal): Delete check of arm_arch3m.
10412         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10413         (mulsa3): Likewise.
10414         (mulusa3): Likewise.
10415         * config/arm/arm-protos.h (arm_arch3m): Delete.
10416         * config/arm/arm-tables.opt: Regenerate.
10417         * config/arm/arm-tune.md: Likewise.
10418         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10419         deleted architectures.
10421 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10423         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10424         (armv5t, armv5te): New features.
10425         (ARMv5, ARMv5e): Delete fgroups.
10426         (ARMv5t, ARMv5te): Adjust for above changes.
10427         (ARMv6m): Likewise.
10428         (armv5, armv5e): Delete arches.
10429         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10430         arm_arch5.
10431         (*call_reg_arm): Likewise.
10432         (*call_value_reg_armv5): Likewise.
10433         (*call_value_reg_arm): Likewise.
10434         (*call_symbol): Likewise.
10435         (*call_value_symbol): Likewise.
10436         (*sibcall_insn): Likewise.
10437         (*sibcall_value_insn): Likewise.
10438         (clzsi2): Likewise.
10439         (prefetch): Likewise.
10440         (define_split and define_peephole2 dependent on arm_arch5):
10441         Likewise.
10442         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10443         arm_arch5e.
10444         (TARGET_ARM_QBIT): Likewise.
10445         (TARGET_DSP_MULTIPLY): Likewise.
10446         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10447         (arm_arch5, arm_arch5e): Delete.
10448         (arm_arch5t, arm_arch5te): Declare.
10449         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10450         (arm_arch5t): Declare.
10451         (arm_option_reconfigure_globals): Update for the above.
10452         (arm_options_perform_arch_sanity_checks): Update comment, replace
10453         use of arm_arch5 with arm_arch5t.
10454         (use_return_insn): Likewise.
10455         (arm_emit_call_insn): Likewise.
10456         (output_return_instruction): Likewise.
10457         (arm_final_prescan_insn): Likewise.
10458         (arm_coproc_builtin_available): Likewise.
10459         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10460         arm_arch5e with arm_arch5t and arm_arch5te.
10461         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10462         (arm_arch5t, arm_arch5te): Declare.
10463         * config/arm/arm-tables.opt: Regenerate.
10464         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10465         * config/arm/t-multilib: Likewise.
10466         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10467         instead of arm_arch5.
10468         (*call_reg_thumb1): Likewise.
10469         (*call_value_reg_thumb1_v5): Likewise.
10470         (*call_value_reg_thumb1): Likewise.
10471         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10472         unreachable path.
10473         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10475 2018-05-18  Martin Liska  <mliska@suse.cz>
10477         PR gcov-profile/84846
10478         * doc/gcov.texi: Document -t option of gcov tool.
10480 2018-05-18  Martin Liska  <mliska@suse.cz>
10482         PR gcov-profile/84846
10483         * gcov.c (print_usage): Add new -t option.
10484         (process_args): Handle the option.
10485         (generate_results): Use stdout as output when requested by
10486         the option.
10488 2018-05-18  Martin Liska  <mliska@suse.cz>
10490         PR gcov-profile/84846
10491         * coverage.c (coverage_init): Write PWD to .gcno file.
10492         * doc/gcov.texi: Document how working directory is printed.
10493         * gcov-dump.c (dump_gcov_file): Print PWD.
10494         * gcov.c (output_intermediate_file): Likewise.
10495         (read_graph_file): Read PWD string.
10496         (output_lines): Print PWD.
10498 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10500         PR middle-end/85817
10501         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10502         for retval and return false if all args to phi are zero.
10504 2018-05-18  Richard Biener  <rguenther@suse.de>
10506         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10507         method.
10508         (evrp_dom_walker::before_dom_children): Call it.
10510 2018-05-18  Richard Biener  <rguenther@suse.de>
10512         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10513         results when processing array refs with variable index.
10515 2018-05-18  Toon Moene  <toon@moene.org>
10517         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10518         directly after that of -floop-interchange. Indicate that both
10519         options are enabled by default when specifying -O3.
10521 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10523         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10524         iterator.  Delete separate integer-mode vec_set<mode> expander.
10525         (aarch64_simd_vec_setv2di): Delete.
10526         (vec_setv2di): Delete.
10527         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10528         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10529         the "w, r" alternative.
10531 2018-05-18  Martin Liska  <mliska@suse.cz>
10533         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10534         * tree-pass.h (make_pass_lower_switch_O0): New function.
10535         * tree-switch-conversion.c (node_has_low_bound): Remove.
10536         (node_has_high_bound): Likewise.
10537         (node_is_bounded): Likewise.
10538         (class pass_lower_switch): Make it a template type and create
10539         two instances.
10540         (pass_lower_switch::execute): Add template argument.
10541         (make_pass_lower_switch): New function.
10542         (make_pass_lower_switch_O0): New function.
10543         (do_jump_if_equal): Remove.
10544         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10545         all the hard work to tree optimization passes.
10547 2018-05-18  Martin Liska  <mliska@suse.cz>
10549         * dbgcnt.c (limit_low): Renamed from limit.
10550         (limit_high): New variable.
10551         (dbg_cnt_is_enabled): Check for upper limit.
10552         (dbg_cnt): Adjust dumping.
10553         (dbg_cnt_set_limit_by_index): Add new argument for high
10554         value.
10555         (dbg_cnt_set_limit_by_name): Likewise.
10556         (dbg_cnt_process_single_pair): Parse new format.
10557         (dbg_cnt_process_opt): Use strtok.
10558         (dbg_cnt_list_all_counters): Remove 'value' and add
10559         'limit_high'.
10560         * doc/invoke.texi: Document changes.
10562 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10564         * doc/sourcebuild.texi (scalar_all_fma): Document.
10565         * tree.def (FMA_EXPR): Delete.
10566         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10567         * internal-fn.c (ternary_direct): New macro.
10568         (expand_ternary_optab_fn): Likewise.
10569         (direct_ternary_optab_supported_p): Likewise.
10570         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10571         * builtins.c (fold_builtin_fma): Delete.
10572         (fold_builtin_3): Don't call it.
10573         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10574         * expr.c (expand_expr_real_2): Likewise.
10575         * fold-const.c (operand_equal_p): Likewise.
10576         (fold_ternary_loc): Likewise.
10577         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10578         * gimple.c (DEFTREECODE): Likewise.
10579         * gimplify.c (gimplify_expr): Likewise.
10580         * optabs-tree.c (optab_for_tree_code): Likewise.
10581         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10582         * tree-eh.c (operation_could_trap_p): Likewise.
10583         (stmt_could_throw_1_p): Likewise.
10584         * tree-inline.c (estimate_operator_cost): Likewise.
10585         * tree-pretty-print.c (dump_generic_node): Likewise.
10586         (op_code_prio): Likewise.
10587         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10588         * tree-ssa-operands.c (get_expr_operands): Likewise.
10589         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10590         * fold-const-call.h (fold_fma): Delete.
10591         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10592         CFN_FNMA and CFN_FNMS.
10593         (fold_fma): Delete.
10594         * genmatch.c (combined_fn): New enum.
10595         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10596         (commutative_op): New function.
10597         (commutate): Use it.  Handle more than 2 operands.
10598         (dt_operand::gen_gimple_expr): Use commutative_op.
10599         (parser::parse_expr): Allow :c to be used with non-binary
10600         operators if the commutative operand is known.
10601         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10602         CFN_FMS, CFN_FNMA and CFN_FNMS.
10603         (backprop::process_assign_use): Remove FMA_EXPR handling.
10604         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10605         (gen_hsa_fma): New function.
10606         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10607         IFN_FNMA and IFN_FNMS.
10608         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10609         * gimple-fold.h (follow_all_ssa_edges): Declare.
10610         * gimple-fold.c (follow_all_ssa_edges): New function.
10611         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10612         gimple_build interface and use follow_all_ssa_edges to fold the result.
10613         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10614         instead of checking for optabs directly.
10615         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10616         rather than FMA_EXPRs.
10617         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10618         call to IFN_FMA instead of an FMA_EXPR.
10620 2018-05-17  Jim Wilson  <jimw@sifive.com>
10622         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10623         sign extended promoted subreg, and the range does not have the sign bit
10624         set, then do a sign extend.
10626         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10627         test, check for sign extended subreg and/or constant operands, and
10628         do a sign extend in that case.
10630 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10632         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10633         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10634         Add untyped.
10635         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10636         Change logics_shift_reg to logics_shift_imm.
10637         (thunderx2t99_fp_loadpair_basic): Delete.
10638         (thunderx2t99_fp_storepair_basic): Delete.
10639         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10640         (thunderx2t99_asimd_polynomial): Delete.
10641         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10642         and neon_fp_mul_d_scalar_q.
10643         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10644         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10645         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10646         (thunderx2t99_asimd_lut): Add missing tbl types.
10647         (thunderx2t99_asimd_ext): Delete.
10648         (thunderx2t99_asimd_load1_1_mult): Delete.
10649         (thunderx2t99_asimd_load1_2_mult): Delete.
10650         (thunderx2t99_asimd_load1_ldp): New.
10651         (thunderx2t99_asimd_load1): New.
10652         (thunderx2t99_asimd_load2): Add missing *load2* types.
10653         (thunderx2t99_asimd_load3): New.
10654         (thunderx2t99_asimd_load4): New.
10655         (thunderx2t99_asimd_store1_1_mult): Delete.
10656         (thunderx2t99_asimd_store1_2_mult): Delete.
10657         (thunderx2t99_asimd_store2_mult): Delete.
10658         (thunderx2t99_asimd_store2_onelane): Delete.
10659         (thunderx2t99_asimd_store_stp): New.
10660         (thunderx2t99_asimd_store1): New.
10661         (thunderx2t99_asimd_store2): New.
10662         (thunderx2t99_asimd_store3): New.
10663         (thunderx2t99_asimd_store4): New.
10665 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10667         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10668         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10670 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10671             Segher Boessenkool  <segher@kernel.crashing.org>
10673         PR target/85698
10674         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10675         operand.
10677 2018-05-17  Richard Biener  <rguenther@suse.de>
10679         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10680         for pruning loop and prune defs feeding only already visited PHIs.
10682 2018-05-17  Richard Biener  <rguenther@suse.de>
10684         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10686 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10687             Richard Biener  <rguenther@suse.de>
10689         PR tree-optimization/85793
10690         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10691         for VMAT_ELEMENTWISE.
10693 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10695         * internal-fn.h (lookup_internal_fn): Declare
10696         * internal-fn.c (lookup_internal_fn): New function.
10697         * gimple.c (gimple_build_call_from_tree): Handle calls to
10698         internal functions.
10699         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10700         internal function names.
10701         * tree-pretty-print.c (dump_generic_node): Likewise.
10702         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10704 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10706         * gimple-fold.h (gimple_build): Make the function forms take
10707         combined_fn rather than built_in_function.
10708         (gimple_simplify): Likewise.
10709         * gimple-match-head.c (gimple_simplify): Likewise.
10710         * gimple-fold.c (gimple_build): Likewise.
10711         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10712         rather than gimple_build_call_internal.
10713         (get_initial_defs_for_reduction): Likewise.
10714         (vect_create_epilog_for_reduction): Likewise.
10715         (vectorizable_live_operation): Likewise.
10717 2018-05-17  Martin Liska  <mliska@suse.cz>
10719         * gimple-ssa-sprintf.c (format_directive): Do not use
10720         space in between 'G_' and '('.
10722 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10724         PR target/85323
10725         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10726         even if the mask is not all ones.
10728         PR target/85323
10729         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10730         vector.
10731         (ix86_gimple_fold_builtin): Likewise.
10733         PR target/85323
10734         * config/i386/i386.c: Include tree-vector-builder.h.
10735         (ix86_vector_shift_count): New function.
10736         (ix86_fold_builtin): Fold shift builtins by scalar count.
10737         (ix86_gimple_fold_builtin): Likewise.
10739         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10740         _mm512_setzero): New intrinsics.
10742 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10743             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10745         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10746         code generation for cases where splatting a value is not useful.
10747         * simplify-rtx.c (simplify_ternary_operation): Simplify
10748         vec_merge across a vec_duplicate and a paradoxical subreg forming
10749         a vector mode to a vec_concat.
10751 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10753         * config.gcc: Support "goldmont-plus".
10754         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10755         "goldmont-plus".
10756         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10757         PROCESSOR_GOLDMONT_PLUS.
10758         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10759         (processor_target_table): Add "goldmont-plus".
10760         (PTA_GOLDMONT_PLUS): Define.
10761         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10762         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10763         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10764         (fold_builtin_cpu): Add "goldmont-plus".
10765         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10766         (ix86_option_override_internal): Add "goldmont-plus".
10767         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10768         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10769         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10770         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10772 2018-05-17  Richard Biener  <rguenther@suse.de>
10774         PR tree-optimization/85757
10775         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10776         remove defs that only feed that PHI from further processing.
10778 2018-05-16  Jim Wilson  <jimw@sifive.com>
10780         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10781         asterisk to name.
10782         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10784 2018-05-16  Mark Wielaard  <mark@klomp.org>
10786         * dwarf2out.c (count_index_strings): New function.
10787         (output_indirect_strings): Call count_index_strings and generate
10788         header for dwarf_version >= 5.
10790 2018-05-16  Mark Wielaard  <mark@klomp.org>
10792         * dwarf2out.c (dwarf_FORM): New function.
10793         (set_indirect_string): Use dwarf_FORM.
10794         (reset_indirect_string): Likewise.
10795         (size_of_die): Likewise.
10796         (value_format): Likewise.
10797         (output_die): Likewise.
10798         (add_skeleton_AT_string): Likewise.
10799         (output_macinfo_op): Likewise.
10800         (index_string): Likewise.
10801         (output_index_string_offset): Likewise.
10802         (output_index_string): Likewise.
10803         (count_index_strings): Likewise.
10805 2018-05-16  Carl Love  <cel@us.ibm.com>
10807         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10808         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10810 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10812         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10813         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10815 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10817         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10818         (fnma<mode>4): Likewise.
10819         (fms<mode>4): Likewise.
10820         (fnms<mode>4): Likewise.
10821         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10822         (aarch64_fnma<mode>4): Likewise.
10823         (aarch64_fms<mode>4): Likewise.
10824         (aarch64_fnms<mode>4): Likewise.
10825         (aarch64_fnmadd<mode>4): Likewise.
10827 2018-05-16  Jason Merrill  <jason@redhat.com>
10829         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10831 2018-05-16  Richard Biener  <rguenther@suse.de>
10833         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10834         (dump_stmt_cost): Declare.
10835         (add_stmt_cost): Dump cost we add.
10836         (add_stmt_costs): New function.
10837         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10838         No longer exported.
10839         (vect_analyze_stmt): Adjust prototype.
10840         (vectorizable_condition): Likewise.
10841         (vectorizable_live_operation): Likewise.
10842         (vectorizable_reduction): Likewise.
10843         (vectorizable_induction): Likewise.
10844         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10845         cost vector to pass to vectorizable_ and record afterwards.
10846         (vect_model_reduction_cost): Take cost vector argument and adjust.
10847         (vect_model_induction_cost): Likewise.
10848         (vectorizable_reduction): Likewise.
10849         (vectorizable_induction): Likewise.
10850         (vectorizable_live_operation): Likewise.
10851         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10852         SLP_TREE_NUMBER_OF_VEC_STMTS.
10853         (vect_analyze_slp_cost_1): Remove.
10854         (vect_analyze_slp_cost): Likewise.
10855         (vect_slp_analyze_node_operations): Take visited args and
10856         a target cost vector.  Avoid processing already visited stmt sets.
10857         (vect_slp_analyze_operations): Use a local cost vector to gather
10858         costs and register those of non-discarded instances.
10859         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10860         (vect_schedule_slp_instance): Remove copying of
10861         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10862         zero.
10863         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10864         adding cost.  Record cost entry location.
10865         (vect_prologue_cost_for_slp_op): Function to compute cost of
10866         a constant or invariant generated for SLP vect in the prologue,
10867         split out from vect_analyze_slp_cost_1.
10868         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10869         (vect_model_promotion_demotion_cost): Likewise.
10870         (vect_model_store_cost): Likewise, make static.
10871         (vect_model_load_cost): Likewise.
10872         (vectorizable_bswap): Add cost vector arg and adjust.
10873         (vectorizable_call): Likewise.
10874         (vectorizable_simd_clone_call): Likewise.
10875         (vectorizable_conversion): Likewise.
10876         (vectorizable_assignment): Likewise.
10877         (vectorizable_shift): Likewise.
10878         (vectorizable_operation): Likewise.
10879         (vectorizable_store): Likewise.
10880         (vectorizable_load): Likewise.
10881         (vectorizable_condition): Likewise.
10882         (vectorizable_comparison): Likewise.
10883         (can_vectorize_live_stmts): Likewise.
10884         (vect_analyze_stmt): Likewise.
10885         (vect_transform_stmt): Adjust calls to vectorizable_*.
10886         * tree-vectorizer.c: Include gimple-pretty-print.h.
10887         (dump_stmt_cost): New function.
10889 2018-05-16  Richard Biener  <rguenther@suse.de>
10891         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10892         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10893         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10894         (check_name): New callback.
10895         (dse_classify_store): Track cycles via a visited bitmap of PHI
10896         defs and simplify handling of in-loop and across loop dead stores
10897         and properly fail for loop-variant refs.  Handle byte-tracking with
10898         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10899         limiting the walk.
10901 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10903         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10904         (vect_get_mask_type_for_stmt): Likewise.
10905         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10906         split out from...
10907         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10908         to determine the statement's vector type and the vector type that
10909         should be used for calculating nunits.  Deal with cases in which
10910         the type has to be deferred.
10911         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10912         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10913         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10914         (vect_determine_vf_for_stmt): New functions, split out from...
10915         (vect_determine_vectorization_factor): ...here.
10916         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10917         (vect_get_mask_type_for_stmt): New functions, split out from
10918         vect_determine_vectorization_factor.
10920 2018-05-16  Richard Biener  <rguenther@suse.de>
10922         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10923         verify the [VEC_]COND_EXPR embedded comparison.
10925 2018-05-15  Martin Sebor  <msebor@redhat.com>
10927         PR tree-optimization/85753
10928         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10929         RECORD_TYPE in addition to ARRAY_TYPE.
10931 2018-05-15  Martin Sebor  <msebor@redhat.com>
10933         PR middle-end/85643
10934         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10936 2018-05-15  Richard Biener  <rguenther@suse.de>
10938         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10939         add by_clobber_p one.  Change algorithm to collect all defs
10940         representing uses we need to walk and try reducing them to
10941         a single one before failing.
10942         (dse_dom_walker::dse_optimize_stmt): Adjust.
10944 2018-05-13  Mark Wielaard  <mark@klomp.org>
10946         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10947         (size_of_loc_descr): Likewise.
10948         (output_loc_operands): Likewise.
10949         (output_loc_operands_raw): Likewise.
10950         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10951         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10952         (hash_loc_operands): Likewise.
10953         (compare_loc_operands): Likewise.
10955 2018-05-14  Mark Wielaard  <mark@klomp.org>
10957         * dwarf2out.c (count_index_addrs): New function.
10958         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10960 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10962         PR tree-optimization/83648
10963         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10964         return value as malloc candidate.
10966 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10968         PR ipa/85734
10969         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10970         param as true in call to suggest_attribute.
10972 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10974         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10975         -mreadonly-in-sdata.
10977 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10979         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10980         New pattern.
10981         (aarch64_crypto_aesd_fused): Likewise.
10983 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10985         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10986         (movsi_aarch64): Likewise.
10987         (load_pairsi): Likewise.
10988         (load_pairdi): Likewise.
10989         (store_pairsi): Likewise.
10990         (store_pairdi): Likewise.
10991         (load_pairsf): Likewise.
10992         (load_pairdf): Likewise.
10993         (store_pairsf): Likewise.
10994         (store_pairdf): Likewise.
10995         (zero_extend): Likewise.
10996         (trunc): Swap alternatives.
10997         (fcvt_target): Add '?' to prefer w over r.
10999 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
11001         PR target/85756
11002         * config/i386/i386.md: Disallow non-commutative arithmetics in
11003         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11004         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
11005         in the peephole2 before it.
11007 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
11009         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11010         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11011         (ix86_handle_option): Handle -mcldemote.
11012         * config.gcc: New header.
11013         * config/i386/cldemoteintrin.h: New file.
11014         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11015         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11016         -mcldemote.
11017         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11018         OPTION_MASK_ISA_CLDEMOTE.
11019         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11020         (ix86_valid_target_attribute_inner_p): Ditto.
11021         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11022         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11023         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11024         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11025         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11026         (cldemote): New.
11027         * config/i386/i386.opt: Add -mcldemote.
11028         * config/i386/x86intrin.h: New header.
11029         * doc/invoke.texi: Add -mcldemote.
11031 2018-05-14  Richard Biener  <rguenther@suse.de>
11033         * doc/match-and-simplify.texi: Adjust :s documentation.
11035 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
11037         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11038         intended memcpy size.
11039         (REORDER_45): Likewise.
11041 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
11043         * sort.cc: New file.
11044         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11045         * vec.c (qsort_chk): Use gcc_qsort.
11046         * Makefile.in (OBJS-libcommon): Add sort.o.
11047         (build/sort.o): New target.  Use it...
11048         (BUILD_RTL): ... here, and...
11049         (build/gencfn-macros): ... here, and...
11050         (build/genmatch): ... here.
11052 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11053             Chung-Ju Wu  <jasonwucj@gmail.com>
11055         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11056         * config/nds32/nds32-graywolf.md: New file.
11057         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11058         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11059         pipeline.
11060         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11061         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11062         * config/nds32/nds32.md (pipeline_model): Add graywolf.
11063         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11064         * config/nds32/pipelines.md: Include n15 settings.
11066 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11067             Chung-Ju Wu  <jasonwucj@gmail.com>
11069         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11070         * config/nds32/nds32-n13.md: New file.
11071         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11072         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11073         pipeline.
11074         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11075         * config/nds32/nds32.md (pipeline_model): Add n13.
11076         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11077         * config/nds32/pipelines.md: Include n13 settings.
11079 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11080             Chung-Ju Wu  <jasonwucj@gmail.com>
11082         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11083         * config/nds32/nds32-n10.md: New file.
11084         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11085         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11086         pipeline.
11087         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11088         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11089         * config/nds32/nds32.md (pipeline_model): Add n10.
11090         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11091         * config/nds32/pipelines.md: Include n10 settings.
11093 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
11094             Kito Cheng  <kito.cheng@gmail.com>
11095             Chung-Ju Wu  <jasonwucj@gmail.com>
11097         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11098         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11099         Add enum values for DSP extension instructions.
11100         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11101         New constraints.
11102         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11103         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11104         New code iterators.
11105         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11106         * config/nds32/nds32-dspext.md: New file for DSP implementation.
11107         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11108         * config/nds32/nds32-intrinsic.md: Likewise.
11109         * config/nds32/nds32_intrinsic.h: Likewise.
11110         * config/nds32/nds32-md-auxiliary.c: Likewise.
11111         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11112         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11113         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11114         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11115         * config/nds32/nds32-protos.h: New declarations for DSP extension.
11116         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11117         TYPE_DMAC in switch statement.
11118         * config/nds32/nds32.c: New checking and implementation for DSP
11119         extension instructions.
11120         * config/nds32/nds32.h: Likewise.
11121         * config/nds32/nds32.md: Likewise.
11122         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11123         * config/nds32/predicates.md: Implement new predicates for DSP
11124         extension.
11126 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11128         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11129         Reformat alternatives and attributes so it is easier to identify
11130         which constraints/attributes go with which instruction.
11131         (mov<mode>_hardfloat32, FMOVE64): Likewise.
11132         (mov<mode>_softfloat32, FMOVE64): Likewise.
11133         (mov<mode>_hardfloat64, FMOVE64): Likewise.
11134         (mov<mode>_softfloat64, FMOVE64): Likewise.
11136 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11138         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11139         subsection.
11140         (Basic PowerPC Built-in Functions): The new name of the
11141         subsection previously known as "PowerPC Built-in Functions".
11142         (Basic PowerPC Built-in Functions Available on all Configurations):
11143         New subsubsection.
11144         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11145         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11146         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11147         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11149 2018-05-11  Martin Jambor  <mjambor@suse.cz>
11151         PR ipa/85655
11152         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11153         single const.
11155 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11157         PR target/85733
11158         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11160 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
11162         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11163         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11164         (ix86_handle_option): Handle -mwaitpkg.
11165         * config.gcc: New header.
11166         * config/i386/cpuid.h (bit_WAITPKG): New bit.
11167         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11168         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11169         function type.
11170         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11171         OPTION_MASK_ISA_WAITPKG.
11172         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11173         (ix86_option_override_internal): Add PTA_WAITPKG.
11174         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11175         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11176         IX86_BUILTIN_TPAUSE.
11177         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11178         __builtin_ia32_umwait and __builtin_ia32_tpause.
11179         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11180         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11181         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11182         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11183         UNSPECV_TPAUSE): New.
11184         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11185         * config/i386/i386.opt: Add -mwaitpkg.
11186         * config/i386/waitpkgintrin.h: New file.
11187         * config/i386/x86intrin.h: New header.
11188         * doc/invoke.texi: Add -mwaitpkg.
11190 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11192         PR target/85606
11193         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11194         equivalent.
11195         (cortex-m0): Use armv6s-m isa.
11196         (cortex-m0plus): Likewise.
11197         (cortex-m1): Likewise.
11198         (cortex-m0.small-multiply): Likewise.
11199         (cortex-m0plus.small-multiply): Likewise.
11200         (cortex-m1.small-multiply): Likewise.
11202 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
11203             Jakub Jelinek  <jakub@redhat.com>
11205         PR tree-optimization/85692
11206         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11207         source permute as well.
11209 2018-05-11  Martin Liska  <mliska@suse.cz>
11211         PR sanitizer/85556
11212         * doc/extend.texi: Document LLVM style format for no_sanitize
11213         attribute.
11215 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11217         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11218         mode_supports_vsx_dform_quad to mode_supports_dq_form.
11219         (mode_supports_vsx_dform_quad): Likewise.
11220         (mode_supports_vmx_dform): Move these functions to be next to the
11221         other mode_supports functions.
11222         (mode_supports_dq_form): Likewise.
11223         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11224         mode_supports_dq_form.
11225         (reg_offset_addressing_ok_p): Likewise.
11226         (offsettable_ok_by_alignment): Likewise.
11227         (rs6000_legitimate_offset_address_p): Likewise.
11228         (legitimate_lo_sum_address_p): Likewise.
11229         (rs6000_legitimize_address): Likewise.
11230         (rs6000_legitimize_reload_address): Likewise.
11231         (rs6000_secondary_reload_inner): Likewise.
11232         (rs6000_preferred_reload_class): Likewise.
11233         (rs6000_output_move_128bit): Likewise.
11235 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11237         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11238         Generate SImode target register for null target.
11239         <case IX86_BUILTIN_XGETBV>: Ditto.
11240         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11241         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11243 2018-05-10  Carl Love  <cel@us.ibm.com>
11245         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11246         dcbtt and dcbtstt if operands[2] is 0.
11248 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11250         PR target/85693
11251         * config/i386/sse.md (usadv64qi): New expander.
11253 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
11255         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11256         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11257         -maltivec=be support.
11258         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11259         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11260         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11261         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11262         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11263         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11264         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11265         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11266         altivec_vsumsws): Adjust.
11267         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11268         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11269         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11270         support.
11271         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11272         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11273         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11274         (altivec_lve<VI_char>x): Delete expand.
11275         (*altivec_lve<VI_char>x_internal): Rename to...
11276         (altivec_lve<VI_char>x): ... this.
11277         (altivec_lvxl_<mode>): Delete expand.
11278         (*altivec_lvxl_<mode>_internal): Rename to ...
11279         (altivec_lvxl_<mode>): ... this.
11280         (altivec_stvxl_<mode>): Delete expand.
11281         (*altivec_stvxl_<mode>_internal): Rename to ...
11282         (altivec_stvxl_<mode>): ... this.
11283         (altivec_stve<VI_char>x): Delete expand.
11284         (*altivec_stve<VI_char>x_internal): Rename to ...
11285         (altivec_stve<VI_char>x): ... this.
11286         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11287         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11288         reduc_plus_scal_<mode>): Adjust.
11289         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11290         comment.
11291         (rs6000_cpu_cpp_builtins): Adjust.
11292         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11293         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11294         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11295         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11296         -maltivec=be support.
11297         (rs6000_split_vec_extract_var): Adjust.
11298         (rs6000_split_v4si_init): Adjust.
11299         (swap_selector_for_mode): Delete.
11300         (altivec_expand_lvx_be, altivec_expand_stvx_be,
11301         altivec_expand_stvex_be): Delete.
11302         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11303         -maltivec=be support.
11304         (rs6000_gimple_fold_builtin): Ditto.
11305         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11306         Adjust.
11307         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11308         (TARGET_DIRECT_MOVE_64BIT): Adjust.
11309         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11310         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11311         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11312         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11313         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11314         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11315         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11316         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11317         anonymous split): Adjust.
11318         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11319         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11321 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
11323         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11324         when --with-gxx-include-dir is also specified.
11325         * configure: Regenerate.
11327 2018-05-09  Jim Wilson  <jimw@sifive.com>
11329         PR target/84797
11330         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11331         * config/riscv/t-withmultilib: New.
11332         * config/riscv/withmultilib.h: New.
11333         * doc/install.texi: Document RISC-V --with-multilib-list support.
11335 2018-05-09  Richard Biener  <rguenther@suse.de>
11337         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11338         vector.
11339         (vect_bb_vectorization_profitable_p): Adjust.  Compute
11340         actual scalar cost using the cost vector and the add_stmt_cost
11341         machinery.
11343 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11345         PR rtl-optimization/85645
11346         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11347         in the REG_CFA_REGISTER note for LR, don't leave it empty.
11349 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11351         PR rtl-optimization/85645
11352         * shrink-wrap.c (spread_components): Return a boolean saying if
11353         anything was changed.
11354         (try_shrink_wrapping_separate): Iterate spread_components until
11355         nothing changes anymore.
11357 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11359         PR rtl-optimization/85645
11360         * regrename.c (build_def_use): Also kill the chains that include the
11361         destination of a REG_CFA_REGISTER note.
11363 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11365         PR rtl-optimization/85645
11366         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11367         insn that has a REG_CFA_REGISTER note.
11369 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
11371         * cfgexpand.c (expand_clobber): New function.
11372         (expand_gimple_stmt_1): Use it.
11373         * tree-vect-stmts.c (vect_clobber_variable): New function,
11374         split out from...
11375         (vectorizable_simd_clone_call): ...here.
11376         (vectorizable_store): Emit a clobber either side of an
11377         IFN_STORE_LANES sequence.
11378         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11380 2018-05-09  Tom de Vries  <tom@codesourcery.com>
11382         PR target/85626
11383         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11384         (define_insn "trap_if_false"): Add exit after trap.
11386 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
11388         PR rtl-optimization/85638
11389         * bb-reorder.c: Include common/common-target.h.
11390         (create_forwarder_block): New function extracted from...
11391         (fix_up_crossing_landing_pad): ...here.  Rename into...
11392         (dw2_fix_up_crossing_landing_pad): ...this.
11393         (sjlj_fix_up_crossing_landing_pad): New function.
11394         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11395         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11396         from both partitions and exit the loop after one iteration.
11398 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11400         Revert:
11401         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11402         subsection.
11403         (Basic PowerPC Built-in Functions): The new name of the
11404         subsection previously known as "PowerPC Built-in Functions".
11405         (Basic PowerPC Built-in Functions Available on all Configurations):
11406         New subsubsection.
11407         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11408         subsubsection.
11409         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11410         subsubsection.
11411         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11412         subsubsection.
11413         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11414         subsubsection.
11416 2018-05-08  Jim Wilson  <jimw@sifive.com>
11418         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11419         (LD_EMUL_SUFFIX): New.
11420         (LINK_SPEC): Use it.
11422 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11424         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11425         subsection.
11426         (Basic PowerPC Built-in Functions): The new name of the
11427         subsection previously known as "PowerPC Built-in Functions".
11428         (Basic PowerPC Built-in Functions Available on all Configurations):
11429         New subsubsection.
11430         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11431         subsubsection.
11432         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11433         subsubsection.
11434         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11435         subsubsection.
11436         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11437         subsubsection.
11439 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11441         PR target/85683
11442         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11443         after cmpelim optimization.
11445 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
11447         * config.gcc: Support "goldmont".
11448         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11449         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11450         PROCESSOR_GOLDMONT.
11451         * config/i386/i386.c (m_GOLDMONT): Define.
11452         (processor_target_table): Add "goldmont".
11453         (PTA_GOLDMONT): Define.
11454         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11455         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11456         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11457         (fold_builtin_cpu): Add "goldmont".
11458         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11459         (ix86_option_override_internal): Add "goldmont".
11460         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11461         (processor_type): Add PROCESSOR_GOLDMONT.
11462         * config/i386/i386.md: Add CPU "glm".
11463         * config/i386/glm.md: New file.
11464         * config/i386/x86-tune.def: Add m_GOLDMONT.
11465         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11467 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11469         PR target/85572
11470         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11471         E_V4DImode.
11472         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11473         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
11474         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
11476         PR target/85317
11477         * config/i386/i386.c (ix86_fold_builtin): Handle
11478         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11480         PR target/85480
11481         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11482         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11484 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
11486         PR target/85658
11487         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11488         (check_arch): Likewise.
11489         (check_fpu): Return the result rather than printing it.
11490         (end arch): Fix operator precedence.
11491         (end cpu): Likewise.
11492         (END): Print the result from check_fpu.
11494 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11495             Alan Hayward  <alan.hayward@arm.com>
11496             David Sherwood  <david.sherwood@arm.com>
11498         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11499         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11500         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11501         (*fcmuo<mode>_and): New patterns.
11503 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11505         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11506         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11507         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11508         (cmp_op, sve_imm_con): New code attributes.
11509         (SVE_COND_INT_CMP, imm_con): Delete.
11510         (cmp_op): Remove above unspecs from int attribute.
11511         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11512         to...
11513         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11514         comparison-specific unspecs.
11515         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11516         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11517         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11518         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11519         (*vec_fcm<cmp_op><mode>): Rename to...
11520         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11521         (*vec_fcmuo<mode>): Rename to...
11522         (*fcmuo<mode>): ...this and adjust likewise.
11523         (*pred_fcm<cmp_op><mode>): New pattern.
11524         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11525         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11526         functions.
11527         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11528         and UNORDERED.
11529         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11530         (aarch64_emit_sve_predicated_cond): New function.
11531         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11532         (aarch64_emit_unspec_cond_or): Replace with...
11533         (aarch64_emit_sve_or_conds): ...this new function.  Use
11534         aarch64_emit_sve_ptrue_op for the individual comparisons and
11535         aarch64_emit_binop to OR them together.
11536         (aarch64_emit_inverted_unspec_cond): Replace with...
11537         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11538         aarch64_emit_sve_ptrue_op for the comparison and
11539         aarch64_emit_unop to invert the result.
11540         (aarch64_expand_sve_vec_cmp_float): Update after the above
11541         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11543 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11545         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11546         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11547         (Backwards Compatibility): Likewise.
11549 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11551         PR bootstrap/85681
11552         Revert:
11553         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11555         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11556         <prefetch_dynamic_strides>: New const bool field.
11557         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11558         prefetch_dynamic_strides.
11559         (exynosm1_prefetch_tune): Likewise.
11560         (thunderxt88_prefetch_tune): Likewise.
11561         (thunderx_prefetch_tune): Likewise.
11562         (thunderx2t99_prefetch_tune): Likewise.
11563         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11564         to false.
11565         (aarch64_override_options_internal): Update to set
11566         PARAM_PREFETCH_DYNAMIC_STRIDES.
11567         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11568         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11569         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11570         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11571         prefetch-dynamic-strides setting.
11573         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11575         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11576         <minimum_stride>: New const int field.
11577         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11578         minimum_stride field.
11579         (exynosm1_prefetch_tune): Likewise.
11580         (thunderxt88_prefetch_tune): Likewise.
11581         (thunderx_prefetch_tune): Likewise.
11582         (thunderx2t99_prefetch_tune): Likewise.
11583         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11584         (aarch64_override_options_internal): Update to set
11585         PARAM_PREFETCH_MINIMUM_STRIDE.
11586         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11587         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11588         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11589         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11590         stride is constant and is below the minimum stride threshold.
11592 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11594         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11595         to 512.
11597 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11599         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11600         <prefetch_dynamic_strides>: New const bool field.
11601         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11602         prefetch_dynamic_strides.
11603         (exynosm1_prefetch_tune): Likewise.
11604         (thunderxt88_prefetch_tune): Likewise.
11605         (thunderx_prefetch_tune): Likewise.
11606         (thunderx2t99_prefetch_tune): Likewise.
11607         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11608         to false.
11609         (aarch64_override_options_internal): Update to set
11610         PARAM_PREFETCH_DYNAMIC_STRIDES.
11611         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11612         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11613         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11614         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11615         prefetch-dynamic-strides setting.
11617 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11619         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11620         <minimum_stride>: New const int field.
11621         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11622         minimum_stride field.
11623         (exynosm1_prefetch_tune): Likewise.
11624         (thunderxt88_prefetch_tune): Likewise.
11625         (thunderx_prefetch_tune): Likewise.
11626         (thunderx2t99_prefetch_tune): Likewise.
11627         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11628         (aarch64_override_options_internal): Update to set
11629         PARAM_PREFETCH_MINIMUM_STRIDE.
11630         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11631         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11632         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11633         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11634         stride is constant and is below the minimum stride threshold.
11636 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11638         PR c++/85659
11639         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11640         the type is addressable.  Don't force op into register if it has
11641         BLKmode.
11643 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11645         PR other/77609
11646         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11647         any section for which we don't know a specific type it should have,
11648         regardless of name.  Previously this was done only for the exact
11649         names ".init_array", ".fini_array", and ".preinit_array".
11650         (default_elf_asm_named_section): Add comment about
11651         relationship with default_section_type_flags and SECTION_NOTYPE.
11652         (get_section): Don't consider it a type conflict if one side has
11653         SECTION_NOTYPE and the other doesn't, as long as neither has the
11654         SECTION_BSS et al used in the default_section_type_flags logic.
11656 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11658         PR target/85653
11659         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11660         (workaround_barsyncs): New function.
11661         (nvptx_reorg): Use workaround_barsyncs.
11662         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11663         (define_expand "nvptx_membar_cta"): New define_expand.
11664         (define_insn "*nvptx_membar_cta"): New insn.
11666 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11668         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11669         To improve optimization opportunities.
11670         * builtin-types.def: The new needed builtin types for the above.
11672 2018-05-04  Richard Biener  <rguenther@suse.de>
11674         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11675         * gimple-ssa-store-merging.c
11676         (imm_store_chain_info::output_merged_store): Remove redundant create,
11677         release split_store vector contents on failure.
11678         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11679         scalar stmt vector on cache hit.
11681 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11683         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11684         Xilinx FP support.
11685         * config.gcc (powerpc-xilinx-eabi*): Remove.
11686         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11687         support.
11688         (fusion_addis_mem_combo_load): Ditto.
11689         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11690         FP support.
11691         (rs6000_cpu_cpp_builtins): Ditto.
11692         * config/rs6000/rs6000-linux.c
11693         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11694         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11695         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11696         support.
11697         (rs6000_setup_reg_addr_masks): Ditto.
11698         (rs6000_init_hard_regno_mode_ok): Ditto.
11699         (rs6000_option_override_internal): Ditto.
11700         (legitimate_lo_sum_address_p): Ditto.
11701         (rs6000_legitimize_address): Ditto.
11702         (rs6000_legitimize_reload_address): Ditto.
11703         (rs6000_legitimate_address_p): Ditto.
11704         (abi_v4_pass_in_fpr): Ditto.
11705         (setup_incoming_varargs): Ditto.
11706         (rs6000_gimplify_va_arg): Ditto.
11707         (rs6000_split_multireg_move): Ditto.
11708         (rs6000_savres_strategy): Ditto.
11709         (rs6000_emit_prologue_components): Ditto.
11710         (rs6000_emit_epilogue_components): Ditto.
11711         (rs6000_emit_prologue): Ditto.
11712         (rs6000_emit_epilogue): Ditto.
11713         (rs6000_elf_file_end): Ditto.
11714         (rs6000_function_value): Ditto.
11715         (rs6000_libcall_value): Ditto.
11716         * config/rs6000/rs6000.h: Ditto.
11717         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11718         (TARGET_MINMAX): ... this.  New.
11719         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11720         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11721         (*movsi_internal1_single): Delete.
11722         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11723         mfpu=, mxilinx-fpu): Delete.
11724         * config/rs6000/singlefp.h: Delete.
11725         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11726         * config/rs6000/t-rs6000: Ditto.
11727         * config/rs6000/t-xilinx: Delete.
11728         * config/rs6000/titan.md: Adjust for fp_type removal.
11729         * config/rs6000/vsx.md: Remove Xilinx FP support.
11730         (VStype_simple): Delete.
11731         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11732         * config/rs6000/xfpu.h: Delete.
11733         * config/rs6000/xfpu.md: Delete.
11734         * config/rs6000/xilinx.h: Delete.
11735         * config/rs6000/xilinx.opt: Delete.
11736         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11737         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11739 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11741         PR libgomp/85639
11742         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11743         if ignore == 0.
11745 2018-05-04  Richard Biener  <rguenther@suse.de>
11747         PR middle-end/85627
11748         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11749         (expand_complex_div_wide): Likewise.
11750         (expand_complex_operations_1): Likewise.
11751         (expand_complex_libcall): Preserve EH info of the original stmt.
11752         (tree_lower_complex): Handle removed blocks.
11753         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11754         on complex multiplication and division libcall builtins.
11756 2018-05-04  Richard Biener  <rguenther@suse.de>
11758         PR middle-end/85574
11759         * fold-const.c (negate_expr_p): Restrict negation of operand
11760         zero of a division to when we know that can happen without
11761         overflow.
11762         (fold_negate_expr_1): Likewise.
11764 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11766         PR libstdc++/85466
11767         * real.h (real_nextafter): Declare.
11768         * real.c (real_nextafter): New function.
11769         * fold-const-call.c (fold_const_nextafter): New function.
11770         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11771         CASE_CFN_NEXTTOWARD.
11772         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11773         even when arg1_mode is different from arg0_mode.
11775 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11777         * doc/extend.texi (Deprecated Features): Remove
11778         -ffriend-injection.
11779         (Backwards Compatibility): Likewise.
11780         * doc/invoke.texi (C++ Language Options): Likewise.
11781         (C++ Dialect Options): Likewise.
11783 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11785         PR target/85530
11786         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11787         _mm512_mask_mullox_epi64): New intrinsics.
11789 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11791         PR testsuite/85106
11792         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11793         dump files): Add offload-tree.
11795 2018-05-03  Richard Biener  <rguenther@suse.de>
11797         PR tree-optimization/85615
11798         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11799         to loops not nested in BBs loop father to avoid creating multi-entry
11800         loops.
11802 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11804         PR tree-optimization/70291
11805         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11806         arguments.  Change return type to tree.  Emit libcall as a new
11807         statement rather than replacing existing one when inplace_p is true.
11808         (expand_complex_multiplication_components): New function.
11809         (expand_complex_multiplication): Expand floating-point complex
11810         multiplication using the above.
11811         (expand_complex_division): Rename inner_type parameter to type.
11812         Update expand_complex_libcall call-site.
11813         (expand_complex_operations_1): Update expand_complex_multiplication
11814         and expand_complex_division call-sites.
11816 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11818         PR target/85582
11819         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11820         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11821         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11822         the highest significant bit of the shift count mask is clear.  In
11823         check whether and[sq]i3 is needed verify that all significant bits
11824         of the shift count other than the highest are set.
11826 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11828         PR libgomp/82428
11829         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11830         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11831         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11832         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11833         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11834         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11835         __builtin_goacc_parlevel_size.
11837 2018-05-02  Richard Biener  <rguenther@suse.de>
11839         PR tree-optimization/85597
11840         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11841         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11842         directly.
11844 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11846         PR testsuite/85106
11847         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11848         dump files): Add ltrans-tree.
11850 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11852         PR testsuite/85106
11853         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11854         dump files): Add wpa-ipa.
11856 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11858         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11859         powerpc*-*-linux*paired* target.
11860         * config/rs6000/750cl.h: Delete.
11861         * config/rs6000/paired.h: Delete.
11862         * config/rs6000/paired.md: Delete.
11863         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11864         float support.
11865         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11866         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11867         comment.  Remove paired float support.
11868         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11869         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11870         VECTOR_PAIRED.
11871         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11872         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11873         declarations.
11874         * config/rs6000/rs6000.c: Remove paired float support.
11875         (paired_expand_vector_init, paired_expand_vector_move,
11876         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11877         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11878         paired_expand_builtin, paired_expand_predicate_builtin,
11879         paired_init_builtins): Delete.
11880         * config/rs6000/rs6000.h: Remove paired float support.
11881         * config/rs6000/rs6000.md: Remove paired float support.
11882         (move_from_CR_ov_bit): Delete.
11883         * config/rs6000/rs6000.opt (mpaired): Delete.
11884         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11885         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11887 2018-05-02  Richard Biener  <rguenther@suse.de>
11889         PR middle-end/85567
11890         * gimplify.c (gimplify_save_expr): When in SSA form allow
11891         SAVE_EXPRs to compute to SSA vars.
11893 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11895         PR target/85582
11896         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11897         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11898         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11899         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11901 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11903         PR tree-optimization/85586
11904         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11905         exit early for statements in the same group if the accesses are
11906         not strided.
11908 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11910         PR lto/85451
11911         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11912         error message.
11914 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11916         PR tree-optimization/85143
11917         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11919 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11921         PR lto/85451
11922         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11923         not found" error message.
11925 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11927         PR other/83786
11928         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11929         * vec.c (test_ordered_remove_if): New function.
11930         (vec_c_tests): Call test_ordered_remove_if.
11931         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11932         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11933         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11934         VEC_ORDERED_REMOVE_IF.
11936 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11938         PR tree-optimization/82665
11939         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11940         pointer subtraction where arguments come from a memchr call.
11942 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11944         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11945         --push-state --as-needed and --pop-state instead of --as-needed and
11946         --no-as-needed if ld supports it.
11947         * configure: Regenerated.
11949         PR web/85578
11950         * doc/install.texi2html: Replace _002d with - and _002a with * in
11951         generated html files using sed.
11953 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11955         PR c++/85523
11956         * gcc-rich-location.c (blank_line_before_p): New function.
11957         (use_new_line): New function.
11958         (gcc_rich_location::add_fixit_insert_formatted): New function.
11959         * gcc-rich-location.h
11960         (gcc_rich_location::add_fixit_insert_formatted): New function.
11962 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11964         * selftest.c (assert_streq): Rename "expected" and "actual" to
11965         "val1" and "val2".  Extend NULL-handling to cover both inputs
11966         symmetrically, while still requiring both to be non-NULL for a pass.
11967         * selftest.h (assert_streq): Rename "expected" and "actual" to
11968         "val1" and "val2".
11969         (ASSERT_EQ): Likewise.
11970         (ASSERT_EQ_AT): Likewise.
11971         (ASSERT_KNOWN_EQ): Likewise.
11972         (ASSERT_KNOWN_EQ_AT): Likewise.
11973         (ASSERT_NE): Likewise.
11974         (ASSERT_MAYBE_NE): Likewise.
11975         (ASSERT_MAYBE_NE_AT): Likewise.
11976         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11977         the assertion to pass.
11978         (ASSERT_STREQ_AT): Likewise.
11980 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11982         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11983         interaction with -pie.
11985 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11987         * selftest.h: Fix alphabetization of per-source-file selftest
11988         declarations.
11990 2018-04-30  Jason Merrill  <jason@redhat.com>
11992         PR c++/61982 - dead stores to destroyed objects.
11993         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11994         of clobber.
11996 2018-04-30  Jason Merrill  <jason@redhat.com>
11998         * tree.c (build_clobber): New.
11999         * tree.h: Declare it.
12000         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12002 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12004         * diagnostic-show-locus.c (layout::layout): Update for
12005         location_get_source_line returning a char_span.
12006         (struct char_span): Move to input.h.
12007         (struct correction): Update for fields in char_span becoming
12008         private.
12009         (struct source_line): Update for location_get_source_line
12010         returning a char_span.
12011         (layout::print_line): Likewise.
12012         * edit-context.c (edited_file::print_content): Likewise.
12013         (edited_file::print_diff_hunk): Likewise.
12014         (edited_file::print_run_of_changed_lines): Likewise.
12015         (edited_file::get_num_lines): Likewise.
12016         (edited_line::edited_line): Likewise.
12017         * final.c (asm_show_source): Likewise.
12018         * input.c (location_get_source_line): Convert return type
12019         from const char * to char_span, losing the final "line_len"
12020         param.
12021         (dump_location_info): Update for the above.
12022         (get_substring_ranges_for_loc): Likewise.  Use a char_span
12023         when handling the literal within the line.
12024         (test_reading_source_line): Update for location_get_source_line
12025         returning a char_span.
12026         * input.h (class char_span): Move here from
12027         diagnostic-show-locus.c, converting from a struct to a class.
12028         Make data members private.
12029         (char_span::operator bool): New.
12030         (char_span::length): New.
12031         (char_span::get_buffer): New.
12032         (char_span::operator[]): New.
12033         (char_span::subspan): Make const.
12034         (char_span::xstrdup): New.
12035         (location_get_source_line): Convert return type from const char *
12036         to char_span, losing the final "line_size" param.
12038 2018-04-30  Jan Hubicka  <jh@suse.cz>
12040         * lto-wrapper.c (ltrans_priorities): New static var.
12041         (cmp_priority): New.
12042         (run_gcc): Read priorities and if doing parallel build order
12043         the Makefile by them.
12045 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12047         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12049 2018-04-30  Richard Biener  <rguenther@suse.de>
12051         * tree-cfg.c (verify_address): Remove base argument, add
12052         flag whether to check TREE_ADDRESSABLE and do that.
12053         (verify_expr): Remove.
12054         (verify_types_in_gimple_reference): Add pieces from verify_expr.
12055         (verify_gimple_assign_single): Likewise.
12056         (verify_gimple_switch): Likewise.
12057         (verify_expr_location_1): Dereference tp once.  Add (disabled)
12058         piece from verify_expr.
12059         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12061 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12063         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12065 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12067         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12068         (small_data_pattern): Likewise.
12069         (arc_rewrite_small_data): Likewise.
12070         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12071         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12072         (get_symbol_alignment): New function.
12073         (legitimate_small_data_address_p): Likewise.
12074         (legitimate_scaled_address): Update, call
12075         legitimate_small_data_address_p.
12076         (output_sdata): New static variable.
12077         (arc_print_operand): Update how we handle small data operands.
12078         (arc_print_operand_address): Likewise.
12079         (arc_legitimate_address_p): Update, use
12080         legitimate_small_data_address_p.
12081         (arc_rewrite_small_data_p): Remove.
12082         (arc_rewrite_small_data_1): Likewise.
12083         (arc_rewrite_small_data): Likewise.
12084         (small_data_pattern): Likewise.
12085         (compact_sda_memory_operand): Update to use
12086         legitimate_small_data_address_p and get_symbol_alignment.
12087         (prepare_move_operands): Don't rewite sdata pattern.
12088         (prepare_extend_operands): Remove.
12089         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12090         pattern.
12091         (zero_extendqisi2): Likewise.
12092         (zero_extendhisi2): Likewise.
12093         (extendqihi2): Likewise.
12094         (extendqisi2): Likewise.
12095         (extendhisi2): Likewise.
12096         (addsi3): Likewise.
12097         (subsi3): Likewise.
12098         (andsi3): Likewise.
12099         * config/arc/constraints.md (Usd): Change it to memory constraint.
12101 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12103         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12104         as source of std instructions.
12105         * config/arc/arc.md (movsi_insn): Update pattern predicate to
12106         allow 6-bit constants as source for store instructions.
12107         (movdi_insn): Update instruction pattern to allow 6-bit constants
12108         as source for store instructions.
12110 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
12112         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12114 2018-04-30  Nathan Sidwell  <nathan@acm.org>
12115             Sandra Loosemore <sandra@codesourcery.com>
12117         * dumpfile.c (dump_open): Allow '-' for stdout.
12118         * doc/invoke.texi (Developer Options): Document dump filename
12119         determination early.  Document stdin/stdout selection.
12121 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
12123         Microblaze Target: PIC data text relative
12125         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12126         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12127         Add declaration.
12128         * config/microblaze/microblaze.h (microblaze_constant_address_p):
12129         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12130         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12131         New addressing mode for data-text relative position indepenedent code.
12132         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12133         'ADDRESS_SYMBOLIC_TXT_REL'.
12134         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12135         (microblaze_legitimate_pic_operand): Exclude function calls from
12136         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12137         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12138         addresses cases.
12139         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12140         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12141         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12142         for 'address + offset'.
12143         (microblaze_expand_prologue): Add new function prologue call for
12144         'r20' assignation.
12145         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12146         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12147         table in case of TARGET_PIC_DATA_TEXT_REL.
12148         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12149         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12150         Add new macros 'UNSPEC_TEXT',
12151         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12152         + exclude function calls from 'UNSPEC_PLT' in case of data text
12153         relative mode.
12154         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12155         new target hook for generating address diff vector tables in case of
12156         flag_pic.
12157         * doc/tm.texi : Regenerate.
12158         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12159         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12160         of addr diff vector generation.
12161         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12162         target hook definition.
12163         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12164         Add default function for generate_pic_addr_diff_vec -> flag_pic.
12165         * doc/invoke.texi (Add new pic option): Add new microblaze pic
12166         option for data text relative.
12168 2018-04-30  Richard Biener  <rguenther@suse.de>
12170         * tree-chrec.h (evolution_function_is_constant_p): Remove
12171         redundant check.
12172         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12174 2018-04-30  Richard Biener  <rguenther@suse.de>
12176         PR bootstrap/85571
12177         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12179 2018-04-30  Richard Biener  <rguenther@suse.de>
12181         PR tree-optimization/28364
12182         PR tree-optimization/85275
12183         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12184         copying first exit test.
12186 2018-04-28  Mark Wielaard  <mark@klomp.org>
12188         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12189         dwarf_version >= 5.
12190         (dwarf_AT): Handle DW_AT_addr_base.
12191         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12193 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
12195         PR target/84431
12196         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12197         (*ashl<dwi>3_doubleword_mask_1): Ditto.
12198         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12199         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12201 2018-04-28  Richard Biener  <rguenther@suse.de>
12203         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12204         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12205         to reflect use.  Only add interesting stmts.
12207 2018-04-27  Martin Jambor  <mjambor@suse.cz>
12209         PR ipa/85549
12210         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12211         the jump function allows for passing through aggregate values.
12213 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
12215         * input.h (in_system_header_at): Convert from macro to inline
12216         function.
12217         (from_macro_expansion_at): Likewise.
12218         (from_macro_definition_at): Likewise.
12220 2018-04-27  Jeff Law  <law@redhat.com>
12222         * config.gcc: Mark tile* targets as deprecated/obsolete.
12224 2018-04-27  Richard Biener  <rguenther@suse.de>
12226         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12227         fix for ILP32.
12229 2018-04-27  Richard Biener  <rguenther@suse.de>
12231         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12233 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
12235         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12236         with Yd constraint. Set "preferred_for_speed" attribute from
12237         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12238         with Yd constraint.
12239         (*movdi_internal): Ditto.
12240         (movti_interunit splitters): Remove
12241         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12242         (movdi_interunit splitters): Ditto.
12243         * config/i386/constraints.md (Ye): Remove.
12244         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12246 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12248         PR target/85512
12249         * config/aarch64/constraints.md (Usg): Limit to 31.
12250         (Usj): Limit to 63.
12252 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
12254         PR tree-optimization/85529
12255         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12256         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12257         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12258         zero extension or masking of the MSB bit.
12259         (optimize_range_tests): Add FIRST_BB argument, pass it through
12260         to optimize_range_tests_var_bound.
12261         (maybe_optimize_range_tests, reassociate_bb): Adjust
12262         optimize_range_tests callers.
12264 2018-04-26  Richard Biener  <rguenther@suse.de>
12265             Jakub Jelinek  <jakub@redhat.com>
12267         * cgraph.h (symbol_table): Just declare debug method here.
12268         * symtab.c (symbol_table::debug): Define.
12270 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
12272         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12274 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
12276         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12277         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12278         (*movdi_internal): Substitute Yi and Yj constraint with x
12279         and Ym and Yn constraint with y constraint.  Update "isa"
12280         attribute and set "preferred_for_speed" attribute from
12281         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12282         (*movsi_internal): Ditto.
12283         (*movdf_internal): Ditto.
12284         (*movsf_internal): Ditto.
12285         (*zero_extendsidi2): Ditto.
12286         * config/i386/sse.md (vec_set<mode>_0): Ditto.
12287         (sse2_loadld): Ditto.
12288         (*vec_extract<ssevecmodelower>_0): Ditto.
12289         (*vec_extractv4si_0_zext_sse4): Ditto.
12290         (vec_concatv2di): Ditto.
12291         (*vec_dup<mode>): Ditto.
12292         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12293         * config/i386/constraints.md (Yi): Remove.
12294         (Yj): Remove.
12295         (Ym): Remove.
12296         (Yn): Remove.
12298 2018-04-26  Nathan Sidwell  <nathan@acm.org>
12300         * dumpfile.c (dump_open): New.
12301         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12302         (dump_finish): Detect stdio/stderr by value not name.
12304 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
12306         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12308 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12310         PR target/84952
12311         * config/nvptx/nvptx.c (verify_neutering_jumps)
12312         (verify_neutering_labels): New function
12313         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12315 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12317         PR target/84025
12318         * config/nvptx/nvptx.c (needs_neutering_p): New function.
12319         (nvptx_single): Use needs_neutering_p to skip over insns that do not
12320         need neutering.
12322 2018-04-26  Richard Biener <rguenther@suse.de>
12323             Tom de Vries  <tom@codesourcery.com>
12325         PR lto/85422
12326         * lto-streamer-out.c (output_function): Fixup loops if required to match
12327         discovery done in the reader.
12329 2018-04-26  Richard Biener  <rguenther@suse.de>
12331         PR tree-optimization/85116
12332         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12333         have a loop exit from the single latch predecessor.  Remove
12334         case of header with just condition.
12335         (ch_base::copy_headers): Exclude infinite loops from any
12336         processing.
12337         (pass_ch::execute): Record exits.
12339 2018-04-26  Richard Biener  <rguenther@suse.de>
12341         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12342         prologue cost vector and pass it to vect_get_load_cost.
12343         (vect_get_peeling_costs_all_drs): Likewise.
12344         (vect_peeling_hash_get_lowest_cost): Likewise.
12345         (vect_enhance_data_refs_alignment): Likewise.
12347 2018-04-26  Richard Biener  <rguenther@suse.de>
12349         PR middle-end/85450
12350         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12351         checking of integer<->pointer conversions.
12352         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12353         sign-/zero-extending pointer types.
12354         (expand_omp_for_static_chunk): Likewise.
12356 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
12357             Jean Lee  <xiaoyur347@gmail.com>
12359         * config/mips/mips.c (mips_asan_shadow_offset): New function.
12360         (TARGET_ASAN_SHADOW_OFFSET): Define.
12361         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12362         true for -fsanitize=address.
12364 2018-04-25  Mark Wielaard  <mark@klomp.org>
12366         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12367         shorter ones.
12369 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12371         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12372         than "alu", remove explicit "memory" and "imm_disp" attributes.
12373         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12375         PR middle-end/85414
12376         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12377         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12378         gen_lowpart_no_emit.
12380 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
12382         PR target/85473
12383         * config/i386/i386.c (ix86_expand_builtin): Change memory
12384         operand to XI, extend p0 to Pmode.
12385         * config/i386/i386.md: Change unspec volatile and operand
12386         1 mode to XI, change operand 0 mode to P.
12388 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12390         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12391         GET_MODE_MASK before any checking.
12392         (nds32_can_use_bset_p): Likewise.
12393         (nds32_can_use_btgl_p): Likewise.
12395 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12397         * config/nds32/nds32-doubleword.md: New define_split pattern for
12398         illegal register number.
12400 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12402         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12404 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12406         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12408 2018-04-25  Richard Biener  <rguenther@suse.de>
12410         * lto-streamer.h (LTO_major_version): Bump to 8.
12412 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12414         * BASE-VER: Set to 9.0.0.
12416 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
12418         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12419         in __abskf2 and __powikf2.
12421 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12423         PR target/85512
12424         * config/aarch64/constraints.md (Usg, Usj): New constraints.
12425         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12426         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12427         Use the above on operand 2.  Reindent.
12428         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12430 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12432         PR target/85485
12433         * common/config/i386/i386-common.c (ix86_handle_option): Don't
12434         handle OPT_mcet.
12435         * config/i386/i386.opt (mcet): Removed.
12436         * doc/install.texi: Remove -mcet documentation.
12437         * doc/invoke.texi: Likewise.
12439 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12441         PR target/85485
12442         * doc/install.texi: Remove -mcet from bootstrap-cet.
12444 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12446         PR target/85511
12447         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12448         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12449         if TARGET_64BIT.
12451         PR target/85503
12452         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12453         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12454         containing a CONST_VECTOR.
12456 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
12458         * doc/install.texi: Update newlib dependency for nvptx.
12460 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12462         PR target/85508
12463         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12464         instead of INTVAL when shifting x left.
12466 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12468         PR tree-optimization/85478
12469         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12470         vect_grouped_store_supported for single element vectors.
12472 2018-04-24  Richard Biener  <rguenther@suse.de>
12474         PR target/85491
12475         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12476         load cost increase to the case of non-constant step.
12478 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12480         PR target/84828
12481         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12482         destination if any_malformed_asm.
12484 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
12486         PR middle-end/85496
12487         * expr.c (store_field): In the bitfield case, if the value comes from
12488         a function call and is returned in registers by means of a PARALLEL,
12489         do not change the mode of the temporary unless BLKmode and VOIDmode.
12491 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12493         PR rtl-optimization/85423
12494         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12495         dependencies to debug insns when the previous insn is non-debug.
12497 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12499         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12500         enums into a single definition.
12501         (fls): Fix predicates and printing.
12502         (seti): Likewise.
12504 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12506         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12507         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12508         and short u6 immediate.
12509         (check_if_valid_sleep_operand): Remove.
12510         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12512 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12514         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12515         flag_always_save_lp condition.
12516         * config/nds32/nds32.opt (malways-save-lp): New option.
12518 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12520         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12521         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12522         * config/nds32/nds32.h
12523         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12524         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12526 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12528         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12529         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12531 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12532             Chung-Ju Wu  <jasonwucj@gmail.com>
12534         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12535         Declare.
12536         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12537         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12539 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12541         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12543 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12545         * config/nds32/nds32-protos.h (nds32_data_alignment,
12546         nds32_local_alignment): Declare.
12547         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12548         nds32_local_alignment): New functions.
12549         (TARGET_CONSTANT_ALIGNMENT): Define.
12550         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12552 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12554         * config/nds32/nds32.c
12555         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12556         (TARGET_MODES_TIEABLE_P): Likewise.
12558 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12560         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12561         level Ofast and Og.
12563 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12564             Chung-Ju Wu  <jasonwucj@gmail.com>
12566         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12567         for unaligned access.
12568         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12569         unaligned access.
12570         * config/nds32/nds32-intrinsic.md: Likewise.
12571         * config/nds32/nds32_intrinsic.h: Likewise.
12572         * config/nds32/nds32.h (nds32_builtins): Likewise.
12573         * config/nds32/nds32.opt (munaligned-access): New option.
12574         * config/nds32/nds32.c (nds32_asm_file_start): Display
12575         flag_unaligned_access status.
12577 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12579         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12580         -mno-relax is present.
12581         * config/riscv/linux.h (LINK_SPEC): Ditto.
12583 2018-04-20  Martin Sebor  <msebor@redhat.com>
12585         PR c/85365
12586         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12587         for null pointers.
12588         (gimple_fold_builtin_stxcpy_chk): Same.
12589         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12591 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12593         PR target/85456
12594         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12595         __powikf2 when long double is IEEE 128-bit.
12597 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12599         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12600         step to make sure stack always aligned.
12602 2018-04-20  Carl Love  <cel@us.ibm.com>
12604         PR target/83402
12605         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12606         size check for arg0.
12608 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12609             Tom de Vries  <tom@codesourcery.com>
12611         PR target/85445
12612         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12613         Emit insns for calls too.
12614         (nvptx_find_par): Always look for worker-level predecessor insn.
12615         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12616         calls.
12617         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12618         (nvptx_process_pars): Propagate frames for calls.
12620 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12622         PR target/85469
12623         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12624         Removed.
12625         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12626         (ix86_handle_option): Don't handle OPT_mibt.
12627         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12628         __SHSTK__.
12629         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12630         has_ibt and ibt.
12631         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12632         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12633         (ix86_target_macros): Define __CET__ with flag_cf_protection
12634         for -fcf-protection.
12635         * config/i386/i386.c (isa2_opts): Remove -mibt.
12636         * config/i386/i386.h (TARGET_IBT): Removed.
12637         (TARGET_IBT_P): Likewise.
12638         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12639         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12640         * config/i386/i386.opt (mcet): Update help message.
12641         (mshstk): Likewise.
12642         (mibt): Removed.
12643         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12644         -mcet as an alias for -mshstk.
12646 2018-04-20  Richard Biener <rguenther@suse.de>
12648         PR middle-end/85475
12649         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12650         complexity by forcing a single use of the multiply operand.
12652 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12654         ipa/85449
12655         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12656         recursion dependency to only apply to non-clones.
12658 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12660         ipa/85447
12661         * ipa-cp.c (create_specialized_node): Check that clones of
12662         self-recursive edges exist during IPA-CP.
12664 2018-04-19  Toon Moene  <toon@moene.org>
12666         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12667         by -O3.
12669 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12671         PR tree-optimization/85467
12672         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12673         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12674         VECTOR_CST element to type.
12676 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12678         PR target/85397
12679         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12680         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12681         (builtin_longjmp): Likewise.
12682         (save_stack_nonlocal): New pattern.
12683         (restore_stack_nonlocal): Likewise.
12685 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12687         PR target/85404
12688         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12689         Replace ASM_OUTPUT_LABEL with fprintf.
12691 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12693         PR target/85417
12694         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12695         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12696         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12697         define __IBT__ and __SHSTK__ for -fcf-protection.
12698         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12699         TARGET_IBT.
12700         (ix86_trampoline_init): Likewise.
12701         (x86_output_mi_thunk): Likewise.
12702         (ix86_notrack_prefixed_insn_p): Likewise.
12703         (ix86_option_override_internal): Don't disallow -fcf-protection.
12704         * config/i386/i386.md (rdssp<mode>): Also enable for
12705         -fcf-protection.
12706         (incssp<mode>): Likewise.
12707         (nop_endbr): Likewise.
12708         * config/i386/i386.opt (mcet): Change help message to built-in
12709         functions only.
12710         (mibt): Likewise.
12711         (mshstk): Likewise.
12712         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12713         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12714         enable CET built-in functions.
12716 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12718         * common/config/i386/i386-common.c
12719         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12720         OPTION_MASK_ISA_MOVDIRI_UNSET,
12721         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12722         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12723         * config.gcc (movdirintrin.h): New header.
12724         * config/i386/cpuid.h (bit_MOVDIRI,
12725         bit_MOVDIR64B): New bits.
12726         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12727         and -mmvodir64b.
12728         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12729         (VOID, PVOID, PCVOID)): New function types.
12730         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12731         __builtin_ia32_directstoreu_u64,
12732         __builtin_ia32_movdir64b): New builtins.
12733         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12734         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12735         and -mmovdiri.
12736         (ix86_valid_target_attribute_inner_p): Ditto.
12737         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12738         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12739         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12740         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12741         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12742         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12743         (movdiri<mode>, movdir64b_<mode>): New.
12744         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12745         * config/i386/immintrin.h: Include movdirintrin.h.
12746         * config/i386/movdirintrin.h: New file.
12747         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12749 2018-04-19  Richard Biener  <rguenther@suse.de>
12751         PR middle-end/85455
12752         * cfg.c (clear_bb_flags): When loop state says we have
12753         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12755 2018-04-19  Richard Biener  <rguenther@suse.de>
12757         PR tree-optimization/84737
12758         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12759         copying restrict info.
12760         (vect_setup_realignment): Use it.
12761         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12762         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12763         the first DR to all generated stores.
12764         (vectorizable_load): Likewise for loads.
12766 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12768         PR tree-optimization/85446
12769         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12770         the integral and pointer types to have the same precision.
12772         * doc/install.texi: Document --disable-cet being the default and
12773         --enable-cet=auto.
12775 2018-04-18  Martin Liska  <mliska@suse.cz>
12777         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12778         style.
12780 2018-04-18  Martin Liska  <mliska@suse.cz>
12782         Revert
12783         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12785         PR ipa/83983
12786         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12787         arguments if they are comparable.
12789 2018-04-18  Martin Liska  <mliska@suse.cz>
12791         Revert
12792         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12794         PR lto/84805
12795         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12796         incomplete types.
12798 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12800         PR target/85388
12801         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12802         ENDBR after calling __morestack.
12804 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12806         PR jit/85384
12807         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12808         by using gcc_base_ver to generate a gcc_driver_version, and use
12809         it when generating GCC_DRIVER_NAME.
12810         * configure: Regenerate.
12812 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12814         PR target/81084
12815         * config.gcc: Obsolete powerpc*-*-*spe*.
12817 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12819         PR debug/84637
12820         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12821         (stabstr_D): Change type of unum from unsigned int to
12822         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12823         type.
12825 2018-04-17  Jim Wilson  <jimw@sifive.com>
12827         PR 84856
12828         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12829         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12830         Set arg_pointer_offset after using pretend_args_size.
12832 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12834         PR rtl-optimization/85431
12835         * dse.c (record_store): Ignore zero width stores.
12837         PR sanitizer/85230
12838         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12839         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12840         __builtin_stack_restore rather than after it.
12841         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12842         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12843         argument instead of virtual_dynamic_stack_rtx.
12845 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12847         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12848         New prototype.
12849         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12850         Add note to error message to explain internal mapping of overloaded
12851         built-in function name to non-overloaded built-in function name.
12852         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12853         function.
12855 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12857         PR target/85424
12858         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12859         where the inputs overlap with the output.
12861 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12863         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12864         (=v, v) alternative and explicit "memory" attribute.
12865         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12866         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12867         attributes.
12868         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12869         "sselog1" type instead of "sselog".
12870         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12871         "sselog".  Remove explicit "memory" attribute.
12872         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12873         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12874         attributes.
12875         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12876         "sselog1" type instead of "sselog".  Remove explicit "memory"
12877         attribute.
12878         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12879         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12880         attribute.
12881         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12882         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12883         attributes.
12884         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12885         "sselog1" type instead of "sselog".  Remove explicit "memory"
12886         attribute.
12887         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12888         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12889         attribute.
12891         PR target/85430
12892         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12894         PR middle-end/85414
12895         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12896         on a SUBREG.
12898 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12900         PR ipa/85421
12901         * ipa-cp.c (create_specialized_node): Call
12902         expand_all_artificial_thunks if necessary.
12904 2018-04-17  Martin Liska  <mliska@suse.cz>
12906         PR lto/85405
12907         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12908         in message, remote space in between '_G' and '('.
12910 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12912         PR target/85281
12913         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12914         avx512f_vmcmp<mode>3<round_saeonly_name>,
12915         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12916         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12917         avx512f_rndscale<mode><round_saeonly_name>,
12918         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12919         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12920         Use %<iptr>2 instead of %2 for -masm=intel.
12921         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12922         avx512f_vcvttss2usi<round_saeonly_name>,
12923         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12924         -masm=intel.
12925         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12926         avx512f_vcvttsd2usi<round_saeonly_name>,
12927         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12928         Use %q1 instead of %1 for -masm=intel.
12929         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12930         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12931         of %3 for -masm=intel.
12932         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12933         -masm=intel.
12934         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12935         -masm=intel.
12936         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12937         -masm=intel.
12938         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12939         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12940         %g1.
12941         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12942         -masm=intel.
12943         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12944         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12945         %g1 and one with %0 and %1.
12946         (avx512er_vmrcp28<mode><round_saeonly_name>,
12947         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12948         %1 for -masm=intel.
12949         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12950         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12951         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12952         of %0 and %{%4%} for -masm=intel.
12953         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12954         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12955         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12956         order of %0 and %{%5%}%{z%} for -masm=intel.
12958 2018-04-17  Jan Hubicka  <jh@suse.cz>
12960         PR lto/85405
12961         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12963 2018-04-17  Martin Liska  <mliska@suse.cz>
12965         PR ipa/85329
12966         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12967         for target_clone error message.  Make default implementation
12968         clone to be a local declaration.
12969         (separate_attrs): Add new argument and check for an empty
12970         string.
12971         (expand_target_clones): Handle it.
12972         (ipa_target_clone): Make redirection just for target_clones
12973         functions.
12975 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12976             Tom de Vries  <tom@codesourcery.com>
12978         PR middle-end/84955
12979         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12980         tiled basic blocks without omp continue statements.
12982 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12984         PR target/83660
12985         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12986         vec_extract expression as having side effects to make sure it gets
12987         a cleanup point.
12989 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12991         PR target/85403
12992         * config/i386/i386.c (get_builtin_code_for_version): Check
12993         error_mark_node.
12995 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12997         PR target/84331
12998         * config.gcc: Support "skylake".
12999         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13000         PROCESSOR_SKYLAKE.
13001         * config/i386/i386.c (m_SKYLAKE): Define.
13002         (processor_target_table): Add "skylake".
13003         (ix86_option_override_internal): Add "skylake".
13004         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13005         PROCESSOR_CANNONLAKE.
13006         (get_builtin_code_for_version): Fix priority for
13007         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13008         PROCESSOR_SKYLAKE-AVX512.
13009         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13010         (processor_type): Add PROCESSOR_SKYLAKE.
13012 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
13013             Jason Merrill  <jason@redhat.com>
13015         PR c++/85112
13016         * convert.c (convert_to_integer_1): Use direct recursion for
13017         enumeral types and types with a precision less than the number
13018         of bits in their mode.
13020 2018-04-16  Julia Koval  <julia.koval@intel.com>
13022         PR target/84413
13023         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13024         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13026 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
13028         PR target/85293
13029         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13030         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13031         and -mno-direct-move.
13033 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
13035         PR target/83402
13036         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13037         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13038         Ensure negative shifts result in {0}.
13040 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
13042         PR rtl-optimization/79916
13043         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13044         regs (if any) to define how to gnerate SD moves when LRA is in
13045         progress.
13047 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
13049         PR rtl-optimization/85393
13050         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13051         * except.c (expand_dw2_landing_pad_for_region): Make static.
13052         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13053         a label and unconditional jump to old_bb, rather than
13054         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13055         basic block.
13057         PR rtl-optimization/85376
13058         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13059         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13060         instead of a specific value.
13062 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13063             Bin Cheng  <bin.cheng@arm.com>
13065         PR tree-optimization/82965
13066         PR tree-optimization/83991
13067         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13068         by_profile_only parameter.
13069         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13070         information if the loop was predicted to iterate too many times.
13071         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13073 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13075         PR lto/71991
13076         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13077         always inline.
13079 2018-04-13  Martin Liska  <mliska@suse.cz>
13080             Jakub Jelinek  <jakub@redhat.com>
13082         PR middle-end/81657
13083         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13084         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13085         * builtins.c (expand_builtin_memory_copy_args): Use
13086         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13087         handle dest_addr == pc_rtx.
13089 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
13091         PR target/85291
13092         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13093         asked to not generate direct moves.
13094         (fix_trunc<mode>si2_stfiwx): Similar.
13095         (fix_trunc<mode>si2_internal): Similar.
13097 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13099         PR debug/83157
13100         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13101         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13102         lookup if dest in some wider mode is known to be const0_rtx and
13103         if so, record permanent equivalence for it to be ZERO_EXTEND of
13104         the narrower mode destination.
13106 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13108         * lto-streamer-out.c (output_function): Revert 259346.
13109         * omp-expand.c (expand_oacc_for): Likewise.
13111 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
13113         PR rtl-optimization/85354
13114         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13115         * sel-sched.c (sel_global_init): ... here.
13117 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
13119         PR target/85238
13120         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13121         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13122         mode for PE-COFF targets.
13123         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13124         (i386_pe_asm_lto_end): Likewise.
13125         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13126         (TARGET_ASM_LTO_END): Likewise.
13127         * config/i386/winnt.c (saved_debug_info_level): New static variable.
13128         (i386_pe_asm_lto_start): New function.
13129         (i386_pe_asm_lto_end): Likewise.
13131 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13132             Richard Biener  <rguenther@suse.de>
13134         PR middle-end/84955
13135         * lto-streamer-out.c (output_function): Fix CFG loop state before
13136         streaming out.
13137         * omp-expand.c (expand_oacc_for): Handle calls to internal
13138         functions like regular functions.
13140 2018-04-12  Richard Biener  <rguenther@suse.de>
13142         PR lto/85371
13143         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13144         for the early LTO debug to properly generate references to it
13145         during DIE emission.  Do not re-use that for the skeleton for
13146         split-dwarf.
13147         (dwarf2out_early_finish): Likewise.
13149 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13151         PR target/85328
13152         * config/i386/sse.md
13153         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13154         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13155         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13156         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13157         and output is a reg, avoid creating invalid lowpart subreg, but
13158         instead split into a 512-bit move.  Don't split if not AVX512VL,
13159         input is xmm16+ reg and output is a mem.
13160         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13161         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13162         xmm16+ reg and output is a mem.
13164 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13166         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13167         also for flag_dwarf2_cfi_asm.
13169 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13171         PR rtl-optimization/85342
13172         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13173         a bool scalar var inside of the loop instead.  Don't try to update
13174         recog_data.operand after failed apply_change_group.
13176 2018-04-12  Tom de Vries  <tom@codesourcery.com>
13178         PR target/85296
13179         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13180         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
13181         array with flexible array member as array without given dimension.
13182         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13183         argument for undefined param to true.
13185 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
13187         PR target/85321
13188         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13189         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13190         from PowerPC section.
13191         * config/rs6000/sysv4.opt (mcall-): Improve help text.
13192         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13193         help text that is too long.
13194         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13195         help text that is too long.
13196         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13197         help text that is too long.
13199 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
13201         * config/alpha/alpha.md (stack_probe_internal): Rename
13202         from "probe_stack".  Update all callers.
13204 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13206         PR rtl-optimization/84566
13207         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13208         sched_macro_fuse_insns.
13210 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13212         PR target/84301
13213         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13214         (compute_block_dependences): ... from here.
13216 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13218         PR tree-optimization/85331
13219         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13220         from int to HOST_WIDE_INT.
13222 2018-04-11  Martin Jambor  <mjambor@suse.cz>
13224         PR ipa/84149
13225         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13226         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13227         not the same as the source val.
13228         (cgraph_edge_brings_value_p): New parameter.
13229         (gather_edges_for_value): Pass destination value to
13230         cgraph_edge_brings_value_p.
13231         (perhaps_add_new_callers): Likewise.
13232         (get_info_about_necessary_edges): Likewise and exclude values brought
13233         only by self-recursive edges.
13234         (create_specialized_node): Redirect only clones of self-calling edges.
13235         (+self_recursive_pass_through_p): New function.
13236         (find_more_scalar_values_for_callers_subset): Use it.
13237         (find_aggregate_values_for_callers_subset): Likewise.
13238         (known_aggs_to_agg_replacement_list): Removed.
13239         (decide_whether_version_node): Re-calculate known constants for all
13240         remaining context clones.
13242 2018-04-11  Richard Biener  <rguenther@suse.de>
13244         PR lto/85339
13245         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13246         from early DWARF output.
13247         (dwarf2out_early_finish): Output line info unconditionally into
13248         early DWARF and add reference to it.
13250 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13252         PR target/85281
13253         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13254         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13255         other than V2DFmode using iptr mode attribute.
13256         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13258 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13260         PR rtl-optimization/84659
13261         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13263 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13265         PR debug/85302
13266         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13267         SIZEP is NULL.
13268         (output_loc_list): Pass address of a dummy size variable even in the
13269         locview handling loop.
13270         (index_location_lists): Add comment on why skip_loc_list_entry can't
13271         call size_of_locs.
13273 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13275         PR target/85261
13276         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13277         into register.
13279 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
13281         PR target/85321
13282         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13283         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13284         and -mstring-compare-inline-limit.
13286 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13288         PR target/85287
13289         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13290         for stack clash protection in a register whenever we need it to be in
13291         a register.
13293 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13295         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13296         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13298 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13300         PR target/85321
13301         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13302         the help text.
13303         (mlong-double-): Ditto.
13304         * config/rs6000/sysv4.opt (msdata=): Ditto.
13305         (mtls-size=): Ditto.
13307 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13309         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13310         erroneous entries for
13311         "vector int vec_ldl (int, long int *)", and
13312         "vector unsigned int vec_ldl (int, unsigned long int *)".
13313         Add comments and entries for
13314         "vector bool char vec_ldl (int, bool char *)",
13315         "vector bool short vec_ldl (int, bool short *)",
13316         "vector bool int vec_ldl (int, bool int *)",
13317         "vector bool long long vec_ldl (int, bool long long *)",
13318         "vector pixel vec_ldl (int, pixel *)",
13319         "vector long long vec_ldl (int, long long *)",
13320         "vector unsigned long long vec_ldl (int, unsigned long long *)".
13321         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13322         type tree bool_long_long_type_node and correct definition of
13323         bool_V2DI_type_node to make reference to this new type tree.
13324         (rs6000_mangle_type): Replace erroneous reference to
13325         bool_long_type_node with bool_long_long_type_node.
13326         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13327         comments to emphasize sign distinctions for char and int types and
13328         replace RS6000_BTI_bool_long constant with
13329         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
13330         use of RS6000_BTI_pixel.
13331         (bool_long_type_node): Remove this macro definition.
13332         (bool_long_long_type_node): New macro definition
13334 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13336         PR rtl-optimization/85300
13337         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13338         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13339         simplify_unary_operation fails.
13341 2018-04-10  Martin Liska  <mliska@suse.cz>
13343         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13344         cgraph_edge and ipa_ref.
13346 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13348         PR target/85177
13349         PR target/85255
13350         * config/i386/sse.md
13351         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13352         computation of the VEC_MERGE selector from mask.
13353         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13354         Fix decoding of the VEC_MERGE selector into mask.
13356 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13358         PR tree-optimization/85286
13359         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13361 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13363         * final.c (final_1): Set insn_last_address as well as
13364         insn_current_address.
13366 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13368         PR target/85173
13369         * explow.c (emit_stack_probe): Call validize_mem on memory location
13370         before passing it to gen_probe_stack.  Create address operand and
13371         legitimize it for the probe_stack_address case.
13373 2018-04-09  Jan Hubicka  <jh@suse.cz>
13375         PR lto/85078
13376         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13377         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13378         * tree.c (free_lang_data_in_type): Fix handling of binfos;
13379         walk basetypes.
13380         (free_lang_data): Rebuild type inheritance graph.
13382 2018-04-09  Martin Sebor  <msebor@redhat.com>
13384         * invoke.texi (-finline-small-functions): Mention other optimization
13385         options.
13386         (-findirect-inlining, -fpartial-inlining): Same.
13387         (-finline-functions-called-once): Same.
13388         (-freorder-blocks-and-partition): Same.
13390 2018-04-09  Jan Hubicka  <jh@suse.cz>
13392         PR rtl/84058
13393         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13394         jumps; choose last target that matches the criteria (i.e.
13395         no partition changes for non-crossing jumps).
13396         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13397         support for redirecting crossing jumps to non-crossing.
13399 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
13401         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13402         also for naked functions.
13404 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
13406         * config/arc/arc.md (add_shift): New pattern.
13407         (add_shift2): Likewise.
13408         (sub_shift): Likewise.
13409         (sub_shift_cmp0_noout): Likewise.
13410         (compare_si_ashiftsi): Likewise.
13411         (xbfu_cmp0_noout): New combine pattern.
13412         (xbfu_cmp0"): Likewise.
13413         (movsi_set_cc_insn): Place the predicable variant first.
13414         (commutative_binary_cmp0_noout): Remove clobber.
13415         (commutative_binary_cmp0): New pattern.
13416         (noncommutative_binary_cmp0): Likewise.
13417         (noncommutative_binary_cmp0_noout): Likewise.
13418         (noncommutative_binary_comparison_result_used): Removed.
13419         (rsub_cmp0): New pattern.
13420         (rsub_cmp0_noout): Likewise.
13421         (extzvsi): Changed, keep only meaningful variants.
13422         (SQH, SEZ): New iterators.
13423         (SQH_postfix): New mode attribute.
13424         (SEZ_prefix): New code attribute.
13425         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13426         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13427         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13428         of numerical value.
13429         (noncommutative_operator): Check the availability of barrel
13430         shifter option.
13432 2018-04-09  Richard Biener  <rguenther@suse.de>
13434         PR tree-optimization/85284
13435         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13436         Only use the niter constraining form of simple_iv when the exit
13437         is always executed.
13439 2018-04-09  Tom de Vries  <tom@codesourcery.com>
13441         PR target/84041
13442         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13443         (define_expand "*memory_barrier"): New define_expand.
13444         (define_insn "memory_barrier"): New insn.
13446 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13448         PR rtl-optimization/80463
13449         PR rtl-optimization/83972
13450         PR rtl-optimization/83480
13452         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13453         correct producer for the insn.
13454         (tidy_control_flow): Fixup seqnos in case of debug insns.
13456 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13458         PR rtl-optimization/83913
13460         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13461         different sched-times when merging exprs.
13463 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13465         PR rtl-optimization/83962
13467         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13468         tidy_fallthru_edge and tidy_control_flow.
13470 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13472         PR rtl-optimization/83530
13474         * sel-sched.c (force_next_insn): New global variable.
13475         (remove_insn_for_debug): When force_next_insn is true, also leave only
13476         next insn in the ready list.
13477         (sel_sched_region): When the region wasn't scheduled, make another pass
13478         over it with force_next_insn set to 1.
13480 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13482         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13483         into tm_file.
13484         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13485         for interrupt control.
13486         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13487         functions for interrupt control.
13488         * config/nds32/nds32-intrinsic.md: Likewise.
13489         * config/nds32/nds32_intrinsic.h: Likewise.
13490         * config/nds32/nds32.h (nds32_builtins): Likewise.
13492 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13494         * config/nds32/nds32.c (nds32_init_machine_status,
13495         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13496         strict_aligned_p field.
13497         (nds32_expand_to_rtl_hook): New function.
13498         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13499         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13501 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13502             Chung-Ju Wu  <jasonwucj@gmail.com>
13504         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13505         * config/nds32/nds32-n7.md: New file.
13506         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13507         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13508         pipeline.
13509         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13510         * config/nds32/nds32.md (pipeline_model): Add n7.
13511         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13512         * config/nds32/pipelines.md: Include n7 settings.
13514 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13515             Chung-Ju Wu  <jasonwucj@gmail.com>
13517         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13518         * config/nds32/nds32-e8.md: New file.
13519         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13520         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13521         pipeline.
13522         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13523         * config/nds32/nds32.md (pipeline_model): Add e8.
13524         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13525         * config/nds32/pipelines.md: Include e8 settings.
13527 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13528             Chung-Ju Wu  <jasonwucj@gmail.com>
13530         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13531         * config/nds32/nds32-n8.md: New file.
13532         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13533         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13534         pipeline.
13535         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13536         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13537         * config/nds32/nds32.md (pipeline_model): Add n8.
13538         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13539         * config/nds32/pipelines.md: Include n8 settings.
13541 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13542             Chung-Ju Wu  <jasonwucj@gmail.com>
13544         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13545         * config/nds32/nds32-n9-2r1w.md: New file.
13546         * config/nds32/nds32-n9-3r2w.md: New file.
13547         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13548         nds32_register_ports): New or modify for cpu n9.
13549         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13550         pipeline.
13551         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13552         * config/nds32/nds32-utils.c: New file.
13553         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13554         TARGET_MUL_SLOW): Define.
13555         * config/nds32/nds32.md (pipeline_model): New attribute.
13556         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13557         New options that support cpu n9.
13558         * config/nds32/pipelines.md: Include n9 settings.
13559         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13561 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13563         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13564         information if necessary.
13565         (output_cond_branch_compare_zero): Likewise.
13566         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13567         (nds32_target_alignment): Refine for alignment.
13568         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13569         (FUNCTION_BOUNDARY): Modify.
13570         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13571         align case.
13572         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13574 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13576         * config/nds32/constants.md (unspec_volatile_element): Add values for
13577         TLB operation and data prefetch.
13578         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13579         functions for TLB operation and data prefetch.
13580         * config/nds32/nds32-intrinsic.md: Likewise.
13581         * config/nds32/nds32_intrinsic.h: Likewise.
13582         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13583         (nds32_print_operand): Likewise.
13584         * config/nds32/nds32.h (nds32_builtins): Likewise.
13586 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13587         Andrew Pinski <pinsika@gcc.gnu.org>
13589         PR middle-end/82976
13590         * match.pd: Use constant_boolean_node of correct type instead of
13591         boolean_true_node or boolean_false_node for simplifying
13592         pointer comparisons to zero.
13594 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13596         PR tree-optimization/80021
13597         * tree.c (verify_type_variant): Make error call in verify_variant_match
13598         translatable and remove final full stop.
13600 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13602         * config/nds32/constants.md (unspec_volatile_element): Add
13603         UNSPEC_VOLATILE_EH_RETURN.
13604         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13605         nds32_output_stack_pop): Support dwarf exception handling process.
13606         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13607         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13608         exception handling process.
13609         (nds32_compute_stack_frame): Likewise.
13610         (nds32_return_addr_rtx): Likewise.
13611         (nds32_initial_elimination_offset): Likewise.
13612         (nds32_expand_prologue): Likewise.
13613         (nds32_expand_epilogue): Likewise.
13614         (nds32_dynamic_chain_address): New function.
13615         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13616         exception handling.
13617         (DYNAMIC_CHAIN_ADDRESS): Define.
13618         (EH_RETURN_DATA_REGNO): Define.
13619         (EH_RETURN_STACKADJ_RTX): Define.
13620         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13621         patterns for dwarf exception handling.
13623 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13625         * config/nds32/nds32.h: Clean up obsolete macros.
13627 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13629         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13630         Add enum values for particular instructions.
13631         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13632         particular intrinsic functions.
13633         * config/nds32/nds32-intrinsic.md: Likewise.
13634         * config/nds32/nds32_intrinsic.h: Likewise.
13635         * config/nds32/nds32.h (nds32_builtins): Likewise.
13636         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13637         (btst, ave): New patterns for particular instructions.
13639 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13641         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13642         Add enum values for atomic load/store and memory sync.
13643         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13644         and memory sync.
13645         * config/nds32/nds32-intrinsic.md: Likewise.
13646         * config/nds32/nds32_intrinsic.h: Likewise.
13647         * config/nds32/nds32.h (nds32_builtins): Likewise.
13649 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13651         PR tree-optimization/85257
13652         * fold-const.c (native_encode_vector): If not all elts could fit
13653         and off is -1, return 0 rather than offset.
13654         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13655         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13656         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13657         adjust buffer in native_interpret_expr call.
13659 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13661         * config/nds32/constants.md (unspec_volatile_element): Add cache
13662         control enum values.
13663         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13664         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13665         * config/nds32/nds32.c (nds32_cctl_names): New.
13666         (nds32_print_operand): Handle cache control register names.
13667         * config/nds32/nds32.h (nds32_builtins): New enum values.
13668         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13669         macros.
13670         * config/nds32/nds32.md (type): Add mmu.
13671         * config/nds32/pipelines.md (simple_insn): Add mmu.
13673 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13675         * config/nds32/nds32.md (type): Remove call.
13676         * config/nds32/pipelines.md (simple_insn): Likewise.
13678 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13680         * config/nds32/constants.md (unspec_volatile_element): Add
13681         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13682         UNSPEC_VOLATILE_FMFCFG.
13683         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13684         description for fmfcfg and fmfcsr.
13685         (bdesc_1arg): Add fmtcsr.
13686         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13687         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13688         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13689         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13690         unspec_fmfcfg): New patterns.
13691         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13692         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13693         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13694         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13695         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13696         __nds32__fmfcfg): Define.
13698 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13700         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13701         intrinsic register names.
13702         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13703         intrinsic register enum values and macros.
13705 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13707         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13708         for load/store addressing form.
13709         (nds32_print_operand_address): Likewise.
13711 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13713         PR target/85196
13714         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13715         based on LABEL_REF.  Remove useless assertion.
13716         (pic_address_needs_scratch): Fix formatting.
13717         (sparc_legitimize_pic_address): Minor tweaks.
13718         (sparc_delegitimize_address): Adjust assertion accordingly.
13719         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13720         into symbolic_operand.
13721         (movsi_high_pic_label_ref): Likewise.
13722         (movsi_lo_sum_pic_label_ref): Likewise.
13723         (movdi_pic_label_ref): Likewise.
13724         (movdi_high_pic_label_ref): Likewise.
13725         (movdi_lo_sum_pic_label_ref): Likewise.
13727 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13729         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13730         custom LIB_SPEC setup.
13732 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13733             Kito Cheng  <kito.cheng@gmail.com>
13735         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13736         * config/riscv/freebsd.h: New.
13738 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13740         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13741         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13742         file.
13744 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13745             Kito Cheng  <kito.cheng@gmail.com>
13747         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13748         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13749         * config/nds32/nds32-protos.h (nds32_output_call,
13750         nds32_output_return): Declare.
13751         * config/nds32/nds32.md: Refine all the call and return patterns.
13753 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13755         PR debug/85252
13756         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13757         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13759         PR rtl-optimization/84872
13760         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13761         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13762         EDGE_CROSSING edge.
13764 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13766         * expr.c (copy_blkmode_to_reg): Revert 254862.
13767         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13769 2018-04-06  Richard Biener  <rguenther@suse.de>
13771         PR middle-end/85244
13772         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13773         after seeing a component reference with an adjacent field.  Treat
13774         refs to arrays at struct end of external decls similar to
13775         refs to unconstrained commons.
13777 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13779         PR sanitizer/85213
13780         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13781         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13782         recursive calls.
13783         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13784         save_p here.
13786 2018-04-06  Richard Biener  <rguenther@suse.de>
13788         PR middle-end/85180
13789         * alias.c (find_base_term): New wrapper around find_base_term
13790         unwinding CSELIB_VAL_PTR changes.
13791         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13792         recursion.
13794 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13796         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13797         instructions.
13798         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13799         constant definitions.
13800         ("nop"): lr 0,0 -> nopr r0
13801         ("nop_lr0", "nop_lr1"): New insn definitions.
13803 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13805         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13806         NDS32_V3PUSH_AVAILABLE_P macro.
13808 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13809             Chung-Ju Wu  <jasonwucj@gmail.com>
13811         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13812         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13813         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13814         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13815         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13816         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13817         * config/nds32/constraints.md: New constraints and checking for hard
13818         float configuration.
13819         * config/nds32/iterators.md: New mode iterator and attribute for hard
13820         float configuration.
13821         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13822         patterns.
13823         * config/nds32/nds32-fpu.md: New file.
13824         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13825         deal with hard float code generation.
13826         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13827         ARCH_V3S.
13828         (abi_type, float_reg_number): New enum type.
13829         * config/nds32/nds32-predicates.c: New predicates for hard float.
13830         * config/nds32/nds32-protos.h: Declare functions for hard float.
13831         * config/nds32/nds32.c: Implementation for hard float configuration.
13832         * config/nds32/nds32.h: Definitions for hard float configuration.
13833         * config/nds32/nds32.md: Include hard float machine description and
13834         modify patterns for hard float configuration.
13835         * config/nds32/nds32.opt: New options for hard float configuration.
13836         * config/nds32/predicates.md: New predicates for hard float
13837         configuration.
13839 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13841         * common/config/nds32/nds32-common.c
13842         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13844 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13846         PR middle-end/85195
13847         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13848         CONSTRUCTOR_ELT (ctor, ...)->value.
13850 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13852         PR target/85193
13853         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13855 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13857         PR target/85204
13858         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13859         cond jump.
13861 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13862             Kito Cheng  <kito.cheng@gmail.com>
13864         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13865         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13866         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13867         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13869 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13870             Kito Cheng  <kito.cheng@gmail.com>
13872         * config/nds32/constraints.md (Ufe): New memory constraint.
13873         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13874         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13875         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13876         operands.
13877         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13878         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13880 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13882         * config/nds32/nds32.md: Use optimize_size in the condition for
13883         alu-shift instructions.
13885 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13887         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13889 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13891         * config/nds32/nds32.md (negsi2): Refine pattern.
13893 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13894             Chung-Ju Wu  <jasonwucj@gmail.com>
13896         * config/nds32/iterators.md (shift_rotate): New code iterator.
13897         (shift): New code attribute.
13898         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13899         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13900         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13901         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13902         bit-wise operations.
13903         (andsi3, *andsi3): Ditto.
13904         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13905         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13906         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13907         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13908         nds32_ior_operand, nds32_xor_operand): New predicates.
13910 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13912         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13913         (addsi3, subsi3): ... this.
13915 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13917         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13919 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13921         * config/nds32/nds32.md: Adjust indention.
13923 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13925         * config/nds32/nds32.md (feature): New attribute.
13927 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13929         * config/nds32/nds32.md (subtype): New attribute.
13931 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13933         PR target/85203
13934         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13935         expansion to perform a bitwise AND of the argument followed by a
13936         boolean negation of the result.
13938 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13940         PR rtl-optimization/84878
13941         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13942         the basic block.  Assert the use reference is not artificial and that
13943         it has an associated insn.
13945 2018-04-04  Michael Matz  <matz@suse.de>
13947         * builtins.c (compute_objsize): Pass correct operand
13948         to array_at_struct_end_p.
13950 2018-04-04  Richard Biener  <rguenther@suse.de>
13952         PR lto/85176
13953         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13954         from contexts for DINFO_LEVEL_TERSE and below.
13956 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13958         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13959         resiter_operand condition.
13960         * config/nds32/nds32.md (*move<mode>): Ditto.
13962 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13963             Monk Chiang  <sh.chiang04@gmail.com>
13965         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13967 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13969         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13971 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13972             Kito Cheng  <kito.cheng@gmail.com>
13974         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13975         nds32_cond_code_str, output_cond_branch,
13976         output_cond_branch_compare_zero, nds32_expand_cbranch,
13977         nds32_expand_cstore, nds32_expand_movcc,
13978         nds32_output_cbranchsi4_equality_zero,
13979         nds32_output_cbranchsi4_equality_reg,
13980         nds32_output_cbranchsi4_equality_reg_or_const_int,
13981         nds32_output_cbranchsi4_greater_less_zero: New functions.
13982         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13983         nds32_expand_cstore, nds32_expand_movcc,
13984         nds32_output_cbranchsi4_equality_zero,
13985         nds32_output_cbranchsi4_equality_reg,
13986         nds32_output_cbranchsi4_equality_reg_or_const_int,
13987         nds32_output_cbranchsi4_greater_less_zero): Declare.
13988         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13989         nds32_rimm11s_operand): New predicates.
13990         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13991         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13992         patterns.
13994 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13996         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13997         * config/nds32/nds32.md: Ditto.
13998         * config/nds32/pipelines.md: Ditto.
14000 2018-04-04  Richard Biener  <rguenther@suse.de>
14002         PR tree-optimization/85168
14003         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14004         propagating abnormals.
14006 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14008         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14010 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14011             Kito Cheng  <kito.cheng@gmail.com>
14013         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14014         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14015         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14016         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14017         * config/nds32/nds32.md (sibcall_internal): New.
14018         (sibcall_register): Remove.
14019         (sibcall_immediate): Remove.
14020         (sibcall_value_internal): New.
14021         (sibcall_value_register): Remove.
14022         (sibcall_value_immediate): Remove.
14023         * config/nds32/predicates.md (nds32_general_register_operand): New.
14024         (nds32_call_address_operand): New.
14026 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14028         PR rtl-optimization/85167
14029         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14030         bb_defs if *split_p, instead preinitialize it to NULL.
14032         PR tree-optimization/85156
14033         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14034         evaluating the argument multiple times.
14036 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
14038         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14039         than vector.
14040         (_mm_cvtpd_ps): Likewise.
14041         (_mm_cvttpd_epi32): Likewise.
14042         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14043         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14044         vector, pixel, and bool following altivec.h include.
14046 2018-04-03  Martin Sebor  <msebor@redhat.com>
14048         * doc/extend.texi (Common Function Attributes): Clarify.
14049         (const attribute): Likewise.
14050         (pure attribute): Likewise.
14052 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14054         PR target/85169
14055         * config/i386/i386.c (ix86_expand_vector_set): Use
14056         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
14058 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
14060         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14061         instructions when changing rounding bits to preserve precision bits
14062         in the x87 control word.
14064 2018-04-03  Martin Liska  <mliska@suse.cz>
14066         PR tree-optimization/82491
14067         * rtl.h (strip_offset_and_add): Replace += suboffset with
14068         poly_uint64 () + suboffset.
14070 2018-03-29  Martin Liska  <mliska@suse.cz>
14071             Martin Jambor  <mjambor@suse.cz>
14073         PR ipa/84947
14074         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14075         param_type is not an integral or pointer type.
14077 2018-04-03  Richard Biener  <rguenther@suse.de>
14079         * sese.h (recompute_all_dominators): Remove.
14081 2018-04-02  Martin Sebor  <msebor@redhat.com>
14083         * doc/invoke.texi (-Wrestrict): Fix typos.
14085 2018-04-02  Jim Wilson  <jimw@sifive.com>
14087         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14088         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14089         (<optab>di3, <optab>si3_extend): Likewise.
14090         (<optab>si3_mask, <optab>si3_mask_1): New.
14091         (<optab>di3_mask, <optab>di3_mask_1): New.
14092         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14093         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14094         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14096 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
14098         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14099         example.
14101 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14103         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14104         (nds32_canonicalize_comparison): New function.
14106 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14107             Kito Cheng  <kito.cheng@gmail.com>
14108             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
14110         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14111         * config/nds32/constants.md (unspec_volatile_element): Add
14112         UNSPEC_VOLATILE_RELAX_GROUP.
14113         * config/nds32/nds32-relax-opt.c: New file.
14114         * config/nds32/nds32-predicates.c
14115         (nds32_symbol_load_store_p): New function.
14116         * config/nds32/nds32-protos.h
14117         (nds32_symbol_load_store_p): Declare function.
14118         (make_pass_nds32_relax_opt): Declare new rtl pass function.
14119         * config/nds32/nds32.c
14120         (nds32_register_pass): New function to register pass.
14121         (nds32_register_passes): New function to register passes.
14122         * config/nds32/nds32.md (relax_group): New pattern.
14123         * config/nds32/nds32.opt (mrelax-hint): New option.
14124         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14126 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
14128         * config/nds32/t-nds32: Modify files dependency.
14130 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14132         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14133         (PROFILE_HOOK): Define its implementation.
14135 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14137         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14138         type and 32-bit size.
14140 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
14142         PR middle-end/85090
14143         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14144         (V_128_256): New mode iterator.
14145         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14146         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14147         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14148         of V.
14149         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14150         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14152 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
14154         PR target/83315
14155         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14156         NaN inputs correctly.
14158 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
14160         PR target/80546
14161         * config/rs6000/vsx.md (??r): New mode attribute.
14162         (*vsx_mov<mode>_64bit): Use it.
14163         (*vsx_mov<mode>_32bit): Likewise.
14165 2018-03-30  Martin Sebor  <msebor@redhat.com>
14167         PR tree-optimization/84818
14168         * builtins.c (check_access): Use warning_n.
14170 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14172         PR target/83822
14173         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14174         condition.
14175         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14176         condition.
14178 2018-03-30  Julia Koval  <julia.koval@intel.com>
14180         PR target/84413
14181         * x86-tune.def (movx, partial_reg_dependency): Enable for
14182         m_SKYLAKE_AVX512.
14184 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
14186         PR inline-asm/84985
14187         * lra-constraints.c (process_alt_operands): Move setting
14188         this_alternative_matches below.
14190 2018-03-29  Martin Liska  <mliska@suse.cz>
14192         PR lto/84995.
14193         * doc/invoke.texi: Document how LTO works with debug info.
14194         Describe auto-load support of binutils.  Mention 'x86-64'
14195         as valid option value of -march option.
14197 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
14199         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14201         PR c/85094
14202         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14203         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14204         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14205         checking.
14207 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14209         PR target/84912
14210         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14211         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14212         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14213         for RS6000_BTM_POWERPC64.
14214         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14215         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14216         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14217         definition.
14218         (DIVDE): Use it.
14219         (DIVDEU): Likewise.
14221 2018-03-28  Carl Love  <cel@us.ibm.com>
14223         Revert
14224         2017-09-27  Carl Love  <cel@us.ibm.com>
14226         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14227         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14228         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14229         fctiw instruction.
14231 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14233         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14234         instead of __vector bool.
14235         (_mm_max_pu8): Likewise.
14236         (_mm_min_pi16): Likewise.
14238 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14240         PR target/84912
14241         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14242         (DIVWEUO): Likewise.
14243         (DIVDEO): Likewise.
14244         (DIVDEUO): Likewise.
14245         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14246         DIVWEUO and DIVDEUO.
14247         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14248         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14249         (div_extend): Likewise.
14250         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14251         builtin function.
14252         (__builtin_divweuo): Likewise.
14253         (__builtin_divdeo): Likewise.
14254         (__builtin_divdeuo): Likewise.
14256 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14258         PR target/85095
14259         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14260         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14262         PR tree-optimization/82004
14263         * gimple-match-head.c (optimize_pow_to_exp): New function.
14264         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14265         Don't fold to exp if optimize_pow_to_exp is false.
14267 2018-03-28  Martin Liska  <mliska@suse.cz>
14269         PR other/84819
14270         * calls.c (initialize_argument_information): Fix trailing space.
14271         * common.opt: Fix typo and provide better explanation for
14272         -fsanitize-coverage option.
14273         * config/i386/i386.opt: Fix typo.
14275 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14276             Martin Liska  <mliska@suse.cz>
14278         PR sanitizer/85081
14279         * gimplify.c (asan_poison_variable): Don't do the check for
14280         gimplify_omp_ctxp here.
14281         (gimplify_decl_expr): Do it here.
14282         (gimplify_target_expr): Likewise.
14284 2018-03-28  Martin Liska  <mliska@suse.cz>
14286         PR target/84988
14287         * config/i386/i386.c (ix86_function_arg_advance): Do not call
14288         chkp_type_bounds_count if MPX is not enabled.
14290 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14292         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14294 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
14296         PR target/84914
14297         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14298         function to create the function decl for complex long double
14299         multiply and divide for -mabi=ieeelongdouble.
14300         (init_float128_ieee): Call it.
14302 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
14304         PR target/85044
14305         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14306         -fcf-protection=branch -mibt.
14307         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14309 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14311         PR target/81863
14312         * config/arm/arm.c (arm_valid_symbolic_address): Handle
14313         arm_word_relocations.
14315 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
14317         PR target/85056
14318         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14319         extern array declarations.
14321 2018-03-27  Richard Biener  <rguenther@suse.de>
14323         PR middle-end/84067
14324         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14325         explicit single_use checks.
14327 2018-03-27  Richard Biener  <rguenther@suse.de>
14329         PR tree-optimization/85082
14330         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14331         Valueize the VUSE.
14333 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14335         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14336         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14337         Turn on fasynchronous-unwind-tables and funwind-tables.
14339 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
14341         PR target/85073
14342         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14343         (*bmi_blsr_<mode>_ccz): Ditto.
14345 2018-03-26  Tom de Vries  <tom@codesourcery.com>
14347         PR tree-optimization/85063
14348         * omp-general.c (offloading_function_p): New function.  Factor out
14349         of ...
14350         * omp-offload.c (pass_omp_target_link::gate): ... here.
14351         * omp-general.h (offloading_function_p): Declare.
14352         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14353         with attribute omp declare target for offloading functions.
14355 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
14357         PR tree-optimization/84005
14358         * tree-data-ref.h (get_base_for_alignment): Declare.
14359         * tree-data-ref.c (get_base_for_alignment_1): New function.
14360         (get_base_for_alignment): Likewise.
14361         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14362         get_base_for_alignment to find a suitable base object, instead
14363         of always using drb->base_address.
14365 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14367         PR inline-asm/85022
14368         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14369         known size by default.
14371 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
14373         PR inline-asm/85030
14374         * lra-constraints.c (process_alt_operands): Don't match BLKmode
14375         and non BLKmode operands.
14377 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14379         PR target/85026
14380         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14381         Clean up attributes.
14383 2018-03-23  Richard Biener  <rguenther@suse.de>
14385         PR debug/85020
14386         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14387         we are going to emit early debug for LTO.
14389 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14391         PR inline-asm/85034
14392         * function.c (match_asm_constraints_1): Don't optimize if input
14393         doesn't satisfy general_operand predicate for output's mode.
14395         PR inline-asm/85022
14396         * alias.c (write_dependence_p): Don't require for x_canonicalized
14397         non-VOIDmode if x has VOIDmode.
14399         PR sanitizer/85029
14400         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14401         just don't try to optimize it rather than assert it never happens.
14403 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14405         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14406         macro expansions for definition of ST_INTERNAL_<mode> and
14407         LD_INTERNAL_<mode> builtins.
14408         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14409         Remove prototype.
14410         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14411         function.
14412         (altivec_expand_st_builtin): Likewise.
14413         (altivec_expand_builtin): Remove calls to deleted functions.
14414         (rs6000_address_for_altivec): Delete this function.
14415         * config/rs6000/vector.md: Remove expands for
14416         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14418 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
14420         PR target/84826
14421         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14422         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14423         re-computing once computed.
14424         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14425         (arm_init_machine_status): Initialize
14426         machine->static_chain_stack_bytes.
14428 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14430         PR target/84760
14431         * doc/extend.texi: Add four new prototypes for vec_ld.
14432         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14433         definitions for more logical presentation.
14434         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14435         entries for V1TI variants of __builtin_altivec_ld builtin.
14436         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14437         handling of V1TI variant of LVX icode pattern.
14438         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14439         (rs6000_gimple_fold_builtin): Likewise.
14440         (altivec_init_builtins): Add code to define
14441         __builtin_altivec_lvx_v1ti function.
14443 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14445         PR inline-asm/84941
14446         * function.c (match_asm_constraints_1): Don't do the optimization
14447         if input isn't a REG, SUBREG, MEM or constant.
14449 2018-03-22  Tom de Vries  <tom@codesourcery.com>
14451         PR tree-optimization/84956
14452         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14453         bb_has_abnormal_pred.
14455 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14457         PR sanitizer/85018
14458         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14459         DECL_INITIAL (decl) to decl at the end.
14460         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14461         adjust the comment.
14463 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14465         * doc/extend.texi (__builtin_tgmath): Document when complex
14466         integer types are treated as _Complex _Float64.
14468 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14470         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14472 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14474         PR tree-optimization/84960
14475         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14476         if it is ENTRY block, move them into single succ of ENTRY in that case.
14478 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
14480         PR tree-optimization/84811
14481         * poly-int.h (poly_span_traits): Remove the T3 parameter and
14482         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14483         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14484         (known_subrange_p): Update accordingly.  Cast each value involved
14485         in the size comparison, rather than casting the result of the
14486         subtraction.
14488 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14490         PR tree-optimization/84982
14491         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14492         by flipping the least significant bit rather than all bits from
14493         bitpos to bitpos + bitsize - 1.
14495 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14497         * doc/extend.texi (Deprecated Features): Remove mention of
14498         long-deleted deprecations.
14500 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14502         PR jit/84288
14503         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14504         * configure: Regenerate.
14506 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14508         PR tree-optimization/83126
14509         * tree-parloops.c (num_phis): New function.
14510         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14512 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14514         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14515         mention anon-struct/union members and trailing attributes.
14517 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14519         PR tree-optimization/84969
14520         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14521         builtin memset partitions if they set different rhs values.
14523 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14525         PR rtl-optimization/84989
14526         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14527         VEC_DUPLICATE with scalar result mode.
14529 2018-03-21  Martin Liska  <mliska@suse.cz>
14531         PR ipa/84963
14532         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14533         not intended return statement.
14535 2018-03-21  Martin Liska  <mliska@suse.cz>
14537         PR target/84988
14538         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14539         (chkp_find_bound_slots_1): Limit number of iterations.
14541 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14543         PR target/84838
14544         * Minor grammar fixes for x86 options.
14546 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14548         PR debug/84875
14549         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14550         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14552 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14554         PR target/83789
14555         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14556         (altivec_lvx_<mode>_1op): Likewise.
14557         (altivec_stvx_<mode>_2op): Likewise.
14558         (altivec_stvx_<mode>_1op): Likewise.
14559         (altivec_lvx_<VM2:mode>): New define_expand.
14560         (altivec_stvx_<VM2:mode>): Likewise.
14561         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14562         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14563         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14564         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14565         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14566         (rs6000_gen_lvx): Likewise.
14567         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14568         (altivec_expand_stv_builtin): Likewise.
14569         (altivec_expand_builtin): Likewise.
14570         * config/rs6000/vector.md: Likewise.
14572 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14574         PR target/82518
14575         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14576         BYTES_BIG_ENDIAN.
14578 2018-03-20  Richard Biener  <rguenther@suse.de>
14580         PR target/84986
14581         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14582         sign-conversions as zero, fall back to standard scalar_stmt
14583         cost for the rest.
14585 2018-03-20  Martin Liska  <mliska@suse.cz>
14587         PR ipa/84825
14588         * predict.c (rebuild_frequencies): Handle case when we have
14589         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14591 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14593         PR target/84990
14594         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14595         flag_section_anchors.
14596         * varasm.c (use_blocks_for_decl_p): Remove hack for
14597         dw2_force_const_mem.
14599         PR target/84845
14600         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14601         to ...
14602         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14603         be created, use lowpart_subreg of operands[0] rather than operands[0]
14604         itself.
14605         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14606         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14607         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14608         and n constraint instead of aarch64_shift_imm_di and Usd.
14609         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14610         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14612 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14614         PR target/82989
14615         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14616         to favor GPR over NEON registers.
14617         (<shift>di3_neon): Likewise.
14619 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14621         PR target/84952
14622         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14623         (nvptx_process_pars): Emit bar.sync asap and alap.
14625 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14627         PR target/84954
14628         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14629         seen_label if seen_label is already set.
14631 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14633         PR target/84945
14634         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14635         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14636         Use 1U instead of 1.  Formatting fixes.
14638         PR c/84953
14639         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14640         instead of TREE_TYPE (s1) for the return value.
14642 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14644         PR tree-optimization/84946
14645         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14646         bitsize + bitsize in poly_uint64 rather than poly_int64.
14648         PR sanitizer/78651
14649         * dwarf2asm.c: Include fold-const.c.
14650         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14651         of decl rather than decl itself.
14653         PR rtl-optimization/84643
14654         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14656 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14658         PR sanitizer/78651
14659         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14660         calling assemble_variable.
14662 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14664         PR target/81647
14665         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14666         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14668 2018-03-19  Jim Wilson  <jimw@sifive.com>
14670         PR bootstrap/84856
14671         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14672         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14673         (riscv_first_stack_step): Likewise.
14674         (riscv_option_override): Use STACK_BOUNDARY instead of
14675         MIN_STACK_BOUNDARY.
14676         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14677         MIN_STACK_BOUNDARY.
14678         (BIGGEST_ALIGNMENT): Set to 128.
14679         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14680         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14681         STACK_BOUNDARY.
14683 2018-03-19  Richard Biener  <rguenther@suse.de>
14685         PR tree-optimization/84933
14686         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14687         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14689 2018-03-19  Richard Biener  <rguenther@suse.de>
14691         PR tree-optimization/84859
14692         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14693         (cond_if_else_store_replacement): Perform sinking operation on
14694         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14695         Generalize what a BB with a single eligible store is.
14697 2018-03-19  Richard Biener  <rguenther@suse.de>
14699         PR tree-optimization/84929
14700         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14701         chrec_is_positive against non-chrec arg.
14703 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14705         PR target/84711
14706         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14708 2018-03-18  Martin Liska  <mliska@suse.cz>
14710         PR rtl-optimization/84635
14711         * regrename.c (build_def_use): Use matches_mode only when
14712         matches >= 0.
14714 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14716         PR tree-optimization/84913
14717         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14718         vectorize chains of COND_EXPRs.
14720 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14722         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14724 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14726         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14728 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14730         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14732 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14733             Kito Cheng  <kito.cheng@gmail.com>
14735         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14736         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14737         (nds32_adjust_reg_alloc_order): New function.
14738         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14740 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14742         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14743         nds32_print_operand, nds32_print_operand_address): Use
14744         HOST_WIDE_INT_PRINT_DEC instead.
14746 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14748         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14750 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14752         PR target/84902
14753         * config/i386/i386.c (initial_ix86_tune_features,
14754         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14755         unsigned long long.
14756         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14757         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14758         rather than 1u << ix86_tune.  Formatting fix.
14759         (ix86_option_override_internal): Change ix86_arch_mask from
14760         unsigned int to unsigned HOST_WIDE_INT, initialize to
14761         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14762         (ix86_function_specific_restore): Likewise.
14764 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14766         PR target/84899
14767         * postreload.c (reload_combine_recognize_pattern): Perform
14768         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14769         truncate_int_for_mode the result for the destination's mode.
14771         PR c/84909
14772         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14773         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14774         Likewise.
14775         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14776         Likewise.
14778 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14780         PR target/84876
14781         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14782         regno_allocno_class_array and sorted_pseudos.
14783         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14784         insns where regno is used.
14786 2018-03-16  Martin Liska  <mliska@suse.cz>
14788         PR ipa/84833
14789         * multiple_target.c (create_dispatcher_calls): Redirect
14790         reference in the symbol table.
14792 2018-03-16  Martin Liska  <mliska@suse.cz>
14794         PR ipa/84722
14795         * multiple_target.c (create_dispatcher_calls): Redirect also
14796         an alias.
14798 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14800         PR c++/79937
14801         PR c++/82410
14802         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14803         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14804         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14806 2018-03-16  Julia Koval  <julia.koval@intel.com>
14808         * doc/invoke.texi (Skylake Server): Add CLWB.
14809         Cannonlake): Remove CLWB.
14811 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14813         PR tree-optimization/84841
14814         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14815         1 << 3.
14816         (FLOAT_ONE_CONST_TYPE): Define.
14817         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14818         (sort_by_operand_rank): Put entries with higher constant_type last
14819         rather than first to match comments.
14821 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14823         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14824         split predicate.
14826 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14828         PR c++/79085
14829         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14830         check and use address of target always.
14832 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14834         PR target/84574
14835         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14836         (indirect_thunk_bnd_needed): Likewise.
14837         (indirect_thunks_used): Likewise.
14838         (indirect_thunks_bnd_used): Likewise.
14839         (indirect_return_needed): New.
14840         (indirect_return_bnd_needed): Likewise.
14841         (output_indirect_thunk_function): Add a bool argument for
14842         function return.
14843         (output_indirect_thunk_function): Don't generate alias for
14844         function return thunk.
14845         (ix86_code_end): Call output_indirect_thunk_function to generate
14846         function return thunks.
14847         (ix86_output_function_return): Set indirect_return_bnd_needed
14848         and indirect_return_needed instead of indirect_thunk_bnd_needed
14849         and indirect_thunk_needed.
14851 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14853         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14854         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14855         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14857 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14858             Paul Hua <paul.hua.gm@gmail.com>
14860         PR c/84852
14861         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14863 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14865         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14866         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14867         resp. SFmode cases.
14869 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14871         PR target/84711
14872         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14873         instead of GET_MODE_SIZE when comparing Units.
14875 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14877         PR target/68256
14878         * varasm.c (hash_section): Return an unchangeble hash value
14879         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14880         Return !aarch64_can_use_per_function_literal_pools_p ().
14882 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14884         PR target/84860
14885         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14886         rather than address of cmode as last argument to prepare_cmp_insn.
14888 2018-03-15  Julia Koval  <julia.koval@intel.com>
14890         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14891         F_AVX512VNNI, F_AVX512BITALG): New.
14893 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14895         PR target/83451
14896         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14897         insn for floating-point loads and stores.
14899 2018-03-14  Carl Love  <cel@us.ibm.com>
14901         * config/rs6000/rs6000-c.c: Add macro definitions for
14902         ALTIVEC_BUILTIN_VEC_PERMXOR.
14903         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14904         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14905         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14906         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14907         UNSPEC_VPERMXOR.
14908         * config/doc/extend.texi: Add prototypes for vec_permxor.
14910 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14912         PR c/84852
14913         * diagnostic-show-locus.c (class layout_point): Convert m_line
14914         from int to linenum_type.
14915         (line_span::comparator): Use linenum "compare" function when
14916         comparing line numbers.
14917         (test_line_span): New function.
14918         (layout_range::contains_point): Convert param "row" from int to
14919         linenum_type.
14920         (layout_range::intersects_line_p): Likewise.
14921         (layout::will_show_line_p): Likewise.
14922         (layout::print_source_line): Likewise.
14923         (layout::should_print_annotation_line_p): Likewise.
14924         (layout::print_annotation_line): Likewise.
14925         (layout::print_leading_fixits): Likewise.
14926         (layout::annotation_line_showed_range_p): Likewise.
14927         (struct line_corrections): Likewise for field m_row.
14928         (line_corrections::line_corrections): Likewise for param "row".
14929         (layout::print_trailing_fixits): Likewise.
14930         (layout::get_state_at_point): Likewise.
14931         (layout::get_x_bound_for_row): Likewise.
14932         (layout::print_line): Likewise.
14933         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14934         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14935         * input.c (selftest::test_linenum_comparisons): New function.
14936         (selftest::input_c_tests): Call it.
14937         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14938         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14939         * selftest.h (ASSERT_GT): New macro.
14940         (ASSERT_GT_AT): New macro.
14941         (ASSERT_LT): New macro.
14942         (ASSERT_LT_AT): New macro.
14944 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14946         PR rtl-optimization/84780
14947         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14949 2018-03-14  Martin Liska  <mliska@suse.cz>
14951         * tree.c (record_node_allocation_statistics): Use
14952         get_stats_node_kind.
14953         (get_stats_node_kind): New function extracted from
14954         record_node_allocation_statistics.
14955         (free_node): Use get_stats_node_kind.
14957 2018-03-14  Richard Biener  <rguenther@suse.de>
14959         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14960         that the value-set of ANTIC_IN doesn't grow.
14962         Revert
14963         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14964         member.
14965         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14966         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14968 2018-03-14  Julia Koval  <julia.koval@intel.com>
14970         * config.gcc (icelake-client, icelake-server): New.
14971         (icelake): Remove.
14972         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14973         (initial_ix86_arch_features): Ditto.
14974         (PTA_SKYLAKE): Add SGX.
14975         (PTA_ICELAKE): Remove.
14976         (PTA_ICELAKE_CLIENT): New.
14977         (PTA_ICELAKE_SERVER): New.
14978         (ix86_option_override_internal): Split up icelake on icelake client and
14979         icelake server.
14980         (get_builtin_code_for_version): Ditto.
14981         (fold_builtin_cpu): Ditto.
14982         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14983         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14984         * config/i386/i386.h (processor_type): Ditto.
14985         * doc/invoke.texi: Ditto.
14987 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14989         PR sanitizer/83392
14990         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14991         INTEGER_CST offset, add it together with bitpos / 8 and
14992         sign extend based on POINTER_SIZE.
14994         PR target/84844
14995         Revert
14996         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14998         PR target/78090
14999         * config/i386/constraints.md (Yc): New register constraint.
15000         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15001         Use Yc constraint for alternative 2 of operand 0.  Remove
15002         preferred_for_speed attribute.
15004 2018-03-14  Richard Biener  <rguenther@suse.de>
15006         PR tree-optimization/84830
15007         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15008         with the old one to avoid oscillations.
15010 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
15012         PR target/83712
15013         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15014         pseudos.
15015         (assign_by_spills): Return a flag of reload assignment failure.
15016         Do not process the reload assignment failures.  Do not spill other
15017         reload pseudos if they has the same reg class.  Update n if
15018         necessary.
15019         (lra_assign): Add a return arg.  Set up from the result of
15020         assign_by_spills call.
15021         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15022         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15023         usage_insns if it is not NULL.
15024         (spill_hard_reg_in_range): New function.
15025         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15026         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15027         function prototypes.
15028         (lra_assign): Change prototype.
15029         * lra.c (lra): Add code to deal with fails by splitting hard reg
15030         live ranges.
15032 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
15034         * config/riscv/riscv.opt (mrelax): New option.
15035         * config/riscv/riscv.c (riscv_file_start): Emit ".option
15036         "norelax" when riscv_mrelax is disabled.
15037         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15039 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15041         PR target/84743
15042         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15043         reassociation for int modes.
15045 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15047         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15048         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15049         for big-endian.
15050         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15051         * config/aarch64/aarch64-sve.md
15052         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15053         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15054         (*extend<mode><Vwide>2): Rename to...
15055         (aarch64_sve_extend<mode><Vwide>2): ...this.
15056         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15057         renaming the old pattern to...
15058         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
15059         unsigned packs.
15060         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15061         define_expand, renaming the old pattern to...
15062         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15063         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15064         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15065         account when deciding which SVE instruction the optab should use.
15066         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15068 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15070         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15071         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15072         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15073         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15074         (tlsdesc_small_<mode>): Turn a define_expand and use
15075         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
15076         (tlsdesc_small_advsimd_<mode>): ...this.
15077         (tlsdesc_small_sve_<mode>): New pattern.
15079 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15081         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15082         (UNSPEC_UMUL_HIGHPART): New constants.
15083         (MUL_HIGHPART): New int iteraor.
15084         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15085         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15086         define_expand.
15087         (*<su>mul<mode>3_highpart): New define_insn.
15089 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
15091         PR lto/84805
15092         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15093         incomplete types.
15095 2018-03-13  Martin Liska  <mliska@suse.cz>
15097         PR ipa/84658.
15098         * (sem_item_optimizer::sem_item_optimizer): Initialize new
15099         vector.
15100         (sem_item_optimizer::~sem_item_optimizer): Release it.
15101         (sem_item_optimizer::merge_classes): Register variable aliases.
15102         (sem_item_optimizer::fixup_pt_set): New function.
15103         (sem_item_optimizer::fixup_points_to_sets): Likewise.
15104         * ipa-icf.h: Declare new variables and functions.
15106 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
15108         PR middle-end/84834
15109         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15110         integer_pow2p@2 and test integer_pow2p in condition.
15111         (A < 0 ? C : 0): Similarly for @1.
15113         PR middle-end/84831
15114         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15115         characters starting at p contain '\0' character, don't look beyond
15116         that.
15118         PR target/84827
15119         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15120         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15122         PR target/84828
15123         * reg-stack.c (change_stack): Change update_end var from int to
15124         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15125         also call set_block_for_insn on the newly added insns and rescan.
15127         PR target/84786
15128         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15129         on the last operand.
15131         PR c++/84704
15132         * tree.c (stabilize_reference_1): Return save_expr (e) for
15133         STATEMENT_LIST even if it doesn't have side-effects.
15135 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
15137         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15139 2018-03-12  Renlin Li  <renlin.li@arm.com>
15141         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15142         aarch64_output_scalar_simd_mov_immediate.
15144 2018-03-12  Martin Sebor  <msebor@redhat.com>
15146         PR tree-optimization/83456
15147         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15148         for perfectly overlapping calls to memcpy.
15149         (gimple_fold_builtin_memory_chk): Same.
15150         (gimple_fold_builtin_strcpy): Handle no-warning.
15151         (gimple_fold_builtin_stxcpy_chk): Same.
15152         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15154 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15156         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15157         parameter.  Use it for SFmode.
15158         (rs6000_function_arg_advance_1): Adjust.
15159         (rs6000_function_arg): Adjust.
15160         (rs6000_gimplify_va_arg): Pass false for that new parameter.
15162 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15164         PR rtl-optimization/84169
15165         PR rtl-optimization/84780
15166         * combine.c (can_combine_p): Check for a 2-insn combination whether
15167         the destination register is used between the two insns, too.
15169 2018-03-12  Richard Biener  <rguenther@suse.de>
15171         PR tree-optimization/84803
15172         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15173         for refs DR analysis didn't process.
15175 2018-03-12  Richard Biener  <rguenther@suse.de>
15177         PR tree-optimization/84777
15178         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15179         force-vectorize loops ignore whether we are optimizing for size.
15181 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15183         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15184         (TARGET_MD_ASM_ADJUST): Define.
15186 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
15187             Kito Cheng  <kito.cheng@gmail.com>
15188             Chung-Ju Wu  <jasonwucj@gmail.com>
15190         * config/nds32/nds32.c (nds32_compute_stack_frame,
15191         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15192         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15193         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15194         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15195         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15196         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15197         * config/nds32/nds32.md (prologue, epilogue): Use macro
15198         NDS32_V3PUSH_AVAILABLE_P to do checking.
15200 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
15202         PR debug/58150
15203         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15204         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15205         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
15206         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
15207         addition of most attributes on !orig_type_die or the attribute not
15208         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15210 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15211             Chung-Ju Wu  <jasonwucj@gmail.com>
15213         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15214         __NDS32_VH__ macro.
15215         * config/nds32/nds32.opt (mvh): New option.
15217 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15218             Chung-Ju Wu  <jasonwucj@gmail.com>
15220         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15221         function.
15222         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15223         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15224         definition.
15226 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15227             Chung-Ju Wu  <jasonwucj@gmail.com>
15229         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15230         function.
15231         * config/nds32/nds32-multiple.md (strlensi): New pattern.
15232         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15234 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
15235             Kito Cheng  <kito.cheng@gmail.com>
15236             Chung-Ju Wu  <jasonwucj@gmail.com>
15238         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15239         UNSPEC_FFMISM and UNSPEC_FLMISM.
15240         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15241         for ffb, ffmism and flmism.
15242         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15243         (unspec_ffmism): Ditto.
15244         (unspec_flmism): Ditto.
15245         (nds32_expand_builtin_impl): Check if string extension is available.
15246         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15247         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15249 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
15251         Reverting patch:
15252         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15254         PR target/83712
15255         * lra-assigns.c (assign_by_spills): Return a flag of reload
15256         assignment failure.  Do not process the reload assignment
15257         failures.  Do not spill other reload pseudos if they has the same
15258         reg class.
15259         (lra_assign): Add a return arg.  Set up from the result of
15260         assign_by_spills call.
15261         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15262         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15263         usage_insns if it is not NULL.
15264         (spill_hard_reg_in_range): New function.
15265         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15266         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15267         function prototypes.
15268         (lra_assign): Change prototype.
15269         * lra.c (lra): Add code to deal with fails by splitting hard reg
15270         live ranges.
15272 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
15274         PR target/84807
15275         * config/i386/i386.opt: Replace Enforcment with Enforcement.
15277 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
15279         PR debug/84620
15280         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15281         (dw_val_node): Add val_symbolic_view.
15282         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15283         (symview_upper_bound): New.
15284         (new_line_info_table): Initialize symviews_since_reset.
15285         (dwarf2out_source_line): Count symviews_since_reset and set
15286         symview_upper_bound.
15287         (dw_val_equal_p): Handle symview.
15288         (add_AT_symview): New.
15289         (print_dw_val): Handle symview.
15290         (attr_checksum, attr_checksum_ordered): Likewise.
15291         (same_dw_val_p, size_of_die): Likewise.
15292         (value_format, output_die): Likewise.
15293         (add_high_low_attributes): Use add_AT_symview for entry_view.
15294         (dwarf2out_finish): Reset symview_upper_bound, clear
15295         zero_view_p.
15297 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
15299         PR target/83969
15300         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15301         Add strict argument and use it.
15302         (rs6000_split_multireg_move): Update for new strict argument.
15303         (mem_operand_gpr): Disallow all non-offsettable addresses.
15304         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15306 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
15308         PR target/84772
15309         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15310         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15311         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15313         PR c++/84767
15314         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15315         decl, use remap_type if we want to use the type.
15317 2018-03-09  Martin Sebor  <msebor@redhat.com>
15319         PR tree-optimization/84526
15320         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15321         Remove dead code.
15322         (builtin_access::generic_overlap): Be prepared to handle non-array
15323         base objects.
15325 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
15327         PR rtl-optimization/84682
15328         * lra-constraints.c (process_address_1): Check is_address flag
15329         for address constraints.
15330         (process_alt_operands): Likewise.
15331         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15332         preprocess_constraints.
15333         * recog.h (preprocess_constraints): Add oploc parameter.
15334         Adjust callers.
15335         * recog.c (preprocess_constraints): Test address_operand for
15336         CT_ADDRESS constraints.
15338 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15340         PR target/83712
15341         * lra-assigns.c (assign_by_spills): Return a flag of reload
15342         assignment failure.  Do not process the reload assignment
15343         failures.  Do not spill other reload pseudos if they has the same
15344         reg class.
15345         (lra_assign): Add a return arg.  Set up from the result of
15346         assign_by_spills call.
15347         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15348         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15349         usage_insns if it is not NULL.
15350         (spill_hard_reg_in_range): New function.
15351         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15352         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15353         function prototypes.
15354         (lra_assign): Change prototype.
15355         * lra.c (lra): Add code to deal with fails by splitting hard reg
15356         live ranges.
15358 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15360         PR target/83193
15361         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15362         Accept complain bool parameter.  Only emit errors if it is true.
15363         (arm_parse_cpu_option_name): Likewise.
15364         (arm_target_thumb_only): Adjust callers of the above.
15365         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15366         prototype to take a default true bool parameter.
15367         (arm_parse_arch_option_name): Likewise.
15369 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
15370             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15372         PR jit/64089
15373         PR jit/84288
15374         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15375         * configure: Regenerate.
15376         * configure.ac ("linker --version-script option"): New.
15377         ("linker soname option"): New.
15379 2018-03-09  Richard Biener  <rguenther@suse.de>
15381         PR tree-optimization/84775
15382         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15383         immediate uses of predicate stmts and mark them modified.
15385         Revert
15386         PR tree-optimization/84178
15387         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15388         to caller.
15389         (version_loop_for_if_conversion): Delay update_ssa call.
15390         (tree_if_conversion): Delay update_ssa until after predicate
15391         insertion.
15393 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
15395         PR target/84763
15396         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15397         when the function accesses prior frames.
15399 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15401         PR debug/84456
15402         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15403         gen_llsym, otherwise call maybe_gen_llsym.
15405         PR inline-asm/84742
15406         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15407         has ',' character inside of it.
15409 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15411         PR target/84748
15412         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15413         as clobbering CC_REGNUM.
15415 2018-03-08  Richard Biener  <rguenther@suse.de>
15417         PR middle-end/84552
15418         * tree-scalar-evolution.c: Include tree-into-ssa.h.
15419         (follow_copies_to_constant): Do not follow SSA names registered
15420         for update.
15422 2018-03-08  Richard Biener  <rguenther@suse.de>
15424         PR tree-optimization/84178
15425         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15426         to caller.
15427         (version_loop_for_if_conversion): Delay update_ssa call.
15428         (tree_if_conversion): Delay update_ssa until after predicate
15429         insertion.
15431 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
15433         PR tree-optimization/84178
15434         * tree-if-conv.c (release_bb_predicate): Remove the
15435         the assertion that the stmts have NULL use_ops.
15436         Discard the statements, asserting that they haven't
15437         yet been added to a BB.
15439 2018-03-08  Richard Biener  <rguenther@suse.de>
15441         PR tree-optimization/84746
15442         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15443         (phi_translate): Pass in destination ANTIC_OUT set.
15444         (phi_translate_1): Likewise.  For a simplified result lookup
15445         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15446         (phi_translate_set): Adjust.
15447         (do_pre_regular_insertion): Likewise.
15448         (do_pre_partial_partial_insertion): Likewise.
15450 2018-03-08  Martin Liska  <mliska@suse.cz>
15452         PR gcov-profile/84735
15453         * doc/gcov.texi: Document usage of profile files.
15454         * gcov-io.h: Document changes in the format.
15456 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
15458         PR debug/84404
15459         PR debug/84408
15460         * dwarf2out.c (struct dw_line_info_table): Update comments for
15461         view == -1.
15462         (FORCE_RESET_NEXT_VIEW): New.
15463         (FORCE_RESETTING_VIEW_P): New.
15464         (RESETTING_VIEW_P): Check for -1 too.
15465         (ZERO_VIEW_P): Likewise.
15466         (new_line_info_table): Force-reset next view.
15467         (dwarf2out_begin_function): Likewise.
15468         (dwarf2out_source_line): Simplify zero_view_p initialization.
15469         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15470         view directly.  Omit view when omitting .loc at line 0.
15472 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15474         PR tree-optimization/84740
15475         * tree-switch-conversion.c (process_switch): Call build_constructors
15476         only if info.phi_count is non-zero.
15478         PR tree-optimization/84739
15479         * tree-tailcall.c (find_tail_calls): Check call arguments against
15480         DECL_ARGUMENTS (current_function_decl) rather than
15481         DECL_ARGUMENTS (func) when checking for tail recursion.
15483 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15485         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15486         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15487         Volker Reichelt's entry and add entries for people that perform
15488         GCC fuzzy testing and report numerous bugs.
15490 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15492         PR target/82411
15493         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15494         readonly data in sdata, if that is disabled.
15495         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15496         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15497         -mreadonly-in-sdata option.
15499 2018-03-07  Martin Sebor  <msebor@redhat.com>
15501         PR tree-optimization/84468
15502         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15503         basic block when looking for nul assignment.
15505 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15507         PR target/84277
15508         * except.h (output_function_exception_table): Adjust prototype.
15509         * except.c (output_function_exception_table): Remove FNNAME parameter
15510         and add SECTION parameter.  Ouput one part of the table at a time.
15511         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15512         the first part of the exception table and emit unwind directives.
15513         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15514         (i386_pe_seh_cold_init): Likewise.
15515         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15516         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15517         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15518         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15519         * config/i386/winnt.c: Include except.h.
15520         (struct seh_frame_state): Add reg_offset, after_prologue and
15521         in_cold_section fields.
15522         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15523         (i386_pe_seh_cold_init): New function.
15524         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15525         to seh->in_cold_section.
15526         (seh_emit_push): Record the offset of the push.
15527         (seh_emit_save): Record the offet of the save.
15528         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15529         Test seh->after_prologue to disregard the epilogue.
15530         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15531         (i386_pe_end_cold_function): New function.
15533 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15535         PR fortran/84565
15536         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15537         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15539         PR c++/84704
15540         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15541         on tmp_var.
15542         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15543         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15545         PR middle-end/84723
15546         * multiple_target.c: Include tree-inline.h and intl.h.
15547         (expand_target_clones): Diagnose and fail if node->definition and
15548         !tree_versionable_function_p (node->decl).
15550 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15552         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15553         sprint_ul.
15554         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15555         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15556         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15558 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15560         PR target/84710
15561         * combine.c (try_combine): Use reg_or_subregno instead of handling
15562         just paradoxical SUBREGs and REGs.
15564 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15566         * config/arc/arc.c (arc_finalize_pic): Remove function.
15567         (arc_must_save_register): We use single base PIC register, remove
15568         checks to save/restore the PIC register.
15569         (arc_expand_prologue): Likewise.
15570         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15571         Remove.
15572         (arc_verify_short): Likewise.
15573         (arc_attr_type): Likewise.
15574         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15575         (walk_stores): Likewise.
15576         (arc_address_cost): Make it static.
15577         (arc_verify_short): Likewise.
15578         (branch_dest): Likewise.
15579         (arc_attr_type): Likewise.
15580         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15581         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15582         (arc_final_prescan_insn): Remove inserting the nops due to
15583         hardware hazards.  It is done in reorg step.
15584         (insn_length_variant_t): Remove.
15585         (insn_length_parameters_t): Likewise.
15586         (arc_insn_length_parameters): Likewise.
15587         (arc_get_insn_variants): Likewise.
15588         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15590 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15592         PR inline-asm/84683
15593         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15594         assertion failure.
15596         PR tree-optimization/84687
15597         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15598         on new_node->decl.
15599         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15601 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15603         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15604         Rename to ppc_speculation_barrier.
15605         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15606         __builtin_ppc_speculation_barrier.
15608 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15610         PR target/84700
15611         * combine.c (combine_simplify_rtx): Don't try to simplify if
15612         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15613         are equal to x.
15615 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15617         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15618         to 32 bytes when compiling for POWER9.
15620 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15622         PR target/84564
15623         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15624         regparm >= 3 with no arg reg available also for calls with
15625         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15627         PR target/84524
15628         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15629         orig,vex.
15630         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15632 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15634         PR target/84264
15635         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15637 2018-03-05  Richard Biener  <rguenther@suse.de>
15639         PR tree-optimization/84486
15640         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15641         When inserting a __builtin_assume_aligned call set the LHS
15642         SSA name alignment info accordingly.
15644 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15646         PR tree-optimization/84114
15647         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15648         Avoid reassociation of FLOAT_MODE addition.
15650 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15652         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15653         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15654         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15655         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15656         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15657         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15658         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15659         and -mwbnoinvd.
15660         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15661         __builtin_ia32_wbinvd): New builtins.
15662         (SPECIAL_ARGS2): New.
15663         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15664         (SPECIAL_ARGS2): New.
15665         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15666         (ix86_valid_target_attribute_inner_p): Ditto.
15667         (ix86_init_mmx_sse_builtins): Add special_args2.
15668         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15669         TARGET_WBNOINVD_P): New.
15670         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15671         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15672         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15673         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15674         * config/i386/pconfigintrin.h: New file.
15675         * config/i386/wbnoinvdintrin.h: Ditto.
15676         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15677         wbnoinvdintrin.h.
15678         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15680 2018-03-05  Richard Biener  <rguenther@suse.de>
15682         PR tree-optimization/84670
15683         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15684         member.
15685         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15686         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15687         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15688         doesn't grow if all successors (recursively) were visited at least
15689         once.
15691 2018-03-05  Richard Biener  <rguenther@suse.de>
15693         PR tree-optimization/84650
15694         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15695         if executed in the loop pipeline.
15697 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15699         * doc/configfiles.texi (Configuration Files): Move info about
15700         conditionalizing $target-protos.h to...
15701         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15702         differs from $target-protos.h.
15704 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15705             Chung-Ju Wu  <jasonwucj@gmail.com>
15707         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15708         * config/nds32/nds32-multiple.md (setmemsi): Define.
15709         * config/nds32/nds32-memory-manipulation.c
15710         (nds32_gen_dup_4_byte_to_word_value): New.
15711         (emit_setmem_word_loop): New.
15712         (emit_setmem_byte_loop): New.
15713         (nds32_expand_setmem_loop): New.
15714         (nds32_expand_setmem_loop_v3m): New.
15715         (nds32_expand_setmem_unroll): New.
15716         (nds32_expand_setmem): New.
15718 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15719             Chung-Ju Wu  <jasonwucj@gmail.com>
15721         * config/nds32/nds32-memory-manipulation.c
15722         (nds32_emit_load_store): New.
15723         (nds32_emit_post_inc_load_store): New.
15724         (nds32_emit_mem_move): New.
15725         (nds32_emit_mem_move_block): New.
15726         (nds32_expand_movmemsi_loop_unknown_size): New.
15727         (nds32_expand_movmemsi_loop_known_size): New.
15728         (nds32_expand_movmemsi_loop): New.
15729         (nds32_expand_movmemsi_unroll): New.
15730         (nds32_expand_movmemqi): Rename ...
15731         (nds32_expand_movmemsi): ... to this.
15732         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15733         (movmemsi): ... to this.
15734         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15735         (nds32_expand_movmemsi): ... to this.
15737 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15738             Monk Chiang  <sh.chiang04@gmail.com>
15739             Chung-Ju Wu  <jasonwucj@gmail.com>
15741         * config/nds32/nds32-protos.h
15742         (nds32_expand_load_multiple): New arguments.
15743         (nds32_expand_store_multiple): Ditto.
15744         (nds32_valid_multiple_load_store): Rename ...
15745         (nds32_valid_multiple_load_store_p): ... to this.
15746         * config/nds32/nds32-memory-manipulation.c
15747         (nds32_expand_load_multiple): Refine implementation.
15748         (nds32_expand_store_multiple): Ditto.
15749         * config/nds32/nds32-multiple.md
15750         (load_multiple): Update nds32_expand_load_multiple interface.
15751         (store_multiple): Update nds32_expand_store_multiple interface.
15752         * config/nds32/nds32-predicates.c
15753         (nds32_valid_multiple_load_store): Rename ...
15754         (nds32_valid_multiple_load_store_p): ... to this and refine
15755         implementation.
15756         * config/nds32/predicates.md
15757         (nds32_load_multiple_and_update_address_operation): New predicate.
15758         (nds32_store_multiple_and_update_address_operation): New predicate.
15760 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15761             Chung-Ju Wu  <jasonwucj@gmail.com>
15763         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15764         (combo): New attribute.
15765         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15767 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15769         * config/nds32/nds32.opt: Change -mcmodel= default value.
15771 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15772             Monk Chiang  <sh.chiang04@gmail.com>
15773             Chung-Ju Wu  <jasonwucj@gmail.com>
15775         * config/nds32/constants.md (unspec_element): New enum.
15776         * config/nds32/constraints.md (Umw): New constraint.
15777         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15778         * config/nds32/nds32-intrinsic.md: Likewise.
15779         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15780         (nds32_valid_smw_lwm_base_p): New.
15781         (nds32_output_smw_single_word): New.
15782         (nds32_output_lmw_single_word): New.
15783         (nds32_expand_unaligned_load): New.
15784         (nds32_expand_unaligned_store): New.
15785         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15786         (nds32_output_smw_single_word): Declare.
15787         (nds32_output_lmw_single_word): Declare.
15788         (nds32_expand_unaligned_load): Declare.
15789         (nds32_expand_unaligned_store): Declare.
15790         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15791         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15792         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15793         NDS32_BUILTIN_UASTORE_DW.
15794         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15795         predicate.
15797 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15798             Kito Cheng  <kito.cheng@gmail.com>
15799             Chung-Ju Wu  <jasonwucj@gmail.com>
15801         * config/nds32/nds32-intrinsic.c
15802         (nds32_expand_builtin_null_ftype_reg): Delete.
15803         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15804         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15805         (nds32_read_argument): New.
15806         (nds32_legitimize_target): Ditto.
15807         (nds32_legitimize_argument): Ditto.
15808         (nds32_check_constant_argument): Ditto.
15809         (nds32_expand_unop_builtin): Ditto.
15810         (nds32_expand_unopimm_builtin): Ditto.
15811         (nds32_expand_binop_builtin): Ditto.
15812         (nds32_builtin_decl_impl): Ditto.
15813         (builtin_description): Ditto.
15814         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15815         (nds32_init_builtins_impl): Ditto.
15816         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15817         (nds32_builtin_decl): New.
15818         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15819         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15821 2018-03-02  Jeff Law  <law@redhat.com>
15823         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15824         (redundant_insn, fill_simple_delay_slots): Likewise.
15825         (fill_slots_from_thread): Likewise.
15826         * resource.c (mark_referenced_resources): Likewise.
15827         (mark_set_resources, find_dead_or_set_registers): Likewise.
15829 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15831         * substring-locations.h (format_warning_va): Formatting fix for
15832         ATTRIBUTE_GCC_DIAG.
15833         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15834         argument.
15835         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15836         * substring-locations.c: Include intl.h.
15837         (format_warning_va): Turned into small wrapper around
15838         format_warning_n_va, renamed to ...
15839         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15840         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15841         use ngettext.
15842         (format_warning_at_substring_n): New function.
15843         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15844         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15845         format_warning_at_substring with just a shorter name instead of
15846         const function pointer.
15847         (fmtwarn_n): New function.
15848         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15849         appropriate, get rid of all the fmtstr temporaries, move conditionals
15850         with G_() wrapped string literals directly into fmtwarn arguments,
15851         cast dir.len to (int), formatting fixes.
15853 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15855         * doc/invoke.texi: Remove "Cilk Plus" references.
15857 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15858             Richard Biener  <rguenther@suse.de>
15860         PR ipa/84628
15861         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15862         for error or warning attributes if CALL_FROM_THUNK_P is set.
15863         Formatting fixes.
15865 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15867         PR target/56540
15868         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15869         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15871         PR target/56540
15872         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15873         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15875         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15876         instead of -1U in last predictors element's probability member.
15878 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15880         PR ipa/83983
15881         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15882         arguments if they are comparable.
15884 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15886         PR tree-optimization/84634
15887         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15888         masks and masked_loop_p with a single loop_masks, making sure it's
15889         null for bb vectorization.
15891 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15893         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15894         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15895         loop->force_vectorize to check whether there is no alias.
15897 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15899         PR target/84614
15900         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15901         prototypes.
15902         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15903         comments.
15904         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15905         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15906         instead of a loop around prev_real_insn.
15907         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15908         prev_real_insn.
15910         PR inline-asm/84625
15911         * config/i386/i386.c (ix86_print_operand): Use conditional
15912         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15913         zero vector.
15915 2018-03-02  Richard Biener  <rguenther@suse.de>
15917         PR tree-optimization/84427
15918         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15919         (bitmap_set_subtract_values): Rewrite to handle multiple
15920         exprs per value.
15921         (clean): Likewise.
15922         (prune_clobbered_mems): Likewise.
15923         (phi_translate): Take edge instead of pred/phiblock.
15924         (phi_translate_1): Likewise.
15925         (phi_translate_set): Likewise.  Insert all translated
15926         exprs for a value into the set, keeping possibly multiple
15927         expressions per value.
15928         (compute_antic_aux): Adjust for phi_translate changes.
15929         When intersecting union the expressions and prune those
15930         not in the final value set, keeping possibly multiple
15931         expressions per value.  Do not use value-insertion
15932         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15933         all expressions.  Add verification that the value-sets
15934         only shrink during iteration.
15935         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15936         (do_pre_regular_insertion): Likewise.
15937         (do_pre_partial_partial_insertion): Likewise.
15939 2018-03-02  Richard Biener  <rguenther@suse.de>
15941         PR target/82005
15942         * config/darwin.c (saved_debug_info_level): New static global.
15943         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15944         (darwin_asm_lto_end): Restore debug info generation settings.
15946 2018-03-01  Martin Liska  <mliska@suse.cz>
15948         PR sanitizer/82484
15949         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15950         volatile arguments.
15952 2018-03-01  Richard Biener  <rguenther@suse.de>
15954         PR debug/84645
15955         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15956         type annotation with LTO when debug was disabled at compile-time.
15958 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15960         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15961         XINT with INTVAL.
15962         (mips_final_postscan_insn): Likewise.
15964 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15966         PR rtl-optimization/84528
15967         * alias.c (init_alias_target): Add commentary.
15968         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15969         a unique base value if the frame pointer is not eliminated
15970         to the stack pointer.
15972 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15974         PR rtl-optimization/83327
15975         * lra-int.h (hard_regs_spilled_into): Declare.
15976         * lra.c (hard_regs_spilled_into): Define.
15977         (init_reg_info): Init hard_regs_spilled_into.
15978         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15979         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15980         (process_bb_lives): Handle hard_regs_spilled_into.
15981         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15982         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15984 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15986         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15987         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15988         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15989         * config/rs6000/aix72.h: New file.
15991 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15993         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15994         instead of warning_at with conditional singular and plural messages
15995         where possible.
15997         PR target/52991
15998         * stor-layout.c (update_alignment_for_field): For
15999         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16000         && !DECL_PACKED (field), do the alignment update, just use
16001         only desired_align instead of MAX (type_align, desired_align)
16002         as the alignment.
16003         (place_field): Don't do known_align < desired_align handling
16004         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16005         is non-NULL, instead do it after rli->prev_field handling and
16006         only if not within a bitfield word.  For DECL_PACKED (field)
16007         use type_align of BITS_PER_UNIT.
16009 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
16011         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16012         superfluous parentheses and trailing spaces.
16014 2018-02-28  Richard Biener  <rguenther@suse.de>
16016         PR tree-optimization/84584
16017         * graphite-scop-detection.c (scop_detection::add_scop): Discard
16018         SCoPs with fake exit edge.
16020 2018-02-28  Martin Liska  <mliska@suse.cz>
16022         PR testsuite/84597
16023         * timevar.c (timer::print): Fix format to properly print 100%
16024         values.
16026 2018-02-28  Richard Biener  <rguenther@suse.de>
16028         PR middle-end/84607
16029         * genmatch.c (capture_info::walk_match): Do not mark
16030         captured expressions without operands as expr_p given
16031         they act more like predicates and should be subject to
16032         "lost tail" side-effect preserving.
16034 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
16036         PR rtl-optimization/81611
16037         * auto-inc-dec.c (attempt_change): Move dead note from
16038         mem_insn if it's the next use of regno
16039         (find_address): Take address use of reg holding
16040         non-incremented value.  Add parm to limit search to the named
16041         reg only.
16042         (merge_in_block): Attempt to use a mem insn that is the next
16043         use of the original regno.
16045 2018-02-27  Martin Sebor  <msebor@redhat.com>
16047         PR c++/83871
16048         * doc/invoke.texi (-Wmissing-attributes): New option.
16049         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16051 2018-02-27  Martin Sebor  <msebor@redhat.com>
16053         PR translation/84207
16054         * diagnostic-core.h (warning_n, error_n, inform_n): Change
16055         n argument to unsigned HOST_WIDE_INT.
16056         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16057         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
16058         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16059         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16061 2018-02-27  Richard Biener  <rguenther@suse.de>
16063         PR tree-optimization/84512
16064         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16065         Do not use the estimate returned from record_stmt_cost for
16066         the scalar iteration cost but sum properly using add_stmt_cost.
16068 2018-02-27  Richard Biener  <rguenther@suse.de>
16070         PR tree-optimization/84466
16071         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16072         Adjust last change to less strictly validate use operands.
16074 2018-02-27  Martin Liska  <mliska@suse.cz>
16076         PR gcov-profile/84548
16077         * gcov.c (process_file): Allow partial overlap and consider it
16078         also as group functions.
16079         (output_lines): Properly calculate range of lines for a group.
16081 2018-02-27  Martin Liska  <mliska@suse.cz>
16083         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16084         'ggc' suffixes.  Change first column width.
16085         (timer::print): Fix formatting of the column.
16087 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
16089         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16090         preserve inline entry blocks for the sake of debug inline
16091         entry point markers alone.
16092         (remove_unused_locals): Suggest in comments a better place to
16093         force the preservation of inline entry blocks that are
16094         otherwise unused, but do not preserve them.
16096 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16098         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16100 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16102         PR target/84039
16103         * config/i386/constraints.md (Bs): Replace
16104         ix86_indirect_branch_register with
16105         TARGET_INDIRECT_BRANCH_REGISTER.
16106         (Bw): Likewise.
16107         * config/i386/i386.md (indirect_jump): Likewise.
16108         (tablejump): Likewise.
16109         (*sibcall_memory): Likewise.
16110         (*sibcall_value_memory): Likewise.
16111         Peepholes of indirect call and jump via memory: Likewise.
16112         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16113         (*sibcall_value_GOT_32): Likewise.
16114         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16115         (GOT_memory_operand): Likewise.
16116         (call_insn_operand): Likewise.
16117         (sibcall_insn_operand): Likewise.
16118         (GOT32_symbol_operand): Likewise.
16119         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16121 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16123         PR rtl-optimization/83496
16124         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16125         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
16126         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16127         redundant insn, if any.
16128         (relax_delay_slots): Likewise.
16129         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16131 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
16133         PR tree-optimization/83965
16134         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16135         that grouped statements are part of a reduction chain.  Return
16136         true if the statement is not marked as a reduction itself but
16137         is part of a group.
16138         (vect_recog_dot_prod_pattern): Don't check whether the statement
16139         is part of a group here.
16140         (vect_recog_sad_pattern): Likewise.
16141         (vect_recog_widen_sum_pattern): Likewise.
16143 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16145         PR debug/84545
16146         * final.c (rest_of_clean_state): Also look for calls inside sequences.
16148 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16150         PR target/84530
16151         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16152         the bool argument.
16153         (ix86_output_indirect_function_return): New prototype.
16154         (ix86_split_simple_return_pop_internal): Likewise.
16155         * config/i386/i386.c (indirect_return_via_cx): New.
16156         (indirect_return_via_cx_bnd): Likewise.
16157         (indirect_thunk_name): Handle return va CX_REG.
16158         (output_indirect_thunk_function): Create alias for
16159         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16160         (ix86_output_indirect_jmp): Remove the bool argument.
16161         (ix86_output_indirect_function_return): New function.
16162         (ix86_split_simple_return_pop_internal): Likewise.
16163         * config/i386/i386.md (*indirect_jump): Don't pass false
16164         to ix86_output_indirect_jmp.
16165         (*tablejump_1): Likewise.
16166         (simple_return_pop_internal): Change it to define_insn_and_split.
16167         Call ix86_split_simple_return_pop_internal to split it for
16168         -mfunction-return=.
16169         (simple_return_indirect_internal): Call
16170         ix86_output_indirect_function_return instead of
16171         ix86_output_indirect_jmp.
16173 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
16175         PR bootstrap/84405
16176         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16177         memset and value initialization afterwards.
16179 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
16181         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16183 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16185         PR target/84521
16186         * common/config/aarch64/aarch64-common.c
16187         (aarch_option_optimization_table[]): Switch
16188         off fomit-frame-pointer
16190 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16191             Chung-Ju Wu  <jasonwucj@gmail.com>
16193         * config/nds32/nds32-multiple.md (load_multiple): Disallow
16194         volatile memory.
16195         (store_multiple): Ditto.
16197 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16199         * config.gcc: Add --with-cpu support for nds32 target.
16200         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16201         * config/nds32/nds32.opt: Add -mcpu= option.
16203 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
16205         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16206         isel=yes): Warn for these deprecated options.
16208 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
16210         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16211         ISA_2_5_MASKS_EMBEDDED.
16213 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
16215         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16216         p->max as pointers rather than using iterative_hash_expr.
16218 2018-02-23  Carl Love  <cel@us.ibm.com>
16220         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16221         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16222         BU_P8V_OVERLOAD_2.
16223         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16224         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16225         P8V_BUILTIN_VEC_VUNSIGNED2.
16227 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
16229         PR target/81572
16230         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16231         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16232         LRA_UNKNOWN_ALT.
16233         * lra-constraints.c (curr_insn_transform): Set up
16234         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
16235         LRA_UNKNOWN_ALT.
16236         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16237         * lra-eliminations.c (spill_pseudos): Ditto.
16238         (process_insn_for_elimination): Ditto.
16239         * lra-lives.c (reg_early_clobber_p): Use the new macros.
16240         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16241         LRA_NON_CLOBBERED_ALT.
16243 2018-02-22  Martin Sebor  <msebor@redhat.com>
16245         PR tree-optimization/84480
16246         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16247         to maybe_diag_stxncpy_trunc.  Call it.
16248         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16249         from gimple_fold_builtin_strcpy.  Print inlining stack.
16250         (handle_builtin_stxncpy): Print inlining stack.
16251         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16253 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
16255         PR target/84176
16256         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16257         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16258         and -fcheck-pointer-bounds are used together.
16259         (indirect_thunk_prefix): New enum.
16260         (indirect_thunk_need_prefix): New function.
16261         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
16262         "_nt" instead of "_bnd" for NOTRACK prefix.
16263         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16264         (output_indirect_thunk_function): Likewise.
16265         (): Likewise.
16266         (ix86_code_end): Update output_indirect_thunk_function calls.
16267         (ix86_output_indirect_branch_via_reg): Replace
16268         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16269         (ix86_output_indirect_branch_via_push): Likewise.
16270         (ix86_output_function_return): Likewise.
16271         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16272         incompatible with -fcf-protection=branch and
16273         -fcheck-pointer-bounds.
16275 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16277         PR target/83335
16278         * config/aarch64/aarch64.c (aarch64_print_address_internal):
16279         Change gcc_assert call to output_operand_lossage.
16281 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16283         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16285 2018-02-22  DJ Delorie  <dj@redhat.com>
16286             Sebastian Perta  <sebastian.perta@renesas.com>
16287             Oleg Endo  <olegendo@gcc.gnu.org>
16289         * config/rx/rx.c (rx_rtx_costs): New function.
16290         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16292 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16294         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16296 2018-02-22  Martin Liska  <mliska@suse.cz>
16298         PR driver/83193
16299         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16300         Add "native" as a possible value.
16302 2018-02-22  Martin Liska  <mliska@suse.cz>
16304         PR driver/83193
16305         * config/i386/i386.c (ix86_option_override_internal):
16306         Add "native" as a possible value for -march and -mtune.
16308 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
16310         PR target/84502
16311         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16312         to all type variants.
16314         PR tree-optimization/84503
16315         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16316         width as info->bitpos + info->bitsize - start.
16317         (merged_store_group::merge_overlapping): Simplify width computation.
16318         (check_no_overlap): New function.
16319         (imm_store_chain_info::try_coalesce_bswap): Compute expected
16320         start + width and last_order of the group, fail if check_no_overlap
16321         fails.
16322         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16323         to group if check_no_overlap fails.
16325 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16327         * config/rs6000/altivec.md: Delete contraint arguments to
16328         define_expand, define_split, and define_peephole2, and in
16329         define_insn_and_split if always unused.
16330         * config/rs6000/darwin.md: Ditto.
16331         * config/rs6000/dfp.md: Ditto.
16332         * config/rs6000/rs6000.md: Ditto.
16333         * config/rs6000/sync.md: Ditto.
16334         * config/rs6000/vector.md: Ditto.
16335         * config/rs6000/vsx.md: Ditto.
16337 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16339         * config/rs6000/altivec.md: Write output control strings as braced
16340         blocks instead of double-quoted strings.
16341         * config/rs6000/darwin.md: Ditto.
16342         * config/rs6000/rs6000.md: Ditto.
16343         * config/rs6000/vector.md: Ditto.
16344         * config/rs6000/vsx.md: Ditto.
16346 2018-02-21  Jason Merrill  <jason@redhat.com>
16348         PR c++/84314 - ICE with templates and fastcall attribute.
16349         * attribs.c (build_type_attribute_qual_variant): Remove assert.
16351 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16353         * ipa-cp.c (determine_versionability): Fix comment typos.
16355 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16357         PR c/84229
16358         * ipa-cp.c (determine_versionability): Do not version functions caling
16359         va_arg_pack.
16361 2018-02-21  Martin Liska  <mliska@suse.cz>
16363         PR driver/83193
16364         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16365         Add "native" as a possible value.
16366         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
16367         the macro when native cpu detection is available.
16369 2018-02-21  Martin Liska  <mliska@suse.cz>
16371         PR driver/83193
16372         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16373         Add "native" as a possible value.
16374         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16375         when native cpu detection is available.
16377 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
16378             Martin Sebor  <msebor@redhat.com>
16380         PR tree-optimization/84478
16381         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16382         false.
16383         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16384         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16385         support which is conservatively correct, for 2 only stay conservative
16386         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
16387         argument to the 2 argument get_range_strlen, adjust 6 arg
16388         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16389         false.
16390         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16391         (gimple_fold_builtin_strlen): Pass true as last argument to
16392         get_range_strlen.
16394 2018-02-20  Martin Sebor  <msebor@redhat.com>
16396         PR middle-end/84095
16397         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16398         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
16399         (builtin_memref::builtin_memref): Factor out parts into
16400         set_base_and_offset and call it.
16402 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16404         PR middle-end/84406
16405         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16406         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16407         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
16408         search at the associated MODE_INT.
16410 2018-02-20  Jeff Law  <law@redhat.com>
16412         PR middle-end/82123
16413         PR tree-optimization/81592
16414         PR middle-end/79257
16415         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16416         for range data rather than using global data.
16417         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16418         range data rather than using global data.
16419         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16420         pass it to children as needed.
16421         (struct directive::fmtresult): Similarly.
16422         (struct directive::set_width): Similarly.
16423         (struct directive::set_precision): Similarly.
16424         (format_integer, format_directive, parse_directive): Similarly.
16425         (format_none): Accept unnamed vr_values parameter.
16426         (format_percent, format_floating, format_character): Similarly.
16427         (format_string, format_plain): Similarly.
16428         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16429         the EVRP range analyzer for range data rather than using global data.
16430         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16431         gimple-ssa-evrp-analyze.h
16432         (class sprintf_dom_walker): Add after_dom_children member function.
16433         Add evrp_range_analyzer member.
16434         (sprintf_dom_walker::before_dom_children): Call into the EVRP
16435         range analyzer as needed.
16436         (sprintf_dom_walker::after_dom_children): New member function.
16437         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16438         if not optimizing.
16439         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16440         (evrp_range_analyzer::pop_to_marker): Likewise.
16442 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16444         PR tree-optimization/84419
16445         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16446         with the required type if its current type is compatible but
16447         different.
16449 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
16451         PR middle-end/82004
16452         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16453         after vectorization.
16455 2018-02-20  Martin Liska  <mliska@suse.cz>
16457         PR driver/83193
16458         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16459         possible values if we don't have a hint.
16461 2018-02-20  Martin Liska  <mliska@suse.cz>
16463         PR c/84310
16464         PR target/79747
16465         * final.c (shorten_branches): Build align_tab array with one
16466         more element.
16467         * opts.c (finish_options): Add alignment option limit check.
16468         (MAX_CODE_ALIGN): Likewise.
16469         (MAX_CODE_ALIGN_VALUE): Likewise.
16470         * doc/invoke.texi: Document maximum allowed option value for
16471         all -falign-* options.
16473 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
16475         PR target/84146
16476         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16477         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16478         * var-tracking.c (emit_note_insn_var_location): Remove all references
16479         to NOTE_INSN_CALL_ARG_LOCATION.
16480         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16481         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16482         Use copy_rtx_if_shared.
16483         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16484         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16485         (dwarf2out_var_location): Remove handling of
16486         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16487         on call_insn.
16488         * final.c (final_scan_insn): Remove all references to
16489         NOTE_INSN_CALL_ARG_LOCATION.
16490         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16491         before dumping final insns.
16492         * except.c (emit_note_eh_region_end): Remove all references to
16493         NOTE_INSN_CALL_ARG_LOCATION.
16494         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16495         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16496         * config/arc/arc.c (hwloop_optimize): Likewise.
16497         * config/arm/arm.c (create_fix_barrier): Likewise.
16498         * config/s390/s390.c (s390_chunkify_start): Likewise.
16499         * config/sh/sh.c (find_barrier): Likewise.
16500         * config/i386/i386.c (rest_of_insert_endbranch,
16501         ix86_seh_fixup_eh_fallthru): Likewise.
16502         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16503         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16504         * config/frv/frv.c (frv_function_prologue): Likewise.
16505         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16506         reg note.
16507         (note_outside_basic_block_p): Remove all references to
16508         NOTE_INSN_CALL_ARG_LOCATION.
16509         * gengtype.c (adjust_field_rtx_def): Likewise.
16510         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16511         Likewise.
16512         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16513         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16515         PR c++/84444
16516         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16517         is ADDR_EXPR.
16519         PR tree-optimization/84452
16520         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16521         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16522         is NULL.
16524 2018-02-19  Martin Liska  <mliska@suse.cz>
16526         PR sanitizer/82183
16527         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16529 2018-02-19  Martin Liska  <mliska@suse.cz>
16530             Richard Sandiford  <richard.sandiford@linaro.org>
16532         PR tree-optimization/82491
16533         * gimple-fold.c (get_base_constructor): Make earlier bail out
16534         to prevent ubsan.
16536 2018-02-19  Carl Love  <cel@us.ibm.com>
16538         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16539         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16540         BU_P8V_OVERLOAD_1.
16541         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16542         P8V_BUILTIN_VEC_NEG.
16544 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16546         * config/rl78/rl78.md (movdf): New define expand.
16548 2018-02-19  Martin Liska  <mliska@suse.cz>
16550         PR other/80589
16551         * doc/invoke.texi: Fix typo.
16552         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16554 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16556         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16557         handle rs6000_single_float and rs6000_double_float specially for
16558         e500 family CPUs.
16560 2018-02-16  Jeff Law  <law@redhat.com>
16562         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16563         (pop_regs): Use it.
16565 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16567         PR ipa/84425
16568         * ipa-inline.c (inline_small_functions): Fix a typo.
16570 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16572         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16574 2018-02-16  Carl Love  <cel@us.ibm.com>
16576         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16577         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16578         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16579         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16580         expansion to P8V_BUILTIN_VEC_FLOAT2.
16582 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16584         PR rtl-optimization/70023
16585         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16586         src_regno into account.
16588 2018-02-16  Carl Love  <cel@us.ibm.com>
16590         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16591         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16592         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16593         * config/rs6000/rs6000.c: Remove case statements for
16594         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16595         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16596         and P9V_BUILTIN_VEC_VINSERT4B.
16597         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16598         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16599         * config/rs6000/vsx.md:
16600         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16601         vec_insert4b.
16603 2018-02-16  Carl Love  <cel@us.ibm.com>
16605         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16606         vec_insert4b.
16607         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16608         definitions.
16609         * config/rs6000/rs6000-c.c: Add the definitions for
16610         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16611         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16612         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16613         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16614         definition for insert4b and define insn *insert3b_internal.
16615         * doc/extend.texi: Add documentation for vec_extract4b.
16617 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16619         * doc/extend.texi (Backwards Compatibility): Mention friend
16620         injection.  Note for-scope is deprecated.
16621         * doc/invoke.texi (-ffriend-injection): Deprecate.
16623 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16625         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16626         that moved to I2, also allow destinations that are a paradoxical
16627         subreg (instead of a normal reg).
16629 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16631         PR target/83831
16632         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16633         to QImode.
16635 2018-02-16  Richard Biener  <rguenther@suse.de>
16637         PR tree-optimization/84037
16638         PR tree-optimization/84016
16639         PR target/82862
16640         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16641         Adjust vec_construct for the fact we need additional higher latency
16642         128bit inserts for AVX256 and AVX512 vector builds.
16643         (ix86_add_stmt_cost): Scale vector construction cost for
16644         elementwise loads.
16646 2018-02-16  Richard Biener  <rguenther@suse.de>
16648         PR tree-optimization/84417
16649         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16650         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16651         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16653 2018-02-16  Martin Liska  <mliska@suse.cz>
16655         PR sanitizer/84307
16656         * internal-fn.def (ASAN_CHECK): Set proper flags.
16657         (ASAN_MARK): Likewise.
16659 2018-02-16  Julia Koval  <julia.koval@intel.com>
16661         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16662         from PTA_CANNONLAKE.
16664 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16666         PR target/84272
16667         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16668         Use ++iter rather than iter++ for std::list iterators.
16669         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16670         defer deleting them until all nodes in the forest are processed.  Do
16671         free even leaf nodes.  Change to_process into auto_vec.
16673         PR bootstrap/84405
16674         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16675         * vec.h (vec_default_construct): Use memset instead of placement new
16676         if BROKEN_VALUE_INITIALIZATION is defined.
16677         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16678         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16679         is defined.
16681         PR rtl-optimization/83723
16682         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16683         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16684         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16685         recursive calls.
16686         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16687         callers.
16688         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16690 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16692         PR rtl-optimization/81443
16693         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16694         from inner REGs to paradoxical SUBREGs.
16696 2018-02-16  Richard Biener  <rguenther@suse.de>
16698         PR tree-optimization/84399
16699         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16700         For operands we can analyze at their definition make sure we can
16701         analyze them at each use as well.
16703 2018-02-16  Richard Biener  <rguenther@suse.de>
16705         PR tree-optimization/84190
16706         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16707         volatile accesses if the decl isn't volatile.
16709 2018-02-15  Jason Merrill  <jason@redhat.com>
16711         PR c++/84314 - ICE with templates and fastcall attribute.
16712         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16713         TYPE_CANONICAL on an existing type.
16715 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16717         PR tree-optimization/84383
16718         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16719         dstoff nor call operand_equal_p if dstbase is NULL.
16721         PR tree-optimization/84334
16722         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16723         also a CONSTANT_CLASS_P, punt.
16725 2018-02-14  Jim Wilson  <jimw@sifive.com>
16727         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16728         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16729         to where locals are set.  Add TARGET_RVC support.
16730         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16732 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16734         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16736 2018-02-14  Martin Sebor  <msebor@redhat.com>
16738         PR tree-optimization/83698
16739         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16740         arrays constrain the offset range to their bounds.
16741         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16742         (builtin_access::overlap): Avoid setting the size of overlap if it's
16743         already been set.
16744         (maybe_diag_overlap): Also consider arrays when deciding what values
16745         of offsets to include in diagnostics.
16747 2018-02-14  Martin Sebor  <msebor@redhat.com>
16749         PR c/84108
16750         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16751         that correspond to the kind of a declaration.
16753 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16755         PR target/83984
16756         * config/pa/pa.md: Load address of PIC label using the linkage table
16757         if the label is nonlocal.
16759 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16761         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16762         warning message if user requests -maltivec=be.
16763         * doc/invoke.texi: Document deprecation of -maltivec=be.
16765 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16767         PR target/84220
16768         * config/rs6000/rs6000-c.c: Update definitions for
16769         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16770         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16772 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16774         PR target/84239
16775         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16776         add _get_ssp intrinsics. Remove argument from
16777         __builtin_ia32_rdssp[d|q].
16778         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16779         * config/i386/i386-builtin.def: Remove argument from
16780         __builtin_ia32_rdssp[d|q].
16781         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16782         ix86_expand_special_args_builtin for _rdssp[d|q].
16783         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16784         Clear register before usage.
16785         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16786         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16788 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16790         PR tree-optimization/84357
16791         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16792         operand 1 of an ARRAY_REF too.
16794 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16796         PR target/83831
16797         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16798         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16799         declarations.
16800         (set_of_reg): New struct.
16801         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16802         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16803         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16804         functions.
16805         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16806         Split into bitclr, bitset, bitinvert patterns if appropriate.
16807         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16808         use rx_fuse_in_memory_bitop.
16809         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16810         to named insn, correct maximum insn length.
16812 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16814         PR target/79242
16815         * machmode.def: Define a complex mode for PARTIAL_INT.
16816         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16817         MODE_PARTIAL_INT.
16818         * doc/rtl.texi: Document CSPImode.
16819         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16820         handling.
16821         (msp430_hard_regno_nregs_with_padding): Likewise.
16823 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16825         PR target/84279
16826         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16828 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16830         PR rtl-optimization/84169
16831         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16832         we generated a parallel as new i3 and we split that to new i2 and i3
16833         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16834         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16835         those to i2, not i1.  Partially rewrite this scan code.
16837 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16839         PR c/82210
16840         * stor-layout.c (place_field): For variable length fields, adjust
16841         offset_align afterwards not just based on the field's alignment,
16842         but also on the size.
16844         PR middle-end/84309
16845         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16846         of exps and logs in the use_exp2 case.
16848 2018-02-13  Jeff Law  <law@redhat.com>
16850         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16851         entry for "vector".
16853         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16854         ARGS as unused.
16856 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16858         PR debug/84342
16859         PR debug/84319
16860         * common.opt (gas-loc-support, gas-locview-support): New.
16861         (ginline-points, ginternal-reset-location-views): New.
16862         * doc/invoke.texi: Document them.  Use @itemx where intended.
16863         (gvariable-location-views): Adjust.
16864         * target.def (reset_location_view): New.
16865         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16866         (TARGET_RESET_LOCATION_VIEW): New.
16867         * doc/tm.texi: Rebuilt.
16868         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16869         (dwarf2out_default_as_locview_support): New.
16870         (output_asm_line_debug_info): Use option variables.
16871         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16872         (output_loc_list): Likewise.
16873         (add_high_low_attributes): Check option variables.
16874         Don't output entry view attribute in strict mode.
16875         (gen_inlined_subroutine_die): Check option variables.
16876         (dwarf2out_inline_entry): Likewise.
16877         (init_sections_and_labels): Likewise.
16878         (dwarf2out_early_finish): Likewise.
16879         (maybe_reset_location_view): New, from...
16880         (dwarf2out_var_location): ... here.  Call it.
16881         * debug.h (dwarf2out_default_as_loc_support): Declare.
16882         (dwarf2out_default_as_locview_support): Declare.
16883         * hooks.c (hook_int_rtx_insn_0): New.
16884         * hooks.h (hook_int_rtx_insn_0): Declare.
16885         * toplev.c (process_options): Take -gas-loc-support and
16886         -gas-locview-support from dwarf2out.  Enable
16887         -gvariable-location-views by default only with locview
16888         assembler support.  Enable -ginternal-reset-location-views by
16889         default only if the target defines the corresponding hook.
16890         Enable -ginline-points by default if location views are
16891         enabled; force it disabled if statement frontiers are
16892         disabled.
16893         * tree-inline.c (expand_call_inline): Check option variables.
16894         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16896 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16898         PR tree-optimization/84321
16899         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16900         handling.  Also check whether the anti-range contains any values
16901         that satisfy the mask; switch to a VR_RANGE if not.
16903 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16905         PR sanitizer/84340
16906         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16908 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16910         PR c++/83990
16911         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16912         of call statements, also set location of a load to a temporary.
16914 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16916         * config/rl78/rl78.c (add_vector_labels): New function.
16917         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16918         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16919         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16920         which checks that no arguments are passed.
16921         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16922         * doc/extend.texi: Documentation for the new attribute.
16924 2018-02-13  Andreas Schwab  <schwab@suse.de>
16926         * config/riscv/linux.h (CPP_SPEC): Define.
16928 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16930         PR target/84335
16931         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16932         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16933         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16934         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16935         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16936         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16937         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16938         temporarily for AES and PCLMUL builtins.
16940         PR tree-optimization/84339
16941         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16942         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16943         Formatting fixes.
16945         PR middle-end/84309
16946         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16947         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16948         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16949         inline function.
16950         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16951         inline function.
16952         * omp-simd-clone.h: New file.
16953         * omp-simd-clone.c: Include omp-simd-clone.h.
16954         (expand_simd_clones): No longer static.
16955         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16956         cgraph.h and omp-simd-clone.h.
16957         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16958         (vect_recog_widen_shift_pattern): Formatting fix.
16959         (vect_pattern_recog_1): Don't check optab for calls.
16961         PR target/84336
16962         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16963         operands[2] into a REG before using gen_lowpart on it.
16965 2018-02-12  Jeff Law  <law@redhat.com>
16967         PR target/83760
16968         * config/sh/sh.c (find_barrier): Consider a sibling call
16969         a barrier as well.
16971         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16972         successfully back substituting a reg.
16974 2018-02-12  Richard Biener  <rguenther@suse.de>
16976         PR tree-optimization/84037
16977         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16978         parameter, move visited init to caller.
16979         (vect_slp_analyze_operations): Separate cost from validity
16980         check, initialize visited once for all instances.
16981         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16982         for all instances.
16983         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16984         out an assert.
16985         (vect_model_promotion_demotion_cost): Likewise.
16986         (vectorizable_bswap): Guard cost modeling with !slp_node
16987         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16988         SLP stmts.
16989         (vectorizable_call): Likewise.
16990         (vectorizable_conversion): Likewise.
16991         (vectorizable_assignment): Likewise.
16992         (vectorizable_shift): Likewise.
16993         (vectorizable_operation): Likewise.
16994         (vectorizable_store): Likewise.
16995         (vectorizable_load): Likewise.
16996         (vectorizable_condition): Likewise.
16997         (vectorizable_comparison): Likewise.
16999 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
17001         PR sanitizer/84307
17002         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17003         (ASAN_MARK): Fix fnspec to account for return value, change pointer
17004         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17006 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17008         PR middle-end/83665
17009         * params.def (inline-min-speedup): Increase from 8 to 15.
17010         (max-inline-insns-auto): Decrease from 40 to 30.
17011         * ipa-split.c (consider_split): Add some buffer for function to
17012         be considered inlining candidate.
17013         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17014         default values.
17016 2018-02-12  Richard Biener  <rguenther@suse.de>
17018         PR tree-optimization/84037
17019         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17020         matched stmts if we cannot swap the non-matched ones.
17022 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17024         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17025         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17026         _mm_maskz_scalef_round_ss): New intrinsics.
17027         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17028         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17029         __builtin_ia32_scalefss_round): Remove.
17030         (__builtin_ia32_scalefsd_mask_round,
17031         __builtin_ia32_scalefss_mask_round): New intrinsics.
17032         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17033         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17034         ((match_operand:VF_128 2 "<round_nimm_predicate>"
17035         "<round_constraint>")): Changed to ...
17036         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17037         "<round_scalar_constraint>")): ... this.
17038         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17039         %0, %1, %2<round_op3>}"): Changed to ...
17040         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17041         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17042         %2<round_scalar_mask_op3>}"): ... this.
17043         * config/i386/subst.md (round_scalar_nimm_predicate): New.
17045 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17047         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17048         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17049         (_mm_maskz_sqrt_round_ss): New intrinsics.
17050         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17051         (__builtin_ia32_sqrtsd_mask_round)
17052         (__builtin_ia32_sqrtss_mask_round): New builtins.
17053         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17054         (__builtin_ia32_sqrtss_round): Remove.
17055         (__builtin_ia32_sqrtsd_mask_round)
17056         (__builtin_ia32_sqrtss_mask_round): New builtins.
17057         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17058         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17059         ((match_operand:VF_128 1 "vector_operand"
17060         "xBm,<round_constraint>")): Changed to ...
17061         ((match_operand:VF_128 1 "vector_operand"
17062         "xBm,<round_scalar_constraint>")): ... this.
17063         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17064         %0, %2, %<iptr>1<round_op3>}): Changed to ...
17065         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17066         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17067         %<iptr>1<round_scalar_mask_op3>}): ... this.
17068         ((set_attr "prefix" "<round_prefix>")): Changed to ...
17069         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17071 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
17073         PR target/84266
17074         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17075         Cast vec_cmpeq result to correct type.
17076         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17077         Cast vec_cmpgt result to correct type.
17079 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
17081         * final.c (final_scan_insn_1): Renamed from...
17082         (final_scan_insn): ... this.  New wrapper, to recover
17083         seen from the outermost call in recursive ones.
17084         * config/sparc/sparc.c (output_return): Drop seen from call.
17085         (output_sibcall): Likewise.
17086         * config/visium/visium.c (output_branch): Likewise.
17088 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
17090         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17091         function label.
17093 2018-02-10  Alan Modra  <amodra@gmail.com>
17095         PR target/84300
17096         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17097         Specify LR as an input.
17099 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
17101         PR sanitizer/83987
17102         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17103         remove_member_access_dummy_vars): New functions.
17104         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17105         lower_omp_1, execute_lower_omp): Use them.
17107         PR rtl-optimization/84308
17108         * shrink-wrap.c (spread_components): Release todo vector.
17110 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
17112         PR rtl-optimization/57193
17113         * ira-color.c (struct allocno_color_data): Add member
17114         conflict_allocno_hard_prefs.
17115         (update_conflict_allocno_hard_prefs): New.
17116         (bucket_allocno_compare_func): Add a preference based on
17117         conflict_allocno_hard_prefs.
17118         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17119         (color_allocnos): Remove a dead code.  Initiate
17120         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
17122 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17124         PR target/84226
17125         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17126         constraint from =wa to wa.  Avoid a subreg on the output operand,
17127         instead use a pseudo and subreg it in a move.
17128         (p9_xxbrd_<mode>): Changed to ...
17129         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17130         (p9_xxbrd_v2df): New expander.
17131         (p9_xxbrw_<mode>): Changed to ...
17132         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17133         (p9_xxbrw_v4sf): New expander.
17135 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17137         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17139 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
17141         PR target/83926
17142         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17143         multiply in 32-bit mode.
17144         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17145         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17146         mode.
17148 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17150         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17151         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17152         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17153         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17155 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
17157         PR lto/84213
17158         * dwarf2out.c (is_trivial_indirect_ref): New function.
17159         (dwarf2out_late_global_decl): Do not generate a location
17160         attribute for variables that have a non-trivial DECL_VALUE_EXPR
17161         and that are not defined in the current unit.
17163 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17165         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17166         instead of a libcall for UNORDERED.
17168 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
17170         PR target/82641
17171         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17172         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17174 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17176         PR target/PR84295
17177         * config/s390/s390.c (s390_set_current_function): Invoke
17178         s390_indirect_branch_settings also if fndecl didn't change.
17180 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17182         * config/rs6000/rs6000.md (blockage): Set length to zero.
17184 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17186         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17188 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17190         PR sanitizer/84285
17191         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17192         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17193         -static-lib*san.
17195         PR debug/84252
17196         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17197         PARALLEL incoming that failed vt_get_decl_and_offset check.
17199         PR middle-end/84237
17200         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17201         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17202         TREE_READONLY bit.
17203         (get_variable_section): For decls in named .bss* sections pass true as
17204         second argument to bss_initializer_p.
17206 2018-02-09  Marek Polacek  <polacek@redhat.com>
17207             Jakub Jelinek  <jakub@redhat.com>
17209         PR c++/83659
17210         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17211         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
17212         Sync some changes from cxx_fold_indirect_ref.
17214 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17216         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17217         markers.
17218         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17219         (BLOCK_INLINE_ENTRY_LABEL): New.
17220         (dwarf2out_var_location): Disregard inline entry markers.
17221         (inline_entry_data): New struct.
17222         (inline_entry_data_hasher): New hashtable type.
17223         (inline_entry_data_hasher::hash): New.
17224         (inline_entry_data_hasher::equal): New.
17225         (inline_entry_data_table): New variable.
17226         (add_high_low_attributes): Add DW_AT_entry_pc and
17227         DW_AT_GNU_entry_view attributes if a pending entry is found
17228         in inline_entry_data_table.  Add old entry_pc attribute only
17229         if debug nonbinding markers are disabled.
17230         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17231         markers are enabled.
17232         (block_within_block_p, dwarf2out_inline_entry): New.
17233         (dwarf2out_finish): Check that no entries remained in
17234         inline_entry_data_table.
17235         * final.c (reemit_insn_block_notes): Handle inline entry notes.
17236         (final_scan_insn, notice_source_line): Likewise.
17237         (rest_of_clean_state): Skip inline entry markers.
17238         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17239         markers.
17240         * gimple.c (gimple_build_debug_inline_entry): New.
17241         * gimple.h (enum gimple_debug_subcode): Add
17242         GIMPLE_DEBUG_INLINE_ENTRY.
17243         (gimple_build_debug_inline_entry): Declare.
17244         (gimple_debug_inline_entry_p): New.
17245         (gimple_debug_nonbind_marker_p): Adjust.
17246         * insn-notes.def (INLINE_ENTRY): New.
17247         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17248         inline entry marker notes.
17249         (print_insn): Likewise.
17250         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17251         (INSN_DEBUG_MARKER_KIND): Likewise.
17252         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17253         * tree-inline.c (expand_call_inline): Build and insert
17254         debug_inline_entry stmt.
17255         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17256         inline entry blocks early, if nonbind markers are enabled.
17257         (dump_scope_block): Dump fragment info.
17258         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17259         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17260         (gimple_build_debug_inline_entry): New.
17261         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17262         Enable/disable inline entry points too.
17263         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17264         (DEBUG_INSN): Describe inline entry markers.
17266         * common.opt (gvariable-location-views): New.
17267         (gvariable-location-views=incompat5): New.
17268         * config.in: Rebuilt.
17269         * configure: Rebuilt.
17270         * configure.ac: Test assembler for view support.
17271         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17272         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17273         * dwarf2out.c (var_loc_view): New typedef.
17274         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17275         (dwarf2out_locviews_in_attribute): New.
17276         (dwarf2out_locviews_in_loclist): New.
17277         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17278         (enum dw_line_info_opcode): Add LI_adv_address.
17279         (struct dw_line_info_table): Add view.
17280         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17281         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17282         (zero_view_p): New variable.
17283         (ZERO_VIEW_P): New macro.
17284         (output_asm_line_debug_info): New.
17285         (struct var_loc_node): Add view.
17286         (add_AT_view_list, AT_loc_list): New.
17287         (add_var_loc_to_decl): Add view param.  Test it against last.
17288         (new_loc_list): Add view params.  Record them.
17289         (AT_loc_list_ptr): Handle loc and view lists.
17290         (view_list_to_loc_list_val_node): New.
17291         (print_dw_val): Handle dw_val_class_view_list.
17292         (size_of_die): Likewise.
17293         (value_format): Likewise.
17294         (loc_list_has_views): New.
17295         (gen_llsym): Set vl_symbol too.
17296         (maybe_gen_llsym, skip_loc_list_entry): New.
17297         (dwarf2out_maybe_output_loclist_view_pair): New.
17298         (output_loc_list): Output view list or entries too.
17299         (output_view_list_offset): New.
17300         (output_die): Handle dw_val_class_view_list.
17301         (output_dwarf_version): New.
17302         (output_compilation_unit_header): Use it.
17303         (output_skeleton_debug_sections): Likewise.
17304         (output_rnglists, output_line_info): Likewise.
17305         (output_pubnames, output_aranges): Update version comments.
17306         (output_one_line_info_table): Output view numbers in asm comments.
17307         (dw_loc_list): Determine current endview, pass it to new_loc_list.
17308         Call maybe_gen_llsym.
17309         (loc_list_from_tree_1): Adjust.
17310         (add_AT_location_description): Create view list attribute if
17311         needed, check it's absent otherwise.
17312         (convert_cfa_to_fb_loc_list): Adjust.
17313         (maybe_emit_file): Call output_asm_line_debug_info for test.
17314         (dwarf2out_var_location): Reset views as needed.  Precompute
17315         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
17316         attribute.  Set view.
17317         (new_line_info_table): Reset next view.
17318         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17319         (dwarf2out_source_line): Likewise.  Output view resets and labels to
17320         the assembler, or select appropriate line info opcodes.
17321         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17322         (optimize_string_length): Catch it.  Adjust.
17323         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
17324         dw_val_class_view_list, and remove it if no longer needed.
17325         (hash_loc_list): Hash view numbers.
17326         (loc_list_hasher::equal): Compare them.
17327         (optimize_location_lists): Check whether a view list symbol is
17328         needed, and whether the locview attribute is present, and
17329         whether they match.  Remove the locview attribute if no longer
17330         needed.
17331         (index_location_lists): Call skip_loc_list_entry for test.
17332         (dwarf2out_finish): Call output_asm_line_debug_info for test.
17333         Use output_dwarf_version.
17334         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17335         (struct dw_val_node): Add val_view_list.
17336         * final.c (SEEN_NEXT_VIEW): New.
17337         (set_next_view_needed): New.
17338         (clear_next_view_needed): New.
17339         (maybe_output_next_view): New.
17340         (final_start_function): Rename to...
17341         (final_start_function_1): ... this.  Take pointer to FIRST,
17342         add SEEN parameter.  Emit param bindings in the initial view.
17343         (final_start_function): Reintroduce SEEN-less interface.
17344         (final): Rename to...
17345         (final_1): ... this.  Take SEEN parameter.  Output final pending
17346         next view at the end.
17347         (final): Reintroduce seen-less interface.
17348         (final_scan_insn): Output pending next view before switching
17349         sections or ending a block.  Mark the next view as needed when
17350         outputting variable locations.  Notify debug backend of section
17351         changes, and of location view changes.
17352         (rest_of_handle_final): Adjust.
17353         * toplev.c (process_options): Autodetect value for debug variable
17354         location views option.  Warn on incompat5 without -gdwarf-5.
17355         * doc/invoke.texi (gvariable-location-views): New.
17356         (gvariable-location-views=incompat5): New.
17357         (gno-variable-location-views): New.
17359 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
17361         PR tree-optimization/84136
17362         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17363         that the result of find_edge is non-NULL.
17365 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17367         PR target/83008
17368         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17369         storing integer register in SImode.  Fix cost of 256 and 512
17370         byte aligned SSE register store.
17372 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17374         * config/i386/i386.c (ix86_multiplication_cost): Fix
17375         multiplication cost for TARGET_AVX512DQ.
17377 2018-02-08  Marek Polacek  <polacek@redhat.com>
17379         PR tree-optimization/84238
17380         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17381         get_range_strlen.
17383 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17385         PR tree-optimization/84265
17386         * tree-vect-stmts.c (vectorizable_store): Don't treat
17387         VMAT_CONTIGUOUS accesses as grouped.
17388         (vectorizable_load): Likewise.
17390 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17392         PR tree-optimization/81635
17393         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17394         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17395         (test_round_for_mask): New functions.
17396         (wide_int_cc_tests): Call test_round_for_mask.
17397         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17398         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17399         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17400         range returned by get_range_info.
17402 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17404         PR ipa/81360
17405         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17406         * symtab.c: Include builtins.h
17407         (symtab_node::output_to_lto_symbol_table_p): Move here
17408         from lto-streamer-out.c:output_symbol_p.
17409         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17410         (output_symbol_p): Move all logic to symtab.c
17411         (produce_symtab): Update.
17413 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17415         * config/s390/s390-opts.h (enum indirect_branch): Define.
17416         * config/s390/s390-protos.h (s390_return_addr_from_memory)
17417         (s390_indirect_branch_via_thunk)
17418         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17419         (enum s390_indirect_branch_type): Define.
17420         * config/s390/s390.c (struct s390_frame_layout, struct
17421         machine_function): Remove.
17422         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17423         (indirect_branch_table_label_no, indirect_branch_table_name):
17424         Define variables.
17425         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17426         (enum s390_indirect_branch_option): Define.
17427         (s390_return_addr_from_memory): New function.
17428         (s390_handle_string_attribute): New function.
17429         (s390_attribute_table): Add new attribute handler.
17430         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17431         (s390_indirect_branch_via_thunk): New function.
17432         (s390_indirect_branch_via_inline_thunk): New function.
17433         (s390_function_ok_for_sibcall): When jumping via thunk disallow
17434         sibling call optimization for non z10 compiles.
17435         (s390_emit_call): Force indirect branch target to be a single
17436         register.  Add r1 clobber for non-z10 compiles.
17437         (s390_emit_epilogue): Emit return jump via return_use expander.
17438         (s390_reorg): Handle JUMP_INSNs as execute targets.
17439         (s390_option_override_internal): Perform validity checks for the
17440         new command line options.
17441         (s390_indirect_branch_attrvalue): New function.
17442         (s390_indirect_branch_settings): New function.
17443         (s390_set_current_function): Invoke s390_indirect_branch_settings.
17444         (s390_output_indirect_thunk_function):  New function.
17445         (s390_code_end): Implement target hook.
17446         (s390_case_values_threshold): Implement target hook.
17447         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17448         macros.
17449         * config/s390/s390.h (struct s390_frame_layout)
17450         (struct machine_function): Move here from s390.c.
17451         (TARGET_INDIRECT_BRANCH_NOBP_RET)
17452         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17453         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17454         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17455         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17456         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17457         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17458         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17459         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17460         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17461         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17462         (mnemonic attribute): Add values which aren't recognized
17463         automatically.
17464         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17465         pattern for branch conversion.  Fix mnemonic attribute.
17466         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17467         indirect branch via thunk if requested.
17468         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17469         ("*indirect_jump"): Disable for branch conversion using out of
17470         line thunks.
17471         ("indirect_jump_via_thunk<mode>_z10")
17472         ("indirect_jump_via_thunk<mode>")
17473         ("indirect_jump_via_inlinethunk<mode>_z10")
17474         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17475         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17476         ("casesi_jump_via_inlinethunk<mode>_z10")
17477         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17478         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17479         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17480         ("*indirect2_jump"): Disable for branch conversion.
17481         ("casesi_jump"): Turn into expander and expand patterns for branch
17482         conversion.
17483         ("return_use"): New expander.
17484         ("*return"): Emit return via thunk and rename it to ...
17485         ("*return<mode>"): ... this one.
17486         * config/s390/s390.opt: Add new options and and enum for the
17487         option values.
17489 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17491         * lra-constraints.c (match_reload): Unconditionally use
17492         gen_lowpart_SUBREG, rather than selecting between that
17493         and equivalent gen_rtx_SUBREG code.
17495 2018-02-08  Richard Biener  <rguenther@suse.de>
17497         PR tree-optimization/84233
17498         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17499         changed flag instead of boguously re-using phi_inserted.
17501 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17503         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17504         static local variables.
17506 2018-02-08  Richard Biener  <rguenther@suse.de>
17508         PR tree-optimization/84278
17509         * tree-vect-stmts.c (vectorizable_store): When looking for
17510         smaller vector types to perform grouped strided loads/stores
17511         make sure the mode is supported by the target.
17512         (vectorizable_load): Likewise.
17514 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17516         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17517         Increase LDP/STP opportunities by adding adjacent callee-saves.
17519 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17521         PR rtl-optimization/84068
17522         PR rtl-optimization/83459
17523         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17525 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17527         PR tree-optimization/84224
17528         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17529         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17530         non-zero arguments.
17532 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17534         PR target/84113
17535         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17536         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17537         count, remove one USE.
17539 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17541         * doc/install.texi (Configuration): Document the
17542         --with-long-double-format={ibm,ieee} PowerPC configuration
17543         options.
17545         PR target/84154
17546         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17547         Convert from define_expand to be define_insn_and_split.  Rework
17548         float/double/_Float128 conversions to QI/HI/SImode to work with
17549         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17550         conversions to QI/HImode types did a store and then a load to
17551         truncate the value.  For conversions to VSX registers, don't split
17552         the insn, instead emit the code directly.  Use the code iterator
17553         any_fix to combine signed and unsigned conversions.
17554         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17555         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17556         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17557         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17558         (fix_<mode>di2_hw): Likewise.
17559         (fixuns_<mode>di2_hw): Likewise.
17560         (fix_<mode>si2_hw): Likewise.
17561         (fixuns_<mode>si2_hw): Likewise.
17562         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17563         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17564         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17565         fix<uns>_trunc<SFDF:mode>si2_p8.
17566         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17567         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17568         (fix<uns>_<mode>_mem): Likewise.
17569         (fctiw<u>z_<mode>_mem): Likewise.
17570         (fix<uns>_<mode>_mem): Likewise.
17571         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17572         the register allocator from doing a direct move to the GPRs to do
17573         a store, and instead use the ISA 3.0 store byte/half-word from
17574         vector register instruction.  For IEEE 128-bit floating point,
17575         also optimize stores of 32-bit ints.
17576         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17578 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17580         * genextract.c (push_pathstr_operand): New function to support
17581         [a-zA-Z].
17582         (walk_rtx): Call push_pathstr_operand.
17583         (print_path): Support [a-zA-Z].
17585 2018-02-07  Richard Biener  <rguenther@suse.de>
17587         PR tree-optimization/84037
17588         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17589         (cse_and_gimplify_to_preheader): Declare.
17590         (vect_get_place_in_interleaving_chain): Likewise.
17591         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17592         ivexpr_map.
17593         (_loop_vec_info::~_loop_vec_info): Delete it.
17594         (cse_and_gimplify_to_preheader): New function.
17595         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17596         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17597         (vectorizable_load): Likewise.  For grouped stores always base
17598         the IV on the first element.
17599         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17600         condition before gimplifying.
17602 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17604         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17605         *DIV_EXPR and *MOD_EXPR.
17607 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17609         PR target/84248
17610         * config/i386/i386.c (ix86_option_override_internal): Mask out
17611         the CF_SET bit when checking -fcf-protection.
17613 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17615         PR libgomp/84217
17616         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17617         enough.
17619 2018-02-07  Richard Biener  <rguenther@suse.de>
17621         PR tree-optimization/84204
17622         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17623         this place.
17625         PR tree-optimization/84205
17626         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17627         special-case isl_ast_op_zdiv_r.
17629         PR tree-optimization/84223
17630         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17631         Only add conditions from within the region.
17632         (gather_bbs::after_dom_children): Adjust.
17634 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17636         PR target/84209
17637         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17638         * config/avr/avr.md: Only post-reload split REG-REG moves if
17639         either register is GENERAL_REG_P.
17641 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17643         PR tree-optimization/84235
17644         * tree-ssa-scopedtables.c
17645         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17646         if the subtraction is performed in floating point type where NaNs are
17647         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17648         build 1.  Formatting fix.
17650 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17652         PR target/84146
17653         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17654         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17655         and skip it regardless of bb boundaries.  Use CALL_P macro,
17656         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17657         unnecessarily, formatting fix.
17659 2018-02-06  Michael Collison  <michael.collison@arm.com>
17661         * config/arm/thumb2.md:
17662         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17663         (*thumb_mov_notscc): Ditto.
17665 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17667         PR target/84154
17668         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17669         unsigned_fix, not "s".
17671 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17673         * configure.ac (gcc_fn_eh_frame_ro): New function.
17674         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17675         correct .eh_frame permissions.
17676         * configure: Regenerate.
17678 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17680         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17681         irrelevant options.
17683 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17685         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17686         Display warning message for -mno-speculate-indirect-jumps.
17688 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17690         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17691         Undocumented.
17692         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17694 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17696         PR tree-optimization/84225
17697         * tree-eh.c (find_trapping_overflow): Only call
17698         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17700 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17702         PR target/84145
17703         * config/i386/i386.c: Reimplement the check of possible options
17704         -mibt/-mshstk conbination. Change error messages.
17705         * doc/invoke.texi: Fix a typo: remove extra '='.
17707 2018-02-06  Marek Polacek  <polacek@redhat.com>
17709         PR tree-optimization/84228
17710         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17712 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17714         PR target/82641
17715         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17716         emitted arch directives.
17717         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17718         __ARM_FEATURE_COPROC before changing architectures.
17720 2018-02-06  Richard Biener  <rguenther@suse.de>
17722         * config/i386/i386.c (print_reg): Fix typo.
17723         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17725 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17727         * configure: Regenerate.
17729 2018-02-05  Martin Sebor  <msebor@redhat.com>
17731         PR tree-optimization/83369
17732         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17733         inlining context.
17735 2018-02-05  Martin Liska  <mliska@suse.cz>
17737         * doc/invoke.texi: Cherry-pick upstream r323995.
17739 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17741         * ira.c (ira_init_register_move_cost): Adjust comment.
17743 2018-02-05  Martin Liska  <mliska@suse.cz>
17745         PR gcov-profile/84137
17746         * doc/gcov.texi: Fix typo in documentation.
17748 2018-02-05  Martin Liska  <mliska@suse.cz>
17750         PR gcov-profile/83879
17751         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17752         using dlopen functionality.
17754 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17756         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17757         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17758         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17759         _mm_maskz_range_round_ss): New intrinsics.
17760         (__builtin_ia32_rangesd128_round)
17761         (__builtin_ia32_rangess128_round): Remove.
17762         (__builtin_ia32_rangesd128_mask_round,
17763         __builtin_ia32_rangess128_mask_round): New builtins.
17764         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17765         __builtin_ia32_rangess128_round): Remove.
17766         (__builtin_ia32_rangesd128_mask_round,
17767         __builtin_ia32_rangess128_mask_round): New builtins.
17768         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17769         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17770         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17771         "<round_saeonly_constraint>")): Changed to ...
17772         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17773         "<round_saeonly_scalar_constraint>")): ... this.
17774         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17775         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17776         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17777         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17778         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17780 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17782         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17783         options.
17784         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17785         Remove all values except native, 8540 and 8548.
17787 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17789         * config/i386/i386.c (ix86_output_function_return): Pass
17790         INVALID_REGNUM, instead of -1, as invalid register number to
17791         indirect_thunk_name and output_indirect_thunk.
17793 2018-02-02  Julia Koval  <julia.koval@intel.com>
17795         * config.gcc: Add -march=icelake.
17796         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17797         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17798         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17799         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17800         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17801         (processor_target_table): Add icelake.
17802         (ix86_option_override_internal): Handle new PTAs.
17803         (get_builtin_code_for_version): Handle icelake.
17804         (M_INTEL_COREI7_ICELAKE): New.
17805         (fold_builtin_cpu): Handle icelake.
17806         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17807         * doc/invoke.texi: Add -march=icelake.
17809 2018-02-02  Julia Koval  <julia.koval@intel.com>
17811         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17812         to wide_int_bitmask.
17813         * wide-int-bitmask.h: New.
17815 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17817         PR target/84066
17818         * config/i386/i386.md: Replace Pmode with word_mode in
17819         builtin_setjmp_setup and builtin_longjmp to support x32.
17821 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17823         PR target/56010
17824         PR target/83743
17825         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17826         #include "opts.h".
17827         (rs6000_supported_cpu_names): New static variable.
17828         (linux_cpu_translation_table): Likewise.
17829         (elf_platform) <cpu>: Define new static variable and use it.
17830         Translate kernel AT_PLATFORM name to canonical name if needed.
17831         Error if platform name is unknown.
17833 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17835         PR target/84089
17836         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17838 2018-02-01  Jeff Law  <law@redhat.com>
17840         PR target/84128
17841         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17842         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17843         the scratch if RELEASE_VIA_POP is false.
17844         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17845         If we have to save a temporary register, decrement SIZE appropriately.
17846         Pass new arguments to release_scratch_register_on_entry.
17847         (ix86_adjust_stack_and_probe): Likewise.
17848         (ix86_emit_probe_stack_range): Pass new arguments to
17849         release_scratch_register_on_entry.
17851 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17853         PR rtl-optimization/84157
17854         * combine.c (change_zero_ext): Use REG_P predicate in
17855         front of HARD_REGISTER_P predicate.
17857 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17859         * config/avr/avr.c (avr_option_override): Move disabling of
17860         -fdelete-null-pointer-checks to...
17861         * common/config/avr/avr-common.c (avr_option_optimization_table):
17862         ...here.
17864 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17866         PR tree-optimization/81635
17867         * tree-data-ref.c (split_constant_offset_1): For types that
17868         wrap on overflow, try to use range info to prove that wrapping
17869         cannot occur.
17871 2018-02-01  Renlin Li  <renlin.li@arm.com>
17873         PR target/83370
17874         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17875         TAILCALL_ADDR_REGS.
17876         (aarch64_register_move_cost): Likewise.
17877         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17878         TAILCALL_ADDR_REGS.
17879         (REG_CLASS_NAMES): Likewise.
17880         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17881         TAILCALL_ADDR_REGS. Remove IP registers.
17882         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17884 2018-02-01  Richard Biener  <rguenther@suse.de>
17886         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17887         for specifying RPO order and allow NULL for that.
17888         * domwalk.c (dom_walker::dom_walker): Likewise.
17889         (dom_walker::walk): Handle NULL RPO order.
17890         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17891         in RPO order.
17892         (rewrite_update_dom_walker): Likewise.
17893         (mark_def_dom_walker): Likewise.
17895 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17897         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17898         (aarch64_maybe_expand_sve_subreg_move): Declare.
17899         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17900         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17901         predicate.
17902         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17903         that are semantically a reverse operation.
17904         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17905         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17906         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17907         functions.
17908         (aarch64_can_change_mode_class): For big-endian, forbid changes
17909         between two SVE modes if they have different element sizes.
17911 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17913         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17914         the TImode handling for big-endian targets.
17916 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17918         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17919         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17920         not just bytes.
17921         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17922         Remove BSWAP handing for big-endian targets and use the form of
17923         LD1RQ appropariate for the mode.
17925 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17927         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17928         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17929         duplicated element.
17931 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17933         PR tearget/83845
17934         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17935         check for operands that need to go through aarch64_sve_reload_be.
17937 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17939         PR tree-optimization/81661
17940         PR tree-optimization/84117
17941         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17942         * tree-eh.c: Include gimplify.h.
17943         (find_trapping_overflow, replace_trapping_overflow,
17944         rewrite_to_non_trapping_overflow): New functions.
17945         * tree-vect-loop.c: Include tree-eh.h.
17946         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17947         * tree-data-ref.c: Include tree-eh.h.
17948         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17950 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17952         PR rtl-optimization/84123
17953         * combine.c (change_zero_ext): Check if hard register satisfies
17954         can_change_dest_mode before calling gen_lowpart_SUBREG.
17956 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17958         PR target/82444
17959         * ira.c (ira_init_register_move_cost): Remove assert.
17961 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17963         PR rtl-optimization/84071
17964         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17965         * doc/tm.texi: Regenerate.
17967 2018-01-31  Richard Biener  <rguenther@suse.de>
17969         PR tree-optimization/84132
17970         * tree-data-ref.c (analyze_miv_subscript): Properly
17971         check whether evolution_function_is_affine_multivariate_p
17972         before calling gcd_of_steps_may_divide_p.
17974 2018-01-31  Julia Koval  <julia.koval@intel.com>
17976         PR target/83618
17977         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17978         * config/i386/i386.md (rdpid_rex64) New.
17979         (rdpid): Make 32bit only.
17981 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17983         PR lto/84105
17984         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17985         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17987 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17989         Revert
17990         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17992         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17994 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17996         PR rtl-optimization/84071
17997         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17998         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18000 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
18002         * config/arc/arc.c (arc_handle_aux_attribute): New function.
18003         (arc_attribute_table): Add 'aux' attribute.
18004         (arc_in_small_data_p): Consider aux like variables.
18005         (arc_is_aux_reg_p): New function.
18006         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18007         (arc_get_aux_arg): New function.
18008         (prepare_move_operands): Handle aux-register access.
18009         (arc_handle_aux_attribute): New function.
18010         * doc/extend.texi (ARC Variable attributes): Add subsection.
18012 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
18014         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18015         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18016         (arc_attribute_table): Add 'uncached' attribute.
18017         (arc_print_operand): Print '.di' flag for uncached memory
18018         accesses.
18019         (arc_in_small_data_p): Do not consider for small data the uncached
18020         types.
18021         (arc_is_uncached_mem_p): New function.
18022         * config/arc/predicates.md (compact_store_memory_operand): Check
18023         for uncached memory accesses.
18024         (nonvol_nonimm_operand): Likewise.
18025         * doc/extend.texi (ARC Type Attribute): New subsection.
18027 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
18029         PR c/84100
18030         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18031         falign-loops=): Add Optimization flag.
18033 2018-01-30  Jeff Law  <law@redhat.com>
18035         PR target/84064
18036         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18037         INT_REGISTERS_SAVED.  Check it prior to calling
18038         get_scratch_register_on_entry.
18039         (ix86_adjust_stack_and_probe): Similarly.
18040         (ix86_emit_probe_stack_range): Similarly.
18041         (ix86_expand_prologue): Corresponding changes.
18043 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18045         PR target/40411
18046         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18047         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18049 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
18051         PR target/84112
18052         * lra-constraints.c (curr_insn_transform): Process AND in the
18053         address.
18055 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
18057         PR rtl-optimization/83986
18058         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18059         dependence against last_pending_memory_flush in addition to
18060         pending_jump_insns.
18062 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
18064         PR tree-optimization/81611
18065         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18066         copies.
18068 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18070         PR target/83758
18071         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18072         a reg rtx.
18074 2018-01-30  Richard Biener  <rguenther@suse.de>
18075             Jakub Jelinek  <jakub@redhat.com>
18077         PR tree-optimization/84111
18078         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18079         inner loops added during recursion, as they don't have up-to-date
18080         SSA form.
18082 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18084         PR ipa/81360
18085         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18086         (can_inline_edge_by_limits_p): ... here.
18087         (can_early_inline_edge_p, check_callers,
18088         update_caller_keys, update_callee_keys, recursive_inlining,
18089         add_new_edges_to_heap, speculation_useful_p,
18090         inline_small_functions,
18091         inline_small_functions, flatten_function,
18092         inline_to_all_callers_1): Update.
18094 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18096         * profile-count.c (profile_count::combine_with_ipa_count): Handle
18097         zeros correctly.
18099 2018-01-30  Richard Biener  <rguenther@suse.de>
18101         PR tree-optimization/83008
18102         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18103         invariant and constant vector uses in stmts when they need
18104         more than one stmt.
18106 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18108         PR bootstrap/84017
18109         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18110         * configure: Regenerate.
18112 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18114         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18115         pattern.
18116         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18117         Use gen_rtx_REG rather than gen_lowpart.
18119 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18121         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18122         rather than 0 when creating partial subregs.
18124 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18126         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18127         of usage.
18129 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
18131         PR target/81550
18132         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18133         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18134         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18135         flags.  This restores the settings used before the 2017-07-24.
18136         Turning off pre increment/decrement/modify allows IVOPTS to
18137         optimize DF/SF loops where the index is an int.
18139 2018-01-29  Richard Biener  <rguenther@suse.de>
18140             Kelvin Nilsen  <kelvin@gcc.gnu.org>
18142         PR bootstrap/80867
18143         * tree-vect-stmts.c (vectorizable_call): Don't call
18144         targetm.vectorize_builtin_md_vectorized_function if callee is
18145         NULL.
18147 2018-01-22  Carl Love  <cel@us.ibm.com>
18149         * doc/extend.tex: Fix typo in second arg in
18150         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18152 2018-01-29  Richard Biener  <rguenther@suse.de>
18154         PR tree-optimization/84086
18155         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18156         (flush_ssaname_freelist): When SSA names were released reset
18157         the SCEV hash table.
18159 2018-01-29  Richard Biener  <rguenther@suse.de>
18161         PR tree-optimization/84057
18162         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18163         removed paths when removing edges.
18165 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
18167         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18168         -mfunction-return=@var{choice}.
18170 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18172         PR diagnostic/84034
18173         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18174         Handle CR like TAB.
18175         (layout::print_source_line): Likewise.
18176         (test_get_line_width_without_trailing_whitespace): Add test cases.
18178 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
18180         PR middle-end/84040
18181         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18182         debug insns.
18184 2018-01-26  Jim Wilson  <jimw@sifive.com>
18186         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18188         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18189         specified.
18191 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18193         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18194         and CMP + SUB-immediate -> SUBS.
18196 2018-01-26  Martin Sebor  <msebor@redhat.com>
18198         PR tree-optimization/83896
18199         * tree-ssa-strlen.c (get_string_len): Rename...
18200         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
18201         Avoid assuming length is constant.
18202         (handle_char_store): Use HOST_WIDE_INT for string length.
18204 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
18206         PR target/81763
18207         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18208         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18210 2018-01-26  Richard Biener  <rguenther@suse.de>
18212         PR rtl-optimization/84003
18213         * dse.c (record_store): Only record redundant stores when
18214         the earlier store aliases at least all accesses the later one does.
18216 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
18218         PR rtl-optimization/83985
18219         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18220         REG_CFA_RESTORE insns.
18221         (delete_unmarked_insns): Don't ignore separate shrink wrapping
18222         REG_CFA_RESTORE insns here.
18224         PR c/83989
18225         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18226         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18228 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18230         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18231         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18232         (arc_init): Likewise.
18233         (arc_override_options): Likewise.
18234         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18235         value.
18236         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18237         support.
18238         * config/arc/arc.h (TARGET_DBNZ): Define.
18239         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18240         properly set the tune attribute.
18241         (dbnz): Use TARGET_DBNZ guard.
18242         * config/arc/arc.opt (mtune): Add core3 option.
18244 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18246         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18247         recognize new pic like addresses.
18248         (arc_delegitimize_address): Clean up.
18250 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18252         * config/arc/arc-arches.def: Option mrf16 valid for all
18253         architectures.
18254         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18255         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18256         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18257         * config/arc/arc-tables.opt: Regenerate.
18258         * config/arc/arc.c (arc_conditional_register_usage): Handle
18259         reduced register file case.
18260         (arc_file_start): Set must have build attributes.
18261         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18262         mrf16 option value.
18263         * config/arc/arc.opt (mrf16): Add new option.
18264         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18265         * config/arc/genmultilib.awk: Handle new mrf16 option.
18266         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18267         * config/arc/t-multilib: Regenerate.
18268         * doc/invoke.texi (ARC Options): Document mrf16 option.
18270 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18272         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18273         * config/arc/arc.c (arc_handle_secure_attribute): New function.
18274         (arc_attribute_table): Add 'secure_call' attribute.
18275         (arc_print_operand): Print secure call operand.
18276         (arc_function_ok_for_sibcall): Don't optimize tail calls when
18277         secure.
18278         (arc_is_secure_call_p): New function.  * config/arc/arc.md
18279         (call_i): Add support for sjli instruction.
18280         (call_value_i): Likewise.
18281         * config/arc/constraints.md (Csc): New constraint.
18283 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18284             John Eric Martin  <John.Martin@emmicro-us.com>
18286         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18287         * config/arc/arc.c (_arc_jli_section): New struct.
18288         (arc_jli_section): New type.
18289         (rc_jli_sections): New static variable.
18290         (arc_handle_jli_attribute): New function.
18291         (arc_attribute_table): Add jli_always and jli_fixed attribute.
18292         (arc_file_end): New function.
18293         (TARGET_ASM_FILE_END): Define.
18294         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18295         (arc_add_jli_section): New function.
18296         (jli_call_scan): Likewise.
18297         (arc_reorg): Call jli_call_scan.
18298         (arc_output_addsi): Remove 'S' from printing asm operand.
18299         (arc_is_jli_call_p): New function.
18300         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18301         operand.
18302         (movhi_insn): Likewise.
18303         (movsi_insn): Likewise.
18304         (movsi_set_cc_insn): Likewise.
18305         (loadqi_update): Likewise.
18306         (load_zeroextendqisi_update): Likewise.
18307         (load_signextendqisi_update): Likewise.
18308         (loadhi_update): Likewise.
18309         (load_zeroextendhisi_update): Likewise.
18310         (load_signextendhisi_update): Likewise.
18311         (loadsi_update): Likewise.
18312         (loadsf_update): Likewise.
18313         (movsicc_insn): Likewise.
18314         (bset_insn): Likewise.
18315         (bxor_insn): Likewise.
18316         (bclr_insn): Likewise.
18317         (bmsk_insn): Likewise.
18318         (bicsi3_insn): Likewise.
18319         (cmpsi_cc_c_insn): Likewise.
18320         (movsi_ne): Likewise.
18321         (movsi_cond_exec): Likewise.
18322         (clrsbsi2): Likewise.
18323         (norm_f): Likewise.
18324         (normw): Likewise.
18325         (swap): Likewise.
18326         (divaw): Likewise.
18327         (flag): Likewise.
18328         (sr): Likewise.
18329         (kflag): Likewise.
18330         (ffs): Likewise.
18331         (ffs_f): Likewise.
18332         (fls): Likewise.
18333         (call_i): Remove 'S' asm letter, add jli instruction.
18334         (call_value_i): Likewise.
18335         * config/arc/arc.op (mjli-always): New option.
18336         * config/arc/constraints.md (Cji): New constraint.
18337         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18338         operand.
18339         (subsf3_fpx): Likewise.
18340         (mulsf3_fpx): Likewise.
18341         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18342         asm operand.
18343         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18344         function attrbutes.
18345         * doc/invoke.texi (ARC): Document mjli-always option.
18347 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
18349         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18350         avoid addition with 0 and use incw and decw where possible.
18352 2018-01-26  Richard Biener  <rguenther@suse.de>
18354         PR tree-optimization/81082
18355         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18356         association if it requires casting to unsigned.
18357         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18358         from fold_plusminus_mult_expr to catch important cases late when
18359         range info is available.
18361 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18363         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18364         * configure.ac (hidden_linkonce): New test.
18365         * configure: Regenerate.
18366         * config.in: Regenerate.
18368 2018-01-26  Julia Koval  <julia.koval@intel.com>
18370         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18371         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18372         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18373         _mm_mask_bitshuffle_epi64_mask): Fix type.
18374         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18375         USI_FTYPE_V4DI_V4DI_USI): Remove.
18376         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18377         __builtin_ia32_vpshufbitqmb256_mask,
18378         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18379         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18380         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18382 2018-01-26  Alan Modra  <amodra@gmail.com>
18384         PR target/84033
18385         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18386         UNSPEC_VBPERMQ.  Sort other unspecs.
18388 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
18390         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18392 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
18394         PR middle-end/83055
18395         * predict.c (drop_profile): Do not push/pop cfun; update also
18396         node->count.
18397         (handle_missing_profiles): Fix logic looking for zero profiles.
18399 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
18401         PR middle-end/83977
18402         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18403         on functions with #pragma omp declare simd or functions with simd
18404         attribute.
18405         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18406         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18407         Remove trailing \n from warning_at calls.
18409 2018-01-25  Tom de Vries  <tom@codesourcery.com>
18411         PR target/84028
18412         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18413         for neutered workers.
18415 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
18417         PR target/68467
18418         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18419         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18421 2018-01-24  Jeff Law  <law@redhat.com>
18423         PR target/83994
18424         * i386.c (get_probe_interval): Move to earlier point.
18425         (ix86_compute_frame_layout): If -fstack-clash-protection and
18426         the frame is larger than the probe interval, then use pushes
18427         to save registers rather than reg->mem moves.
18428         (ix86_expand_prologue): Remove conditional for int_registers_saved
18429         assertion.
18431 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
18433         PR target/84014
18434         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18435         min/max for never referenced object.
18437 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
18439         PR middle-end/83977
18440         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18441         here.
18442         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18443         attributes from DECL_ATTRIBUTES (decl) without affecting
18444         DECL_ATTRIBUTES (current_function_decl).
18445         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18446         functions with non-NULL DECL_ABSTRACT_ORIGIN.
18448 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
18450         PR tree-optimization/83979
18451         * fold-const.c (fold_comparison): Use constant_boolean_node
18452         instead of boolean_{true,false}_node.
18454 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
18456         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18457         with zero counts.
18459 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18461         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18462         Simplify the clause that sets the length attribute.
18463         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18464         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18465         clause that sets the length attribute.
18466         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18468 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18470         PR target/83589
18471         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18472         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18473         Add strict parameter.
18474         (prevent_branch_around_nothing): Insert dummy insn between branch to
18475         label and label with no ptx insn inbetween.
18476         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18478 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18480         PR target/81352
18481         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18482         for neutered threads in warp.
18483         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18485 2018-01-24  Richard Biener  <rguenther@suse.de>
18487         PR tree-optimization/83176
18488         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18489         operands.
18491 2018-01-24  Richard Biener  <rguenther@suse.de>
18493         PR tree-optimization/82819
18494         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18495         code generating pluses that are no-ops in the target precision.
18497 2018-01-24  Richard Biener  <rguenther@suse.de>
18499         PR middle-end/84000
18500         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18502 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18504         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18505         to merge probabilities.
18506         * predict.c (probably_never_executed): Also mark as cold functions
18507         with global 0 profile and guessed local profile.
18508         * profile-count.c (profile_probability::combine_with_count): New
18509         member function.
18510         * profile-count.h (profile_probability::operator*,
18511         profile_probability::operator*=, profile_probability::operator/,
18512         profile_probability::operator/=): Reduce precision to adjusted
18513         and set value to guessed on contradictory divisions.
18514         (profile_probability::combine_with_freq): Remove.
18515         (profile_probability::combine_wiht_count): Declare.
18516         (profile_count::force_nonzero):: Set to adjusted.
18517         (profile_count::probability_in):: Set quality to adjusted.
18518         * tree-ssa-tail-merge.c (replace_block_by): Use
18519         combine_with_count.
18521 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18522             Jim Wilson  <jimw@sifive.com>
18524         * config/riscv/riscv.c (riscv_stack_boundary): New.
18525         (riscv_option_override): Set riscv_stack_boundary.  Handle
18526         riscv_preferred_stack_boundary_arg.
18527         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18528         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18529         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18530         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18531         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18532         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18534 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18536         PR target/83905
18537         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18538         of struct ix86_frame.
18539         (ix86_expand_epilogue): Likewise.  Add a local variable for
18540         the reg_save_offset field in struct ix86_frame.
18542 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18544         PR tree-optimization/82604
18545         * tree-loop-distribution.c (enum partition_kind): New enum item
18546         PKIND_PARTIAL_MEMSET.
18547         (partition_builtin_p): Support above new enum item.
18548         (generate_code_for_partition): Ditto.
18549         (compute_access_range): Differentiate cases that equality can be
18550         proven at all loops, the innermost loops or no loops.
18551         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18552         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18553         (finalize_partitions, distribute_loop): Don't fuse partition of
18554         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18555         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18556         parloop is enabled.
18558 2018-01-23  Martin Liska  <mliska@suse.cz>
18560         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18561         order to ignore the predictor.
18562         (PRED_POLYMORPHIC_CALL): Likewise.
18563         (PRED_RECURSIVE_CALL): Likewise.
18565 2018-01-23  Martin Liska  <mliska@suse.cz>
18567         * tree-profile.c (tree_profiling): Print function header to
18568         aware reader which function we are working on.
18569         * value-prof.c (gimple_find_values_to_profile): Do not print
18570         not interesting value histograms.
18572 2018-01-23  Martin Liska  <mliska@suse.cz>
18574         * profile-count.h (enum profile_quality): Add
18575         profile_uninitialized as the first value. Do not number values
18576         as they are zero based.
18577         (profile_count::verify): Update sanity check.
18578         (profile_probability::verify): Likewise.
18580 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18582         * doc/invoke.texi (ffor-scope): Deprecate.
18584 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18586         PR tree-optimization/83510
18587         * domwalk.c (set_all_edges_as_executable): New function.
18588         (dom_walker::dom_walker): Convert bool param
18589         "skip_unreachable_blocks" to enum reachability.  Move setup of
18590         edge flags to set_all_edges_as_executable and only do it when
18591         reachability is REACHABLE_BLOCKS.
18592         * domwalk.h (enum dom_walker::reachability): New enum.
18593         (dom_walker::dom_walker): Convert bool param
18594         "skip_unreachable_blocks" to enum reachability.
18595         (set_all_edges_as_executable): New decl.
18596         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18597         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18598         "reachability".
18599         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18600         but converting true to REACHABLE_BLOCKS.
18601         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18602         * tree-vrp.c
18603         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18604         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18605         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18606         REACHABLE_BLOCKS.
18607         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18608         if check_all_array_refs will be called.
18610 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18612         * tree.c (selftest::test_location_wrappers): Add more test
18613         coverage.
18615 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18617         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18618         (selftest::test_bit_in_range): Likewise.
18620 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18622         PR testsuite/83888
18623         * doc/sourcebuild.texi (vect_float): Say that the selector
18624         only describes the situation when -funsafe-math-optimizations is on.
18625         (vect_float_strict): Document.
18627 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18629         PR tree-optimization/83965
18630         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18631         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18632         instead of checking only for a reduction.
18633         (vect_recog_widen_sum_pattern): Likewise.
18635 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18637         * predict.c (probably_never_executed): Only use precise profile info.
18638         (compute_function_frequency): Skip after inlining hack since we now
18639         have quality checking.
18641 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18643         * profile-count.h (profile_probability::very_unlikely,
18644         profile_probability::unlikely, profile_probability::even): Set
18645         precision to guessed.
18647 2018-01-23  Richard Biener  <rguenther@suse.de>
18649         PR tree-optimization/83963
18650         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18651         Properly terminate dominator walk when crossing the exit edge not
18652         when visiting its source block.
18654 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18656         PR c++/83918
18657         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18658         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18660 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18662         PR tree-optimization/83957
18663         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18664         semicolon after for body surrounded by braces.
18666         PR tree-optimization/83081
18667         * profile-count.h (profile_probability::split): New method.
18668         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18669         Use profile_probability::split.
18670         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18671         when splitting a single conditional jump into 2.
18673 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18675         PR tree-optimization/69452
18676         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18677         decl.
18679 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18681         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18682         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18683         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18685 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18687         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18688         declaration.
18689         * config/rl78/rl78.md (movdi): New define_expand.
18690         * config/rl78/rl78.c (rl78_split_movdi): New function.
18692 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18694         PR target/83862
18695         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18696         no longer used.
18697         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18698         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18699         128-bit to produce an UNSPEC move to get the double word with the
18700         signbit and then a shift directly to do signbit.
18701         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18702         implementation with a new version that just does either a direct
18703         move or a regular move.  Move memory interface to separate insns.
18704         Move insns so they are next to the expander.
18705         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18706         with signbit move.  Split big and little endian case.
18707         (signbit<mode>2_dm_mem_le): Likewise.
18708         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18709         (signbit<mode>2_dm2): Likewise.
18711 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18713         * config/rl78/rl78.md (anddi3): New define_expand.
18715 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18717         * config/rl78/rl78.md (umindi3): New define_expand.
18719 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18721         * config/rl78/rl78.md (smindi3): New define_expand.
18723 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18725         * config/rl78/rl78.md (smaxdi3): New define_expand.
18727 2018-01-22  Carl Love  <cel@us.ibm.com>
18729         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18730         LVX_V1TI): Add macro expansion.
18731         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18732         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18733         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18734         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18735         Change check to determine if the instruction is a byte reversing
18736         entry.  Fix typo in comment.
18737         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18738         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18739         Add def_builtin calls for new builtins.
18740         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18741         Add define_insn expansion.
18743 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18745         * config/rl78/rl78.md (umaxdi3): New define_expand.
18747 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18749         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18750         for non-QImode registers.
18752 2018-01-22  Richard Biener  <rguenther@suse.de>
18754         PR tree-optimization/83963
18755         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18756         including the loop exit block.
18757         (scop_detection::merge_sese): Likewise.
18758         (scop_detection::add_scop): Do it here instead.
18760 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18762         * doc/sourcebuild.texi (arm_softfloat): Document.
18764 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18766         PR gcc/77734
18767         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18768         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18769         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18771 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18772             David Edelsohn  <dje.gcc@gmail.com>
18774         PR target/83946
18775         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18776         Change "crset eq" to "crset 2".
18777         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18778         (*call_indirect_aix<mode>_nospec): Likewise.
18779         (*call_value_indirect_aix<mode>_nospec): Likewise.
18780         (*call_indirect_elfv2<mode>_nospec): Likewise.
18781         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18782         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18783         change assembly output from . to $.
18784         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18785         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18786         (*tablejump<mode>_internal1_nospec): Likewise.
18788 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18790         PR target/80870
18791         * config/sh/sh_optimize_sett_clrt.cc:
18792         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18794 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18796         PR tree-optimization/83940
18797         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18798         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18799         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18800         use it to pass back the definition type.
18801         (vect_check_store_rhs): Likewise rhs_dt_out.
18802         (vect_build_gather_load_calls): Add a mask_dt argument and use
18803         it instead of a call to vect_is_simple_use.
18804         (vectorizable_store): Update calls to vect_check_load_store_mask
18805         and vect_check_store_rhs.  Use the dt returned by the latter instead
18806         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18807         instead of calls to vect_is_simple_use.  Pass the scalar rather
18808         than the vector operand to vect_is_simple_use when handling
18809         second and subsequent copies of an rhs value.
18810         (vectorizable_load): Update calls to vect_check_load_store_mask
18811         and vect_build_gather_load_calls.  Use the cached mask_dt and
18812         gs_info.offset_dt instead of calls to vect_is_simple_use.
18814 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18816         PR middle-end/83945
18817         * tree-emutls.c: Include gimplify.h.
18818         (lower_emutls_2): New function.
18819         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18820         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18821         it before further processing.
18823         PR target/83930
18824         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18825         UINTVAL (trueop1) instead of INTVAL (op1).
18827 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18829         PR debug/81570
18830         PR debug/83728
18831         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18832         INCOMING_FRAME_SP_OFFSET if not defined.
18833         (scan_trace): Add ENTRY argument.  If true and
18834         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18835         emit a note to adjust the CFA offset.
18836         (create_cfi_notes): Adjust scan_trace callers.
18837         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18838         INCOMING_FRAME_SP_OFFSET in the CIE.
18839         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18840         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18841         Likewise.
18842         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18843         * doc/tm.texi: Regenerated.
18845 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18847         PR rtl-optimization/83147
18848         * lra-constraints.c (remove_inheritance_pseudos): Use
18849         lra_substitute_pseudo_within_insn.
18851 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18852             Cesar Philippidis  <cesar@codesourcery.com>
18854         PR target/83920
18855         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18857 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18859         PR target/83790
18860         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18861         spaces for function labels.
18863 2018-01-19  Martin Liska  <mliska@suse.cz>
18865         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18866         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18867         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18868         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18869         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18870         (PRED_CONST_RETURN): Change from 69 to 65.
18871         (PRED_NULL_RETURN): Change from 91 to 71.
18872         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18873         (PRED_LOOP_GUARD): Change from 66 to 73.
18875 2018-01-19  Martin Liska  <mliska@suse.cz>
18877         * predict.c (predict_insn_def): Add new assert.
18878         (struct branch_predictor): Change type to signed integer.
18879         (test_prediction_value_range): Amend test to cover
18880         PROB_UNINITIALIZED.
18881         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18882         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18883         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18884         (PRED_LOOP_IV_COMPARE): Likewise.
18885         * predict.h (PROB_UNINITIALIZED): Define new constant.
18887 2018-01-19  Martin Liska  <mliska@suse.cz>
18889         * predict.c (dump_prediction): Add new format for
18890         analyze_brprob.py script which is enabled with -details
18891         suboption.
18892         * profile-count.h (precise_p): New function.
18894 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18896         PR tree-optimization/83922
18897         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18898         there are no statements that need masking.
18899         (vect_active_double_reduction_p): New function.
18900         (vect_analyze_loop_operations): Use it when handling phis that
18901         are not in the loop header.
18903 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18905         PR tree-optimization/83914
18906         * tree-vect-loop.c (vectorizable_induction): Don't convert
18907         init_expr or apply the peeling adjustment for inductions
18908         that are nested within the vectorized loop.
18910 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18912         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18913         instead of NEG.
18915 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18917         PR sanitizer/81715
18918         PR testsuite/83882
18919         * function.h (gimplify_parameters): Add gimple_seq * argument.
18920         * function.c: Include gimple.h and options.h.
18921         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18922         for the added local temporaries if needed.
18923         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18924         if there are any parameter cleanups, wrap whole body into a
18925         try/finally with the cleanups.
18927 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18929         PR target/82964
18930         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18931         Use GET_MODE_CLASS for scalar floating point.
18933 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18935         PR ipa/82256
18936         patch by PaX Team
18937         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18938         Fix call of call_cgraph_insertion_hooks.
18940 2018-01-18  Martin Sebor  <msebor@redhat.com>
18942         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18944 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18946         PR ipa/83619
18947         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18948         frequencies.
18950 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18952         PR other/70268
18953         * common.opt: (-ffile-prefix-map): New option.
18954         * opts.c (common_handle_option): Defer it.
18955         * opts-global.c (handle_common_deferred_options): Handle it.
18956         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18957         * file-prefix-map.h: New file.
18958         (remap_debug_filename, add_debug_prefix_map): ...here.
18959         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18960         * final.c (debug_prefix_map, add_debug_prefix_map
18961         remap_debug_filename): Move to...
18962         * file-prefix-map.c: New file.
18963         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18964         generalize, get rid of alloca(), use strrchr() instead of strchr().
18965         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18966         Implement in terms of add_prefix_map().
18967         (remap_macro_filename, remap_debug_filename): Implement in term of
18968         remap_filename().
18969         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18970         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18971         * dbxout.c: Include file-prefix-map.h.
18972         * varasm.c: Likewise.
18973         * vmsdbgout.c: Likewise.
18974         * xcoffout.c: Likewise.
18975         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18976         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18977         * doc/invoke.texi (-ffile-prefix-map): Document.
18978         (-fdebug-prefix-map): Update description.
18980 2018-01-18  Martin Liska  <mliska@suse.cz>
18982         * config/i386/i386.c (indirect_thunk_name): Document that also
18983         lfence is emitted.
18984         (output_indirect_thunk): Document why both instructions
18985         (pause and lfence) are generated.
18987 2018-01-18  Richard Biener  <rguenther@suse.de>
18989         PR tree-optimization/83887
18990         * graphite-scop-detection.c
18991         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18992         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18993         (scop_detection::merge_sese): Re-implement with a flood-fill
18994         algorithm that properly finds a SESE region if it exists.
18996 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18998         PR c/61240
18999         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19000         pointer_diff optimizations use view_convert instead of convert.
19002 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19004         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19005         Generate different code for -mno-speculate-indirect-jumps.
19006         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19007         (*call_indirect_aix<mode>): Disable for
19008         -mno-speculate-indirect-jumps.
19009         (*call_indirect_aix<mode>_nospec): New define_insn.
19010         (*call_value_indirect_aix<mode>): Disable for
19011         -mno-speculate-indirect-jumps.
19012         (*call_value_indirect_aix<mode>_nospec): New define_insn.
19013         (*sibcall_nonlocal_sysv<mode>): Generate different code for
19014         -mno-speculate-indirect-jumps.
19015         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19017 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
19019         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19020         long double type, set the flags for noting the default long double
19021         type, even if we don't pass or return a long double type.
19023 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
19025         PR ipa/83051
19026         * ipa-inline.c (flatten_function): Do not overwrite final inlining
19027         failure.
19029 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
19031         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19032         support for merge[hl].
19033         (fold_mergehl_helper): New helper function.
19034         (tree-vector-builder.h): New #include for tree_vector_builder usage.
19035         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19036         (altivec_vmrglw_direct): Add xxmrglw insn.
19038 2018-01-17  Andrew Waterman  <andrew@sifive.com>
19040         * config/riscv/riscv.c (riscv_conditional_register_usage): If
19041         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19043 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
19045         PR lto/83121
19046         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19047         call the lto_location_cache before reading the
19048         DECL_SOURCE_LOCATION of the types.
19050 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
19051             Richard Sandiford  <richard.sandiford@linaro.org>
19053         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19054         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19055         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19056         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19057         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19058         Add declaration.
19059         * config/aarch64/constraints.md (aarch64_movti_operand):
19060         Limit immediates.
19061         * config/aarch64/predicates.md (Uti): Add new constraint.
19063 2018-01-17  Carl Love  <cel@us.ibm.com>
19065         * config/rs6000/vsx.md (define_expand xl_len_r,
19066         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19067         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19068         lxvll.
19069         (define_expand, define_insn): Move the shift left from  the
19070         define_insn to the define_expand for lxvl and stxvl instructions.
19071         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19072         and XL_LEN_R definitions to PURE.
19074 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
19076         * config/i386/i386.c (indirect_thunk_name): Declare regno
19077         as unsigned int.  Compare regno with INVALID_REGNUM.
19078         (output_indirect_thunk): Ditto.
19079         (output_indirect_thunk_function): Ditto.
19080         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
19081         in the call to output_indirect_thunk_function.
19083 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
19085         PR middle-end/83884
19086         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19087         rather than the size of inner_type to determine the stack slot size
19088         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19090 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
19092         PR target/83546
19093         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19094         to PTA_SILVERMONT.
19096 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
19098         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19099         endian Linux systems to optionally enable multilibs for selecting
19100         the long double type if the user configured an explicit type.
19101         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19102         have no long double multilibs if not defined.
19103         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19104         warn if the user used -mabi={ieee,ibm}longdouble and we built
19105         multilibs for long double.
19106         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19107         appropriate multilib option.
19108         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19109         multilib options.
19110         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19111         for building long double multilibs.
19112         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19114 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
19116         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19117         copies.
19119         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19120         64 bits.
19121         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19122         128 bits.
19124         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19125         variables.
19127         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19128         return value.
19130 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19132         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19133         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19135 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19137         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19138         different rtl trees depending on TARGET_64BIT.
19139         (rs6000_gen_lvx): Likewise.
19141 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19143         * config/visium/visium.md (nop): Tweak comment.
19144         (hazard_nop): Likewise.
19146 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19148         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19149         -mspeculate-indirect-jumps.
19150         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19151         for -mno-speculate-indirect-jumps.
19152         (*call_indirect_elfv2<mode>_nospec): New define_insn.
19153         (*call_value_indirect_elfv2<mode>): Disable for
19154         -mno-speculate-indirect-jumps.
19155         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19156         (indirect_jump): Emit different RTL for
19157         -mno-speculate-indirect-jumps.
19158         (*indirect_jump<mode>): Disable for
19159         -mno-speculate-indirect-jumps.
19160         (*indirect_jump<mode>_nospec): New define_insn.
19161         (tablejump): Emit different RTL for
19162         -mno-speculate-indirect-jumps.
19163         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19164         (tablejumpsi_nospec): New define_expand.
19165         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19166         (tablejumpdi_nospec): New define_expand.
19167         (*tablejump<mode>_internal1): Disable for
19168         -mno-speculate-indirect-jumps.
19169         (*tablejump<mode>_internal1_nospec): New define_insn.
19170         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19171         option.
19173 2018-01-16  Artyom Skrobov tyomitch@gmail.com
19175         * caller-save.c (insert_save): Drop unnecessary parameter.  All
19176         callers updated.
19178 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19179             Richard Biener  <rguenth@suse.de>
19181         PR libgomp/83590
19182         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19183         return early, inline manually is_gimple_sizepos.  Make sure if we
19184         call gimplify_expr we don't end up with a gimple constant.
19185         * tree.c (variably_modified_type_p): Don't return true for
19186         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
19187         * gimplify.h (is_gimple_sizepos): Remove.
19189 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19191         PR tree-optimization/83857
19192         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19193         vectorizable_live_operation for pure SLP statements.
19194         (vectorizable_live_operation): Handle PHIs.
19196 2018-01-16  Richard Biener  <rguenther@suse.de>
19198         PR tree-optimization/83867
19199         * tree-vect-stmts.c (vect_transform_stmt): Precompute
19200         nested_in_vect_loop_p since the scalar stmt may get invalidated.
19202 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19204         PR c/83844
19205         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19206         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19207         If off is not INTEGER_CST, issue a may not be aligned warning
19208         rather than isn't aligned.  Use isn%'t rather than isn't.
19209         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19210         into MULT_EXPR.
19211         <case MULT_EXPR>: Improve the case when bottom and one of the
19212         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19213         operand, in that case check if the other operand is multiple of
19214         bottom divided by the INTEGER_CST operand.
19216 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19218         PR target/83858
19219         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19220         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19221         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19222         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19223         * config/pa/pa.c (pa_function_arg_advance): Likewise.
19224         (pa_function_arg, pa_arg_partial_bytes): Likewise.
19225         (pa_function_arg_size): New function.
19227 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19229         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19230         in a separate statement.
19232 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19234         PR tree-optimization/83847
19235         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19236         group gathers and scatters.
19238 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19240         PR rtl-optimization/86620
19241         * params.def (max-sched-ready-insns): Bump minimum value to 1.
19243         PR rtl-optimization/83213
19244         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19245         to last if both are JUMP_INSNs.
19247         PR tree-optimization/83843
19248         * gimple-ssa-store-merging.c
19249         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19250         store_immediate_info for bswap/nop orig_stores.
19252 2018-01-15  Andrew Waterman  <andrew@sifive.com>
19254         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19255         !TARGET_MUL.
19256         <UDIV>: Increase cost if !TARGET_DIV.
19258 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
19260         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19261         (define_attr "cr_logical_3op"): New.
19262         (cceq_ior_compare): Adjust.
19263         (cceq_ior_compare_complement): Adjust.
19264         (*cceq_rev_compare): Adjust.
19265         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19266         (is_cracked_insn): Adjust.
19267         (insn_must_be_first_in_group): Adjust.
19268         * config/rs6000/40x.md: Adjust.
19269         * config/rs6000/440.md: Adjust.
19270         * config/rs6000/476.md: Adjust.
19271         * config/rs6000/601.md: Adjust.
19272         * config/rs6000/603.md: Adjust.
19273         * config/rs6000/6xx.md: Adjust.
19274         * config/rs6000/7450.md: Adjust.
19275         * config/rs6000/7xx.md: Adjust.
19276         * config/rs6000/8540.md: Adjust.
19277         * config/rs6000/cell.md: Adjust.
19278         * config/rs6000/e300c2c3.md: Adjust.
19279         * config/rs6000/e500mc.md: Adjust.
19280         * config/rs6000/e500mc64.md: Adjust.
19281         * config/rs6000/e5500.md: Adjust.
19282         * config/rs6000/e6500.md: Adjust.
19283         * config/rs6000/mpc.md: Adjust.
19284         * config/rs6000/power4.md: Adjust.
19285         * config/rs6000/power5.md: Adjust.
19286         * config/rs6000/power6.md: Adjust.
19287         * config/rs6000/power7.md: Adjust.
19288         * config/rs6000/power8.md: Adjust.
19289         * config/rs6000/power9.md: Adjust.
19290         * config/rs6000/rs64.md: Adjust.
19291         * config/rs6000/titan.md: Adjust.
19293 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19295         * config/i386/predicates.md (indirect_branch_operand): Rewrite
19296         ix86_indirect_branch_register logic.
19298 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19300         * config/i386/constraints.md (Bs): Update
19301         ix86_indirect_branch_register check.  Don't check
19302         ix86_indirect_branch_register with GOT_memory_operand.
19303         (Bw): Likewise.
19304         * config/i386/predicates.md (GOT_memory_operand): Don't check
19305         ix86_indirect_branch_register here.
19306         (GOT32_symbol_operand): Likewise.
19308 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19310         * config/i386/predicates.md (constant_call_address_operand):
19311         Rewrite ix86_indirect_branch_register logic.
19312         (sibcall_insn_operand): Likewise.
19314 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19316         * config/i386/constraints.md (Bs): Replace
19317         ix86_indirect_branch_thunk_register with
19318         ix86_indirect_branch_register.
19319         (Bw): Likewise.
19320         * config/i386/i386.md (indirect_jump): Likewise.
19321         (tablejump): Likewise.
19322         (*sibcall_memory): Likewise.
19323         (*sibcall_value_memory): Likewise.
19324         Peepholes of indirect call and jump via memory: Likewise.
19325         * config/i386/i386.opt: Likewise.
19326         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19327         (GOT_memory_operand): Likewise.
19328         (call_insn_operand): Likewise.
19329         (sibcall_insn_operand): Likewise.
19330         (GOT32_symbol_operand): Likewise.
19332 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19334         PR middle-end/83837
19335         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19336         type rather than type addr's type points to.
19337         (expand_omp_atomic_mutex): Likewise.
19338         (expand_omp_atomic): Likewise.
19340 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19342         PR target/83839
19343         * config/i386/i386.c (output_indirect_thunk_function): Use
19344         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19345         for  __x86_return_thunk.
19347 2018-01-15  Richard Biener  <rguenther@suse.de>
19349         PR middle-end/83850
19350         * expmed.c (extract_bit_field_1): Fix typo.
19352 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19354         PR target/83687
19355         * config/arm/iterators.md (VF): New mode iterator.
19356         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19357         Remove integer-related logic from pattern.
19358         (neon_vabd<mode>_3): Likewise.
19360 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19362         PR middle-end/82694
19363         * common.opt (fstrict-overflow): No longer an alias.
19364         (fwrapv-pointer): New option.
19365         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19366         also for pointer types based on flag_wrapv_pointer.
19367         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19368         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19369         opts->x_flag_wrapv got set.
19370         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19371         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19372         POINTER_TYPE_OVERFLOW_UNDEFINED.
19373         * match.pd: Likewise in address comparison pattern.
19374         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19376 2018-01-15  Richard Biener  <rguenther@suse.de>
19378         PR lto/83804
19379         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19380         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
19381         Reset type names to their identifier if their TYPE_DECL doesn't
19382         have linkage (and thus is used for ODR and devirt).
19383         (save_debug_info_for_decl): Remove.
19384         (save_debug_info_for_type): Likewise.
19385         (add_tree_to_fld_list): Adjust.
19386         * tree-pretty-print.c (dump_generic_node): Make dumping of
19387         type names more robust.
19389 2018-01-15  Richard Biener  <rguenther@suse.de>
19391         * BASE-VER: Bump to 8.0.1.
19393 2018-01-14  Martin Sebor  <msebor@redhat.com>
19395         PR other/83508
19396         * builtins.c (check_access): Avoid warning when the no-warning bit
19397         is set.
19399 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
19401         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19402         * ira-color (allocno_hard_regs_compare): Likewise.
19404 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
19406         PR target/83013
19407         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19408         Use .pushsection/.popsection.
19410 2018-01-14  Martin Sebor  <msebor@redhat.com>
19412         PR c++/81327
19413         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19415 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
19417         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19418         entry from extra_headers.
19419         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19420         extra_headers, make the list bitwise identical to the i?86-*-* one.
19422 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19424         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19425         -mcmodel=large with -mindirect-branch=thunk,
19426         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19427         -mfunction-return=thunk-extern.
19428         * doc/invoke.texi: Document -mcmodel=large is incompatible with
19429         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19430         -mfunction-return=thunk and -mfunction-return=thunk-extern.
19432 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19434         * config/i386/i386.c (print_reg): Print the name of the full
19435         integer register without '%'.
19436         (ix86_print_operand): Handle 'V'.
19437         * doc/extend.texi: Document 'V' modifier.
19439 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19441         * config/i386/constraints.md (Bs): Disallow memory operand for
19442         -mindirect-branch-register.
19443         (Bw): Likewise.
19444         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19445         (GOT_memory_operand): Likewise.
19446         (call_insn_operand): Likewise.
19447         (sibcall_insn_operand): Likewise.
19448         (GOT32_symbol_operand): Likewise.
19449         * config/i386/i386.md (indirect_jump): Call convert_memory_address
19450         for -mindirect-branch-register.
19451         (tablejump): Likewise.
19452         (*sibcall_memory): Likewise.
19453         (*sibcall_value_memory): Likewise.
19454         Disallow peepholes of indirect call and jump via memory for
19455         -mindirect-branch-register.
19456         (*call_pop): Replace m with Bw.
19457         (*call_value_pop): Likewise.
19458         (*sibcall_pop_memory): Replace m with Bs.
19459         * config/i386/i386.opt (mindirect-branch-register): New option.
19460         * doc/invoke.texi: Document -mindirect-branch-register option.
19462 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19464         * config/i386/i386-protos.h (ix86_output_function_return): New.
19465         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19466         set function_return_type.
19467         (indirect_thunk_name): Add ret_p to indicate thunk for function
19468         return.
19469         (output_indirect_thunk_function): Pass false to
19470         indirect_thunk_name.
19471         (ix86_output_indirect_branch_via_reg): Likewise.
19472         (ix86_output_indirect_branch_via_push): Likewise.
19473         (output_indirect_thunk_function): Create alias for function
19474         return thunk if regno < 0.
19475         (ix86_output_function_return): New function.
19476         (ix86_handle_fndecl_attribute): Handle function_return.
19477         (ix86_attribute_table): Add function_return.
19478         * config/i386/i386.h (machine_function): Add
19479         function_return_type.
19480         * config/i386/i386.md (simple_return_internal): Use
19481         ix86_output_function_return.
19482         (simple_return_internal_long): Likewise.
19483         * config/i386/i386.opt (mfunction-return=): New option.
19484         (indirect_branch): Mention -mfunction-return=.
19485         * doc/extend.texi: Document function_return function attribute.
19486         * doc/invoke.texi: Document -mfunction-return= option.
19488 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19490         * config/i386/i386-opts.h (indirect_branch): New.
19491         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19492         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19493         with local indirect jump when converting indirect call and jump.
19494         (ix86_set_indirect_branch_type): New.
19495         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19496         (indirectlabelno): New.
19497         (indirect_thunk_needed): Likewise.
19498         (indirect_thunk_bnd_needed): Likewise.
19499         (indirect_thunks_used): Likewise.
19500         (indirect_thunks_bnd_used): Likewise.
19501         (INDIRECT_LABEL): Likewise.
19502         (indirect_thunk_name): Likewise.
19503         (output_indirect_thunk): Likewise.
19504         (output_indirect_thunk_function): Likewise.
19505         (ix86_output_indirect_branch_via_reg): Likewise.
19506         (ix86_output_indirect_branch_via_push): Likewise.
19507         (ix86_output_indirect_branch): Likewise.
19508         (ix86_output_indirect_jmp): Likewise.
19509         (ix86_code_end): Call output_indirect_thunk_function if needed.
19510         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19511         needed.
19512         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19513         (ix86_attribute_table): Add indirect_branch.
19514         * config/i386/i386.h (machine_function): Add indirect_branch_type
19515         and has_local_indirect_jump.
19516         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19517         to true.
19518         (tablejump): Likewise.
19519         (*indirect_jump): Use ix86_output_indirect_jmp.
19520         (*tablejump_1): Likewise.
19521         (simple_return_indirect_internal): Likewise.
19522         * config/i386/i386.opt (mindirect-branch=): New option.
19523         (indirect_branch): New.
19524         (keep): Likewise.
19525         (thunk): Likewise.
19526         (thunk-inline): Likewise.
19527         (thunk-extern): Likewise.
19528         * doc/extend.texi: Document indirect_branch function attribute.
19529         * doc/invoke.texi: Document -mindirect-branch= option.
19531 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19533         PR ipa/83051
19534         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19536 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19538         * ipa-inline.c (want_inline_small_function_p): Return false if
19539         inlining has already failed with CIF_FINAL_ERROR.
19540         (update_caller_keys): Call want_inline_small_function_p before
19541         can_inline_edge_p.
19542         (update_callee_keys): Likewise.
19544 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19546         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19547         New function.
19548         (rs6000_quadword_masked_address_p): Likewise.
19549         (quad_aligned_load_p): Likewise.
19550         (quad_aligned_store_p): Likewise.
19551         (const_load_sequence_p): Add comment to describe the outer-most loop.
19552         (mimic_memory_attributes_and_flags): New function.
19553         (rs6000_gen_stvx): Likewise.
19554         (replace_swapped_aligned_store): Likewise.
19555         (rs6000_gen_lvx): Likewise.
19556         (replace_swapped_aligned_load): Likewise.
19557         (replace_swapped_load_constant): Capitalize argument name in
19558         comment describing this function.
19559         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19560         and stores that access quad-word aligned addresses and replace
19561         with stvx or lvx instructions when appropriate.
19562         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19563         New function prototype.
19564         (rs6000_quadword_masked_address_p): Likewise.
19565         (rs6000_gen_lvx): Likewise.
19566         (rs6000_gen_stvx): Likewise.
19567         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19568         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19569         when memory address is aligned.
19570         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19571         this split to select lvx instruction when memory address is aligned.
19572         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19573         instruction when memory address is aligned.
19574         (*vsx_le_perm_load_v16qi): Likewise.
19575         (four unnamed splitters): Modify to select the stvx instruction
19576         when memory is aligned.
19578 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19580         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19581         which appears in the queue multiple times.
19583 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19584             Alan Hayward  <alan.hayward@arm.com>
19585             David Sherwood  <david.sherwood@arm.com>
19587         * tree-vectorizer.h (vec_lower_bound): New structure.
19588         (_loop_vec_info): Add check_nonzero and lower_bounds.
19589         (LOOP_VINFO_CHECK_NONZERO): New macro.
19590         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19591         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19592         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19593         fields.  Make seg_len the distance travelled, not including the
19594         access size.
19595         (dr_direction_indicator): Declare.
19596         (dr_zero_step_indicator): Likewise.
19597         (dr_known_forward_stride_p): Likewise.
19598         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19599         tree-ssanames.h.
19600         (runtime_alias_check_p): Allow runtime alias checks with
19601         variable strides.
19602         (operator ==): Compare access_size and align.
19603         (prune_runtime_alias_test_list): Rework for new distinction between
19604         the access_size and seg_len.
19605         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19606         segment lengths.
19607         (get_segment_min_max): New function.
19608         (create_intersect_range_checks): Use it.
19609         (dr_step_indicator): New function.
19610         (dr_direction_indicator): Likewise.
19611         (dr_zero_step_indicator): Likewise.
19612         (dr_known_forward_stride_p): Likewise.
19613         * tree-loop-distribution.c (data_ref_segment_size): Return
19614         DR_STEP * (niters - 1).
19615         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19616         constructor.
19617         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19618         (vect_preserves_scalar_order_p): New function, split out from...
19619         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19620         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19621         (vect_vfa_access_size): New function.
19622         (vect_vfa_align): Likewise.
19623         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19624         (dump_lower_bound): New function.
19625         (vect_check_lower_bound): Likewise.
19626         (vect_small_gap_p): Likewise.
19627         (vectorizable_with_step_bound_p): Likewise.
19628         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19629         depencies if the vectorization factor is 1.  Convert the checks
19630         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19631         a bunds check for variable steps if the minimum required step is
19632         relatively small. Update calls to the dr_with_seg_len
19633         constructor and to vect_compile_time_alias.
19634         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19635         function.
19636         (vect_loop_versioning): Call it.
19637         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19638         when retrying.
19639         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19641 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19642             Alan Hayward  <alan.hayward@arm.com>
19643             David Sherwood  <david.sherwood@arm.com>
19645         * doc/sourcebuild.texi (vect_scatter_store): Document.
19646         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19647         optabs.
19648         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19649         Document.
19650         * genopinit.c (main): Add supports_vec_scatter_store and
19651         supports_vec_scatter_store_cached to target_optabs.
19652         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19653         IFN_MASK_SCATTER_STORE.
19654         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19655         functions.
19656         * internal-fn.h (internal_store_fn_p): Declare.
19657         (internal_fn_stored_value_index): Likewise.
19658         * internal-fn.c (scatter_store_direct): New macro.
19659         (expand_scatter_store_optab_fn): New function.
19660         (direct_scatter_store_optab_supported_p): New macro.
19661         (internal_store_fn_p): New function.
19662         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19663         IFN_MASK_SCATTER_STORE.
19664         (internal_fn_mask_index): Likewise.
19665         (internal_fn_stored_value_index): New function.
19666         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19667         for scatter stores.
19668         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19669         * optabs-query.c (supports_vec_scatter_store_p): New function.
19670         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19671         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19672         true for scatter stores.
19673         (vect_gather_scatter_fn_p): Handle scatter stores too.
19674         (vect_check_gather_scatter): Consider using scatter stores if
19675         supports_vec_scatter_store_p.
19676         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19677         scatter stores too.
19678         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19679         internal_fn_stored_value_index.
19680         (check_load_store_masking): Handle scatter stores too.
19681         (vect_get_store_rhs): Make public.
19682         (vectorizable_call): Use internal_store_fn_p.
19683         (vectorizable_store): Handle scatter store internal functions.
19684         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19685         when deciding whether the end of the group has been reached.
19686         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19687         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19688         (mask_scatter_store<mode>): New insns.
19690 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19691             Alan Hayward  <alan.hayward@arm.com>
19692             David Sherwood  <david.sherwood@arm.com>
19694         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19695         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19696         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19697         function.
19698         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19699         Use vect_truncate_gather_scatter_offset if we can't treat the
19700         operation as a normal gather load or scatter store.
19701         (get_group_load_store_type): Take the gather_scatter_info
19702         as argument.  Try using a gather load or scatter store for
19703         single-element groups.
19704         (get_load_store_type): Update calls to get_group_load_store_type
19705         and vect_use_strided_gather_scatters_p.
19707 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19708             Alan Hayward  <alan.hayward@arm.com>
19709             David Sherwood  <david.sherwood@arm.com>
19711         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19712         optional tree argument.
19713         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19714         null target hooks.
19715         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19716         but continue to use the current value as a fallback.
19717         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19718         to compare the updates.
19719         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19720         (get_load_store_type): Use it when handling a strided access.
19721         (vect_get_strided_load_store_ops): New function.
19722         (vect_get_data_ptr_increment): Likewise.
19723         (vectorizable_load): Handle strided gather loads.  Always pass
19724         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19726 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19727             Alan Hayward  <alan.hayward@arm.com>
19728             David Sherwood  <david.sherwood@arm.com>
19730         * doc/md.texi (gather_load@var{m}): Document.
19731         (mask_gather_load@var{m}): Likewise.
19732         * genopinit.c (main): Add supports_vec_gather_load and
19733         supports_vec_gather_load_cached to target_optabs.
19734         * optabs-tree.c (init_tree_optimization_optabs): Use
19735         ggc_cleared_alloc to allocate target_optabs.
19736         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19737         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19738         functions.
19739         * internal-fn.h (internal_load_fn_p): Declare.
19740         (internal_gather_scatter_fn_p): Likewise.
19741         (internal_fn_mask_index): Likewise.
19742         (internal_gather_scatter_fn_supported_p): Likewise.
19743         * internal-fn.c (gather_load_direct): New macro.
19744         (expand_gather_load_optab_fn): New function.
19745         (direct_gather_load_optab_supported_p): New macro.
19746         (direct_internal_fn_optab): New function.
19747         (internal_load_fn_p): Likewise.
19748         (internal_gather_scatter_fn_p): Likewise.
19749         (internal_fn_mask_index): Likewise.
19750         (internal_gather_scatter_fn_supported_p): Likewise.
19751         * optabs-query.c (supports_at_least_one_mode_p): New function.
19752         (supports_vec_gather_load_p): Likewise.
19753         * optabs-query.h (supports_vec_gather_load_p): Declare.
19754         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19755         and memory_type field.
19756         (NUM_PATTERNS): Bump to 15.
19757         * tree-vect-data-refs.c: Include internal-fn.h.
19758         (vect_gather_scatter_fn_p): New function.
19759         (vect_describe_gather_scatter_call): Likewise.
19760         (vect_check_gather_scatter): Try using internal functions for
19761         gather loads.  Recognize existing calls to a gather load function.
19762         (vect_analyze_data_refs): Consider using gather loads if
19763         supports_vec_gather_load_p.
19764         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19765         (vect_get_gather_scatter_offset_type): Likewise.
19766         (vect_convert_mask_for_vectype): Likewise.
19767         (vect_add_conversion_to_patterm): Likewise.
19768         (vect_try_gather_scatter_pattern): Likewise.
19769         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19770         (vect_vect_recog_func_ptrs): Add it.
19771         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19772         internal_fn_mask_index and internal_gather_scatter_fn_p.
19773         (check_load_store_masking): Take the gather_scatter_info as an
19774         argument and handle gather loads.
19775         (vect_get_gather_scatter_ops): New function.
19776         (vectorizable_call): Check internal_load_fn_p.
19777         (vectorizable_load): Likewise.  Handle gather load internal
19778         functions.
19779         (vectorizable_store): Update call to check_load_store_masking.
19780         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19781         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19782         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19783         (aarch64_gather_scale_operand_d): New predicates.
19784         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19785         (mask_gather_load<mode>): New insns.
19787 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19788             Alan Hayward  <alan.hayward@arm.com>
19789             David Sherwood  <david.sherwood@arm.com>
19791         * optabs.def (fold_left_plus_optab): New optab.
19792         * doc/md.texi (fold_left_plus_@var{m}): Document.
19793         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19794         * internal-fn.c (fold_left_direct): Define.
19795         (expand_fold_left_optab_fn): Likewise.
19796         (direct_fold_left_optab_supported_p): Likewise.
19797         * fold-const-call.c (fold_const_fold_left): New function.
19798         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19799         * tree-parloops.c (valid_reduction_p): New function.
19800         (gather_scalar_reductions): Use it.
19801         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19802         (vect_finish_replace_stmt): Declare.
19803         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19804         (needs_fold_left_reduction_p): New function, split out from...
19805         (vect_is_simple_reduction): ...here.  Accept reductions that
19806         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19807         (vect_force_simple_reduction): Also store the reduction type in
19808         the assignment's STMT_VINFO_REDUC_TYPE.
19809         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19810         (merge_with_identity): New function.
19811         (vect_expand_fold_left): Likewise.
19812         (vectorize_fold_left_reduction): Likewise.
19813         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19814         scalar phi in place for it.  Check for target support and reject
19815         cases that would reassociate the operation.  Defer the transform
19816         phase to vectorize_fold_left_reduction.
19817         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19818         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19819         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19821 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19823         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19824         call to ifc_temp_var.
19826 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19827             Alan Hayward  <alan.hayward@arm.com>
19828             David Sherwood  <david.sherwood@arm.com>
19830         * target.def (legitimize_address_displacement): Take the original
19831         offset as a poly_int.
19832         * targhooks.h (default_legitimize_address_displacement): Update
19833         accordingly.
19834         * targhooks.c (default_legitimize_address_displacement): Likewise.
19835         * doc/tm.texi: Regenerate.
19836         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19837         as an argument, moving assert of ad->disp == ad->disp_term to...
19838         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19839         Try calling targetm.legitimize_address_displacement before expanding
19840         the address rather than afterwards, and adjust for the new interface.
19841         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19842         Match the new hook interface.  Handle SVE addresses.
19843         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19844         new hook interface.
19846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19848         * Makefile.in (OBJS): Add early-remat.o.
19849         * target.def (select_early_remat_modes): New hook.
19850         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19851         * doc/tm.texi: Regenerate.
19852         * targhooks.h (default_select_early_remat_modes): Declare.
19853         * targhooks.c (default_select_early_remat_modes): New function.
19854         * timevar.def (TV_EARLY_REMAT): New timevar.
19855         * passes.def (pass_early_remat): New pass.
19856         * tree-pass.h (make_pass_early_remat): Declare.
19857         * early-remat.c: New file.
19858         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19859         function.
19860         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19862 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19863             Alan Hayward  <alan.hayward@arm.com>
19864             David Sherwood  <david.sherwood@arm.com>
19866         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19867         vfm1 with a bound_epilog parameter.
19868         (vect_do_peeling): Update calls accordingly, and move the prologue
19869         call earlier in the function.  Treat the base bound_epilog as 0 for
19870         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19871         this base when peeling for gaps.
19872         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19873         with fully-masked loops.
19874         (vect_estimate_min_profitable_iters): Handle the single peeled
19875         iteration in that case.
19877 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19878             Alan Hayward  <alan.hayward@arm.com>
19879             David Sherwood  <david.sherwood@arm.com>
19881         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19882         single-element interleaving even if the size is not a power of 2.
19883         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19884         accesses for single-element interleaving if the group size is
19885         not a power of 2.
19887 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19888             Alan Hayward  <alan.hayward@arm.com>
19889             David Sherwood  <david.sherwood@arm.com>
19891         * doc/md.texi (fold_extract_last_@var{m}): Document.
19892         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19893         * optabs.def (fold_extract_last_optab): New optab.
19894         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19895         * internal-fn.c (fold_extract_direct): New macro.
19896         (expand_fold_extract_optab_fn): Likewise.
19897         (direct_fold_extract_optab_supported_p): Likewise.
19898         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19899         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19900         EXTRACT_LAST_REDUCTION.
19901         (get_initial_def_for_reduction): Do not create an initial vector
19902         for EXTRACT_LAST_REDUCTION reductions.
19903         (vectorizable_reduction): Leave the scalar phi in place for
19904         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19905         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19906         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19907         transform phase to vectorizable_condition.
19908         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19909         split out from...
19910         (vect_finish_stmt_generation): ...here.
19911         (vect_finish_replace_stmt): New function.
19912         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19913         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19914         pattern.
19915         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19917 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19918             Alan Hayward  <alan.hayward@arm.com>
19919             David Sherwood  <david.sherwood@arm.com>
19921         * doc/md.texi (extract_last_@var{m}): Document.
19922         * optabs.def (extract_last_optab): New optab.
19923         * internal-fn.def (EXTRACT_LAST): New internal function.
19924         * internal-fn.c (cond_unary_direct): New macro.
19925         (expand_cond_unary_optab_fn): Likewise.
19926         (direct_cond_unary_optab_supported_p): Likewise.
19927         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19928         loops using EXTRACT_LAST.
19929         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19930         (extract_last_<mode>): ...this optab.
19931         (vec_extract<mode><Vel>): Update accordingly.
19933 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19934             Alan Hayward  <alan.hayward@arm.com>
19935             David Sherwood  <david.sherwood@arm.com>
19937         * target.def (empty_mask_is_expensive): New hook.
19938         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19939         * doc/tm.texi: Regenerate.
19940         * targhooks.h (default_empty_mask_is_expensive): Declare.
19941         * targhooks.c (default_empty_mask_is_expensive): New function.
19942         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19943         if the target says that empty masks are expensive.
19944         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19945         New function.
19946         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19948 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19949             Alan Hayward  <alan.hayward@arm.com>
19950             David Sherwood  <david.sherwood@arm.com>
19952         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19953         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19954         (vect_use_loop_mask_for_alignment_p): New function.
19955         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19956         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19957         niters_skip argument.  Make sure that the first niters_skip elements
19958         of the first iteration are inactive.
19959         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19960         Update call to vect_set_loop_masks_directly.
19961         (get_misalign_in_elems): New function, split out from...
19962         (vect_gen_prolog_loop_niters): ...here.
19963         (vect_update_init_of_dr): Take a code argument that specifies whether
19964         the adjustment should be added or subtracted.
19965         (vect_update_init_of_drs): Likewise.
19966         (vect_prepare_for_masked_peels): New function.
19967         (vect_do_peeling): Skip prologue peeling if we're using a mask
19968         instead.  Update call to vect_update_inits_of_drs.
19969         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19970         mask_skip_niters.
19971         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19972         alignment.  Do not include the number of peeled iterations in
19973         the minimum threshold in that case.
19974         (vectorizable_induction): Adjust the start value down by
19975         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19976         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19977         Take the number of skipped iterations into account when calculating
19978         the loop bounds.
19979         * tree-vect-stmts.c (vect_gen_while_not): New function.
19981 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19982             Alan Hayward  <alan.hayward@arm.com>
19983             David Sherwood  <david.sherwood@arm.com>
19985         * doc/sourcebuild.texi (vect_fully_masked): Document.
19986         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19987         default value to 0.
19988         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19989         split out from...
19990         (vect_analyze_loop_2): ...here. Don't check the vectorization
19991         factor against the number of loop iterations if the loop is
19992         fully-masked.
19994 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19995             Alan Hayward  <alan.hayward@arm.com>
19996             David Sherwood  <david.sherwood@arm.com>
19998         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19999         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20000         (dump_groups): Update accordingly.
20001         (iv_use::mem_type): New member variable.
20002         (address_p): New function.
20003         (record_use): Add a mem_type argument and initialize the new
20004         mem_type field.
20005         (record_group_use): Add a mem_type argument.  Use address_p.
20006         Remove obsolete null checks of base_object.  Update call to record_use.
20007         (find_interesting_uses_op): Update call to record_group_use.
20008         (find_interesting_uses_cond): Likewise.
20009         (find_interesting_uses_address): Likewise.
20010         (get_mem_type_for_internal_fn): New function.
20011         (find_address_like_use): Likewise.
20012         (find_interesting_uses_stmt): Try find_address_like_use before
20013         calling find_interesting_uses_op.
20014         (addr_offset_valid_p): Use the iv mem_type field as the type
20015         of the addressed memory.
20016         (add_autoinc_candidates): Likewise.
20017         (get_address_cost): Likewise.
20018         (split_small_address_groups_p): Use address_p.
20019         (split_address_groups): Likewise.
20020         (add_iv_candidate_for_use): Likewise.
20021         (autoinc_possible_for_pair): Likewise.
20022         (rewrite_groups): Likewise.
20023         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20024         (determine_group_iv_cost): Update after split of USE_ADDRESS.
20025         (get_alias_ptr_type_for_ptr_address): New function.
20026         (rewrite_use_address): Rewrite address uses in calls that were
20027         identified by find_address_like_use.
20029 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20030             Alan Hayward  <alan.hayward@arm.com>
20031             David Sherwood  <david.sherwood@arm.com>
20033         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20034         TARGET_MEM_REFs.
20035         * gimple-expr.h (is_gimple_addressable: Likewise.
20036         * gimple-expr.c (is_gimple_address): Likewise.
20037         * internal-fn.c (expand_call_mem_ref): New function.
20038         (expand_mask_load_optab_fn): Use it.
20039         (expand_mask_store_optab_fn): Likewise.
20041 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20042             Alan Hayward  <alan.hayward@arm.com>
20043             David Sherwood  <david.sherwood@arm.com>
20045         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20046         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20047         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20048         (cond_umax@var{mode}): Document.
20049         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20050         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20051         (cond_umin_optab, cond_umax_optab): New optabs.
20052         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20053         (COND_IOR, COND_XOR): New internal functions.
20054         * internal-fn.h (get_conditional_internal_fn): Declare.
20055         * internal-fn.c (cond_binary_direct): New macro.
20056         (expand_cond_binary_optab_fn): Likewise.
20057         (direct_cond_binary_optab_supported_p): Likewise.
20058         (get_conditional_internal_fn): New function.
20059         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20060         Cope with reduction statements that are vectorized as calls rather
20061         than assignments.
20062         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20063         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20064         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20065         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20066         (UNSPEC_COND_EOR): New unspecs.
20067         (optab): Add mappings for them.
20068         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20069         (sve_int_op, sve_fp_op): New int attributes.
20071 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20072             Alan Hayward  <alan.hayward@arm.com>
20073             David Sherwood  <david.sherwood@arm.com>
20075         * optabs.def (while_ult_optab): New optab.
20076         * doc/md.texi (while_ult@var{m}@var{n}): Document.
20077         * internal-fn.def (WHILE_ULT): New internal function.
20078         * internal-fn.h (direct_internal_fn_supported_p): New override
20079         that takes two types as argument.
20080         * internal-fn.c (while_direct): New macro.
20081         (expand_while_optab_fn): New function.
20082         (convert_optab_supported_p): Likewise.
20083         (direct_while_optab_supported_p): New macro.
20084         * wide-int.h (wi::udiv_ceil): New function.
20085         * tree-vectorizer.h (rgroup_masks): New structure.
20086         (vec_loop_masks): New typedef.
20087         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20088         and fully_masked_p.
20089         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20090         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20091         (vect_max_vf): New function.
20092         (slpeel_make_loop_iterate_ntimes): Delete.
20093         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20094         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20095         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20096         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20097         internal-fn.h, stor-layout.h and optabs-query.h.
20098         (vect_set_loop_mask): New function.
20099         (add_preheader_seq): Likewise.
20100         (add_header_seq): Likewise.
20101         (interleave_supported_p): Likewise.
20102         (vect_maybe_permute_loop_masks): Likewise.
20103         (vect_set_loop_masks_directly): Likewise.
20104         (vect_set_loop_condition_masked): Likewise.
20105         (vect_set_loop_condition_unmasked): New function, split out from
20106         slpeel_make_loop_iterate_ntimes.
20107         (slpeel_make_loop_iterate_ntimes): Rename to..
20108         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
20109         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20110         (vect_do_peeling): Update call accordingly.
20111         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20112         loops.
20113         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20114         mask_compare_type, can_fully_mask_p and fully_masked_p.
20115         (release_vec_loop_masks): New function.
20116         (_loop_vec_info): Use it to free the loop masks.
20117         (can_produce_all_loop_masks_p): New function.
20118         (vect_get_max_nscalars_per_iter): Likewise.
20119         (vect_verify_full_masking): Likewise.
20120         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20121         retries, and free the mask rgroups before retrying.  Check loop-wide
20122         reasons for disallowing fully-masked loops.  Make the final decision
20123         about whether use a fully-masked loop or not.
20124         (vect_estimate_min_profitable_iters): Do not assume that peeling
20125         for the number of iterations will be needed for fully-masked loops.
20126         (vectorizable_reduction): Disable fully-masked loops.
20127         (vectorizable_live_operation): Likewise.
20128         (vect_halve_mask_nunits): New function.
20129         (vect_double_mask_nunits): Likewise.
20130         (vect_record_loop_mask): Likewise.
20131         (vect_get_loop_mask): Likewise.
20132         (vect_transform_loop): Handle the case in which the final loop
20133         iteration might handle a partial vector.  Call vect_set_loop_condition
20134         instead of slpeel_make_loop_iterate_ntimes.
20135         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20136         (check_load_store_masking): New function.
20137         (prepare_load_store_mask): Likewise.
20138         (vectorizable_store): Handle fully-masked loops.
20139         (vectorizable_load): Likewise.
20140         (supportable_widening_operation): Use vect_halve_mask_nunits for
20141         booleans.
20142         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20143         (vect_gen_while): New function.
20144         * config/aarch64/aarch64.md (umax<mode>3): New expander.
20145         (aarch64_uqdec<mode>): New insn.
20147 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20148             Alan Hayward  <alan.hayward@arm.com>
20149             David Sherwood  <david.sherwood@arm.com>
20151         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20152         (reduc_xor_scal_optab): New optabs.
20153         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20154         (reduc_xor_scal_@var{m}): Document.
20155         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20156         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20157         internal functions.
20158         * fold-const-call.c (fold_const_call): Handle them.
20159         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20160         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20161         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20162         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20163         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20164         (UNSPEC_XORV): New unspecs.
20165         (optab): Add entries for them.
20166         (BITWISEV): New int iterator.
20167         (bit_reduc_op): New int attributes.
20169 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20170             Alan Hayward  <alan.hayward@arm.com>
20171             David Sherwood  <david.sherwood@arm.com>
20173         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20174         * internal-fn.def (VEC_SHL_INSERT): New internal function.
20175         * optabs.def (vec_shl_insert_optab): New optab.
20176         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20177         (duplicate_and_interleave): Likewise.
20178         * tree-vect-loop.c: Include internal-fn.h.
20179         (neutral_op_for_slp_reduction): New function, split out from
20180         get_initial_defs_for_reduction.
20181         (get_initial_def_for_reduction): Handle option 2 for variable-length
20182         vectors by loading the neutral value into a vector and then shifting
20183         the initial value into element 0.
20184         (get_initial_defs_for_reduction): Replace the code argument with
20185         the neutral value calculated by neutral_op_for_slp_reduction.
20186         Use gimple_build_vector for constant-length vectors.
20187         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20188         but the first group_size elements have a neutral value.
20189         Use duplicate_and_interleave otherwise.
20190         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20191         Update call to get_initial_defs_for_reduction.  Handle SLP
20192         reductions for variable-length vectors by creating one vector
20193         result for each scalar result, with the elements associated
20194         with other scalar results stubbed out with the neutral value.
20195         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20196         Require IFN_VEC_SHL_INSERT for double reductions on
20197         variable-length vectors, or SLP reductions that have
20198         a neutral value.  Require can_duplicate_and_interleave_p
20199         support for variable-length unchained SLP reductions if there
20200         is no neutral value, such as for MIN/MAX reductions.  Also require
20201         the number of vector elements to be a multiple of the number of
20202         SLP statements when doing variable-length unchained SLP reductions.
20203         Update call to vect_create_epilog_for_reduction.
20204         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20205         and remove initial values.
20206         (duplicate_and_interleave): Make public.
20207         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20208         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20210 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20211             Alan Hayward  <alan.hayward@arm.com>
20212             David Sherwood  <david.sherwood@arm.com>
20214         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20215         (can_duplicate_and_interleave_p): New function.
20216         (vect_get_and_check_slp_defs): Take the vector of statements
20217         rather than just the current one.  Remove excess parentheses.
20218         Restriction rejectinon of vect_constant_def and vect_external_def
20219         for variable-length vectors to boolean types, or types for which
20220         can_duplicate_and_interleave_p is false.
20221         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20222         (duplicate_and_interleave): New function.
20223         (vect_get_constant_vectors): Use gimple_build_vector for
20224         constant-length vectors and suitable variable-length constant
20225         vectors.  Use duplicate_and_interleave for other variable-length
20226         vectors.  Don't defer the update when inserting new statements.
20228 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20229             Alan Hayward  <alan.hayward@arm.com>
20230             David Sherwood  <david.sherwood@arm.com>
20232         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20233         min_profitable_iters doesn't go negative.
20235 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20236             Alan Hayward  <alan.hayward@arm.com>
20237             David Sherwood  <david.sherwood@arm.com>
20239         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20240         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20241         * optabs.def (vec_mask_load_lanes_optab): New optab.
20242         (vec_mask_store_lanes_optab): Likewise.
20243         * internal-fn.def (MASK_LOAD_LANES): New internal function.
20244         (MASK_STORE_LANES): Likewise.
20245         * internal-fn.c (mask_load_lanes_direct): New macro.
20246         (mask_store_lanes_direct): Likewise.
20247         (expand_mask_load_optab_fn): Handle masked operations.
20248         (expand_mask_load_lanes_optab_fn): New macro.
20249         (expand_mask_store_optab_fn): Handle masked operations.
20250         (expand_mask_store_lanes_optab_fn): New macro.
20251         (direct_mask_load_lanes_optab_supported_p): Likewise.
20252         (direct_mask_store_lanes_optab_supported_p): Likewise.
20253         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20254         parameter.
20255         (vect_load_lanes_supported): Likewise.
20256         * tree-vect-data-refs.c (strip_conversion): New function.
20257         (can_group_stmts_p): Likewise.
20258         (vect_analyze_data_ref_accesses): Use it instead of checking
20259         for a pair of assignments.
20260         (vect_store_lanes_supported): Take a masked_p parameter.
20261         (vect_load_lanes_supported): Likewise.
20262         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20263         vect_store_lanes_supported and vect_load_lanes_supported.
20264         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20265         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20266         parameter.  Don't allow gaps for masked accesses.
20267         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
20268         and vect_load_lanes_supported.
20269         (get_load_store_type): Take a masked_p parameter and update
20270         call to get_group_load_store_type.
20271         (vectorizable_store): Update call to get_load_store_type.
20272         Handle IFN_MASK_STORE_LANES.
20273         (vectorizable_load): Update call to get_load_store_type.
20274         Handle IFN_MASK_LOAD_LANES.
20276 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20277             Alan Hayward  <alan.hayward@arm.com>
20278             David Sherwood  <david.sherwood@arm.com>
20280         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20281         modes for SVE.
20282         * config/aarch64/aarch64-protos.h
20283         (aarch64_sve_struct_memory_operand_p): Declare.
20284         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20285         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20286         (VPRED, vpred): Handle SVE structure modes.
20287         * config/aarch64/constraints.md (Utx): New constraint.
20288         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20289         (aarch64_sve_struct_nonimmediate_operand): New predicates.
20290         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20291         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20292         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20293         structure modes.  Split into pieces after RA.
20294         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20295         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20296         New patterns.
20297         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20298         SVE structure modes.
20299         (aarch64_classify_address): Likewise.
20300         (sizetochar): Move earlier in file.
20301         (aarch64_print_operand): Handle SVE register lists.
20302         (aarch64_array_mode): New function.
20303         (aarch64_sve_struct_memory_operand_p): Likewise.
20304         (TARGET_ARRAY_MODE): Redefine.
20306 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20307             Alan Hayward  <alan.hayward@arm.com>
20308             David Sherwood  <david.sherwood@arm.com>
20310         * target.def (array_mode): New target hook.
20311         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20312         * doc/tm.texi: Regenerate.
20313         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20314         * hooks.c (hook_optmode_mode_uhwi_none): New function.
20315         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20316         targetm.array_mode.
20317         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
20318         type sizes.
20320 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20321             Alan Hayward  <alan.hayward@arm.com>
20322             David Sherwood  <david.sherwood@arm.com>
20324         * fold-const.c (fold_binary_loc): Check the argument types
20325         rather than the result type when testing for a vector operation.
20327 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20329         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20330         * doc/tm.texi: Regenerate.
20332 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20333             Alan Hayward  <alan.hayward@arm.com>
20334             David Sherwood  <david.sherwood@arm.com>
20336         * doc/invoke.texi (-msve-vector-bits=): Document new option.
20337         (sve): Document new AArch64 extension.
20338         * doc/md.texi (w): Extend the description of the AArch64
20339         constraint to include SVE vectors.
20340         (Upl, Upa): Document new AArch64 predicate constraints.
20341         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20342         enum.
20343         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20344         (msve-vector-bits=): New option.
20345         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20346         SVE when these are disabled.
20347         (sve): New extension.
20348         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20349         modes.  Adjust their number of units based on aarch64_sve_vg.
20350         (MAX_BITSIZE_MODE_ANY_MODE): Define.
20351         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20352         aarch64_addr_query_type.
20353         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20354         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20355         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20356         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20357         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20358         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20359         (aarch64_simd_imm_zero_p): Delete.
20360         (aarch64_check_zero_based_sve_index_immediate): Declare.
20361         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20362         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20363         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20364         (aarch64_sve_float_mul_immediate_p): Likewise.
20365         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20366         rather than an rtx.
20367         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20368         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20369         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20370         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20371         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20372         (aarch64_regmode_natural_size): Likewise.
20373         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20374         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20375         left one place.
20376         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20377         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20378         for VG and the SVE predicate registers.
20379         (V_ALIASES): Add a "z"-prefixed alias.
20380         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20381         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20382         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20383         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20384         (REG_CLASS_NAMES): Add entries for them.
20385         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
20386         and the predicate registers.
20387         (aarch64_sve_vg): Declare.
20388         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20389         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20390         (REGMODE_NATURAL_SIZE): Define.
20391         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20392         SVE macros.
20393         * config/aarch64/aarch64.c: Include cfgrtl.h.
20394         (simd_immediate_info): Add a constructor for series vectors,
20395         and an associated step field.
20396         (aarch64_sve_vg): New variable.
20397         (aarch64_dbx_register_number): Handle VG and the predicate registers.
20398         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20399         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20400         (VEC_ANY_DATA, VEC_STRUCT): New constants.
20401         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20402         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20403         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20404         (aarch64_get_mask_mode): New functions.
20405         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20406         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20407         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
20408         predicate modes and predicate registers.  Explicitly restrict
20409         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
20410         to store a vector mode if it is recognized by
20411         aarch64_classify_vector_mode.
20412         (aarch64_regmode_natural_size): New function.
20413         (aarch64_hard_regno_caller_save_mode): Return the original mode
20414         for predicates.
20415         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20416         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20417         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20418         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20419         functions.
20420         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
20421         does not overlap dest if the function is frame-related.  Handle
20422         SVE constants.
20423         (aarch64_split_add_offset): New function.
20424         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20425         them aarch64_add_offset.
20426         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20427         and update call to aarch64_sub_sp.
20428         (aarch64_add_cfa_expression): New function.
20429         (aarch64_expand_prologue): Pass extra temporary registers to the
20430         functions above.  Handle the case in which we need to emit new
20431         DW_CFA_expressions for registers that were originally saved
20432         relative to the stack pointer, but now have to be expressed
20433         relative to the frame pointer.
20434         (aarch64_output_mi_thunk): Pass extra temporary registers to the
20435         functions above.
20436         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
20437         IP0 and IP1 values for SVE frames.
20438         (aarch64_expand_vec_series): New function.
20439         (aarch64_expand_sve_widened_duplicate): Likewise.
20440         (aarch64_expand_sve_const_vector): Likewise.
20441         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20442         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
20443         into the register, rather than emitting a SET directly.
20444         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20445         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20446         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20447         (offset_9bit_signed_scaled_p): New functions.
20448         (aarch64_replicate_bitmask_imm): New function.
20449         (aarch64_bitmask_imm): Use it.
20450         (aarch64_cannot_force_const_mem): Reject expressions involving
20451         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
20452         (aarch64_classify_index): Handle SVE indices, by requiring
20453         a plain register index with a scale that matches the element size.
20454         (aarch64_classify_address): Handle SVE addresses.  Assert that
20455         the mode of the address is VOIDmode or an integer mode.
20456         Update call to aarch64_classify_symbol.
20457         (aarch64_classify_symbolic_expression): Update call to
20458         aarch64_classify_symbol.
20459         (aarch64_const_vec_all_in_range_p): New function.
20460         (aarch64_print_vector_float_operand): Likewise.
20461         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20462         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20463         and the FP immediates 1.0 and 0.5.
20464         (aarch64_print_address_internal): Handle SVE addresses.
20465         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20466         (aarch64_regno_regclass): Handle predicate registers.
20467         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20468         data modes.
20469         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20470         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20471         (aarch64_convert_sve_vector_bits): New function.
20472         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20473         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20474         rather than an rtx.
20475         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20476         Handle SVE vector and predicate modes.  Accept VL-based constants
20477         that need only one temporary register, and VL offsets that require
20478         no temporary registers.
20479         (aarch64_conditional_register_usage): Mark the predicate registers
20480         as fixed if SVE isn't available.
20481         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20482         Return true for SVE vector and predicate modes.
20483         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20484         rather than an unsigned int.  Handle SVE modes.
20485         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
20486         SVE modes.
20487         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20488         if SVE is enabled.
20489         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20490         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20491         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20492         (aarch64_sve_float_mul_immediate_p): New functions.
20493         (aarch64_sve_valid_immediate): New function.
20494         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20495         Explicitly reject structure modes.  Check for INDEX constants.
20496         Handle PTRUE and PFALSE constants.
20497         (aarch64_check_zero_based_sve_index_immediate): New function.
20498         (aarch64_simd_imm_zero_p): Delete.
20499         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20500         vector modes.  Accept constants in the range of CNT[BHWD].
20501         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20502         ask for an Advanced SIMD mode.
20503         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20504         (aarch64_simd_vector_alignment): Handle SVE predicates.
20505         (aarch64_vectorize_preferred_vector_alignment): New function.
20506         (aarch64_simd_vector_alignment_reachable): Use it instead of
20507         the vector size.
20508         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20509         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20510         functions.
20511         (MAX_VECT_LEN): Delete.
20512         (expand_vec_perm_d): Add a vec_flags field.
20513         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20514         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20515         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20516         for SVE modes.
20517         (aarch64_evpc_rev): Rename to...
20518         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20519         (aarch64_evpc_rev_global): New function.
20520         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20521         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20522         MAX_VECT_LEN.
20523         (aarch64_evpc_sve_tbl): New function.
20524         (aarch64_expand_vec_perm_const_1): Update after rename of
20525         aarch64_evpc_rev.  Handle SVE permutes too, trying
20526         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20527         than aarch64_evpc_tbl.
20528         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20529         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20530         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20531         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20532         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20533         (aarch64_expand_sve_vcond): New functions.
20534         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20535         of aarch64_vector_mode_p.
20536         (aarch64_dwarf_poly_indeterminate_value): New function.
20537         (aarch64_compute_pressure_classes): Likewise.
20538         (aarch64_can_change_mode_class): Likewise.
20539         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20540         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20541         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20542         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20543         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20544         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20545         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20546         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20547         constraints.
20548         (Dn, Dl, Dr): Accept const as well as const_vector.
20549         (Dz): Likewise.  Compare against CONST0_RTX.
20550         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20551         of "vector" where appropriate.
20552         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20553         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20554         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20555         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20556         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20557         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20558         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20559         (v_int_equiv): Extend to SVE modes.
20560         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20561         mode attributes.
20562         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20563         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20564         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20565         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20566         (SVE_COND_FP_CMP): New int iterators.
20567         (perm_hilo): Handle the new unpack unspecs.
20568         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20569         attributes.
20570         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20571         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20572         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20573         (aarch64_equality_operator, aarch64_constant_vector_operand)
20574         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20575         (aarch64_sve_nonimmediate_operand): Likewise.
20576         (aarch64_sve_general_operand): Likewise.
20577         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20578         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20579         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20580         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20581         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20582         (aarch64_sve_float_arith_immediate): Likewise.
20583         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20584         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20585         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20586         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20587         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20588         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20589         (aarch64_sve_float_arith_operand): Likewise.
20590         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20591         (aarch64_sve_float_mul_operand): Likewise.
20592         (aarch64_sve_vec_perm_operand): Likewise.
20593         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20594         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20595         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20596         as well as const_vector.
20597         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20598         in file.  Use CONST0_RTX and CONSTM1_RTX.
20599         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20600         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20601         Use aarch64_simd_imm_zero.
20602         * config/aarch64/aarch64-sve.md: New file.
20603         * config/aarch64/aarch64.md: Include it.
20604         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20605         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20606         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20607         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20608         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20609         (sve): New attribute.
20610         (enabled): Disable instructions with the sve attribute unless
20611         TARGET_SVE.
20612         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20613         aarch64_expand_mov_immediate.
20614         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20615         CNT[BHSD] immediates.
20616         (movti): Split CONST_POLY_INT moves into two halves.
20617         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20618         Split additions that need a temporary here if the destination
20619         is the stack pointer.
20620         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20621         (*add<mode>3_poly_1): New instruction.
20622         (set_clobber_cc): New expander.
20624 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20626         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20627         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20628         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20629         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20630         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20631         Change innermode from fixed_mode_size to machine_mode.
20632         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20633         subreg of a variable-length CONST_VECTOR.
20635 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20636             Alan Hayward  <alan.hayward@arm.com>
20637             David Sherwood  <david.sherwood@arm.com>
20639         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20640         (add_offset_to_base): New function, split out from...
20641         (create_mem_ref): ...here.  When handling a scale other than 1,
20642         check first whether the address is valid without the offset.
20643         Add it into the base if so, leaving the index and scale as-is.
20645 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20647         PR c++/83778
20648         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20649         fold_for_warn before checking if arg2 is INTEGER_CST.
20651 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20653         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20654         (store_multiple_operation): Delete.
20655         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20656         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20657         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20658         guarded by TARGET_STRING.
20659         (rs6000_output_load_multiple): Delete.
20660         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20661         OPTION_MASK_STRING / TARGET_STRING handling.
20662         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20663         (const rs6000_opt_masks) <"string">: Change mask to 0.
20664         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20665         (MASK_STRING): Delete.
20666         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20667         parts.  Simplify.
20668         (load_multiple): Delete.
20669         (*ldmsi8): Delete.
20670         (*ldmsi7): Delete.
20671         (*ldmsi6): Delete.
20672         (*ldmsi5): Delete.
20673         (*ldmsi4): Delete.
20674         (*ldmsi3): Delete.
20675         (store_multiple): Delete.
20676         (*stmsi8): Delete.
20677         (*stmsi7): Delete.
20678         (*stmsi6): Delete.
20679         (*stmsi5): Delete.
20680         (*stmsi4): Delete.
20681         (*stmsi3): Delete.
20682         (movmemsi_8reg): Delete.
20683         (corresponding unnamed define_insn): Delete.
20684         (movmemsi_6reg): Delete.
20685         (corresponding unnamed define_insn): Delete.
20686         (movmemsi_4reg): Delete.
20687         (corresponding unnamed define_insn): Delete.
20688         (movmemsi_2reg): Delete.
20689         (corresponding unnamed define_insn): Delete.
20690         (movmemsi_1reg): Delete.
20691         (corresponding unnamed define_insn): Delete.
20692         * config/rs6000/rs6000.opt (mno-string): New.
20693         (mstring): Replace by deprecation warning stub.
20694         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20696 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20698         * regrename.c (regrename_do_replace): If replacing the same
20699         reg multiple times, try to reuse last created gen_raw_REG.
20701         PR debug/81155
20702         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20703         main to workaround a bug in GDB.
20705 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20707         PR target/83737
20708         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20710 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20712         PR rtl-optimization/80481
20713         * ira-color.c (get_cap_member): New function.
20714         (allocnos_conflict_by_live_ranges_p): Use it.
20715         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20716         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20718 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20720         PR target/83628
20721         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20722         (*saddl_se_1): Ditto.
20723         (*ssubsi_1): Ditto.
20724         (*ssubl_se_1): Ditto.
20726 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20728         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20729         rather than wi::to_widest for DR_INITs.
20730         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20731         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20732         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20733         INTEGER_CSTs.
20734         (vect_analyze_group_access_1): Note that here.
20736 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20738         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20739         polynomial type sizes.
20741 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20743         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20744         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20745         (gimple_add_tmp_var): Likewise.
20747 2018-01-12  Martin Liska  <mliska@suse.cz>
20749         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20750         (gimple_alloc_sizes): Likewise.
20751         (dump_gimple_statistics): Use PRIu64 in printf format.
20752         * gimple.h: Change uint64_t to int.
20754 2018-01-12  Martin Liska  <mliska@suse.cz>
20756         * tree-core.h: Use uint64_t instead of int.
20757         * tree.c (tree_node_counts): Likewise.
20758         (tree_node_sizes): Likewise.
20759         (dump_tree_statistics): Use PRIu64 in printf format.
20761 2018-01-12  Martin Liska  <mliska@suse.cz>
20763         * Makefile.in: As qsort_chk is implemented in vec.c, add
20764         vec.o to linkage of gencfn-macros.
20765         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20766         passing the info to record_node_allocation_statistics.
20767         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20768         and pass the info.
20769         * ggc-common.c (struct ggc_usage): Add operator== and use
20770         it in operator< and compare function.
20771         * mem-stats.h (struct mem_usage): Likewise.
20772         * vec.c (struct vec_usage): Remove operator< and compare
20773         function. Can be simply inherited.
20775 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20777         PR target/81616
20778         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20779         * tree-ssa-math-opts.c: Include domwalk.h.
20780         (convert_mult_to_fma_1): New function.
20781         (fma_transformation_info): New type.
20782         (fma_deferring_state): Likewise.
20783         (cancel_fma_deferring): New function.
20784         (result_of_phi): Likewise.
20785         (last_fma_candidate_feeds_initial_phi): Likewise.
20786         (convert_mult_to_fma): Added deferring logic, split actual
20787         transformation to convert_mult_to_fma_1.
20788         (math_opts_dom_walker): New type.
20789         (math_opts_dom_walker::after_dom_children): New method, body moved
20790         here from pass_optimize_widening_mul::execute, added deferring logic
20791         bits.
20792         (pass_optimize_widening_mul::execute): Moved most of code to
20793         math_opts_dom_walker::after_dom_children.
20794         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20795         * config/i386/i386.c (ix86_option_override_internal): Added
20796         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20798 2018-01-12  Richard Biener  <rguenther@suse.de>
20800         PR debug/83157
20801         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20802         inline instance vars.
20804 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20806         PR target/81819
20807         * config/rx/rx.c (rx_is_restricted_memory_address):
20808         Handle SUBREG case.
20810 2018-01-12  Richard Biener  <rguenther@suse.de>
20812         PR tree-optimization/80846
20813         * target.def (split_reduction): New target hook.
20814         * targhooks.c (default_split_reduction): New function.
20815         * targhooks.h (default_split_reduction): Declare.
20816         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20817         target requests first reduce vectors by combining low and high
20818         parts.
20819         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20820         (get_vectype_for_scalar_type_and_size): Export.
20821         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20822         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20823         * doc/tm.texi: Regenerate.
20824         * config/i386/i386.c (ix86_split_reduction): Implement
20825         TARGET_VECTORIZE_SPLIT_REDUCTION.
20827 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20829         PR target/83368
20830         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20831         in PIC mode except for TARGET_VXWORKS_RTP.
20832         * config/sparc/sparc.c: Include cfgrtl.h.
20833         (TARGET_INIT_PIC_REG): Define.
20834         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20835         (sparc_pic_register_p): New predicate.
20836         (sparc_legitimate_address_p): Use it.
20837         (sparc_legitimize_pic_address): Likewise.
20838         (sparc_delegitimize_address): Likewise.
20839         (sparc_mode_dependent_address_p): Likewise.
20840         (gen_load_pcrel_sym): Remove 4th parameter.
20841         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20842         (sparc_expand_prologue): Do not call load_got_register here.
20843         (sparc_flat_expand_prologue): Likewise.
20844         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20845         (sparc_use_pseudo_pic_reg): New function.
20846         (sparc_init_pic_reg): Likewise.
20847         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20848         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20850 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20852         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20853         Add item for branch_cost.
20855 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20857         PR rtl-optimization/83565
20858         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20859         not extend the result to a larger mode for rotate operations.
20860         (num_sign_bit_copies1): Likewise.
20862 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20864         PR target/40411
20865         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20866         -symbolic.
20867         Use values-Xc.o for -pedantic.
20868         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20870 2018-01-12  Martin Liska  <mliska@suse.cz>
20872         PR ipa/83054
20873         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20874         New function.
20875         (possible_polymorphic_call_targets): Use it.
20876         (ipa_devirt): Likewise.
20878 2018-01-12  Martin Liska  <mliska@suse.cz>
20880         * profile-count.h (enum profile_quality): Use 0 as invalid
20881         enum value of profile_quality.
20883 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20885         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20886         -mext-string options.
20888 2018-01-12  Richard Biener  <rguenther@suse.de>
20890         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20891         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20892         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20893         Likewise.
20894         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20896 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20898         * configure.ac (--with-long-double-format): Add support for the
20899         configuration option to change the default long double format on
20900         PowerPC systems.
20901         * config.gcc (powerpc*-linux*-*): Likewise.
20902         * configure: Regenerate.
20903         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20904         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20905         used without modification.
20907 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20909         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20910         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20911         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20912         MISC_BUILTIN_SPEC_BARRIER.
20913         (rs6000_init_builtins): Likewise.
20914         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20915         enum value.
20916         (speculation_barrier): New define_insn.
20917         * doc/extend.texi: Document __builtin_speculation_barrier.
20919 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20921         PR target/83203
20922         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20923         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20924         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20925         iterators.
20926         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20927         integral modes instead of "ss" and "sd".
20928         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20929         vectors with 32-bit and 64-bit elements.
20930         (vecdupssescalarmodesuffix): New mode attribute.
20931         (vec_dup<mode>): Use it.
20933 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20935         PR target/83330
20936         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20937         frame if argument is passed on stack.
20939 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20941         PR target/82682
20942         * ree.c (combine_reaching_defs): Optimize also
20943         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20944         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20946 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20948         PR middle-end/83189
20949         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20951 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20953         PR middle-end/83718
20954         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20955         after they are computed.
20957 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20959         PR tree-optimization/83695
20960         * gimple-loop-linterchange.cc
20961         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20962         reset cached scev information after interchange.
20963         (pass_linterchange::execute): Remove call to scev_reset_htab.
20965 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20967         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20968         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20969         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20970         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20971         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20972         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20973         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20974         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20975         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20976         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20977         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20978         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20979         (V_lane_reg): Likewise.
20980         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20981         New define_expand.
20982         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20983         (vfmal_lane_low<mode>_intrinsic,
20984         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20985         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20986         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20987         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20988         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20989         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20991 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20993         * config/arm/arm-cpus.in (fp16fml): New feature.
20994         (ALL_SIMD): Add fp16fml.
20995         (armv8.2-a): Add fp16fml as an option.
20996         (armv8.3-a): Likewise.
20997         (armv8.4-a): Add fp16fml as part of fp16.
20998         * config/arm/arm.h (TARGET_FP16FML): Define.
20999         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21000         when appropriate.
21001         * config/arm/arm-modes.def (V2HF): Define.
21002         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21003         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21004         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21005         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21006         vfmsl_low, vfmsl_high): New set of builtins.
21007         * config/arm/iterators.md (PLUSMINUS): New code iterator.
21008         (vfml_op): New code attribute.
21009         (VFMLHALVES): New int iterator.
21010         (VFML, VFMLSEL): New mode attributes.
21011         (V_reg): Define mapping for V2HF.
21012         (V_hi, V_lo): New mode attributes.
21013         (VF_constraint): Likewise.
21014         (vfml_half, vfml_half_selector): New int attributes.
21015         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21016         define_expand.
21017         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21018         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21019         New define_insn.
21020         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21021         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21022         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21023         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
21024         documentation.
21025         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21026         Document new effective target and option set.
21028 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21030         * config/arm/arm-cpus.in (armv8_4): New feature.
21031         (ARMv8_4a): New fgroup.
21032         (armv8.4-a): New arch.
21033         * config/arm/arm-tables.opt: Regenerate.
21034         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21035         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21036         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21037         Add matching rules for -march=armv8.4-a and extensions.
21038         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21040 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
21042         PR target/81821
21043         * config/rx/rx.md (BW): New mode attribute.
21044         (sync_lock_test_and_setsi): Add mode suffix to insn output.
21046 2018-01-11  Richard Biener  <rguenther@suse.de>
21048         PR tree-optimization/83435
21049         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21050         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21051         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21053 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21054             Alan Hayward  <alan.hayward@arm.com>
21055             David Sherwood  <david.sherwood@arm.com>
21057         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21058         field.
21059         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
21060         (aarch64_print_address_internal): Use it to check for a zero offset.
21062 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21063             Alan Hayward  <alan.hayward@arm.com>
21064             David Sherwood  <david.sherwood@arm.com>
21066         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21067         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21068         Return a poly_int64 rather than a HOST_WIDE_INT.
21069         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21070         rather than a HOST_WIDE_INT.
21071         * config/aarch64/aarch64.h (aarch64_frame): Protect with
21072         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
21073         hard_fp_offset, frame_size, initial_adjust, callee_offset and
21074         final_offset from HOST_WIDE_INT to poly_int64.
21075         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21076         to_constant when getting the number of units in an Advanced SIMD
21077         mode.
21078         (aarch64_builtin_vectorized_function): Check for a constant number
21079         of units.
21080         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21081         GET_MODE_SIZE.
21082         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21083         attribute instead of GET_MODE_NUNITS.
21084         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21085         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21086         GET_MODE_SIZE for fixed-size registers.
21087         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21088         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21089         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21090         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21091         (aarch64_print_operand, aarch64_print_address_internal)
21092         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21093         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21094         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21095         Handle polynomial GET_MODE_SIZE.
21096         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
21097         wider than SImode without modification.
21098         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21099         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21100         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21101         passing and returning SVE modes.
21102         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21103         rather than GEN_INT.
21104         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21105         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21106         (aarch64_allocate_and_probe_stack_space): Likewise.
21107         (aarch64_layout_frame): Cope with polynomial offsets.
21108         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21109         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
21110         polynomial offsets.
21111         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21112         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21113         poly_int64 rather than a HOST_WIDE_INT.
21114         (aarch64_get_separate_components, aarch64_process_components)
21115         (aarch64_expand_prologue, aarch64_expand_epilogue)
21116         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21117         (aarch64_anchor_offset): New function, split out from...
21118         (aarch64_legitimize_address): ...here.
21119         (aarch64_builtin_vectorization_cost): Handle polynomial
21120         TYPE_VECTOR_SUBPARTS.
21121         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21122         GET_MODE_NUNITS.
21123         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21124         number of elements from the PARALLEL rather than the mode.
21125         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21126         rather than GET_MODE_BITSIZE.
21127         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21128         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21129         (aarch64_expand_vec_perm_const_1): Handle polynomial
21130         d->perm.length () and d->perm elements.
21131         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
21132         Apply to_constant to d->perm elements.
21133         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21134         polynomial CONST_VECTOR_NUNITS.
21135         (aarch64_move_pointer): Take amount as a poly_int64 rather
21136         than an int.
21137         (aarch64_progress_pointer): Avoid temporary variable.
21138         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21139         the mode attribute instead of GET_MODE.
21141 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21142             Alan Hayward  <alan.hayward@arm.com>
21143             David Sherwood  <david.sherwood@arm.com>
21145         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21146         x exists before using it.
21147         (aarch64_add_constant_internal): Rename to...
21148         (aarch64_add_offset_1): ...this.  Replace regnum with separate
21149         src and dest rtxes.  Handle the case in which they're different,
21150         including when the offset is zero.  Replace scratchreg with an rtx.
21151         Use 2 additions if there is no spare register into which we can
21152         move a 16-bit constant.
21153         (aarch64_add_constant): Delete.
21154         (aarch64_add_offset): Replace reg with separate src and dest
21155         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
21156         Use aarch64_add_offset_1.
21157         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21158         an rtx rather than an int.  Take the delta as a poly_int64
21159         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
21160         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21161         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21162         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21163         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21164         and aarch64_add_sp.
21165         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21166         aarch64_add_constant.
21168 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21170         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21171         Use scalar_float_mode.
21173 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21175         * config/aarch64/aarch64-simd.md
21176         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21177         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21178         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21179         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21180         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21181         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21182         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21183         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21184         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21185         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21187 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21189         PR target/83514
21190         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21191         targ_options->x_arm_arch_string is non NULL.
21193 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
21195         * config/aarch64/aarch64.h
21196         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
21198 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
21200         PR target/82096
21201         * expmed.c (emit_store_flag_force): Swap if const op0
21202         and change VOIDmode to mode of op0.
21204 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21206         PR rtl-optimization/83761
21207         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21208         than bytes to mode_for_size.
21210 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21212         PR middle-end/83189
21213         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21214         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21215         profile.
21217 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21219         PR middle-end/83575
21220         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21221         when in layout mode.
21222         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21223         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21224         partition fixup.
21226 2018-01-10  Michael Collison  <michael.collison@arm.com>
21228         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21229         * config/aarch64/aarch64-option-extension.def: Add
21230         AARCH64_OPT_EXTENSION of 'fp16fml'.
21231         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21232         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21233         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21234         * config/aarch64/constraints.md (Ui7): New constraint.
21235         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21236         (VFMLA_SEL_W): Ditto.
21237         (f16quad): Ditto.
21238         (f16mac1): Ditto.
21239         (VFMLA16_LOW): New int iterator.
21240         (VFMLA16_HIGH): Ditto.
21241         (UNSPEC_FMLAL): New unspec.
21242         (UNSPEC_FMLSL): Ditto.
21243         (UNSPEC_FMLAL2): Ditto.
21244         (UNSPEC_FMLSL2): Ditto.
21245         (f16mac): New code attribute.
21246         * config/aarch64/aarch64-simd-builtins.def
21247         (aarch64_fmlal_lowv2sf): Ditto.
21248         (aarch64_fmlsl_lowv2sf): Ditto.
21249         (aarch64_fmlalq_lowv4sf): Ditto.
21250         (aarch64_fmlslq_lowv4sf): Ditto.
21251         (aarch64_fmlal_highv2sf): Ditto.
21252         (aarch64_fmlsl_highv2sf): Ditto.
21253         (aarch64_fmlalq_highv4sf): Ditto.
21254         (aarch64_fmlslq_highv4sf): Ditto.
21255         (aarch64_fmlal_lane_lowv2sf): Ditto.
21256         (aarch64_fmlsl_lane_lowv2sf): Ditto.
21257         (aarch64_fmlal_laneq_lowv2sf): Ditto.
21258         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21259         (aarch64_fmlalq_lane_lowv4sf): Ditto.
21260         (aarch64_fmlsl_lane_lowv4sf): Ditto.
21261         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21262         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21263         (aarch64_fmlal_lane_highv2sf): Ditto.
21264         (aarch64_fmlsl_lane_highv2sf): Ditto.
21265         (aarch64_fmlal_laneq_highv2sf): Ditto.
21266         (aarch64_fmlsl_laneq_highv2sf): Ditto.
21267         (aarch64_fmlalq_lane_highv4sf): Ditto.
21268         (aarch64_fmlsl_lane_highv4sf): Ditto.
21269         (aarch64_fmlalq_laneq_highv4sf): Ditto.
21270         (aarch64_fmlsl_laneq_highv4sf): Ditto.
21271         * config/aarch64/aarch64-simd.md:
21272         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21273         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21274         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21275         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21276         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21277         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21278         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21279         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21280         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21281         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21282         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21283         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21284         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21285         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21286         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21287         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21288         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21289         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21290         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21291         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21292         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21293         (vfmlsl_low_u32): Ditto.
21294         (vfmlalq_low_u32): Ditto.
21295         (vfmlslq_low_u32): Ditto.
21296         (vfmlal_high_u32): Ditto.
21297         (vfmlsl_high_u32): Ditto.
21298         (vfmlalq_high_u32): Ditto.
21299         (vfmlslq_high_u32): Ditto.
21300         (vfmlal_lane_low_u32): Ditto.
21301         (vfmlsl_lane_low_u32): Ditto.
21302         (vfmlal_laneq_low_u32): Ditto.
21303         (vfmlsl_laneq_low_u32): Ditto.
21304         (vfmlalq_lane_low_u32): Ditto.
21305         (vfmlslq_lane_low_u32): Ditto.
21306         (vfmlalq_laneq_low_u32): Ditto.
21307         (vfmlslq_laneq_low_u32): Ditto.
21308         (vfmlal_lane_high_u32): Ditto.
21309         (vfmlsl_lane_high_u32): Ditto.
21310         (vfmlal_laneq_high_u32): Ditto.
21311         (vfmlsl_laneq_high_u32): Ditto.
21312         (vfmlalq_lane_high_u32): Ditto.
21313         (vfmlslq_lane_high_u32): Ditto.
21314         (vfmlalq_laneq_high_u32): Ditto.
21315         (vfmlslq_laneq_high_u32): Ditto.
21316         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21317         (AARCH64_FL_FOR_ARCH8_4): New.
21318         (AARCH64_ISA_F16FML): New ISA flag.
21319         (TARGET_F16FML): New feature flag for fp16fml.
21320         (doc/invoke.texi): Document new fp16fml option.
21322 2018-01-10  Michael Collison  <michael.collison@arm.com>
21324         * config/aarch64/aarch64-builtins.c:
21325         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21326         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21327         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21328         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21329         (AARCH64_ISA_SHA3): New ISA flag.
21330         (TARGET_SHA3): New feature flag for sha3.
21331         * config/aarch64/iterators.md (sha512_op): New int attribute.
21332         (CRYPTO_SHA512): New int iterator.
21333         (UNSPEC_SHA512H): New unspec.
21334         (UNSPEC_SHA512H2): Ditto.
21335         (UNSPEC_SHA512SU0): Ditto.
21336         (UNSPEC_SHA512SU1): Ditto.
21337         * config/aarch64/aarch64-simd-builtins.def
21338         (aarch64_crypto_sha512hqv2di): New builtin.
21339         (aarch64_crypto_sha512h2qv2di): Ditto.
21340         (aarch64_crypto_sha512su0qv2di): Ditto.
21341         (aarch64_crypto_sha512su1qv2di): Ditto.
21342         (aarch64_eor3qv8hi): Ditto.
21343         (aarch64_rax1qv2di): Ditto.
21344         (aarch64_xarqv2di): Ditto.
21345         (aarch64_bcaxqv8hi): Ditto.
21346         * config/aarch64/aarch64-simd.md:
21347         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21348         (aarch64_crypto_sha512su0qv2di): Ditto.
21349         (aarch64_crypto_sha512su1qv2di): Ditto.
21350         (aarch64_eor3qv8hi): Ditto.
21351         (aarch64_rax1qv2di): Ditto.
21352         (aarch64_xarqv2di): Ditto.
21353         (aarch64_bcaxqv8hi): Ditto.
21354         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21355         (vsha512h2q_u64): Ditto.
21356         (vsha512su0q_u64): Ditto.
21357         (vsha512su1q_u64): Ditto.
21358         (veor3q_u16): Ditto.
21359         (vrax1q_u64): Ditto.
21360         (vxarq_u64): Ditto.
21361         (vbcaxq_u16): Ditto.
21362         * config/arm/types.md (crypto_sha512): New type attribute.
21363         (crypto_sha3): Ditto.
21364         (doc/invoke.texi): Document new sha3 option.
21366 2018-01-10  Michael Collison  <michael.collison@arm.com>
21368         * config/aarch64/aarch64-builtins.c:
21369         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21370         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21371         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21372         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21373         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21374         (AARCH64_ISA_SM4): New ISA flag.
21375         (TARGET_SM4): New feature flag for sm4.
21376         * config/aarch64/aarch64-simd-builtins.def
21377         (aarch64_sm3ss1qv4si): Ditto.
21378         (aarch64_sm3tt1aq4si): Ditto.
21379         (aarch64_sm3tt1bq4si): Ditto.
21380         (aarch64_sm3tt2aq4si): Ditto.
21381         (aarch64_sm3tt2bq4si): Ditto.
21382         (aarch64_sm3partw1qv4si): Ditto.
21383         (aarch64_sm3partw2qv4si): Ditto.
21384         (aarch64_sm4eqv4si): Ditto.
21385         (aarch64_sm4ekeyqv4si): Ditto.
21386         * config/aarch64/aarch64-simd.md:
21387         (aarch64_sm3ss1qv4si): Ditto.
21388         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21389         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21390         (aarch64_sm4eqv4si): Ditto.
21391         (aarch64_sm4ekeyqv4si): Ditto.
21392         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21393         (sm3part_op): Ditto.
21394         (CRYPTO_SM3TT): Ditto.
21395         (CRYPTO_SM3PART): Ditto.
21396         (UNSPEC_SM3SS1): New unspec.
21397         (UNSPEC_SM3TT1A): Ditto.
21398         (UNSPEC_SM3TT1B): Ditto.
21399         (UNSPEC_SM3TT2A): Ditto.
21400         (UNSPEC_SM3TT2B): Ditto.
21401         (UNSPEC_SM3PARTW1): Ditto.
21402         (UNSPEC_SM3PARTW2): Ditto.
21403         (UNSPEC_SM4E): Ditto.
21404         (UNSPEC_SM4EKEY): Ditto.
21405         * config/aarch64/constraints.md (Ui2): New constraint.
21406         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21407         * config/arm/types.md (crypto_sm3): New type attribute.
21408         (crypto_sm4): Ditto.
21409         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21410         (vsm3tt1aq_u32): Ditto.
21411         (vsm3tt1bq_u32): Ditto.
21412         (vsm3tt2aq_u32): Ditto.
21413         (vsm3tt2bq_u32): Ditto.
21414         (vsm3partw1q_u32): Ditto.
21415         (vsm3partw2q_u32): Ditto.
21416         (vsm4eq_u32): Ditto.
21417         (vsm4ekeyq_u32): Ditto.
21418         (doc/invoke.texi): Document new sm4 option.
21420 2018-01-10  Michael Collison  <michael.collison@arm.com>
21422         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21423         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21424         (AARCH64_FL_FOR_ARCH8_4): New.
21425         (AARCH64_FL_V8_4): New flag.
21426         (doc/invoke.texi): Document new armv8.4-a option.
21428 2018-01-10  Michael Collison  <michael.collison@arm.com>
21430         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21431         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21432         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21433         * config/aarch64/aarch64-option-extension.def: Add
21434         AARCH64_OPT_EXTENSION of 'sha2'.
21435         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21436         (crypto): Disable sha2 and aes if crypto disabled.
21437         (crypto): Enable aes and sha2 if enabled.
21438         (simd): Disable sha2 and aes if simd disabled.
21439         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21440         New flags.
21441         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21442         (TARGET_SHA2): New feature flag for sha2.
21443         (TARGET_AES): New feature flag for aes.
21444         * config/aarch64/aarch64-simd.md:
21445         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21446         conditional on TARGET_AES.
21447         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21448         (aarch64_crypto_sha1hsi): Make pattern conditional
21449         on TARGET_SHA2.
21450         (aarch64_crypto_sha1hv4si): Ditto.
21451         (aarch64_be_crypto_sha1hv4si): Ditto.
21452         (aarch64_crypto_sha1su1v4si): Ditto.
21453         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21454         (aarch64_crypto_sha1su0v4si): Ditto.
21455         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21456         (aarch64_crypto_sha256su0v4si): Ditto.
21457         (aarch64_crypto_sha256su1v4si): Ditto.
21458         (doc/invoke.texi): Document new aes and sha2 options.
21460 2018-01-10  Martin Sebor  <msebor@redhat.com>
21462         PR tree-optimization/83781
21463         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21464         as string arrays.
21466 2018-01-11  Martin Sebor  <msebor@gmail.com>
21467             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21469         PR tree-optimization/83501
21470         PR tree-optimization/81703
21472         * tree-ssa-strlen.c (get_string_cst): Rename...
21473         (get_string_len): ...to this.  Handle global constants.
21474         (handle_char_store): Adjust.
21476 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
21477             Jim Wilson  <jimw@sifive.com>
21479         * config/riscv/riscv-protos.h (riscv_output_return): New.
21480         * config/riscv/riscv.c (struct machine_function): New naked_p field.
21481         (riscv_attribute_table, riscv_output_return),
21482         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21483         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21484         (riscv_compute_frame_info): Only compute frame->mask if not a naked
21485         function.
21486         (riscv_expand_prologue): Add early return for naked function.
21487         (riscv_expand_epilogue): Likewise.
21488         (riscv_function_ok_for_sibcall): Return false for naked function.
21489         (riscv_set_current_function): New.
21490         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21491         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21492         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21493         * doc/extend.texi (RISC-V Function Attributes): New.
21495 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21497         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21498         check for 128-bit long double before checking TCmode.
21499         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21500         128-bit long doubles before checking TFmode or TCmode.
21501         (FLOAT128_IBM_P): Likewise.
21503 2018-01-10  Martin Sebor  <msebor@redhat.com>
21505         PR tree-optimization/83671
21506         * builtins.c (c_strlen): Unconditionally return zero for the empty
21507         string.
21508         Use -Warray-bounds for warnings.
21509         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21510         for non-constant array indices with COMPONENT_REF, arrays of
21511         arrays, and pointers to arrays.
21512         (gimple_fold_builtin_strlen): Determine and set length range for
21513         non-constant character arrays.
21515 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21517         PR middle-end/81897
21518         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21519         empty blocks.
21521 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21523         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21525 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21527         PR target/83399
21528         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21529         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21530         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21531         indexed_or_indirect_operand predicate.
21532         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21533         (*vsx_le_perm_load_v8hi): Likewise.
21534         (*vsx_le_perm_load_v16qi): Likewise.
21535         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21536         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21537         (*vsx_le_perm_store_v8hi): Likewise.
21538         (*vsx_le_perm_store_v16qi): Likewise.
21539         (eight unnamed splitters): Likewise.
21541 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21543         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21544         * config/rs6000/emmintrin.h: Likewise.
21545         * config/rs6000/mmintrin.h: Likewise.
21546         * config/rs6000/xmmintrin.h: Likewise.
21548 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21550         PR c++/43486
21551         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21552         "public_flag".
21553         * tree.c (tree_nop_conversion): Return true for location wrapper
21554         nodes.
21555         (maybe_wrap_with_location): New function.
21556         (selftest::check_strip_nops): New function.
21557         (selftest::test_location_wrappers): New function.
21558         (selftest::tree_c_tests): Call it.
21559         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21560         (maybe_wrap_with_location): New decl.
21561         (EXPR_LOCATION_WRAPPER_P): New macro.
21562         (location_wrapper_p): New inline function.
21563         (tree_strip_any_location_wrapper): New inline function.
21565 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21567         PR target/83735
21568         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21569         stack_realign_offset for the largest alignment of stack slot
21570         actually used.
21571         (ix86_find_max_used_stack_alignment): New function.
21572         (ix86_finalize_stack_frame_flags): Use it.  Set
21573         max_used_stack_alignment if we don't realign stack.
21574         * config/i386/i386.h (machine_function): Add
21575         max_used_stack_alignment.
21577 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21579         * config/arm/arm.opt (-mbranch-cost): New option.
21580         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21581         account.
21583 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21585         PR target/83629
21586         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21587         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21589 2018-01-10  Richard Biener  <rguenther@suse.de>
21591         PR debug/83765
21592         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21593         early out so it also covers the case where we have a non-NULL
21594         origin.
21596 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21598         PR tree-optimization/83753
21599         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21600         for non-strided grouped accesses if the number of elements is 1.
21602 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21604         PR target/81616
21605         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21606         * i386.h (TARGET_USE_GATHER): Define.
21607         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21609 2018-01-10  Martin Liska  <mliska@suse.cz>
21611         PR bootstrap/82831
21612         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21613         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21614         partitioning.
21615         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21616         CLEANUP_NO_PARTITIONING is not set.
21618 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21620         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21621         for vectors, as a partial revert of r254296.
21622         * rtl.h (const_vec_p): Delete.
21623         (const_vec_duplicate_p): Don't test for vector CONSTs.
21624         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21625         * expmed.c (make_tree): Likewise.
21627         Revert:
21628         * common.md (E, F): Use CONSTANT_P instead of checking for
21629         CONST_VECTOR.
21630         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21631         checking for CONST_VECTOR.
21633 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21635         PR middle-end/83575
21636         * predict.c (force_edge_cold): Handle in more sane way edges
21637         with no prediction.
21639 2018-01-09  Carl Love  <cel@us.ibm.com>
21641         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21642         V4SI, V4SF types.
21643         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21644         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21645         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21646         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21647         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21648         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21649         * config/rs6000/rs6000-protos.h: Add extern defition for
21650         rs6000_generate_float2_double_code.
21651         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21652         function.
21653         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21654         (float2_v2df): Add define_expand.
21656 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21658         PR target/83628
21659         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21660         op_mode in the force_to_mode call.
21662 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21664         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21665         instead of checking each element individually.
21666         (aarch64_evpc_uzp): Likewise.
21667         (aarch64_evpc_zip): Likewise.
21668         (aarch64_evpc_ext): Likewise.
21669         (aarch64_evpc_rev): Likewise.
21670         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21671         instead of checking each element individually.  Return true without
21672         generating rtl if
21673         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21674         whether all selected elements come from the same input, instead of
21675         checking each element individually.  Remove calls to gen_rtx_REG,
21676         start_sequence and end_sequence and instead assert that no rtl is
21677         generated.
21679 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21681         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21682         order of HIGH and CONST checks.
21684 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21686         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21687         if the destination isn't an SSA_NAME.
21689 2018-01-09  Richard Biener  <rguenther@suse.de>
21691         PR tree-optimization/83668
21692         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21693         move prologue...
21694         (canonicalize_loop_form): ... here, renamed from ...
21695         (canonicalize_loop_closed_ssa_form): ... this and amended to
21696         swap successor edges for loop exit blocks to make us use
21697         the RPO order we need for initial schedule generation.
21699 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21701         PR tree-optimization/64811
21702         * match.pd: When optimizing comparisons with Inf, avoid
21703         introducing or losing exceptions from comparisons with NaN.
21705 2018-01-09  Martin Liska  <mliska@suse.cz>
21707         PR sanitizer/82517
21708         * asan.c (shadow_mem_size): Add gcc_assert.
21710 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21712         Don't save registers in main().
21714         PR target/83738
21715         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21716         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21717         * config/avr/avr.c (avr_set_current_function): Don't error if
21718         naked, OS_task or OS_main are specified at the same time.
21719         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21720         OS_main.
21721         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21722         attribute.
21723         * common/config/avr/avr-common.c (avr_option_optimization_table):
21724         Switch on -mmain-is-OS_task for optimizing compilations.
21726 2018-01-09  Richard Biener  <rguenther@suse.de>
21728         PR tree-optimization/83572
21729         * graphite.c: Include cfganal.h.
21730         (graphite_transform_loops): Connect infinite loops to exit
21731         and remove fake edges at the end.
21733 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21735         * ipa-inline.c (edge_badness): Revert accidental checkin.
21737 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21739         PR ipa/80763
21740         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21741         symbols; not inline clones.
21743 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21745         PR target/83507
21746         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21747         hard registers.  Formatting fixes.
21749         PR preprocessor/83722
21750         * gcc.c (try_generate_repro): Pass
21751         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21752         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21753         do_report_bug.
21755 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21756             Kito Cheng  <kito.cheng@gmail.com>
21758         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21759         (riscv_leaf_function_p): Delete.
21760         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21762 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21764         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21765         function.
21766         (do_ifelse): New function.
21767         (do_isel): New function.
21768         (do_sub3): New function.
21769         (do_add3): New function.
21770         (do_load_mask_compare): New function.
21771         (do_overlap_load_compare): New function.
21772         (expand_compare_loop): New function.
21773         (expand_block_compare): Call expand_compare_loop() when appropriate.
21774         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21775         option description.
21776         (-mblock-compare-inline-loop-limit): New option.
21778 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21780         PR target/83677
21781         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21782         Reverse order of second and third operands in first alternative.
21783         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21784         of first and second elements in UNSPEC_VPERMR vector.
21785         (altivec_expand_vec_perm_le): Likewise.
21787 2018-01-08  Jeff Law  <law@redhat.com>
21789         PR rtl-optimizatin/81308
21790         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21791         (process_switch): If group_case_labels makes a change, then set
21792         cfg_altered.
21793         (pass_convert_switch::execute): If a switch is converted, then
21794         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21796         PR rtl-optimization/81308
21797         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21798         splitting insns.
21800 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21802         PR target/83663 - Revert r255946
21803         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21804         generation for cases where splatting a value is not useful.
21805         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21806         across a vec_duplicate and a paradoxical subreg forming a vector
21807         mode to a vec_concat.
21809 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21811         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21812         -march=armv8.3-a variants.
21813         * config/arm/t-multilib: Likewise.
21814         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21816 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21818         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21819         to generate rtl.
21820         (cceq_ior_compare_complement): Give it a name so I can use it, and
21821         change boolean_or_operator predicate to boolean_operator so it can
21822         be used to generate a crand.
21823         (eqne): New code iterator.
21824         (bd/bd_neg): New code_attrs.
21825         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21826         a single define_insn.
21827         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21828         decrement (bdnzt/bdnzf/bdzt/bdzf).
21829         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21830         with the new names of the branch decrement patterns, and added the
21831         names of the branch decrement conditional patterns.
21833 2018-01-08  Richard Biener  <rguenther@suse.de>
21835         PR tree-optimization/83563
21836         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21837         cache.
21839 2018-01-08  Richard Biener  <rguenther@suse.de>
21841         PR middle-end/83713
21842         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21844 2018-01-08  Richard Biener  <rguenther@suse.de>
21846         PR tree-optimization/83685
21847         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21848         references to abnormals.
21850 2018-01-08  Richard Biener  <rguenther@suse.de>
21852         PR lto/83719
21853         * dwarf2out.c (output_indirect_strings): Handle empty
21854         skeleton_debug_str_hash.
21855         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21857 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21859         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21860         (emit_store_direct): Likewise.
21861         (arc_trampoline_adjust_address): Likewise.
21862         (arc_asm_trampoline_template): New function.
21863         (arc_initialize_trampoline): Use asm_trampoline_template.
21864         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21865         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21866         * config/arc/arc.md (flush_icache): Delete pattern.
21868 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21870         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21871         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21872         munaligned-access.
21874 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21876         PR target/83681
21877         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21878         by not USED_FOR_TARGET.
21879         (make_pass_resolve_sw_modes): Likewise.
21881 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21883         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21884         USED_FOR_TARGET.
21886 2018-01-08  Richard Biener  <rguenther@suse.de>
21888         PR middle-end/83580
21889         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21891 2018-01-08  Richard Biener  <rguenther@suse.de>
21893         PR middle-end/83517
21894         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21896 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21898         PR middle-end/81897
21899         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21900         basic blocks with a small number of successors.
21901         (convert_control_dep_chain_into_preds): Improve handling of
21902         forwarder blocks.
21903         (dump_predicates): Split apart into...
21904         (dump_pred_chain): ...here...
21905         (dump_pred_info): ...and here.
21906         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21907         (can_chain_union_be_invalidated_p): Improve check for invalidation
21908         of paths.
21909         (uninit_uses_cannot_happen): Avoid unnecessary if
21910         convert_control_dep_chain_into_preds yielded nothing.
21912 2018-01-06  Martin Sebor  <msebor@redhat.com>
21914         PR tree-optimization/83640
21915         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21916         subtracting negative offset from size.
21917         (builtin_access::overlap): Adjust offset bounds of the access to fall
21918         within the size of the object if possible.
21920 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21922         PR rtl-optimization/83699
21923         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21924         extract_bit_field_as_subreg to cases in which the extracted
21925         value is also a vector.
21927         * lra-constraints.c (process_alt_operands): Test for the equivalence
21928         substitutions when detecting a possible reload cycle.
21930 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21932         PR debug/83480
21933         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21934         by default if flag_selective_schedling{,2}.  Formatting fixes.
21936         PR rtl-optimization/83682
21937         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21938         if it has non-VECTOR_MODE element mode.
21939         (vec_duplicate_p): Likewise.
21941         PR middle-end/83694
21942         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21943         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21945 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21947         PR target/83604
21948         * config/i386/i386-builtin.def
21949         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21950         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21951         Require also OPTION_MASK_ISA_AVX512F in addition to
21952         OPTION_MASK_ISA_GFNI.
21953         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21954         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21955         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21956         to OPTION_MASK_ISA_GFNI.
21957         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21958         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21959         OPTION_MASK_ISA_AVX512BW.
21960         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21961         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21962         addition to OPTION_MASK_ISA_GFNI.
21963         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21964         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21965         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21966         to OPTION_MASK_ISA_GFNI.
21967         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21968         a requirement for all ISAs rather than any of them with a few
21969         exceptions.
21970         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21971         processing.
21972         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21973         bitmasks to be enabled with 3 exceptions, instead of requiring any
21974         enabled ISA with lots of exceptions.
21975         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21976         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21977         Change avx512bw in isa attribute to avx512f.
21978         * config/i386/sgxintrin.h: Add license boilerplate.
21979         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21980         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21981         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21982         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21983         defined.
21984         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21985         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21986         temporarily sse2 rather than sse if not enabled already.
21988         PR target/83604
21989         * config/i386/sse.md (VI248_VLBW): Rename to ...
21990         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21991         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21992         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21993         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21994         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21995         mode iterator instead of VI248_VLBW.
21997 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21999         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22000         (record_modified): Skip clobbers; add debug output.
22001         (param_change_prob): Use sreal frequencies.
22003 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
22005         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22006         punt for user-aligned variables.
22008 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
22010         * tree-chrec.c (chrec_contains_symbols): Return true for
22011         POLY_INT_CST.
22013 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
22015         PR target/82439
22016         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22017         of (x|y) == x for BICS pattern.
22019 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
22021         PR tree-optimization/83605
22022         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22023         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22024         can throw.
22026 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22028         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22029         * config/epiphany/rtems.h: New file.
22031 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22032             Uros Bizjak  <ubizjak@gmail.com>
22034         PR target/83554
22035         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22036         QIreg_operand instead of register_operand predicate.
22037         * config/i386/i386.c (ix86_rop_should_change_byte_p,
22038         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22039         comments instead of -fmitigate[-_]rop.
22041 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22043         PR bootstrap/81926
22044         * cgraphunit.c (symbol_table::compile): Switch to text_section
22045         before calling assembly_start debug hook.
22046         * run-rtl-passes.c (run_rtl_passes): Likewise.
22047         Include output.h.
22049 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22051         * tree-vrp.c (extract_range_from_binary_expr_1): Check
22052         range_int_cst_p rather than !symbolic_range_p before calling
22053         extract_range_from_multiplicative_op_1.
22055 2018-01-04  Jeff Law  <law@redhat.com>
22057         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22058         redundant test in assertion.
22060 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22062         * doc/rtl.texi: Document machine_mode wrapper classes.
22064 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22066         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22067         using tree_to_uhwi.
22069 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22071         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22072         the VEC_PERM_EXPR fold to fail.
22074 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22076         PR debug/83585
22077         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22078         to switched_sections.
22080 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22082         PR target/83680
22083         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22084         test for d.testing.
22086 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
22088         PR target/83387
22089         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22090         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22092 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22094         PR debug/83666
22095         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22096         is BLKmode and bitpos not zero or mode change is needed.
22098 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22100         PR target/83675
22101         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22102         TARGET_VIS2.
22104 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
22106         PR target/83628
22107         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22108         instead of MULT rtx.  Update all corresponding splitters.
22109         (*saddl_se): Ditto.
22110         (*ssub<modesuffix>): Ditto.
22111         (*ssubl_se): Ditto.
22112         (*cmp_sadd_di): Update split patterns.
22113         (*cmp_sadd_si): Ditto.
22114         (*cmp_sadd_sidi): Ditto.
22115         (*cmp_ssub_di): Ditto.
22116         (*cmp_ssub_si): Ditto.
22117         (*cmp_ssub_sidi): Ditto.
22118         * config/alpha/predicates.md (const23_operand): New predicate.
22119         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22120         Look for ASHIFT, not MULT inner operand.
22121         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22123 2018-01-04  Martin Liska  <mliska@suse.cz>
22125         PR gcov-profile/83669
22126         * gcov.c (output_intermediate_file): Add version to intermediate
22127         gcov file.
22128         * doc/gcov.texi: Document new field 'version' in intermediate
22129         file format. Fix location of '-k' option of gcov command.
22131 2018-01-04  Martin Liska  <mliska@suse.cz>
22133         PR ipa/82352
22134         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22136 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22138         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22140 2018-01-03  Martin Sebor  <msebor@redhat.com>
22142         PR tree-optimization/83655
22143         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22144         checking calls with invalid arguments.
22146 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22148         * tree-vect-stmts.c (vect_get_store_rhs): New function.
22149         (vectorizable_mask_load_store): Delete.
22150         (vectorizable_call): Return false for masked loads and stores.
22151         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
22152         instead of gimple_assign_rhs1.
22153         (vectorizable_load): Handle IFN_MASK_LOAD.
22154         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22156 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22158         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22159         split out from..,
22160         (vectorizable_mask_load_store): ...here.
22161         (vectorizable_load): ...and here.
22163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22165         * tree-vect-stmts.c (vect_build_all_ones_mask)
22166         (vect_build_zero_merge_argument): New functions, split out from...
22167         (vectorizable_load): ...here.
22169 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22171         * tree-vect-stmts.c (vect_check_store_rhs): New function,
22172         split out from...
22173         (vectorizable_mask_load_store): ...here.
22174         (vectorizable_store): ...and here.
22176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22178         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22179         split out from...
22180         (vectorizable_mask_load_store): ...here.
22182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22184         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22185         (vect_model_store_cost): Take a vec_load_store_type instead of a
22186         vect_def_type.
22187         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22188         (vect_model_store_cost): Take a vec_load_store_type instead of a
22189         vect_def_type.
22190         (vectorizable_mask_load_store): Update accordingly.
22191         (vectorizable_store): Likewise.
22192         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22196         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22197         IFN_MASK_LOAD calls here rather than...
22198         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22200 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22201             Alan Hayward  <alan.hayward@arm.com>
22202             David Sherwood  <david.sherwood@arm.com>
22204         * expmed.c (extract_bit_field_1): For vector extracts,
22205         fall back to extract_bit_field_as_subreg if vec_extract
22206         isn't available.
22208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22209             Alan Hayward  <alan.hayward@arm.com>
22210             David Sherwood  <david.sherwood@arm.com>
22212         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22213         they are variable or constant sized.
22214         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22215         slots for constant-sized data.
22217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22218             Alan Hayward  <alan.hayward@arm.com>
22219             David Sherwood  <david.sherwood@arm.com>
22221         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22222         handling COND_EXPRs with boolean comparisons, try to find a better
22223         basis for the mask type than the boolean itself.
22225 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22227         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22228         is calculated and how it can be overridden.
22229         * genmodes.c (max_bitsize_mode_any_mode): New variable.
22230         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22231         if defined.
22232         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22233         if nonzero.
22235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22236             Alan Hayward  <alan.hayward@arm.com>
22237             David Sherwood  <david.sherwood@arm.com>
22239         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22240         Remove the mode argument.
22241         (aarch64_simd_valid_immediate): Remove the mode and inverse
22242         arguments.
22243         * config/aarch64/iterators.md (bitsize): New iterator.
22244         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22245         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22246         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22247         aarch64_simd_valid_immediate.
22248         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22249         (aarch64_reg_or_bic_imm): Likewise.
22250         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22251         with an insn_type enum and msl with a modifier_type enum.
22252         Replace element_width with a scalar_mode.  Change the shift
22253         to unsigned int.  Add constructors for scalar_float_mode and
22254         scalar_int_mode elements.
22255         (aarch64_vect_float_const_representable_p): Delete.
22256         (aarch64_can_const_movi_rtx_p)
22257         (aarch64_simd_scalar_immediate_valid_for_move)
22258         (aarch64_simd_make_constant): Update call to
22259         aarch64_simd_valid_immediate.
22260         (aarch64_advsimd_valid_immediate_hs): New function.
22261         (aarch64_advsimd_valid_immediate): Likewise.
22262         (aarch64_simd_valid_immediate): Remove mode and inverse
22263         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
22264         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22265         and aarch64_float_const_representable_p on the result.
22266         (aarch64_output_simd_mov_immediate): Remove mode argument.
22267         Update call to aarch64_simd_valid_immediate and use of
22268         simd_immediate_info.
22269         (aarch64_output_scalar_simd_mov_immediate): Update call
22270         accordingly.
22272 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22273             Alan Hayward  <alan.hayward@arm.com>
22274             David Sherwood  <david.sherwood@arm.com>
22276         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22277         (mode_nunits): Likewise CONST_MODE_NUNITS.
22278         * machmode.def (ADJUST_NUNITS): Document.
22279         * genmodes.c (mode_data::need_nunits_adj): New field.
22280         (blank_mode): Update accordingly.
22281         (adj_nunits): New variable.
22282         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22283         parameter.
22284         (emit_mode_size_inline): Set need_bytesize_adj for all modes
22285         listed in adj_nunits.
22286         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22287         listed in adj_nunits.  Don't emit case statements for such modes.
22288         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22289         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
22290         nothing if adj_nunits is nonnull.
22291         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22292         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22293         (emit_mode_fbit): Update use of print_maybe_const_decl.
22294         (emit_move_size): Likewise.  Treat the array as non-const
22295         if adj_nunits.
22296         (emit_mode_adjustments): Handle adj_nunits.
22298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22300         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22301         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22302         (VECTOR_MODES): Use it.
22303         (make_vector_modes): Take the prefix as an argument.
22305 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22306             Alan Hayward  <alan.hayward@arm.com>
22307             David Sherwood  <david.sherwood@arm.com>
22309         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22310         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22311         for MODE_VECTOR_BOOL.
22312         * machmode.def (VECTOR_BOOL_MODE): Document.
22313         * genmodes.c (VECTOR_BOOL_MODE): New macro.
22314         (make_vector_bool_mode): New function.
22315         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22316         MODE_VECTOR_BOOL.
22317         * lto-streamer-in.c (lto_input_mode_table): Likewise.
22318         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22319         Likewise.
22320         * stor-layout.c (int_mode_for_mode): Likewise.
22321         * tree.c (build_vector_type_for_mode): Likewise.
22322         * varasm.c (output_constant_pool_2): Likewise.
22323         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22324         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
22325         for MODE_VECTOR_BOOL.
22326         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22327         of mode class checks.
22328         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22329         instead of a list of mode class checks.
22330         (expand_vector_scalar_condition): Likewise.
22331         (type_for_widest_vector_mode): Handle BImode as an inner mode.
22333 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22334             Alan Hayward  <alan.hayward@arm.com>
22335             David Sherwood  <david.sherwood@arm.com>
22337         * machmode.h (mode_size): Change from unsigned short to
22338         poly_uint16_pod.
22339         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22340         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22341         or if measurement_type is not polynomial.
22342         (fixed_size_mode::includes_p): Check for constant-sized modes.
22343         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22344         return a poly_uint16 rather than an unsigned short.
22345         (emit_mode_size): Change the type of mode_size from unsigned short
22346         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
22347         (emit_mode_adjustments): Cope with polynomial vector sizes.
22348         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22349         for GET_MODE_SIZE.
22350         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22351         for GET_MODE_SIZE.
22352         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22353         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22354         * caller-save.c (setup_save_areas): Likewise.
22355         (replace_reg_with_saved_mem): Likewise.
22356         * calls.c (emit_library_call_value_1): Likewise.
22357         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22358         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22359         (gen_lowpart_for_combine): Likewise.
22360         * convert.c (convert_to_integer_1): Likewise.
22361         * cse.c (equiv_constant, cse_insn): Likewise.
22362         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22363         (cselib_subst_to_values): Likewise.
22364         * dce.c (word_dce_process_block): Likewise.
22365         * df-problems.c (df_word_lr_mark_ref): Likewise.
22366         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22367         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22368         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22369         (rtl_for_decl_location): Likewise.
22370         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22371         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22372         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22373         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22374         (expand_expr_real_1): Likewise.
22375         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22376         (pad_below): Likewise.
22377         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22378         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22379         * ira.c (get_subreg_tracking_sizes): Likewise.
22380         * ira-build.c (ira_create_allocno_objects): Likewise.
22381         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22382         (ira_sort_regnos_for_alter_reg): Likewise.
22383         * ira-costs.c (record_operand_costs): Likewise.
22384         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22385         (resolve_simple_move): Likewise.
22386         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22387         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22388         (lra_constraints): Likewise.
22389         (CONST_POOL_OK_P): Reject variable-sized modes.
22390         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22391         (add_pseudo_to_slot, lra_spill): Likewise.
22392         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22393         * optabs-query.c (get_best_extraction_insn): Likewise.
22394         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22395         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22396         (expand_mult_highpart, valid_multiword_target_p): Likewise.
22397         * recog.c (offsettable_address_addr_space_p): Likewise.
22398         * regcprop.c (maybe_mode_change): Likewise.
22399         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22400         * regrename.c (build_def_use): Likewise.
22401         * regstat.c (dump_reg_info): Likewise.
22402         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22403         (find_reloads, find_reloads_subreg_address): Likewise.
22404         * reload1.c (eliminate_regs_1): Likewise.
22405         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22406         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22407         (simplify_binary_operation_1, simplify_subreg): Likewise.
22408         * targhooks.c (default_function_arg_padding): Likewise.
22409         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22410         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22411         (verify_gimple_assign_ternary): Likewise.
22412         * tree-inline.c (estimate_move_cost): Likewise.
22413         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22414         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22415         (get_address_cost_ainc): Likewise.
22416         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22417         (vect_supportable_dr_alignment): Likewise.
22418         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22419         (vectorizable_reduction): Likewise.
22420         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22421         (vectorizable_operation, vectorizable_load): Likewise.
22422         * tree.c (build_same_sized_truth_vector_type): Likewise.
22423         * valtrack.c (cleanup_auto_inc_dec): Likewise.
22424         * var-tracking.c (emit_note_insn_var_location): Likewise.
22425         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22426         (ADDR_VEC_ALIGN): Likewise.
22428 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22429             Alan Hayward  <alan.hayward@arm.com>
22430             David Sherwood  <david.sherwood@arm.com>
22432         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22433         unsigned short.
22434         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22435         or if measurement_type is polynomial.
22436         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22437         * combine.c (make_extraction): Likewise.
22438         * dse.c (find_shift_sequence): Likewise.
22439         * dwarf2out.c (mem_loc_descriptor): Likewise.
22440         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22441         (extract_bit_field, extract_low_bits): Likewise.
22442         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22443         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22444         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22445         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22446         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22447         * reload.c (find_reloads): Likewise.
22448         * reload1.c (alter_reg): Likewise.
22449         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22450         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22451         * tree-if-conv.c (predicate_mem_writes): Likewise.
22452         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22453         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22454         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22455         * valtrack.c (dead_debug_insert_temp): Likewise.
22456         * varasm.c (mergeable_constant_section): Likewise.
22457         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22460             Alan Hayward  <alan.hayward@arm.com>
22461             David Sherwood  <david.sherwood@arm.com>
22463         * expr.c (expand_assignment): Cope with polynomial mode sizes
22464         when assigning to a CONCAT.
22466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22467             Alan Hayward  <alan.hayward@arm.com>
22468             David Sherwood  <david.sherwood@arm.com>
22470         * machmode.h (mode_precision): Change from unsigned short to
22471         poly_uint16_pod.
22472         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22473         short.
22474         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22475         or if measurement_type is not polynomial.
22476         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
22477         in which the mode is already known to be a scalar_int_mode.
22478         * genmodes.c (emit_mode_precision): Change the type of mode_precision
22479         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
22480         initializer.
22481         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22482         for GET_MODE_PRECISION.
22483         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22484         for GET_MODE_PRECISION.
22485         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22486         as polynomial.
22487         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22488         (expand_field_assignment, make_extraction): Likewise.
22489         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22490         (get_last_value): Likewise.
22491         * convert.c (convert_to_integer_1): Likewise.
22492         * cse.c (cse_insn): Likewise.
22493         * expr.c (expand_expr_real_1): Likewise.
22494         * lra-constraints.c (simplify_operand_subreg): Likewise.
22495         * optabs-query.c (can_atomic_load_p): Likewise.
22496         * optabs.c (expand_atomic_load): Likewise.
22497         (expand_atomic_store): Likewise.
22498         * ree.c (combine_reaching_defs): Likewise.
22499         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22500         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22501         * tree.h (type_has_mode_precision_p): Likewise.
22502         * ubsan.c (instrument_si_overflow): Likewise.
22504 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22505             Alan Hayward  <alan.hayward@arm.com>
22506             David Sherwood  <david.sherwood@arm.com>
22508         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22509         polynomial numbers of units.
22510         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22511         (valid_vector_subparts_p): New function.
22512         (build_vector_type): Remove temporary shim and take the number
22513         of units as a poly_uint64 rather than an int.
22514         (build_opaque_vector_type): Take the number of units as a
22515         poly_uint64 rather than an int.
22516         * tree.c (build_vector_from_ctor): Handle polynomial
22517         TYPE_VECTOR_SUBPARTS.
22518         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22519         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22520         (build_vector_from_val): If the number of units is variable,
22521         use build_vec_duplicate_cst for constant operands and
22522         VEC_DUPLICATE_EXPR otherwise.
22523         (make_vector_type): Remove temporary is_constant ().
22524         (build_vector_type, build_opaque_vector_type): Take the number of
22525         units as a poly_uint64 rather than an int.
22526         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22527         VECTOR_CST_NELTS.
22528         * cfgexpand.c (expand_debug_expr): Likewise.
22529         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22530         (store_constructor, expand_expr_real_1): Likewise.
22531         (const_scalar_mask_from_tree): Likewise.
22532         * fold-const-call.c (fold_const_reduction): Likewise.
22533         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22534         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22535         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22536         (fold_relational_const): Likewise.
22537         (native_interpret_vector): Likewise.  Change the size from an
22538         int to an unsigned int.
22539         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22540         TYPE_VECTOR_SUBPARTS.
22541         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22542         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22543         duplicating a non-constant operand into a variable-length vector.
22544         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22545         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22546         * ipa-icf.c (sem_variable::equals): Likewise.
22547         * match.pd: Likewise.
22548         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22549         * print-tree.c (print_node): Likewise.
22550         * stor-layout.c (layout_type): Likewise.
22551         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22552         * tree-cfg.c (verify_gimple_comparison): Likewise.
22553         (verify_gimple_assign_binary): Likewise.
22554         (verify_gimple_assign_ternary): Likewise.
22555         (verify_gimple_assign_single): Likewise.
22556         * tree-pretty-print.c (dump_generic_node): Likewise.
22557         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22558         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22559         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22560         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22561         (vect_shift_permute_load_chain): Likewise.
22562         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22563         (expand_vector_condition, optimize_vector_constructor): Likewise.
22564         (lower_vec_perm, get_compute_type): Likewise.
22565         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22566         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22567         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22568         (vect_recog_mask_conversion_pattern): Likewise.
22569         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22570         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22571         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22572         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22573         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22574         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22575         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22576         (supportable_widening_operation): Likewise.
22577         (supportable_narrowing_operation): Likewise.
22578         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22579         Likewise.
22580         * varasm.c (output_constant): Likewise.
22582 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22583             Alan Hayward  <alan.hayward@arm.com>
22584             David Sherwood  <david.sherwood@arm.com>
22586         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22587         so that both the length == 3 and length != 3 cases set up their
22588         own permute vectors.  Add comments explaining why we know the
22589         number of elements is constant.
22590         (vect_permute_load_chain): Likewise.
22592 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22593             Alan Hayward  <alan.hayward@arm.com>
22594             David Sherwood  <david.sherwood@arm.com>
22596         * machmode.h (mode_nunits): Change from unsigned char to
22597         poly_uint16_pod.
22598         (ONLY_FIXED_SIZE_MODES): New macro.
22599         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22600         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22601         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22602         New typedefs.
22603         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22604         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22605         or if measurement_type is not polynomial.
22606         * genmodes.c (ZERO_COEFFS): New macro.
22607         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22608         poly_uint16.
22609         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22610         Use ZERO_COEFFS when emitting initializers.
22611         * data-streamer.h (bp_pack_poly_value): New function.
22612         (bp_unpack_poly_value): Likewise.
22613         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22614         for GET_MODE_NUNITS.
22615         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22616         for GET_MODE_NUNITS.
22617         * tree.c (make_vector_type): Remove temporary shim and make
22618         the real function take the number of units as a poly_uint64
22619         rather than an int.
22620         (build_vector_type_for_mode): Handle polynomial nunits.
22621         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22622         * emit-rtl.c (const_vec_series_p_1): Likewise.
22623         (gen_rtx_CONST_VECTOR): Likewise.
22624         * fold-const.c (test_vec_duplicate_folding): Likewise.
22625         * genrecog.c (validate_pattern): Likewise.
22626         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22627         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22628         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22629         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22630         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22631         * rtlanal.c (subreg_get_info): Likewise.
22632         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22633         (vect_grouped_load_supported): Likewise.
22634         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22635         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22636         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22637         (simplify_const_unary_operation, simplify_binary_operation_1)
22638         (simplify_const_binary_operation, simplify_ternary_operation)
22639         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22640         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22641         instead of CONST_VECTOR_NUNITS.
22642         * varasm.c (output_constant_pool_2): Likewise.
22643         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22644         explicit-encoded elements in the XVEC for variable-length vectors.
22646 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22648         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22650 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22651             Alan Hayward  <alan.hayward@arm.com>
22652             David Sherwood  <david.sherwood@arm.com>
22654         * coretypes.h (fixed_size_mode): Declare.
22655         (fixed_size_mode_pod): New typedef.
22656         * builtins.h (target_builtins::x_apply_args_mode)
22657         (target_builtins::x_apply_result_mode): Change type to
22658         fixed_size_mode_pod.
22659         * builtins.c (apply_args_size, apply_result_size, result_vector)
22660         (expand_builtin_apply_args_1, expand_builtin_apply)
22661         (expand_builtin_return): Update accordingly.
22663 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22665         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22666         * cselib.c (cselib_hash_rtx): Likewise.
22667         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22668         CONST_VECTOR encoding.
22670 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22671             Jeff Law  <law@redhat.com>
22673         PR target/83641
22674         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22675         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22676         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22677         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22679         PR target/83641
22680         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22681         explicitly probe *sp in a noreturn function if there were any callee
22682         register saves or frame pointer is needed.
22684 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22686         PR debug/83621
22687         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22688         BLKmode for ternary, binary or unary expressions.
22690         PR debug/83645
22691         * var-tracking.c (delete_vta_debug_insn): New inline function.
22692         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22693         insns from get_insns () to NULL instead of each bb separately.
22694         Use delete_vta_debug_insn.  No longer static.
22695         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22696         delete_vta_debug_insns callers.
22697         * rtl.h (delete_vta_debug_insns): Declare.
22698         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22699         instead of variable_tracking_main.
22701 2018-01-03  Martin Sebor  <msebor@redhat.com>
22703         PR tree-optimization/83603
22704         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22705         arguments past the endof the argument list in functions declared
22706         without a prototype.
22707         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22708         Avoid checking when arguments are null.
22710 2018-01-03  Martin Sebor  <msebor@redhat.com>
22712         PR c/83559
22713         * doc/extend.texi (attribute const): Fix a typo.
22714         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22715         issuing -Wsuggest-attribute for void functions.
22717 2018-01-03  Martin Sebor  <msebor@redhat.com>
22719         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22720         offset_int::from instead of wide_int::to_shwi.
22721         (maybe_diag_overlap): Remove assertion.
22722         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22723         * gimple-ssa-sprintf.c (format_directive): Same.
22724         (parse_directive): Same.
22725         (sprintf_dom_walker::compute_format_length): Same.
22726         (try_substitute_return_value): Same.
22728 2018-01-03  Jeff Law  <law@redhat.com>
22730         PR middle-end/83654
22731         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22732         non-constant residual for zero at runtime and avoid probing in
22733         that case.  Reorganize code for trailing problem to mirror handling
22734         of the residual.
22736 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22738         PR tree-optimization/83501
22739         * tree-ssa-strlen.c (get_string_cst): New.
22740         (handle_char_store): Call get_string_cst.
22742 2018-01-03  Martin Liska  <mliska@suse.cz>
22744         PR tree-optimization/83593
22745         * tree-ssa-strlen.c: Include tree-cfg.h.
22746         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22747         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22748         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22749         to false.
22750         (strlen_dom_walker::before_dom_children): Call
22751         gimple_purge_dead_eh_edges. Dump tranformation with details
22752         dump flags.
22753         (strlen_dom_walker::before_dom_children): Update call by adding
22754         new argument cleanup_eh.
22755         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22757 2018-01-03  Martin Liska  <mliska@suse.cz>
22759         PR ipa/83549
22760         * cif-code.def (VARIADIC_THUNK): New enum value.
22761         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22762         thunks.
22764 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22766         * sse.md (mov<mode>_internal): Tighten condition for when to use
22767         vmovdqu<ssescalarsize> for TI and OI modes.
22769 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22771         Update copyright years.
22773 2018-01-03  Martin Liska  <mliska@suse.cz>
22775         PR ipa/83594
22776         * ipa-visibility.c (function_and_variable_visibility): Skip
22777         functions with noipa attribure.
22779 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22781         * gcc.c (process_command): Update copyright notice dates.
22782         * gcov-dump.c (print_version): Ditto.
22783         * gcov.c (print_version): Ditto.
22784         * gcov-tool.c (print_version): Ditto.
22785         * gengtype.c (create_file): Ditto.
22786         * doc/cpp.texi: Bump @copying's copyright year.
22787         * doc/cppinternals.texi: Ditto.
22788         * doc/gcc.texi: Ditto.
22789         * doc/gccint.texi: Ditto.
22790         * doc/gcov.texi: Ditto.
22791         * doc/install.texi: Ditto.
22792         * doc/invoke.texi: Ditto.
22794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22796         * vector-builder.h (vector_builder::m_full_nelts): Change from
22797         unsigned int to poly_uint64.
22798         (vector_builder::full_nelts): Update prototype accordingly.
22799         (vector_builder::new_vector): Likewise.
22800         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22801         (vector_builder::operator ==): Likewise.
22802         (vector_builder::finalize): Likewise.
22803         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22804         Take the number of elements as a poly_uint64 rather than an
22805         unsigned int.
22806         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22807         from unsigned int to poly_uint64.
22808         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22809         (vec_perm_indices::new_vector): Likewise.
22810         (vec_perm_indices::length): Likewise.
22811         (vec_perm_indices::nelts_per_input): Likewise.
22812         (vec_perm_indices::input_nelts): Likewise.
22813         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22814         number of elements per input as a poly_uint64 rather than an
22815         unsigned int.  Use the original encoding for variable-length
22816         vectors, rather than clamping each individual element.
22817         For the second and subsequent elements in each pattern,
22818         clamp the step and base before clamping their sum.
22819         (vec_perm_indices::series_p): Handle polynomial element counts.
22820         (vec_perm_indices::all_in_range_p): Likewise.
22821         (vec_perm_indices_to_tree): Likewise.
22822         (vec_perm_indices_to_rtx): Likewise.
22823         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22824         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22825         (tree_vector_builder::new_binary_operation): Handle polynomial
22826         element counts.  Return false if we need to know the number
22827         of elements at compile time.
22828         * fold-const.c (fold_vec_perm): Punt if the number of elements
22829         isn't known at compile time.
22831 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22833         * vec-perm-indices.h (vec_perm_builder): Change element type
22834         from HOST_WIDE_INT to poly_int64.
22835         (vec_perm_indices::element_type): Update accordingly.
22836         (vec_perm_indices::clamp): Handle polynomial element_types.
22837         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22838         (vec_perm_indices::all_in_range_p): Likewise.
22839         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22840         than shwi trees.
22841         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22842         polynomial vec_perm_indices element types.
22843         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22844         * fold-const.c (fold_vec_perm): Likewise.
22845         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22846         * tree-vect-generic.c (lower_vec_perm): Likewise.
22847         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22848         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22849         element type to HOST_WIDE_INT.
22851 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22852             Alan Hayward  <alan.hayward@arm.com>
22853             David Sherwood  <david.sherwood@arm.com>
22855         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22856         rather than an int.  Use plus_constant.
22857         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22858         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22860 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22861             Alan Hayward  <alan.hayward@arm.com>
22862             David Sherwood  <david.sherwood@arm.com>
22864         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22865         a HOST_WIDE_INT to a poly_int64.
22867 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22868             Alan Hayward  <alan.hayward@arm.com>
22869             David Sherwood  <david.sherwood@arm.com>
22871         * calls.c (load_register_parameters): Cope with polynomial
22872         mode sizes.  Require a constant size for BLKmode parameters
22873         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22874         forces a parameter to be padded at the lsb end in order to
22875         fill a complete number of words, require the parameter size
22876         to be ordered wrt UNITS_PER_WORD.
22878 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22879             Alan Hayward  <alan.hayward@arm.com>
22880             David Sherwood  <david.sherwood@arm.com>
22882         * reload1.c (spill_stack_slot_width): Change element type
22883         from unsigned int to poly_uint64_pod.
22884         (alter_reg): Treat mode sizes as polynomial.
22886 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22887             Alan Hayward  <alan.hayward@arm.com>
22888             David Sherwood  <david.sherwood@arm.com>
22890         * reload.c (complex_word_subreg_p): New function.
22891         (reload_inner_reg_of_subreg, push_reload): Use it.
22893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22894             Alan Hayward  <alan.hayward@arm.com>
22895             David Sherwood  <david.sherwood@arm.com>
22897         * lra-constraints.c (process_alt_operands): Reject matched
22898         operands whose sizes aren't ordered.
22899         (match_reload): Refer to this check here.
22901 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22902             Alan Hayward  <alan.hayward@arm.com>
22903             David Sherwood  <david.sherwood@arm.com>
22905         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22906         that the mode size is in the set {1, 2, 4, 8, 16}.
22908 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22909             Alan Hayward  <alan.hayward@arm.com>
22910             David Sherwood  <david.sherwood@arm.com>
22912         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22913         Use plus_constant instead of gen_rtx_PLUS.
22915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22916             Alan Hayward  <alan.hayward@arm.com>
22917             David Sherwood  <david.sherwood@arm.com>
22919         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22920         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22921         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22922         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22923         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22924         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22925         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22926         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22927         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22928         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22929         a poly_int64.
22930         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22931         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22932         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22933         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22934         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22935         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22936         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22937         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22938         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22939         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22940         function.
22941         * expr.c (emit_move_resolve_push): Treat the input and result
22942         of PUSH_ROUNDING as a poly_int64.
22943         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22944         (emit_push_insn): Likewise.
22945         * lra-eliminations.c (mark_not_eliminable): Likewise.
22946         * recog.c (push_operand): Likewise.
22947         * reload1.c (elimination_effects): Likewise.
22948         * rtlanal.c (nonzero_bits1): Likewise.
22949         * calls.c (store_one_arg): Likewise.  Require the padding to be
22950         known at compile time.
22952 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22953             Alan Hayward  <alan.hayward@arm.com>
22954             David Sherwood  <david.sherwood@arm.com>
22956         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22957         Use plus_constant instead of gen_rtx_PLUS.
22959 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22960             Alan Hayward  <alan.hayward@arm.com>
22961             David Sherwood  <david.sherwood@arm.com>
22963         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22964         rather than an int.
22966 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22967             Alan Hayward  <alan.hayward@arm.com>
22968             David Sherwood  <david.sherwood@arm.com>
22970         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22971         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22972         via stack temporaries.  Treat the mode size as polynomial too.
22974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22975             Alan Hayward  <alan.hayward@arm.com>
22976             David Sherwood  <david.sherwood@arm.com>
22978         * expr.c (expand_expr_real_2): When handling conversions involving
22979         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22980         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22981         as a poly_uint64 too.
22983 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22984             Alan Hayward  <alan.hayward@arm.com>
22985             David Sherwood  <david.sherwood@arm.com>
22987         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22989 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22990             Alan Hayward  <alan.hayward@arm.com>
22991             David Sherwood  <david.sherwood@arm.com>
22993         * combine.c (can_change_dest_mode): Handle polynomial
22994         REGMODE_NATURAL_SIZE.
22995         * expmed.c (store_bit_field_1): Likewise.
22996         * expr.c (store_constructor): Likewise.
22997         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22998         and polynomial REGMODE_NATURAL_SIZE.
22999         (gen_lowpart_common): Likewise.
23000         * reginfo.c (record_subregs_of_mode): Likewise.
23001         * rtlanal.c (read_modify_subreg_p): Likewise.
23003 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23004             Alan Hayward  <alan.hayward@arm.com>
23005             David Sherwood  <david.sherwood@arm.com>
23007         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23008         numbers of elements.
23010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23011             Alan Hayward  <alan.hayward@arm.com>
23012             David Sherwood  <david.sherwood@arm.com>
23014         * match.pd: Cope with polynomial numbers of vector elements.
23016 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23017             Alan Hayward  <alan.hayward@arm.com>
23018             David Sherwood  <david.sherwood@arm.com>
23020         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23021         in a POINTER_PLUS_EXPR.
23023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23024             Alan Hayward  <alan.hayward@arm.com>
23025             David Sherwood  <david.sherwood@arm.com>
23027         * omp-simd-clone.c (simd_clone_subparts): New function.
23028         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23029         (ipa_simd_modify_function_body): Likewise.
23031 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23032             Alan Hayward  <alan.hayward@arm.com>
23033             David Sherwood  <david.sherwood@arm.com>
23035         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23036         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23037         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23038         (expand_vector_condition, vector_element): Likewise.
23039         (subparts_gt): New function.
23040         (get_compute_type): Use subparts_gt.
23041         (count_type_subparts): Delete.
23042         (expand_vector_operations_1): Use subparts_gt instead of
23043         count_type_subparts.
23045 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23046             Alan Hayward  <alan.hayward@arm.com>
23047             David Sherwood  <david.sherwood@arm.com>
23049         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23050         (vect_compile_time_alias): ...this new function.  Do the calculation
23051         on poly_ints rather than trees.
23052         (vect_prune_runtime_alias_test_list): Update call accordingly.
23054 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23055             Alan Hayward  <alan.hayward@arm.com>
23056             David Sherwood  <david.sherwood@arm.com>
23058         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23059         numbers of units.
23060         (vect_schedule_slp_instance): Likewise.
23062 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23063             Alan Hayward  <alan.hayward@arm.com>
23064             David Sherwood  <david.sherwood@arm.com>
23066         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23067         constant and extern definitions for variable-length vectors.
23068         (vect_get_constant_vectors): Note that the number of units
23069         is known to be constant.
23071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23072             Alan Hayward  <alan.hayward@arm.com>
23073             David Sherwood  <david.sherwood@arm.com>
23075         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23076         of units as polynomial.  Choose between WIDE and NARROW based
23077         on multiple_p.
23079 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23080             Alan Hayward  <alan.hayward@arm.com>
23081             David Sherwood  <david.sherwood@arm.com>
23083         * tree-vect-stmts.c (simd_clone_subparts): New function.
23084         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23086 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23087             Alan Hayward  <alan.hayward@arm.com>
23088             David Sherwood  <david.sherwood@arm.com>
23090         * tree-vect-stmts.c (vectorizable_call): Treat the number of
23091         vectors as polynomial.  Use build_index_vector for
23092         IFN_GOMP_SIMD_LANE.
23094 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23095             Alan Hayward  <alan.hayward@arm.com>
23096             David Sherwood  <david.sherwood@arm.com>
23098         * tree-vect-stmts.c (get_load_store_type): Treat the number of
23099         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23100         for variable-length vectors.
23101         (vectorizable_mask_load_store): Treat the number of units as
23102         polynomial, asserting that it is constant if the condition has
23103         already been enforced.
23104         (vectorizable_store, vectorizable_load): Likewise.
23106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23107             Alan Hayward  <alan.hayward@arm.com>
23108             David Sherwood  <david.sherwood@arm.com>
23110         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23111         of units as polynomial.  Punt if we can't tell at compile time
23112         which vector contains the final result.
23114 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23115             Alan Hayward  <alan.hayward@arm.com>
23116             David Sherwood  <david.sherwood@arm.com>
23118         * tree-vect-loop.c (vectorizable_induction): Treat the number
23119         of units as polynomial.  Punt on SLP inductions.  Use an integer
23120         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
23121         cast of such a series for variable-length floating-point
23122         reductions.
23124 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23125             Alan Hayward  <alan.hayward@arm.com>
23126             David Sherwood  <david.sherwood@arm.com>
23128         * tree.h (build_index_vector): Declare.
23129         * tree.c (build_index_vector): New function.
23130         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23131         of units as polynomial, forcibly converting it to a constant if
23132         vectorizable_reduction has already enforced the condition.
23133         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
23134         to create a {1,2,3,...} vector.
23135         (vectorizable_reduction): Treat the number of units as polynomial.
23136         Choose vectype_in based on the largest scalar element size rather
23137         than the smallest number of units.  Enforce the restrictions
23138         relied on above.
23140 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23141             Alan Hayward  <alan.hayward@arm.com>
23142             David Sherwood  <david.sherwood@arm.com>
23144         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23145         number of units as polynomial.
23147 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23148             Alan Hayward  <alan.hayward@arm.com>
23149             David Sherwood  <david.sherwood@arm.com>
23151         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23152         * target.def (autovectorize_vector_sizes): Return the vector sizes
23153         by pointer, using vector_sizes rather than a bitmask.
23154         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23155         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23156         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23157         Likewise.
23158         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23159         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23160         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23161         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23162         * omp-general.c (omp_max_vf): Likewise.
23163         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23164         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23165         * tree-vect-loop.c (vect_analyze_loop): Likewise.
23166         * tree-vect-slp.c (vect_slp_bb): Likewise.
23167         * doc/tm.texi: Regenerate.
23168         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23169         to a poly_uint64.
23170         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23171         the vector size as a poly_uint64 rather than an unsigned int.
23172         (current_vector_size): Change from an unsigned int to a poly_uint64.
23173         (get_vectype_for_scalar_type): Update accordingly.
23174         * tree.h (build_truth_vector_type): Take the size and number of
23175         units as a poly_uint64 rather than an unsigned int.
23176         (build_vector_type): Add a temporary overload that takes
23177         the number of units as a poly_uint64 rather than an unsigned int.
23178         * tree.c (make_vector_type): Likewise.
23179         (build_truth_vector_type): Take the number of units as a poly_uint64
23180         rather than an unsigned int.
23182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23183             Alan Hayward  <alan.hayward@arm.com>
23184             David Sherwood  <david.sherwood@arm.com>
23186         * target.def (get_mask_mode): Take the number of units and length
23187         as poly_uint64s rather than unsigned ints.
23188         * targhooks.h (default_get_mask_mode): Update accordingly.
23189         * targhooks.c (default_get_mask_mode): Likewise.
23190         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23191         * doc/tm.texi: Regenerate.
23193 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23194             Alan Hayward  <alan.hayward@arm.com>
23195             David Sherwood  <david.sherwood@arm.com>
23197         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23198         * omp-general.c (omp_max_vf): Likewise.
23199         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23200         (expand_omp_simd): Handle polynomial safelen.
23201         * omp-low.c (omplow_simd_context): Add a default constructor.
23202         (omplow_simd_context::max_vf): Change from int to poly_uint64.
23203         (lower_rec_simd_input_clauses): Update accordingly.
23204         (lower_rec_input_clauses): Likewise.
23206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23207             Alan Hayward  <alan.hayward@arm.com>
23208             David Sherwood  <david.sherwood@arm.com>
23210         * tree-vectorizer.h (vect_nunits_for_cost): New function.
23211         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23212         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23213         (vect_analyze_slp_cost): Likewise.
23214         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23215         (vect_model_load_cost): Likewise.
23217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23218             Alan Hayward  <alan.hayward@arm.com>
23219             David Sherwood  <david.sherwood@arm.com>
23221         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23222         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23223         from an unsigned int * to a poly_uint64_pod *.
23224         (calculate_unrolling_factor): New function.
23225         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
23227 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23228             Alan Hayward  <alan.hayward@arm.com>
23229             David Sherwood  <david.sherwood@arm.com>
23231         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23232         from an unsigned int to a poly_uint64.
23233         (_loop_vec_info::slp_unrolling_factor): Likewise.
23234         (_loop_vec_info::vectorization_factor): Change from an int
23235         to a poly_uint64.
23236         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23237         (vect_get_num_vectors): New function.
23238         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23239         (vect_get_num_copies): Use vect_get_num_vectors.
23240         (vect_analyze_data_ref_dependences): Change max_vf from an int *
23241         to an unsigned int *.
23242         (vect_analyze_data_refs): Change min_vf from an int * to a
23243         poly_uint64 *.
23244         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23245         than an unsigned HOST_WIDE_INT.
23246         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23247         (vect_analyze_data_ref_dependence): Change max_vf from an int *
23248         to an unsigned int *.
23249         (vect_analyze_data_ref_dependences): Likewise.
23250         (vect_compute_data_ref_alignment): Handle polynomial vf.
23251         (vect_enhance_data_refs_alignment): Likewise.
23252         (vect_prune_runtime_alias_test_list): Likewise.
23253         (vect_shift_permute_load_chain): Likewise.
23254         (vect_supportable_dr_alignment): Likewise.
23255         (dependence_distance_ge_vf): Take the vectorization factor as a
23256         poly_uint64 rather than an unsigned HOST_WIDE_INT.
23257         (vect_analyze_data_refs): Change min_vf from an int * to a
23258         poly_uint64 *.
23259         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23260         vfm1 as a poly_uint64 rather than an int.  Make the same change
23261         for the returned bound_scalar.
23262         (vect_gen_vector_loop_niters): Handle polynomial vf.
23263         (vect_do_peeling): Likewise.  Update call to
23264         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23265         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23266         be constant.
23267         * tree-vect-loop.c (vect_determine_vectorization_factor)
23268         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23269         (vect_get_known_peeling_cost): Likewise.
23270         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23271         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23272         (vect_transform_loop): Likewise.  Use the lowest possible VF when
23273         updating the upper bounds of the loop.
23274         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
23275         rather than an int.
23276         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23277         polynomial unroll factors.
23278         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23279         (vect_make_slp_decision): Likewise.
23280         (vect_supported_load_permutation_p): Likewise, and polynomial
23281         vf too.
23282         (vect_analyze_slp_cost): Handle polynomial vf.
23283         (vect_slp_analyze_node_operations): Likewise.
23284         (vect_slp_analyze_bb_1): Likewise.
23285         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23286         than an unsigned HOST_WIDE_INT.
23287         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23288         (vectorizable_load): Handle polynomial vf.
23289         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23290         a poly_uint64.
23291         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23293 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23294             Alan Hayward  <alan.hayward@arm.com>
23295             David Sherwood  <david.sherwood@arm.com>
23297         * match.pd: Handle bit operations involving three constants
23298         and try to fold one pair.
23300 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23302         * tree-vect-loop-manip.c: Include gimple-fold.h.
23303         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23304         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
23305         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23306         Add a path that uses a step of VF instead of 1, but disable it
23307         for now.
23308         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23309         and niters_no_overflow parameters.  Update calls to
23310         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23311         Create a new SSA name if the latter choses to use a ste other
23312         than zero, and return it via niters_vector_mult_vf_var.
23313         * tree-vect-loop.c (vect_transform_loop): Update calls to
23314         vect_do_peeling, vect_gen_vector_loop_niters and
23315         slpeel_make_loop_iterate_ntimes.
23316         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23317         (vect_gen_vector_loop_niters): Update declarations after above changes.
23319 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
23321         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23322         128-bit round to integer instructions.
23323         (ceil<mode>2): Likewise.
23324         (btrunc<mode>2): Likewise.
23325         (round<mode>2): Likewise.
23327 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23329         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23330         unaligned VSX load/store on P8/P9.
23331         (expand_block_clear): Allow the use of unaligned VSX
23332         load/store on P8/P9.
23334 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23336         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23337         New function.
23338         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23339         swap associated with both a load and a store.
23341 2018-01-02  Andrew Waterman  <andrew@sifive.com>
23343         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23344         * config/riscv/riscv.md (clear_cache): Use it.
23346 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
23348         * web.c: Remove out-of-date comment.
23350 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23352         * expr.c (fixup_args_size_notes): Check that any existing
23353         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23354         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23355         (emit_single_push_insn): ...here.
23357 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23359         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23360         (const_vector_encoded_nelts): New function.
23361         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23362         (const_vector_int_elt, const_vector_elt): Declare.
23363         * emit-rtl.c (const_vector_int_elt_1): New function.
23364         (const_vector_elt): Likewise.
23365         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23366         of CONST_VECTOR_ELT.
23368 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23370         * expr.c: Include rtx-vector-builder.h.
23371         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23372         directly on the tree encoding.
23373         (const_vector_from_tree): Likewise.
23374         * optabs.c: Include rtx-vector-builder.h.
23375         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23376         sequence of "u" values.
23377         * vec-perm-indices.c: Include rtx-vector-builder.h.
23378         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23379         directly on the vec_perm_indices encoding.
23381 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23383         * doc/rtl.texi (const_vector): Describe new encoding scheme.
23384         * Makefile.in (OBJS): Add rtx-vector-builder.o.
23385         * rtx-vector-builder.h: New file.
23386         * rtx-vector-builder.c: Likewise.
23387         * rtl.h (rtx_def::u2): Add a const_vector field.
23388         (CONST_VECTOR_NPATTERNS): New macro.
23389         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23390         (CONST_VECTOR_DUPLICATE_P): Likewise.
23391         (CONST_VECTOR_STEPPED_P): Likewise.
23392         (CONST_VECTOR_ENCODED_ELT): Likewise.
23393         (const_vec_duplicate_p): Check for a duplicated vector encoding.
23394         (unwrap_const_vec_duplicate): Likewise.
23395         (const_vec_series_p): Check for a non-duplicated vector encoding.
23396         Say that the function only returns true for integer vectors.
23397         * emit-rtl.c: Include rtx-vector-builder.h.
23398         (gen_const_vec_duplicate_1): Delete.
23399         (gen_const_vector): Call gen_const_vec_duplicate instead of
23400         gen_const_vec_duplicate_1.
23401         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23402         (gen_const_vec_duplicate): Use rtx_vector_builder.
23403         (gen_const_vec_series): Likewise.
23404         (gen_rtx_CONST_VECTOR): Likewise.
23405         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23406         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23407         Build a new vector rather than modifying a CONST_VECTOR in-place.
23408         (handle_special_swappables): Update call accordingly.
23409         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23410         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23411         Build a new vector rather than modifying a CONST_VECTOR in-place.
23412         (handle_special_swappables): Update call accordingly.
23414 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23416         * simplify-rtx.c (simplify_const_binary_operation): Use
23417         CONST_VECTOR_ELT instead of XVECEXP.
23419 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23421         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23422         the selector elements to be different from the data elements
23423         if the selector is a VECTOR_CST.
23424         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23425         ssizetype for the selector.
23427 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23429         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23430         before testing each element individually.
23431         * tree-vect-generic.c (lower_vec_perm): Likewise.
23433 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23435         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23436         * selftest-run-tests.c (selftest::run_tests): Call it.
23437         * vector-builder.h (vector_builder::operator ==): New function.
23438         (vector_builder::operator !=): Likewise.
23439         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23440         (vec_perm_indices::all_from_input_p): New function.
23441         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23442         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23443         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23444         instead of reading the VECTOR_CST directly.  Detect whether both
23445         vector inputs are the same before constructing the vec_perm_indices,
23446         and update the number of inputs argument accordingly.  Use the
23447         utility functions added above.  Only construct sel2 if we need to.
23449 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23451         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23452         the broadcast of the low byte.
23453         (expand_mult_highpart): Use an explicit encoding for the permutes.
23454         * optabs-query.c (can_mult_highpart_p): Likewise.
23455         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23456         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23457         (vectorizable_bswap): Likewise.
23458         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23459         explicit encoding for the power-of-2 permutes.
23460         (vect_permute_store_chain): Likewise.
23461         (vect_grouped_load_supported): Likewise.
23462         (vect_permute_load_chain): Likewise.
23464 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23466         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23467         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23468         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23469         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23470         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23471         (vect_gen_perm_mask_any): Likewise.
23473 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23475         * int-vector-builder.h: New file.
23476         * vec-perm-indices.h: Include int-vector-builder.h.
23477         (vec_perm_indices): Redefine as an int_vector_builder.
23478         (auto_vec_perm_indices): Delete.
23479         (vec_perm_builder): Redefine as a stand-alone class.
23480         (vec_perm_indices::vec_perm_indices): New function.
23481         (vec_perm_indices::clamp): Likewise.
23482         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23483         (vec_perm_indices::new_vector): New function.
23484         (vec_perm_indices::new_expanded_vector): Update for new
23485         vec_perm_indices class.
23486         (vec_perm_indices::rotate_inputs): New function.
23487         (vec_perm_indices::all_in_range_p): Operate directly on the
23488         encoded form, without computing elided elements.
23489         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23490         encoding.  Update for new vec_perm_indices class.
23491         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23492         the given vec_perm_builder.
23493         (expand_vec_perm_var): Update vec_perm_builder constructor.
23494         (expand_mult_highpart): Use vec_perm_builder instead of
23495         auto_vec_perm_indices.
23496         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23497         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23498         or double series encoding as appropriate.
23499         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23500         vec_perm_indices instead of auto_vec_perm_indices.
23501         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23502         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23503         (vect_permute_store_chain): Likewise.
23504         (vect_grouped_load_supported): Likewise.
23505         (vect_permute_load_chain): Likewise.
23506         (vect_shift_permute_load_chain): Likewise.
23507         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23508         (vect_transform_slp_perm_load): Likewise.
23509         (vect_schedule_slp_instance): Likewise.
23510         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23511         (vectorizable_mask_load_store): Likewise.
23512         (vectorizable_bswap): Likewise.
23513         (vectorizable_store): Likewise.
23514         (vectorizable_load): Likewise.
23515         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23516         vec_perm_indices instead of auto_vec_perm_indices.  Use
23517         tree_to_vec_perm_builder to read the vector from a tree.
23518         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23519         vec_perm_builder instead of a vec_perm_indices.
23520         (have_whole_vector_shift): Use vec_perm_builder and
23521         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23522         truncation to calc_vec_perm_mask_for_shift.
23523         (vect_create_epilog_for_reduction): Likewise.
23524         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23525         from auto_vec_perm_indices to vec_perm_indices.
23526         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23527         instead of changing individual elements.
23528         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23529         the vector in d.perm.
23530         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23531         from auto_vec_perm_indices to vec_perm_indices.
23532         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23533         instead of changing individual elements.
23534         (arm_vectorize_vec_perm_const): Use new_vector to install
23535         the vector in d.perm.
23536         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23537         Update vec_perm_builder constructor.
23538         (rs6000_expand_interleave): Likewise.
23539         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23540         (rs6000_expand_interleave): Likewise.
23542 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23544         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23545         to qimode could truncate the indices.
23546         * optabs.c (expand_vec_perm_var): Likewise.
23548 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23550         * Makefile.in (OBJS): Add vec-perm-indices.o.
23551         * vec-perm-indices.h: New file.
23552         * vec-perm-indices.c: Likewise.
23553         * target.h (vec_perm_indices): Replace with a forward class
23554         declaration.
23555         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23556         * optabs.h: Include vec-perm-indices.h.
23557         (expand_vec_perm): Delete.
23558         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23559         (expand_vec_perm_const): Declare.
23560         * target.def (vec_perm_const_ok): Replace with...
23561         (vec_perm_const): ...this new hook.
23562         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23563         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23564         * doc/tm.texi: Regenerate.
23565         * optabs.def (vec_perm_const): Delete.
23566         * doc/md.texi (vec_perm_const): Likewise.
23567         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23568         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23569         expand_vec_perm for constant permutation vectors.  Assert that
23570         the mode of variable permutation vectors is the integer equivalent
23571         of the mode that is being permuted.
23572         * optabs-query.h (selector_fits_mode_p): Declare.
23573         * optabs-query.c: Include vec-perm-indices.h.
23574         (selector_fits_mode_p): New function.
23575         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23576         is defined, instead of checking whether the vec_perm_const_optab
23577         exists.  Use targetm.vectorize.vec_perm_const instead of
23578         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23579         fit in the vector mode before using a variable permute.
23580         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23581         vec_perm_indices instead of an rtx.
23582         (expand_vec_perm): Replace with...
23583         (expand_vec_perm_const): ...this new function.  Take the selector
23584         as a vec_perm_indices rather than an rtx.  Also take the mode of
23585         the selector.  Update call to shift_amt_for_vec_perm_mask.
23586         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23587         Use vec_perm_indices::new_expanded_vector to expand the original
23588         selector into bytes.  Check whether the indices fit in the vector
23589         mode before using a variable permute.
23590         (expand_vec_perm_var): Make global.
23591         (expand_mult_highpart): Use expand_vec_perm_const.
23592         * fold-const.c: Includes vec-perm-indices.h.
23593         * tree-ssa-forwprop.c: Likewise.
23594         * tree-vect-data-refs.c: Likewise.
23595         * tree-vect-generic.c: Likewise.
23596         * tree-vect-loop.c: Likewise.
23597         * tree-vect-slp.c: Likewise.
23598         * tree-vect-stmts.c: Likewise.
23599         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23600         Delete.
23601         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23602         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23603         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23604         (aarch64_vectorize_vec_perm_const): ...this new function.
23605         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23606         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23607         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23608         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23609         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23610         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23611         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23612         into...
23613         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23614         check for NEON modes.
23615         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23616         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23617         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23618         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23619         into...
23620         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23621         the old VEC_PERM_CONST conditions.
23622         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23623         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23624         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23625         (ia64_vectorize_vec_perm_const_ok): Merge into...
23626         (ia64_vectorize_vec_perm_const): ...this new function.
23627         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23628         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23629         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23630         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23631         * config/mips/mips.c (mips_expand_vec_perm_const)
23632         (mips_vectorize_vec_perm_const_ok): Merge into...
23633         (mips_vectorize_vec_perm_const): ...this new function.
23634         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23635         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23636         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23637         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23638         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23639         (rs6000_expand_vec_perm_const): Delete.
23640         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23641         Delete.
23642         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23643         (altivec_expand_vec_perm_const_le): Take each operand individually.
23644         Operate on constant selectors rather than rtxes.
23645         (altivec_expand_vec_perm_const): Likewise.  Update call to
23646         altivec_expand_vec_perm_const_le.
23647         (rs6000_expand_vec_perm_const): Delete.
23648         (rs6000_vectorize_vec_perm_const_ok): Delete.
23649         (rs6000_vectorize_vec_perm_const): New function.
23650         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23651         an element count and rtx array.
23652         (rs6000_expand_extract_even): Update call accordingly.
23653         (rs6000_expand_interleave): Likewise.
23654         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23655         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23656         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23657         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23658         (rs6000_expand_vec_perm_const): Delete.
23659         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23660         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23661         (altivec_expand_vec_perm_const_le): Take each operand individually.
23662         Operate on constant selectors rather than rtxes.
23663         (altivec_expand_vec_perm_const): Likewise.  Update call to
23664         altivec_expand_vec_perm_const_le.
23665         (rs6000_expand_vec_perm_const): Delete.
23666         (rs6000_vectorize_vec_perm_const_ok): Delete.
23667         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23668         reference to the SPE evmerge intructions.
23669         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23670         an element count and rtx array.
23671         (rs6000_expand_extract_even): Update call accordingly.
23672         (rs6000_expand_interleave): Likewise.
23673         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23674         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23675         new function.
23676         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23678 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23680         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23681         vector mode and that that mode matches the mode of the data
23682         being permuted.
23683         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23684         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23685         directly using expand_vec_perm_1 when forcing selectors into
23686         registers.
23687         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23689 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23691         * optabs-query.h (can_vec_perm_p): Delete.
23692         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23693         * optabs-query.c (can_vec_perm_p): Split into...
23694         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23695         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23696         particular selector is valid.
23697         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23698         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23699         (vect_grouped_load_supported): Likewise.
23700         (vect_shift_permute_load_chain): Likewise.
23701         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23702         (vect_transform_slp_perm_load): Likewise.
23703         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23704         (vectorizable_bswap): Likewise.
23705         (vect_gen_perm_mask_checked): Likewise.
23706         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23707         implementations of variable permutation vectors into account
23708         when deciding which selector to use.
23709         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23710         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23711         with a false third argument.
23712         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23713         to test whether the constant selector is valid and can_vec_perm_var_p
23714         to test whether a variable selector is valid.
23716 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23718         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23719         * optabs-query.c (can_vec_perm_p): Likewise.
23720         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23721         instead of vec_perm_indices.
23722         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23723         (vect_gen_perm_mask_checked): Likewise,
23724         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23725         (vect_gen_perm_mask_checked): Likewise,
23727 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23729         * optabs-query.h (qimode_for_vec_perm): Declare.
23730         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23731         (qimode_for_vec_perm): ...this new function.
23732         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23734 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23736         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23737         does not have a conditional at the top.
23739 2018-01-02  Richard Biener  <rguenther@suse.de>
23741         * ipa-inline.c (big_speedup_p): Fix expression.
23743 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23745         PR target/81616
23746         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23747         for generic 4->6.
23749 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23751         PR target/81616
23752         Generic tuning.
23753         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23754         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23755         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23756         cond_taken_branch_cost 3->4.
23758 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23760         PR tree-optimization/83581
23761         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23762         TODO_cleanup_cfg if any changes have been made.
23764         PR middle-end/83608
23765         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23766         convert_modes if target mode has the right side, but different mode
23767         class.
23769         PR middle-end/83609
23770         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23771         last argument when extracting from CONCAT.  If either from_real or
23772         from_imag is NULL, use expansion through memory.  If result is not
23773         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23774         the parts directly to inner mode, if even that fails, use expansion
23775         through memory.
23777         PR middle-end/83623
23778         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23779         check for bswap in mode rather than HImode and use that in expand_unop
23780         too.
23782 Copyright (C) 2018 Free Software Foundation, Inc.
23784 Copying and distribution of this file, with or without modification,
23785 are permitted in any medium without royalty provided the copyright
23786 notice and this notice are preserved.