[AArch64] Improve SVE handling of single-vector permutes
[official-gcc.git] / gcc / ChangeLog
blob64e6d8e7b974397ca3ed9f88e41c1a4f6248eef7
1 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
3         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4         of single-vector TBLs.
5         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6         one input is given.
8 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
10         PR target/85910
11         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
12         aarch64_evpc_tbl guard.
14 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
17         behaviour.
19 2018-08-22  Martin Sebor  <msebor@redhat.com>
21         PR middle-end/87052
22         * tree-pretty-print.c (pretty_print_string): Add argument.
23         (dump_generic_node): Call to pretty_print_string with string size.
25 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
27         PR rtl-optimization/86771
28         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
29         of two SETs into those two SETs, one to be placed at i2, if that SETs
30         destination is modified between i2 and i3.
32 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
34         PR tree-optimization/86725
35         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
36         function.
37         (vect_analyze_scalar_cycles_1): Check it.
39 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
41         PR tree-optimization/86725
42         * tree-vect-loop.c (vect_is_simple_reduction): When treating
43         an outer loop phi as a double reduction, make sure that the
44         single user of the phi result is an inner loop phi.
46 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
48         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
49         grouped stores with gaps to a strided group.
51 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
53         * tree-vect-stmts.c (get_group_load_store_type)
54         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
55         first statement in a group.
57 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
59         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
60         the sequence used in gcc/gcc.c.
62 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
64         PR other/704
65         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
66         building it.
68 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
70         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
71         Darwin10-specific unwinder-shim.
72         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
73         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
74         New to cater for Darwin10 Rosetta.
76 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
78         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
79         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
81 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
83         PR bootstrap/81033
84         PR target/81733
85         PR target/52795
86         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
87         (dwarf2out_switch_text_section): Generate a local label for the
88         second function sub-section and apply it as the second FDE start
89         label.
90         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
91         second sub-section start.
93 2018-08-22  Richard Biener  <rguenther@suse.de>
95         PR tree-optimization/86988
96         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
98 2018-08-22  Richard Biener  <rguenther@suse.de>
100         PR tree-optimization/86945
101         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
103 2018-08-22  Alexandre Oliva <oliva@adacore.com>
105         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
106         a comment about how uses of r2 for .sdata2 come about.
108 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
110         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
112 2018-08-21  Marek Polacek  <polacek@redhat.com>
114         PR c++/86981, Implement -Wpessimizing-move.
115         * doc/invoke.texi: Document -Wpessimizing-move.
117 2018-08-21  Jan Hubicka  <jh@suse.cz>
119         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
120         * tree.h (is_redundant_typedef): Remove.
121         * dwarf2out.c (is_redundant_typedef): Turn into static function.
123 2018-08-21  Jan Hubicka  <jh@suse.cz>
125         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
126         when possible.
128 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
130         * expmed.c (extract_low_bits): Reject invalid subregs early.
132 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
134         PR middle-end/86121
135         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
136         behaviour.
138 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
140         * config/vxworks.h: Guard vxworks_asm_out_constructor and
141         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
142         * config/vxworks.c: Likewise.
144 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
146         * config/vxworks.c: Set targetm.have_ctors_dtors
147         if HAVE_INITFINI_ARRAY_SUPPORT.
148         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
149         if HAVE_INITFINI_ARRAY_SUPPORT.
151 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
153         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
154         default search path for VxWorks < 7.
156 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
158         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
159         (get_format_string): Refer to c_getstr.
161 2018-08-21  Tom de Vries  <tdevries@suse.de>
163         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
164         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
165         (debuginfo_early_stop): Declare.
166         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
167         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
168         (debuginfo_early_stop): New function.
169         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
170         and debuginfo_early_stop.
171         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
172         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
173         (general_init): Call debuginfo_early_init.
174         (finalize): Call debuginfo_fini.
175         (do_compile): Call debuginfo_init.
176         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
177         -fdump-early-debug.
178         (@item -fdump-debug, @item -fdump-earlydebug): Add.
180 2018-08-21  Tom de Vries  <tdevries@suse.de>
182         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
183         flag_dump_noaddr and flag_dump_unnumbered.
185 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
187         * wide-int-range.cc (wide_int_range_abs): New.
188         (wide_int_range_order_set): Rename from wide_int_range_min_max.
189         * wide-int-range.h (wide_int_range_abs): New.
190         (wide_int_range_min_max): New.
191         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
192         case to call wide_int_range_abs.
193         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
194         (extract_range_from_abs_expr): Delete.
196 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
198         PR target/87033
199         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
200         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
201         for indexed loads.
203 2018-08-20  Nathan Sidwell  <nathan@acm.org>
204             Jeff Law <law@redhat.com>
206         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
207         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
209 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
211         PR other/84889
212         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
213         (decl_attributes): Likewise.
214         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
215         instance.
216         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
217         * diagnostic-core.h (class auto_diagnostic_group): New class.
218         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
219         (diagnostic_report_diagnostic): Handle the first diagnostics within
220         a group.
221         (emit_diagnostic): Add auto_diagnostic_group instance.
222         (inform): Likewise.
223         (inform_n): Likewise.
224         (warning): Likewise.
225         (warning_at): Likewise.
226         (warning_n): Likewise.
227         (pedwarn): Likewise.
228         (permerror): Likewise.
229         (error): Likewise.
230         (error_n): Likewise.
231         (error_at): Likewise.
232         (sorry): Likewise.
233         (fatal_error): Likewise.
234         (internal_error): Likewise.
235         (internal_error_no_backtrace): Likewise.
236         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
237         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
238         * diagnostic.h (struct diagnostic_context): Add fields
239         "diagnostic_group_nesting_depth",
240         "diagnostic_group_emission_count", "begin_group_cb",
241         "end_group_cb".
242         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
243         Add auto_diagnostic_group instance(s).
244         (find_explicit_erroneous_behavior): Likewise.
245         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
246         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
247         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
248         (gimplify_va_arg_expr): Likewise.
249         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
250         (HSA_SORRY_AT): Likewise.
251         * ipa-devirt.c (compare_virtual_tables): Likewise.
252         (warn_odr): Likewise.
253         * multiple_target.c (expand_target_clones): Likewise.
254         * opts-common.c (cmdline_handle_error): Likewise.
255         * reginfo.c (globalize_reg): Likewise.
256         * substring-locations.c (format_warning_n_va): Likewise.
257         * tree-inline.c (expand_call_inline): Likewise.
258         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
259         * tree-ssa-loop-niter.c
260         (do_warn_aggressive_loop_optimizations): Likewise.
261         * tree-ssa-uninit.c (warn_uninit): Likewise.
262         * tree.c (warn_deprecated_use): Likewise.
264 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
266         PR target/87014
267         * config/i386/i386.md (eh_return): Always update EH return
268         address in word_mode.
270 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
272         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
273         TARGET_SPLIT_COMPLEX_ARG is defined.
275 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
277         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
279 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
281         PR target/86984
282         * expr.c (expand_assignment): Assert that bitpos is positive.
283         (store_field): Likewise
284         (expand_expr_real_1): Make sure that bitpos is positive.
285         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
286         integer overflow.
288 2018-08-20  Nathan Sidwell  <nathan@acm.org>
290         * Makefile.in (CPP_ID_DATA_H): Delete.
291         (CPP_INTERNAL_H): Don't add it.
292         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
293         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
295 2018-08-20  Richard Biener  <rguenther@suse.de>
297         PR tree-optimization/78655
298         * tree-vrp.c (extract_range_from_binary_expr_1): Make
299         pointer + offset nonnull if either operand is nonnull work.
301 2018-08-20  Tom de Vries  <tdevries@suse.de>
303         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
304         unless the referenced die describes the added property using
305         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
306         Otherwise, add a DW_AT_location to the referenced die.
308 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
310         PR target/86994
311         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
312         register_operand when calling ix86_set_reg_reg_cost.
313         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
314         Set *total to 0 for operands that satisfy x86_64_immediate_operand
315         predicate and to 1 otherwise.
317 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
319         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
320         emit a diagnostic that it is not supported and reset the option.
321         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
322         supported and consume the option.  (ASM_FINAL_SPEC): New.
324 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
326         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
327         a sentence.
329 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
331         C-SKY port: Documentation
333         * doc/extend.texi (C-SKY Function Attributes): New section.
334         * doc/invoke.texi (Option Summary): Add C-SKY options.
335         (C-SKY Options): New section.
336         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
338 2018-08-17  Jojo  <jijie_rong@c-sky.com>
339             Huibin Wang  <huibin_wang@c-sky.com>
340             Sandra Loosemore  <sandra@codesourcery.com>
341             Chung-Lin Tang  <cltang@codesourcery.com>
343         C-SKY port: Backend implementation
345         * config/csky/*: New.
346         * common/config/csky/*: New.
348 2018-08-17  Jojo  <jijie_rong@c-sky.com>
349             Huibin Wang  <huibin_wang@c-sky.com>
350             Sandra Loosemore  <sandra@codesourcery.com>
351             Chung-Lin Tang  <cltang@codesourcery.com>
352             Andrew Jenner  <andrew@codesourcery.com>
354         C-SKY port: Configury
356         * config.gcc (csky-*-*): New.
357         * configure.ac: Add csky to targets for dwarf2 debug_line support.
358         * configure: Regenerated.
360 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
362         * dump-context.h: Include "dumpfile.h".
363         (dump_context::dump_printf_va): Convert final param from va_list
364         to va_list *.  Convert from ATTRIBUTE_PRINTF to
365         ATTRIBUTE_GCC_DUMP_PRINTF.
366         (dump_context::dump_printf_loc_va): Likewise.
367         * dumpfile.c: Include "stringpool.h".
368         (make_item_for_dump_printf_va): Delete.
369         (make_item_for_dump_printf): Delete.
370         (class dump_pretty_printer): New class.
371         (dump_pretty_printer::dump_pretty_printer): New ctor.
372         (dump_pretty_printer::emit_items): New member function.
373         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
374         function.
375         (dump_pretty_printer::emit_item): New member function.
376         (dump_pretty_printer::stash_item): New member function.
377         (dump_pretty_printer::format_decoder_cb): New member function.
378         (dump_pretty_printer::decode_format): New member function.
379         (dump_context::dump_printf_va): Reimplement in terms of
380         dump_pretty_printer.
381         (dump_context::dump_printf_loc_va): Convert final param from va_list
382         to va_list *.
383         (dump_context::begin_scope): Reimplement call to
384         make_item_for_dump_printf.
385         (dump_printf): Update for change to dump_printf_va.
386         (dump_printf_loc): Likewise.
387         (selftest::test_capture_of_dump_calls): Convert "stmt" from
388         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
389         with %T, %E, and %G.
390         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
391         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
392         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
393         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
394         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
395         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
396         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
397         within a dump_printf_loc call to "%wu".
398         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
399         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
400         missing space after "=".
401         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
402         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
403         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
404         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
405         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
406         duplicate "vectorized" from message.
408 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
410         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
411         polyNxK_t element's TYPE_STRING_FLAG.
413 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
415         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
416         (they were unnamed before).  Fix comments.
418 2018-08-17  Nathan Sidwell  <nathan@acm.org>
420         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
422 2018-08-17  Richard Biener  <rguenther@suse.de>
424         PR tree-optimization/86841
425         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
427 2018-08-17  Martin Liska  <mliska@suse.cz>
429         * common.opt: Remove Warn, Init and Report for options with
430         Ignore/Deprecated flag. Warning is done automatically for
431         Deprecated flags.
432         * config/i386/i386.opt: Likewise.
433         * config/ia64/ia64.opt: Likewise.
434         * config/rs6000/rs6000.opt: Likewise.
435         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
436         Remove usage of flag_check_pointer_bounds.
437         * lto-wrapper.c (merge_and_complain): Do not handle
438         OPT_fcheck_pointer_bounds.
439         (append_compiler_options): Likewise.
440         * opt-functions.awk: Do not handle Deprecated.
441         * optc-gen.awk: Check that Var, Report and Init are not
442         used for an option with Ignore/Deprecated flag.
443         * opts-common.c (decode_cmdline_option): Do not report
444         CL_ERR_DEPRECATED.
445         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
446         options.
447         * opts.h (struct cl_option): Remove cl_deprecated flag.
448         (CL_ERR_DEPRECATED): Remove error enum value.
450 2018-08-17  Richard Biener  <rguenther@suse.de>
452         PR middle-end/86505
453         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
454         across a va-arg-pack using call adjust its return value accordingly.
456 2018-08-16  Martin Sebor  <msebor@redhat.com>
458         PR tree-optimization/86853
459         * gimple-ssa-sprintf.c (struct format_result): Rename member.
460         (struct fmtresult): Add member and initialize it in ctors.
461         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
462         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
463         (format_directive): Set POSUNDER4K when MAYFAIL is set.
464         (parse_directive): Handle %C same as %c.
465         (sprintf_dom_walker::compute_format_length): Adjust.
466         (is_call_safe): Adjust.
468 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
470         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
471         for determining how to count the elements.
472         * builtins.h (c_strlen): Adjust prototype.
473         * expr.c (string_constant): Add new parameter mem_size.
474         Set *mem_size appropriately.
475         * expr.h (string_constant): Adjust protoype.
476         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
477         * gimple-fold.h (get_range_strlen): Adjust prototype.
478         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
479         (format_string): Call get_string_length with eltsize.
481 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
483         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
484         to emit the span, rather than setting it as the prefix.
486 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
488         * diagnostic-show-locus.c (layout::start_annotation_line): Add
489         "margin_char" parameter, defaulting to space.  Use it in place
490         of pp_space for the initial part of the margin.
491         (layout::print_leading_fixits): Use '+' when filling the margin
492         of line-insertion fix-it hints.
494 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
496         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
497         Delete.
499 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
501         * config/rs6000/altivec.md: Don't set length attribute to the default
502         value.
503         * config/rs6000/darwin.md: Ditto.
504         * config/rs6000/dfp.md: Ditto.
505         * config/rs6000/htm.md: Ditto.
506         * config/rs6000/rs6000.md: Ditto.
507         * config/rs6000/sync.md: Ditto.
508         * config/rs6000/vsx.md: Ditto.
510 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
512         * config/rs6000/altivec.md: Don't set length attribute to the default
513         value, for branch instructions.
514         * config/rs6000/darwin.md: Ditto.
515         * config/rs6000/rs6000.md: Ditto.
517 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
519         * config/rs6000/rs6000.md (length): Always define as const_int 4.
520         (unnamed conditional branch define_insn): Set length to 4 or 8
521         depending on offset.
522         (<bd>_<mode>): Similar, for alternative 0.
523         (<bd>tf_<mode>): Ditto.
525 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
527         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
529 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
531         * doc/rtl.texi: Replace old RTX class names with new names.
534 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
536         * expmed.h (canonicalize_comparison): New declaration.
537         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
538         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
539         * optabs.c (prepare_cmp_insn): Likewise.
540         * rtl.h (unsigned_condition_p): New function which checks if a
541         comparison operator is unsigned.
543 2018-08-16  Nathan Sidwell  <nathan@acm.org>
545         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
546         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
548 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
550         PR target/84711
551         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
552         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
553         (mov<mov>): ..this and enable unconditionally.
555 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
557         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
559 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
561         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
562         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
563         "Common" with "Target".
565 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
567         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
568         * doc/invoke.texi (mmitigate-rop): Remove.
569         * config/i386/i386.c: Do not include "regrename.h".
570         (ix86_rop_should_change_byte_p, reg_encoded_number)
571         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
572         Remove.
573         (ix86_reorg): Remove call to ix86_mitigate_rop.
574         * config/i386/i386.md (attr "modrm_class"): Remove.
575         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
576         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
577         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
579 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
581         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
582         allow folding of mergeh() and mergel() for the float and double types.
583         (fold_mergehl_helper): Rework to handle building a permute tree
584         for float vectors.
586 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
588         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
589         for TARGET_SSE.
591 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
593         * common.opt (fdiagnostics-show-labels): New option.
594         * diagnostic-show-locus.c (class layout_range): Add field
595         "m_label".
596         (class layout): Add field "m_show_labels_p".
597         (layout_range::layout_range): Add param "label" and use it to
598         initialize m_label.
599         (make_range): Pass in NULL for new "label" param of layout_range's
600         ctor.
601         (layout::layout): Initialize m_show_labels_p.
602         (layout::maybe_add_location_range): Pass in loc_range->m_label
603         when constructing layout_range instances.
604         (struct line_label): New struct.
605         (layout::print_any_labels): New member function.
606         (layout::print_line): Call it if label-printing is enabled.
607         (selftest::test_one_liner_labels): New test.
608         (selftest::test_diagnostic_show_locus_one_liner): Call it.
609         * diagnostic.c (diagnostic_initialize): Initialize
610         context->show_labels_p.
611         * diagnostic.h (struct diagnostic_context): Add field
612         "show_labels_p".
613         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
614         -fno-diagnostics-show-labels.
615         * dwarf2out.c (gen_producer_string): Add
616         OPT_fdiagnostics_show_labels to the ignored options.
617         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
618         param.
619         (gcc_rich_location::maybe_add_expr): Likewise.
620         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
621         label" param, defaulting to NULL.
622         (gcc_rich_location::add_expr): Add "label" param.
623         (gcc_rich_location::maybe_add_expr): Likewise.
624         (class text_range_label): New class.
625         (class range_label_for_type_mismatch): New class.
626         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
627         of format_warning_va.
628         (fmtwarn_n): Likewise for new params of format_warning_n_va.
629         * lto-wrapper.c (merge_and_complain): Add
630         OPT_fdiagnostics_show_labels to the "pick one setting" options.
631         (append_compiler_options): Likewise to the dropped options.
632         (append_diag_options): Likewise to the passed-on options.
633         * opts.c (common_handle_option): Handle the new option.
634         * selftest-diagnostic.c
635         (test_diagnostic_context::test_diagnostic_context): Enable
636         show_labels_p.
637         * substring-locations.c: Include "gcc-rich-location.h".
638         (format_warning_n_va): Add "fmt_label" and "param_label" params
639         and use them as appropriate.
640         (format_warning_va): Add "fmt_label" and "param_label" params,
641         passing them on to format_warning_n_va.
642         (format_warning_at_substring): Likewise.
643         (format_warning_at_substring_n): Likewise.
644         * substring-locations.h (format_warning_va): Add "fmt_label" and
645         "param_label" params.
646         (format_warning_n_va): Likewise.
647         (format_warning_at_substring): Likewise.
648         (format_warning_at_substring_n): Likewise.
649         * toplev.c (general_init): Initialize global_dc->show_labels_p.
651 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
653         PR testsuite/86519
654         * builtins.c (expand_builtin_memcmp): Do not expand the call
655         when overflow is detected.
657 2018-08-15  Martin Sebor  <msebor@redhat.com>
659         PR tree-optimization/71625
660         * config/aarch64/aarch64-builtins.c
661         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
663 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
665         * config/s390/s390.c (s390_reorg): Remove loop.
667 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
669         * config/darwin.c
670          (darwin_function_switched_text_sections): Delete.
671         * gcc/config/darwin.h
672          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
674 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
676         PR target/81685
677         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
678         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
679         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
681 2018-08-15  Martin Liska  <mliska@suse.cz>
683         PR tree-optimization/86925
684         * predict.c (expr_expected_value_1): When taking
685         later predictor, assign also probability.
686         Use fold_build2_initializer_loc in order to fold
687         the expression in -frounding-math.
689 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
691         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
692         patterns.
693         (expand_vec_perm_1): Try the new method.
695 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
697         PR target/86547
698         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
699         Check whether lra_live_max_point is 0 before dividing.
701 2018-08-14  Martin Sebor  <msebor@redhat.com>
703         PR tree-optimization/86650
704         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
705         (vrp_prop::check_mem_ref): Same.
707 2018-08-13  Liu Hao <lh_mouse@126.com>
709         * pretty-print.c (eat_esc_sequence): Swap the foreground and
710         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
711         and clear it thereafter, as it only works for DBCS.
713 2018-08-13  Liu Hao <lh_mouse@126.com>
715         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
716         handle returned by _get_osf_handle().
718 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
720         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
721         for folding vec_perm.
723 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
725         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
726         Add support for gimple-folding of vec_pack() and vec_unpack()
727         intrinsics.
729 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
731         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
732         vec_xst variants to the list.
733         (rs6000_gimple_fold_builtin): Add support for folding unaligned
734         vector loads and stores.
736 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
738         * config.gcc (rs6000-ibm-aix4.x): Delete.
739         (rs6000-ibm-aix5.1): Delete.
740         (rs6000-ibm-aix5.2): Delete.
741         (rs6000-ibm-aix5.3): Delete.
742         * config/rs6000/aix43.h: Delete.
743         * config/rs6000/aix51.h: Delete.
744         * config/rs6000/aix52.h: Delete.
745         * config/rs6000/t-aix43: Delete.
747 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
749         * config/s390/s390.c (s390_decompose_constant_pool_ref):
750         New function.
751         (s390_decompose_address): Factor out constant pool ref
752         decomposition.
754 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
756         * config/nds32/nds32-predicates.c
757         (nds32_can_use_bclr_p): Change return type as bool.
758         (nds32_can_use_bset_p): Ditto.
759         (nds32_can_use_btgl_p): Ditto.
760         (nds32_can_use_bitci_p): Ditto.
761         * config/nds32/nds32-protos.h
762         (nds32_can_use_bclr_p): Change declaration.
763         (nds32_can_use_bset_p): Ditto.
764         (nds32_can_use_btgl_p): Ditto.
765         (nds32_can_use_bitci_p): Ditto.
767 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
769         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
770         Support -msched-prolog-epilog option.
771         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
773 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
775         * common/config/nds32/nds32-common.c
776         (nds32_option_optimization_table): Enalbe -malways-align.
778 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
780         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
781         extra_headers.
782         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
783         OPT_misr_secure_ case.
784         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
785         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
786         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
787         secure attribute.
788         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
789         (nds32_isr_info): New field security_level.
790         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
791         * config/nds32/nds32.md (return_internal): Consider critical attribute.
792         * config/nds32/nds32.opt (misr-secure): New option.
793         * config/nds32/nds32_init.inc: New file.
794         * config/nds32/nds32_isr.h: New file.
796 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
798         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
799         Update comment for atomic instructions.
800         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
801         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
802         Remove.
803         (atomic_loaddi): Revise fence expansion to only emit fence prior to
804         load for __ATOMIC_SEQ_CST model.
805         (atomic_loaddi_1): Remove float register target.
806         (atomic_storedi): Handle CONST_INT values.
807         (atomic_storedi_1): Remove float register source.  Add special case
808         for zero value.
809         (memory_barrier): New expander and insn.
811 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
813         PR tree-optimization/86835
814         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
815         new_stmt after def_gsi, make sure to insert new_square_stmt after
816         that stmt, not 2 stmts before it.
818 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
820         PR target/82418
821         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
822         instead of SWI48.
824 2018-08-10  Martin Liska  <mliska@suse.cz>
826         PR target/83610
827         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
828         function type.
829         * builtins.c (expand_builtin_expect_with_probability):
830         New function.
831         (expand_builtin_expect_with_probability): New function.
832         (build_builtin_expect_predicate): Add new argumnet probability
833         for BUILT_IN_EXPECT_WITH_PROBABILITY.
834         (fold_builtin_expect):
835         (fold_builtin_2):
836         (fold_builtin_3):
837         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
838         * builtins.h (fold_builtin_expect): Set new argument.
839         * doc/extend.texi: Document __builtin_expect_with_probability.
840         * doc/invoke.texi: Likewise.
841         * gimple-fold.c (gimple_fold_call): Pass new argument.
842         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
843         also BUILT_IN_EXPECT_WITH_PROBABILITY.
844         * predict.c (get_predictor_value): New function.
845         (expr_expected_value): Add new argument probability. Assume
846         that predictor and probability are always non-null.
847         (expr_expected_value_1): Likewise.  For __builtin_expect and
848         __builtin_expect_with_probability set probability.  Handle
849         combination in binary expressions.
850         (tree_predict_by_opcode): Simplify code by simply calling
851         get_predictor_value.
852         (pass_strip_predict_hints::execute): Add handling of
853         BUILT_IN_EXPECT_WITH_PROBABILITY.
854         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
855         new predictor.
856         * tree.h (DECL_BUILT_IN_P): New function.
858 2018-08-10  Martin Liska  <mliska@suse.cz>
860         PR tree-optimization/85799
861         * passes.def: Add argument for pass_strip_predict_hints.
862         * predict.c (class pass_strip_predict_hints): Add new argument
863         early_p.
864         (strip_predictor_early): New function.
865         (pass_strip_predict_hints::execute): Call the function to
866         strip predictors.
867         (strip_predict_hints): New function.
868         * predict.def: Fix comment.
870 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
872         * Makefile.in: Clarify which tm.texi to copy over to assert the
873         right to grant a GFDL license for all.
875 2018-08-09  Jeff Law  <law@redhat.com>
877         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
878         unused variable.
880 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
882         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
883         prototype.
885 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
887         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
888         reductions for variable-length vectors.
890 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
892         PR other/84889
893         * common.opt (fdiagnostics-show-line-numbers): New option.
894         * diagnostic-show-locus.c (class layout): Add fields
895         "m_show_line_numbers_p" and "m_linenum_width";
896         (num_digits): New function.
897         (test_num_digits): New function.
898         (layout::layout): Initialize new fields.  Update m_x_offset
899         logic to handle any left margin.
900         (layout::print_source_line): Print line number when requested.
901         (layout::start_annotation_line): New member function.
902         (layout::print_annotation_line): Call it.
903         (layout::print_leading_fixits): Likewise.
904         (layout::print_trailing_fixits): Likewise.  Update calls to
905         move_to_column for new parameter.
906         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
907         it to potentially call start_annotation_line.
908         (layout::show_ruler): Call start_annotation_line.
909         (selftest::test_line_numbers_multiline_range): New selftest.
910         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
911         and selftest::test_line_numbers_multiline_range.
912         * diagnostic.c (diagnostic_initialize): Initialize
913         show_line_numbers_p.
914         * diagnostic.h (struct diagnostic_context): Add field
915         "show_line_numbers_p".
916         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
917         -fno-diagnostics-show-line-numbers.
918         * dwarf2out.c (gen_producer_string): Add
919         OPT_fdiagnostics_show_line_numbers to the ignored options.
920         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
921         one setting" options.
922         (append_compiler_options): Likewise to the dropped options.
923         (append_diag_options): Likewise to the passed-on options.
924         * opts.c (common_handle_option): Handle the new option.
925         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
927 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
929         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
930         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
931         third argument of type "const signed char" to descriptions of
932         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
933         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
934         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
935         __builtin_bcdsub_ov functions.
937 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
939         PR tree-optimization/86858
940         * tree-vect-loop.c (vect_is_simple_reduction): Restore
941         flow_bb_inside_loop_p calls.
943 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
945         PR tree-optimization/86871
946         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
947         instead of gimple_assign_lhs.
949 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
951         PR target/86887
952         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
953         register constraint to operand 0.
954         (add<mode>3_carryinC): Likewise.
955         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
957 2018-08-09  Martin Liska  <mliska@suse.cz>
959         PR c/86895
960         * common.opt: Remove extra line.
962 2018-08-09  Martin Liska  <mliska@suse.cz>
964         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
965         at the end of a line, make first letter capital and end up
966         a sentence with a dot.
967         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
968         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
969         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
970         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
971         (PARAM_MAX_ISL_OPERATIONS): Likewise.
972         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
973         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
974         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
975         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
976         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
977         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
978         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
979         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
980         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
981         (PARAM_TREE_REASSOC_WIDTH): Likewise.
982         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
983         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
984         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
986 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
988         PR target/84332
989         * config/s390/s390.c (s390_option_override_internal): Reduce the
990         stack-clash-protection-probe-interval param if it would be too big
991         for z900.
993 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
995         PR target/46179
996         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
997         * config/m68k/m68k.c (handle_move_double): Don't call
998         m68k_final_prescan_insn.
999         (m68k_adjust_decorated_operand): Renamed from
1000         m68k_final_prescan_insn, remove first and third operand and
1001         simplify.
1002         (print_operand): Call it.
1003         (print_operand_address): Call it.
1005 2018-08-08  Nathan Sidwell  <nathan@acm.org>
1007         * diagnostic.c (diagnostic_report_current_module): Use
1008         linemap_included_from & linemap_included_from_linemap.
1010 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
1012         * config/aarch64/aarch64-cores.def: Add phecda core.
1013         * config/aarch64/aarch64-tune.md: Regenerate.
1014         * doc/invoke.texi: Add phecda core.
1016 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1018         PR target/85295
1019         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1020         definitions.
1021         * config/s390/s390.md ("movti"): Add more alternatives for
1022         constant to GPR copies.
1024 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1026         * config/s390/s390.c: Fix whitespace damage throughout the file.
1027         * config/s390/s390.h: Likewise.
1028         * config/s390/tpf.h: Likewise.
1030 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1032         * config/s390/s390.c (s390_loadrelative_operand_p):
1033         Remove TARGET_CPU_ZARCH usages.
1034         (s390_rtx_costs): Likewise.
1035         (s390_legitimate_constant_p): Likewise.
1036         (s390_cannot_force_const_mem): Likewise.
1037         (legitimate_reload_constant_p): Likewise.
1038         (s390_preferred_reload_class): Likewise.
1039         (legitimize_pic_address): Likewise.
1040         (legitimize_tls_address): Likewise.
1041         (s390_split_branches): Removed.
1042         (s390_add_execute): Removed.
1043         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1044         (s390_mainpool_start): Likewise.
1045         (s390_mainpool_finish): Likewise.
1046         (s390_mainpool_cancel): Removed.
1047         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1048         (s390_chunkify_cancel): Likewise.
1049         (s390_return_addr_rtx): Likewise.
1050         (s390_register_info): Remove split_branches_pending_p uages.
1051         (s390_optimize_register_info): Likewise.
1052         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1053         split_branches_pending_p usages.
1054         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1055         (s390_load_got): Likewise.
1056         (s390_expand_split_stack_prologue): Likewise.
1057         (output_asm_nops): Likewise.
1058         (s390_function_profiler): Likewise.
1059         (s390_emit_call): Likewise.
1060         (s390_conditional_register_usage): Likewise.
1061         (s390_optimize_prologue): Likewise.
1062         (s390_reorg): Remove TARGET_CPU_ZARCH and
1063         split_branches_pending_p usages.
1064         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1065         usages.
1066         (s390_output_indirect_thunk_function): Likewise.
1067         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1068         (TARGET_CPU_ZARCH_P): Removed.
1069         (struct machine_function): Remove split_branches_pending_p.
1070         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1072 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1074         * common/config/s390/s390-common.c (processor_flags_table):
1075         Remove flags.
1076         * config.gcc: Remove with_arch/with_tune support.
1077         * config/s390/2064.md: Remove cpu attribute comparisons.
1078         * config/s390/driver-native.c (s390_host_detect_local_cpu):
1079         Remove MTN.
1080         * config/s390/linux.h (ASM_SPEC):
1081         Remove -march support.
1082         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1083         Use a table to get an arch level.
1084         * config/s390/s390-opts.h (enum processor_type):
1085         Remove enum values.
1086         * config/s390/s390.c
1087         (processor_table): Remove entries, add arch_level values.
1088         (s390_issue_rate): Remove cases.
1089         (s390_option_override): Adjust
1090         s390_option_override_internal() call.
1091         (s390_option_override_internal): Remove deprecation warning.
1092         (s390_valid_target_attribute_tree): Adjust
1093         s390_option_override_internal() call.
1094         * config/s390/s390.h (struct s390_processor):
1095         Share with s390-c.c, add arch_level field.
1096         * config/s390/s390.md:
1097         Remove occurrences in cpu attribute.
1098         * config/s390/s390.opt: Remove -march/-mtune support.
1099         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1100         * doc/invoke.texi: Remove deprecation warning.
1102 2018-08-08  Luis Machado  <luis.machado@linaro.org>
1104         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1105         global.
1106         (qdf24xx_tunings): Set vector cost structure to
1107         qdf24xx_vector_cost.
1109         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1110         <register_sextend>: Set to 3.
1112 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
1114         PR target/86838
1115         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1116         * config/aarch64/aarch64-simd.md
1117         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1118         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1119         (aarch64_frecpx<mode>): ...this new pattern.
1120         * config/aarch64/aarch64-simd-builtins.def: Remove comment
1121         about aarch64_frecp<FRECP:frecp_suffix><mode>.
1123 2018-08-07  Martin Liska  <mliska@suse.cz>
1125         PR middle-end/83023
1126         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1127         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1128         * predict.def (PRED_MALLOC_NONNULL): New predictor.
1129         * doc/extend.texi: Document that malloc attribute adds
1130         hit to compiler.
1132 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
1134         PR target/86785
1135         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1136         Define to speculation_safe_value_not_needed.
1138 2018-08-06  Jeff Law  <law@redhat.com>
1140         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1141         the vr_values instance to cprop_into_stmt.
1142         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1143         (cprop_operand): Also query EVRP to determine if OP is a constant.
1145 2018-08-06  Nathan Sidwell  <nathan@acm.org>
1147         * diagnostic.c (diagnostic_report_current_module): Reroll
1148         included-at loop.  Translate text.
1150 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
1152         * function-tests.c (selftest::test_expansion_to_rtl): Call
1153         free_after_compilation.
1155 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1157         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1159 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1161         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1162         loops with memory block operations from getting unrolled.
1164 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
1166         PR target/86807
1167         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1168         Define to speculation_safe_value_not_needed.
1170 2018-08-06  Jeff Law  <law@redhat.com>
1172         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1173         assert.
1175 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1177         PR target/86662
1178         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1179         with all enabled __intN types.
1181         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1183 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1185         * alias.c (record_set): Check for clobber high.
1186         * cfgexpand.c (expand_gimple_stmt): Likewise.
1187         * combine-stack-adj.c (single_set_for_csa): Likewise.
1188         * combine.c (find_single_use_1): Likewise.
1189         (set_nonzero_bits_and_sign_copies): Likewise.
1190         (get_combine_src_dest): Likewise.
1191         (is_parallel_of_n_reg_sets): Likewise.
1192         (try_combine): Likewise.
1193         (record_dead_and_set_regs_1): Likewise.
1194         (reg_dead_at_p_1): Likewise.
1195         (reg_dead_at_p): Likewise.
1196         * dce.c (deletable_insn_p): Likewise.
1197         (mark_nonreg_stores_1): Likewise.
1198         (mark_nonreg_stores_2): Likewise.
1199         * df-scan.c (df_find_hard_reg_defs): Likewise.
1200         (df_uses_record): Likewise.
1201         (df_get_call_refs): Likewise.
1202         * dwarf2out.c (mem_loc_descriptor): Likewise.
1203         * haifa-sched.c (haifa_classify_rtx): Likewise.
1204         * ira-build.c (create_insn_allocnos): Likewise.
1205         * ira-costs.c (scan_one_insn): Likewise.
1206         * ira.c (equiv_init_movable_p): Likewise.
1207         (rtx_moveable_p): Likewise.
1208         (interesting_dest_for_shprep): Likewise.
1209         * jump.c (mark_jump_label_1): Likewise.
1210         * postreload-gcse.c (record_opr_changes): Likewise.
1211         * postreload.c (reload_cse_simplify): Likewise.
1212         (struct reg_use): Add source expr.
1213         (reload_combine): Check for clobber high.
1214         (reload_combine_note_use): Likewise.
1215         (reload_cse_move2add): Likewise.
1216         (move2add_note_store): Likewise.
1217         * print-rtl.c (print_pattern): Likewise.
1218         * recog.c (decode_asm_operands): Likewise.
1219         (store_data_bypass_p): Likewise.
1220         (if_test_bypass_p): Likewise.
1221         * regcprop.c (kill_clobbered_value): Likewise.
1222         (kill_set_value): Likewise.
1223         * reginfo.c (reg_scan_mark_refs): Likewise.
1224         * reload1.c (maybe_fix_stack_asms): Likewise.
1225         (eliminate_regs_1): Likewise.
1226         (elimination_effects): Likewise.
1227         (mark_not_eliminable): Likewise.
1228         (scan_paradoxical_subregs): Likewise.
1229         (forget_old_reloads_1): Likewise.
1230         * reorg.c (find_end_label): Likewise.
1231         (try_merge_delay_insns): Likewise.
1232         (redundant_insn): Likewise.
1233         (own_thread_p): Likewise.
1234         (fill_simple_delay_slots): Likewise.
1235         (fill_slots_from_thread): Likewise.
1236         (dbr_schedule): Likewise.
1237         * resource.c (update_live_status): Likewise.
1238         (mark_referenced_resources): Likewise.
1239         (mark_set_resources): Likewise.
1240         * rtl.c (copy_rtx): Likewise.
1241         * rtlanal.c (reg_referenced_p): Likewise.
1242         (single_set_2): Likewise.
1243         (noop_move_p): Likewise.
1244         (note_stores): Likewise.
1245         * sched-deps.c (sched_analyze_reg): Likewise.
1246         (sched_analyze_insn): Likewise.
1248 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1250         * cse.c (invalidate_reg): New function extracted from...
1251         (invalidate): ...here.
1252         (canonicalize_insn): Check for clobber high.
1253         (invalidate_from_clobbers): invalidate clobber highs.
1254         (invalidate_from_sets_and_clobbers): Likewise.
1255         (count_reg_usage): Check for clobber high.
1256         (insn_live_p): Likewise.
1257         * cselib.c (cselib_expand_value_rtx_1):Likewise.
1258         (cselib_invalidate_regno): Check for clobber in setter.
1259         (cselib_invalidate_rtx): Pass through setter.
1260         (cselib_invalidate_rtx_note_stores):
1261         (cselib_process_insn): Check for clobber high.
1262         * cselib.h (cselib_invalidate_rtx): Add operand.
1264 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1266         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1267         (mark_not_eliminable): Likewise.
1268         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1269         * lra-lives.c (process_bb_lives): Check for clobber high.
1270         * lra.c (new_insn_reg): Remember clobber highs.
1271         (collect_non_operand_hard_regs): Check for clobber high.
1272         (lra_set_insn_recog_data): Likewise.
1273         (add_regs_to_insn_regno_info): Likewise.
1274         (lra_update_insn_regno_info): Likewise.
1276 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1278         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1279         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1281 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1283         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1284         (copy_insn_1): Likewise.
1285         (gen_hard_reg_clobber_high): New gen function.
1286         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1287         * genemit.c (gen_exp): Likewise.
1288         (gen_emit_seq): Pass through info.
1289         (gen_insn): Check for CLOBBER_HIGH.
1290         (gen_expand): Pass through info.
1291         (gen_split): Likewise.
1292         (output_add_clobbers): Likewise.
1293         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1294         (remove_clobbers): Likewise.
1295         * rtl.h (gen_hard_reg_clobber_high): New declaration.
1297 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1299         * doc/rtl.texi (clobber_high): Add.
1300         (parallel): Add in clobber high
1301         * rtl.c (rtl_check_failed_code3): Add function.
1302         * rtl.def (CLOBBER_HIGH): Add expression.
1303         * rtl.h (RTL_CHECKC3): Add macro.
1304         (rtl_check_failed_code3): Add declaration.
1305         (XC3EXP): Add macro.
1307 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1309         PR target/86386
1310         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1311         cfun->machine->max_used_stack_alignment if needed.
1313 2018-08-04  Martin Sebor  <msebor@redhat.com>
1315         PR tree-optimization/86571
1316         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1317         NaN output to 4.
1319 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1321         PR target/86799
1322         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1323         Define.
1325 2018-08-03  Jeff Law  <law@redhat.com>
1327         PR target/86795
1328         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1329         Define to speculation_safe_value_not_needed.
1331 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
1333         * doc/gcov.texi (-x): Remove duplicate "to".
1334         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1335         (-Wif-not-aligned): Remove duplicate "is".
1336         (-flto): Remove duplicate "the".
1337         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1338         duplicate "v5.00.b".
1339         (MSP430 Options): Remove duplicate "and" from the description
1340         of "-mgprel-sec=regexp".
1341         (x86 Options): Remove duplicate copies of "vmldLog102" and
1342         vmlsLog104 from description of "-mveclibabi=type".
1344 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
1346         * internal-fn.h (first_commutative_argument): Declare.
1347         * internal-fn.c (first_commutative_argument): New function.
1348         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1349         restrictions for pattern statements.  Use first_commutative_argument
1350         to look for commutative operands in calls to internal functions.
1352 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
1354         * Makefile.in (wide-int-range.o): New.
1355         * tree-vrp.c: Move all the wide_int_* functions to...
1356         * wide-int-range.cc: ...here.
1357         * tree-vrp.h: Move all the wide_int_* prototypes to...
1358         * wide-int-range.h: ...here.
1360 2018-08-03  Tom de Vries  <tdevries@suse.de>
1362         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1363         UI_NONE.
1364         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1365         * except.c (output_function_exception_table): Do early exit if
1366         targetm_common.except_unwind_info (&global_options) == UI_NONE.
1368 2018-08-03  Martin Liska  <mliska@suse.cz>
1370         * predict.c (dump_prediction): Change to 2 digits
1371         in fraction part.
1373 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1375         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1376         neon_dup_q to...
1377         (falkor_am_1_gtov_gtov): ... a new insn reservation.
1379 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1381         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1382         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1383         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1384         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1385         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1387 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1389         * diagnostic-show-locus.c (diagnostic_show_locus): Use
1390         pp_take_prefix when saving the existing prefix.
1391         * diagnostic.c (diagnostic_append_note): Likewise.
1392         * langhooks.c (lhd_print_error_function): Likewise.
1393         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1394         param's type.  Free the existing prefix.
1395         (pp_take_prefix): New function.
1396         (pretty_printer::pretty_printer): Drop the prefix parameter.
1397         Rename the length parameter to match the comment.
1398         (pretty_printer::~pretty_printer): Free the prefix.
1399         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1400         parameter.
1401         (struct pretty_printer): Drop the "const" from "prefix" field's
1402         type and clarify memory management.
1403         (pp_set_prefix): Drop the "const" from the 2nd param.
1404         (pp_take_prefix): New decl.
1406 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1408         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1409         for word_mode_ok here instead of passing as argument.
1410         (expand_block_compare): Change select_block_compare_mode() call.
1411         (expand_strncmp_gpr_sequence): New function.
1412         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1414 2018-08-02  Jeff Law  <law@redhat.com>
1416         PR target/86790
1417         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1418         Define to speculation_safe_value_not_needed.
1420         PR target/86784
1421         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1422         Define to speculation_safe_value_not_needed.
1424 2018-08-02  Tom de Vries  <tdevries@suse.de>
1426         PR target/86660
1427         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1428         function.  Return UI_TARGET unconditionally.
1429         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1430         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1432 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1434         * genemit.c (print_overload_test): Fix typo.
1436 2018-08-02  Richard Biener  <rguenther@suse.de>
1438         PR tree-optimization/86816
1439         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1440         which checks for value availability before querying it.
1441         (gvn_uses_equal): Use it.
1442         (same_succ_hash): Likewise.
1443         (gimple_equal_p): Likewise.
1445 2018-08-02  Nick Clifton  <nickc@redhat.com>
1447         PR target/86813
1448         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1449         Define to speculation_safe_value_not_needed.
1451         PR target/86810
1452         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1453         Define to speculation_safe_value_not_needed.
1455         PR target/86810
1456         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1457         Define to speculation_safe_value_not_needed.
1459         PR target/86803
1460         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1461         Define to speculation_safe_value_not_needed.
1463         PR target/86797
1464         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1465         Define to speculation_safe_value_not_needed.
1467         PR target/86791
1468         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1469         Define to speculation_safe_value_not_needed.
1471         PR target/86789
1472         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1473         Define to speculation_safe_value_not_needed.
1475         PR target/86787
1476         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1477         Define to speculation_safe_value_not_needed.
1479         PR target/86782
1480         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1481         speculation_safe_value_not_needed.
1483         PR target/86781
1484         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1485         to speculation_safe_value_not_needed.
1487 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1489         * doc/md.texi: Expand the documentation of instruction names
1490         to mention port-local uses.  Document '@' in pattern names.
1491         * read-md.h (overloaded_instance, overloaded_name): New structs.
1492         (mapping): Declare.
1493         (md_reader::handle_overloaded_name): New member function.
1494         (md_reader::get_overloads): Likewise.
1495         (md_reader::m_first_overload): New member variable.
1496         (md_reader::m_next_overload_ptr): Likewise.
1497         (md_reader::m_overloads_htab): Likewise.
1498         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1499         m_next_overload_ptr and m_overloads_htab.
1500         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1501         (get_mode_token, get_code_token, get_int_token): New functions.
1502         (map_attr_string): Add an optional argument that passes back
1503         the associated iterator.
1504         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1505         (md_reader::handle_overloaded_name, add_overload_instance): New
1506         functions.
1507         (apply_iterators): Handle '@' names.  Report an error if '@'
1508         is used without iterators.
1509         (initialize_iterators): Initialize the new iterator_group fields.
1510         * genopinit.c (handle_overloaded_code_for)
1511         (handle_overloaded_gen): New functions.
1512         (main): Use them to print declarations of maybe_code_for_* and
1513         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1514         * genemit.c (print_overload_arguments, print_overload_test)
1515         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1516         (main): Use it to print definitions of maybe_code_for_* and
1517         maybe_gen_* functions.
1518         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1519         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1520         instead of explicit mode checks.
1521         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1522         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1523         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1524         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1525         (aarch64_expand_compare_and_swap): Likewise
1526         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1527         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1528         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1529         (aarch64_constant_pool_reload_icode): Delete.
1530         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1531         instead of aarch64_constant_pool_reload_icode.  Use
1532         code_for_aarch64_reload_mov instead of explicit mode checks.
1533         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1534         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1535         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1536         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1537         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1538         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1539         (aarch64_atomic_load_op_code): Delete.
1540         (aarch64_emit_atomic_load_op): Likewise.
1541         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1542         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1543         instead of aarch64_emit_atomic_load_op.
1544         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1545         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1546         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1547         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1548         character before the pattern name.
1549         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1550         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1551         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1552         (aarch64_frecps<mode>): Likewise.
1553         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1554         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1555         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1556         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1557         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1559 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1561         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1562         Allow HFmode constants if TARGET_FP_F16INST.
1564 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1566         PR target/86014
1567         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1568         No longer check last store for clobber of address register.
1570 2018-08-02  Martin Liska  <mliska@suse.cz>
1572         PR gcov-profile/86817
1573         * gcov.c (process_all_functions): New function.
1574         (main): Call it.
1575         (process_file): Move functions processing to
1576         process_all_functions.
1578 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1580         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1581         "const" to the "gimple *" and "rtx_insn *" parameters.
1582         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1583         Likewise.
1584         (dump_location_t::dump_location_t): Likewise.
1586 2018-08-01  Martin Sebor  <msebor@redhat.com>
1588         PR tree-optimization/86650
1589         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1590         rather than a "gcall *".  Directly pass the data of interest
1591         to percent_K_format, rather than building a temporary CALL_EXPR
1592         to hold it.
1593         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1594         (gimple_fold_builtin_strncat): Adjust.
1595         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1596         gcall* argument with gimple*.
1597         * gimple-ssa-warn-restrict.c (check_call): Same.
1598         (wrestrict_dom_walker::before_dom_children): Same.
1599         (builtin_access::builtin_access): Same.
1600         (check_bounds_or_overlap): Same
1601         (maybe_diag_overlap): Same.
1602         (maybe_diag_offset_bounds): Same.
1603         * tree-diagnostic.c (default_tree_printer): Move usage of
1604         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1605         to this callsite.
1606         * tree-pretty-print.c (percent_K_format): Add argument.
1607         * tree-pretty-print.h: Add argument.
1608         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1609         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1610         (maybe_diag_stxncpy_trunc): Same.
1611         (handle_builtin_stxncpy): Same.
1612         (handle_builtin_strcat): Same.
1614 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1616         * match.pd: Optimise pointer range checks.
1618 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1620         PR tree-optimization/86758
1621         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1622         to remove pattern statements.
1624 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1626         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1627         result of dfs_enumerate_from when constructing stmt_vec_infos,
1628         instead of additionally calling get_loop_body.
1630 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1632         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1633         parameter.
1634         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1635         When creating an iv, assert that the step is not known to be zero.
1636         (vect_setup_realignment): Update call accordingly.
1637         * tree-vect-stmts.c (vectorizable_store): Likewise.
1638         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1640 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1642         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1643         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1644         (vectorizable_reduction): Likewise.
1645         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1646         (vect_detect_hybrid_slp_stmts): Likewise.
1647         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1649 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1651         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1652         (wide_int_set_zero_nonzero_bits): ...this.
1653         (zero_nonzero_bits_from_vr): Rename to...
1654         (vrp_set_zero_nonzero_bits): ...this.
1655         (extract_range_from_multiplicative_op_1): Abstract wide int
1656         code...
1657         (wide_int_range_multiplicative_op): ...here.
1658         (extract_range_from_binary_expr_1): Extract wide int binary
1659         operations into their own functions.
1660         (wide_int_range_lshift): New.
1661         (wide_int_range_can_optimize_bit_op): New.
1662         (wide_int_range_shift_undefined_p): New.
1663         (wide_int_range_bit_xor): New.
1664         (wide_int_range_bit_ior): New.
1665         (wide_int_range_bit_and): New.
1666         (wide_int_range_trunc_mod): New.
1667         (extract_range_into_wide_ints): New.
1668         (vrp_shift_undefined_p): New.
1669         (extract_range_from_multiplicative_op): New.
1670         (vrp_can_optimize_bit_op): New.
1671         * tree-vrp.h (value_range::dump): New.
1672         (wide_int_range_multiplicative_op): New.
1673         (wide_int_range_lshift):New.
1674         (wide_int_range_shift_undefined_p): New.
1675         (wide_int_range_bit_xor): New.
1676         (wide_int_range_bit_ior): New.
1677         (wide_int_range_bit_and): New.
1678         (wide_int_range_trunc_mod): New.
1679         (zero_nonzero_bits_from_bounds): Rename to...
1680         (wide_int_set_zero_nonzero_bits): ...this.
1681         (zero_nonzero_bits_from_vr): Rename to...
1682         (vrp_set_zero_nonzero_bits): ...this.
1683         (range_easy_mask_min_max): Rename to...
1684         (wide_int_range_can_optimize_bit_op): this.
1685         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1686         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1688 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1690         * tree-vectorizer.h (vect_orig_stmt): New function.
1691         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1692         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1693         (vect_create_epilog_for_reduction): Likewise.
1694         (vectorizable_live_operation): Likewise.
1695         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1696         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1697         * tree-vect-stmts.c (vectorizable_call): Likewise.
1698         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1700 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1702         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1703         argument.
1704         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1705         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1706         (vect_transform_loop): Likewise.
1707         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1709 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1711         * tree-vectorizer.h (vect_schedule_slp): Return void.
1712         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1713         (vect_schedule_slp): Likewise.
1715 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1717         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1718         argument.
1719         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1720         instances before the main loop, if any exist.
1722 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1724         PR tree-optimization/86749
1725         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1726         If the lhs is used in a COND_EXPR, check that it is being used
1727         as the "then" or "else" value.
1729 2018-08-01  Tom de Vries  <tdevries@suse.de>
1731         PR target/86800
1732         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1733         speculation_safe_value_not_needed.
1735 2018-08-01  Richard Biener  <rguenther@suse.de>
1737         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1738         as base and offset.
1740 2018-08-01  Martin Liska  <mliska@suse.cz>
1742         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1743         format how successful transformation is dumped.
1744         (gimple_mod_pow2_value_transform): Likewise.
1745         (gimple_mod_subtract_transform): Likewise.
1746         (gimple_stringops_transform): Likewise.
1748 2018-08-01  Martin Liska  <mliska@suse.cz>
1750         PR value-prof/35543
1751         * value-prof.c (interesting_stringop_to_profile_p):
1752         Simplify the code and add BUILT_IN_MEMMOVE.
1753         (gimple_stringops_transform): Likewise.
1755 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1757         * config/aarch64/aarch64-simd.md
1758         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1759         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1760         use GPI iterator instead of SI mode.
1762 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1764         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1765         rs6000_speculation_barrier.
1766         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1767         new barrier pattern name.
1769 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1771         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1772         (speculation_barrier): New insn.
1774 2018-08-01  Richard Biener  <rguenther@suse.de>
1776         PR bootstrap/86724
1777         * graphite.h: Include isl/id.h and isl/space.h to allow build
1778         with ISL 0.20.
1780 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1782         PR target/86651
1783         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1784         mode for COFF targets.
1785         * defaults.h (TARGET_COFF): Define.
1786         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1787         TARGET_COFF): Define.
1788         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1789         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1790         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1792 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1794         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1795         * gimple-streamer-out.c (output_bb): Save it.
1796         * lto-streamer-in.c (input_struct_function_base): Restore
1797         instance discriminator if available.  Create map on demand.
1798         * lto-streamer-out.c (output_struct_function_base): Save it if
1799         available.
1800         * final.c (decl_to_instance_map): Document LTO strategy.
1802 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1803             Olivier Hainque  <hainque@adacore.com>
1805         * debug.h (decl_to_instance_map_t): New type.
1806         (decl_to_instance_map): Declare.
1807         (maybe_create_decl_to_instance_map): New inline function.
1808         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1809         to track basic block discriminators.
1810         (final_start_function_1): Initialize them.
1811         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1812         bb_discriminator.
1813         (decl_to_instance_map): New variable.
1814         (map_decl_to_instance, maybe_set_discriminator): New functions.
1815         (notice_source_line): Set discriminator.
1817 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1819         * targhooks.c (default_have_speculation_safe_value): Add
1820         ATTRIBUTE_UNUSED.
1822 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1824         * dump-context.h: Include "pretty-print.h".
1825         (dump_context::refresh_dumps_are_enabled): New decl.
1826         (dump_context::emit_item): New decl.
1827         (class dump_context): Add fields "m_test_pp" and
1828         "m_test_pp_flags".
1829         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1830         (temp_dump_context::get_dumped_text): New decl.
1831         (class temp_dump_context): Add field "m_pp".
1832         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1833         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1834         m_test_pp.
1835         (set_dump_file): Update for above change.
1836         (set_alt_dump_file): Likewise.
1837         (dump_loc): New overload, taking a pretty_printer *.
1838         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1839         to any test pretty-printer.
1840         (make_item_for_dump_gimple_stmt): New function, adapted from
1841         optinfo::add_gimple_stmt.
1842         (dump_context::dump_gimple_stmt): Call it, and use the result,
1843         eliminating the direct usage of dump_file and alt_dump_file in
1844         favor of indirectly using them via emit_item.
1845         (make_item_for_dump_gimple_expr): New function, adapted from
1846         optinfo::add_gimple_expr.
1847         (dump_context::dump_gimple_expr): Call it, and use the result,
1848         eliminating the direct usage of dump_file and alt_dump_file in
1849         favor of indirectly using them via emit_item.
1850         (make_item_for_dump_generic_expr): New function, adapted from
1851         optinfo::add_tree.
1852         (dump_context::dump_generic_expr): Call it, and use the result,
1853         eliminating the direct usage of dump_file and alt_dump_file in
1854         favor of indirectly using them via emit_item.
1855         (make_item_for_dump_printf_va): New function, adapted from
1856         optinfo::add_printf_va.
1857         (make_item_for_dump_printf): New function.
1858         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1859         and use the result, eliminating the direct usage of dump_file and
1860         alt_dump_file in favor of indirectly using them via emit_item.
1861         (make_item_for_dump_dec): New function.
1862         (dump_context::dump_dec): Call it, and use the result,
1863         eliminating the direct usage of dump_file and alt_dump_file in
1864         favor of indirectly using them via emit_item.
1865         (make_item_for_dump_symtab_node): New function, adapted from
1866         optinfo::add_symtab_node.
1867         (dump_context::dump_symtab_node): Call it, and use the result,
1868         eliminating the direct usage of dump_file and alt_dump_file in
1869         favor of indirectly using them via emit_item.
1870         (dump_context::begin_scope): Reimplement, avoiding direct usage
1871         of dump_file and alt_dump_file in favor of indirectly using them
1872         via emit_item.
1873         (dump_context::emit_item): New member function.
1874         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1875         Set up test pretty-printer on the underlying context.  Call
1876         refresh_dumps_are_enabled.
1877         (temp_dump_context::~temp_dump_context): Call
1878         refresh_dumps_are_enabled.
1879         (temp_dump_context::get_dumped_text): New member function.
1880         (selftest::verify_dumped_text): New function.
1881         (ASSERT_DUMPED_TEXT_EQ): New macro.
1882         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1883         and then without optinfo enabled.  Add uses of
1884         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1885         * dumpfile.h: Update comment for the dump_* API.
1886         * optinfo-emit-json.cc
1887         (selftest::test_building_json_from_dump_calls): Update for new
1888         param for temp_dump_context ctor.
1889         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1890         and "m_owned" field.
1891         (optinfo_item::~optinfo_item): Likewise.
1892         (optinfo::add_item): New member function.
1893         (optinfo::emit): Update comment.
1894         (optinfo::add_string): Delete.
1895         (optinfo::add_printf): Delete.
1896         (optinfo::add_printf_va): Delete.
1897         (optinfo::add_gimple_stmt): Delete.
1898         (optinfo::add_gimple_expr): Delete.
1899         (optinfo::add_tree): Delete.
1900         (optinfo::add_symtab_node): Delete.
1901         (optinfo::add_dec): Delete.
1902         * optinfo.h (class dump_context): New forward decl.
1903         (optinfo::add_item): New decl.
1904         (optinfo::add_string): Delete.
1905         (optinfo::add_printf): Delete.
1906         (optinfo::add_printf_va): Delete.
1907         (optinfo::add_gimple_stmt): Delete.
1908         (optinfo::add_gimple_expr): Delete.
1909         (optinfo::add_tree): Delete.
1910         (optinfo::add_symtab_node): Delete.
1911         (optinfo::add_dec): Delete.
1912         (optinfo::add_poly_int): Delete.
1913         (optinfo_item::optinfo_item): Remove "owned" param.
1914         (class optinfo_item): Remove field "m_owned".
1916 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1918         PR middle-end/86705
1919         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1920         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1921         requested variable alignment.
1922         (expand_one_ssa_partition): Likewise.
1923         (expand_one_var): Likewise.
1925 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1927         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1928         to speculation_safe_value_not_needed.
1930 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1932         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1933         * targhooks.c (speculation_safe_value_not_needed): New function.
1934         * target.def (have_speculation_safe_value): Update documentation.
1935         * doc/tm.texi: Regenerated.
1937 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1939         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1940         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1941         expand.
1942         (despeculate_copy<ALLI:mode>_insn): New insn.
1943         (despeculate_copyti_insn): New insn.
1944         (despeculate_simple<ALLI:mode>): New insn
1945         (despeculate_simpleti): New insn.
1946         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1947         function.
1948         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1949         aarch64_speculation_safe_value.
1950         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1952 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1954         * config/aarch64/aarch64-speculation.cc: New file.
1955         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1956         before pass_reorder_blocks.
1957         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1958         prototype.
1959         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1960         X14 and X15 when tracking speculation.
1961         * config/aarch64/aarch64.md (register name constants): Add
1962         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1963         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1964         (speculation_barrier): New insn attribute.
1965         (cmp<mode>): Allow SP in comparisons.
1966         (speculation_tracker): New insn.
1967         (speculation_barrier): Add speculation_barrier attribute.
1968         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1969         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1970         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1972 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1974         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1975         aarch64_track_speculation is true.
1976         (tb<optab><mode>1): Likewise.
1977         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1978         generate CB[N]Z when tracking speculation.
1979         (aarch64_split_compare_and_swap): Likewise.
1980         (aarch64_split_atomic_op): Likewise.
1982 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1984         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1986 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1988         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1989         (speculation_barrier): New insn.
1991 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1993         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1994         * config/arm/arm.md (speculation_barrier): New expand.
1995         (speculation_barrier_insn): New pattern.
1997 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1999         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2000         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2001         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2002         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2003         list.
2004         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2005         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2006         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2007         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2008         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2009         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2010         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2011         * builtins.c (expand_speculation_safe_value): New function.
2012         (expand_builtin): Call it.
2013         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2014         * doc/extend.texi: Document __builtin_speculation_safe_value.
2015         * doc/md.texi: Document "speculation_barrier" pattern.
2016         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2017         TARGET_HAVE_SPECULATION_SAFE_VALUE.
2018         * doc/tm.texi: Regenerated.
2019         * target.def (have_speculation_safe_value, speculation_safe_value): New
2020         hooks.
2021         * targhooks.c (default_have_speculation_safe_value): New function.
2022         (default_speculation_safe_value): New function.
2023         * targhooks.h (default_have_speculation_safe_value): Add prototype.
2024         (default_speculation_safe_value): Add prototype.
2026 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
2028         * dump-context.h (dump_context::dump_loc): New decl.
2029         * dumpfile.c (dump_context::dump_loc): New member function.
2030         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2031         and dump_gimple_stmt.
2032         (dump_context::dump_gimple_expr_loc): Likewise, using
2033         dump_gimple_expr.
2034         (dump_context::dump_generic_expr_loc): Likewise, using
2035         dump_generic_expr.
2036         (dump_context::dump_printf_loc_va): Likewise, using
2037         dump_printf_va.
2038         (dump_context::begin_scope): Explicitly using the global function
2039         "dump_loc", rather than the member function.
2041 2018-07-31  Martin Sebor  <msebor@redhat.com>
2043         PR tree-optimization/86741
2044         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2046 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
2048         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2049         depend on whether prefetch instructions will be emitted or not.
2050         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2051         will be emitted or not.
2052         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2053         (TARGET_SETMEM_PFD): New macros.
2055 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2057         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2058         (NULL_STMT_VEC_INFO): Delete.
2059         (stmt_vec_info::operator*): Likewise.
2060         (stmt_vec_info::operator gimple *): Likewise.
2061         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2062         of NULL_STMT_VEC_INFO.
2063         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2064         (vect_reassociating_reduction_p): Likewise.
2065         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2066         (vectorizable_store): Likewise.
2067         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2068         (vec_info::free_stmt_vec_infos): Likewise.
2070 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2072         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2073         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2075 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2077         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2078         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2079         (vec_info::free_stmt_vec_info): New private member functions.
2080         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2081         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2082         * tree-parloops.c (gather_scalar_reductions): Remove calls to
2083         set_stmt_vec_info_vec and free_stmt_vec_infos.
2084         * tree-vect-loop.c (_loop_vec_info): Remove call to
2085         set_stmt_vec_info_vec.
2086         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2087         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2088         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2089         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2090         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
2091         assignments in {vec_info::,}new_stmt_vec_info that are redundant
2092         with the clearing in the xcalloc.
2093         (stmt_vec_info_vec): Delete.
2094         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2095         (vectorize_loops): Likewise.
2096         (vec_info::~vec_info): Remove argument from call to
2097         free_stmt_vec_infos.
2098         (vec_info::add_stmt): Remove vinfo argument from call to
2099         new_stmt_vec_info.
2101 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2103         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2104         rather than a gimple stmt.
2105         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
2106         information for pattern statements when passed the original
2107         statement; instead wait to be passed the pattern statement itself.
2108         Don't call set_vinfo_for_stmt here.
2109         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2110         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2111         stmt_vec_infos here.
2112         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2113         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2114         stmt_vec_infos entry.
2116 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2118         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2119         * tree-vectorizer.c (vec_info::replace_stmt): New function.
2120         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2121         * tree-vect-stmts.c (vectorizable_call): Likewise.
2122         (vectorizable_simd_clone_call): Likewise.
2124 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2126         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2127         * tree-vectorizer.c (vec_info::remove_stmt): New function.
2128         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2129         * tree-vect-loop.c (vect_transform_loop): Likewise.
2130         * tree-vect-slp.c (vect_schedule_slp): Likewise.
2131         * tree-vect-stmts.c (vect_remove_stores): Likewise.
2133 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2135         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2136         (vect_dr_stmt): Delete.
2137         * tree-vectorizer.c (vec_info::lookup_dr): New function.
2138         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2139         of DR_VECT_AUX.
2140         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2141         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2142         (vect_verify_datarefs_alignment, vect_peeling_supportable)
2143         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2144         (vect_analyze_data_refs): Likewise.
2145         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
2146         argument.
2147         (vect_find_same_alignment_drs): Likewise.
2148         (vect_slp_analyze_node_dependences): Update calls accordingly.
2149         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2150         instead of DR_VECT_AUX.
2151         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2152         of a vector data references.  Use vec_info::lookup_dr instead of
2153         DR_VECT_AUX.
2154         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2155         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2156         instead of DR_VECT_AUX.
2158 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2160         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2161         dr_vec_info.
2162         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2163         accordingly.
2164         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2165         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2166         (vect_gen_prolog_loop_niters): Likewise.
2168 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2170         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2171         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2172         (vect_known_alignment_in_bytes, vect_dr_behavior)
2173         (vect_get_scalar_dr_size): Take references as dr_vec_infos
2174         instead of data_references.  Update calls to other routines for
2175         which the same change has been made.
2176         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2177         dr_vec_infos instead of stmt_vec_infos.
2178         (vect_analyze_data_ref_dependence): Update call accordingly.
2179         (vect_slp_analyze_data_ref_dependence)
2180         (vect_record_base_alignments): Use DR_VECT_AUX.
2181         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2182         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2183         (vector_alignment_reachable_p, vect_get_data_access_cost)
2184         (vect_peeling_supportable, vect_analyze_group_access_1)
2185         (vect_analyze_group_access, vect_analyze_data_ref_access)
2186         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2187         (vect_compile_time_alias, vect_small_gap_p)
2188         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2189         (vect_supportable_dr_alignment): Take references as dr_vec_infos
2190         instead of data_references.  Update calls to other routines for
2191         which the same change has been made.
2192         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2193         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2194         (vect_slp_analyze_and_verify_node_alignment)
2195         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2196         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2197         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
2198         above changes.
2199         (_vect_peel_info::dr): Replace with...
2200         (_vect_peel_info::dr_info): ...this new field.
2201         (vect_peeling_hash_get_most_frequent)
2202         (vect_peeling_hash_choose_best_peeling): Update accordingly.
2203         (vect_peeling_hash_get_lowest_cost):
2204         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
2205         routines for which the same change has been made.
2206         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
2207         data_reference.
2208         * tree-vect-loop-manip.c (get_misalign_in_elems)
2209         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
2210         above changes.
2211         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2212         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2213         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2214         (get_group_load_store_type, get_negative_load_store_type)
2215         (vect_get_data_ptr_increment, vectorizable_store)
2216         (vectorizable_load): Likewise.
2217         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2218         Update calls to other routines for which the same change has been made.
2220 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2222         * tree-vectorizer.h (vec_info::move_dr): New member function.
2223         (dataref_aux): Rename to...
2224         (dr_vec_info): ...this and add "dr" and "stmt" fields.
2225         (_stmt_vec_info::dr_aux): Update accordingly.
2226         (_stmt_vec_info::data_ref_info): Delete.
2227         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2228         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2229         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2230         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2231         of data_ref.
2232         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
2233         (STMT_VINFO_DR_INFO): New macro.
2234         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2235         (set_dr_misalignment): Update after rename of dataref_aux.
2236         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
2237         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2238         initialization of STMT_VINFO_DATA_REF.
2239         * tree-vectorizer.c (vec_info::move_dr): New function.
2240         * tree-vect-patterns.c (vect_recog_bool_pattern)
2241         (vect_recog_mask_conversion_pattern)
2242         (vect_recog_gather_scatter_pattern): Use it.
2243         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2244         the "dr" and "stmt" fields of dr_vec_info instead of
2245         STMT_VINFO_DATA_REF.
2247 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2249         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2250         (is_pattern_stmt_p): Use it.
2251         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2252         on pattern statements.
2254 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2256         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2257         original stmt as a stmt_vec_info rather than a gimple stmt.
2258         (vect_pattern_recog_1): Take the statement directly as a
2259         stmt_vec_info, rather than via a gimple_stmt_iterator.
2260         Update call to vect_mark_pattern_stmts.
2261         (vect_pattern_recog): Update calls accordingly.
2263 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2265         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2266         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2267         a vect_def_type for the first argument.
2268         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2269         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
2270         operand if it isn't defined by a vectorized statement.
2271         (vect_build_gather_load_calls): Remove the mask_dt argument and
2272         update calls to vect_get_vec_def_for_stmt_copy.
2273         (vectorizable_bswap): Likewise the dt argument.
2274         (vectorizable_call): Update calls to vectorizable_bswap and
2275         vect_get_vec_def_for_stmt_copy.
2276         (vectorizable_simd_clone_call, vectorizable_assignment)
2277         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2278         (vectorizable_comparison): Update calls to
2279         vect_get_vec_def_for_stmt_copy.
2280         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
2281         vect_is_simple_use.
2282         (vect_get_loop_based_defs): Remove dt argument and update call
2283         to vect_get_vec_def_for_stmt_copy.
2284         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2285         and vect_get_vec_def_for_stmt_copy.
2286         (vectorizable_load): Update calls to vect_build_gather_load_calls
2287         and vect_get_vec_def_for_stmt_copy.
2288         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2289         (vectorizable_reduction, vectorizable_live_operation): Update calls
2290         to vect_get_vec_def_for_stmt_copy.
2292 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2294         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2295         and gimple stmt arguments with a stmt_vec_info.
2296         (vect_record_base_alignments): Update calls accordingly.
2297         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2298         and gimple stmt arguments with a stmt_vec_info.
2299         (vect_build_slp_tree_1): Remove vinfo argument and update call
2300         to vect_record_max_nunits.
2301         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2302         and vect_record_max_nunits.
2304 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2306         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2307         file and take a stmt_vec_info instead of a gimple stmt.
2308         (supportable_widening_operation, vect_finish_replace_stmt)
2309         (vect_finish_stmt_generation, vect_get_store_rhs)
2310         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2311         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2312         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2313         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2314         (vect_create_data_ref_ptr, bump_vector_ptr)
2315         (vect_permute_store_chain, vect_setup_realignment)
2316         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2317         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2318         (vectorizable_reduction, vectorizable_induction)
2319         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2320         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2321         than gimple stmts as arguments.
2322         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2323         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2324         (can_group_stmts_p, vect_check_gather_scatter)
2325         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2326         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2327         (vect_permute_load_chain, vect_shift_permute_load_chain)
2328         (vect_transform_grouped_load)
2329         (vect_record_grouped_load_vectors): Likewise.
2330         * tree-vect-loop.c (vect_fixup_reduc_chain)
2331         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2332         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2333         (vectorizable_reduction, vectorizable_induction)
2334         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2335         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2336         (vect_get_load_store_mask): Likewise.
2337         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2338         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2339         * tree-vect-stmts.c (vect_mark_relevant)
2340         (is_simple_and_all_uses_invariant)
2341         (exist_non_indexing_operands_for_use_p, process_use)
2342         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2343         (vect_get_vec_def_for_operand, vect_get_vec_defs)
2344         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2345         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2346         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2347         (get_negative_load_store_type, get_load_store_type)
2348         (vect_check_load_store_mask, vect_check_store_rhs)
2349         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2350         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2351         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2352         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2353         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2354         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2355         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2356         (supportable_widening_operation): Likewise.
2358 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2360         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2361         a stmt_vec_info instead of a gcall.
2362         (vect_check_gather_scatter): Update call accordingly.
2363         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2364         of a gphi.
2365         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2366         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2367         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2368         instead of a gimple stmt.
2369         (vect_transform_loop): Update calls accordingly.
2370         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2371         stmt_vec_infos instead of gimple stmts.
2372         (vect_analyze_slp_instance): Update use accordingly.
2373         * tree-vect-stmts.c (read_vector_array, write_vector_array)
2374         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2375         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2376         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2377         (vect_gen_widened_results_half, vect_get_loop_based_defs)
2378         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2379         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2380         down to subroutines.
2382 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2384         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2385         of the worklist from a vector of gimple stmts to a vector of
2386         stmt_vec_infos.
2387         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2388         (vect_mark_stmts_to_be_vectorized): Likewise
2390 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2392         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2393         statement before passing it to vect_analyze_stmt.
2394         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2395         the chain of phi vector definitions.  Track the exit phi via its
2396         stmt_vec_info.
2397         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2398         STMT_VINFO_REDUC_DEF.
2399         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2400         stmt_vec_infos to handle the statement chains.
2401         (vect_get_slp_defs): Record the first statement in the node
2402         using a stmt_vec_info.
2403         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2404         statements here and pass their stmt_vec_info down to subroutines.
2405         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2406         down to vect_finish_stmt_generation.
2407         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2408         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2409         stmt_vec_infos to subroutines.
2410         (vect_remove_stores): Use stmt_vec_infos to handle the statement
2411         chains.
2413 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2415         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2416         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2417         (vect_permute_store_chain, vect_setup_realignment)
2418         (vect_permute_load_chain, vect_shift_permute_load_chain)
2419         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2420         stmts internally, and when passing values to other vectorizer routines.
2421         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2422         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2423         (vect_analyze_loop_operations, get_initial_def_for_reduction)
2424         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2425         (vectorizable_reduction, vectorizable_induction)
2426         (vectorizable_live_operation, vect_transform_loop_stmt)
2427         (vect_transform_loop): Likewise.
2428         * tree-vect-patterns.c (vect_reassociating_reduction_p)
2429         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2430         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2431         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2432         (vect_slp_analyze_node_operations_1): Likewise.
2433         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2434         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2435         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2436         (vect_finish_stmt_generation_1, get_group_load_store_type)
2437         (get_load_store_type, vect_build_gather_load_calls)
2438         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2439         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2440         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2441         (vectorizable_store, vectorizable_load, vectorizable_condition)
2442         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2443         (supportable_widening_operation): Likewise.
2444         (vect_get_vector_types_for_stmt): Likewise.
2445         * tree-vectorizer.h (vect_dr_behavior): Likewise.
2447 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2449         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2450         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2451         (vect_permute_store_chain, vect_permute_load_chain)
2452         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2453         repeated stmt_vec_info lookups.
2454         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2455         (vect_update_ivs_after_vectorizer): Likewise.
2456         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2457         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2458         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2459         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2460         (vect_bb_slp_scalar_cost): Likewise.
2461         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2463 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2465         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2466         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2467         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2468         to get gassigns and gcalls, rather than operating on generc gimple
2469         stmts.
2470         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2471         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2472         (vectorizable_load, vect_analyze_stmt): Likewise.
2473         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2475 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2477         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2478         return stmt_vec_infos rather than gimple stmts.  Do not accept
2479         null arguments.
2480         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2481         of a gimple stmt.
2482         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2483         Update use of get_later_stmt.
2484         (vect_get_constant_vectors): Update call accordingly.
2485         (vect_schedule_slp_instance): Likewise
2486         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2487         (vect_slp_analyze_instance_dependence): Likewise.
2488         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2490 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2492         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2493         (stmt_info_for_cost::stmt_info): ...this new field.
2494         (add_stmt_costs): Update accordingly.
2495         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2496         (vect_get_known_peeling_cost): Likewise.
2497         (vect_estimate_min_profitable_iters): Likewise.
2498         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2500 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2502         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2503         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2504         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2505         accordingly.
2506         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2508 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2510         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2511         a gimple stmt to a stmt_vec_info.
2512         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2514 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2516         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2517         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2518         (_loop_vec_info::reduction_chains): Likewise.
2519         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2520         accordingly.
2521         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2523 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2525         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2526         a gimple stmt to a stmt_vec_info.
2527         (_stmt_vec_info::next_element): Likewise.
2528         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2529         (vect_slp_analyze_and_verify_node_alignment)
2530         (vect_analyze_group_access_1, vect_analyze_group_access)
2531         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2532         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2533         (vect_supportable_dr_alignment): Update accordingly.
2534         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2535         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2536         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2537         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2538         * tree-vect-slp.c (vect_build_slp_tree_1)
2539         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2540         (vect_split_slp_store_group, vect_analyze_slp_instance)
2541         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2542         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2543         (get_group_load_store_type, get_load_store_type)
2544         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2545         (vect_transform_stmt, vect_remove_stores): Likewise.
2547 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2549         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2550         than a gimple stmt.
2551         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2552         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2553         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2554         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2555         (vector_alignment_reachable_p, vect_get_data_access_cost)
2556         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2557         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2558         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2559         (vect_analyze_group_access_1, vect_analyze_group_access)
2560         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2561         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2562         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2563         result of vect_dr_stmt and use the stmt_vec_info instead of
2564         the associated gimple stmt.
2565         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2566         (vect_gen_prolog_loop_niters): Likewise.
2567         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2569 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2571         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2572         to a vec<stmt_vec_info>.
2573         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2574         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2575         vec<stmt_vec_info>.
2576         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2577         to a vec<stmt_vec_info>.
2578         (bst_traits::value_type, bst_traits::value_type): Likewise.
2579         (bst_traits::hash): Update accordingly.
2580         (vect_get_and_check_slp_defs): Change the stmts parameter from
2581         a vec<gimple *> to a vec<stmt_vec_info>.
2582         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2583         (vect_build_slp_tree): Likewise.
2584         (vect_build_slp_tree_2): Likewise.  Update uses of
2585         SLP_TREE_SCALAR_STMTS.
2586         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2587         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2588         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2589         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2590         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2591         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2592         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2593         (vect_get_constant_vectors, vect_get_slp_defs)
2594         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2595         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2596         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2597         instead of gimple stmts.
2598         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2599         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2600         (vect_slp_analyze_instance_dependence): Update uses of
2601         SLP_TREE_SCALAR_STMTS.
2602         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2603         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2604         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2605         (get_initial_defs_for_reduction): Likewise.
2606         (vect_create_epilog_for_reduction): Likewise.
2607         (vectorize_fold_left_reduction): Likewise.
2608         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2609         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2610         (can_vectorize_live_stmts): Likewise.
2612 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2614         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2615         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2616         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2617         than gimple stmts.
2618         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2619         of a gimple stmt.
2620         (gather_scalar_reductions): Update after above interface changes.
2621         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2622         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2623         than gimple stmts.
2624         (vect_force_simple_reduction): Likewise.
2625         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2626         LOOP_VINFO_REDUCTIONS.
2627         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2629 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2631         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2632         a gimple stmt to a stmt_vec_info.
2633         * tree-vect-loop.c (vect_active_double_reduction_p)
2634         (vect_force_simple_reduction, vectorizable_reduction): Update
2635         accordingly.
2637 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2639         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2640         vec<gimple *> to a vec<stmt_vec_info>.
2641         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2642         the reduction_phis argument from a vec<gimple *> to a
2643         vec<stmt_vec_info>.
2644         (vectorizable_reduction): Likewise the phis local variable that
2645         is passed to vect_create_epilog_for_reduction.  Update for new type
2646         of SLP_TREE_VEC_STMTS.
2647         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2648         (vectorizable_live_operation): Likewise.
2649         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2650         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2652 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2654         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2655         a gimple stmt to a stmt_vec_info.
2656         (vectorizable_condition, vectorizable_live_operation)
2657         (vectorizable_reduction, vectorizable_induction): Pass back the
2658         vectorized statement as a stmt_vec_info.
2659         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2660         use of STMT_VINFO_VEC_STMT.
2661         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2662         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2663         as stmt_vec_infos rather than gimple stmts.
2664         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2665         to a stmt_vec_info.
2666         (vectorizable_live_operation): Likewise.
2667         (vectorizable_reduction, vectorizable_induction): Likewise,
2668         updating use of STMT_VINFO_VEC_STMT.
2669         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2670         of STMT_VINFO_VEC_STMT.
2671         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2672         (vectorizable_simd_clone_call, vectorizable_conversion)
2673         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2674         (vectorizable_store, vectorizable_load, vectorizable_condition)
2675         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2676         from a gimple stmt to a stmt_vec_info.
2677         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2678         pointer to a stmt_vec_info to the vectorizable_* routines.
2680 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2682         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2683         a gimple stmt to a stmt_vec_info.
2684         (is_pattern_stmt_p): Update accordingly.
2685         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2686         (vect_record_grouped_load_vectors): Likewise.
2687         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2688         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2689         (vect_model_reduction_cost): Likewise.
2690         (vect_create_epilog_for_reduction): Likewise.
2691         (vectorizable_reduction, vectorizable_induction): Likewise.
2692         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2693         Return the stmt_vec_info for the pattern statement.
2694         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2695         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2696         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2697         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2698         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2699         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2700         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2701         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2703 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2705         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2706         (vect_finish_stmt_generation): Likewise.
2707         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2708         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2709         (vect_build_gather_load_calls): Use the return value of the above
2710         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2711         scopes for the input gimple stmt and wider scopes for the associated
2712         stmt_vec_info.  Use vec_info::lookup_def when setting these
2713         stmt_vec_infos from an SSA_NAME definition.
2714         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2715         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2716         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2717         (vectorizable_store, vectorizable_load, vectorizable_condition)
2718         (vectorizable_comparison): Likewise.
2719         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2720         (vectorizable_reduction): Likewise.
2722 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2724         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2725         stmt_vec_info * parameter before the optional gimple **.
2726         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2727         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2728         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2729         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2730         (vectorizable_live_operation): Likewise.
2731         * tree-vect-patterns.c (type_conversion_p): Likewise.
2732         (vect_look_through_possible_promotion): Likewise.
2733         (vect_recog_rotate_pattern): Likewise.
2734         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2736 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2738         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2739         a typedef to a wrapper class.
2740         (NULL_STMT_VEC_INFO): New macro.
2741         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2742         (stmt_vec_info::operator*): New function.
2743         (stmt_vec_info::operator gimple *): Likewise.
2744         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2745         (add_stmt_costs): Likewise.
2746         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2747         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2748         (vect_get_known_peeling_cost): Likewise.
2749         (vect_estimate_min_profitable_iters): Likewise.
2750         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2751         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2752         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2753         (vectorizable_store, free_stmt_vec_infos): Likewise.
2754         (new_stmt_vec_info): Change return type of xcalloc to
2755         _stmt_vec_info *.
2757 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2759         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2760         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2761         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2762         a single_imm_use-based sequence.
2763         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2765 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2767         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2768         * tree-vectorizer.c (vec_info::lookup_def): New function.
2769         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2770         (vect_widened_op_tree): Likewise.
2771         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2772         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2773         (vectorizable_reduction): Likewise.
2774         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2775         of a gimple *.
2776         (vect_is_slp_reduction): Update calls accordingly.  Use
2777         vec_info::lookup_def.
2778         (vect_is_simple_reduction): Likewise
2779         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2781 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2783         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2784         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2785         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2786         of vinfo_for_stmt.
2787         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2788         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2789         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2790         (vect_is_slp_reduction, vectorizable_induction)
2791         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2792         * tree-vect-patterns.c (vect_init_pattern_stmt):
2793         (vect_determine_min_output_precision_1, vect_determine_precisions)
2794         (vect_pattern_recog): Likewise.
2795         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2796         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2797         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2798         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2799         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2800         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2801         info field from a loop to a loop_vec_info.
2803 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2805         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2806         (vec_info::add_stmt): Declare.
2807         * tree-vectorizer.c (vec_info::add_stmt): New function.
2808         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2809         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2810         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2811         (vectorizable_induction): Likewise.
2812         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2813         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2814         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2815         (vectorizable_load): Likewise.
2816         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2817         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2818         (vect_recog_gather_scatter_pattern): Likewise.
2819         (append_pattern_def_seq): Likewise.  Remove a check that is
2820         performed by add_stmt itself.
2822 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2824         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2825         which make_ssa_name was called with new_stmt before new_stmt
2826         had been created.
2828 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2830         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2831         split out from...
2832         (vect_is_slp_reduction): ...here...
2833         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2834         that are already known to be false.
2836 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2838         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2839         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2840         STMT_VINFO_NUM_SLP_USES when it's true.
2841         (vect_free_slp_instance): Add a final_p parameter and pass it to
2842         vect_free_slp_tree.
2843         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2844         (vect_analyze_slp_instance): Likewise.
2845         (vect_slp_analyze_operations): Likewise.
2846         (vect_slp_analyze_bb_1): Likewise.
2847         * tree-vectorizer.c (vec_info): Likewise.
2848         * tree-vect-loop.c (vect_transform_loop): Likewise.
2850 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2852         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2853         function is not called for second and subsequent members of
2854         a reduction group.
2856 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2858         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2859         cases for nested loops from here to ...
2860         (vect_create_epilog_for_reduction): ...here.  Only call
2861         vect_is_simple_use for inner-loop reductions.
2863 2018-07-31  Martin Liska  <mliska@suse.cz>
2865         PR gcov-profile/85338
2866         PR gcov-profile/85350
2867         PR gcov-profile/85372
2868         * profile.c (struct location_triplet): New.
2869         (struct location_triplet_hash): Likewise.
2870         (output_location): Do not output a BB that
2871         is already recorded for a line.
2872         (branch_prob): Use streamed_locations.
2874 2018-07-31  Martin Liska  <mliska@suse.cz>
2876         PR gcov-profile/85370
2877         * coverage.c (coverage_begin_function): Do not mark target
2878         clones as artificial functions.
2880 2018-07-31  Martin Liska  <mliska@suse.cz>
2882         PR gcov-profile/83813
2883         PR gcov-profile/84758
2884         PR gcov-profile/85217
2885         PR gcov-profile/85332
2886         * profile.c (branch_prob): Do not record GOTO expressions
2887         for GIMPLE statements which locations are already streamed.
2889 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2891         * gcc.c (handle_spec_function): Accept a soft_matched_part
2892         argument, as do_spec_1.  Pass it down to ...
2893         (eval_spec_function): Accept a soft_matched_part argument,
2894         and pass it down to ...
2895         (do_spec_2): Accept a soft_matched_part argument, and pass
2896         it down to do_spec_1.
2897         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2898         (handle_braces): Update call to handle_spec_function.
2899         (driver::set_up_specs): Update calls to do_spec_2.
2900         (compare_debug_dump_opt_spec_function): Likewise.
2901         (compare_debug_self_opt_spec_function): Likewise.
2903 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2905         * common.opt (nolibc): New option.
2906         * doc/invoke.texi (Link Options): Document it.
2907         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2908         * config/alpha/linux.h: Likewise.
2909         * config/arc/elf.h: Likewise.
2910         * config/arm/uclinux-elf.h: Likewise.
2911         * config/arm/unknown-elf.h: Likewise.
2912         * config/avr/avrlibc.h: Likewise.
2913         * config/bfin/bfin.h: Likewise.
2914         * config/bfin/linux.h: Likewise.
2915         * config/bfin/uclinux.h: Likewise.
2916         * config/darwin.h: Likewise.
2917         * config/darwin10.h: Likewise.
2918         * config/darwin12.h: Likewise.
2919         * config/gnu-user.h: Likewise.
2920         * config/lm32/uclinux-elf.h: Likewise.
2921         * config/pa/pa-hpux11.h: Likewise.
2922         * config/pa/pa64-hpux.h: Likewise.
2923         * config/sparc/sparc.h: Likewise.
2925 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2927         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2928         undefined variables.
2930 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2932         PR target/86640
2933         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2934         instead of GEN_INT.
2936 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2938         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2939         terminated string literal.
2941 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2943         PR rtl-optimization/85160
2944         * combine.c (is_just_move): New function.
2945         (try_combine): Allow combining two instructions into two if neither of
2946         the original instructions was a move.
2948 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2950         PR target/86673
2951         * doc/extend.texi (Global Register Variables): Discourage use of type
2952         qualifiers.
2953         (Local Register Variables): Likewise.
2955 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2957         PR tree-optimization/86506
2958         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2960 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2962         PR target/86547
2963         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2964         hard_regno, make sure no insn between `from` and `to` clobbers it.
2966 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2967             Tom de Vries  <tdevries@suse.de>
2969         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2970         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2971         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2972         PTX_DEFAULT_RUNTIME_DIM.
2973         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2975 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2977         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2978         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2979         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2981 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2983         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2984         used.
2985         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2986         predicate to reflect toc fusion has been deleted.
2987         (toc_fusion_mem_raw): Delete, no longer used.
2988         (toc_fusion_mem_wrapped): Likewise.
2989         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2990         fusion mask bit.
2991         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2992         Delete, no longer used.
2993         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2994         meant to be used for toc fusion.
2995         (rs6000_debug_print_mode): Delete toc fusion debugging.
2996         (rs6000_debug_reg_global): Likewise.
2997         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2998         fusion and secondary reload support that were never used.
2999         (rs6000_option_override_internal): Delete TOC fusion, that was only
3000         partially defined, and it did not work unless you also used the
3001         -mcmodel= switch.
3002         (rs6000_legitimate_address_p): Delete TOC fusion support.
3003         (rs6000_opt_masks): Likewise.
3004         (fusion_wrap_memory_address): Delete function, no longer used.
3005         (fusion_split_address); Delete TOC fusion support.
3006         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3007         longer used with toc fusion being deleted.
3008         (TARGET_TOC_FUSION_FP): Likewise.
3009         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3010         UNSPEC.
3011         (toc fusion spliter): Delete TOC fusion support.
3012         (toc_fusionload_<mode>): Likewise.
3013         (toc_fusionload_di): Likewise.
3014         (fusion_gpr_load_<mode>): Delete generator function, this insn no
3015         longer needs to be named.  Rename predicate to delete TOC fusion.
3016         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3017         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3018         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3019         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3020         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3022 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3024         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3025         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
3026         __int128 in built-in function prototypes.
3027         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3028         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3030 2018-07-27  Martin Sebor  <msebor@redhat.com>
3032         PR tree-optimization/86696
3033         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3034         types, including enums.
3035         (handle_char_store): Be prepared for the above function to fail.
3037 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
3039         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3040         when optimization level is lower than 2 or optimize for size.
3042 2018-07-26  Martin Sebor  <msebor@redhat.com>
3044         PR tree-optimization/86043
3045         PR tree-optimization/86042
3046         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3047         (get_string_cst_length): Rename...
3048         (get_min_string_length): ...to this.  Add argument.
3049         (handle_char_store): Extend to handle multi-character stores by
3050         MEM_REF.
3051         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
3052         * tree.h (initializer_zerop): Add argument.
3054 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
3056         PR middle-end/86660
3057         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3058         declare target to variables if they have always,{to,from,tofrom} map
3059         kinds.
3061 2018-07-26  Martin Liska  <mliska@suse.cz>
3063         PR lto/86548
3064         * lto-wrapper.c: Add linker_output as prefix
3065         for ltrans_output_file.
3067 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
3069         PR rtl-optimization/85805
3070         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3071         value for hard registers if that was written in the same mode.
3073 2018-07-26  Martin Liska  <mliska@suse.cz>
3075         PR gcov-profile/86536
3076         * gcov.c (format_gcov): Use printf format %.*f directly
3077         and do not handle special values.
3079 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3081         * common/config/arc/arc-common.c (arc_option_optimization_table):
3082         Update default optimizations for size.
3084 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3086         * config/arc/arc.md (movsf_insn): Add short instruction selection.
3087         * config/arc/constraints.md (CfZ): New constraint.
3088         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3089         (subsf3_fpu): Likewise.
3090         (cmpsf_fpu): Likewise.
3091         (cmpsf_fpu_uneq): Likewise.
3093 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3095         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3096         accesses as well.
3097         (arc_is_uncached_mem_p): uncached applies to both the variable and
3098         the pointer.
3100 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3102         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3103         register names.
3105 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
3107         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3108         field "m_scopes" from vec to auto_vec.
3110 2018-07-25  Martin Liska  <mliska@suse.cz>
3112         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3113         return type.
3115 2018-07-25  Richard Biener  <rguenther@suse.de>
3117         PR debug/86654
3118         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3119         special wrt context_die late.
3120         (gen_subprogram_die): Re-use DIEs in local scope.
3122 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
3124         PR tree-optimization/86644
3125         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
3127 2018-07-25  Martin Liska  <mliska@suse.cz>
3129         PR middle-end/86645
3130         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3131         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3133 2018-07-25  Martin Liska  <mliska@suse.cz>
3135         PR sanitizer/79635
3136         * params.def: Explain ASan abbreviation and provide
3137         a documentation link.
3139 2018-07-24  Martin Sebor  <msebor@redhat.com>
3141         PR tree-optimization/86622
3142         PR tree-optimization/86532
3143         * builtins.h (string_length): Declare.
3144         * builtins.c (c_strlen): Correct handling of non-constant offsets.
3145         (check_access): Be prepared for non-constant length ranges.
3146         (string_length): Make extern.
3147         * expr.c (string_constant): Only handle the minor non-constant
3148         array index.  Use string_constant to compute the length of
3149         a generic string constant.
3151 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
3153         PR tree-optimization/86618
3154         * tree-vect-stmts.c (vectorizable_call): Don't take the address
3155         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3157 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
3159         PR tree-optimization/86636
3160         * json.cc (json::object::set): Fix comment.  Add assertions.
3161         (json::array::append): Move here from json.h.  Add comment and an
3162         assertion.
3163         (json::string::string): Likewise.
3164         * json.h (json::array::append): Move to json.cc.
3165         (json::string::string): Likewise.
3166         * optinfo-emit-json.cc
3167         (optrecord_json_writer::impl_location_to_json): Assert that we
3168         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3169         wrapper around it.  Expand the location once, rather than three
3170         times.
3171         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3172         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3173         wrappers.
3174         (optrecord_json_writer::optinfo_to_json): Likewise, in four
3175         places.  Fix some overlong lines.
3177 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
3179         * config/aarch64/aarch64-simd.md
3180         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3181         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3182         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3183         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3184         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3185         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3186         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3187         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3188         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3190 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
3192         PR middle-end/86627
3193         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3194         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
3195         and abs_d == d, do the power of two handling if profitable.
3197 2018-07-24  Richard Biener  <rguenther@suse.de>
3199         * match.pd: Add BIT_FIELD_REF canonicalizations.
3201 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3203         PR c/86617
3204         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3206 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3208         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3209         terminated STRING_CST object.
3211 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3213         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3215 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3217         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3218         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3219         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3220         the elements into a register.
3221         (rs6000_split_v4si_init_di_reg): Delete.
3222         (rs6000_split_v4si_init): Delete.
3223         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3224         (vsx_init_v4si): Rewrite as a define_expand.
3226 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3228         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3229         zero_extend argument from memory): New.
3231 2018-07-22  Martin Sebor  <msebor@redhat.com>
3233         PR bootstrap/86621
3234         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3235         diagnosing calls with unknown arguments unless -Walloca-larger-than
3236         is restricted to less than PTRDIFF_MAX bytes.
3238 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
3240         * doc/gcov.texi (Invoking Gcov): Editorial changes.
3242 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3244         * pretty-print.c (text_info::set_location): Remove redundant
3245         "line_table" parameter from call to rich_location::set_range.
3247 2018-07-20  Martin Sebor  <msebor@redhat.com>
3249         PR middle-end/82063
3250         * builtins.c (expand_builtin_alloca): Adjust.
3251         * calls.c (alloc_max_size): Simplify.
3252         * cgraphunit.c (cgraph_node::expand): Adjust.
3253         * common.opt (larger_than_size, warn_frame_larger_than): Remove
3254         variables.
3255         (frame_larger_than_size): Same.
3256         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3257         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3258         Initialize.
3259         * doc/invoke.texi (GCC Command Options): Document option arguments.
3260         Explain byte-size arguments and suffixes.
3261         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3262         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3263         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3264         * doc/options.texi (UInteger): Expand.
3265         (Host_Wide_Int, ByteSize): Document new properties.
3266         * final.c (final_start_function_1): Include sizes in an error message.
3267         * function.c (frame_offset_overflow): Same.
3268         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3269         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3270         Diagnose unbounded alloca calls only for limits of less than
3271         PTRDIFF_MAX.
3272         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
3273         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
3274         for alloca(0).
3275         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
3276         only for limits of less than PTRDIFF_MAX.
3277         * langhooks-def.h (lhd_handle_option): Change function argument
3278         to HOST_WIDE_INT.
3279         * langhooks.c (lhd_handle_option): Same.
3280         * langhooks.h (handle_option): Same.
3281         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3282         ByteSize flags.
3283         (var_type, var_type_struct): Same.
3284         (var_set): Handle ByteSize flag.
3285         * optc-gen.awk: Add comments to output to ease debugging.  Make
3286         use of HOST_WIDE_INT where appropriate.
3287         * opts-gen-save.awk:  Use %lx to format unsigned long.
3288         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3289         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3290         arguments.  Parse bytes-size suffixes.
3291         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3292         (enum_value_to_arg): Same.
3293         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
3294         (handle_option): Adjust.
3295         (generate_option): Change function argument to HOST_WIDE_INT.
3296         (cmdline_handle_error): Adjust.
3297         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3298         (set_option): Change function argument to HOST_WIDE_INT.
3299         (option_enabled): Handle cl_host_wide_int.
3300         (get_option_state): Handle CLVC_SIZE.
3301         (control_warning_option): Same.
3302         * opts.c (common_handle_option): Change function argument to
3303         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
3304         OPT_Wvla_larger_than_.
3305         * opts.h (enum cl_var_type): Add an enumerator.
3306         * stor-layout.c (layout_decl): Print a more meaningful warning.
3307         * toplev.c (output_stack_usage): Adjust.
3309 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
3311         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3312         call to inline_expand_builtin_string_cmp.
3313         (expand_builtin_strcmp): Likewise.
3314         (expand_builtin_strncmp): Likewise.
3315         (inline_string_cmp): Delete the last parameter, change char_type_node
3316         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3317         two operands.
3318         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3319         the inlining expansion on target where the type of the call has same or
3320         narrower precision than unsigned char.
3322 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3324         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3325         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3326         * common.opt (fsave-optimization-record): New option.
3327         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3328         * doc/invoke.texi (-fsave-optimization-record): New option.
3329         * dumpfile.c: Include "optinfo-emit-json.h".
3330         (struct kv_pair): Move to coretypes.h.
3331         (optgroup_options): Make non-static.
3332         (dump_context::end_scope): Call
3333         optimization_records_maybe_pop_dump_scope.
3334         * dumpfile.h (optgroup_options): New decl.
3335         * json.cc: New file.
3336         * json.h: New file.
3337         * optinfo-emit-json.cc: New file.
3338         * optinfo-emit-json.h: New file.
3339         * optinfo.cc: Include "optinfo-emit-json.h".
3340         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3341         (optinfo_enabled_p): Check optimization_records_enabled_p.
3342         (optinfo_wants_inlining_info_p): Likewise.
3343         * optinfo.h: Update comment.
3344         * profile-count.c (profile_quality_as_string): New function.
3345         * profile-count.h (profile_quality_as_string): New decl.
3346         (profile_count::quality): New accessor.
3347         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3348         and optinfo_emit_json_cc_tests.
3349         * selftest.h (selftest::json_cc_tests): New decl.
3350         (selftest::optinfo_emit_json_cc_tests): New decl.
3351         * toplev.c: Include "optinfo-emit-json.h".
3352         (compile_file): Call optimization_records_finish.
3353         (do_compile): Call optimization_records_start.
3354         * tree-ssa-live.c: Include optinfo.h.
3355         (remove_unused_scope_block_p): Retain inlining information if
3356         optinfo_wants_inlining_info_p returns true.
3358 2018-07-20  Richard Biener  <rguenther@suse.de>
3360         PR debug/86585
3361         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3362         to cover -flto-partition=none.
3364 2018-07-20  Martin Liska  <mliska@suse.cz>
3366         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3367         (get_decl_source_range): Remove unused function.
3369 2018-07-20  Richard Biener  <rguenther@suse.de>
3371         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3372         (struct vn_phi_s): Likewise.
3373         (struct vn_reference_s): Likewise.
3374         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3375         for searching the slot of an entry known to be in the hash itself.
3376         (vn_phi_hasher::equal): Likewise.
3377         (vn_reference_hasher::equal): Likewise.
3378         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3379         globals.
3380         (optimistic_info, current_info): Remove, keeping only valid_info.
3381         (vn_reference_lookup_1): Remove fallback lookup.
3382         (vn_reference_lookup_2): Likewise.
3383         (vn_nary_op_lookup_1): Likewise.
3384         (vn_phi_lookup): Likewise.
3385         (vn_nary_build_or_lookup_1): Make sure to not chain the built
3386         hash element.
3387         (vn_reference_insert): Adjust, chain the inserted hash element
3388         at last_inserted_ref.
3389         (vn_reference_insert_pieces): Likewise.
3390         (visit_reference_op_call): Likewise.
3391         (vn_nary_op_insert_into): Chain the inserted hash element at
3392         last_inserted_nary.
3393         (vn_nary_op_insert_pieces): Adjust.
3394         (vn_nary_op_insert): Likewise.
3395         (vn_nary_op_insert_stmt): Likewise.
3396         (vn_phi_insert): Adjust, chain the inserted hash element at
3397         last_inserted_phi.
3398         (process_scc): Remove clearing and copying the optimistic
3399         table.  Instead remove elements inserted during an optimistic
3400         iteration from the single table we maintain.
3401         (init_scc_vn): Adjust.
3402         (free_scc_vn): Likewise.
3403         (sccvn_dom_walker::record_cond): Likewise.
3404         (sccvn_dom_walker::after_dom_children): Likewise.
3406 2018-07-19  Martin Sebor  <msebor@redhat.com>
3408         PR tree-optimization/84047
3409         PR tree-optimization/83776
3410         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3411         (check_array_bounds): Call it.
3413 2018-07-19  Martin Sebor  <msebor@redhat.com>
3415         * align.h (align_flags): Use member initialization.
3417 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
3419         * Makefile.in (OBJS): Add optinfo.o.
3420         * coretypes.h (class symtab_node): New forward decl.
3421         (struct cgraph_node): New forward decl.
3422         (class varpool_node): New forward decl.
3423         * dump-context.h: New file.
3424         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3425         "tree-pass.h".
3426         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3427         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3428         (set_alt_dump_file): Likewise.
3429         (dump_context::~dump_context): New dtor.
3430         (dump_gimple_stmt): Move implementation to...
3431         (dump_context::dump_gimple_stmt): ...this new member function.
3432         Add the stmt to any pending optinfo, creating one if need be.
3433         (dump_gimple_stmt_loc): Move implementation to...
3434         (dump_context::dump_gimple_stmt_loc): ...this new member function.
3435         Start a new optinfo and add the stmt to it.
3436         (dump_gimple_expr): Move implementation to...
3437         (dump_context::dump_gimple_expr): ...this new member function.
3438         Add the stmt to any pending optinfo, creating one if need be.
3439         (dump_gimple_expr_loc): Move implementation to...
3440         (dump_context::dump_gimple_expr_loc): ...this new member function.
3441         Start a new optinfo and add the stmt to it.
3442         (dump_generic_expr): Move implementation to...
3443         (dump_context::dump_generic_expr): ...this new member function.
3444         Add the tree to any pending optinfo, creating one if need be.
3445         (dump_generic_expr_loc): Move implementation to...
3446         (dump_context::dump_generic_expr_loc): ...this new member
3447         function.  Add the tree to any pending optinfo, creating one if
3448         need be.
3449         (dump_printf): Move implementation to...
3450         (dump_context::dump_printf_va): ...this new member function.  Add
3451         the text to any pending optinfo, creating one if need be.
3452         (dump_printf_loc): Move implementation to...
3453         (dump_context::dump_printf_loc_va): ...this new member function.
3454         Start a new optinfo and add the stmt to it.
3455         (dump_dec): Move implementation to...
3456         (dump_context::dump_dec): ...this new member function.  Add the
3457         value to any pending optinfo, creating one if need be.
3458         (dump_context::dump_symtab_node): New member function.
3459         (dump_context::get_scope_depth): New member function.
3460         (dump_context::begin_scope): New member function.
3461         (dump_context::end_scope): New member function.
3462         (dump_context::ensure_pending_optinfo): New member function.
3463         (dump_context::begin_next_optinfo): New member function.
3464         (dump_context::end_any_optinfo): New member function.
3465         (dump_context::s_current): New global.
3466         (dump_context::s_default): New global.
3467         (dump_scope_depth): Delete global.
3468         (dumpfile_ensure_any_optinfo_are_flushed): New function.
3469         (dump_symtab_node): New function.
3470         (get_dump_scope_depth): Reimplement in terms of dump_context.
3471         (dump_begin_scope): Likewise.
3472         (dump_end_scope): Likewise.
3473         (selftest::temp_dump_context::temp_dump_context): New ctor.
3474         (selftest::temp_dump_context::~temp_dump_context): New dtor.
3475         (selftest::verify_item): New function.
3476         (ASSERT_IS_TEXT): New macro.
3477         (ASSERT_IS_TREE): New macro.
3478         (ASSERT_IS_GIMPLE): New macro.
3479         (selftest::test_capture_of_dump_calls): New test.
3480         (selftest::dumpfile_c_tests): Call it.
3481         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3482         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3483         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3484         descriptive comment.
3485         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3486         (dump_node, dump_bb): Move these unrelated decls.
3487         (class dump_manager): Add leading comment.
3488         * optinfo.cc: New file.
3489         * optinfo.h: New file.
3491 2018-07-19  Michael Collison  <michael.collison@arm.com>
3492             Richard Henderson <rth@redhat.com>
3494         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3495         (subti): Handle op1 zero.
3496         (subvti4, usub4ti4): New.
3497         (*sub<GPI>3_compare1_imm): New.
3498         (sub<GPI>3_carryinCV): New.
3499         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3500         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3502 2018-07-19  Michael Collison  <michael.collison@arm.com>
3503             Richard Henderson <rth@redhat.com>
3505         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3506         (addti3): Create simpler code if low part is already known to be 0.
3507         (addvti4, uaddvti4): New.
3508         (*add<GPI>3_compareC_cconly_imm): New.
3509         (*add<GPI>3_compareC_cconly): New.
3510         (*add<GPI>3_compareC_imm): New.
3511         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3512         handle constants within this pattern..
3513         (*add<GPI>3_compareV_cconly_imm): New.
3514         (*add<GPI>3_compareV_cconly): New.
3515         (*add<GPI>3_compareV_imm): New.
3516         (add<GPI>3_compareV): New.
3517         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3518         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3519         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3520         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3521         with 'comparison' operator.
3522         (*add<GPI>3_compareV_cconly_imm): Ditto.
3523         (*add<GPI>3_compareV_cconly): Ditto.
3524         (*add<GPI>3_compareV_imm): Ditto.
3525         (add<GPI>3_compareV): Ditto.
3526         (add<mode>3_carryinC): Ditto.
3527         (*add<mode>3_carryinC_zero): Ditto.
3528         (*add<mode>3_carryinC): Ditto.
3529         (add<mode>3_carryinV): Ditto.
3530         (*add<mode>3_carryinV_zero): Ditto.
3531         (*add<mode>3_carryinV): Ditto.
3533 2018-07-19  Michael Collison  <michael.collison@arm.com>
3534             Richard Henderson <rth@redhat.com>
3536         * config/aarch64/aarch64-modes.def (CC_V): New.
3537         * config/aarch64/aarch64-protos.h
3538         (aarch64_addti_scratch_regs): Declare
3539         (aarch64_subvti_scratch_regs): Declare.
3540         (aarch64_expand_subvti): Declare.
3541         (aarch64_gen_unlikely_cbranch): Declare
3542         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3543         for signed overflow using CC_Vmode.
3544         (aarch64_get_condition_code_1): Handle CC_Vmode.
3545         (aarch64_gen_unlikely_cbranch): New function.
3546         (aarch64_addti_scratch_regs): New function.
3547         (aarch64_subvti_scratch_regs): New function.
3548         (aarch64_expand_subvti): New function.
3550 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3552         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3553         extension.
3554         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3555         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3556         extension.
3558 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3560         PR target/83009
3561         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3562         address check not strict.
3564 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3566         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3567         Umq with Umn.
3568         (store_pair_lanes<mode>): Likewise.
3569         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3570         enum value 'ADDR_QUERY_LDP_STP_N'.
3571         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3572         (aarch64_print_address_internal): Add declaration.
3573         (aarch64_print_ldpstp_address): Remove.
3574         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3575         (aarch64_print_operand): Change printing of 'y'.
3576         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3577         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3578         'true' rather than '1'.
3579         * config/aarch64/constraints.md (Uml): Likewise.
3580         (Uml): Rename to Umn.
3581         (Umq): Remove.
3583 2018-07-19  Richard Biener  <rguenther@suse.de>
3585         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3586         a trailing array.
3587         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3588         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3589         (vn_reference_hasher): Likewise.
3590         (struct vn_tables_s): Remove obstack and alloc-pool members.
3591         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3592         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3593         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3594         (vn_reference_insert_pieces): Likewise.
3595         (alloc_vn_nary_op_noinit): Adjust.
3596         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3597         (vn_phi_eq): Adjust.
3598         (shared_lookup_phiargs): Remove.
3599         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3600         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3601         (visit_reference_op_call): Likewise.
3602         (copy_nary, copy_phi, copy_reference): Remove.
3603         (process_scc): Rewind the obstack when iterating.  Do not
3604         copy the elements to valid_info but just move them from one
3605         hashtable to the other.
3606         (allocate_vn_table): Adjust.
3607         (free_vn_table): Likewise.
3608         (init_scc_vn): Likewise.
3609         (free_scc_vn): Likewise.
3611 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3613         PR target/86560
3614         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3615         indirect_return as function type attribute.
3616         (ix86_attribute_table): Change indirect_return to function
3617         type attribute.
3618         * doc/extend.texi: Update indirect_return attribute.
3620 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3622         * wide-int.h (widest2_int): New.
3623         * gimple-fold.c (arith_overflowed_p): Use it.
3624         * tree.h (widest2_int_cst): New.
3625         * tree-vrp.c (wide_int_binop_overflow): Rename from
3626         vrp_int_const_binop.
3627         Rewrite to work on trees.
3628         (extract_range_from_multiplicative_op_1): Abstract code to...
3629         (wide_int_range_min_max): ...here.
3630         (wide_int_range_cross_product): ...and here.
3631         (extract_range_from_binary_expr_1): Abstract overflow code to...
3632         (wide_int_range_mult_wrapping): ...here.
3633         * tree-vrp.h (wide_int_range_cross_product): New.
3634         (wide_int_range_mult_wrapping): New.
3636 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3637             Julia Koval  <julia.koval@intel.com>
3639         * config/i386/x86-tune-costs.h (skylake_memcpy,
3640         skylake_memset): Replace rep_prefix with unrolling for size 512.
3642 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3644         PR middle-end/86544
3645         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3646         comparision with EQ_EXPR in last stmt.
3648 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3650         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3651         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3652         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3653         previously known as "PowerPC AltiVec Built-in Functions".  Move
3654         some material to new subsubsections "PowerPC AltiVec Built-in
3655         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3656         ISA 2.07".
3657         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3658         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3659         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3660         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3662 2018-07-18  Richard Biener  <rguenther@suse.de>
3664         PR tree-optimization/86557
3665         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3666         EXACT_DIV_EXPR.
3668 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3670         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3672 2018-07-17  Jeff Law  <law@redhat.com>
3674         * config/arm/arm.c (get_label_padding): Update for recent
3675         changes to label_to_alignment.
3677         PR tree-optimization/86010
3678         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3680         * config/mips/mips.c (vr4130_align_insns): Update for recent
3681         changes to label_to_alignment.
3683         * config/frv/frv.c (frv_label_align): Update for recent changes
3684         to label_to_alignment.
3686         * config/nios2/nios2.c (nios2_label_align): Update for recent
3687         changes which dropped ALIGN_LABELS_LOG.
3689 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3691         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3692         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3694 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3696         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3697         deprecated align_labels_log.
3699 2018-07-17  Richard Biener  <rguenther@suse.de>
3701         PR lto/86456
3702         * dwarf2out.c (init_sections_and_labels): Always generate
3703         a debug_line_str_section for early LTO debug.
3704         (dwarf2out_finish): Reset debug_line_str_hash output early.
3705         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3706         with fat LTO part.
3707         (dwarf2out_early_finish): Output debug_line_str.
3709 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3711         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3712         index register on z196 or later.
3714 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3716         * config/s390/s390.c (s390_default_align): Set default function
3717         alignment to 16.
3718         (s390_override_options_after_change): Call s390_default align.
3719         (s390_option_override_internal): Call s390_default_align.
3720         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3722 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3724         PR middle-end/86542
3725         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3726         to _looptemp_ clauses, other than the first two.
3728 2018-07-17  Martin Liska  <mliska@suse.cz>
3730         * opts.c: Do not enable OPT_falign_* for -Os.
3732 2018-07-17  Martin Liska  <mliska@suse.cz>
3734         * align.h (MAX_CODE_ALIGN): New.
3735         (MAX_CODE_ALIGN_VALUE): New.
3736         * common/config/i386/i386-common.c (ix86_handle_option):
3737         (MAX_CODE_ALIGN): Moved to align.h.
3738         * final.c (MAX_CODE_ALIGN): Likewise.
3739         * opts.c (parse_and_check_align_values):
3740         (MAX_CODE_ALIGN): Likewise.
3741         (MAX_CODE_ALIGN_VALUE): Likewise.
3743 2018-07-17  Martin Liska  <mliska@suse.cz>
3745         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3746         in order to fulfil coding style.
3747         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3748         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3749         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3750         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3751         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3752         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3753         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3754         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3755         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3757 2018-07-17  Martin Liska  <mliska@suse.cz>
3759         * align.h: New file.
3760         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3761         directly.
3762         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3763         align_flags of label_to_alignment.
3764         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3765         align_flags class.
3766         * config/m68k/m68k.c: Do not use removed align_labels_value and
3767         align_loops_value.
3768         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3769         (LOOP_ALIGN): Likewise.
3770         (LABEL_ALIGN): Likewise.
3771         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3772         Remove not used macro.
3773         (rs6000_loop_align): Change return type to align_flags.
3774         (rs6000_loop_align_max_skip): Remove.
3775         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3776         Change return type to align_flags.
3777         * config/rs6000/rs6000.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/rx/rx.h (JUMP_ALIGN): Wrap integer values
3782         * config/rx/rx-protos.h (rx_align_for_label): Make it
3783         static function.
3784         * config/rx/rx.c (rx_align_for_label): Change return type
3785         to align_flags.
3786         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3787         macro definitions.
3788         into align_flags class.
3789         (LABEL_ALIGN): Likewise.
3790         (LOOP_ALIGN): Likewise.
3791         * config/s390/s390.c (s390_label_align): Use align_flags
3792         class member.
3793         (s390_asm_output_function_label): Likewise.
3794         * config/sh/sh.c (sh_override_options_after_change):
3795         Use align_flags class directly without macros.
3796         (find_barrier): Likewise.
3797         (barrier_align): Likewise.
3798         (sh_loop_align): Likewise.
3799         * config/spu/spu.c (spu_option_override):
3800         Use align_flags_tuple::get_value instead of removed macros.
3801         (spu_sched_init): Likewise.
3802         * config/spu/spu.h (GTY): Likewise.
3803         * config/visium/visium.c (visium_option_override):
3804         Set "8" as default secondary alignment.
3805         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3806         in order to guarantee secondary alignment of 8.
3807         * coretypes.h: Include align.h header file.
3808         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3809         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3810         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3811         * doc/tm.texi.in: Likewise.
3812         * final.c (struct label_alignment): Remove not used structure.
3813         (LABEL_ALIGN): Change type to align_flags.
3814         (LOOP_ALIGN): Likewise.
3815         (JUMP_ALIGN): Likewise.
3816         (default_loop_align_max_skip): Remove.
3817         (default_label_align_max_skip): Likewise.
3818         (default_jump_align_max_skip): Likewise.
3819         (default_label_align_after_barrier_max_skip):
3820         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3821         (LABEL_TO_MAX_SKIP): Remove.
3822         (label_to_alignment): Return align_flags type instead of integer.
3823         (label_to_max_skip): Remove.
3824         (align_fuzz): Use align_flags type.
3825         (compute_alignments): Use align_flags type and use align_flags::max
3826         to combine multiple alignments.
3827         (grow_label_align): Grow vec instead of C array.
3828         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3829         (shorten_branches):  Use align_flags type and use align_flags::max
3830         to combine multiple alignments.
3831         (final_scan_insn_1): Remove usage of secondary alignment that comes
3832         from label alignment, but instead use proper secondary alignment
3833         which is computed in grow_label_align.
3834         * flags.h (struct align_flags_tuple): Move to align.h.
3835         (struct align_flags): Likewise.
3836         (state_align_loops): Rename to align_loops.
3837         (state_align_jumps): Rename to align_jumps.
3838         (state_align_labels): Rename to align_labels.
3839         (state_align_functions): Rename to align_functions.
3840         (align_loops_log): Remove.
3841         (align_jumps_log): Remove.
3842         (align_labels_log): Remove.
3843         (align_functions_log): Remove.
3844         (align_loops_max_skip): Remove.
3845         (align_jumps_max_skip): Remove.
3846         (align_labels_max_skip): Remove.
3847         (align_functions_max_skip): Remove.
3848         (align_loops_value): Remove.
3849         (align_jumps_value): Remove.
3850         (align_labels_value): Remove.
3851         (align_functions_value): Remove.
3852         * output.h (label_to_alignment): Change return type to align_flags.
3853         (label_to_max_skip): Remove.
3854         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3855         jump_align_max_skip macros.
3856         * targhooks.h (default_loop_align_max_skip): Remove.
3857         (default_label_align_max_skip): Likewise.
3858         (default_jump_align_max_skip): Likewise.
3859         (default_label_align_after_barrier_max_skip): Remove.
3860         * toplev.c (read_log_maxskip): Use ::normalize function.
3861         (parse_N_M): Remove not used argument and also call ::normalize.
3862         (parse_alignment_opts): Do not pass unused arguments.
3863         * varasm.c (assemble_start_function): Use directly align_functions
3864         instead of removed macros.
3865         * system.h: Do not poison removed macros.
3867 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3869         PR middle-end/86539
3870         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3871         and cond temporaries don't have reference type if iterator has
3872         pointer type.  For init use &for_pre_body instead of pre_p if
3873         for_pre_body is non-empty.
3875 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3877         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3878         double-double modes to SFmode directly directly.
3879         (trunc<mode>sf2_fprs): Delete.
3881 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3883         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3884         for conversions between IFmode and the decimal floating point modes.
3885         (init_float128_ieee): Use the correct names for conversions between
3886         KFmode and the decimal floating point modes.
3888 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3890         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3891         for the conversions between TDmode and IFmode.
3892         (init_float128_ieee): Use more correct names for the conversions
3893         between TDmode and KFmode.
3895 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3897         PR tree-optimization/86526
3898         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3899         (inline_expand_builtin_string_cmp): Likewise.
3900         (inline_string_cmp): Likewise.  Use c_readstr instead of
3901         builtin_memcpy_read_str.  Add unit_mode temporary.
3903 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3905         PR middle-end/86528
3906         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3907         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3909 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3911         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3912         Alphabetize prototypes of built-in functions, separating out
3913         built-in functions that are listed in this section but should be
3914         described elsewhere.
3916 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3918         PR target/86511
3919         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3920         conditional move when trapping comparison was split to a
3921         non-trapping one (and vice versa).
3923 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3925         * config/s390/s390.c (s390_function_profiler): Generate nops
3926         instead of profiler call sequences.
3927         * config/s390/s390.opt: Add the new option.
3929 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3931         * config/s390/s390.c (s390_function_profiler): Generate
3932         __mcount_loc section.
3933         * config/s390/s390.opt: Add the new option.
3935 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3937         * common.opt: Add the new warning.
3938         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3939         %r0,__fentry__" when -mfentry is specified.
3940         (s390_option_override_internal): Disallow -mfentry for 31-bit
3941         CPUs.
3942         * config/s390/s390.opt: Add the new option.
3944 2018-07-16  Richard Biener  <rguenther@suse.de>
3946         PR lto/86523
3947         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3948         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3950 2018-07-16  Martin Liska  <mliska@suse.cz>
3952         PR ipa/86529
3953         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3954         to ::get_create.
3956 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3958         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3960 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3962         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3963         for ARCHS4x.
3964         * config/arc/arc-cpus.def (hs4x): New cpu.
3965         (hs4xd): Likewise.
3966         * config/arc/arc-tables.opt: Regenerate.
3967         * config/arc/arc.c (arc_sched_issue_rate): New function.
3968         (TARGET_SCHED_ISSUE_RATE): Define.
3969         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3970         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3971         fpu_cvt.
3972         (attr tune): Add ARCHS4x tune values.
3973         (attr tune_dspmpy): Define.
3974         (*tst): Correct instruction type.
3975         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3976         * config/arc/arcHS4x.md: New file.
3977         * config/arc/fpu.md: Update instruction type attributes.
3978         * config/arc/t-multilib: Regenerate.
3980 2018-07-16  Tom de Vries  <tdevries@suse.de>
3982         PR debug/86455
3983         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3985 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3987         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3988         early clobber.
3990 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3992         PR tree-optimization/86514
3993         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3994         conversion to a boolean type from a type with greater precision.
3996 2018-07-16  Tom de Vries  <tdevries@suse.de>
3998         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3999         dump_flags request TDF_SLIM.
4001 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
4003         * fold-const.c (int_const_binop_1): Abstract...
4004         (wide_int_binop): ...wide int code here.
4005         (poly_int_binop): ...poly int code here.
4006         Abstract the rest of int_const_binop_1 into int_const_binop.
4007         * fold-const.h (wide_int_binop): New.
4008         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4009         Remove useless PLUS/MINUS_EXPR case.
4010         (zero_nonzero_bits_from_vr): Move wide int code...
4011         (zero_nonzero_bits_from_bounds): ...here.
4012         (extract_range_from_binary_expr_1): Move mask optimization code...
4013         (range_easy_mask_min_max): ...here.
4014         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4015         (range_easy_mask_min_max): New.
4017 2018-07-15  Jeff Law  <law@redhat.com>
4019         PR target/85993
4020         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4021         block.
4023 2018-07-14  Jim Wilson  <jimw@sifive.com>
4025         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4027 2018-07-14  Paul Koning  <ni1d@arrl.net>
4029         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4031 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
4033         * lto-streamer-out.c (copy_function_or_variable): Dump info about
4034         copying section.
4036 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
4037             Steve Munroe  <munroesj52@gmail.com>
4039         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4040         (_mm_andnot_si128): Likewise.
4041         (_mm_or_si128): Likewise.
4042         (_mm_xor_si128): Likewise.
4044 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
4046         PR middle-end/78809
4047         * builtins.c (expand_builtin_memcmp): Inline the calls first
4048         when result_eq is false.
4049         (expand_builtin_strcmp): Inline the calls first.
4050         (expand_builtin_strncmp): Likewise.
4051         (inline_string_cmp): New routine. Expand a string compare
4052         call by using a sequence of char comparison.
4053         (inline_expand_builtin_string_cmp): New routine. Inline expansion
4054         a call to str(n)cmp/memcmp.
4055         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4056         New option.
4057         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4059 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
4061         * config/arm/driver-arm.c: Include arm-native.h.
4062         (host_detect_local_cpu): Use auto-generated data tables.
4063         (vendors, arm_cpu_table): Delete.  Move part information to ...
4064         * config/arm/arm-cpus.in: ... here.
4065         * config/arm/parsecpu.awk (gen_native): New function.
4066         (vendor, part): New CPU fields.
4067         (END): Add support for building the native CPU detection tables.
4068         * config/arm/t-arm (arm-native.h): Add build rule.
4069         (driver-arm.o): Add dependency on arm-native.h.
4071 2018-07-13  Richard Biener  <rguenther@suse.de>
4073         PR middle-end/85974
4074         * match.pd (addr1 - addr2): Allow either of the operand to
4075         have a conversion.
4077 2018-07-13  Tom de Vries  <tdevries@suse.de>
4079         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4080         in remap_ssa_name.
4082 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
4084         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4085         arrays instead of numbered variables.
4087 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
4089         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4090         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4092 2018-07-13  Richard Biener  <rguenther@suse.de>
4094         PR debug/86452
4095         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4096         instead of get_context_die.
4098 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
4099             Richard Biener  <rguenther@suse.de>
4101         PR middle-end/86489
4102         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4103         that the loop latch destination where phi is defined.
4105 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
4107         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4108         (riscv_expand_epilogue): Add assertion to check interrupt mode.
4109         (riscv_set_current_function): Extract getting interrupt type to new
4110         function.
4111         (riscv_get_interrupt_type): New function.
4112         (riscv_merge_decl_attributes): New function, checking interrupt type is
4113         same.
4114         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4116 2018-07-12  Paul Koning  <ni1d@arrl.net>
4118         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4119         directive.
4121 2018-07-12  Paul Koning  <ni1d@arrl.net>
4123         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4124         zero reference, add doloop_end instead.
4125         * doc/md.texi (decrement_and_branch_until_zero): Remove.
4126         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
4127         detail for doloop_end.
4129 2018-07-12  Martin Sebor  <msebor@redhat.com>
4131         PR c/86453
4132         * attribs.c (decl_attributes): Reject conflicting attributes before
4133         calling attribute handlers.
4135 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4137         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4138          parameter.
4139         (gcc::dump_manager::get_dump_file_name): likewise.
4140         (dump_begin): Likewise.
4141         * dumpfile.h (dump_begin): Update prototype.
4142         (gcc::dump_manager::get_dump_file_name,
4143         gcc::dump_manager::get_dump_file_name): Update prototype.
4145 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4147         * internal-fn.h (vectorizable_internal_fn_p): New function.
4148         * tree-vect-slp.c (compatible_calls_p): Likewise.
4149         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
4150         to internal functions.
4151         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4153 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4155         * fold-const.h (inverse_conditions_p): Declare.
4156         * fold-const.c (inverse_conditions_p): New function.
4157         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
4158         that test the inverse condition of a conditional internal function.
4159         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4160         * internal-fn.c (internal_fn_mask_index): Handle conditional
4161         internal functions.
4162         (vectorized_internal_fn_supported_p): New function.
4163         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4164         (any_pred_load_store): Replace with...
4165         (need_to_predicate): ...this new variable.
4166         (redundant_ssa_names): New variable.
4167         (ifcvt_can_use_mask_load_store): Move initial checks to...
4168         (ifcvt_can_predicate): ...this new function.  Handle tree codes
4169         for which a conditional internal function exists.
4170         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4171         instead of ifcvt_can_use_mask_load_store.  Update after variable
4172         name change.
4173         (predicate_load_or_store): New function, split out from
4174         predicate_mem_writes.
4175         (check_redundant_cond_expr): New function.
4176         (value_available_p): Likewise.
4177         (predicate_rhs_code): Likewise.
4178         (predicate_mem_writes): Rename to...
4179         (predicate_statements): ...this.  Use predicate_load_or_store
4180         and predicate_rhs_code.
4181         (combine_blocks, tree_if_conversion): Update after above name changes.
4182         (ifcvt_local_dce): Handle redundant_ssa_names.
4183         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4184         general conditional functions.
4185         * tree-vect-stmts.c (vectorizable_call): Likewise.
4187 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4188             Alan Hayward  <alan.hayward@arm.com>
4189             David Sherwood  <david.sherwood@arm.com>
4191         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4192         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4193         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4194         plus and minus and convert them into IFN_COND_FMA-based sequences.
4195         (convert_mult_to_fma): Handle conditional plus and minus.
4197 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4199         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4200         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4201         (cond_fnms_optab): New optabs.
4202         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4203         internal functions.
4204         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4205         * internal-fn.h (get_conditional_internal_fn): Declare.
4206         (get_unconditional_internal_fn): Likewise.
4207         * internal-fn.c (cond_ternary_direct): New macro.
4208         (expand_cond_ternary_optab_fn): Likewise.
4209         (direct_cond_ternary_optab_supported_p): Likewise.
4210         (FOR_EACH_COND_FN_PAIR): Likewise.
4211         (get_conditional_internal_fn): New function.
4212         (get_unconditional_internal_fn): Likewise.
4213         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4214         (gimple_match_op::gimple_match_op): Add a new overload for 5
4215         operands.
4216         (gimple_match_op::set_op): Likewise.
4217         (gimple_resimplify5): Declare.
4218         * genmatch.c (decision_tree::gen): Generate simplifications for
4219         5 operands.
4220         * gimple-match-head.c (gimple_simplify): Define an overload for
4221         5 operands.  Handle calls with 5 arguments in the top-level overload.
4222         (convert_conditional_op): Handle conversions from unconditional
4223         internal functions to conditional ones.
4224         (gimple_resimplify5): New function.
4225         (build_call_internal): Pass a fifth operand.
4226         (maybe_push_res_to_seq): Likewise.
4227         (try_conditional_simplification): Try converting conditional
4228         internal functions to unconditional internal functions.
4229         Handle 3-operand unconditional forms.
4230         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4231         Define ternary equivalents of the current rules for binary conditional
4232         internal functions.
4233         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4234         ternary operations.
4235         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4236         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4237         (optab): Handle them.
4238         (SVE_COND_FP_TERNARY): New int iterator.
4239         (sve_fmla_op, sve_fmad_op): New int attributes.
4240         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4241         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4242         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4244 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4246         * target.def (preferred_else_value): New target hook.
4247         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4248         * doc/tm.texi: Regenerate.
4249         * targhooks.h (default_preferred_else_value): Declare.
4250         * targhooks.c (default_preferred_else_value): New function.
4251         * internal-fn.h (conditional_internal_fn_code): Declare.
4252         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4253         (get_conditional_internal_fn): Use it.
4254         (conditional_internal_fn_code): New function.
4255         * gimple-match.h (gimple_match_cond): New struct.
4256         (gimple_match_op): Add a cond member function.
4257         (gimple_match_op::gimple_match_op): Update all forms to take a
4258         gimple_match_cond.
4259         * genmatch.c (expr::gen_transform): Use the same condition as res_op
4260         for the suboperation, but don't specify a particular else_value.
4261         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4262         (visit_nary_op, visit_reference_op_load): Pass
4263         gimple_match_cond::UNCOND to the gimple_match_op constructor.
4264         * gimple-match-head.c: Include tree-eh.h
4265         (convert_conditional_op): New function.
4266         (maybe_resimplify_conditional_op): Likewise.
4267         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4268         (gimple_resimplify2): Likewise.
4269         (gimple_resimplify3): Likewise.
4270         (gimple_resimplify4): Likewise.
4271         (maybe_push_res_to_seq): Return null for conditional operations.
4272         (try_conditional_simplification): New function.
4273         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
4274         constructor.
4275         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4276         IFN_COND_* call.
4277         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4278         function.
4279         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4281 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4283         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4284         DECL_FCONTEXT
4285         (hash_tree): Do not hash DECL_FCONTEXT
4286         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4287         Do not stream DECL_FCONTEXT.
4288         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4289         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4291 2018-07-12  Richard Biener  <rguenther@suse.de>
4293         PR debug/86462
4294         * dwarf2out.c (gen_block_die): Only output blocks when they have
4295         at least one !DECL_IGNORED_P variable.
4297 2018-07-12  Richard Biener  <rguenther@suse.de>
4299         PR target/84829
4300         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4301         Remove -mieee-fp handling.
4303 2018-07-12  Richard Biener  <rguenther@suse.de>
4305         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4306         left-over from last patch.
4308 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4310         PR tree-optimization/86492
4311         * gimple-ssa-store-merging.c
4312         (imm_store_chain_info::coalesce_immediate_stores): Call
4313         check_no_overlap even for the merge_overlapping case.  Formatting fix.
4315 2018-07-12  Richard Biener  <rguenther@suse.de>
4317         PR middle-end/86479
4318         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4319         move possibly trapping operations into the conditional.
4321 2018-07-12  Richard Biener  <rguenther@suse.de>
4323         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4324         (vn_lookup_simplify_result): Remove recursion limit applied
4325         here.
4326         (vn_nary_build_or_lookup_1): Adjust.
4327         (try_to_simplify): Likewise.
4328         * gimple-match-head.c (gimple_resimplify1): Instead apply one
4329         here.
4330         (gimple_resimplify2): Likewise.
4331         (gimple_resimplify3): Likewise.
4332         (gimple_resimplify4): Likewise.
4334 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
4336         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4337         Use __mmask64 type instead of __mmask8 for __M argument.
4338         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4339         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4340         __U argument.
4341         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4342         __mmask16 for __M argument.
4343         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4344         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4345         to __mmask16 instead of __mmask8.
4346         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4347         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4348         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4349         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4350         instead of __mmask16 for __U argument.
4351         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4352         __mmask16 instead of __mmask8 for __U argument.
4353         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4354         __U argument.
4355         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4356         __mmask16.
4357         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4358         argument.
4359         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4360         __U argument.
4361         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4362         __mmask16.
4363         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4364         of __mmask16.
4365         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4366         __U argument.
4367         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4368         __U argument.
4369         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4370         __U argument.
4371         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4372         __U argument.
4373         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4374         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4375         return type as well as __M argument type and all casts from __mmask8
4376         to __mmask32.
4377         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4378         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4379         return type as well as __M argument type and all casts from __mmask8
4380         to __mmask16.
4381         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4382         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4383         return type as well as __M argument type and all casts from __mmask8
4384         to __mmask32.
4385         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4386         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4387         return type as well as __M argument type and all casts from __mmask8
4388         to __mmask16.
4389         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4390         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4391         __mmask16.
4393 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
4395         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4396         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4397         for __U argument.
4399 2018-07-11  Paul Koning  <ni1d@arrl.net>
4401         * doc/md.texi (define_subst): Document how multiple occurrences of
4402         the same argument in the replacement pattern are handled.
4404 2018-07-11  Paul Koning  <ni1d@arrl.net>
4406         * doc/extend.texi (Common Variable Attributes): Move "mode" into
4407         alphabetical order.
4408         (Common Type Attributes): Add "mode" attribute.
4410 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
4412         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4413         stream DECL_ORIGINAL_TYPE.
4414         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4415         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4416         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4417         Do not walk original type.
4418         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4419         external decls.
4420         (write_ts_decl_non_common_tree_pointers): Do not stream
4421         DECL_ORIGINAL_TYPE
4422         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4423         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4425 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4427         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4428         thread twice from the same starting edge.
4430 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4432         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4433         * gimple.c (gimple_call_nonnull_result_p): ...here...
4434         (gimple_call_nonnull_arg): ...and here.
4435         * gimple.h (gimple_call_nonnull_result_p): New.
4436         (gimple_call_nonnull_arg): New.
4438 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
4440         * config/arm/arm-cpus.in: Move information from fpu field of each
4441         cpu definition to the isa field.
4442         * config/arm/parsecpu.awk (fpu): Delete match rule.
4443         (gen_comm_data): Don't add bits from the CPU's FPU entry.
4445 2018-07-11  Richard Biener  <rguenther@suse.de>
4447         PR debug/86457
4448         * dwarf2out.c (init_sections_and_labels): Use
4449         output_asm_line_debug_info consistently.
4450         (dwarf2out_early_finish): Likewise.
4451         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4452         type units.
4454 2018-07-11  Richard Biener  <rguenther@suse.de>
4456         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4457         Rework father_bb setting in a way to avoid propagating constants
4458         multiple times on a loop body.
4460 2018-07-10  Mark Wielaard  <mark@klomp.org>
4462         PR debug/86459
4463         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4465 2018-07-10  Richard Biener  <rguenther@suse.de>
4467         * hash-map.h (hash_map::iterator::operator*): Return
4468         references to key and value.
4470 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
4472         PR c++/86443
4473         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4474         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4475         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4476         (gimplify_omp_for): For composite loops, move outer
4477         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4478         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
4479         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
4480         TREE_LIST for both the original class iterator and the "last" helper
4481         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
4482         loop, remember has_decl_expr from outer composite loops for the
4483         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4485 2018-07-09  Martin Sebor  <msebor@redhat.com>
4487         PR middle-end/77357
4488         PR middle-end/86428
4489         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4490         accessing implicitly initialized array elements.
4491         * expr.c (string_constant): Handle string initializers of
4492         character arrays within aggregates.
4493         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4494         Store element offset.  As a special case, handle zero size.
4495         (fold_nonarray_ctor_reference): Same.
4496         (fold_ctor_reference): Add argument.  Store subobject offset.
4497         * gimple-fold.h (fold_ctor_reference): Add argument.
4499 2018-07-09  Paul Koning  <ni1d@arrl.net>
4501         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4502         (pdp11_insn_cost): New function.
4503         (pdp11_md_asm_adjust): New function.
4504         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4505         (pdp11_rtx_costs): Update to match machine better.
4506         (output_addr_const_pdp11): Correct format mismatch warnings.
4507         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4508         * config/pdp11/pdp11.md: General change to add base_cost and/or
4509         length attributes for use by new pdp11_insn_cost function.
4510         (MIN_BRANCH): Correct definition.
4511         (MIN_SOB): Ditto.
4512         (doloop_end): Use standard pattern name for looping pattern.
4513         (doloop_end_nocc): New.
4514         (movsf): Add another constraint alternative.
4515         (zero_extendqihi2): Add constraint alternatives for not in place
4516         extend.
4517         (zero_extendhisi2): Remove.
4518         (shift patterns): Add CC handling variants.
4519         (bswaphi2): New.
4520         (bswapsi2): New.
4521         (rothi3): New.
4522         (define_peephole2): New peephole to recognize mov that sets CC for
4523         subsequent test.
4525 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4527         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4528         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4529         wi::add.
4531 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4533         PR c/86420
4534         * real.c (real_nextafter): Return true if result is denormal.
4536 2018-07-09  Martin Liska  <mliska@suse.cz>
4538         * common.opt: Add back wrongly removed attribute.
4540 2018-07-09  Richard Biener  <rguenther@suse.de>
4542         PR debug/86413
4543         * dwarf2out.c (gen_block_die): For an early generated DIE
4544         always output high/low PC attributes.
4546 2018-07-09  Tom de Vries  <tdevries@suse.de>
4548         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4549         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4550         onto VAR_DECL with abstract origin.
4552 2018-07-07  Jim Wilson  <jimw@sifive.com>
4554         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4556 2018-07-07  Tom de Vries  <tdevries@suse.de>
4558         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4560 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4562         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4563         overflow_type.
4564         (combine_bound): Use wide-int overflow calculation instead of
4565         rolling our own.
4566         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4567         overflow_type.
4568         * fold-const.c (int_const_binop_2): Same.
4569         (extract_muldiv_1): Same.
4570         (fold_div_compare): Same.
4571         (fold_abs_const): Same.
4572         * match.pd: Same.
4573         * poly-int.h (add): Same.
4574         (sub): Same.
4575         (neg): Same.
4576         (mul): Same.
4577         * predict.c (predict_iv_comparison): Same.
4578         * profile-count.c (slow_safe_scale_64bit): Same.
4579         * simplify-rtx.c (simplify_const_binary_operation): Same.
4580         * tree-chrec.c (tree_fold_binomial): Same.
4581         * tree-data-ref.c (split_constant_offset_1): Same.
4582         * tree-if-conv.c (idx_within_array_bound): Same.
4583         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4584         * tree-ssa-phiopt.c (minmax_replacement): Same.
4585         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4586         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4587         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4588         * wide-int.cc (wi::add_large): Same.
4589         (wi::mul_internal): Same.
4590         (wi::sub_large): Same.
4591         (wi::divmod_internal): Same.
4592         * wide-int.h: Change overflow type to overflow_type for neg, add,
4593         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4594         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4595         mul_internal, divmod_internal.
4596         (overflow_type): New enum.
4597         (accumulate_overflow): New.
4599 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4601         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4602         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4604 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4606         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4607         argument is checked for zero before entering loop, avoid checking again.
4609 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4611         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4612         * gimplify.h (generic_expr_could_trap_p): Likwise.
4613         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4615 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4617         PR tree-optimization/86401
4618         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4619         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4620         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4621         * fold-const.h (fold_bit_and_mask): Declare.
4622         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4624 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4626         PR target/86324
4627         * target.def (translate_mode_attribute): New hook.
4628         * targhooks.h (default_translate_mode_attribute): Declare.
4629         * targhooks.c (default_translate_mode_attribute): New function.
4630         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4631         * doc/tm.texi: Regenerate.
4632         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4633         (rs6000_translate_mode_attribute): New function.
4635 2018-07-06  Paul Koning  <ni1d@arrl.net>
4637         * doc/md.texi (define_split): Document DONE and FAIL.
4638         (define_peephole2): Ditto.
4640 2018-07-05  Jeff Law  <law@redhat.com>
4642         PR tree-optimization/86010
4643         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4644         both the head and tail of mem* and str* calls.
4646 2018-07-05  Jim Wilson  <jimw@sifive.com>
4648         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4650 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4652         * config/aarch64/aarch64-simd.md: correct flags text for
4653         MIN_EXPR replacement.
4655 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4657         * configure: Regenerated.
4659 2018-07-05  Carl Love  <cel@us.ibm.com>
4661         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4662         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4663         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4664         VSX_BUILTIN_DOUBLEL_V4SF.
4666 2018-07-05  Martin Sebor  <msebor@redhat.com>
4668         PR c++/86400
4669         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4670         than its domain to compute its the upper bound of a char array.
4672 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4674         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4675         * doc/cpp.texi: Update comment.
4676         * doc/tm.texi: Rebuilt.
4677         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4678         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4679         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4680         headers affected by extern "C".
4681         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4682         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4683         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4684         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4685         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4686         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4687         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4688         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4689         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4690         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4691         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4692         config/sparc/sp64-elf.h, config/spu/spu.h,
4693         config/stormy16/stormy16.h, config/v850/v850.h,
4694         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4695         define NO_IMPLICIT_EXTERN_C.
4696         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4698 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4700         PR target/84711
4701         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4702         instead of GET_MODE_SIZE when comparing Units.
4704 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4706         PR target/84711
4707         * rtlanal.c (set_noop_p): Constrain on mode change,
4708         include hard-reg-set.h
4710 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4712         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4714 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4716         Revert
4717         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4719         PR sanitizer/84250
4720         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4721         libasan.
4722         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4724 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4726         PR sanitizer/84250
4727         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4728         libasan.
4729         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4731 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4733         PR middle-end/86380
4734         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4736 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4738         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4739         neg_*_op* variables.
4741 2018-07-04  Martin Liska  <mliska@suse.cz>
4743         * tree-switch-conversion.c: Define
4744         max_ratio_for_speed and max_ratio_for_size constants.
4746 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4747             Martin Liska  <mliska@suse.cz>
4749         PR middle-end/66240
4750         PR target/45996
4751         PR c/84100
4752         * common.opt: Rename align options with 'str_' prefix.
4753         * common/config/i386/i386-common.c (set_malign_value): New
4754         function.
4755         (ix86_handle_option): Use it to set -falign-* options/
4756         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4757         type from int to string.
4758         * config/aarch64/aarch64.c: Update default values from int
4759         to string.
4760         * config/alpha/alpha.c (alpha_override_options_after_change):
4761         Likewise.
4762         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4763         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4764         max skip conditionally.
4765         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4766         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4767         max skip conditionally.
4768         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4769         max skip conditionally.
4770         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4771         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4772         max skip conditionally.
4773         * config/i386/i386.c (struct ptt): Change type from int to
4774         string.
4775         (ix86_default_align): Set default values.
4776         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4777         max skip conditionally.
4778         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4779         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4780         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4781         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4782         max skip conditionally.
4783         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4784         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4785         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4786         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4787         max skip conditionally.
4788         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4789         * config/ia64/ia64.c (ia64_option_override): Set default values
4790         for alignment options.
4791         * config/m68k/m68k.c: Handle new str_align_* options.
4792         * config/mips/mips.c (mips_set_compression_mode): Change
4793         type of constants.
4794         (mips_option_override): Set default values for options.
4795         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4796         Likewise.
4797         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4798         Likewise.
4799         * config/rx/rx.c (rx_option_override): Likewise.
4800         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4801         (LABEL_ALIGN): Use align_labels_log.
4802         (LOOP_ALIGN): Use align_loops_align.
4803         * config/s390/s390.c (s390_asm_output_function_label): Use new
4804         macros.
4805         * config/sh/sh.c (sh_override_options_after_change):
4806         Change type of constants.
4807         * config/spu/spu.c (spu_sched_init): Likewise.
4808         * config/sparc/sparc.c (sparc_option_override): Set default
4809         values for options.
4810         * config/visium/visium.c (visium_option_override): Likewise.
4811         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4812         emit p2align format with last argument if it's not needed.
4813         * doc/invoke.texi: Document extended format of -falign-*.
4814         * final.c: Use align_labels alignment.
4815         * flags.h (struct target_flag_state): Change type to use
4816         align_flags.
4817         (struct align_flags_tuple): New.
4818         (struct align_flags): Likewise.
4819         (align_loops_log): Redefine macro to use new types.
4820         (align_loops_max_skip): Redefine macro to use new types.
4821         (align_jumps_log): Redefine macro to use new types.
4822         (align_jumps_max_skip): Redefine macro to use new types.
4823         (align_labels_log): Redefine macro to use new types.
4824         (align_labels_max_skip): Redefine macro to use new types.
4825         (align_functions_log): Redefine macro to use new types.
4826         (align_loops): Redefine macro to use new types.
4827         (align_jumps): Redefine macro to use new types.
4828         (align_labels): Redefine macro to use new types.
4829         (align_functions): Redefine macro to use new types.
4830         (align_functions_max_skip): Redefine macro to use new types.
4831         (align_loops_value): New macro.
4832         (align_jumps_value): New macro.
4833         (align_labels_value): New macro.
4834         (align_functions_value): New macro.
4835         * function.c (invoke_set_current_function_hook): Propagate
4836         alignment values from flags to global variables default in
4837         topleev.h.
4838         * ipa-icf.c (sem_function::equals_wpa): Use
4839         cl_optimization_option_eq instead of memcmp.
4840         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4841         of string types.
4842         (cl_optimization_stream_in): Likewise.
4843         * optc-save-gen.awk: Support strings in cl_optimization.
4844         * opth-gen.awk: Likewise.
4845         * opts.c (finish_options): Remove error checking of invalid
4846         value ranges.
4847         (MAX_CODE_ALIGN): Remove.
4848         (MAX_CODE_ALIGN_VALUE): Likewise.
4849         (parse_and_check_align_values): New function.
4850         (check_alignment_argument): Likewise.
4851         (common_handle_option): Use check_alignment_argument.
4852         * opts.h (parse_and_check_align_values): Declare.
4853         * toplev.c (init_alignments): Remove.
4854         (read_log_maxskip): New.
4855         (parse_N_M): Likewise.
4856         (parse_alignment_opts): Likewise.
4857         (backend_init_target): Remove usage of init_alignments.
4858         * toplev.h (parse_alignment_opts): Declare.
4859         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4860         argument.
4861         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4862         * tree.c (cl_option_hasher::equal): New.
4863         * varasm.c: Use new global macros.
4865 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4867         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4868         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4869         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4870         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4871         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4872         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4873         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4874         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4875         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4876         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4877         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4878         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4879         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4881 2018-07-04  Martin Liska  <mliska@suse.cz>
4882             Jonathan Wakely  <jwakely@redhat.com>
4884         * coverage.c: Use correct type.
4885         * doc/invoke.texi: Language correction.
4887 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4889         PR target/85620
4890         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4891         ENDBRANCH for non-tail call which may return via indirect branch.
4892         * doc/extend.texi: Document indirect_return attribute.
4894 2018-07-03  Martin Sebor  <msebor@redhat.com>
4896         PR tree-optimization/86274
4897         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4898         precondition.
4899         (format_floating): Correct handling of infinities and NaNs.
4901 2018-07-03  Martin Sebor  <msebor@redhat.com>
4903         * print-tree.c (print_real_cst): New function.
4904         (print_node_brief): Call it.
4905         (print_node): Ditto.
4907 2018-07-03  Jeff Law  <law@redhat.com>
4909         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4910         into a single pattern.
4912         * config/h8300/h8300.md (ors code_iterator): New.
4913         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4914         a single pattern and single splitter.
4915         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4916         (iorqi3_1, xorqi3_1): Likewise.
4917         (iorqi3, xorqi3 expanders): Similarly.
4919         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4920         (movmd_internal) into a single pattern using the P mode iterator.
4921         (movmd splitters): Similarly.
4922         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4923         (movsd splitters): Similarly.
4925         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4926         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4927         right table based on the size of the operand.
4928         * config/h8300/h8300.md (length_table): Corresponding changes. All
4929         references to "addb", "addw" and "addl" changed to "add".
4930         (btst patterns): Merge two variants into a single pattern.
4931         (tstqi, tsthi): Likewise.
4932         (addhi3_incdec, addsi3_incdec): Likewise.
4933         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4934         (mulhi3, mulsi3): Likewise.
4935         (udivhi3, udivsi3): Likewise.
4936         (divhi3, divsi3): Likewise.
4937         (andorqi3, andorhi3, andorsi3): Likewise.
4939 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4941         PR target/85694
4942         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4943         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4945 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4947         PR tree-optimization/85694
4948         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4949         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4950         UNSPEC_URHADD.
4951         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4952         (<u>avg<mode>3_ceil): New patterns.
4954 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4956         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4957         scan-tree-dump directive.
4958         * gcc.dg/vect/slp-perm-2.c: Likewise.
4959         * gcc.dg/vect/slp-perm-3.c: Likewise.
4960         * gcc.dg/vect/slp-perm-5.c: Likewise.
4961         * gcc.dg/vect/slp-perm-6.c: Likewise.
4962         * gcc.dg/vect/slp-perm-7.c: Likewise.
4963         * gcc.dg/vect/slp-perm-8.c: Likewise.
4965 2018-07-03  Marek Polacek  <polacek@redhat.com>
4967         PR middle-end/86202
4968         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4970 2018-07-03  Richard Biener  <rguenther@suse.de>
4972         PR ipa/86389
4973         * tree-ssa-structalias.c (find_func_clobbers): Properly
4974         handle indirect calls.
4976 2018-07-03  Jeff Law  <law@redhat.com>
4978         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4979         (shifts): New code iterator.
4980         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4981         expander.  Fix HImode handling on H8/SX.
4982         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4983         (subqi3, subhi3, subsi3 expanders): Likewise.
4984         (andqi3, andhi3, andsi3 expanders): Likewise.
4985         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4986         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4987         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4988         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4989         (zero_extendqihi2, zero_extendqisi2): Likewise.
4990         (extendqihi2, extendqisi2): Likewise.
4991         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4992         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4993         (rotlqi3_1, rotlhi3_1): Likewise.
4994         (logicalhi3_sn, logicalsi3_sn): Likewise.
4995         (logicalhi3, logicalsi3): Likewise.
4997 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4999         * tree-vect-patterns.c (vect_recog_rotate_pattern)
5000         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5001         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5002         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5003         type to append_pattern_def_seq instead of creating a stmt_vec_info
5004         directly.
5005         (build_mask_conversion): Likewise.  Remove vinfo argument.
5006         (vect_add_conversion_to_patterm): Likewise, renaming to...
5007         (vect_add_conversion_to_pattern): ...this.
5008         (vect_recog_mask_conversion_pattern): Update call to
5009         build_mask_conversion.  Pass the vector type to
5010         append_pattern_def_seq here too.
5011         (vect_recog_gather_scatter_pattern): Update call to
5012         vect_add_conversion_to_pattern.
5014 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5016         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5017         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5018         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5019         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5020         STMT_VINFO_PATTERN_DEF_SEQ to null here.
5021         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5022         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5023         append_pattern_def_seq instead of new_pattern_def_seq.
5024         (vect_recog_divmod_pattern): Do both of the above.
5025         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5026         is null.
5028 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5030         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5031         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5032         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5033         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5034         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5035         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5036         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5037         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5038         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5039         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5040         parameter with a single stmt_vec_info.
5041         (vect_recog_func_ptr): Likewise.
5042         (vect_recog_gather_scatter_pattern): Likewise, folding in...
5043         (vect_try_gather_scatter_pattern): ...this.
5044         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5045         the stmt_vec_info of the statement to be matched.  Don't clear
5046         STMT_VINFO_RELATED_STMT.
5047         (vect_pattern_recog): Update call accordingly.
5049 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5051         PR tree-optimization/85694
5052         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5053         (uavgM3_ceil): Document new optabs.
5054         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5055         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5056         functions.
5057         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5058         (savg_ceil_optab): New optabs.
5059         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5060         (vect_vect_recog_func_ptrs): Add it.
5061         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5062         constant directly from the associated lhs.
5064 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5066         * tree-vect-patterns.c (vect_split_statement): New function.
5067         (vect_convert_input): Use it to try to split an existing cast.
5069 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5071         * poly-int.h (print_hex): New function.
5072         * dumpfile.h (dump_dec, dump_hex): Declare.
5073         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5074         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5075         min_input_precision, operation_precision and operation_sign.
5076         * tree-vect-patterns.c (vect_get_range_info): New function.
5077         (vect_same_loop_or_bb_p, vect_single_imm_use)
5078         (vect_operation_fits_smaller_type): Delete.
5079         (vect_look_through_possible_promotion): Add an optional
5080         single_use_p parameter.
5081         (vect_recog_over_widening_pattern): Rewrite to use new
5082         stmt_vec_info infomration.  Handle one operation at a time.
5083         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5084         (vect_truncatable_operation_p, vect_set_operation_type)
5085         (vect_set_min_input_precision): New functions.
5086         (vect_determine_min_output_precision_1): Likewise.
5087         (vect_determine_min_output_precision): Likewise.
5088         (vect_determine_precisions_from_range): Likewise.
5089         (vect_determine_precisions_from_users): Likewise.
5090         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5091         (vect_vect_recog_func_ptrs): Put over_widening first.
5092         Add cast_forwprop.
5093         (vect_pattern_recog): Call vect_determine_precisions.
5095 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5097         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5098         statements that have been replaced by further pattern statements.
5099         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5101 2018-07-03  Richard Biener  <rguenther@suse.de>
5103         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5104         always set *dt.  Dump vectype in vectype overload.
5105         * dumpfile.h (dump_gimple_expr): New function.
5106         (dump_gimple_expr_loc): Likewise.
5107         * dumpfile.c (dump_gimple_expr): New function.
5108         (dump_gimple_expr_loc): Likewise.
5110 2018-07-02  Jeff Law  <law@redhat.com>
5112         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5113         the H8/300, H8/300H and H8/S variants into a single pattern.
5114         (movhi_h8300, movqi_h8300hs): Similarly.
5115         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5116         (QHI mode iterator): New.
5118         * config/h8300/h8300.md: Remove trailing whitespace.
5120 2018-07-02  Jim Wilson  <jimw@sifive.com>
5122         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5123         instead of emit_insn for interrupt returns.
5124         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5125         (riscv_sret, riscv_uret): Likewise.
5127 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5129         * pretty-print.c (selftest::test_pp_format): Move save and restore
5130         of quotes to class auto_fix_quotes, and add an instance.
5131         * selftest.c: Include "intl.h".
5132         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5133         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5134         * selftest.h (selftest::auto_fix_quotes): New class.
5136 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
5138         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5139         (aarch64_sve_prepare_conditional_op): Remove.
5140         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5141         Allow aarch64_simd_reg_or_zero as select operand; remove
5142         the aarch64_sve_prepare_conditional_op call.
5143         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5144         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5145         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5146         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5147         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5148         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5149         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5150         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5151         and a splitters to match all of the *_any patterns.
5152         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5154         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5155         (SVE_COND_FP_BINARY_REV): Remove.
5156         (sve_int_op_rev, sve_fp_op_rev): New.
5157         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5158         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5159         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5160         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5161         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5162         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5163         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5164         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5165         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5167         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5168         Remove match_dup 1 from the inner unspec.
5169         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5171         * config/aarch64/aarch64.md (movprfx): New attr.
5172         (length): Default movprfx to 8.
5173         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5174         (*madd<SVE_I>, *msub<SVE_I): Likewise.
5175         (*<su>mul<SVE_I>3_highpart): Likewise.
5176         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5177         (*v<ASHIFT><SVE_I>3): Likewise.
5178         (*<su><MAXMIN><SVE_I>3): Likewise.
5179         (*<su><MAXMIN><SVE_F>3): Likewise.
5180         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5181         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5182         (*div<SVE_F>4): Likewise.
5184 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
5186         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5187         in dump string.
5189 2018-07-02  Richard Biener  <rguenther@suse.de>
5191         PR tree-optimization/86363
5192         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5193         memset argument refers to a non-variable address.
5195 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5197         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5198         {PLUS,MINUS}_EXPR code to...
5199         (adjust_symbolic_bound): ...here,
5200         (combine_bound): ...here,
5201         (set_value_range_with_overflow): ...and here.
5203 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5205         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5206         code...
5207         (extract_range_from_abs_expr): ...here.
5209 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
5211         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5212         -fno-omit-frame-pointer when not optimizing.
5214 2018-07-02  Martin Liska  <mliska@suse.cz>
5216         PR ipa/86279
5217         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5218         (propagate_nothrow): Likewise.
5220 2018-07-02  Martin Liska  <mliska@suse.cz>
5222         PR ipa/86323
5223         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5225 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5227         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5228         function in r262149, changing "loc" param from source_location to
5229         const dump_location_t &.
5230         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5231         declaration, as above.
5233 2018-07-01  Paul Koning  <ni1d@arrl.net>
5235         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5236         -munit-asm, -mgnu-asm, -mdec-asm.
5237         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5238         (pdp11_output_labelref): New.
5239         (pdp11_output_def): New.
5240         (pdp11_output_addr_vec_elt): New.
5241         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
5242         %# and %@ format codes.
5243         (pdp11_option_override): New.
5244         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5245         (pdp11_output_ident): New.
5246         (pdp11_asm_named_section): New.
5247         (pdp11_asm_init_sections): New.
5248         (pdp11_file_start): New.
5249         (pdp11_file_end): New.
5250         (output_ascii): Use .ascii/.asciz for -mdec-asm.
5251         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
5252         %o, like %c but octal.
5253         (pdp11_option_override): New.
5254         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5255         -mdec-asm.
5256         (DATA_SECTION_ASM_OP): Ditto.
5257         (READONLY_DATA_SECTION_ASM_OP): New.
5258         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5259         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5260         (ASM_OUTPUT_LABELREF): Ditto.
5261         (ASM_OUTPUT_DEF): Ditto.
5262         (ASM_OUTPUT_EXTERNAL): New.
5263         (ASM_OUTPUT_SOURCE_FILENAME): New.
5264         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5265         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5266         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
5267         %# and %@ format codes.
5268         * config/pdp11/pdp11.opt (mgnu-asm): New.
5269         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5270         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5271         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5273 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
5275         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5276         dereferencing path[] beyond its length.
5277         (debug_path): New.
5278         (debug_all_paths): New.
5279         (rewire_first_differing_edge): New.
5280         (adjust_paths_after_duplication): New.
5281         (duplicate_thread_path): Call adjust_paths_after_duplication.
5282         Add new argument.
5283         (thread_through_all_blocks): Add new argument to
5284         duplicate_thread_path.
5286 2018-06-30  Jim Wilson  <jimw@sifive.com>
5288         * config/riscv/predicates.md (p2m1_shift_operand): New.
5289         (high_mask_shift_operand): New.
5290         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5291         pattern using p2m1_shift_operand.
5292         (lshsi3_zero_extend_3+2): New combiner pattern using
5293         high_mask_shift_operand.
5295 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5297         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5298         split out from...
5299         (vect_recog_rotate_pattern): ...here.
5300         (vect_convert_input): Try to insert casts of invariants in the
5301         preheader.
5302         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5303         preheader to be empty.
5305 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5307         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5308         vector type.  If given, install it in the new statement's
5309         STMT_VINFO_VECTYPE.
5310         (vect_element_precision): New function.
5311         (vect_unpromoted_value): New struct.
5312         (vect_unpromoted_value::vect_unpromoted_value): New function.
5313         (vect_unpromoted_value::set_op): Likewise.
5314         (vect_look_through_possible_promotion): Likewise.
5315         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5316         (vect_widened_op_tree, vect_convert_input): Likewise.
5317         (vect_convert_inputs, vect_convert_output): Likewise.
5318         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5319         to handle the optional cast of the multiplication result and
5320         vect_widened_op_tree to detect the widened multiplication itself.
5321         Do not require the input and output of promotion casts to have
5322         the same sign, but base the signedness of the operation on the
5323         input rather than the result.  If the pattern includes two
5324         promotions, check that those promotions have the same sign.
5325         Do not restrict the MULT_EXPR handling to a double-width result;
5326         handle quadruple-width results and wider.  Use vect_convert_inputs
5327         to convert the inputs to the common type.
5328         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
5329         to handle the optional cast of the ABS result.  Also allow a sign
5330         change or a sign extension between the ABS and MINUS.
5331         Use vect_widened_op_tree to detect the widened subtraction and use
5332         vect_convert_inputs to convert the inputs to the common type.
5333         (vect_handle_widen_op_by_const): Delete.
5334         (vect_recog_widen_op_pattern): New function.
5335         (vect_recog_widen_mult_pattern): Use it.
5336         (vect_recog_widen_shift_pattern): Likewise.
5337         (vect_recog_widen_sum_pattern): Use
5338         vect_look_through_possible_promotion to handle the promoted
5339         PLUS_EXPR operand.
5341 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5343         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5344         the containing gimple_seq *.
5345         * gimple-iterator.h (gsi_for_stmt): Declare it.
5346         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5347         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5348         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5349         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5350         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5351         checks.
5352         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5353         split out from...
5354         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
5355         statement being replaced is part of an existing pattern
5356         definition sequence, inserting the new pattern statements before
5357         the original one.
5358         (vect_pattern_recog_1): Don't return a bool.  If the statement
5359         is already part of a pattern, instead apply pattern matching
5360         to the pattern definition statements.  Don't clear the
5361         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5362         (vect_pattern_recog): Don't break after the first match;
5363         continue processing the pattern definition statements instead.
5364         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5366 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5368         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5369         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5370         (vect_recog_widen_sum_pattern): Use it.
5372 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5374         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5375         phi is not a pattern statement and has not been replaced by
5376         a pattern statement.
5377         * tree-vect-patterns.c (type_conversion_p): Don't check
5378         STMT_VINFO_IN_PATTERN_P.
5379         (vect_recog_vector_vector_shift_pattern): Likewise.
5380         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5381         the pattern statement rather than the original statement; check
5382         directly for a WIDEN_MULT_EXPR here.
5383         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5384         vect_is_simple_use to return the pattern statement rather
5385         than the original statement; use is_pattern_stmt_p to check
5386         for such a pattern statement.
5387         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5388         to return the pattern statement rather than the original statement;
5389         don't do the same transformation here.
5390         (vect_is_simple_use): If the defining statement has been replaced
5391         by a pattern statement, return the pattern statement instead.
5392         Remove the corresponding (local) transformation from the vectype
5393         overload.
5395 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5397         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5398         end and default to null.
5399         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5400         (vectorizable_reduction): Update calls accordingly, dropping the
5401         gimple ** argument if the passed-back statement isn't needed.
5402         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5403         (vect_recog_rotate_pattern): Likewise.
5404         (vect_recog_mask_conversion_pattern): Likewise.
5405         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5406         (vect_mask_constant_operand_p): Likewise.
5407         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5408         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5409         (get_group_load_store_type, get_load_store_type): Likewise.
5410         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5411         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5412         (vectorizable_conversion, vectorizable_assignment): Likewise.
5413         (vectorizable_shift, vectorizable_operation): Likewise.
5414         (vectorizable_store, vect_is_simple_cond): Likewise.
5415         (vectorizable_condition, vectorizable_comparison): Likewise.
5416         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5417         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5418         and move it to the end.  Cope with null def_stmt_outs.
5420 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5422         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5424 2018-06-29  Jeff Law  <law@redhat.com>
5426         * config/v850/v850.c (v850_legitimate_address_p): Handle large
5427         displacements for TARGET_V850E2V3 and newer.
5428         (TARGET_LRA_P): Remove.  Defaults to LRA now.
5429         * config/v850/v850.md (sign23byte_load): Remove.
5430         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5431         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5433 2018-06-29  Martin Liska  <mliska@suse.cz>
5435         PR lto/85759
5436         * coverage.c (coverage_init): Mangle full path name.
5437         * doc/invoke.texi: Document the change.
5438         * gcov-io.c (mangle_path): New.
5439         * gcov-io.h (mangle_path): Likewise.
5440         * gcov.c (mangle_name): Use mangle_path for path mangling.
5442 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5444         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5445         if starting source register is not even.
5447 2018-06-29  Martin Liska  <mliska@suse.cz>
5449         PR tree-optimization/86263
5450         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5451         Make edge redirection.
5453 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5455         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5456         (dump_scope_depth): New variable.
5457         (get_dump_scope_depth): New function.
5458         (dump_begin_scope): New function.
5459         (dump_end_scope): New function.
5460         * dumpfile.h (get_dump_scope_depth): New declaration.
5461         (dump_begin_scope): New declaration.
5462         (dump_end_scope): New declaration.
5463         (class auto_dump_scope): New class.
5464         (AUTO_DUMP_SCOPE): New macro.
5465         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5466         AUTO_DUMP_SCOPE.
5468 2018-06-29  Richard Biener  <rguenther@suse.de>
5470         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5471         compute_all_dependences succeeds.
5472         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5473         exceed --param loop-max-datarefs-for-datadeps.
5475 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
5477         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5479 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
5481         PR target/86348
5482         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5483         alternative 0 in preferred_for_speed attribute.
5485 2018-06-28  Paul Koning  <ni1d@arrl.net>
5487         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5488         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5489         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5490         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5491         for shift insn patterns.
5493 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5495         * cgraph.c (cgraph_node::get_body): Replace assignments to
5496         "dump_file" with calls to set_dump_file.
5497         * dumpfile.c (alt_dump_file): Make static, and group with...
5498         (alt_flags): ...this definition.
5499         (dumps_are_enabled): New variable.
5500         (refresh_dumps_are_enabled): New function.
5501         (set_dump_file): New function.
5502         (set_alt_dump_file): New function.
5503         (gcc::dump_manager::dump_start): Replace assignments to
5504         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5505         set_alt_dump_file.
5506         (gcc::dump_manager::dump_finish): Likewise.
5507         * dumpfile.h (alt_dump_file): Delete decl.
5508         (dumps_are_enabled): New variable decl.
5509         (set_dump_file): New function decl.
5510         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5511         global.
5512         * tree-nested.c (lower_nested_functions): Replace assignments to
5513         "dump_file" with calls to set_dump_file.
5515 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5517         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5518         goto_locus of each outgoing edge of each basic block.
5520 2018-06-28  Richard Biener  <rguenther@suse.de>
5522         * dwarf2out.c (decl_scope_table): Remove.
5523         (push_decl_scope): Likewise.
5524         (pop_decl_scope): Likewise.
5525         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5526         (gen_struct_or_union_type_die): Likewise.
5527         (gen_tagged_type_die): Likewise.
5528         (dwarf2out_init): Do not initialize decl_scope_table.
5529         (dwarf2out_c_finalize): Do not free it.
5531 2018-06-28  Richard Biener  <rguenther@suse.de>
5533         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5534         deciding whether to not re-use a DIE.
5536 2018-06-28  Richard Biener  <rguenther@suse.de>
5538         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5539         DW_AT_abstract_origin attribute.
5541 2018-06-28  Martin Liska  <mliska@suse.cz>
5543         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5544         Use newly introduced constants.
5545         * tree-switch-conversion.h (struct jump_table_cluster):
5546         Define max_ratio_for_size and max_ratio_for_speed.
5548 2018-06-28  Martin Liska  <mliska@suse.cz>
5550         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5551         Add new checking assert to catch invalid state.
5552         (jump_table_cluster::can_be_handled): Handle single case
5553         clusters.
5554         (jump_table_cluster::is_beneficial): Bail out for such case.
5555         (bit_test_cluster::find_bit_tests):
5556         Add new checking assert to catch invalid state.
5557         (bit_test_cluster::can_be_handled): Handle single case
5558         clusters.
5559         (bit_test_cluster::is_beneficial): Bail out for such case.
5560         (switch_decision_tree::analyze_switch_statement):
5561         Fix comment.
5563 2018-06-28  Martin Liska  <mliska@suse.cz>
5565         * common.opt: Introduce -completion option.
5566         * gcc.c (driver_handle_option): Handle it.
5567         (driver::main): Print completions if completion
5568         is set.
5569         * opt-suggestions.c (option_proposer::get_completions):
5570         New function.
5571         (option_proposer::suggest_completion): Likewise.
5572         (option_proposer::find_param_completions): Likewise.
5573         (verify_autocompletions): Likewise.
5574         (test_completion_valid_options): Likewise.
5575         (test_completion_valid_params): Likewise.
5576         (in_completion_p): Likewise.
5577         (empty_completion_p): Likewise.
5578         (test_completion_partial_match): Likewise.
5579         (test_completion_garbage): Likewise.
5580         (opt_proposer_c_tests): Likewise.
5581         * opt-suggestions.h: Declare new functions.
5582         * opts.c (common_handle_option): Handle OPT__completion_.
5583         * selftest-run-tests.c (selftest::run_tests): Add
5584         opt_proposer_c_tests.
5585         * selftest.c (assert_str_startswith): New.
5586         * selftest.h (assert_str_startswith): Likewise.
5587         (opt_proposer_c_tests): New.
5588         (ASSERT_STR_STARTSWITH): Likewise.
5590 2018-06-28  Martin Liska  <mliska@suse.cz>
5592         * Makefile.in: Add opt-suggestions.o.
5593         * gcc-main.c: Include opt-suggestions.h.
5594         * gcc.c (driver::driver): Likewise.
5595         (driver::~driver): Remove m_option_suggestions.
5596         (driver::build_option_suggestions): Moved to option_proposer.
5597         (driver::suggest_option): Likewise.
5598         (driver::handle_unrecognized_options): Use option_proposer.
5599         * gcc.h (class driver): Add new memver m_option_proposer.
5600         * opt-suggestions.c: New file.
5601         * opt-suggestions.h: New file.
5603 2018-06-28  Martin Liska  <mliska@suse.cz>
5605         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5606         (auto_string_vec::~auto_string_vec): Likewise.
5608 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5610         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5611         prevent_decl_creation_for_types fields up and add reset_location field.
5612         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5613         statement if id->reset_location is true.
5614         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5615         id->reset_location is true.
5616         (copy_phis_for_bb): Force input_location on the arguments if
5617         id->reset_location is true.
5618         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5619         is set on the function to be inlined.
5621 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5623         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5625 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5627         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5628         registers for Pmode.
5629         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5630         hard registers for the clobbered pseudo.
5632 2018-06-27  Paul Koning  <ni1d@arrl.net>
5634         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5635         mutually exclusive options.
5636         * config/pdp11/constraints.md (h): New constraint.
5637         (O): Update definition to match shift code generation.
5638         (D): New constraint.
5639         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5640         (CCFP): Remove.
5641         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5642         function.
5643         (output_jump): Change arguments.
5644         (pdp11_fixed_cc_regs): New function.
5645         (pdp11_cc_mode): Ditto.
5646         (pdp11_expand_shift): Ditto.
5647         (pdp11_assemble_shift): Ditto.
5648         (pdp11_small_shift): Ditto.
5649         (pdp11_branch_cost): Remove.
5650         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5651         from output.
5652         (pdp11_register_move_cost): Update for CC registers.
5653         (pdp11_rtx_costs): Add case for LSHIFTRT.
5654         (pdp11_output_jump): Add CCNZ mode conditional branches.
5655         (notice_update_cc_on_set): Remove.
5656         (pdp11_cc_mode): New function.
5657         (simple_memory_operand): Correct pre/post decrement case.
5658         (no_side_effect_operand): New function.
5659         (pdp11_regno_reg_class): Add CC_REGS class.
5660         (pdp11_fixed_cc_regs): New function.
5661         (pdp11_small_shift): New function.
5662         (pdp11_expand_shift): New function to expand shift insns.
5663         (pdp11_assemble_shift): New function to output shifts.
5664         (pdp11_branch_cost): Remove.
5665         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5666         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5667         (WCHAR_TYPE): Ditto.
5668         (PTRDIFF_TYPE): Ditto.
5669         (ADJUST_INSN_LENGTH): New macro.
5670         (FIXED_REGISTERS): Add CC registers.
5671         (CALL_USED_REGISTERS): Ditto.
5672         (reg_class): Ditto.
5673         (REG_CLASS_NAMES): Ditto.
5674         (REG_CLASS_CONTENTS): Ditto.
5675         (SELECT_CC_MODE): Use new function.
5676         (TARGET_FLAGS_REGNUM): New macro.
5677         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5678         (cc0_reg_rtx): Remove.
5679         (CC_STATUS_MDEP): Remove.
5680         (CC_STATUS_MDEFP_INIT): Remove.
5681         (CC_IN_FPU): Remove.
5682         (NOTICE_UPDATE_CC): Remove.
5683         (REGISTER_NAMES): Add CC registers.
5684         (BRANCH_COST): Change to constant 1.
5685         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5686         handling.
5687         * config/pdp11/pdp11.opt (mbcopy): Remove.
5688         (mbcopy-builtin): Remove.
5689         (mbranch-cheap): Remove.
5690         (mbranch-expensive): Remove.
5691         * config/pdp11/predicates.md (expand_shift_operand): Update to
5692         match shift code generation.
5693         (ccnz_operator): New predicate.
5694         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5695         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5696         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5697         exclusive options.
5698         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5699         description of O constraint.
5701 2018-06-27  Jeff Law  <law@redhat.com>
5702             Austin Law  <austinklaw@gmail.com>
5704         * config/v850/v850.md (addsi3_set_flags): New pattern.
5705         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5706         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5707         (zero_extendhisi2_v850_set_flags): Likewise.
5708         (zero_extendqisi2_v850_set_flags): Likewise.
5709         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5710         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5711         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5713         * config/v850/v850-protos.h (notice_update_cc): Remove.
5714         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5715         (v850_print_operand): Handle 'D' and "d".
5716         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5717         Add handling of arithmetic/logical operations compared against zero.
5718         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5719         Do not look at v850_compare_op, instead get mode from last argument.
5720         (v850_gen_compare): Remove
5721         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5722         after reload for prologue insns.
5723         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5724         patterns.
5725         (construct_save_jarl): Likewise.
5726         (TARGET_FLAGS_REGNUM): Define.
5727         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5728         (NOTICE_UPDATE_CC): Remove.
5729         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5730         than cc0.  Conditionalize on reload_completed.
5731         (cmpsi_insn, setfcc_insn): Likewise.
5732         (tst1 splitter): Turn into define_and_split which sets the flags
5733         after reload.
5734         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5735         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5736         (cstoresf4, cstoredf4): Clobber the flags.
5737         (cmpsi, cmpsf, cmpdf): Remove expanders.
5738         (setf_insn): Remove pattern.
5739         (addsi3): Turn into define_and_split which clobbers the flags after
5740         reload and a suitable pattern (addsi3_clobber_flags) for use after
5741         reload.
5742         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5743         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5744         (ashrsi3, ashrsi3_v850e2): Likewise.
5745         (bins): Clobber the flags.
5746         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5747         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5748         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5749         (call_value_internal_short, call_value_internal_long): Likewise.
5750         (callt_save_interrupt, callt_return_interrupt): Likewise.
5751         (save_interrupt, return_interrupt): Likewise.
5752         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5753         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5754         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5755         (All FP comparisons): Only allow after reload has completed.
5756         (trfsr): Likewise.
5757         (divh, divhu): Tweak output template.
5758         (branch_z_normal, branch_z_invert): Remove
5759         (branch_nz_normal, branch_nz_invert): Likewise.
5760         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5762         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5763         * config/v850/v850.c (notice_update_cc): Remove.
5764         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5765         (CC_NO_CARRY): Likewise.
5766         (NOTICE_UPDATE_CC): Define to nothing.
5767         * config/v850/v850.md: Remove block comment on cc0 handling
5768         Remove "cc" attribute from all patterns.  Remove cc_status handling
5769         from all patterns.  Minor formatting fixes.
5771 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5773         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5774         (cortex-a76.cortex-a55): Likewise.
5775         * config/aarch64/aarch64-tune.md: Regenerate.
5776         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5777         cortex-a76.cortex-a55.
5779 2018-06-27  Jeff Law  <law@redhat.com>
5781         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5782         (MULTILIB_DIRNAMES): Similarly.
5784 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5786         * gimple.h (gimple_return_retbnd): Delete.
5787         (gimple_return_set_retbnd): Likewise.
5788         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5789         gimple_return_set_retbnd.
5790         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5791         gimple_return_retbnd and adjust.
5792         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5793         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5794         Explicitly return NULL in a couple more cases.  Move assertion
5795         on debug statements and remove unreachable code.
5796         (reset_debug_binding): Do not test id->retbnd.
5797         (expand_call_inline): Do not set it.
5799 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5801         * configure.ac: Add --disable-gcov option.
5802         * configure: Regenerate.
5803         * Makefile.in: Honour @enable_gcov@.
5804         * doc/install.texi: Document --disable-gcov.
5806 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5808         * config/arm/arm-cpus.in (cortex-a76): New entry.
5809         (cortex-a76.cortex-a55): Likewise.
5810         * config/arm/arm-tables.opt: Regenerate.
5811         * config/arm/arm-tune.md: Likewise.
5812         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5813         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5814         cortex-a76.cortex-a55.
5816 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5818         PR target/85769
5819         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5821 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5823         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5824         comment.
5825         (EPILOGUE_USES): Likewise.
5827 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5829         * tree-inline.c (remap_location): New function extracted from...
5830         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5831         (copy_phis_for_bb): ...here.  Call remap_location.
5832         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5834 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5836         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5837         unaligned vsx for 16B memset.
5839 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5841         PR target/86285
5842         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5843         ieee128_float_type_node to long_double_type_node unless
5844         TARGET_LONG_DOUBLE_128 is set.
5846 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5848         * cfgloop.c (get_loop_location): Convert return type from
5849         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5850         by implicit construction from rtx_insn *, and using
5851         dump_user_location_t::from_function_decl for the fallback case.
5852         * cfgloop.h (get_loop_location): Convert return type from
5853         location_t to dump_user_location_t.
5854         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5855         dump_printf_loc to pass in a dump_location_t rather than a
5856         location_t, via the gimple stmt.
5857         * coverage.c (get_coverage_counts): Update calls to
5858         dump_printf_loc to pass in dump_location_t rather than a
5859         location_t.
5860         * doc/optinfo.texi (Dump types): Convert example of
5861         dump_printf_loc from taking "locus" to taking "insn".  Update
5862         description of the "_loc" calls to cover dump_location_t.
5863         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5864         "selftest.h".
5865         (dump_user_location_t::dump_user_location_t): New constructors,
5866         from gimple *stmt and rtx_insn *.
5867         (dump_user_location_t::from_function_decl): New function.
5868         (dump_loc): Make static.
5869         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5870         const dump_location_t &.
5871         (dump_generic_expr_loc): Delete.
5872         (dump_printf_loc): Convert param "loc" from location_t to
5873         const dump_location_t &.
5874         (selftest::test_impl_location): New function.
5875         (selftest::dumpfile_c_tests): New function.
5876         * dumpfile.h: Include "profile-count.h".
5877         (class dump_user_location_t): New class.
5878         (struct dump_impl_location_t): New struct.
5879         (class dump_location_t): New class.
5880         (dump_printf_loc): Convert 2nd param from source_location to
5881         const dump_location_t &.
5882         (dump_generic_expr_loc): Delete.
5883         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5884         const dump_location_t &.
5885         * gimple-fold.c (fold_gimple_assign): Update call to
5886         dump_printf_loc to pass in a dump_location_t rather than a
5887         location_t, via the gimple stmt.
5888         (gimple_fold_call): Likewise.
5889         * gimple-loop-interchange.cc
5890         (loop_cand::analyze_iloop_reduction_var): Update for change to
5891         check_reduction_path.
5892         (tree_loop_interchange::interchange): Update for change to
5893         find_loop_location.
5894         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5895         change in return-type of find_loop_location.
5896         (graphite_regenerate_ast_isl): Likewise.
5897         * graphite-optimize-isl.c (optimize_isl): Likewise.
5898         * graphite.c (graphite_transform_loops): Likewise.
5899         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5900         pass in a dump_location_t rather than a location_t, via the
5901         gimple stmt.
5902         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5903         * ipa.c (walk_polymorphic_call_targets): Likewise.
5904         * loop-unroll.c (report_unroll): Convert "locus" param from
5905         location_t to dump_location_t.
5906         (decide_unrolling): Update for change to get_loop_location's
5907         return type.
5908         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5909         location_t to dump_user_location_t.
5910         (grid_find_single_omp_among_assignments_1): Updates calls to
5911         dump_printf_loc to pass in a dump_location_t rather than a
5912         location_t, via the gimple stmt.
5913         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5914         location_t to dump_location_t.  Updates calls to dump_printf_loc
5915         to pass in a dump_location_t rather than a location_t, via the
5916         gimple stmt.
5917         (grid_inner_loop_gridifiable_p): Likewise.
5918         (grid_dist_follows_simple_pattern): Likewise.
5919         (grid_gfor_follows_tiling_pattern): Likewise.
5920         (grid_target_follows_gridifiable_pattern): Likewise.
5921         (grid_attempt_target_gridification): Convert initialization
5922         of local "grid" from memset to zero-initialization; FIXME: does
5923         this require C++11?  Update call to dump_printf_loc to pass in a
5924         optinfo_location rather than a location_t, via the gimple stmt.
5925         * profile.c (read_profile_edge_counts): Updates call to
5926         dump_printf_loc to pass in a dump_location_t rather than a
5927         location_t
5928         (compute_branch_probabilities): Likewise.
5929         * selftest-run-tests.c (selftest::run_tests): Call
5930         dumpfile_c_tests.
5931         * selftest.h (dumpfile_c_tests): New decl.
5932         * tree-loop-distribution.c (pass_loop_distribution::execute):
5933         Update for change in return type of find_loop_location.
5934         * tree-parloops.c (parallelize_loops): Likewise.
5935         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5936         "locus" from location_t to dump_user_location_t.
5937         (canonicalize_loop_induction_variables): Likewise.
5938         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5939         for change in return type of find_loop_location.
5940         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5941         to dump_printf_loc to pass in a dump_location_t rather than a
5942         location_t, via the stmt.
5943         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5944         Likewise.
5945         * tree-vect-loop-manip.c (find_loop_location): Convert return
5946         type from source_location to dump_user_location_t.
5947         (vect_do_peeling): Update for above change.
5948         (vect_loop_versioning): Update for change in type of
5949         vect_location.
5950         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5951         from location_t to dump_user_location_t.
5952         (vect_estimate_min_profitable_iters): Update for change in type
5953         of vect_location.
5954         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5955         location_t to dump_location_t.
5956         (vect_slp_bb): Update for change in type of vect_location.
5957         * tree-vectorizer.c (vect_location): Convert from source_location
5958         to dump_user_location_t.
5959         (try_vectorize_loop_1): Update for change in vect_location's type.
5960         (vectorize_loops): Likewise.
5961         (increase_alignment): Likewise.
5962         * tree-vectorizer.h (vect_location): Convert from source_location
5963         to dump_user_location_t.
5964         (find_loop_location): Convert return type from source_location to
5965         dump_user_location_t.
5966         (check_reduction_path): Convert 1st param from location_t to
5967         dump_user_location_t.
5968         * value-prof.c (check_counter): Update call to dump_printf_loc to
5969         pass in a dump_user_location_t rather than a location_t; update
5970         call to error_at for change in type of "locus".
5971         (check_ic_target): Update call to dump_printf_loc to
5972         pass in a dump_user_location_t rather than a location_t, via the
5973         call_stmt.
5975 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5977         * config/s390/s390.h (enum processor_flags): Do not use
5978         default tune parameter when -march was specified.
5980 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5982         PR target/86314
5983         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5984         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5985         operands.
5987 2018-06-26  Richard Biener  <rguenther@suse.de>
5989         PR tree-optimization/86287
5990         PR bootstrap/86316
5991         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5992         (vect_analyze_loop): Initialize n_stmts.
5994 2018-06-26  Richard Biener  <rguenther@suse.de>
5996         PR middle-end/86271
5997         * fold-const.c (fold_convertible_p): Pointer extension
5998         isn't valid.
6000 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
6002         PR debug/86064
6003         * dwarf2out.c (loc_list_has_views): Adjust comments.
6004         (dw_loc_list): Split single cross-partition range with
6005         nonzero locview.
6007 2018-06-25  Jeff Law  <law@redhat.com>
6009         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6010         on -mbig-switch by default.
6012         * config/v850/predicates.md (const_float_1_operand): Fix match_code
6013         test.
6014         (const_float_0_operand): Remove unused predicate.
6015         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6016         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6017         (recipsf2): New expander.  Original pattern now called
6018         (recipsf2_insn).
6019         (recipdf2, recipdf2_insn): Similarly.
6020         (rsqrtsf2, rsqrtsf2_insn): Similarly
6021         (rsqrtdf2, rsqrtdf2_insn): Similarly
6023 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
6025         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6026         Simplify logic for FreeBSD (twice).
6028 2018-06-25  Martin Sebor  <msebor@redhat.com>
6030         PR tree-optimization/86204
6031         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6032         a strnlen result if it's less than the length of the string.
6034 2018-06-25  Martin Sebor  <msebor@redhat.com>
6036         PR tree-optimization/85700
6037         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6038         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6039         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6041 2018-06-25  Martin Sebor  <msebor@redhat.com>
6043         * doc/extend.texi (Zero-length arrays): Update and clarify.
6045 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
6047         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6048         added IEEE/IBM long double multilib support on PowerPC little
6049         endian Linux systems.
6050         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6051         (MULTILIB_DEFAULTS): Likewise.
6052         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6053         Likewise.
6054         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6055         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6056         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6058 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
6060         PR middle-end/86311
6061         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6062         (REORDER_45): Likewise.
6064 2018-06-25  Jeff Law  <law@redhat.com>
6066         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6067         dividend to 32 bits.  Adjust length.
6068         (udivmodhi4): Cleanup output template.  Fix length.
6070 2018-06-25  Carl Love  <cel@us.ibm.com>
6072         * config/rs6000/vsx.md: Change word selector to prefered location.
6074 2018-06-25  Richard Biener  <rguenther@suse.de>
6076         PR tree-optimization/86304
6077         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6078         epilogue-if-converted loops as well.
6080 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
6082         * lto-section-out.c (lto_begin_section): Do not print section
6083         name for noaddr and unnumbered dumps.
6085 2018-06-25  Richard Biener  <rguenther@suse.de>
6087         * tree-vectorizer.h (struct vec_info_shared): New structure
6088         with parts split out from struct vec_info and loop_nest from
6089         struct _loop_vec_info.
6090         (struct vec_info): Adjust accordingly.
6091         (struct _loop_vec_info): Likewise.
6092         (LOOP_VINFO_LOOP_NEST): Adjust.
6093         (LOOP_VINFO_DATAREFS): Likewise.
6094         (LOOP_VINFO_DDRS): Likewise.
6095         (struct _bb_vec_info): Likewise.
6096         (BB_VINFO_DATAREFS): Likewise.
6097         (BB_VINFO_DDRS): Likewise.
6098         (struct _stmt_vec_info): Add dr_aux member.
6099         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6100         (DR_MISALIGNMENT_UNINITIALIZED): New.
6101         (set_dr_misalignment): Adjust.
6102         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6103         (vect_analyze_loop): Adjust prototype.
6104         (vect_analyze_loop_form): Likewise.
6105         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6106         Compute dependences lazily.
6107         (vect_record_base_alignments): Use shared datarefs/ddrs.
6108         (vect_verify_datarefs_alignment): Likewise.
6109         (vect_analyze_data_refs_alignment): Likewise.
6110         (vect_analyze_data_ref_accesses): Likewise.
6111         (vect_analyze_data_refs): Likewise.
6112         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6113         constructor parameter for shared part.
6114         (vect_analyze_loop_form): Pass in shared part and adjust.
6115         (vect_analyze_loop_2): Pass in storage for the number of
6116         stmts.  Move loop nest finding to the caller.  Compute
6117         datarefs lazily.
6118         (vect_analyze_loop): Pass in shared part.
6119         (vect_transform_loop): Verify shared datarefs are unchanged.
6120         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6121         constructor parameter for shared part.
6122         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6123         (vect_slp_bb): Verify shared datarefs are unchanged before
6124         transform.
6125         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6126         change.
6127         (new_stmt_vec_info): Initialize DR_AUX misalignment to
6128         DR_MISALIGNMENT_UNINITIALIZED.
6129         * tree-vectorizer.c (vec_info::vec_info): Add constructor
6130         parameter for shared part.
6131         (vec_info::~vec_info): Adjust.
6132         (vec_info_shared::vec_info_shared): New.
6133         (vec_info_shared::~vec_info_shared): Likewise.
6134         (vec_info_shared::save_datarefs): Likewise.
6135         (vec_info_shared::check_datarefs): Likewise.
6136         (try_vectorize_loop_1): Construct shared part live for analyses
6137         of a single loop for multiple vector sizes.
6138         * tree-parloops.c (gather_scalar_reductions): Adjust.
6140 2018-06-25  Richard Biener  <rguenther@suse.de>
6142         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6143         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6144         (vect_analyze_data_refs): Remove similar code from here and
6145         simplify accordingly.
6147 2018-06-25  Richard Biener  <rguenther@suse.de>
6149         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6150         for reverse storage order accesses rather than asserting
6151         they cannot happen here.
6153 2018-06-25  Tom de Vries  <tdevries@suse.de>
6155         PR debug/86257
6156         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6157         Use data16 instead of .byte for insn prefix.
6159 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
6161         PR C++/86082
6162         * parser.c (make_char_string_pack): Pass this literal chars
6163         through cpp_interpret_string.
6164         (cp_parser_userdef_numeric_literal): Check the result of
6165         make_char_string_pack.
6167 2018-06-24  Maya Rashish  <coypu@sdf.org>
6169         * ginclude/stddef.h: Simplify conditions around avoiding
6170         re-definition of __size_t.
6172 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6174         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6175         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6177 2018-06-22  Maya Rashish  <coypu@sdf.org>
6179         * doc/invoke.texi (mno-fancy-math-387): Update for changes
6180         made to OpenBSD and NetBSD through the years.
6182 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6184         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6185         behavior of vec_pack (vector double, vector double) to match
6186         behavior of vec_float2 (vector double, vector double).
6188 2018-06-22  Olivier Hainque  <hainque@adacore.com>
6190         * gimplify.c (gimplify_function_tree): Prevent creation
6191         of a trampoline for the address of the current function
6192         passed to entry/exit instrumentation hooks.
6194 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
6196         PR target/86222
6197         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6198         correctly.
6200 2018-06-22  Martin Liska  <mliska@suse.cz>
6202         PR tree-optimization/86263
6203         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6204         Bail out if is_enabled is false.
6205         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6206         New declaration.
6207         (jump_table_cluster::is_enabled): New function.
6209 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6211         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6212         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6213         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6214         (lto_input_ts_binfo_tree_pointers): Likewise.
6215         * tree-streamer-out.c (streamer_write_tree_bitfields,
6216         write_ts_binfo_tree_pointers): Likewise.
6217         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6219 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6221         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6223 2018-06-22  Martin Liska  <mliska@suse.cz>
6225         * symbol-summary.h (get): Make it pure and inline move
6226         functionality from ::get function.
6227         (get): Remove and inline into ::get and ::get_create.
6228         (get_create): Move code from ::get function.
6230 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6232         PR target/85994
6233         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6234         -x assembler-with-cpp.
6236 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6238         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6239         _FILE_OFFSET_BITS=64 for C++.
6241 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
6243         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6244         conversion insn that shows up when pr85657-3.c is compiled using
6245         IEEE 128-bit long double.
6246         (neg<mode>2_internal): Use the correct mode to check whether the
6247         mode is IBM extended.
6248         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6249         multiply and divide external functions from being created more
6250         than once.
6252 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6254         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6255         functions.
6256         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
6257         the edge can be forwarded.
6258         (cfg_layout_merge_blocks): Likewise.
6260 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6262         * except.c (finish_eh_generation): Commit edge insertions only after
6263         the EH edges have been redirected from post-landing to landing pads.
6265 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6267         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6268         create_tmp_var_for to create the FRAME decl.
6269         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6271 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6273         * tree-inline.c (copy_edges_for_bb): Minor tweak.
6274         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6275         debug statement when resetting its value.
6276         (expand_call_inline): Copy the locus of the call onto the assignment
6277         of the return value, if any.  Use local variable in more cases.
6279 2018-06-21  Martin Liska  <mliska@suse.cz>
6281         * ipa-pure-const.c (propagate_nothrow): Use
6282         funct_state_summaries->get.
6283         (dump_malloc_lattice): Likewise.
6284         (propagate_malloc): Likewise.
6286 2018-06-21  Richard Biener  <rguenther@suse.de>
6288         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6289         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6290         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6291         comment.
6292         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6293         BLOCK_ABSTRACT_ORIGIN unconditionally.
6295 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
6297         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6298         deleting it.
6299         * ipa-reference.c (ipa_reference_c_finalize): Delete
6300         ipa_ref_opt_sum_summaries and set it to NULL.
6302 2018-06-21  Tom de Vries  <tdevries@suse.de>
6304         PR tree-optimization/85859
6305         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6306         test with comment from bb_no_side_effects_p.
6308 2018-06-21  Richard Biener  <rguenther@suse.de>
6310         PR tree-optimization/86232
6311         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6312         max for constant niter.
6314 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6316         * config/aarch64/aarch64-simd.md
6317         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6319 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6321         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6322         Make opernads of the unspec commutative.
6324 2018-06-21  Richard Biener  <rguenther@suse.de>
6326         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6327         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6328         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6329         (vect_analyze_data_ref_dependence): Re-order checks to deal with
6330         NULL DR_STEP.
6331         (vect_record_base_alignments): Do not record base alignment
6332         for gathers or scatters.
6333         (vect_compute_data_ref_alignment): Drop return value that is always
6334         true.  Bail out early for gathers or scatters.
6335         (vect_enhance_data_refs_alignment): Bail out early for gathers
6336         or scatters.
6337         (vect_find_same_alignment_drs): Likewise.
6338         (vect_analyze_data_refs_alignment): Remove dead code.
6339         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6340         (vect_analyze_data_refs): For possible gathers or scatters do
6341         not create an alternate DR, just check their possible validity
6342         and mark them.  Adjust DECL_NONALIASED handling to not rely
6343         on DR_BASE_ADDRESS.
6344         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6345         update inits of gathers or scatters.
6346         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6347         Also copy gather/scatter flag to pattern vinfo.
6349 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6351         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6352         behavior of vec_packsu (vector unsigned long long, vector unsigned
6353         long long) to match behavior of vec_packs with same signature.
6355 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
6356             Thomas Schwinge <thomas@codesourcery.com>
6357             Cesar Philippidis  <cesar@codesourcery.com>
6359         * gimplify.c (gimplify_scan_omp_clauses): Add support for
6360         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6361         (gimplify_adjust_omp_clauses): Likewise.
6362         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6363         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6364         (gimplify_omp_target_update): Update handling of acc update and
6365         enter/exit data.
6366         * omp-low.c (install_var_field): Remove unused parameter
6367         base_pointers_restrict.
6368         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6369         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6370         FINALIZE}
6371         (omp_target_base_pointers_restrict_p): Delete.
6372         (scan_omp_target): Update call to scan_sharing_clauses.
6373         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6374         FINALIZE}.
6375         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6376         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6377         (convert_local_omp_clauses): Likewise.
6378         * tree-pretty-print.c (dump_omp_clause): Likewise.
6379         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
6380         FINALIZE}.
6381         (omp_clause_code_name): Likewise.
6383 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6385         PR debug/86194
6386         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6387         be narrowed.
6389         PR tree-optimization/86231
6390         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
6391         anti-range don't overwrite *vr0min before using it to compute *vr0max.
6393 2018-06-20  Tom de Vries  <tdevries@suse.de>
6395         PR tree-optimization/86097
6396         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6397         iv type if signedness of iv type is not the same as that of *nit.
6399 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6401         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
6402         EDGE_EH edges, verify they are all EDGE_EH.
6404 2018-06-20  Maya Rashish  <coypu@sdf.org>
6406         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6408 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6410         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6411         * config/aarch64/aarch64.c (xgene1_tunings): Add
6412         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6413         (aarch64_mode_valid_for_sched_fusion_p):
6414         Allow 16-byte modes.
6415         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6416         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6417         128-bit modes.
6418         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6419         New pattern.
6420         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6421         * config/aarch64/iterators.md (VQ2): New mode iterator.
6423 2018-06-20  Martin Liska  <mliska@suse.cz>
6425         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6426         Change default ratio from 10 to 8.
6428 2018-06-20  Martin Liska  <mliska@suse.cz>
6430         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6431         New.
6432         (bit_test_cluster::find_bit_tests): Likewise.
6433         (switch_decision_tree::analyze_switch_statement): Find clusters.
6434         * tree-switch-conversion.h (struct jump_table_cluster): Document
6435         hierarchy.
6437 2018-06-20  Martin Liska  <mliska@suse.cz>
6439         * tree-switch-conversion.c (switch_conversion::collect):
6440         Record m_uniq property.
6441         (switch_conversion::expand): Bail out for special conditions.
6442         (group_cluster::~group_cluster): New.
6443         (group_cluster::group_cluster): Likewise.
6444         (group_cluster::dump): Likewise.
6445         (jump_table_cluster::emit): New.
6446         (switch_decision_tree::fix_phi_operands_for_edges): New.
6447         (struct case_node): Remove struct.
6448         (jump_table_cluster::can_be_handled): New.
6449         (case_values_threshold): Moved to header.
6450         (reset_out_edges_aux): Likewise.
6451         (jump_table_cluster::is_beneficial): New.
6452         (bit_test_cluster::can_be_handled): Likewise.
6453         (add_case_node): Remove.
6454         (bit_test_cluster::is_beneficial): New.
6455         (case_bit_test::cmp): New.
6456         (bit_test_cluster::emit): New.
6457         (expand_switch_as_decision_tree_p): Remove.
6458         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6459         (fix_phi_operands_for_edge): Likewise.
6460         (switch_decision_tree::analyze_switch_statement): New.
6461         (compute_cases_per_edge): Move ...
6462         (switch_decision_tree::compute_cases_per_edge): ... here.
6463         (try_switch_expansion): Likewise.
6464         (switch_decision_tree::try_switch_expansion): Likewise.
6465         (record_phi_operand_mapping): Likewise.
6466         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6467         (emit_case_decision_tree): Likewise.
6468         (switch_decision_tree::emit): Likewise.
6469         (balance_case_nodes): Likewise.
6470         (switch_decision_tree::balance_case_nodes): Likewise.
6471         (dump_case_nodes): Likewise.
6472         (switch_decision_tree::dump_case_nodes): Likewise.
6473         (emit_jump): Likewise.
6474         (switch_decision_tree::emit_jump): Likewise.
6475         (emit_cmp_and_jump_insns): Likewise.
6476         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6477         (emit_case_nodes): Likewise.
6478         (switch_decision_tree::emit_case_nodes): Likewise.
6479         (conditional_probability): Remove.
6480         * tree-switch-conversion.h (enum cluster_type): New.
6481         (PRINT_CASE): New.
6482         (struct cluster): Likewise.
6483         (cluster::cluster): Likewise.
6484         (struct simple_cluster): Likewise.
6485         (simple_cluster::simple_cluster): Likewise.
6486         (struct group_cluster): Likewise.
6487         (struct jump_table_cluster): Likewise.
6488         (struct bit_test_cluster): Likewise.
6489         (struct min_cluster_item): Likewise.
6490         (struct case_tree_node): Likewise.
6491         (case_tree_node::case_tree_node): Likewise.
6492         (jump_table_cluster::case_values_threshold): Likewise.
6493         (struct case_bit_test): Likewise.
6494         (struct switch_decision_tree): Likewise.
6495         (struct switch_conversion): Likewise.
6496         (switch_decision_tree::reset_out_edges_aux): Likewise.
6498 2018-06-20  Martin Liska  <mliska@suse.cz>
6500         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6501         (hoist_edge_and_branch_if_true): Likewise.
6502         (expand_switch_using_bit_tests_p): Likewise.
6503         (struct case_bit_test): Likewise.
6504         (case_bit_test_cmp): Likewise.
6505         (emit_case_bit_tests): Likewise.
6506         (switch_conversion::switch_conversion): New class.
6507         (struct switch_conv_info): Remove old struct.
6508         (collect_switch_conv_info): More to ...
6509         (switch_conversion::collect): ... this.
6510         (check_range): Likewise.
6511         (switch_conversion::check_range): Likewise.
6512         (check_all_empty_except_final): Likewise.
6513         (switch_conversion::check_all_empty_except_final): Likewise.
6514         (check_final_bb): Likewise.
6515         (switch_conversion::check_final_bb): Likewise.
6516         (create_temp_arrays): Likewise.
6517         (switch_conversion::create_temp_arrays): Likewise.
6518         (free_temp_arrays): Likewise.
6519         (gather_default_values): Likewise.
6520         (switch_conversion::gather_default_values): Likewise.
6521         (build_constructors): Likewise.
6522         (switch_conversion::build_constructors): Likewise.
6523         (constructor_contains_same_values_p): Likewise.
6524         (switch_conversion::contains_same_values_p): Likewise.
6525         (array_value_type): Likewise.
6526         (switch_conversion::array_value_type): Likewise.
6527         (build_one_array): Likewise.
6528         (switch_conversion::build_one_array): Likewise.
6529         (build_arrays): Likewise.
6530         (switch_conversion::build_arrays): Likewise.
6531         (gen_def_assigns): Likewise.
6532         (switch_conversion::gen_def_assigns): Likewise.
6533         (prune_bbs): Likewise.
6534         (switch_conversion::prune_bbs): Likewise.
6535         (fix_phi_nodes): Likewise.
6536         (switch_conversion::fix_phi_nodes): Likewise.
6537         (gen_inbound_check): Likewise.
6538         (switch_conversion::gen_inbound_check): Likewise.
6539         (process_switch): Use the newly created class.
6540         (switch_conversion::expand): New.
6541         (switch_conversion::~switch_conversion): New.
6542         * tree-switch-conversion.h: New file.
6544 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6546         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6547         tree-vect-patterns.c.
6548         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6549         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6550         (vect_recog_sad_pattern): Likewise.
6551         (vect_recog_widen_sum_pattern): Likewise.
6552         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6553         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6554         (vect_recog_rotate_pattern): Likewise.
6555         (vect_recog_mult_pattern): Likewise.
6556         (vect_recog_vector_vector_shift_pattern): Likewise.
6557         (vect_recog_divmod_pattern): Likewise.
6558         (vect_recog_mixed_size_cond_pattern): Likewise.
6559         (vect_recog_bool_pattern): Likewise.
6560         (vect_recog_mask_conversion_pattern): Likewise.
6561         (vect_try_gather_scatter_pattern): Likewise.
6562         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6563         (vect_recog_over_widening_pattern): Likewise.
6564         (vect_recog_gather_scatter_pattern): Likewise.
6565         (vect_recog_func_ptr): Move from tree-vectorizer.h
6566         (vect_vect_recog_func_ptrs): Move further down the file.
6567         (vect_recog_func): Likewise.  Remove the third argument.
6568         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6569         (vect_pattern_recog_1): Expect the pattern function to do any
6570         necessary target tests.  Also expect it to provide a vector type.
6571         Remove the type_in handling.
6573 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6575         * tree-vect-patterns.c (vect_pattern_detected): New function.
6576         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6577         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6578         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6579         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6580         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6581         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6582         (vect_recog_mask_conversion_pattern)
6583         (vect_try_gather_scatter_pattern): Likewise.
6585 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6587         * tree-vect-patterns.c (vect_get_internal_def): New function.
6588         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6589         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6590         (search_type_for_mask_1): Use it.
6592 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6594         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6595         redundant WIDEN_SUM_EXPR handling.
6596         (vect_recog_sad_pattern): Likewise.
6598 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6600         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6601         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6602         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6603         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6604         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6606 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6608         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6609         use the stmt_vec_info of the original bb statement for the
6610         new zero assignment, even if the call is part of a pattern.
6612 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6614         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6615         that the sequence is attached to the original statement rather
6616         than the pattern statement.
6617         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6618         PATTERN_DEF_SEQ from the original statement rather than
6619         the main pattern statement.
6620         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6621         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6622         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6624 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6626         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6627         definition statements before the early exit for statements that aren't
6628         live or relevant.
6629         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6630         split out from...
6631         (vect_transform_loop): ...here.  Process pattern definition
6632         statements without first checking whether the main pattern
6633         statement is live or relevant.
6635 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6637         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6638         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6640 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6642         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6643         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6644         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6645         (expand_block_compare): Change select_block_compare_mode call.
6646         (expand_strncmp_align_check): Use new functions, fix comment.
6647         (emit_final_str_compare_gpr): New function.
6648         (expand_strn_compare): Refactor and clean up code.
6649         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6651 2018-06-19  Tony Reix  <tony.reix@atos.com>
6652             Damien Bergamini  <damien.bergamini@atos.com>
6653             David Edelsohn  <dje.gcc@gmail.com>
6655         * collect2.c (static_obj): New variable.
6656         (static_libs): New variable.
6657         (is_in_list): Uncomment declaration.
6658         (main): Track AIX libraries linked statically.
6659         (is_in_list): Uncomment definition.
6660         (scan_prog_file): Don't add AIX shared libraries initializer
6661         to constructor list if linking statically.
6663 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6665         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6666         constant.
6667         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6669 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6671         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6672         blocks.
6674 2018-06-19  Martin Liska  <mliska@suse.cz>
6676         * config/i386/i386.c (ix86_can_inline_p): Do not use
6677         ipa_fn_summaries::get_create.
6678         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6679         get.
6680         (devirtualization_time_bonus): Likewise.
6681         (ipcp_propagate_stage): Likewise.
6682         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6683         (edge_set_predicate): Likewise.
6684         (evaluate_conditions_for_known_args): Likewise.
6685         (evaluate_properties_for_edge): Likewise.
6686         (ipa_call_summary::reset): Tranform to ...
6687         (ipa_call_summary::~ipa_call_summary): ... this.
6688         (ipa_fn_summary::reset): Transform to ...
6689         (ipa_fn_summary::~ipa_fn_summary): ... this.
6690         (ipa_fn_summary_t::remove): Rename to ...
6691         (ipa_fn_summary_t::remove_callees): ... this.
6692         (ipa_fn_summary_t::duplicate): Use placement new
6693         instead of memory copy.
6694         (ipa_call_summary_t::duplicate): Likewise.
6695         (ipa_call_summary_t::remove): Remove.
6696         (dump_ipa_call_summary): Change get_create to get.
6697         (ipa_dump_fn_summary): Dump only when summary exists.
6698         (analyze_function_body): Use symbol_summary::get instead
6699         of get_create.
6700         (compute_fn_summary): Likewise.
6701         (estimate_edge_devirt_benefit): Likewise.
6702         (estimate_edge_size_and_time): Likewise.
6703         (inline_update_callee_summaries): Likewise.
6704         (remap_edge_change_prob): Likewise.
6705         (remap_edge_summaries): Likewise.
6706         (ipa_merge_fn_summary_after_inlining): Likewise.
6707         (write_ipa_call_summary): Likewise.
6708         (ipa_fn_summary_write): Likewise.
6709         (ipa_free_fn_summary): Likewise.
6710         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6711         (struct ipa_call_summary): Likewise.
6712         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6713         of get_create.
6714         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6715         (estimate_size_after_inlining): Likewise.
6716         (estimate_growth): Likewise.
6717         (growth_likely_positive): Likewise.
6718         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6719         (inline_call): Likewise.
6720         * ipa-inline.c (caller_growth_limits): Likewise.
6721         (can_inline_edge_p): Likewise.
6722         (can_inline_edge_by_limits_p): Likewise.
6723         (compute_uninlined_call_time): Likewise.
6724         (compute_inlined_call_time): Likewise.
6725         (want_inline_small_function_p): Likewise.
6726         (edge_badness): Likewise.
6727         (update_caller_keys): Likewise.
6728         (update_callee_keys): Likewise.
6729         (inline_small_functions): Likewise.
6730         (inline_to_all_callers_1): Likewise.
6731         (dump_overall_stats): Likewise.
6732         (early_inline_small_functions): Likewise.
6733         (early_inliner): Likewise.
6734         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6735         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6736         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6737         * ipa-split.c (execute_split_functions): Likewise.
6738         * symbol-summary.h: Likewise.
6739         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6741 2018-06-19  Richard Biener  <rguenther@suse.de>
6743         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6744         (vectorize_loops): ... here.  Fix dbgcnt handling.
6745         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6747 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6749         PR target/86197
6750         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6751         ieee128 argument takes up only one (vector) register, not two (floating
6752         point) registers.
6754 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6756         * gimplify.c (gimplify_init_constructor): Really never clear for an
6757         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6759 2018-06-19  Richard Biener  <rguenther@suse.de>
6761         PR tree-optimization/86179
6762         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6763         after failed recognition.
6765 2018-06-18  Martin Sebor  <msebor@redhat.com>
6767         PR middle-end/85602
6768         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6769         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6770         Handle integer subtraction.
6771         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6772         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6774 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6776         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6777         param from rtx to rtx_insn *.
6778         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6779         param.
6780         (frv_ifcvt_modify_insn): Likwise.
6781         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6782         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6783         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6784         as_a <rtx_insn *> cast to local "unprotected_region" once
6785         it's been established that it's not NULL or pc_rtx.
6786         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6787         param "sethi" from rtx to rtx_insn *.
6788         (nds32_group_float_insns): Likewise for param "insn".
6789         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6790         param.
6791         (vax_output_int_subtract): Likewise.
6792         * config/vax/vax.c (vax_output_int_add): Likewise for param
6793         "insn".
6794         (vax_output_int_subtract): Likewise.
6795         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6796         (emit_pattern_after): Likewise for param "after".
6797         (emit_insn_after): Likewise.
6798         (emit_jump_insn_after): Likewise.
6799         (emit_call_insn_after): Likewise.
6800         (emit_debug_insn_after): Likewise.
6801         (emit_pattern_before): Likewise for param "before".
6802         (emit_insn_before): Likewise.
6803         (emit_jump_insn_before): Likewise.
6804         * final.c (get_insn_template): Likewise for param "insn", removing
6805         a cast.
6806         * output.h (get_insn_template): Likewise for 2nd param.
6807         * rtl.h (emit_insn_before): Likewise.
6808         (emit_jump_insn_before): Likewise.
6809         (emit_debug_insn_before_noloc): Likewise.
6810         (emit_insn_after): Likewise.
6811         (emit_jump_insn_after): Likewise.
6812         (emit_call_insn_after): Likewise.
6813         (emit_debug_insn_after): Likewise.
6814         (set_insn_deleted): Likewise for param.
6816 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6818         PR target/85358
6819         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6820         floating point modes, so that IFmode is numerically greater than
6821         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6822         to declare the ordering.  This prevents IFmode from being
6823         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6824         machine.  Include rs6000-modes.h to share the fractional values
6825         between genmodes* and the rest of the compiler.
6826         (IFmode): Likewise.
6827         (KFmode): Likewise.
6828         (TFmode): Likewise.
6829         * config/rs6000/rs6000-modes.h: New file.
6830         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6831         meaning of rs6000_long_double_size so that 126..128 selects an
6832         appropriate 128-bit floating point type.
6833         (rs6000_option_override_internal): Likewise.
6834         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6835         (TARGET_LONG_DOUBLE_128): Change the meaning of
6836         rs6000_long_double_size so that 126..128 selects an appropriate
6837         128-bit floating point type.
6838         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6839         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6840         source and destination to match the standard usage.
6841         (truncifkf2): Likewise.
6842         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6843         ISA 2.07 to use an explicit clobber, instead of passing in a
6844         temporary.
6845         (copysign<mode>3_soft): Likewise.
6847 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6849         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6850         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6851         (vect_slp_analyze_instance_dependence): Likewise.
6852         (vect_enhance_data_refs_alignment): Likewise.
6853         (vect_analyze_data_refs_alignment): Likewise.
6854         (vect_slp_analyze_and_verify_instance_alignment
6855         (vect_analyze_data_ref_accesses): Likewise.
6856         (vect_prune_runtime_alias_test_list): Likewise.
6857         (vect_analyze_data_refs): Likewise.
6858         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6859         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6860         (vect_analyze_scalar_cycles_1): Likewise.
6861         (vect_get_loop_niters): Likewise.
6862         (vect_analyze_loop_form_1): Likewise.
6863         (vect_update_vf_for_slp): Likewise.
6864         (vect_analyze_loop_operations): Likewise.
6865         (vect_analyze_loop): Likewise.
6866         (vectorizable_induction): Likewise.
6867         (vect_transform_loop): Likewise.
6868         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6869         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6870         (vect_make_slp_decision): Likewise.
6871         (vect_detect_hybrid_slp): Likewise.
6872         (vect_slp_analyze_operations): Likewise.
6873         (vect_slp_bb): Likewise.
6874         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6875         (vectorizable_bswap): Likewise.
6876         (vectorizable_call): Likewise.
6877         (vectorizable_simd_clone_call): Likewise.
6878         (vectorizable_conversion): Likewise.
6879         (vectorizable_assignment): Likewise.
6880         (vectorizable_shift): Likewise.
6881         (vectorizable_operation): Likewise.
6882         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6884 2018-06-18  Martin Sebor  <msebor@redhat.com>
6886         PR tree-optimization/81384
6887         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6888         * builtins.c (expand_builtin_strnlen): New function.
6889         (expand_builtin): Call it.
6890         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6891         * builtins.def (BUILT_IN_STRNLEN): New.
6892         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6893         Warn for bounds in excess of maximum object size.
6894         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6895         single-value ranges.  Handle strnlen.
6896         (handle_builtin_strlen): Handle strnlen.
6897         (strlen_check_and_optimize_stmt): Same.
6898         * doc/extend.texi (Other Builtins): Document strnlen.
6900 2018-06-18  Maya Rashish  <coypu@sdf.org>
6902         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6903         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6904         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6906         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6907         here to ...
6908         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6910 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6912         * tree.c (escaped_string::escape): Replace cast to char * by
6913         const_cast<char *> (unescaped).
6915 2018-06-18  Nick Clifton  <nickc@redhat.com>
6917         PR 84195
6918         * tree.c (escaped_string): New class.  Converts an unescaped
6919         string into its escaped equivalent.
6920         (warn_deprecated_use): Use the new class to convert the
6921         deprecation message, if present.
6922         (test_escaped_strings): New self test.
6923         (test_c_tests): Add test_escaped_strings.
6924         * doc/extend.texi (deprecated): Add a note that the
6925         deprecation message is affected by the -fmessage-length
6926         option, and that control characters will be escaped.
6927         (#pragma GCC error): Document this pragma.
6928         (#pragma GCC warning): Likewise.
6929         * doc/invoke.texi (-fmessage-length): Document this option's
6930         effect on the #warning and #error preprocessor directives and
6931         the deprecated attribute.
6933 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6935         * tree.c (decl_value_expr_lookup): Revert latest change.
6936         (decl_value_expr_insert): Likewise.
6938 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6940         * gimplify.c (nonlocal_vlas): Delete.
6941         (nonlocal_vla_vars): Likewise.
6942         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6943         referenced VLAs.
6944         (gimplify_body): Do not create and destroy nonlocal_vlas.
6945         * tree-nested.c: Include diagnostic.h.
6946         (use_pointer_in_frame): Tweak.
6947         (lookup_field_for_decl): Add assertion and declare the transformation.
6948         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6949         internal error when the reference is in a wrong context.  Do not
6950         create a debug decl by default.
6951         (note_nonlocal_block_vlas): Delete.
6952         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6953         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6954         create a debug decl by default.
6955         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6956         call is in a wrong context.
6957         (fixup_vla_decls): New function.
6958         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6959         debug variables were created.
6960         * tree.c (decl_value_expr_lookup): Add checking assertion.
6961         (decl_value_expr_insert): Likewise.
6963 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6965         PR middle-end/82479
6966         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6967         * tree-scalar-evolution.c (interpret_expr): Likewise.
6968         (expression_expensive_p): Likewise.
6969         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6970         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6971         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6972         (ssa_defined_by_minus_one_stmt_p): New.
6974 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6976         PR middle-end/64946
6977         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6978         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6979         * dojump.c (do_jump): Likewise.
6980         * expr.c (expand_expr_real_2): Check operand type's sign.
6981         * fold-const.c (const_unop): Handle ABSU_EXPR.
6982         (fold_abs_const): Likewise.
6983         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6984         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6985         (strip_sign_op_1): Likesise.
6986         * match.pd: Add new pattern to generate ABSU_EXPR.
6987         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6988         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6989         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6990         * tree-inline.c (estimate_operator_cost): Likewise.
6991         * tree-pretty-print.c (dump_generic_node): Likewise.
6992         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6993         * tree.def (ABSU_EXPR): New.
6995 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6997         PR middle-end/86095
6998         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6999         documented as preserved for backward compatibility only.
7000         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7002         PR rtl-optimization/86108
7003         * bb-reorder.c (create_forwarder_block): Renamed to ...
7004         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
7005         jump from new landing pad to the second part.
7006         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7007         Adjust callers.
7009 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
7011         PR middle-end/85878
7012         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7013         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7014         Only call store_expr for halves if the mode is the same.
7016         PR middle-end/86123
7017         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7018         Fix up comment formatting.
7020 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7022         * typed-splay-tree.h (typed_splay_tree::remove): New function.
7023         (typed_splay_tree::closure,
7024         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7025         (typed_splay_tree::typed_splay_tree,
7026         typed_splay_tree::operator =): Declared private.
7027         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7028         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7029         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7030         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7031         typed_splay_tree::splay_tree_splay,
7032         typed_splay_tree::splay_tree_foreach_helper,
7033         typed_splay_tree::splay_tree_insert,
7034         typed_splay_tree::splay_tree_remove,
7035         typed_splay_tree::splay_tree_lookup,
7036         typed_splay_tree::splay_tree_predecessor,
7037         typed_splay_tree::splay_tree_successor,
7038         typed_splay_tree::splay_tree_min,
7039         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7040         (typed_splay_tree::root, typed_splay_tree::comp,
7041         typed_splay_tree::delete_key,
7042         typed_splay_tree::delete_value): New data members.
7043         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7044         typed_splay_tree::remove.
7046 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
7048         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7049         -mginv and -mno-ginv to the assembler.
7050         * config/mips/mips.opt (-mcrc): New option.
7051         (-mginv): Likewise.
7052         * doc/invoke.text (-mcrc): Document.
7053         (-mginv): Likewise.
7055 2018-06-15  Nick Clifton  <nickc@redhat.com>
7057         PR 84195
7058         * tree.c (escaped_string): New class.  Converts an unescaped
7059         string into its escaped equivalent.
7060         (warn_deprecated_use): Use the new class to convert the
7061         deprecation message, if present.
7062         (test_escaped_strings): New self test.
7063         (test_c_tests): Add test_escaped_strings.
7064         * doc/extend.texi (deprecated): Add a note that the
7065         deprecation message is affected by the -fmessage-length
7066         option, and that control characters will be escaped.
7067         (#pragma GCC error): Document this pragma.
7068         (#pragma GCC warning): Likewise.
7069         * doc/invoke.texi (-fmessage-length): Document this option's
7070         effect on the #warning and #error preprocessor directives and
7071         the deprecated attribute.
7073 2018-06-15  Richard Biener  <rguenther@suse.de>
7075         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7076         here, also noting vector size used.
7077         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
7078         size used in MSG_OPTIMIZED_LOCATIONS dump.
7079         (pass_slp_vectorize::execute): Adjust.
7081 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
7083         PR target/85968
7084         * config/arc/arc.c (arc_return_address_register): Fix
7085         if-condition.
7087 2018-06-15  Richard Biener  <rguenther@suse.de>
7089         PR middle-end/86159
7090         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7091         leave useless conversion stripping to force_gimple_operand_gsi.
7092         (gimplify_build2): Likewise.
7093         (gimplify_build1): Likewise.
7095 2018-06-15  Richard Biener  <rguenther@suse.de>
7097         PR middle-end/86076
7098         * tree-cfg.c (move_stmt_op): unshare invariant addresses
7099         before adjusting their block.
7101 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7103         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7104         multilibs for *-*-rtems*.
7105         * config/riscv/t-rtems: New file.
7107 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
7109         PR middle-end/86122
7110         * match.pd ((A +- CST1) +- CST2): Punt if last resort
7111         unsigned_type_for returns NULL.
7113         PR target/85945
7114         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7115         subregs of multi-word pseudos unless the float mode has word size.
7117 2018-06-14  Richard Biener  <rguenther@suse.de>
7119         PR middle-end/86139
7120         * tree-vect-generic.c (build_word_mode_vector_type): Remove
7121         duplicate and harmful type_hash_canon.
7122         * tree.c (type_hash_canon): Assert we didn't find ourselves.
7124 2018-06-14  Richard Biener  <rguenther@suse.de>
7126         PR ipa/86124
7127         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7128         NULL cgraph_node.
7130 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7132         * config/rtems.h (STDINT_LONG32): Define.
7134 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
7135             Prachi Godbole  <prachi.godbole@imgtec.com>
7137         * config/mips/mips-cpus.def: Define P6600.
7138         * config/mips/mips-tables.opt: Regenerate.
7139         * config/mips/mips.c (mips_ucbranch_type): New enum.
7140         (mips_rtx_cost_data): Add support for P6600.
7141         (mips_issue_rate): Likewise.
7142         (mips_multipass_dfa_lookahead): Likewise.
7143         (mips_avoid_hazard): Likewise.
7144         (mips_reorg_process_insns): Likewise.
7145         (mips_classify_branch_p6600): New function.
7146         * config/mips/mips.h (TUNE_P6600): New define.
7147         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7148         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7149         * config/mips/mips.md: Include p6600.md.
7150         (processor): Add p6600.
7151         * config/mips/p6600.md: New file.
7152         * doc/invoke.texi: Add p6600 to supported architectures.
7154 2018-06-13  Martin Sebor  <msebor@redhat.com>
7156         PR tree-optimization/86114
7157         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7158         of integer types.
7159         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7161 2018-06-13  Richard Biener  <rguenther@suse.de>
7163         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7164         Properly set vector type of the intermediate stmt.
7165         * tree-vect-stmts.c (vectorizable_operation): The destination
7166         var always has vectype_out type.
7168 2018-06-13  Jeff Law  <law@redhat.com>
7170         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7171         integer 0 for argument to print_rtl_with_bb.
7172         (rl78_reorg): Likewise.
7174 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
7176         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7177         from rtx to rtx_insn *.
7178         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7179         "label".
7180         (add_sched_insns_for_speculation): Likewise for local "target",
7181         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7182         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7183         from rtx_insn ** to rtx_code_label **.
7184         (reorg_emit_nops): Likewise.
7185         (c6x_reorg): Likewise for local "call_labels".
7186         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7187         rtx to rtx_insn *.
7188         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7189         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7190         the loops over LABEL_REFS.
7191         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7192         braf_label.
7193         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7194         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7195         (split_branches): Strengthen local "olabel" from rtx to
7196         rtx_insn *, adding a safe_as_a cast.
7197         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7198         to "rtx_insn *".
7199         (add_insn_after): Likewise for first two params.
7200         (add_insn_before): Likewise.
7201         (remove_insn): Likewise for param.
7202         (emit_pattern_before_noloc): Likewise for second and third params.
7203         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7204         (emit_call_insn_before_noloc): Likewise.
7205         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7206         to "rtx_insn *".
7207         (emit_barrier_before): Likewise.
7208         (emit_label_before): Strengthen "label" param from "rtx" to
7209         "rtx_code_label *".  Strengthen "before" param from "rtx" to
7210         "rtx_insn *".
7211         (emit_insn_after_1): Strengthen "after" param from "rtx" to
7212         "rtx_insn *".
7213         (emit_pattern_after_noloc): Likewise.
7214         (emit_insn_after_noloc): Likewise.
7215         (emit_jump_insn_after_noloc): Likewise.
7216         (emit_call_insn_after_noloc): Likewise.
7217         (emit_debug_insn_after_noloc): Likewise.
7218         (emit_barrier_after): Likewise.
7219         (emit_label_after): Likewise for both params.
7220         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
7221         "loc" param from "int" to "location_t".
7222         (emit_insn_after_setloc): Likewise.
7223         (emit_jump_insn_after_setloc): Likewise.
7224         (emit_call_insn_after_setloc): Likewise.
7225         (emit_debug_insn_after_setloc): Likewise.
7226         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
7227         "loc" param from "int" to "location_t".
7228         (emit_pattern_before): Convert NULL_RTX to NULL.
7229         (emit_insn_before_setloc): Convert "loc" param from "int" to
7230         "location_t".
7231         (emit_jump_insn_before_setloc): Likewise.
7232         (emit_call_insn_before_setloc): Likewise.
7233         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7234         rtx_insn *.  Convert "loc" param from "int" to "location_t".
7235         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7236         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7237         Convert 3rd param from "int" to "location_t".
7238         (emit_barrier_before, emit_barrier_after, next_real_insn):
7239         Strengthen param from rtx to rtx_insn *.
7240         (emit_label_before): Strengthen 1st param from "rtx" to
7241         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
7242         "rtx_insn *".
7243         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7244         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7245         Strengthen 2nd param from "rtx" to "rtx_insn *".
7246         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7247         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7248         Likewise. Convert 3rd param from "int" to "location_t".
7249         (emit_label_after): Strengthen 1st param from "rtx" to
7250         "rtx_code_label *".
7251         (next_real_insn, remove_insn): Strengthen param from "rtx" to
7252         "rtx_insn *".
7253         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7254         from "rtx" to "rtx_insn *".
7256 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
7258         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7259         bodies streamed in with -Q.
7260         * dumpfile.c (dump_files): Add lto-stream-out dump file.
7261         * dumpfile.h (tree_dump_index): Add lto_stream_out.
7262         * gimple-streamer-out.c: Include gimple-pretty-print.h
7263         (output_bb): Dump stmts streamed.
7264         * lto-section-out.c: Include print-tree.h
7265         (lto_begin_section): Dump sections created.
7266         (lto_output_decl_index): Dump decl encoded.
7267         * lto-streamer-out.c: Include print-tree.h
7268         (create_output_block): Dump output block created.
7269         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7270         (output_function): Dump function output.
7271         (output_constructor): Dump constructor streamed.
7272         (write_global_stream): Output indexes encoded.
7273         (produce_asm_for_decls): Dump streams encoded.
7274         * lto-streamer.c (streamer_dump_file): New global var.
7275         * lto-streamer.h (streamer_dump_file): Declare.
7276         * passes.c (ipa_write_summaries): Initialize streamer dump.
7277         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7278         in.
7280 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7282         PR target/86048
7283         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7284         offsets for register save directives.  Emit a second batch of save
7285         directives, if need be, when the function accesses prior frames.
7287 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7289         * config/arc/fpu.md (fmasf4): Force operand to register.
7290         (fnmasf4): Likewise.
7292 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7294         * config/arc/arc-protos.h (arc_pad_return): Remove.
7295         * config/arc/arc.c (machine_function): Remove force_short_suffix
7296         and size_reason.
7297         (arc_print_operand): Adjust printing of '&'.
7298         (arc_verify_short): Remove conditional printing of short suffix.
7299         (arc_final_prescan_insn): Remove reference to size_reason.
7300         (pad_return): New function.
7301         (arc_reorg): Call pad_return.
7302         (arc_pad_return): Remove.
7303         (arc_init_machine_status): Remove reference to force_short_suffix.
7304         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7305         (attr length): When attribute iscompact is true force to 2
7306         regardless; in the case of maybe check if we want to force the
7307         instruction to have 4 bytes length.
7308         (nopv): Change it to generate 4 byte long nop as well.
7309         (blockage): New pattern.
7310         (simple_return): Remove call to arc_pad_return.
7311         (p_return_i): Likewise.
7313 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7315         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7317 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7319         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7320         ARC cores.
7322 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7324         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7325         for ARC700 and ARCv2.
7327 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
7329         PR target/86076
7330         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7331         operands[2] instead of operands[1].
7334 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7336         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7337         case, check whether the outer register overlaps an unallocatable
7338         register, not just whether it fits the required class.
7340 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7342         * poly-int.h (can_div_trunc_p): Add new overload in which all values
7343         are poly_ints.
7344         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7345         (memrefs_conflict_p): Likewise.
7346         (init_alias_analysis): Likewise.
7347         * cfgexpand.c (expand_debug_expr): Likewise.
7348         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7349         * cse.c (fold_rtx): Likewise.
7350         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7351         * expr.c (emit_block_move_hints): Likewise.
7352         (clear_storage_hints, push_block, emit_push_insn): Likewise.
7353         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7354         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7355         (emit_group_store): Likewise.
7356         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
7357         to read the PRE/POST_MODIFY increment.
7358         * calls.c (store_one_arg): Use strip_offset.
7359         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7360         poly_int_rtx_p.
7361         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7362         by a VEC_SELECT.
7363         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7364         (simplify_binary_operation_1): Extend CONST_INT handling to
7365         poly_int_rtx_p.
7366         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7367         than a HOST_WIDE_INT.
7368         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7369         poly_int64.
7370         (adjust_mems, add_stores): Update accodingly.
7371         (vt_canonicalize_addr): Track polynomial offsets.
7372         (emit_note_insn_var_location): Likewise.
7373         (vt_add_function_parameter): Likewise.
7374         (vt_initialize): Likewise.
7376 2018-06-12  Jeff Law  <law@redhat.com>
7378         * config.gcc (alpha*-*-freebsd*): Remove.
7379         * config/alpha/freebsd.h: Remove.
7381 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
7383         PR other/69968
7384         * spellcheck-tree.c (levenshtein_distance): Rename to...
7385         (get_edit_distance): ...this, and update for underlying renaming.
7386         * spellcheck-tree.h (levenshtein_distance): Rename to...
7387         (get_edit_distance): ...this.
7388         * spellcheck.c (levenshtein_distance): Rename to...
7389         (get_edit_distance): ...this.  Convert from Levenshtein distance
7390         to Damerau-Levenshtein distance by supporting transpositions of
7391         adjacent characters.  Rename "v1" to "v_next" and "v0" to
7392         "v_one_ago".
7393         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7394         (selftest::test_edit_distance_unit_test_oneway): ...this, and
7395         update for underlying renaming.
7396         (selftest::levenshtein_distance_unit_test): Rename to...
7397         (selftest::test_get_edit_distance_unit): ...this, and update for
7398         underlying renaming.
7399         (selftest::test_find_closest_string): Add example from PR 69968
7400         where transposition helps
7401         (selftest::test_metric_conditions): Update for renaming.
7402         (selftest::test_metric_conditions): Likewise.
7403         (selftest::spellcheck_c_tests): Likewise.
7404         * spellcheck.h (levenshtein_distance): Rename both overloads to...
7405         (get_edit_distance): ...this.
7406         (best_match::consider): Update for renaming.
7408 2018-06-12  Martin Sebor  <msebor@redhat.com>
7410         PR tree-optimization/85259
7411         * builtins.c (compute_objsize): Handle constant offsets.
7412         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7413         true iff a warning has been issued.
7414         * gimple.h (gimple_nonartificial_location): New function.
7415         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7416         gimple_nonartificial_location and handle -Wno-system-headers.
7417         (handle_builtin_stxncpy): Same.
7419 2018-06-12  Martin Sebor  <msebor@redhat.com>
7421         PR c/85931
7422         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7424 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
7426         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7427         BUILTIN_VEC_XST entries for pointer to double and long long.
7429 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
7431         PR target/85990
7432         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7433         Update comments.
7434         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7435         Likewise.
7437 2018-06-12  Martin Liska  <mliska@suse.cz>
7439         * doc/options.texi: Document IntegerRange.
7441 2018-06-12  Martin Liska  <mliska@suse.cz>
7443         * config/i386/i386.opt: Make MPX-related options as Deprecated.
7444         * opt-functions.awk: Handle Deprecated flag.
7445         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7446         and report error.
7447         (read_cmdline_option): Report warning for a deprecated option.
7448         * opts.h (struct cl_option): Add new field cl_deprecated.
7449         (CL_ERR_DEPRECATED): New.
7451 2018-06-12  Martin Liska  <mliska@suse.cz>
7453         * doc/options.texi: Document Deprecated option flag.
7455 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7457         * config/arc/arc-arch.h (arc_extras): New enum.
7458         (arc_cpu_t):Add field extra.
7459         (arc_cpu_types): Consider the extras.
7460         * config/arc/arc-cpus.def: Add extras info.
7461         * config/arc/arc-opts.h (processor_type): Consider extra field.
7462         * config/arc/arc.c (arc_override_options): Handle extra field.
7464 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7466         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7467         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7468         field.
7469         * config/arc/arc.c (arc_init): Update pic warning.
7470         (irq_range): Update irq range parsing warnings.
7471         (arc_override_options): Update various warning messages.
7472         (arc_handle_aux_attribute): Likewise.
7474 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
7476         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7478 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7480         * doc/sourcebuild.texi: Document usage of line number 0 in verify
7481         compiler messages directives.
7483 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7485         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7486         * config/mips/mips-tables.opt: Regenerate.
7487         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7488         mips64r6.
7489         * doc/invoke.texi: Document -march=i6500.
7491 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7493         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7494         (i6400_gpmul): Add cpu_unit.
7495         (i6400_gpdiv): Likewise.
7496         (i6400_msa_add_d): Update reservations.
7497         (i6400_msa_int_add) Likewise.
7498         (i6400_msa_short_logic3) Likewise.
7499         (i6400_msa_short_logic2) Likewise.
7500         (i6400_msa_short_logic) Likewise.
7501         (i6400_msa_move) Likewise.
7502         (i6400_msa_cmp) Likewise.
7503         (i6400_msa_short_float2) Likewise.
7504         (i6400_msa_div_d) Likewise.
7505         (i6400_msa_long_logic1) Likewise.
7506         (i6400_msa_long_logic2) Likewise.
7507         (i6400_msa_mult) Likewise.
7508         (i6400_msa_long_float2) Likewise.
7509         (i6400_msa_long_float4) Likewise.
7510         (i6400_msa_long_float5) Likewise.
7511         (i6400_msa_long_float8) Likewise.
7512         (i6400_fpu_fadd): Include frint type.
7513         (i6400_fpu_store): New define_insn_reservation.
7514         (i6400_fpu_load): Likewise.
7515         (i6400_fpu_move): Likewise.
7516         (i6400_fpu_fcmp): Likewise.
7517         (i6400_fpu_fmadd): Likewise.
7518         (i6400_int_mult): Include imul3nc type and update reservation.
7519         (i6400_int_div): Include idiv3 type and update reservation.
7520         (i6400_int_load): Update to check type not move_type.
7521         (i6400_int_store): Likewise.
7522         (i6400_int_prefetch): Set zero latency.
7524 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7526         * gcc.c: Document new %@{...} sequence.
7527         (LINK_COMMAND_SPEC): Use it for the -L switches.
7528         (cpp_unique_options): Use it for the -I switches.
7529         (at_file_argbuf): New global variable.
7530         (in_at_file): Likewise.
7531         (alloc_args): Create at_file_argbuf.
7532         (clear_args): Truncate at_file_argbuf.
7533         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7534         (open_at_file): New function.
7535         (close_at_file): Likewise.
7536         (create_at_file): Delete.
7537         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7538         <'o'>: Likewise.
7539         <'@'>: New case.
7540         (validate_switches_from_spec): Deal with %@{...} sequence.
7541         (validate_switches): Likewise.
7542         (driver::finalize): Call clear_args.
7544 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7546         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7548 2018-06-11  Martin Sebor  <msebor@redhat.com>
7550         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7551         (Wno-class-memaccess): Add @opindex.
7552         (Wno-templates, Wno-multiple-inheritance): Same.
7553         (Wno-virtual-inheritance, Wno-namespaces): Same.
7554         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7555         (Wno-format-overflow, Wno-format-truncation): Same.
7556         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7557         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7558         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7559         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7560         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7561         (Wno-misspelled-isr): Same.
7563 2018-06-11  Martin Sebor  <msebor@redhat.com>
7565         * PR tree-optimization/86083
7566         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7568 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7570         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7572 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7574         PR target/85755
7575         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7576         on the correct operand.
7577         (*movdi_internal64): Ditto.
7579 2018-06-11  Martin Liska  <mliska@suse.cz>
7581         PR tree-optimization/86089
7582         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7584 2018-06-11  Julia Koval  <julia.koval@intel.com>
7586         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7587         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7588         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7590 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7592         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7593         for Ada with strict dwarf2.
7595 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7597         PR target/85755
7598         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7599         addresses.
7601 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7603         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7605 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7607         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7608         TARGET_ELF.
7610 2018-06-08  Martin Liska  <mliska@suse.cz>
7612         * tree-cfg.h (debug_function): Fix argument type to match
7613         implementation.
7615 2018-06-08  Martin Liska  <mliska@suse.cz>
7617         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7618         Remove usage of MPX-related (and removed) fields.
7619         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7621 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7623         * cfg.c (debug): Use TDF_NONE rather than 0.
7624         * cfghooks.c (debug): Likewise.
7625         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7626         (struct dump_option_value_info): Convert to...
7627         (struct kv_pair): ...this template type.
7628         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7629         rather than 0.
7630         (optinfo_verbosity_options): Likewise.
7631         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7632         OPTGROUP_NONE.
7633         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7634         than int for "optgroup_flags" param.
7635         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7636         "dump_kind" param.
7637         (dump_dec): Likewise.
7638         (dump_finish): Use TDF_NONE rather than 0.
7639         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7640         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7641         than 0.  Update for change to option_ptr.
7642         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7643         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7644         0.  Update for changes to optinfo_verbosity_options and
7645         optgroup_options.
7646         (opt_info_switch_p): Convert optgroup_flags from int to
7647         optgroup_flags_t.
7648         (dump_basic_block): Use dump_flags_t rather than int
7649         for "dump_kind" param.
7650         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7651         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7652         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7653         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7654         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7655         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7656         TDF_NONE): Convert from macros to...
7657         (enum dump_flag): ...this new enum.
7658         (dump_flags_t): Update to use enum.
7659         (operator|, operator&, operator~, operator|=, operator&=):
7660         Implement for dump_flags_t.
7661         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7662         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7663         Convert from macros to...
7664         (enum optgroup_flag): ...this new enum.
7665         (optgroup_flags_t): New typedef.
7666         (operator|, operator|=): Implement for optgroup_flags_t.
7667         (struct dump_file_info): Convert field "alt_flags" to
7668         dump_flags_t.  Convert field "optgroup_flags" to
7669         optgroup_flags_t.
7670         (dump_basic_block): Use dump_flags_t rather than int for param.
7671         (dump_generic_expr_loc): Likewise.
7672         (dump_dec): Likewise.
7673         (dump_register): Convert param "optgroup_flags" to
7674         optgroup_flags_t.
7675         (opt_info_enable_passes): Likewise.
7676         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7677         than 0.
7678         * gimple-pretty-print.c (debug): Likewise.
7679         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7680         (merged_store_group::apply_stores): Likewise.
7681         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7682         * gimple.c (verify_gimple_pp): Likewise.
7683         * graphite-poly.c (print_pbb_body): Likewise.
7684         * passes.c (pass_manager::register_one_dump_file): Convert
7685         local "optgroup_flags" to optgroup_flags_t.
7686         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7687         (debug): Likewise.
7688         (debug_body): Likewise.
7689         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7690         to optgroup_flags_t.
7691         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7692         than 0.
7693         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7694         (convert_mult_to_fma): Likewise.
7695         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7696         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7697         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7698         "dump_kind" to dump_flags_t.
7700 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7702         * config/rs6000/rs6000.c (min, max): Delete.
7704 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7706         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7707         -mabi=spe and -mabi=no-spe.
7709 2018-06-08  Martin Liska  <mliska@suse.cz>
7711         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7712         where we expect an existing summary.
7714 2018-06-08  Martin Liska  <mliska@suse.cz>
7716         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7717         * ipa-inline.h (estimate_edge_growth): Likewise.
7719 2018-06-08  Martin Liska  <mliska@suse.cz>
7721         * cgraph.c (function_version_hasher::hash): Use
7722         cgraph_node::get_uid ().
7723         (function_version_hasher::equal):
7724         * cgraph.h (cgraph_node::get_uid): New method.
7725         * ipa-inline.c (update_caller_keys): Use
7726         cgraph_node::get_uid ().
7727         (update_callee_keys): Likewise.
7728         * ipa-utils.c (searchc): Likewise.
7729         (ipa_reduced_postorder): Likewise.
7730         * lto-cgraph.c (input_node): Likewise.
7731         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7732         * symbol-summary.h (symtab_insertion): Likewise.
7733         (symtab_removal): Likewise.
7734         (symtab_duplication): Likewise.
7735         * tree-pretty-print.c (dump_function_header): Likewise.
7736         * tree-sra.c (convert_callers_for_node): Likewise.
7738 2018-06-08  Martin Liska  <mliska@suse.cz>
7740         * cgraph.c (symbol_table::create_edge): Always assign a new
7741         unique number.
7742         (symbol_table::free_edge): Do not recycle numbers.
7743         * cgraph.h (cgraph_edge::get): New method.
7744         * symbol-summary.h (symtab_removal): Use it.
7745         (symtab_duplication): Likewise.
7746         (call_summary::hashable_uid): Remove.
7748 2018-06-08  Martin Liska  <mliska@suse.cz>
7750         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7751         (initialize_growth_caches): Remove.
7752         (free_growth_caches): Likewise.
7753         (do_estimate_edge_time): Use edge_growth_cache.
7754         (do_estimate_edge_size): Likewise.
7755         (do_estimate_edge_hints): Likewise.
7756         * ipa-inline.c (reset_edge_caches): Likewise.
7757         (recursive_inlining): Likewise.
7758         (inline_small_functions): Likewise.
7759         * ipa-inline.h (initialize_growth_caches): Remove.
7760         (estimate_edge_size): Likewise.
7761         (estimate_edge_time): Likewise.
7762         (estimate_edge_hints): Likewise.
7763         (reset_edge_growth_cache): Likewise.
7764         * symbol-summary.h (call_summary::remove): New method.
7766 2018-06-08  Martin Liska  <mliska@suse.cz>
7768         * ipa-cp.c (class edge_clone_summary): New summary.
7769         (grow_edge_clone_vectors): Remove.
7770         (ipcp_edge_duplication_hook): Remove.
7771         (class edge_clone_summary_t): New call_summary class.
7772         (ipcp_edge_removal_hook): Remove.
7773         (edge_clone_summary_t::duplicate): New function.
7774         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7775         (create_specialized_node): Likewise.
7776         (ipcp_driver): Initialize edge_clone_summaries and do not
7777         register hooks.
7779 2018-06-08  Martin Liska  <mliska@suse.cz>
7781         * symbol-summary.h (get): New function.
7782         (call_summary::m_initialize_when_cloning): New class member.
7784 2018-06-08  Martin Liska  <mliska@suse.cz>
7786         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7787         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7788         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7789         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7790         (remove_cgraph_node_from_order): Use the removed_nodes set.
7791         (do_per_function_toporder): Likwise.
7792         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7793         instead of summary_uid.
7794         (symtab_removal): Likewise.
7795         (symtab_duplication): Likewise.
7797 2018-06-08  Martin Liska  <mliska@suse.cz>
7799         * ipa-cp.c (ipcp_store_bits_results): Use
7800         ipcp_transformation_sum.
7801         (ipcp_store_vr_results): Likewise.
7802         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7803         to ...
7804         (ipcp_transformation_initialize): ... this.
7805         (ipa_set_node_agg_value_chain):
7806         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7807         (write_ipcp_transformation_info): Likewise.
7808         (read_ipcp_transformation_info): Likewise.
7809         (ipcp_update_bits): Likewise.
7810         (ipcp_update_vr): Likewise.
7811         (ipcp_transform_function): Likewise.
7812         * ipa-prop.h: Rename ipcp_transformation_summary to
7813         ipcp_transformation.
7814         (class ipcp_transformation_t): New function summary.
7815         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7816         (ipa_get_agg_replacements_for_node): Likewise.
7818 2018-06-08  Martin Liska  <mliska@suse.cz>
7820         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7821         of struct.
7822         (class funct_state_summary_t): New function_summary class.
7823         (has_function_state): Remove.
7824         (get_function_state): Likewise.
7825         (set_function_state): Likewise.
7826         (add_new_function): Likewise.
7827         (funct_state_summary_t::insert): New function.
7828         (duplicate_node_data): Remove.
7829         (remove_node_data): Remove.
7830         (funct_state_summary_t::duplicate): New function.
7831         (register_hooks): Create new funct_state_summaries.
7832         (pure_const_generate_summary): Use it.
7833         (pure_const_write_summary): Likewise.
7834         (pure_const_read_summary): Likewise.
7835         (propagate_pure_const): Likewise.
7836         (propagate_nothrow): Likewise.
7837         (dump_malloc_lattice): Likewise.
7838         (propagate_malloc): Likewise.
7839         (execute): Do not register hooks, just remove summary
7840         instead.
7841         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7842         constructor.
7844 2018-06-08  Martin Liska  <mliska@suse.cz>
7846         * ipa-reference.c (remove_node_data): Remove.
7847         (duplicate_node_data): Likewise.
7848         (class ipa_ref_var_info_summary_t): New class.
7849         (class ipa_ref_opt_summary_t): Likewise.
7850         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7851         (get_reference_optimization_summary): Use
7852         ipa_ref_opt_sum_summaries.
7853         (set_reference_vars_info): Remove.
7854         (set_reference_optimization_summary): Likewise.
7855         (ipa_init): Create summaries.
7856         (init_function_info): Use function summary.
7857         (ipa_ref_opt_summary_t::duplicate): New function.
7858         (ipa_ref_opt_summary_t::remove): New function.
7859         (get_read_write_all_from_node): Fix GNU coding style.
7860         (propagate): Use function summary.
7861         (write_node_summary_p): Fix GNU coding style.
7862         (stream_out_bitmap): Likewise.
7863         (ipa_reference_read_optimization_summary): Use function summary.
7864         (ipa_reference_c_finalize): Do not release hooks.
7866 2018-06-08  Martin Liska  <mliska@suse.cz>
7868         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7869         (analyze_function_body): Extract multiple calls of get_create.
7870         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7871         * ipa-inline.c (recursive_inlining): Use ::get method.
7872         * ipa-inline.h (estimate_edge_growth): Likewise.
7874 2018-06-08  Martin Liska  <mliska@suse.cz>
7876         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7877         HSA_INVALID.
7878         (hsa_function_summary::hsa_function_summary): Use the new enum
7879         value.
7880         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7881         * hsa-gen.c (hsa_get_host_function): Likewise.
7882         (get_brig_function_name): Likewise.
7883         * ipa-hsa.c (process_hsa_functions): Likewise.
7884         (ipa_hsa_write_summary): Likewise.
7885         * symbol-summary.h (symtab_duplication): Use ::get function/
7886         (get): New function.
7888 2018-06-08  Martin Liska  <mliska@suse.cz>
7890         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7891         of get.
7892         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7893         (hsa_register_kernel): Likewise.
7894         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7895         * hsa-gen.c (hsa_get_host_function): Likewise.
7896         (get_brig_function_name): Likewise.
7897         (generate_hsa): Likewise.
7898         (pass_gen_hsail::execute): Likewise.
7899         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7900         (devirtualization_time_bonus): Likewise.
7901         (ipcp_propagate_stage): Likewise.
7902         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7903         (edge_set_predicate): Likewise.
7904         (evaluate_conditions_for_known_args): Likewise.
7905         (evaluate_properties_for_edge): Likewise.
7906         (ipa_fn_summary::reset): Likewise.
7907         (ipa_fn_summary_t::duplicate): Likewise.
7908         (dump_ipa_call_summary): Likewise.
7909         (ipa_dump_fn_summary): Likewise.
7910         (analyze_function_body): Likewise.
7911         (compute_fn_summary): Likewise.
7912         (estimate_edge_devirt_benefit): Likewise.
7913         (estimate_edge_size_and_time): Likewise.
7914         (estimate_calls_size_and_time): Likewise.
7915         (estimate_node_size_and_time): Likewise.
7916         (inline_update_callee_summaries): Likewise.
7917         (remap_edge_change_prob): Likewise.
7918         (remap_edge_summaries): Likewise.
7919         (ipa_merge_fn_summary_after_inlining): Likewise.
7920         (ipa_update_overall_fn_summary): Likewise.
7921         (read_ipa_call_summary): Likewise.
7922         (inline_read_section): Likewise.
7923         (write_ipa_call_summary): Likewise.
7924         (ipa_fn_summary_write): Likewise.
7925         (ipa_free_fn_summary): Likewise.
7926         * ipa-hsa.c (process_hsa_functions): Likewise.
7927         (ipa_hsa_write_summary): Likewise.
7928         (ipa_hsa_read_section): Likewise.
7929         * ipa-icf.c (sem_function::merge): Likewise.
7930         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7931         (do_estimate_edge_time): Likewise.
7932         (estimate_size_after_inlining): Likewise.
7933         (estimate_growth): Likewise.
7934         (growth_likely_positive): Likewise.
7935         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7936         (inline_call): Likewise.
7937         * ipa-inline.c (caller_growth_limits): Likewise.
7938         (can_inline_edge_p): Likewise.
7939         (can_inline_edge_by_limits_p): Likewise.
7940         (compute_uninlined_call_time): Likewise.
7941         (compute_inlined_call_time): Likewise.
7942         (want_inline_small_function_p): Likewise.
7943         (edge_badness): Likewise.
7944         (update_caller_keys): Likewise.
7945         (update_callee_keys): Likewise.
7946         (recursive_inlining): Likewise.
7947         (inline_small_functions): Likewise.
7948         (inline_to_all_callers_1): Likewise.
7949         (dump_overall_stats): Likewise.
7950         (early_inline_small_functions): Likewise.
7951         (early_inliner): Likewise.
7952         * ipa-inline.h (estimate_edge_growth): Likewise.
7953         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7954         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7955         * ipa-prop.h (IPA_NODE_REF): Likewise.
7956         (IPA_EDGE_REF): Likewise.
7957         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7958         (propagate_malloc): Likewise.
7959         * ipa-split.c (execute_split_functions): Likewise.
7960         * symbol-summary.h: Rename get to get_create.
7961         (get): Likewise.
7962         (get_create): Likewise.
7963         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7965 2018-06-08  Martin Liska  <mliska@suse.cz>
7967         * symbol-summary.h (release): Move definition out of class
7968         declaration.
7969         (symtab_removal): Likewise.
7970         (symtab_duplication): Likewise.
7972 2018-06-08  Martin Liska  <mliska@suse.cz>
7974         * symbol-summary.h (function_summary): Move constructor
7975         implementation out of class declaration.
7976         (release): Likewise.
7977         (symtab_insertion): Likewise.
7978         (symtab_removal): Likewise.
7979         (symtab_duplication): Likewise.
7980         (get): Likewise.
7982 2018-06-08  Martin Liska  <mliska@suse.cz>
7984         * Makefile.in: Remove support for MPX (macros, related functions,
7985         fields in cgraph_node, ...).
7986         * builtin-types.def (BT_BND): Likewise.
7987         (BT_FN_BND_CONST_PTR): Likewise.
7988         (BT_FN_CONST_PTR_BND): Likewise.
7989         (BT_FN_VOID_PTR_BND): Likewise.
7990         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7991         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7992         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7993         (expand_builtin_mempcpy_with_bounds): Likewise.
7994         (expand_builtin_memset_with_bounds): Likewise.
7995         (expand_builtin_memset_args): Likewise.
7996         (std_expand_builtin_va_start): Likewise.
7997         (expand_builtin): Likewise.
7998         (expand_builtin_with_bounds): Likewise.
7999         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8000         (DEF_LIB_BUILTIN_CHKP): Likewise.
8001         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8002         (DEF_CHKP_BUILTIN): Likewise.
8003         (BUILT_IN_MEMCPY): Likewise.
8004         (BUILT_IN_MEMMOVE): Likewise.
8005         (BUILT_IN_MEMPCPY): Likewise.
8006         (BUILT_IN_MEMSET): Likewise.
8007         (BUILT_IN_STPCPY): Likewise.
8008         (BUILT_IN_STRCAT): Likewise.
8009         (BUILT_IN_STRCHR): Likewise.
8010         (BUILT_IN_STRCPY): Likewise.
8011         (BUILT_IN_STRLEN): Likewise.
8012         (BUILT_IN_MEMCPY_CHK): Likewise.
8013         (BUILT_IN_MEMMOVE_CHK): Likewise.
8014         (BUILT_IN_MEMPCPY_CHK): Likewise.
8015         (BUILT_IN_MEMSET_CHK): Likewise.
8016         (BUILT_IN_STPCPY_CHK): Likewise.
8017         (BUILT_IN_STRCAT_CHK): Likewise.
8018         (BUILT_IN_STRCPY_CHK): Likewise.
8019         * calls.c (store_bounds): Likewise.
8020         (emit_call_1): Likewise.
8021         (special_function_p): Likewise.
8022         (maybe_warn_nonstring_arg): Likewise.
8023         (initialize_argument_information): Likewise.
8024         (finalize_must_preallocate): Likewise.
8025         (compute_argument_addresses): Likewise.
8026         (expand_call): Likewise.
8027         * cfgexpand.c (expand_call_stmt): Likewise.
8028         (expand_return): Likewise.
8029         (expand_gimple_stmt_1): Likewise.
8030         (pass_expand::execute): Likewise.
8031         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8032         (cgraph_node::remove): Likewise.
8033         (cgraph_node::dump): Likewise.
8034         (cgraph_node::verify_node): Likewise.
8035         * cgraph.h (chkp_function_instrumented_p): Likewise.
8036         (symtab_node::get_alias_target): Likewise.
8037         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8038         (cgraph_local_p): Likewise.
8039         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8040         (cgraph_edge::rebuild_references): Likewise.
8041         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8042         (walk_polymorphic_call_targets): Likewise.
8043         (cgraph_node::expand_thunk): Likewise.
8044         (symbol_table::output_weakrefs): Likewise.
8045         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8046         (ix86_handle_option): Likewise.
8047         * config/i386/constraints.md: Likewise.
8048         * config/i386/i386-builtin-types.def (BND): Likewise.
8049         (VOID): Likewise.
8050         (PVOID): Likewise.
8051         (ULONG): Likewise.
8052         * config/i386/i386-builtin.def (BDESC_END): Likewise.
8053         (BDESC_FIRST): Likewise.
8054         (BDESC): Likewise.
8055         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8056         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8057         * config/i386/i386.c (enum reg_class): Likewise.
8058         (ix86_target_string): Likewise.
8059         (ix86_option_override_internal): Likewise.
8060         (ix86_conditional_register_usage): Likewise.
8061         (ix86_valid_target_attribute_inner_p): Likewise.
8062         (ix86_set_indirect_branch_type): Likewise.
8063         (ix86_set_current_function): Likewise.
8064         (ix86_function_arg_regno_p): Likewise.
8065         (init_cumulative_args): Likewise.
8066         (ix86_function_arg_advance): Likewise.
8067         (ix86_function_arg): Likewise.
8068         (ix86_pass_by_reference): Likewise.
8069         (ix86_function_value_regno_p): Likewise.
8070         (ix86_function_value_1): Likewise.
8071         (ix86_function_value_bounds): Likewise.
8072         (ix86_return_in_memory): Likewise.
8073         (ix86_setup_incoming_vararg_bounds): Likewise.
8074         (ix86_va_start): Likewise.
8075         (indirect_thunk_need_prefix): Likewise.
8076         (print_reg): Likewise.
8077         (ix86_print_operand): Likewise.
8078         (ix86_expand_call): Likewise.
8079         (ix86_output_function_return): Likewise.
8080         (reg_encoded_number): Likewise.
8081         (BDESC_VERIFYS): Likewise.
8082         (ix86_init_mpx_builtins): Likewise.
8083         (ix86_init_builtins): Likewise.
8084         (ix86_emit_cmove): Likewise.
8085         (ix86_emit_move_max): Likewise.
8086         (ix86_expand_builtin): Likewise.
8087         (ix86_builtin_mpx_function): Likewise.
8088         (ix86_get_arg_address_for_bt): Likewise.
8089         (ix86_load_bounds): Likewise.
8090         (ix86_store_bounds): Likewise.
8091         (ix86_load_returned_bounds): Likewise.
8092         (ix86_store_returned_bounds): Likewise.
8093         (ix86_class_likely_spilled_p): Likewise.
8094         (ix86_hard_regno_mode_ok): Likewise.
8095         (x86_order_regs_for_local_alloc): Likewise.
8096         (ix86_mitigate_rop): Likewise.
8097         (ix86_bnd_prefixed_insn_p): Likewise.
8098         (ix86_mpx_bound_mode): Likewise.
8099         (ix86_make_bounds_constant): Likewise.
8100         (ix86_initialize_bounds): Likewise.
8101         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8102         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8103         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8104         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8105         (TARGET_CHKP_BOUND_MODE): Likewise.
8106         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8107         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8108         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8109         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8110         * config/i386/i386.h (TARGET_MPX): Likewise.
8111         (TARGET_MPX_P): Likewise.
8112         (VALID_BND_REG_MODE): Likewise.
8113         (FIRST_BND_REG): Likewise.
8114         (LAST_BND_REG): Likewise.
8115         (enum reg_class): Likewise.
8116         (BND_REG_P): Likewise.
8117         (BND_REGNO_P): Likewise.
8118         (BNDmode): Likewise.
8119         (ADJUST_INSN_LENGTH): Likewise.
8120         * config/i386/i386.md: Likewise.
8121         * config/i386/i386.opt: Likewise.
8122         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8123         (defined): Likewise.
8124         (LINK_MPX): Likewise.
8125         (MPX_SPEC): Likewise.
8126         (LIBMPX_SPEC): Likewise.
8127         (LIBMPXWRAPPERS_SPEC): Likewise.
8128         (CHKP_SPEC): Likewise.
8129         * config/i386/predicates.md: Likewise.
8130         * dbxout.c (dbxout_type): Likewise.
8131         * doc/extend.texi: Likewise.
8132         * doc/invoke.texi: Likewise.
8133         * doc/md.texi: Likewise.
8134         * doc/tm.texi: Likewise.
8135         * doc/tm.texi.in: Likewise.
8136         * dwarf2out.c (is_base_type): Likewise.
8137         (gen_formal_types_die): Likewise.
8138         (gen_subprogram_die): Likewise.
8139         (gen_type_die_with_usage): Likewise.
8140         (gen_decl_die): Likewise.
8141         (dwarf2out_late_global_decl): Likewise.
8142         * expr.c (expand_assignment): Likewise.
8143         (emit_storent_insn): Likewise.
8144         (store_expr_with_bounds): Likewise.
8145         (store_expr): Likewise.
8146         (expand_expr_real_1): Likewise.
8147         * expr.h (store_expr_with_bounds): Likewise.
8148         * function.c (use_register_for_decl): Likewise.
8149         (struct bounds_parm_data): Likewise.
8150         (assign_parms_augmented_arg_list): Likewise.
8151         (assign_parm_find_entry_rtl): Likewise.
8152         (assign_parm_is_stack_parm): Likewise.
8153         (assign_parm_load_bounds): Likewise.
8154         (assign_bounds): Likewise.
8155         (assign_parms): Likewise.
8156         (expand_function_start): Likewise.
8157         * gcc.c (CHKP_SPEC): Likewise.
8158         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8159         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8160         (wrestrict_dom_walker::check_call): Likewise.
8161         * gimple.c (gimple_build_call_from_tree): Likewise.
8162         * gimple.h (enum gf_mask): Likewise.
8163         (gimple_call_with_bounds_p): Likewise.
8164         (gimple_call_set_with_bounds): Likewise.
8165         * gimplify.c (gimplify_init_constructor): Likewise.
8166         * ipa-cp.c (initialize_node_lattices): Likewise.
8167         (propagate_constants_across_call): Likewise.
8168         (find_more_scalar_values_for_callers_subset): Likewise.
8169         * ipa-hsa.c (process_hsa_functions): Likewise.
8170         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8171         * ipa-icf.c (sem_function::merge): Likewise.
8172         * ipa-inline.c (early_inliner): Likewise.
8173         * ipa-pure-const.c (warn_function_noreturn): Likewise.
8174         (warn_function_cold): Likewise.
8175         (propagate_pure_const): Likewise.
8176         * ipa-ref.h (enum GTY): Likewise.
8177         * ipa-split.c (find_retbnd): Likewise.
8178         (consider_split): Likewise.
8179         (split_function): Likewise.
8180         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8181         * ipa.c (walk_polymorphic_call_targets): Likewise.
8182         (symbol_table::remove_unreachable_nodes): Likewise.
8183         (process_references): Likewise.
8184         (cgraph_build_static_cdtor_1): Likewise.
8185         * lto-cgraph.c (lto_output_node): Likewise.
8186         (output_refs): Likewise.
8187         (compute_ltrans_boundary): Likewise.
8188         (input_overwrite_node): Likewise.
8189         (input_node): Likewise.
8190         (input_cgraph_1): Likewise.
8191         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8192         * passes.c (pass_manager::execute_early_local_passes): Likewise.
8193         (class pass_chkp_instrumentation_passes): Likewise.
8194         (make_pass_chkp_instrumentation_passes): Likewise.
8195         * passes.def: Likewise.
8196         * rtl.h (struct GTY): Likewise.
8197         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8198         * stor-layout.c (layout_type): Likewise.
8199         * symtab.c: Likewise.
8200         * target.def: Likewise.
8201         * targhooks.c (default_chkp_bound_type): Likewise.
8202         (default_chkp_bound_mode): Likewise.
8203         (default_builtin_chkp_function): Likewise.
8204         (default_chkp_function_value_bounds): Likewise.
8205         (default_chkp_make_bounds_constant): Likewise.
8206         (default_chkp_initialize_bounds): Likewise.
8207         * targhooks.h (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         * toplev.c (compile_file): Likewise.
8214         (process_options): Likewise.
8215         * tree-core.h (DEF_BUILTIN): Likewise.
8216         (DEF_BUILTIN_CHKP): Likewise.
8217         * tree-inline.c (declare_return_variable): Likewise.
8218         (remap_gimple_stmt): Likewise.
8219         (copy_bb): Likewise.
8220         (initialize_inlined_parameters): Likewise.
8221         (expand_call_inline): Likewise.
8222         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8223         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8224         (make_pass_ipa_chkp_produce_thunks): Likewise.
8225         (make_pass_chkp): Likewise.
8226         (make_pass_chkp_opt): Likewise.
8227         (make_pass_chkp_instrumentation_passes): Likewise.
8228         * tree-pretty-print.c (dump_generic_node): Likewise.
8229         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8230         * tree-ssa-dce.c (propagate_necessity): Likewise.
8231         (eliminate_unnecessary_stmts): Likewise.
8232         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8233         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8234         * tree-ssa-sccvn.h: Likewise.
8235         * tree-ssa-strlen.c (get_string_length): Likewise.
8236         (valid_builtin_call): Likewise.
8237         (adjust_last_stmt): Likewise.
8238         (handle_builtin_strchr): Likewise.
8239         (handle_builtin_strcpy): Likewise.
8240         (handle_builtin_stxncpy): Likewise.
8241         (handle_builtin_memcpy): Likewise.
8242         (handle_builtin_strcat): Likewise.
8243         (strlen_check_and_optimize_stmt): Likewise.
8244         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8245         * tree-streamer-in.c: Likewise.
8246         * tree-streamer.c (record_common_node): Likewise.
8247         * tree.c (tree_code_size): Likewise.
8248         (wide_int_to_tree_1): Likewise.
8249         (type_contains_placeholder_1): Likewise.
8250         (build_common_tree_nodes): Likewise.
8251         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8252         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8253         (POINTER_BOUNDS_P): Likewise.
8254         (BOUNDED_TYPE_P): Likewise.
8255         (BOUNDED_P): Likewise.
8256         (CALL_WITH_BOUNDS_P): Likewise.
8257         (pointer_bounds_type_node): Likewise.
8258         * value-prof.c (gimple_ic): Likewise.
8259         * var-tracking.c (vt_add_function_parameters): Likewise.
8260         * varasm.c (make_decl_rtl): Likewise.
8261         (assemble_start_function): Likewise.
8262         (output_constant): Likewise.
8263         (maybe_assemble_visibility): Likewise.
8264         * varpool.c (ctor_for_folding): Likewise.
8265         * chkp-builtins.def: Remove.
8266         * ipa-chkp.c: Remove.
8267         * ipa-chkp.h: Remove.
8268         * rtl-chkp.c: Remove.
8269         * rtl-chkp.h: Remove.
8270         * tree-chkp-opt.c: Remove.
8271         * tree-chkp.c: Remove.
8272         * tree-chkp.h: Remove.
8274 2018-06-07  Carl Love  <cel@us.ibm.com>
8276         * config/rs6000/vsx.md (vextract_fp_from_shorth,
8277         vextract_fp_from_shortl): Add BE support.
8279 2018-06-07  Paul Koning  <ni1d@arrl.net>
8281         * compare-elim.c (try_merge_compare): Don't merge compare if
8282         address contains a side effect.
8283         (try_eliminate_compare): Likewise.
8285 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
8287         * config.gcc: Support "tremont".
8288         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8289         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8290         PROCESSOR_TREMONT.
8291         * config/i386/i386.c (m_TREMONT): Define.
8292         (processor_target_table): Add "tremont".
8293         (PTA_TREMONT): Define.
8294         (ix86_lea_outperforms): Add TARGET_TREMONT.
8295         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8296         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8297         and M_INTEL_GOLDMONT_PLUS.
8298         (fold_builtin_cpu): Add "tremont".
8299         (ix86_add_stmt_cost): Add TARGET_TREMONT.
8300         (ix86_option_override_internal): Add "tremont".
8301         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8302         (processor_type): Add PROCESSOR_TREMONT.
8303         * config/i386/x86-tune.def: Add m_TREMONT.
8304         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8306 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8308         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8309         symbol defined for msp430i* devices to be lower case.
8311 2018-06-07  Richard Biener  <rguenther@suse.de>
8313         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8314         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
8315         Properly wrap signed arithmetic if overflow wraps.
8317 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
8319         PR tree-optimization/69615
8320         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8321         of a cast from a same precision integral SSA_NAME in a bb dominated
8322         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
8323         cast to utype if rhs2 has already a compatible type.
8325 2018-06-07  Richard Biener  <rguenther@suse.de>
8327         PR tree-optimization/85935
8328         * graphite-scop-detection.c (find_params_in_bb): Analyze
8329         condition operands with respect to the correct loop.  Assert
8330         the analysis doesn't fail.
8332 2018-06-04  Carl Love  <cel@us.ibm.com>
8334         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8335         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
8336         as it is slightly cheaper.
8337         (first_match_or_eos_index_<mode>):
8338         Calculate index using natural element order.
8339         (first_match_index_<mode>):
8340         Calculate index using natural element order.
8341         (first_match_or_eos_index_<mode>):
8342         Calculate index using natural order.
8343         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8344         for BE and LE modes.
8345         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8346         P9V_BUILTIN_VCLZLSBB_V16QI.
8347         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8348         specific.
8350 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8352         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8353         indentation and line wrap for many prototypes.  Add missing
8354         @smallexample directives around block of prototypes for vec_xl and
8355         vec_xst.
8357 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
8359         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8360         track if we pass or return IEEE 128-bit floating point.
8361         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8362         C++ mangling that is compatible with GCC 8.1.
8363         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8364         (init_cumulative_args): Note if we pass or return IEEE 128-bit
8365         floating point types.
8366         (rs6000_function_arg_advance_1): Likewise.
8367         (rs6000_mangle_type): Optionally generate mangled names that match
8368         what GCC 8.1 generated for IEEE 128-bit floating point types.
8369         (rs6000_globalize_decl_name): If we have an external function that
8370         passes or returns IEEE 128-bit types, generate a weak reference
8371         from the mangled name used in GCC 8.1 to the current mangled
8372         name.
8373         (rs6000_init_builtins): Make __ibm128 use the long double type if
8374         long double is IBM extended double.  Make __float128 use the long
8375         double type if long double is IEEE 128-bit.
8377         PR target/85657
8378         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8379         macro for __ibm128 built-in functions.
8380         (PACK_IF): Add __ibm128 pack/unpack functions.
8381         (UNPACK_IF): Likewise.
8382         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8383         enable long double built-in functions if long double is IEEE
8384         128-bit floating point.
8385         (rs6000_invalid_builtin): Update long double built-in function
8386         error message.
8387         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8388         functions, adjust the built-in function to use the long double
8389         built-in function if __ibm128 and long double are the same type.
8390         * doc/extend.texi (PowerPC builtins): Update documention for
8391         __builtin_{,un}pack_longdouble.  Add documentation for
8392         __builtin_{,un}pack_ibm128.
8394 2018-06-06  Jim Wilson  <jimw@sifive.com>
8396         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8397         (struct machine_function): New field interrupt_mode.
8398         (riscv_handle_type_attribute): New function.  Add forward declaration.
8399         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8400         (riscv_expand_epilogue): Check interrupt_mode field.
8401         (riscv_set_current_function): Check interrupt attribute args and
8402         set interrupt_mode field.
8403         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8404         (riscv_sret, riscv_uret): New.
8405         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8406         new arguments to interrupt attribute.
8408 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
8410         PR target/63177
8411         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8412         Don't handle -mcpu=power8 if -mpower9-vector is also used.
8414 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8416         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8417         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8418         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8419         several redundant entries.
8421 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
8423         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8424         type from "rtx" to "rtx_insn *".
8425         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8426         for local "call_insn", removing cast.
8427         (ix86_expand_call): Likewise, introducing a "call_insn" local.
8429 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8431         PR tree-optimization/86066
8432         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8433         for BIT_INSERT_EXPR stores.
8435 2018-06-06  Richard Biener  <rguenther@suse.de>
8437         PR tree-optimization/86062
8438         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8439         component refs ontop
8440         of to be offsetted base.
8442 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8444         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8445         to be static and remove check on interrupt attribute name.
8447 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8449         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8450         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8452 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
8454         PR target/79924
8455         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8456         second argument.
8457         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8458         Remove second argument, change how error is called.
8459         (aarch64_layout_arg): Remove second argument from
8460         aarch64_err_no_fpadvsimd call.
8461         (aarch64_init_cumulative_args): Ditto.
8462         (aarch64_gimplify_va_arg_expr): Ditto.
8463         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8465 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8467         * config/i386/i386.md (simple_return_indirect_internal): New expander.
8468         (*simple_return_indirect_internal<mode>): Rename from
8469         simple_return_indirect_internal.  Use W mode iterator.
8470         (rstorssp): New expander.
8471         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
8472         (clrssbsy): New expander.
8473         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
8475 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8477         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8478         __typeof__.
8479         (cmse_check_pointed_object): Likewise.
8481 2018-06-05  Martin Liska  <mliska@suse.cz>
8483         PR gcov-profile/47618
8484         * doc/invoke.texi: Document how -fprofile-dir format
8485         is extended.
8487 2018-06-05  Richard Biener  <rguenther@suse.de>
8489         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8490         removal pretend DOM info isn't available so we do not update
8491         it and only remove edges, not dominated blocks.  Actually free
8492         DOM info in case we removed something.  Remove unreachable blocks.
8493         (mfb_keep_latches): Work with either DOM info or marked backedges.
8494         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8495         first.  Mark backedges if DOM info isn't available.
8496         (Re-)compute DOM info after cleanup_control_flow_pre.
8498 2018-06-05  Richard Biener  <rguenther@suse.de>
8500         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8501         (locus_discrim_hasher::hash): Adjust.
8502         (locus_discrim_hasher::equal): Likewise.
8503         (next_discriminator_for_locus): Work on line directly.
8504         (same_line_p): Pass in expanded locus1 as well.
8505         (assign_discriminators): Avoid redundant location expansions.
8507 2018-06-05  Richard Biener  <rguenther@suse.de>
8509         PR tree-optimization/86046
8510         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8511         if required after clearing TREE_ADDRESSABLE.
8513 2018-06-05  Richard Biener  <rguenther@suse.de>
8515         PR tree-optimization/86047
8516         * tree-ssa-loop.c (for_each_index): Glob handling of all
8517         decls and constants and really handle all of them.
8519 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8521         PR target/81497
8522         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8523         qualifier_void_pointer and qualifier_const_void_pointer.
8524         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8525         (arm_init_builtins): Handle the above.
8526         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8527         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8528         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8529         void intrinsics.
8531 2018-06-05  Martin Liska  <mliska@suse.cz>
8533         * auto-profile.c (read_autofdo_file): Do not use
8534         gcov_ctr_summary struct.
8535         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8536         * coverage.c (struct counts_entry): Likewise.
8537         (read_counts_file): Read just single summary entry.
8538         (get_coverage_counts): Use gcov_summary struct.
8539         * coverage.h (get_coverage_counts): Likewise.
8540         * gcov-dump.c (dump_working_sets): Likewise.
8541         (tag_summary): Dump just single summary.
8542         * gcov-io.c (gcov_write_summary): Write just histogram
8543         summary.
8544         (gcov_read_summary): Read just single summary.
8545         (compute_working_sets): Use gcov_summary struct.
8546         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8547         of GCOV_COUNTERS_SUMMABLE.
8548         (GCOV_COUNTERS_SUMMABLE): Remove.
8549         (GCOV_FIRST_VALUE_COUNTER): Replace with
8550         GCOV_COUNTER_V_INTERVAL.
8551         (struct gcov_ctr_summary): Remove.
8552         (struct gcov_summary): Directly use fields of former
8553         gcov_ctr_summary.
8554         (compute_working_sets): Use gcov_summary struct.
8555         * gcov.c (read_count_file): Do not use ctrs fields.
8556         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8557         struct.
8558         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8559         struct.
8560         * profile.c: Likewise.
8561         * profile.h: Likewise.
8563 2018-06-05  Martin Liska  <mliska@suse.cz>
8565         PR gcov-profile/84846
8566         * gcov.c (output_lines): Print working directory only
8567         in intermediate format.
8569 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8571         * config/s390/s390-builtin-types.def: Add void function type.
8572         * config/s390/s390-builtins.def: Use the function type for the
8573         tbeginc builtin.
8575 2018-06-04  Jim Wilson  <jimw@sifive.com>
8577         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8578         to int.
8579         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8580         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8581         handle EH_RETURN_DATA_REGNO registers properly.
8582         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8583         (riscv_expand_epilogue): Update comment.  Change argument name and
8584         type.  Update code to use new name and type.  Pass new args to
8585         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8586         EXCEPTION_RETURN.
8587         * config/riscv/riscv.md (NORMAL_RETURN): New.
8588         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8589         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8590         (eh_return): Call gen_eh_return_internal and emit barrier.
8591         (eh_return_internal): Call riscv_expand_epilogue.
8593 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8595         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8596         bit_insertion field and declare can_be_merged_into method.
8597         (merged_store_group::can_be_merged_into): New method.
8598         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8599         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8600         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8602 2018-06-04  Richard Biener  <rguenther@suse.de>
8604         PR tree-optimization/85955
8605         * builtins.c (fold_builtin_sincos): Convert pointers to
8606         destination to appropriate type before dereferencing.
8608 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8610         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8612 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8614         * expr.c (expand_expr_real_1): Force the operand into memory if
8615         its TYPE_MODE is BLKmode and if there is no integer mode for
8616         the number of bits being extracted.
8618 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8620         PR target/85832
8621         PR target/86036
8622         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8623         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8625 2018-06-04  Richard Biener  <rguenther@suse.de>
8627         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8628         (cleanup_tree_cfg_noloop): ... single caller.  Do
8629         start_recording_case_labels later.
8631 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8633         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8634         to _IMMINTRIN_H_INCLUDED.
8635         * config/i386/pconfigintrin.h: Ditto.
8636         * config/i386/waitpkgintrin.h: Ditto.
8637         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8638         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8639         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8640         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8641         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8642         waitpkgintrin.h and cldemoteintrin.h.
8644 2018-06-04  Richard Biener  <rguenther@suse.de>
8646         PR tree-optimization/86038
8647         * tracer.c (find_best_successor): Check probability for
8648         being initialized, bail out if not.
8650 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8652         PR target/86003
8653         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8654         of bits to ignore when comparing architectures.
8656 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8658         PR tree-optimization/69615
8659         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8660         maximum or minimum of the type, try to merge it also as if
8661         range1 is + [-, x - 1] or + [x + 1, -].
8663         PR c++/86025
8664         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8666 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8668         PR tree-optimization/86034
8669         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8670         the unsigned bitfield type in a bit insertion sequence if it does not
8671         have a larger precision than the bitfield size.
8672         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8674 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8676         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8678 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8680         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8681         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8682         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8683         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8685 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8687         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8688         Disable -fdelete-null-pointer-checks for ELF toolchain.
8690 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8691             Kito Cheng  <kito.cheng@gmail.com>
8693         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8694         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8695         (nds32*-*-*): Add glibc and uclibc conditions.
8696         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8697         (TARGET_EXCEPT_UNWIND_INFO): Define.
8698         * config/nds32/elf.h: New file.
8699         * config/nds32/linux.h: New file.
8700         * config/nds32/nds32-elf.opt: New file.
8701         * config/nds32/nds32-linux.opt: New file.
8702         * config/nds32/nds32-fp-as-gp.c
8703         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8704         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8705         TARGET_LINUX_ABI.
8706         (nds32_asm_file_end): Ditto.
8707         (nds32_print_operand): Ditto.
8708         (nds32_insert_attributes): Ditto.
8709         (nds32_init_libfuncs): New function.
8710         (TARGET_HAVE_TLS): Define.
8711         (TARGET_INIT_LIBFUNCS): Define.
8712         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8713         spec content.
8714         (TARGET_ELF): Apply different mcmodel setting.
8715         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8716         been migrated into elf.h and linux.h files.
8717         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8718         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8719         (mcmodel): The content has been migrated into nds32-elf.opt and
8720         nds32-linux.opt files.
8721         * config/nds32/t-elf: New file.
8722         * config/nds32/t-linux: New file.
8724 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8725             Shiva Chen  <shiva0217@gmail.com>
8727         * config/nds32/constants.md (unspec_volatile_element): Add
8728         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8729         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8730         optimization.
8731         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8732         (make_pass_nds32_fp_as_gp): Declare.
8733         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8734         optmization pass.
8735         (nds32_asm_function_end_prologue): Remove unused asm output.
8736         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8737         (nds32_asm_file_start): Output necessary fp_as_gp information.
8738         (nds32_option_override): Adjust register usage.
8739         (nds32_expand_prologue): Consider fp_as_gp situation.
8740         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8741         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8742         (epilogue): Ditto.
8743         (return): Ditto.
8744         (simple_return): Ditto.
8745         (omit_fp_begin): Output special directive for fp_as_gp.
8746         (omit_fp_end): Output special directive for fp_as_gp.
8747         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8748         mforbid-fp-as-gp): New options.
8750 2018-06-01  Mark Wielaard  <mark@klomp.org>
8752         * dwarf2out.c (dwarf2out_finish): Remove generation of
8753         DW_AT_loclists_base.
8755 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8757         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8758         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8759         (struct merged_store_group): Add bit_insertion field.
8760         (dump_char_array): Use standard hexadecimal format.
8761         (merged_store_group::merged_store_group): Set bit_insertion to false.
8762         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8763         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8764         also print the mask in the dump file.
8765         (pass_store_merging::gate): Minor tweak.
8766         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8767         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8768         stores with INTEGER_CST stores.
8769         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8770         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8771         and use it throughout.  Generate bit insertion sequences if need be.
8772         (pass_store_merging::process_store): Remove redundant condition.
8773         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8775 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8777         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8778         the 128-bit floating point types.  Fix function comment.
8780 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8782         * config/aarch64/aarch64-simd.md
8783         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8784         mnemonics.
8785         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8786         mnemonics.
8788 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8790         PR tree-optimization/85989
8791         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8792         variable.
8793         (backprop::intersect_uses): Check it when deciding whether this
8794         is a backedge reference.
8795         (backprop::process_block): Add each phi to m_visited_phis
8796         after visiting it, then clear it at the end.
8798 2018-06-01  Richard Biener  <rguenther@suse.de>
8800         * tree-vectorizer.h (vect_dr_stmt): New function.
8801         (vect_get_load_cost): Adjust.
8802         (vect_get_store_cost): Likewise.
8803         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8804         Use vect_dr_stmt instead of DR_SMTT.
8805         (vect_record_base_alignments): Likewise.
8806         (vect_calculate_target_alignment): Likewise.
8807         (vect_compute_data_ref_alignment): Likewise and make static.
8808         (vect_update_misalignment_for_peel): Likewise.
8809         (vect_verify_datarefs_alignment): Likewise.
8810         (vector_alignment_reachable_p): Likewise.
8811         (vect_get_data_access_cost): Likewise.  Pass down
8812         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8813         (vect_get_peeling_costs_all_drs): Likewise.
8814         (vect_peeling_hash_get_lowest_cost): Likewise.
8815         (vect_enhance_data_refs_alignment): Likewise.
8816         (vect_find_same_alignment_drs): Likewise.
8817         (vect_analyze_data_refs_alignment): Likewise.
8818         (vect_analyze_group_access_1): Likewise.
8819         (vect_analyze_group_access): Likewise.
8820         (vect_analyze_data_ref_access): Likewise.
8821         (vect_analyze_data_ref_accesses): Likewise.
8822         (vect_vfa_segment_size): Likewise.
8823         (vect_small_gap_p): Likewise.
8824         (vectorizable_with_step_bound_p): Likewise.
8825         (vect_prune_runtime_alias_test_list): Likewise.
8826         (vect_analyze_data_refs): Likewise.
8827         (vect_supportable_dr_alignment): Likewise.
8828         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8829         (vect_gen_prolog_loop_niters): Likewise.
8830         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8831         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8832         modify DR_STMT.
8833         (vect_recog_mask_conversion_pattern): Likewise.
8834         (vect_try_gather_scatter_pattern): Likewise.
8835         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8836         to vect_get_store_cost.
8837         (vect_get_store_cost): Get stmt_info instead of DR.
8838         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8839         (vect_get_load_cost): Get stmt_info instead of DR.
8841 2018-06-01  Richard Biener  <rguenther@suse.de>
8843         PR middle-end/86017
8844         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8845         vars wrapped in MEM_REFs.
8847 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8849         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8850         Fix subreg tests so that we only return a choice between
8851         GENERAL_REGS and FP_REGS if the original classes included both.
8853 2018-06-01  Richard Biener  <rguenther@suse.de>
8855         PR ipa/85960
8856         * tree-ssa-structalias.c (get_function_part_constraint):
8857         Handle NULL fi->decl.
8858         (find_func_aliases_for_call): Properly handle indirect
8859         fi from direct call.
8860         (find_func_clobbers): Likewise.
8861         (ipa_pta_execute): Likewise.
8862         (create_variable_info_for): For functions that are ifunc_resolver
8863         resolve to a varinfo that contains the result of the resolver call.
8864         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8865         aliases.
8867 2018-05-31  Michael Collison  <michael.collison@arm.com>
8869         * config/aarch64/aarch64.md:
8870         (*fix_to_zero_extenddfdi2): New pattern.
8871         * gcc.target/aarch64/fix_extend1.c: New testcase.
8873 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8875         PR middle-end/78809
8876         PR middle-end/83026
8877         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8878         and BUILT_IN_STRNCMP_EQ.
8879         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8880         BUILT_IN_STRNCMP_EQ.
8881         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8882         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8883         (gimple_fold_builtin): Likewise.
8884         * tree-ssa-strlen.c (compute_string_length): New function.
8885         (determine_min_obsize): New function.
8886         (handle_builtin_string_cmp): New function to handle calls to
8887         string compare functions.
8888         (strlen_optimize_stmt): Add handling to builtin string compare
8889         calls.
8890         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8891         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8892         * tree.c (build_common_builtin_nodes): Add new defines of
8893         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8895 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8897         PR target/85984
8898         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8899         functions with naked attribute.
8901 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8903         * config/i386/sse.md (avx_vec_concat<mode>):
8904         Substitute concat_tg_mode mode attribute with xtg_mode.
8905         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8906         (concat_tg_mode): Remove mode attribute.
8908 2018-05-31  Martin Sebor  <msebor@redhat.com>
8910         PR c/82063
8911         * calls.c (alloc_max_size): Correct a logic error/typo.
8912         Treat excessive arguments as infinite.  Warn for invalid arguments.
8913         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8915 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8917         PR target/85829
8918         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8919         and movx for Haswell.
8921 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8922             Cesar Philippidis  <cesar@codesourcery.com>
8924         PR middle-end/85879
8925         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8926         when emitting error on private/firstprivate reductions.
8927         * omp-low.c (lower_omp_target): Avoid reference-type processing
8928         on pointers for firstprivate clause.
8930 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8932         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8933         (st1x2): Likewise.
8934         (st1x3): Likewise.
8935         * config/aarch64/aarch64-simd.md
8936         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8937         (aarch64_ld1_x3_<mode>): Likewise
8938         (aarch64_st1x2<VALLDIF:mode>): Likewise
8939         (aarch64_st1_x2_<mode>): Likewise
8940         (aarch64_st1x3<VALLDIF:mode>): Likewise
8941         (aarch64_st1_x3_<mode>): Likewise
8942         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8943         (vld1_s8_x3): Likewise.
8944         (vld1_u16_x3): Likewise.
8945         (vld1_s16_x3): Likewise.
8946         (vld1_u32_x3): Likewise.
8947         (vld1_s32_x3): Likewise.
8948         (vld1_u64_x3): Likewise.
8949         (vld1_s64_x3): Likewise.
8950         (vld1_f16_x3): Likewise.
8951         (vld1_f32_x3): Likewise.
8952         (vld1_f64_x3): Likewise.
8953         (vld1_p8_x3): Likewise.
8954         (vld1_p16_x3): Likewise.
8955         (vld1_p64_x3): Likewise.
8956         (vld1q_u8_x3): Likewise.
8957         (vld1q_s8_x3): Likewise.
8958         (vld1q_u16_x3): Likewise.
8959         (vld1q_s16_x3): Likewise.
8960         (vld1q_u32_x3): Likewise.
8961         (vld1q_s32_x3): Likewise.
8962         (vld1q_u64_x3): Likewise.
8963         (vld1q_s64_x3): Likewise.
8964         (vld1q_f16_x3): Likewise.
8965         (vld1q_f32_x3): Likewise.
8966         (vld1q_f64_x3): Likewise.
8967         (vld1q_p8_x3): Likewise.
8968         (vld1q_p16_x3): Likewise.
8969         (vld1q_p64_x3): Likewise.
8970         (vst1_s64_x2): Likewise.
8971         (vst1_u64_x2): Likewise.
8972         (vst1_f64_x2): Likewise.
8973         (vst1_s8_x2): Likewise.
8974         (vst1_p8_x2): Likewise.
8975         (vst1_s16_x2): Likewise.
8976         (vst1_p16_x2): Likewise.
8977         (vst1_s32_x2): Likewise.
8978         (vst1_u8_x2): Likewise.
8979         (vst1_u16_x2): Likewise.
8980         (vst1_u32_x2): Likewise.
8981         (vst1_f16_x2): Likewise.
8982         (vst1_f32_x2): Likewise.
8983         (vst1_p64_x2): Likewise.
8984         (vst1q_s8_x2): Likewise.
8985         (vst1q_p8_x2): Likewise.
8986         (vst1q_s16_x2): Likewise.
8987         (vst1q_p16_x2): Likewise.
8988         (vst1q_s32_x2): Likewise.
8989         (vst1q_s64_x2): Likewise.
8990         (vst1q_u8_x2): Likewise.
8991         (vst1q_u16_x2): Likewise.
8992         (vst1q_u32_x2): Likewise.
8993         (vst1q_u64_x2): Likewise.
8994         (vst1q_f16_x2): Likewise.
8995         (vst1q_f32_x2): Likewise.
8996         (vst1q_f64_x2): Likewise.
8997         (vst1q_p64_x2): Likewise.
8998         (vst1_s64_x3): Likewise.
8999         (vst1_u64_x3): Likewise.
9000         (vst1_f64_x3): Likewise.
9001         (vst1_s8_x3): Likewise.
9002         (vst1_p8_x3): Likewise.
9003         (vst1_s16_x3): Likewise.
9004         (vst1_p16_x3): Likewise.
9005         (vst1_s32_x3): Likewise.
9006         (vst1_u8_x3): Likewise.
9007         (vst1_u16_x3): Likewise.
9008         (vst1_u32_x3): Likewise.
9009         (vst1_f16_x3): Likewise.
9010         (vst1_f32_x3): Likewise.
9011         (vst1_p64_x3): Likewise.
9012         (vst1q_s8_x3): Likewise.
9013         (vst1q_p8_x3): Likewise.
9014         (vst1q_s16_x3): Likewise.
9015         (vst1q_p16_x3): Likewise.
9016         (vst1q_s32_x3): Likewise.
9017         (vst1q_s64_x3): Likewise.
9018         (vst1q_u8_x3): Likewise.
9019         (vst1q_u16_x3): Likewise.
9020         (vst1q_u32_x3): Likewise.
9021         (vst1q_u64_x3): Likewise.
9022         (vst1q_f16_x3): Likewise.
9023         (vst1q_f32_x3): Likewise.
9024         (vst1q_f64_x3): Likewise.
9025         (vst1q_p64_x3): Likewise.
9027 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9029         * config/msp430/msp430.c (msp430_output_labelref): Prepend
9030         user_label_prefix to name.
9032         * tree-core.h: Update comment about the format of NAME string
9033         passed to handler in attribute_spec.
9035         * config/msp430/msp430.md: Remove erroneous subreg expression from
9036         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9037         zero_extend{q,h}isi2.
9039 2018-05-30  Borislav Petkov  <bp@suse.de>
9041         * doc/extend.texi: Document some architecture specific
9042         constraints and sort entries.
9044 2018-05-30  Martin Sebor  <msebor@redhat.com>
9046         PR middle-end/85369
9047         * builtins.c (expand_builtin_stpcpy_1): New function.
9048         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9049         only if the former succeeds.
9051 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
9053         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9054         in saphira.
9056 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9058         * doc/invoke.texi (-flinker-output): Document
9060 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9062         * passes.c (ipa_write_summaries): Only modify statements if body
9063         is in memory.
9064         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9065         incrementally linking.
9066         (ipa_passes): Likewise.
9067         * lto-cgraph.c (lto_output_node): When incrementally linking do not
9068         pass down resolution info.
9069         * common.opt (flag_incremental_link): Update info.
9070         * gcc.c (plugin specs): Turn flinker-output=* to
9071         -plugin-opt=-linker-output-known
9072         * toplev.c (compile_file): Also cut compilation when doing incremental
9073         link.
9074         * flag-types. (enum lto_partition_model): Add
9075         LTO_LINKER_OUTPUT_NOLTOREL.
9076         (invoke.texi): Add -flinker-output docs.
9077         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9078         link same way as WPA; do not stream in dead initializers.
9080         * dwarf2out.c (dwarf2out_die_ref_for_decl,
9081         darf2out_register_external_decl): Support incremental link.
9083 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9085         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9087 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9089         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9090         it down to simple_object_copy_lto_debug_sections.
9091         (run_gcc): Determine incremental LTO link time and configure
9092         lto1 into non-wpa mode, disable renaming of debug sections.
9094 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9096         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9097         descriptions of various incorrectly documented functions.
9099 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9101         Revert:
9102         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9103         address check not strict.
9105 2018-05-30  Richard Biener  <rguenther@suse.de>
9107         PR tree-optimization/85964
9108         * tracer.c (better_p): Drop initialized count check, we only
9109         call the function with initialized counts now.
9110         (find_best_successor): Do find a best edge if one
9111         has uninitialized count.
9112         (find_best_predecessor): Likewise.  Do BB frequency check only
9113         if count is initialized.
9115 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
9117         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9118         (aarch64_ldrstr_offset_compare): New.
9119         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9120         load/store orderings.
9121         (aarch64_gen_adjusted_ldpstp): Likewise.
9123 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
9125         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9126         Check for subset of GENERAL_REGS and FP_REGS.
9127         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9128         r=w alternative.
9130 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
9132         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9133         and wi::to_poly_offset.  Add the current offset and then check
9134         whether the sum fits, rather than using an unchecked addition of
9135         a checked term.  Check for a shwi rather than a uhwi.
9136         * expr.c (get_bit_range): Use tree_to_poly_uint64.
9137         (store_constructor): Use poly_int_tree_p.
9138         (expand_expr_real_1): Likewise.
9139         * function.c (assign_temp): Likewise.
9140         * fold-const.c (const_binop): Use poly_int_tree_p and
9141         wi::to_poly_offset.
9142         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
9143         division.
9144         * ipa-icf-gimple.c (func_checker::compare_operand): Use
9145         to_poly_offset for MEM offsets.
9146         * ipa-icf.c (sem_variable::equals): Likewise.
9147         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9148         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9149         wi::to_poly_offset for BIT_FIELD_REF offsets.
9150         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9151         wi::to_poly_offset.
9152         * var-tracking.c (emit_note_insn_var_location): Use
9153         tree_to_poly_uint64.
9155 2018-05-29  Jim Wilson  <jimw@sifive.com>
9157         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9159 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
9161         PR target/85950
9162         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9163         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9164         sequence.
9165         (sse4_1_round<mode>2): Use nonimmediate_operand
9166         for operand 1 predicate.
9168 2018-05-29  Martin Sebor  <msebor@redhat.com>
9169             Richard Biener  <rguenther@suse.de>
9171         PR testsuite/85888
9172         * calls.c (get_size_range): Call determine_value_range instead
9173         of get_value_range..
9174         * tree-vrp.h (determine_value_range): Declared new function.
9175         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9177 2018-05-29  Richard Biener  <rguenther@suse.de>
9179         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9180         sure to use non-pattern stmts for get_earlier_stmt arguments.
9181         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9182         called on pattern stmts.
9183         (get_later_stmt): Likewise.
9185 2018-05-29  Martin Liska  <mliska@suse.cz>
9187         PR gcov-profile/85759
9188         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9189         env variables.
9191 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
9193         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9194         VEC_UNPACK_*_EXPR.
9195         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9196         VEC_PACK_*_EXPR.
9198         PR target/85918
9199         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9200         VEC_PACK_FLOAT_EXPR): New tree codes.
9201         * tree-pretty-print.c (op_code_prio): Handle
9202         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9203         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9204         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9205         * tree-inline.c (estimate_operator_cost): Likewise.
9206         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9207         * fold-const.c (const_binop): Likewise.
9208         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9209         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9210         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9211         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9212         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9213         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9214         * expr.c (expand_expr_real_2): Likewise.
9215         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9216         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9217         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9218         optabs.
9219         * optabs.c (expand_widen_pattern_expr): For
9220         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9221         sign from result type rather than operand's type.
9222         (expand_binop_directly): For vec_packu_float_optab and
9223         vec_packs_float_optab allow result type to be different from operand's
9224         type.
9225         * optabs-tree.c (optab_for_tree_code): Handle
9226         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9227         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
9228         * tree-vect-generic.c (expand_vector_operations_1):  Handle
9229         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9230         VEC_PACK_FLOAT_EXPR.
9231         * tree-vect-stmts.c (supportable_widening_operation): Handle
9232         FIX_TRUNC_EXPR.
9233         (supportable_narrowing_operation): Handle FLOAT_EXPR.
9234         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9235         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9236         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
9237         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9238         mode attributes.
9239         (vec_pack<floatprefix>_float_<mode>): New expander.
9240         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9241         attributes.
9242         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9243         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9244         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9245         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9246         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9247         Document.
9248         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9249         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9250         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9251         VEC_PACK_FLOAT_EXPR): Document.
9253 2018-05-29  Richard Biener  <rguenther@suse.de>
9255         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9256         member.
9257         (stmt_vec_info_vec): Make pointer.
9258         (init_stmt_vec_info_vec): Remove.
9259         (free_stmt_vec_info_vec): Likewise.
9260         (set_stmt_vec_info_vec): New function.
9261         (free_stmt_vec_infos): Likewise.
9262         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9263         (set_vinfo_for_stmt): Likewise.
9264         (get_earlier_stmt): Likewise.
9265         (get_later_stmt): Likewise.
9266         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9267         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9268         (vec_info::~vec_info): Free stmt_vec_infos.
9269         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9270         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9271         (pass_slp_vectorize::execute): Likewise.
9272         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9273         (free_stmt_vec_info_vec): Likewise.
9274         (set_stmt_vec_info_vec): New function.
9275         (free_stmt_vec_infos): Likewise.
9276         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9277         the global stmt_vec_info_vec.
9278         * tree-parloops.c (gather_scalar_reductions): Use
9279         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9280         vector.
9282 2018-05-29  Richard Biener  <rguenther@suse.de>
9284         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9286 2018-05-29  Martin Liska  <mliska@suse.cz>
9287             David Malcolm  <dmalcolm@redhat.com>
9289         * vec.c (test_reverse): New.
9290         (vec_c_tests): Add new test.
9291         * vec.h (vl_ptr>::reverse): New function.
9293 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
9295         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9297         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9298         and later.
9300 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9302         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9304 2018-05-28  Richard Biener  <rguenther@suse.de>
9306         PR tree-optimization/85933
9307         * tree-vect-data-refs.c (vect_record_base_alignments): Only
9308         look at stmts marked as vectorizable.
9310 2018-05-28  Richard Biener  <rguenther@suse.de>
9312         PR tree-optimization/85934
9313         * tree-vect-generic.c (expand_vector_operations_1): Hoist
9314         vector boolean check before scalar optimization.
9316 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
9318         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9319         for armv5te.
9321 2018-05-28  Mark Wielaard  <mark@klomp.org>
9323         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9324         if it is an expression containing a minus sign.
9326 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
9328         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9330 2018-05-27  Paul Koning  <ni1d@arrl.net>
9332         * config/pdp11/pdp11.md (truncsihi2): Remove.
9334 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
9335             Chung-Ju Wu  <jasonwucj@gmail.com>
9337         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9338         implementation.
9339         (unaligned_store_dw): Ditto.
9340         * config/nds32/nds32-memory-manipulation.c
9341         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9342         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9343         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9344         (emit_setmem_word_loop): Rename to ...
9345         (emit_setmem_doubleword_loop): ... this.
9346         (nds32_gen_dup_4_byte_to_word_value): New function.
9347         (nds32_gen_dup_8_byte_to_double_word_value): New function.
9348         (nds32_expand_setmem_loop): Refine implementation.
9349         (nds32_expand_setmem_loop_v3m): Ditto.
9350         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9351         pattern.
9353 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9355         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9357 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9359         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9360         (nds32_init_machine_status): Initialize machine->attr_naked_p and
9361         machine->attr_no_prologue_p.
9362         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9363         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9364         (nds32_expand_epilogue): Consider attr_naked_p.
9365         (nds32_expand_epilogue_v3pop): Likewise.
9366         (nds32_can_use_return_insn): Likewise.
9367         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9368         attr_no_prologue_p fields.
9369         * config/nds32/nds32.opt (mret-in-naked-func): New option.
9371 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
9373         PR target/85918
9374         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9375         attributes.
9376         * config/i386/sse.md
9377         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9378         Rename to ...
9379         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9380         ... this.
9381         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9382         Rename to ...
9383         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9384         ... this.
9385         (*<floatsuffix>floatv2div2sf2): Rename to ...
9386         (*float<floatunssuffix>v2div2sf2): ... this.
9387         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9388         (float<floatunssuffix>v2div2sf2_mask): ... this.
9389         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9390         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9391         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9392         to ...
9393         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9394         ... this.
9395         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9396         Rename to ...
9397         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9398         ... this.
9399         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9400         Rename to ...
9401         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9402         ... this.
9403         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9404         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9405         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9406         gen_ufix_truncv8dfv8si2.
9407         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9408         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9409         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9410         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9411         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9412         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9413         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9414         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9416 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9418         PR target/85900
9419         PR target/85345
9420         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9422 2018-05-25  Jim Wilson  <jimw@sifive.com>
9424         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9425         * config/riscv/riscv.c (struct machine_function): Add
9426         interrupt_handler_p and attribute_checked_p fields.
9427         (riscv_attribute_table): Add interrupt.
9428         (riscv_interrupt_type_p): New.
9429         (riscv_save_reg_p): Save extra regs for interrupt handler.
9430         (riscv_use_save_libcall): Return false  for interrupt handler.
9431         (riscv_first_stack_step): Add forward declaration.
9432         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
9433         for interrupt handler with large frame.  Use it for saved reg list.
9434         (riscv_expand_prologue): Move flag_stack_usage_info support to
9435         eliminate duplication.
9436         (riscv_expand_epilogue): Generate mret for interrupt handler.
9437         (riscv_epilogue_uses): New.
9438         (riscv_can_use_return_insn): Return false for interrupt handler.
9439         (riscv_function_ok_for_sibcall): Likewise.
9440         (riscv_set_current_function): Add interrupt handler support.
9441         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9442         * config/riscv/riscv.md (UNSPECV_MRET): New.
9443         (GP_REGNUM): New.
9444         (riscv_frflags, riscv_fsflags): Use tab after opcode.
9445         (riscv_mret): New.
9446         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9448 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
9450         PR tree-optimization/85712
9451         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9452         this candidate has already been replaced in-situ by a copy.
9454 2018-05-25  Jason Merrill  <jason@redhat.com>
9456         PR c++/80485 - inline function non-zero address.
9457         * symtab.c (nonzero_address): Check DECL_COMDAT.
9459 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9461         PR target/83628
9462         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9463         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9464         extension of SImode operation.  Use const123_operand predicate.
9465         (*saddsi_1): Remove.
9466         (*saddl_se_1): Ditto.
9467         (*ssubsi_1): Ditto.
9468         (*ssubl_se_1): Ditto.
9469         * config/alpha/predicates.md (const123_operand): New predicate.
9470         * config/alpha/constraints.md (P): Use IN_RANGE.
9472 2018-05-25  Richard Biener  <rguenther@suse.de>
9474         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9475         defaulted to true.
9476         (ref_maybe_used_by_stmt_p): Likewise.
9477         (stmt_may_clobber_ref_p): Likewise.
9478         (stmt_may_clobber_ref_p_1): Likewise.
9479         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9480         and pass it along.
9481         (ref_maybe_used_by_stmt_p): Likewise.
9482         (stmt_may_clobber_ref_p): Likewise.
9483         (stmt_may_clobber_ref_p_1): Likewise.
9484         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9485         the alias oracle to disambiguate DRs with stmts DR analysis
9486         couldn't handle.
9487         (vect_analyze_data_refs): Do not give up on not analyzable
9488         DRs for BB vectorization.  Remove code truncating the dataref
9489         vector.
9491 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9493         PR target/85832
9494         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9495         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9496         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9498 2018-05-25  Richard Biener  <rguenther@suse.de>
9500         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9501         function, combining stmt data ref gathering and fatal analysis
9502         parts.
9503         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9504         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9505         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9506         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9507         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9509 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9511         PR tree-optimization/85720
9512         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9513         SCC if all partitions are builtins.
9514         (version_loop_by_alias_check): New parameter.  Generate cancelable
9515         runtime alias check if all partitions are builtins.
9516         (distribute_loop): Update call to above function.
9518 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9520         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9521         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9522         (parm_default_def_partition_arg): Ditto.
9523         (set_parm_default_def_partition): Ditto.
9524         (get_parm_default_def_partitions): Ditto and make it static.
9525         (get_undefined_value_partitions): Ditto and make it static.
9526         (remove_ssa_form): Refactor call to init_var_map here.
9527         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9528         computation for loop region.
9529         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9530         (register_default_def): Delete.
9531         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9532         (parm_default_def_partition_arg): Ditto.
9533         (set_parm_default_def_partition): Ditto.
9534         (get_parm_default_def_partitions): Ditto and make it static.
9535         (get_undefined_value_partitions): Ditto and make it static.
9536         (coalesce_with_default, coalesce_with_default): Update comment.
9537         (create_coalesce_list_for_region): New func factored out from
9538         create_outofssa_var_map.
9539         (populate_coalesce_list_for_outofssa): New func factored out from
9540         create_outofssa_var_map and coalesce_ssa_name.
9541         (create_outofssa_var_map): Delete.
9542         (coalesce_ssa_name): Refactor to support live range computation.
9543         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9544         (get_parm_default_def_partitions): Delete.
9545         (get_undefined_value_partitions): Ditto.
9546         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9547         computation for loop region.
9548         (new_tree_live_info, loe_visit_block): Ditto.
9549         (live_worklist, set_var_live_on_entry): Ditto.
9550         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9551         * tree-ssa-live.h (struct _var_map): New fields.
9552         (init_var_map): Change decl.
9553         (region_contains_p): New.
9555 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9557         * tree-ssa-live.h (live_merge_and_clear): Delete.
9559 2018-05-25  Richard Biener  <rguenther@suse.de>
9561         PR c++/85912
9562         * tree-dump.c (dequeue_and_dump): Remove access to removed
9563         operand 2 of a SWITCH_EXPR.
9565 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9567         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9568         multiplication and division.
9569         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9570         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9571         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9572         (cond_udiv_optab, cond_umod_optab): New optabs.
9573         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9574         (IFN_COND_RDIV): New internal functions.
9575         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9576         TRUNC_MOD_EXPR and RDIV_EXPR.
9577         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9578         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9579         New unspecs.
9580         (SVE_INT_BINARY): Include mult.
9581         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9582         (optab, sve_int_op): Handle mult.
9583         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9584         UNSPEC_COND_DIV.
9585         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9586         for SVE_INT_BINARY_SD.
9588 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9590         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9591         (optab, sve_int_op): Handle div and udiv.
9592         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9593         for SVE_INT_BINARY_SD.
9594         (*<optab><mode>3): New insn for the same.
9596 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9598         * tree-vect-patterns.c: Include predict.h.
9599         (vect_recog_divmod_pattern): Restrict check for division support
9600         to when optimizing for size.
9602 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9604         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9605         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9606         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9607         (gimple_match_op::set_op): Likewise.
9608         (gimple_resimplify4): Declare.
9609         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9610         (expr::gen_transform): Likewise.
9611         (decision_tree::gen): Generate a simplification routine for 4 operands.
9612         * gimple-match-head.c (gimple_simplify): Add an overload for
9613         4 operands.  In the top-level function, handle up to 4 call
9614         arguments and call gimple_resimplify4.
9615         (gimple_resimplify4): New function.
9616         (build_call_internal): Pass a fourth operand.
9617         (maybe_push_to_seq): Likewise.
9618         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9619         Fold VEC_COND_EXPRs of an operation and a default value into
9620         an IFN_COND_* function if possible.
9621         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9622         New unspecs.
9623         (SVE_COND_FP_BINARY): Include them.
9624         (optab, sve_fp_op): Handle them.
9625         (SVE_INT_BINARY_REV): New code iterator.
9626         (SVE_COND_FP_BINARY_REV): New int iterator.
9627         (commutative): New int attribute.
9628         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9629         Declare.
9630         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9631         function.
9632         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9633         (*cond_<optab><mode>): New patterns for reversed operands.
9635 2018-05-25  Richard Biener  <rguenther@suse.de>
9637         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9638         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9639         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9640         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9641         * tree-vect-data-refs.c (everywhere): Adjust users.
9642         * tree-vect-loop.c (everywhere): Likewise.
9643         * tree-vect-slp.c (everywhere): Likewise.
9644         * tree-vect-stmts.c (everywhere): Likewise.
9645         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9647 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9649         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9650         Rename to...
9651         (gcc_cv_as_section_exclude): ... this.
9652         Try Solaris as #exclude syntax.
9653         * configure: Regenerate.
9654         * config.in: Regenerate.
9655         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9656         SECTION_EXCLUDE.
9657         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9658         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9660         * varasm.c (default_elf_asm_named_section): Don't check if
9661         HAVE_GAS_SECTION_EXCLUDE is defined.
9663 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9665         * doc/md.texi: Update the documentation of the cond_* optabs
9666         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9667         Describe the scalar case too.
9668         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9669         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9670         instead of 2.
9671         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9672         (get_conditional_internal_fn): Update comment.
9673         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9674         accumulator value as a final argument to conditional functions.
9675         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9676         a define_expand and add an "else" operand.  Assert for now that
9677         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9678         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9679         (*cond_<optab><mode>): New patterns.
9680         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9681         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9682         (UNSPEC_COND_EOR): Delete.
9683         (optab): Remove associated mappings.
9684         (SVE_INT_BINARY): New code iterator.
9685         (sve_int_op): Remove int attribute and add "minus" to the code
9686         attribute.
9687         (SVE_COND_INT_OP): Delete.
9688         (SVE_COND_FP_OP): Rename to...
9689         (SVE_COND_FP_BINARY): ...this.
9691 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9693         * optabs.c (can_reuse_operands_p): New function.
9694         (maybe_legitimize_operands): Try to reuse the results for
9695         earlier operands.
9697 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9699         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9700         Add {q} suffix to insn mnemonic.
9702 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9704         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9705         (msp430_warn_func_return): New.
9707 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9709         * fold-const.c (tree_nonzero_bits): New function.
9710         * fold-const.h (tree_nonzero_bits): Likewise.
9711         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9712         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9714 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9716         PR target/85900
9717         PR target/85345
9718         * varasm.c (assemble_alias): Check ifunc_resolver only on
9719         FUNCTION_DECL.
9721 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9723         PR target/85903
9724         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9725         when memory input operand is handled.
9727 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9729         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9730         global.
9731         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9733 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9735         * match.pd: Delay FMA folds until after vectorization.
9737 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9739         PR target/83009
9740         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9741         address check not strict.
9743 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9745         * gimple-match.h (gimple_match_op): New class.
9746         (mprts_hook): Replace parameters with a gimple_match_op *.
9747         (maybe_build_generic_op): Likewise.
9748         (gimple_simplified_result_is_gimple_val): Replace parameters with
9749         a const gimple_match_op *.
9750         (gimple_simplify): Replace code_helper * and tree * parameters with
9751         a gimple_match_op * parameter.
9752         (gimple_resimplify1): Replace code_helper *, tree and tree *
9753         parameters with a gimple_match_op * parameter.
9754         (gimple_resimplify2): Likewise.
9755         (gimple_resimplify3): Likewise.
9756         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9757         parameters with a gimple_match_op * parameter.
9758         * gimple-match-head.c (gimple_simplify): Change prototypes of
9759         auto-generated functions to take a gimple_match_op * instead of
9760         separate code_helper * and tree * parameters.  Make the same
9761         change in the top-level overload and update calls to the
9762         gimple_resimplify routines.  Update calls to the auto-generated
9763         functions and to maybe_push_res_to_seq in the publicly-facing
9764         operation-specific gimple_simplify overloads.
9765         (gimple_match_op::MAX_NUM_OPS): Define.
9766         (gimple_resimplify1): Replace rcode and ops with a single res_op
9767         parameter.  Update call to gimple_simplify.
9768         (gimple_resimplify2): Likewise.
9769         (gimple_resimplify3): Likewise.
9770         (mprts_hook): Replace parameters with a gimple_match_op *.
9771         (maybe_build_generic_op): Likewise.
9772         (build_call_internal): Replace type, nargs and ops with
9773         a gimple_match_op *.
9774         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9775         with a single gimple_match_op *.  Update calls to mprts_hook,
9776         build_call_internal and gimple_simplified_result_is_gimple_val.
9777         Factor out code that is common to the tree_code and combined_fn cases.
9778         * genmatch.c (expr::gen_transform): Replace tem_code and
9779         tem_ops with a gimple_match_op called tem_op.  Update calls
9780         to the gimple_resimplify functions and maybe_push_res_to_seq.
9781         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9782         res_ops.  Update call to the gimple_resimplify functions.
9783         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9784         (decision_tree::gen): Make the functions take a gimple_match_op *
9785         called res_op instead of separate res_code and res_ops parameters.
9786         Update call accordingly.
9787         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9788         and ops with a single res_op parameter.  Update calls to
9789         maybe_build_generic_op and maybe_push_res_to_seq.
9790         (fold_stmt_1): Update calls to gimple_simplify and
9791         replace_stmt_with_simplification.
9792         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9793         and gimple_simplified_result_is_gimple_val.
9794         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9795         gimple_simplify.
9796         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9797         with a gimple_match_op *.
9798         (vn_nary_build_or_lookup): Likewise.  Update call to
9799         vn_nary_build_or_lookup_1.
9800         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9801         gimple_match_op *.  Update calls to the gimple_resimplify routines
9802         and to gimple_simplified_result_is_gimple_val.
9803         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9804         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9805         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9806         (visit_nary_op): Likewise.
9807         (visit_reference_op_load): Likewise.
9809 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9811         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9812         modifier for printing the step amount.
9814 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9816         PR target/78849
9817         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9818         types.
9820 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9822         * doc/sourcebuild.texi (Endianness): New subsubsection.
9824 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9826         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9827         <prefetch_dynamic_strides>: New const bool field.
9828         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9829         prefetch_dynamic_strides.
9830         (exynosm1_prefetch_tune): Likewise.
9831         (thunderxt88_prefetch_tune): Likewise.
9832         (thunderx_prefetch_tune): Likewise.
9833         (thunderx2t99_prefetch_tune): Likewise.
9834         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9835         false.
9836         (aarch64_override_options_internal): Update to set
9837         PARAM_PREFETCH_DYNAMIC_STRIDES.
9838         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9839         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9840         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9841         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9842         prefetch-dynamic-strides setting.
9844 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9846         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9847         <minimum_stride>: New const int field.
9848         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9849         minimum_stride field defaulting to -1.
9850         (exynosm1_prefetch_tune): Likewise.
9851         (thunderxt88_prefetch_tune): Likewise.
9852         (thunderx_prefetch_tune): Likewise.
9853         (thunderx2t99_prefetch_tune): Likewise.
9854         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9855         <default_opt_level>: Set to 3.
9856         (aarch64_override_options_internal): Update to set
9857         PARAM_PREFETCH_MINIMUM_STRIDE.
9858         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9859         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9860         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9861         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9862         stride is constant and is below the minimum stride threshold.
9864 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9866         * config/arm/arm-cpus.in (mode26): Delete.
9867         (armv4): Delete mode26 reference.
9868         * config/arm/arm.c (arm_configure_build_target): Delete use of
9869         isa_bit_mode26.
9871 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9873         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9874         New insn pattern.
9875         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9876         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9877         for non-SSE modes.
9878         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9879         (floatunsdidf2): Ditto.
9881 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9883         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9884         (fixuns_trunc<mode>si2_avx512f): Ditto.
9885         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9886         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9887         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9889 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9891         PR rtl-optimization/79985
9892         * df-scan.c (df_insn_refs_collect): Remove special case for
9893         global registers and asm statements.
9895 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9897         * extend.texi (Global Register Variables): Rewrite the bullet list.
9898         Note that the register is available for allocation. Note that access
9899         via inline asm must use constraints. Add note about async-signal
9900         handlers. Remove paragraph about automagic register selection.
9902 2018-05-23  Richard Biener  <rguenther@suse.de>
9904         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9905         of fixed offset from memset VN.
9907 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9909         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9910         first_interp field.
9911         (alloc_cand_and_find_basis): Initialize first_interp field.
9912         (slsr_process_mul): Modify first_interp field.
9913         (slsr_process_add): Likewise.
9914         (slsr_process_cast): Modify first_interp field for each new
9915         interpretation.
9916         (slsr_process_copy): Likewise.
9917         (dump_candidate): Dump first_interp field.
9918         (replace_mult_candidate): Process all interpretations, not just
9919         subsequent ones.
9920         (replace_rhs_if_not_dup): Likewise.
9921         (replace_one_candidate): Likewise.
9923 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9925         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9926         Add new boolean.
9927         (aarch64_needs_frame_chain): New function.
9928         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9930 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9932         PR target/84882
9933         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9934         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9935         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9936         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9937         as true for strict-align.
9938         (aarch64_can_inline_p): Perform checks even when callee has no
9939         attributes to check for strict alignment.
9940         * doc/extend.texi (AArch64 Function Attributes): Document
9941         no-strict-align.
9942         * doc/invoke.texi: (AArch64 Options): Likewise.
9944 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9946         PR tree-optimization/85853
9947         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9948         the handling of the root of the node to...
9949         (vect_slp_analyze_node_operations_1): ...this new function,
9950         and run the whole thing with the child nodes' def types
9951         set according to their SLP node's def type.
9953 2018-05-23  Richard Biener  <rguenther@suse.de>
9955         PR middle-end/85874
9956         * tree-data-ref.c (create_runtime_alias_checks): Defer
9957         and ignore overflow warnings.
9959 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9961         PR tree-optimization/85822
9962         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9963         constants.
9965 2018-05-23  Richard Biener  <rguenther@suse.de>
9967         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9968         memset constants via native_interpret_expr.
9970 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9972         PR target/85345
9973         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9974         attribute.
9975         (cgraph_node::create_alias): Likewise.
9976         (cgraph_node::get_availability): Check ifunc_resolver instead
9977         of looking up ifunc attribute.
9978         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9979         * varasm.c (do_assemble_alias): Likewise.
9980         (assemble_alias): Likewise.
9981         (default_binds_local_p_3): Likewise.
9982         * cgraph.h (cgraph_node): Add ifunc_resolver.
9983         (cgraph_node::only_called_directly_or_aliased_p): Return false
9984         for IFUNC resolver.
9985         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9986         attribute.
9987         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9988         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9989         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9990         instead of looking up ifunc attribute.
9992 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9994         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9996 2018-05-22  Martin Sebor  <msebor@redhat.com>
9998         PR middle-end/85359
9999         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10000         only when expasion succeeds.
10001         (expand_builtin_strcmp): Same.
10002         (expand_builtin_strncmp): Same.
10004 2018-05-22  Martin Sebor  <msebor@redhat.com>
10006         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10008 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10009             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10011         * config/aarch64/aarch64-ldpstp.md: Replace uses of
10012         aarch64_mem_pair_operand with memory_operand and delete operand swapping
10013         code.
10014         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10015         Add check for legitimate_address.
10016         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10017         (aarch64_swap_ldrstr_operands): New.
10018         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10019         Define prototype.
10021 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10022             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10024         * config/aarch64/aarch64.md: New patterns to generate stp
10025         and ldp.
10026         (store_pair_sw, store_pair_dw): New patterns to generate stp for
10027         single words and double words.
10028         (load_pair_sw, load_pair_dw): Likewise.
10029         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10030         Delete.
10031         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10032         Delete.
10033         * config/aarch64/aarch64-ldpstp.md: Modify peephole
10034         for different mode ldpstp and add peephole for merged zero stores.
10035         Likewise for loads.
10036         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10037         Add size check.
10038         (aarch64_gen_store_pair): Rename calls to match new patterns.
10039         (aarch64_gen_load_pair): Rename calls to match new patterns.
10040         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10041         (load_pair<DREG:mode><DREG2:mode>): ... This.
10042         (store_pair<mode>): Rename to...
10043         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10044         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10045         New mode iterators.
10046         (V_INT_EQUIV): Handle SImode.
10047         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10048         New predicate.
10050 2018-05-22  Martin Sebor  <msebor@redhat.com>
10052         PR c/85623
10053         * calls.c (maybe_warn_nonstring_arg): Use string length to set
10054         or ajust the presumed bound on an operation to avoid unnecessary
10055         warnings.
10057 2018-05-22  Martin Sebor  <msebor@redhat.com>
10059         PR tree-optimization/85826
10060         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10061         assuming that a DECL necesarily has a constant size.
10063 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
10065         PR middle-end/85862
10066         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10068 2018-05-22  Richard Biener  <rguenther@suse.de>
10070         PR tree-optimization/85834
10071         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10072         non-constant and non-zero memset arguments.
10074 2018-05-22  Martin Liska  <mliska@suse.cz>
10076         PR ipa/85607
10077         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10079 2018-05-22  Richard Biener  <rguenther@suse.de>
10081         PR tree-optimization/85863
10082         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10083         comparisons when vectype is specified.
10084         (vectorizable_condition): Do not specify vectype for
10085         vect_is_simple_cond when SLP vectorizing.
10087 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
10089         PR target/85657
10090         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10091         define __ibm128 as long double.
10092         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10093         as a distinct type when IEEE 128-bit support is enabled.
10094         (init_float128_ieee): Fix up conversions between IFmode and IEEE
10095         128-bit types to use the correct functions.
10096         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10097         convert between 128-bit floating point types that have different
10098         modes but the same representation, instead of using gen_lowpart to
10099         makean alias.
10100         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10101         KFmode.
10102         (IFKF_reg): New attributes to give the register constraints for
10103         IFmode and KFmode.
10104         (extend<mode>tf2_internal): New insns to mark an explicit
10105         conversion between 128-bit floating point types that have a
10106         different mode but share the same representation.
10108 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
10110         PR tree-optimization/85814
10111         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10112         a null return from get_strinfo when unsharing the next
10113         strinfo in the chain.
10115 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10117         PR gcc/84923
10118         * varasm.c (weak_finish): Clean up weak_decls.
10120 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10122         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10123         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10124         UNSPEC_UADALP values.
10125         * config/aarch64/iterators.md (ABAL): New int iterator.
10126         (ABDL2): Likewise.
10127         (ADALP): Likewise.
10128         (sur): Add mappings for the above.
10129         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10130         New define_insn.
10131         (aarch64_<sur>abal<mode>_4): Likewise.
10132         (aarch64_<sur>adalp<mode>_3): Likewise.
10133         (<sur>sadv16qi): New define_expand.
10135 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
10137         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10138         (*movdf_internal): Ditto.
10139         (*rcpsf2_sse): Ditto.
10140         (*rsqrtsf2_sse): Ditto.
10141         (*sqrt<mode>2_sse): Ditto.
10143 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
10145         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10146         eor3q<mode>4.
10147         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10148         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10149         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10150         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10151         vbcaxq_s64): New.
10152         * config/aarch64/arm_neon.h: Likewise.
10153         * config/aarch64/iterators.md (VQ_I): New.
10155 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
10157         * config.gcc: Add arc/t-multilib-linux to tmake_file for
10158         arc*-*-linux*.
10159         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10160         MULTILIB_DIRNAMES
10162 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10164         * config/nds32/constraints.md (S): New constraint.
10165         * config/nds32/nds32.md (call_internal): Use constraint S.
10166         (call_value_internal): Likewise.
10167         (sibcall_internal): Likewise.
10168         (sibcall_value_internal): Likewise.
10170 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10171             Chung-Ju Wu  <jasonwucj@gmail.com>
10173         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10174         into consideration.
10176 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10177             Chung-Ju Wu  <jasonwucj@gmail.com>
10179         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10180         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10181         (nds32_rtx_costs_impl): Simplify.
10182         (nds32_address_cost_impl): Simplify.
10183         (nds32_init_rtx_costs): New function.
10184         (nds32_rtx_costs_speed_prefer): Likewise.
10185         (nds32_rtx_costs_size_prefer): Likewise.
10186         (nds32_address_cost_speed_prefer): Likewise.
10187         (nds32_address_cost_speed_fwprop): Likewise.
10188         (nds32_address_cost_size_prefer): Likewise.
10189         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10190         * config/nds32/nds32.c (nds32_option_override): Use
10191         nds32_init_rtx_costs function.
10193 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10195         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10196         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10197         (TARGET_PIPELINE_N8): Likewise.
10198         (TARGET_PIPELINE_N10): Likewise.
10199         (TARGET_PIPELINE_N13): Likewise.
10200         (TARGET_PIPELINE_GRAYWOLF): Likewise.
10202 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
10204         * config/nds32/nds32-fpu.md: Update copyright year.
10206 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10208         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10210 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10212         * config/nds32/nds32.c
10213         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10214         * config/nds32/nds32.opt (minline-asm-r15): New option.
10216 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10218         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10219         MASK_HW_ABS.
10220         * config/nds32/nds32.md (abssi2): New pattern.
10222 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
10224         * config/i386/i386.md (rex64namesuffix): New mode attribute.
10225         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10226         Merge insn pattern from sse_cvtsi2ss<round_name> and
10227         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10228         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10229         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10230         using SWI48 mode iterator.
10231         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10232         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10233         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10234         pattern from sse_cvttss2si<round_saeonly_name>
10235         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10236         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10237         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10238         using SWI48 mode iterator.
10239         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10240         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10241         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10242         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10243         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10244         using SWI48 mode iterator.
10245         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10246         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10247         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10248         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10249         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10250         SWI48 mode iterator.
10251         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10252         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10253         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10254         pattern from sse_cvttsd2si<round_saeonly_name>
10255         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10257 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10259         * config/nds32/nds32-md-auxiliary.c
10260         (nds32_valid_smw_lwm_base_p): Refine.
10261         (nds32_output_smw_single_word): Refine.
10262         (nds32_output_smw_double_word): New.
10263         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10265 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10267         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10268         (nds32_output_stack_pop): Refine.
10269         (nds32_expand_unaligned_load): Refine.
10270         (nds32_expand_unaligned_store): Refine.
10272 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10273             Chung-Ju Wu  <jasonwucj@gmail.com>
10275         * config/nds32/constants.md: Add TP_REGNUM constant.
10276         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10277         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10278         UNSPEC_ADD32.
10279         * config/nds32/nds32-doubleword.md: Consider flag_pic.
10280         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10281         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10282         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10283         and PIC code generation.
10284         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10285         code generation.
10286         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10287         optimization.
10288         * config/nds32/nds32.md: Support TLS and PIC.
10289         * config/nds32/nds32.c: Support TLS and PIC.
10290         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10291         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10292         predicate.
10294 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10296         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10297         mode with E_ prefix.
10299 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10300             Chung-Ju Wu  <jasonwucj@gmail.com>
10302         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10303         * config/nds32/nds32-md-auxiliary.c
10304         (symbolic_reference_mentioned_p): New.
10305         (nds32_legitimize_ict_address): New.
10306         (nds32_expand_ict_move): New.
10307         (nds32_indirect_call_referenced_p): New.
10308         (nds32_symbol_binds_local_p): Delete.
10309         (nds32_long_call_p): Modify.
10310         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10311         * config/nds32/nds32-protos.h
10312         (symbolic_reference_mentioned_p): Declare.
10313         (nds32_legitimize_ict_address): Declare.
10314         (nds32_expand_ict_move): Declare.
10315         (nds32_indirect_call_referenced_p): Declare.
10316         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10317         (nds32_relax_group): Use nds32_ict_const_p as condition.
10318         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10319         (nds32_asm_file_start): Output ict_model directive in asm code.
10320         (nds32_legitimate_address_p): Consider indirect call.
10321         (nds32_print_operand): Consider indirect call.
10322         (nds32_print_operand_address): Consider indirect call.
10323         (nds32_insert_attributes): Handle "indirect_call" attribute.
10324         (TARGET_LEGITIMATE_ADDRESS_P): Define.
10325         (TARGET_LEGITIMATE_CONSTANT_P): Define.
10326         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10327         (TARGET_DELEGITIMIZE_ADDRESS): Define.
10328         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10329         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10330         (TARGET_ICT_MODEL_SMALL): Define.
10331         (TARGET_ICT_MODEL_LARGE): Define.
10332         * config/nds32/nds32.md (movsi): Consider ict model.
10333         (call, call_value): Consider ict model.
10334         (sibcall, sibcall_value): Consider ict model.
10335         * config/nds32/nds32.opt (mict-model): New option.
10336         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10337         model.
10339 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
10340             Monk Chiang  <sh.chiang04@gmail.com>
10341             Jim Wilson <jimw@sifive.com>
10343         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10344         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
10345         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10346         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10347         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
10348         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10349         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10350         compute save_libcall_adjustment properly.
10351         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10352         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10353         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10354         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10355         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10356         (ABI_SPEC): Handle mabi=ilp32e.
10357         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10358         (RVE): Add RVE mask.
10359         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10360         <-march>: Add rv32e as an example.
10362 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
10364         PR c++/82899
10365         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10366         (intra_create_variable_infos): Handle C++ constructors.
10368 2018-05-18  Martin Liska  <mliska@suse.cz>
10370         * passes.def: Remove a redundant pass.
10372 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10374         PR bootstrap/85838
10375         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10377 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10379         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10380         (ARMv4): Update.
10381         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10382         (ARMv6m): Update.
10383         (armv2, armv2a, armv3, armv3m): Delete architectures.
10384         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10385         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10386         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10387         Delete cpus.
10388         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10389         (*mulsidi3adddi): Likewise.
10390         (mulsidi3): Likewise.
10391         (*mulsidi3_nov6): Likewise.
10392         (umulsidi3): Likewise.
10393         (umulsidi3_nov6): Likewise.
10394         (umaddsidi4): Likewise.
10395         (*umulsidi3adddi): Likewise.
10396         (smulsi3_highpart): Likewise.
10397         (*smulsi3_highpart_nov6): Likewise.
10398         (umulsi3_highpart): Likewise.
10399         (*umulsi3_highpart_nov6): Likewise.
10400         * config/arm/arm.h (arm_arch3m): Delete.
10401         * config/arm/arm.c (arm_arch3m): Delete.
10402         (arm_option_override_internal): Update armv3-related comment.
10403         (arm_configure_build_target): Delete use of isa_bit_mode32.
10404         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10405         (arm_rtx_costs_internal): Delete check of arm_arch3m.
10406         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10407         (mulsa3): Likewise.
10408         (mulusa3): Likewise.
10409         * config/arm/arm-protos.h (arm_arch3m): Delete.
10410         * config/arm/arm-tables.opt: Regenerate.
10411         * config/arm/arm-tune.md: Likewise.
10412         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10413         deleted architectures.
10415 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10417         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10418         (armv5t, armv5te): New features.
10419         (ARMv5, ARMv5e): Delete fgroups.
10420         (ARMv5t, ARMv5te): Adjust for above changes.
10421         (ARMv6m): Likewise.
10422         (armv5, armv5e): Delete arches.
10423         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10424         arm_arch5.
10425         (*call_reg_arm): Likewise.
10426         (*call_value_reg_armv5): Likewise.
10427         (*call_value_reg_arm): Likewise.
10428         (*call_symbol): Likewise.
10429         (*call_value_symbol): Likewise.
10430         (*sibcall_insn): Likewise.
10431         (*sibcall_value_insn): Likewise.
10432         (clzsi2): Likewise.
10433         (prefetch): Likewise.
10434         (define_split and define_peephole2 dependent on arm_arch5):
10435         Likewise.
10436         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10437         arm_arch5e.
10438         (TARGET_ARM_QBIT): Likewise.
10439         (TARGET_DSP_MULTIPLY): Likewise.
10440         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10441         (arm_arch5, arm_arch5e): Delete.
10442         (arm_arch5t, arm_arch5te): Declare.
10443         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10444         (arm_arch5t): Declare.
10445         (arm_option_reconfigure_globals): Update for the above.
10446         (arm_options_perform_arch_sanity_checks): Update comment, replace
10447         use of arm_arch5 with arm_arch5t.
10448         (use_return_insn): Likewise.
10449         (arm_emit_call_insn): Likewise.
10450         (output_return_instruction): Likewise.
10451         (arm_final_prescan_insn): Likewise.
10452         (arm_coproc_builtin_available): Likewise.
10453         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10454         arm_arch5e with arm_arch5t and arm_arch5te.
10455         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10456         (arm_arch5t, arm_arch5te): Declare.
10457         * config/arm/arm-tables.opt: Regenerate.
10458         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10459         * config/arm/t-multilib: Likewise.
10460         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10461         instead of arm_arch5.
10462         (*call_reg_thumb1): Likewise.
10463         (*call_value_reg_thumb1_v5): Likewise.
10464         (*call_value_reg_thumb1): Likewise.
10465         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10466         unreachable path.
10467         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10469 2018-05-18  Martin Liska  <mliska@suse.cz>
10471         PR gcov-profile/84846
10472         * doc/gcov.texi: Document -t option of gcov tool.
10474 2018-05-18  Martin Liska  <mliska@suse.cz>
10476         PR gcov-profile/84846
10477         * gcov.c (print_usage): Add new -t option.
10478         (process_args): Handle the option.
10479         (generate_results): Use stdout as output when requested by
10480         the option.
10482 2018-05-18  Martin Liska  <mliska@suse.cz>
10484         PR gcov-profile/84846
10485         * coverage.c (coverage_init): Write PWD to .gcno file.
10486         * doc/gcov.texi: Document how working directory is printed.
10487         * gcov-dump.c (dump_gcov_file): Print PWD.
10488         * gcov.c (output_intermediate_file): Likewise.
10489         (read_graph_file): Read PWD string.
10490         (output_lines): Print PWD.
10492 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10494         PR middle-end/85817
10495         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10496         for retval and return false if all args to phi are zero.
10498 2018-05-18  Richard Biener  <rguenther@suse.de>
10500         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10501         method.
10502         (evrp_dom_walker::before_dom_children): Call it.
10504 2018-05-18  Richard Biener  <rguenther@suse.de>
10506         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10507         results when processing array refs with variable index.
10509 2018-05-18  Toon Moene  <toon@moene.org>
10511         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10512         directly after that of -floop-interchange. Indicate that both
10513         options are enabled by default when specifying -O3.
10515 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10517         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10518         iterator.  Delete separate integer-mode vec_set<mode> expander.
10519         (aarch64_simd_vec_setv2di): Delete.
10520         (vec_setv2di): Delete.
10521         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10522         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10523         the "w, r" alternative.
10525 2018-05-18  Martin Liska  <mliska@suse.cz>
10527         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10528         * tree-pass.h (make_pass_lower_switch_O0): New function.
10529         * tree-switch-conversion.c (node_has_low_bound): Remove.
10530         (node_has_high_bound): Likewise.
10531         (node_is_bounded): Likewise.
10532         (class pass_lower_switch): Make it a template type and create
10533         two instances.
10534         (pass_lower_switch::execute): Add template argument.
10535         (make_pass_lower_switch): New function.
10536         (make_pass_lower_switch_O0): New function.
10537         (do_jump_if_equal): Remove.
10538         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10539         all the hard work to tree optimization passes.
10541 2018-05-18  Martin Liska  <mliska@suse.cz>
10543         * dbgcnt.c (limit_low): Renamed from limit.
10544         (limit_high): New variable.
10545         (dbg_cnt_is_enabled): Check for upper limit.
10546         (dbg_cnt): Adjust dumping.
10547         (dbg_cnt_set_limit_by_index): Add new argument for high
10548         value.
10549         (dbg_cnt_set_limit_by_name): Likewise.
10550         (dbg_cnt_process_single_pair): Parse new format.
10551         (dbg_cnt_process_opt): Use strtok.
10552         (dbg_cnt_list_all_counters): Remove 'value' and add
10553         'limit_high'.
10554         * doc/invoke.texi: Document changes.
10556 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10558         * doc/sourcebuild.texi (scalar_all_fma): Document.
10559         * tree.def (FMA_EXPR): Delete.
10560         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10561         * internal-fn.c (ternary_direct): New macro.
10562         (expand_ternary_optab_fn): Likewise.
10563         (direct_ternary_optab_supported_p): Likewise.
10564         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10565         * builtins.c (fold_builtin_fma): Delete.
10566         (fold_builtin_3): Don't call it.
10567         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10568         * expr.c (expand_expr_real_2): Likewise.
10569         * fold-const.c (operand_equal_p): Likewise.
10570         (fold_ternary_loc): Likewise.
10571         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10572         * gimple.c (DEFTREECODE): Likewise.
10573         * gimplify.c (gimplify_expr): Likewise.
10574         * optabs-tree.c (optab_for_tree_code): Likewise.
10575         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10576         * tree-eh.c (operation_could_trap_p): Likewise.
10577         (stmt_could_throw_1_p): Likewise.
10578         * tree-inline.c (estimate_operator_cost): Likewise.
10579         * tree-pretty-print.c (dump_generic_node): Likewise.
10580         (op_code_prio): Likewise.
10581         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10582         * tree-ssa-operands.c (get_expr_operands): Likewise.
10583         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10584         * fold-const-call.h (fold_fma): Delete.
10585         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10586         CFN_FNMA and CFN_FNMS.
10587         (fold_fma): Delete.
10588         * genmatch.c (combined_fn): New enum.
10589         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10590         (commutative_op): New function.
10591         (commutate): Use it.  Handle more than 2 operands.
10592         (dt_operand::gen_gimple_expr): Use commutative_op.
10593         (parser::parse_expr): Allow :c to be used with non-binary
10594         operators if the commutative operand is known.
10595         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10596         CFN_FMS, CFN_FNMA and CFN_FNMS.
10597         (backprop::process_assign_use): Remove FMA_EXPR handling.
10598         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10599         (gen_hsa_fma): New function.
10600         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10601         IFN_FNMA and IFN_FNMS.
10602         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10603         * gimple-fold.h (follow_all_ssa_edges): Declare.
10604         * gimple-fold.c (follow_all_ssa_edges): New function.
10605         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10606         gimple_build interface and use follow_all_ssa_edges to fold the result.
10607         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10608         instead of checking for optabs directly.
10609         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10610         rather than FMA_EXPRs.
10611         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10612         call to IFN_FMA instead of an FMA_EXPR.
10614 2018-05-17  Jim Wilson  <jimw@sifive.com>
10616         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10617         sign extended promoted subreg, and the range does not have the sign bit
10618         set, then do a sign extend.
10620         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10621         test, check for sign extended subreg and/or constant operands, and
10622         do a sign extend in that case.
10624 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10626         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10627         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10628         Add untyped.
10629         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10630         Change logics_shift_reg to logics_shift_imm.
10631         (thunderx2t99_fp_loadpair_basic): Delete.
10632         (thunderx2t99_fp_storepair_basic): Delete.
10633         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10634         (thunderx2t99_asimd_polynomial): Delete.
10635         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10636         and neon_fp_mul_d_scalar_q.
10637         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10638         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10639         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10640         (thunderx2t99_asimd_lut): Add missing tbl types.
10641         (thunderx2t99_asimd_ext): Delete.
10642         (thunderx2t99_asimd_load1_1_mult): Delete.
10643         (thunderx2t99_asimd_load1_2_mult): Delete.
10644         (thunderx2t99_asimd_load1_ldp): New.
10645         (thunderx2t99_asimd_load1): New.
10646         (thunderx2t99_asimd_load2): Add missing *load2* types.
10647         (thunderx2t99_asimd_load3): New.
10648         (thunderx2t99_asimd_load4): New.
10649         (thunderx2t99_asimd_store1_1_mult): Delete.
10650         (thunderx2t99_asimd_store1_2_mult): Delete.
10651         (thunderx2t99_asimd_store2_mult): Delete.
10652         (thunderx2t99_asimd_store2_onelane): Delete.
10653         (thunderx2t99_asimd_store_stp): New.
10654         (thunderx2t99_asimd_store1): New.
10655         (thunderx2t99_asimd_store2): New.
10656         (thunderx2t99_asimd_store3): New.
10657         (thunderx2t99_asimd_store4): New.
10659 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10661         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10662         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10664 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10665             Segher Boessenkool  <segher@kernel.crashing.org>
10667         PR target/85698
10668         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10669         operand.
10671 2018-05-17  Richard Biener  <rguenther@suse.de>
10673         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10674         for pruning loop and prune defs feeding only already visited PHIs.
10676 2018-05-17  Richard Biener  <rguenther@suse.de>
10678         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10680 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10681             Richard Biener  <rguenther@suse.de>
10683         PR tree-optimization/85793
10684         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10685         for VMAT_ELEMENTWISE.
10687 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10689         * internal-fn.h (lookup_internal_fn): Declare
10690         * internal-fn.c (lookup_internal_fn): New function.
10691         * gimple.c (gimple_build_call_from_tree): Handle calls to
10692         internal functions.
10693         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10694         internal function names.
10695         * tree-pretty-print.c (dump_generic_node): Likewise.
10696         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10698 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10700         * gimple-fold.h (gimple_build): Make the function forms take
10701         combined_fn rather than built_in_function.
10702         (gimple_simplify): Likewise.
10703         * gimple-match-head.c (gimple_simplify): Likewise.
10704         * gimple-fold.c (gimple_build): Likewise.
10705         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10706         rather than gimple_build_call_internal.
10707         (get_initial_defs_for_reduction): Likewise.
10708         (vect_create_epilog_for_reduction): Likewise.
10709         (vectorizable_live_operation): Likewise.
10711 2018-05-17  Martin Liska  <mliska@suse.cz>
10713         * gimple-ssa-sprintf.c (format_directive): Do not use
10714         space in between 'G_' and '('.
10716 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10718         PR target/85323
10719         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10720         even if the mask is not all ones.
10722         PR target/85323
10723         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10724         vector.
10725         (ix86_gimple_fold_builtin): Likewise.
10727         PR target/85323
10728         * config/i386/i386.c: Include tree-vector-builder.h.
10729         (ix86_vector_shift_count): New function.
10730         (ix86_fold_builtin): Fold shift builtins by scalar count.
10731         (ix86_gimple_fold_builtin): Likewise.
10733         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10734         _mm512_setzero): New intrinsics.
10736 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10737             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10739         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10740         code generation for cases where splatting a value is not useful.
10741         * simplify-rtx.c (simplify_ternary_operation): Simplify
10742         vec_merge across a vec_duplicate and a paradoxical subreg forming
10743         a vector mode to a vec_concat.
10745 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10747         * config.gcc: Support "goldmont-plus".
10748         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10749         "goldmont-plus".
10750         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10751         PROCESSOR_GOLDMONT_PLUS.
10752         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10753         (processor_target_table): Add "goldmont-plus".
10754         (PTA_GOLDMONT_PLUS): Define.
10755         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10756         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10757         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10758         (fold_builtin_cpu): Add "goldmont-plus".
10759         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10760         (ix86_option_override_internal): Add "goldmont-plus".
10761         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10762         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10763         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10764         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10766 2018-05-17  Richard Biener  <rguenther@suse.de>
10768         PR tree-optimization/85757
10769         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10770         remove defs that only feed that PHI from further processing.
10772 2018-05-16  Jim Wilson  <jimw@sifive.com>
10774         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10775         asterisk to name.
10776         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10778 2018-05-16  Mark Wielaard  <mark@klomp.org>
10780         * dwarf2out.c (count_index_strings): New function.
10781         (output_indirect_strings): Call count_index_strings and generate
10782         header for dwarf_version >= 5.
10784 2018-05-16  Mark Wielaard  <mark@klomp.org>
10786         * dwarf2out.c (dwarf_FORM): New function.
10787         (set_indirect_string): Use dwarf_FORM.
10788         (reset_indirect_string): Likewise.
10789         (size_of_die): Likewise.
10790         (value_format): Likewise.
10791         (output_die): Likewise.
10792         (add_skeleton_AT_string): Likewise.
10793         (output_macinfo_op): Likewise.
10794         (index_string): Likewise.
10795         (output_index_string_offset): Likewise.
10796         (output_index_string): Likewise.
10797         (count_index_strings): Likewise.
10799 2018-05-16  Carl Love  <cel@us.ibm.com>
10801         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10802         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10804 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10806         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10807         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10809 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10811         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10812         (fnma<mode>4): Likewise.
10813         (fms<mode>4): Likewise.
10814         (fnms<mode>4): Likewise.
10815         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10816         (aarch64_fnma<mode>4): Likewise.
10817         (aarch64_fms<mode>4): Likewise.
10818         (aarch64_fnms<mode>4): Likewise.
10819         (aarch64_fnmadd<mode>4): Likewise.
10821 2018-05-16  Jason Merrill  <jason@redhat.com>
10823         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10825 2018-05-16  Richard Biener  <rguenther@suse.de>
10827         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10828         (dump_stmt_cost): Declare.
10829         (add_stmt_cost): Dump cost we add.
10830         (add_stmt_costs): New function.
10831         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10832         No longer exported.
10833         (vect_analyze_stmt): Adjust prototype.
10834         (vectorizable_condition): Likewise.
10835         (vectorizable_live_operation): Likewise.
10836         (vectorizable_reduction): Likewise.
10837         (vectorizable_induction): Likewise.
10838         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10839         cost vector to pass to vectorizable_ and record afterwards.
10840         (vect_model_reduction_cost): Take cost vector argument and adjust.
10841         (vect_model_induction_cost): Likewise.
10842         (vectorizable_reduction): Likewise.
10843         (vectorizable_induction): Likewise.
10844         (vectorizable_live_operation): Likewise.
10845         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10846         SLP_TREE_NUMBER_OF_VEC_STMTS.
10847         (vect_analyze_slp_cost_1): Remove.
10848         (vect_analyze_slp_cost): Likewise.
10849         (vect_slp_analyze_node_operations): Take visited args and
10850         a target cost vector.  Avoid processing already visited stmt sets.
10851         (vect_slp_analyze_operations): Use a local cost vector to gather
10852         costs and register those of non-discarded instances.
10853         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10854         (vect_schedule_slp_instance): Remove copying of
10855         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10856         zero.
10857         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10858         adding cost.  Record cost entry location.
10859         (vect_prologue_cost_for_slp_op): Function to compute cost of
10860         a constant or invariant generated for SLP vect in the prologue,
10861         split out from vect_analyze_slp_cost_1.
10862         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10863         (vect_model_promotion_demotion_cost): Likewise.
10864         (vect_model_store_cost): Likewise, make static.
10865         (vect_model_load_cost): Likewise.
10866         (vectorizable_bswap): Add cost vector arg and adjust.
10867         (vectorizable_call): Likewise.
10868         (vectorizable_simd_clone_call): Likewise.
10869         (vectorizable_conversion): Likewise.
10870         (vectorizable_assignment): Likewise.
10871         (vectorizable_shift): Likewise.
10872         (vectorizable_operation): Likewise.
10873         (vectorizable_store): Likewise.
10874         (vectorizable_load): Likewise.
10875         (vectorizable_condition): Likewise.
10876         (vectorizable_comparison): Likewise.
10877         (can_vectorize_live_stmts): Likewise.
10878         (vect_analyze_stmt): Likewise.
10879         (vect_transform_stmt): Adjust calls to vectorizable_*.
10880         * tree-vectorizer.c: Include gimple-pretty-print.h.
10881         (dump_stmt_cost): New function.
10883 2018-05-16  Richard Biener  <rguenther@suse.de>
10885         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10886         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10887         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10888         (check_name): New callback.
10889         (dse_classify_store): Track cycles via a visited bitmap of PHI
10890         defs and simplify handling of in-loop and across loop dead stores
10891         and properly fail for loop-variant refs.  Handle byte-tracking with
10892         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10893         limiting the walk.
10895 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10897         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10898         (vect_get_mask_type_for_stmt): Likewise.
10899         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10900         split out from...
10901         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10902         to determine the statement's vector type and the vector type that
10903         should be used for calculating nunits.  Deal with cases in which
10904         the type has to be deferred.
10905         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10906         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10907         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10908         (vect_determine_vf_for_stmt): New functions, split out from...
10909         (vect_determine_vectorization_factor): ...here.
10910         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10911         (vect_get_mask_type_for_stmt): New functions, split out from
10912         vect_determine_vectorization_factor.
10914 2018-05-16  Richard Biener  <rguenther@suse.de>
10916         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10917         verify the [VEC_]COND_EXPR embedded comparison.
10919 2018-05-15  Martin Sebor  <msebor@redhat.com>
10921         PR tree-optimization/85753
10922         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10923         RECORD_TYPE in addition to ARRAY_TYPE.
10925 2018-05-15  Martin Sebor  <msebor@redhat.com>
10927         PR middle-end/85643
10928         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10930 2018-05-15  Richard Biener  <rguenther@suse.de>
10932         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10933         add by_clobber_p one.  Change algorithm to collect all defs
10934         representing uses we need to walk and try reducing them to
10935         a single one before failing.
10936         (dse_dom_walker::dse_optimize_stmt): Adjust.
10938 2018-05-13  Mark Wielaard  <mark@klomp.org>
10940         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10941         (size_of_loc_descr): Likewise.
10942         (output_loc_operands): Likewise.
10943         (output_loc_operands_raw): Likewise.
10944         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10945         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10946         (hash_loc_operands): Likewise.
10947         (compare_loc_operands): Likewise.
10949 2018-05-14  Mark Wielaard  <mark@klomp.org>
10951         * dwarf2out.c (count_index_addrs): New function.
10952         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10954 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10956         PR tree-optimization/83648
10957         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10958         return value as malloc candidate.
10960 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10962         PR ipa/85734
10963         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10964         param as true in call to suggest_attribute.
10966 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10968         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10969         -mreadonly-in-sdata.
10971 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10973         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10974         New pattern.
10975         (aarch64_crypto_aesd_fused): Likewise.
10977 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10979         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10980         (movsi_aarch64): Likewise.
10981         (load_pairsi): Likewise.
10982         (load_pairdi): Likewise.
10983         (store_pairsi): Likewise.
10984         (store_pairdi): Likewise.
10985         (load_pairsf): Likewise.
10986         (load_pairdf): Likewise.
10987         (store_pairsf): Likewise.
10988         (store_pairdf): Likewise.
10989         (zero_extend): Likewise.
10990         (trunc): Swap alternatives.
10991         (fcvt_target): Add '?' to prefer w over r.
10993 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10995         PR target/85756
10996         * config/i386/i386.md: Disallow non-commutative arithmetics in
10997         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10998         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10999         in the peephole2 before it.
11001 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
11003         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11004         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11005         (ix86_handle_option): Handle -mcldemote.
11006         * config.gcc: New header.
11007         * config/i386/cldemoteintrin.h: New file.
11008         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11009         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11010         -mcldemote.
11011         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11012         OPTION_MASK_ISA_CLDEMOTE.
11013         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11014         (ix86_valid_target_attribute_inner_p): Ditto.
11015         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11016         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11017         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11018         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11019         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11020         (cldemote): New.
11021         * config/i386/i386.opt: Add -mcldemote.
11022         * config/i386/x86intrin.h: New header.
11023         * doc/invoke.texi: Add -mcldemote.
11025 2018-05-14  Richard Biener  <rguenther@suse.de>
11027         * doc/match-and-simplify.texi: Adjust :s documentation.
11029 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
11031         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11032         intended memcpy size.
11033         (REORDER_45): Likewise.
11035 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
11037         * sort.cc: New file.
11038         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11039         * vec.c (qsort_chk): Use gcc_qsort.
11040         * Makefile.in (OBJS-libcommon): Add sort.o.
11041         (build/sort.o): New target.  Use it...
11042         (BUILD_RTL): ... here, and...
11043         (build/gencfn-macros): ... here, and...
11044         (build/genmatch): ... here.
11046 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11047             Chung-Ju Wu  <jasonwucj@gmail.com>
11049         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11050         * config/nds32/nds32-graywolf.md: New file.
11051         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11052         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11053         pipeline.
11054         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11055         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11056         * config/nds32/nds32.md (pipeline_model): Add graywolf.
11057         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11058         * config/nds32/pipelines.md: Include n15 settings.
11060 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11061             Chung-Ju Wu  <jasonwucj@gmail.com>
11063         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11064         * config/nds32/nds32-n13.md: New file.
11065         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11066         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11067         pipeline.
11068         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11069         * config/nds32/nds32.md (pipeline_model): Add n13.
11070         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11071         * config/nds32/pipelines.md: Include n13 settings.
11073 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11074             Chung-Ju Wu  <jasonwucj@gmail.com>
11076         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11077         * config/nds32/nds32-n10.md: New file.
11078         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11079         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11080         pipeline.
11081         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11082         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11083         * config/nds32/nds32.md (pipeline_model): Add n10.
11084         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11085         * config/nds32/pipelines.md: Include n10 settings.
11087 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
11088             Kito Cheng  <kito.cheng@gmail.com>
11089             Chung-Ju Wu  <jasonwucj@gmail.com>
11091         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11092         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11093         Add enum values for DSP extension instructions.
11094         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11095         New constraints.
11096         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11097         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11098         New code iterators.
11099         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11100         * config/nds32/nds32-dspext.md: New file for DSP implementation.
11101         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11102         * config/nds32/nds32-intrinsic.md: Likewise.
11103         * config/nds32/nds32_intrinsic.h: Likewise.
11104         * config/nds32/nds32-md-auxiliary.c: Likewise.
11105         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11106         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11107         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11108         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11109         * config/nds32/nds32-protos.h: New declarations for DSP extension.
11110         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11111         TYPE_DMAC in switch statement.
11112         * config/nds32/nds32.c: New checking and implementation for DSP
11113         extension instructions.
11114         * config/nds32/nds32.h: Likewise.
11115         * config/nds32/nds32.md: Likewise.
11116         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11117         * config/nds32/predicates.md: Implement new predicates for DSP
11118         extension.
11120 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11122         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11123         Reformat alternatives and attributes so it is easier to identify
11124         which constraints/attributes go with which instruction.
11125         (mov<mode>_hardfloat32, FMOVE64): Likewise.
11126         (mov<mode>_softfloat32, FMOVE64): Likewise.
11127         (mov<mode>_hardfloat64, FMOVE64): Likewise.
11128         (mov<mode>_softfloat64, FMOVE64): Likewise.
11130 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11132         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11133         subsection.
11134         (Basic PowerPC Built-in Functions): The new name of the
11135         subsection previously known as "PowerPC Built-in Functions".
11136         (Basic PowerPC Built-in Functions Available on all Configurations):
11137         New subsubsection.
11138         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11139         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11140         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11141         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11143 2018-05-11  Martin Jambor  <mjambor@suse.cz>
11145         PR ipa/85655
11146         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11147         single const.
11149 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11151         PR target/85733
11152         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11154 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
11156         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11157         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11158         (ix86_handle_option): Handle -mwaitpkg.
11159         * config.gcc: New header.
11160         * config/i386/cpuid.h (bit_WAITPKG): New bit.
11161         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11162         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11163         function type.
11164         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11165         OPTION_MASK_ISA_WAITPKG.
11166         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11167         (ix86_option_override_internal): Add PTA_WAITPKG.
11168         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11169         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11170         IX86_BUILTIN_TPAUSE.
11171         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11172         __builtin_ia32_umwait and __builtin_ia32_tpause.
11173         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11174         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11175         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11176         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11177         UNSPECV_TPAUSE): New.
11178         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11179         * config/i386/i386.opt: Add -mwaitpkg.
11180         * config/i386/waitpkgintrin.h: New file.
11181         * config/i386/x86intrin.h: New header.
11182         * doc/invoke.texi: Add -mwaitpkg.
11184 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11186         PR target/85606
11187         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11188         equivalent.
11189         (cortex-m0): Use armv6s-m isa.
11190         (cortex-m0plus): Likewise.
11191         (cortex-m1): Likewise.
11192         (cortex-m0.small-multiply): Likewise.
11193         (cortex-m0plus.small-multiply): Likewise.
11194         (cortex-m1.small-multiply): Likewise.
11196 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
11197             Jakub Jelinek  <jakub@redhat.com>
11199         PR tree-optimization/85692
11200         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11201         source permute as well.
11203 2018-05-11  Martin Liska  <mliska@suse.cz>
11205         PR sanitizer/85556
11206         * doc/extend.texi: Document LLVM style format for no_sanitize
11207         attribute.
11209 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11211         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11212         mode_supports_vsx_dform_quad to mode_supports_dq_form.
11213         (mode_supports_vsx_dform_quad): Likewise.
11214         (mode_supports_vmx_dform): Move these functions to be next to the
11215         other mode_supports functions.
11216         (mode_supports_dq_form): Likewise.
11217         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11218         mode_supports_dq_form.
11219         (reg_offset_addressing_ok_p): Likewise.
11220         (offsettable_ok_by_alignment): Likewise.
11221         (rs6000_legitimate_offset_address_p): Likewise.
11222         (legitimate_lo_sum_address_p): Likewise.
11223         (rs6000_legitimize_address): Likewise.
11224         (rs6000_legitimize_reload_address): Likewise.
11225         (rs6000_secondary_reload_inner): Likewise.
11226         (rs6000_preferred_reload_class): Likewise.
11227         (rs6000_output_move_128bit): Likewise.
11229 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11231         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11232         Generate SImode target register for null target.
11233         <case IX86_BUILTIN_XGETBV>: Ditto.
11234         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11235         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11237 2018-05-10  Carl Love  <cel@us.ibm.com>
11239         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11240         dcbtt and dcbtstt if operands[2] is 0.
11242 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11244         PR target/85693
11245         * config/i386/sse.md (usadv64qi): New expander.
11247 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
11249         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11250         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11251         -maltivec=be support.
11252         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11253         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11254         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11255         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11256         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11257         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11258         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11259         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11260         altivec_vsumsws): Adjust.
11261         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11262         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11263         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11264         support.
11265         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11266         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11267         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11268         (altivec_lve<VI_char>x): Delete expand.
11269         (*altivec_lve<VI_char>x_internal): Rename to...
11270         (altivec_lve<VI_char>x): ... this.
11271         (altivec_lvxl_<mode>): Delete expand.
11272         (*altivec_lvxl_<mode>_internal): Rename to ...
11273         (altivec_lvxl_<mode>): ... this.
11274         (altivec_stvxl_<mode>): Delete expand.
11275         (*altivec_stvxl_<mode>_internal): Rename to ...
11276         (altivec_stvxl_<mode>): ... this.
11277         (altivec_stve<VI_char>x): Delete expand.
11278         (*altivec_stve<VI_char>x_internal): Rename to ...
11279         (altivec_stve<VI_char>x): ... this.
11280         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11281         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11282         reduc_plus_scal_<mode>): Adjust.
11283         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11284         comment.
11285         (rs6000_cpu_cpp_builtins): Adjust.
11286         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11287         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11288         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11289         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11290         -maltivec=be support.
11291         (rs6000_split_vec_extract_var): Adjust.
11292         (rs6000_split_v4si_init): Adjust.
11293         (swap_selector_for_mode): Delete.
11294         (altivec_expand_lvx_be, altivec_expand_stvx_be,
11295         altivec_expand_stvex_be): Delete.
11296         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11297         -maltivec=be support.
11298         (rs6000_gimple_fold_builtin): Ditto.
11299         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11300         Adjust.
11301         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11302         (TARGET_DIRECT_MOVE_64BIT): Adjust.
11303         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11304         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11305         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11306         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11307         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11308         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11309         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11310         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11311         anonymous split): Adjust.
11312         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11313         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11315 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
11317         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11318         when --with-gxx-include-dir is also specified.
11319         * configure: Regenerate.
11321 2018-05-09  Jim Wilson  <jimw@sifive.com>
11323         PR target/84797
11324         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11325         * config/riscv/t-withmultilib: New.
11326         * config/riscv/withmultilib.h: New.
11327         * doc/install.texi: Document RISC-V --with-multilib-list support.
11329 2018-05-09  Richard Biener  <rguenther@suse.de>
11331         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11332         vector.
11333         (vect_bb_vectorization_profitable_p): Adjust.  Compute
11334         actual scalar cost using the cost vector and the add_stmt_cost
11335         machinery.
11337 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11339         PR rtl-optimization/85645
11340         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11341         in the REG_CFA_REGISTER note for LR, don't leave it empty.
11343 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11345         PR rtl-optimization/85645
11346         * shrink-wrap.c (spread_components): Return a boolean saying if
11347         anything was changed.
11348         (try_shrink_wrapping_separate): Iterate spread_components until
11349         nothing changes anymore.
11351 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11353         PR rtl-optimization/85645
11354         * regrename.c (build_def_use): Also kill the chains that include the
11355         destination of a REG_CFA_REGISTER note.
11357 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11359         PR rtl-optimization/85645
11360         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11361         insn that has a REG_CFA_REGISTER note.
11363 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
11365         * cfgexpand.c (expand_clobber): New function.
11366         (expand_gimple_stmt_1): Use it.
11367         * tree-vect-stmts.c (vect_clobber_variable): New function,
11368         split out from...
11369         (vectorizable_simd_clone_call): ...here.
11370         (vectorizable_store): Emit a clobber either side of an
11371         IFN_STORE_LANES sequence.
11372         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11374 2018-05-09  Tom de Vries  <tom@codesourcery.com>
11376         PR target/85626
11377         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11378         (define_insn "trap_if_false"): Add exit after trap.
11380 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
11382         PR rtl-optimization/85638
11383         * bb-reorder.c: Include common/common-target.h.
11384         (create_forwarder_block): New function extracted from...
11385         (fix_up_crossing_landing_pad): ...here.  Rename into...
11386         (dw2_fix_up_crossing_landing_pad): ...this.
11387         (sjlj_fix_up_crossing_landing_pad): New function.
11388         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11389         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11390         from both partitions and exit the loop after one iteration.
11392 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11394         Revert:
11395         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11396         subsection.
11397         (Basic PowerPC Built-in Functions): The new name of the
11398         subsection previously known as "PowerPC Built-in Functions".
11399         (Basic PowerPC Built-in Functions Available on all Configurations):
11400         New subsubsection.
11401         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11402         subsubsection.
11403         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11404         subsubsection.
11405         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11406         subsubsection.
11407         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11408         subsubsection.
11410 2018-05-08  Jim Wilson  <jimw@sifive.com>
11412         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11413         (LD_EMUL_SUFFIX): New.
11414         (LINK_SPEC): Use it.
11416 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11418         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11419         subsection.
11420         (Basic PowerPC Built-in Functions): The new name of the
11421         subsection previously known as "PowerPC Built-in Functions".
11422         (Basic PowerPC Built-in Functions Available on all Configurations):
11423         New subsubsection.
11424         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11425         subsubsection.
11426         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11427         subsubsection.
11428         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11429         subsubsection.
11430         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11431         subsubsection.
11433 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11435         PR target/85683
11436         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11437         after cmpelim optimization.
11439 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
11441         * config.gcc: Support "goldmont".
11442         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11443         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11444         PROCESSOR_GOLDMONT.
11445         * config/i386/i386.c (m_GOLDMONT): Define.
11446         (processor_target_table): Add "goldmont".
11447         (PTA_GOLDMONT): Define.
11448         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11449         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11450         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11451         (fold_builtin_cpu): Add "goldmont".
11452         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11453         (ix86_option_override_internal): Add "goldmont".
11454         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11455         (processor_type): Add PROCESSOR_GOLDMONT.
11456         * config/i386/i386.md: Add CPU "glm".
11457         * config/i386/glm.md: New file.
11458         * config/i386/x86-tune.def: Add m_GOLDMONT.
11459         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11461 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11463         PR target/85572
11464         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11465         E_V4DImode.
11466         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11467         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
11468         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
11470         PR target/85317
11471         * config/i386/i386.c (ix86_fold_builtin): Handle
11472         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11474         PR target/85480
11475         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11476         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11478 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
11480         PR target/85658
11481         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11482         (check_arch): Likewise.
11483         (check_fpu): Return the result rather than printing it.
11484         (end arch): Fix operator precedence.
11485         (end cpu): Likewise.
11486         (END): Print the result from check_fpu.
11488 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11489             Alan Hayward  <alan.hayward@arm.com>
11490             David Sherwood  <david.sherwood@arm.com>
11492         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11493         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11494         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11495         (*fcmuo<mode>_and): New patterns.
11497 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11499         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11500         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11501         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11502         (cmp_op, sve_imm_con): New code attributes.
11503         (SVE_COND_INT_CMP, imm_con): Delete.
11504         (cmp_op): Remove above unspecs from int attribute.
11505         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11506         to...
11507         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11508         comparison-specific unspecs.
11509         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11510         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11511         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11512         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11513         (*vec_fcm<cmp_op><mode>): Rename to...
11514         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11515         (*vec_fcmuo<mode>): Rename to...
11516         (*fcmuo<mode>): ...this and adjust likewise.
11517         (*pred_fcm<cmp_op><mode>): New pattern.
11518         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11519         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11520         functions.
11521         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11522         and UNORDERED.
11523         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11524         (aarch64_emit_sve_predicated_cond): New function.
11525         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11526         (aarch64_emit_unspec_cond_or): Replace with...
11527         (aarch64_emit_sve_or_conds): ...this new function.  Use
11528         aarch64_emit_sve_ptrue_op for the individual comparisons and
11529         aarch64_emit_binop to OR them together.
11530         (aarch64_emit_inverted_unspec_cond): Replace with...
11531         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11532         aarch64_emit_sve_ptrue_op for the comparison and
11533         aarch64_emit_unop to invert the result.
11534         (aarch64_expand_sve_vec_cmp_float): Update after the above
11535         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11537 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11539         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11540         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11541         (Backwards Compatibility): Likewise.
11543 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11545         PR bootstrap/85681
11546         Revert:
11547         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11549         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11550         <prefetch_dynamic_strides>: New const bool field.
11551         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11552         prefetch_dynamic_strides.
11553         (exynosm1_prefetch_tune): Likewise.
11554         (thunderxt88_prefetch_tune): Likewise.
11555         (thunderx_prefetch_tune): Likewise.
11556         (thunderx2t99_prefetch_tune): Likewise.
11557         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11558         to false.
11559         (aarch64_override_options_internal): Update to set
11560         PARAM_PREFETCH_DYNAMIC_STRIDES.
11561         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11562         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11563         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11564         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11565         prefetch-dynamic-strides setting.
11567         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11569         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11570         <minimum_stride>: New const int field.
11571         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11572         minimum_stride field.
11573         (exynosm1_prefetch_tune): Likewise.
11574         (thunderxt88_prefetch_tune): Likewise.
11575         (thunderx_prefetch_tune): Likewise.
11576         (thunderx2t99_prefetch_tune): Likewise.
11577         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11578         (aarch64_override_options_internal): Update to set
11579         PARAM_PREFETCH_MINIMUM_STRIDE.
11580         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11581         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11582         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11583         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11584         stride is constant and is below the minimum stride threshold.
11586 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11588         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11589         to 512.
11591 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11593         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11594         <prefetch_dynamic_strides>: New const bool field.
11595         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11596         prefetch_dynamic_strides.
11597         (exynosm1_prefetch_tune): Likewise.
11598         (thunderxt88_prefetch_tune): Likewise.
11599         (thunderx_prefetch_tune): Likewise.
11600         (thunderx2t99_prefetch_tune): Likewise.
11601         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11602         to false.
11603         (aarch64_override_options_internal): Update to set
11604         PARAM_PREFETCH_DYNAMIC_STRIDES.
11605         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11606         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11607         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11608         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11609         prefetch-dynamic-strides setting.
11611 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11613         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11614         <minimum_stride>: New const int field.
11615         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11616         minimum_stride field.
11617         (exynosm1_prefetch_tune): Likewise.
11618         (thunderxt88_prefetch_tune): Likewise.
11619         (thunderx_prefetch_tune): Likewise.
11620         (thunderx2t99_prefetch_tune): Likewise.
11621         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11622         (aarch64_override_options_internal): Update to set
11623         PARAM_PREFETCH_MINIMUM_STRIDE.
11624         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11625         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11626         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11627         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11628         stride is constant and is below the minimum stride threshold.
11630 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11632         PR c++/85659
11633         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11634         the type is addressable.  Don't force op into register if it has
11635         BLKmode.
11637 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11639         PR other/77609
11640         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11641         any section for which we don't know a specific type it should have,
11642         regardless of name.  Previously this was done only for the exact
11643         names ".init_array", ".fini_array", and ".preinit_array".
11644         (default_elf_asm_named_section): Add comment about
11645         relationship with default_section_type_flags and SECTION_NOTYPE.
11646         (get_section): Don't consider it a type conflict if one side has
11647         SECTION_NOTYPE and the other doesn't, as long as neither has the
11648         SECTION_BSS et al used in the default_section_type_flags logic.
11650 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11652         PR target/85653
11653         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11654         (workaround_barsyncs): New function.
11655         (nvptx_reorg): Use workaround_barsyncs.
11656         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11657         (define_expand "nvptx_membar_cta"): New define_expand.
11658         (define_insn "*nvptx_membar_cta"): New insn.
11660 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11662         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11663         To improve optimization opportunities.
11664         * builtin-types.def: The new needed builtin types for the above.
11666 2018-05-04  Richard Biener  <rguenther@suse.de>
11668         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11669         * gimple-ssa-store-merging.c
11670         (imm_store_chain_info::output_merged_store): Remove redundant create,
11671         release split_store vector contents on failure.
11672         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11673         scalar stmt vector on cache hit.
11675 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11677         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11678         Xilinx FP support.
11679         * config.gcc (powerpc-xilinx-eabi*): Remove.
11680         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11681         support.
11682         (fusion_addis_mem_combo_load): Ditto.
11683         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11684         FP support.
11685         (rs6000_cpu_cpp_builtins): Ditto.
11686         * config/rs6000/rs6000-linux.c
11687         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11688         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11689         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11690         support.
11691         (rs6000_setup_reg_addr_masks): Ditto.
11692         (rs6000_init_hard_regno_mode_ok): Ditto.
11693         (rs6000_option_override_internal): Ditto.
11694         (legitimate_lo_sum_address_p): Ditto.
11695         (rs6000_legitimize_address): Ditto.
11696         (rs6000_legitimize_reload_address): Ditto.
11697         (rs6000_legitimate_address_p): Ditto.
11698         (abi_v4_pass_in_fpr): Ditto.
11699         (setup_incoming_varargs): Ditto.
11700         (rs6000_gimplify_va_arg): Ditto.
11701         (rs6000_split_multireg_move): Ditto.
11702         (rs6000_savres_strategy): Ditto.
11703         (rs6000_emit_prologue_components): Ditto.
11704         (rs6000_emit_epilogue_components): Ditto.
11705         (rs6000_emit_prologue): Ditto.
11706         (rs6000_emit_epilogue): Ditto.
11707         (rs6000_elf_file_end): Ditto.
11708         (rs6000_function_value): Ditto.
11709         (rs6000_libcall_value): Ditto.
11710         * config/rs6000/rs6000.h: Ditto.
11711         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11712         (TARGET_MINMAX): ... this.  New.
11713         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11714         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11715         (*movsi_internal1_single): Delete.
11716         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11717         mfpu=, mxilinx-fpu): Delete.
11718         * config/rs6000/singlefp.h: Delete.
11719         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11720         * config/rs6000/t-rs6000: Ditto.
11721         * config/rs6000/t-xilinx: Delete.
11722         * config/rs6000/titan.md: Adjust for fp_type removal.
11723         * config/rs6000/vsx.md: Remove Xilinx FP support.
11724         (VStype_simple): Delete.
11725         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11726         * config/rs6000/xfpu.h: Delete.
11727         * config/rs6000/xfpu.md: Delete.
11728         * config/rs6000/xilinx.h: Delete.
11729         * config/rs6000/xilinx.opt: Delete.
11730         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11731         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11733 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11735         PR libgomp/85639
11736         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11737         if ignore == 0.
11739 2018-05-04  Richard Biener  <rguenther@suse.de>
11741         PR middle-end/85627
11742         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11743         (expand_complex_div_wide): Likewise.
11744         (expand_complex_operations_1): Likewise.
11745         (expand_complex_libcall): Preserve EH info of the original stmt.
11746         (tree_lower_complex): Handle removed blocks.
11747         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11748         on complex multiplication and division libcall builtins.
11750 2018-05-04  Richard Biener  <rguenther@suse.de>
11752         PR middle-end/85574
11753         * fold-const.c (negate_expr_p): Restrict negation of operand
11754         zero of a division to when we know that can happen without
11755         overflow.
11756         (fold_negate_expr_1): Likewise.
11758 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11760         PR libstdc++/85466
11761         * real.h (real_nextafter): Declare.
11762         * real.c (real_nextafter): New function.
11763         * fold-const-call.c (fold_const_nextafter): New function.
11764         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11765         CASE_CFN_NEXTTOWARD.
11766         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11767         even when arg1_mode is different from arg0_mode.
11769 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11771         * doc/extend.texi (Deprecated Features): Remove
11772         -ffriend-injection.
11773         (Backwards Compatibility): Likewise.
11774         * doc/invoke.texi (C++ Language Options): Likewise.
11775         (C++ Dialect Options): Likewise.
11777 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11779         PR target/85530
11780         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11781         _mm512_mask_mullox_epi64): New intrinsics.
11783 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11785         PR testsuite/85106
11786         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11787         dump files): Add offload-tree.
11789 2018-05-03  Richard Biener  <rguenther@suse.de>
11791         PR tree-optimization/85615
11792         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11793         to loops not nested in BBs loop father to avoid creating multi-entry
11794         loops.
11796 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11798         PR tree-optimization/70291
11799         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11800         arguments.  Change return type to tree.  Emit libcall as a new
11801         statement rather than replacing existing one when inplace_p is true.
11802         (expand_complex_multiplication_components): New function.
11803         (expand_complex_multiplication): Expand floating-point complex
11804         multiplication using the above.
11805         (expand_complex_division): Rename inner_type parameter to type.
11806         Update expand_complex_libcall call-site.
11807         (expand_complex_operations_1): Update expand_complex_multiplication
11808         and expand_complex_division call-sites.
11810 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11812         PR target/85582
11813         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11814         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11815         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11816         the highest significant bit of the shift count mask is clear.  In
11817         check whether and[sq]i3 is needed verify that all significant bits
11818         of the shift count other than the highest are set.
11820 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11822         PR libgomp/82428
11823         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11824         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11825         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11826         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11827         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11828         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11829         __builtin_goacc_parlevel_size.
11831 2018-05-02  Richard Biener  <rguenther@suse.de>
11833         PR tree-optimization/85597
11834         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11835         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11836         directly.
11838 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11840         PR testsuite/85106
11841         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11842         dump files): Add ltrans-tree.
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 wpa-ipa.
11850 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11852         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11853         powerpc*-*-linux*paired* target.
11854         * config/rs6000/750cl.h: Delete.
11855         * config/rs6000/paired.h: Delete.
11856         * config/rs6000/paired.md: Delete.
11857         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11858         float support.
11859         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11860         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11861         comment.  Remove paired float support.
11862         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11863         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11864         VECTOR_PAIRED.
11865         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11866         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11867         declarations.
11868         * config/rs6000/rs6000.c: Remove paired float support.
11869         (paired_expand_vector_init, paired_expand_vector_move,
11870         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11871         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11872         paired_expand_builtin, paired_expand_predicate_builtin,
11873         paired_init_builtins): Delete.
11874         * config/rs6000/rs6000.h: Remove paired float support.
11875         * config/rs6000/rs6000.md: Remove paired float support.
11876         (move_from_CR_ov_bit): Delete.
11877         * config/rs6000/rs6000.opt (mpaired): Delete.
11878         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11879         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11881 2018-05-02  Richard Biener  <rguenther@suse.de>
11883         PR middle-end/85567
11884         * gimplify.c (gimplify_save_expr): When in SSA form allow
11885         SAVE_EXPRs to compute to SSA vars.
11887 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11889         PR target/85582
11890         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11891         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11892         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11893         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11895 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11897         PR tree-optimization/85586
11898         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11899         exit early for statements in the same group if the accesses are
11900         not strided.
11902 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11904         PR lto/85451
11905         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11906         error message.
11908 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11910         PR tree-optimization/85143
11911         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11913 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11915         PR lto/85451
11916         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11917         not found" error message.
11919 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11921         PR other/83786
11922         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11923         * vec.c (test_ordered_remove_if): New function.
11924         (vec_c_tests): Call test_ordered_remove_if.
11925         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11926         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11927         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11928         VEC_ORDERED_REMOVE_IF.
11930 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11932         PR tree-optimization/82665
11933         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11934         pointer subtraction where arguments come from a memchr call.
11936 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11938         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11939         --push-state --as-needed and --pop-state instead of --as-needed and
11940         --no-as-needed if ld supports it.
11941         * configure: Regenerated.
11943         PR web/85578
11944         * doc/install.texi2html: Replace _002d with - and _002a with * in
11945         generated html files using sed.
11947 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11949         PR c++/85523
11950         * gcc-rich-location.c (blank_line_before_p): New function.
11951         (use_new_line): New function.
11952         (gcc_rich_location::add_fixit_insert_formatted): New function.
11953         * gcc-rich-location.h
11954         (gcc_rich_location::add_fixit_insert_formatted): New function.
11956 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11958         * selftest.c (assert_streq): Rename "expected" and "actual" to
11959         "val1" and "val2".  Extend NULL-handling to cover both inputs
11960         symmetrically, while still requiring both to be non-NULL for a pass.
11961         * selftest.h (assert_streq): Rename "expected" and "actual" to
11962         "val1" and "val2".
11963         (ASSERT_EQ): Likewise.
11964         (ASSERT_EQ_AT): Likewise.
11965         (ASSERT_KNOWN_EQ): Likewise.
11966         (ASSERT_KNOWN_EQ_AT): Likewise.
11967         (ASSERT_NE): Likewise.
11968         (ASSERT_MAYBE_NE): Likewise.
11969         (ASSERT_MAYBE_NE_AT): Likewise.
11970         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11971         the assertion to pass.
11972         (ASSERT_STREQ_AT): Likewise.
11974 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11976         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11977         interaction with -pie.
11979 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11981         * selftest.h: Fix alphabetization of per-source-file selftest
11982         declarations.
11984 2018-04-30  Jason Merrill  <jason@redhat.com>
11986         PR c++/61982 - dead stores to destroyed objects.
11987         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11988         of clobber.
11990 2018-04-30  Jason Merrill  <jason@redhat.com>
11992         * tree.c (build_clobber): New.
11993         * tree.h: Declare it.
11994         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11996 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11998         * diagnostic-show-locus.c (layout::layout): Update for
11999         location_get_source_line returning a char_span.
12000         (struct char_span): Move to input.h.
12001         (struct correction): Update for fields in char_span becoming
12002         private.
12003         (struct source_line): Update for location_get_source_line
12004         returning a char_span.
12005         (layout::print_line): Likewise.
12006         * edit-context.c (edited_file::print_content): Likewise.
12007         (edited_file::print_diff_hunk): Likewise.
12008         (edited_file::print_run_of_changed_lines): Likewise.
12009         (edited_file::get_num_lines): Likewise.
12010         (edited_line::edited_line): Likewise.
12011         * final.c (asm_show_source): Likewise.
12012         * input.c (location_get_source_line): Convert return type
12013         from const char * to char_span, losing the final "line_len"
12014         param.
12015         (dump_location_info): Update for the above.
12016         (get_substring_ranges_for_loc): Likewise.  Use a char_span
12017         when handling the literal within the line.
12018         (test_reading_source_line): Update for location_get_source_line
12019         returning a char_span.
12020         * input.h (class char_span): Move here from
12021         diagnostic-show-locus.c, converting from a struct to a class.
12022         Make data members private.
12023         (char_span::operator bool): New.
12024         (char_span::length): New.
12025         (char_span::get_buffer): New.
12026         (char_span::operator[]): New.
12027         (char_span::subspan): Make const.
12028         (char_span::xstrdup): New.
12029         (location_get_source_line): Convert return type from const char *
12030         to char_span, losing the final "line_size" param.
12032 2018-04-30  Jan Hubicka  <jh@suse.cz>
12034         * lto-wrapper.c (ltrans_priorities): New static var.
12035         (cmp_priority): New.
12036         (run_gcc): Read priorities and if doing parallel build order
12037         the Makefile by them.
12039 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12041         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12043 2018-04-30  Richard Biener  <rguenther@suse.de>
12045         * tree-cfg.c (verify_address): Remove base argument, add
12046         flag whether to check TREE_ADDRESSABLE and do that.
12047         (verify_expr): Remove.
12048         (verify_types_in_gimple_reference): Add pieces from verify_expr.
12049         (verify_gimple_assign_single): Likewise.
12050         (verify_gimple_switch): Likewise.
12051         (verify_expr_location_1): Dereference tp once.  Add (disabled)
12052         piece from verify_expr.
12053         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12055 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12057         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12059 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12061         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12062         (small_data_pattern): Likewise.
12063         (arc_rewrite_small_data): Likewise.
12064         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12065         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12066         (get_symbol_alignment): New function.
12067         (legitimate_small_data_address_p): Likewise.
12068         (legitimate_scaled_address): Update, call
12069         legitimate_small_data_address_p.
12070         (output_sdata): New static variable.
12071         (arc_print_operand): Update how we handle small data operands.
12072         (arc_print_operand_address): Likewise.
12073         (arc_legitimate_address_p): Update, use
12074         legitimate_small_data_address_p.
12075         (arc_rewrite_small_data_p): Remove.
12076         (arc_rewrite_small_data_1): Likewise.
12077         (arc_rewrite_small_data): Likewise.
12078         (small_data_pattern): Likewise.
12079         (compact_sda_memory_operand): Update to use
12080         legitimate_small_data_address_p and get_symbol_alignment.
12081         (prepare_move_operands): Don't rewite sdata pattern.
12082         (prepare_extend_operands): Remove.
12083         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12084         pattern.
12085         (zero_extendqisi2): Likewise.
12086         (zero_extendhisi2): Likewise.
12087         (extendqihi2): Likewise.
12088         (extendqisi2): Likewise.
12089         (extendhisi2): Likewise.
12090         (addsi3): Likewise.
12091         (subsi3): Likewise.
12092         (andsi3): Likewise.
12093         * config/arc/constraints.md (Usd): Change it to memory constraint.
12095 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12097         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12098         as source of std instructions.
12099         * config/arc/arc.md (movsi_insn): Update pattern predicate to
12100         allow 6-bit constants as source for store instructions.
12101         (movdi_insn): Update instruction pattern to allow 6-bit constants
12102         as source for store instructions.
12104 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
12106         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12108 2018-04-30  Nathan Sidwell  <nathan@acm.org>
12109             Sandra Loosemore <sandra@codesourcery.com>
12111         * dumpfile.c (dump_open): Allow '-' for stdout.
12112         * doc/invoke.texi (Developer Options): Document dump filename
12113         determination early.  Document stdin/stdout selection.
12115 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
12117         Microblaze Target: PIC data text relative
12119         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12120         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12121         Add declaration.
12122         * config/microblaze/microblaze.h (microblaze_constant_address_p):
12123         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12124         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12125         New addressing mode for data-text relative position indepenedent code.
12126         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12127         'ADDRESS_SYMBOLIC_TXT_REL'.
12128         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12129         (microblaze_legitimate_pic_operand): Exclude function calls from
12130         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12131         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12132         addresses cases.
12133         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12134         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12135         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12136         for 'address + offset'.
12137         (microblaze_expand_prologue): Add new function prologue call for
12138         'r20' assignation.
12139         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12140         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12141         table in case of TARGET_PIC_DATA_TEXT_REL.
12142         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12143         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12144         Add new macros 'UNSPEC_TEXT',
12145         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12146         + exclude function calls from 'UNSPEC_PLT' in case of data text
12147         relative mode.
12148         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12149         new target hook for generating address diff vector tables in case of
12150         flag_pic.
12151         * doc/tm.texi : Regenerate.
12152         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12153         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12154         of addr diff vector generation.
12155         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12156         target hook definition.
12157         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12158         Add default function for generate_pic_addr_diff_vec -> flag_pic.
12159         * doc/invoke.texi (Add new pic option): Add new microblaze pic
12160         option for data text relative.
12162 2018-04-30  Richard Biener  <rguenther@suse.de>
12164         * tree-chrec.h (evolution_function_is_constant_p): Remove
12165         redundant check.
12166         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12168 2018-04-30  Richard Biener  <rguenther@suse.de>
12170         PR bootstrap/85571
12171         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12173 2018-04-30  Richard Biener  <rguenther@suse.de>
12175         PR tree-optimization/28364
12176         PR tree-optimization/85275
12177         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12178         copying first exit test.
12180 2018-04-28  Mark Wielaard  <mark@klomp.org>
12182         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12183         dwarf_version >= 5.
12184         (dwarf_AT): Handle DW_AT_addr_base.
12185         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12187 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
12189         PR target/84431
12190         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12191         (*ashl<dwi>3_doubleword_mask_1): Ditto.
12192         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12193         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12195 2018-04-28  Richard Biener  <rguenther@suse.de>
12197         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12198         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12199         to reflect use.  Only add interesting stmts.
12201 2018-04-27  Martin Jambor  <mjambor@suse.cz>
12203         PR ipa/85549
12204         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12205         the jump function allows for passing through aggregate values.
12207 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
12209         * input.h (in_system_header_at): Convert from macro to inline
12210         function.
12211         (from_macro_expansion_at): Likewise.
12212         (from_macro_definition_at): Likewise.
12214 2018-04-27  Jeff Law  <law@redhat.com>
12216         * config.gcc: Mark tile* targets as deprecated/obsolete.
12218 2018-04-27  Richard Biener  <rguenther@suse.de>
12220         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12221         fix for ILP32.
12223 2018-04-27  Richard Biener  <rguenther@suse.de>
12225         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12227 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
12229         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12230         with Yd constraint. Set "preferred_for_speed" attribute from
12231         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12232         with Yd constraint.
12233         (*movdi_internal): Ditto.
12234         (movti_interunit splitters): Remove
12235         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12236         (movdi_interunit splitters): Ditto.
12237         * config/i386/constraints.md (Ye): Remove.
12238         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12240 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12242         PR target/85512
12243         * config/aarch64/constraints.md (Usg): Limit to 31.
12244         (Usj): Limit to 63.
12246 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
12248         PR tree-optimization/85529
12249         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12250         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12251         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12252         zero extension or masking of the MSB bit.
12253         (optimize_range_tests): Add FIRST_BB argument, pass it through
12254         to optimize_range_tests_var_bound.
12255         (maybe_optimize_range_tests, reassociate_bb): Adjust
12256         optimize_range_tests callers.
12258 2018-04-26  Richard Biener  <rguenther@suse.de>
12259             Jakub Jelinek  <jakub@redhat.com>
12261         * cgraph.h (symbol_table): Just declare debug method here.
12262         * symtab.c (symbol_table::debug): Define.
12264 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
12266         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12268 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
12270         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12271         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12272         (*movdi_internal): Substitute Yi and Yj constraint with x
12273         and Ym and Yn constraint with y constraint.  Update "isa"
12274         attribute and set "preferred_for_speed" attribute from
12275         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12276         (*movsi_internal): Ditto.
12277         (*movdf_internal): Ditto.
12278         (*movsf_internal): Ditto.
12279         (*zero_extendsidi2): Ditto.
12280         * config/i386/sse.md (vec_set<mode>_0): Ditto.
12281         (sse2_loadld): Ditto.
12282         (*vec_extract<ssevecmodelower>_0): Ditto.
12283         (*vec_extractv4si_0_zext_sse4): Ditto.
12284         (vec_concatv2di): Ditto.
12285         (*vec_dup<mode>): Ditto.
12286         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12287         * config/i386/constraints.md (Yi): Remove.
12288         (Yj): Remove.
12289         (Ym): Remove.
12290         (Yn): Remove.
12292 2018-04-26  Nathan Sidwell  <nathan@acm.org>
12294         * dumpfile.c (dump_open): New.
12295         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12296         (dump_finish): Detect stdio/stderr by value not name.
12298 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
12300         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12302 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12304         PR target/84952
12305         * config/nvptx/nvptx.c (verify_neutering_jumps)
12306         (verify_neutering_labels): New function
12307         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12309 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12311         PR target/84025
12312         * config/nvptx/nvptx.c (needs_neutering_p): New function.
12313         (nvptx_single): Use needs_neutering_p to skip over insns that do not
12314         need neutering.
12316 2018-04-26  Richard Biener <rguenther@suse.de>
12317             Tom de Vries  <tom@codesourcery.com>
12319         PR lto/85422
12320         * lto-streamer-out.c (output_function): Fixup loops if required to match
12321         discovery done in the reader.
12323 2018-04-26  Richard Biener  <rguenther@suse.de>
12325         PR tree-optimization/85116
12326         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12327         have a loop exit from the single latch predecessor.  Remove
12328         case of header with just condition.
12329         (ch_base::copy_headers): Exclude infinite loops from any
12330         processing.
12331         (pass_ch::execute): Record exits.
12333 2018-04-26  Richard Biener  <rguenther@suse.de>
12335         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12336         prologue cost vector and pass it to vect_get_load_cost.
12337         (vect_get_peeling_costs_all_drs): Likewise.
12338         (vect_peeling_hash_get_lowest_cost): Likewise.
12339         (vect_enhance_data_refs_alignment): Likewise.
12341 2018-04-26  Richard Biener  <rguenther@suse.de>
12343         PR middle-end/85450
12344         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12345         checking of integer<->pointer conversions.
12346         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12347         sign-/zero-extending pointer types.
12348         (expand_omp_for_static_chunk): Likewise.
12350 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
12351             Jean Lee  <xiaoyur347@gmail.com>
12353         * config/mips/mips.c (mips_asan_shadow_offset): New function.
12354         (TARGET_ASAN_SHADOW_OFFSET): Define.
12355         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12356         true for -fsanitize=address.
12358 2018-04-25  Mark Wielaard  <mark@klomp.org>
12360         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12361         shorter ones.
12363 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12365         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12366         than "alu", remove explicit "memory" and "imm_disp" attributes.
12367         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12369         PR middle-end/85414
12370         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12371         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12372         gen_lowpart_no_emit.
12374 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
12376         PR target/85473
12377         * config/i386/i386.c (ix86_expand_builtin): Change memory
12378         operand to XI, extend p0 to Pmode.
12379         * config/i386/i386.md: Change unspec volatile and operand
12380         1 mode to XI, change operand 0 mode to P.
12382 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12384         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12385         GET_MODE_MASK before any checking.
12386         (nds32_can_use_bset_p): Likewise.
12387         (nds32_can_use_btgl_p): Likewise.
12389 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12391         * config/nds32/nds32-doubleword.md: New define_split pattern for
12392         illegal register number.
12394 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12396         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12398 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12400         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12402 2018-04-25  Richard Biener  <rguenther@suse.de>
12404         * lto-streamer.h (LTO_major_version): Bump to 8.
12406 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12408         * BASE-VER: Set to 9.0.0.
12410 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
12412         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12413         in __abskf2 and __powikf2.
12415 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12417         PR target/85512
12418         * config/aarch64/constraints.md (Usg, Usj): New constraints.
12419         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12420         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12421         Use the above on operand 2.  Reindent.
12422         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12424 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12426         PR target/85485
12427         * common/config/i386/i386-common.c (ix86_handle_option): Don't
12428         handle OPT_mcet.
12429         * config/i386/i386.opt (mcet): Removed.
12430         * doc/install.texi: Remove -mcet documentation.
12431         * doc/invoke.texi: Likewise.
12433 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12435         PR target/85485
12436         * doc/install.texi: Remove -mcet from bootstrap-cet.
12438 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12440         PR target/85511
12441         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12442         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12443         if TARGET_64BIT.
12445         PR target/85503
12446         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12447         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12448         containing a CONST_VECTOR.
12450 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
12452         * doc/install.texi: Update newlib dependency for nvptx.
12454 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12456         PR target/85508
12457         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12458         instead of INTVAL when shifting x left.
12460 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12462         PR tree-optimization/85478
12463         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12464         vect_grouped_store_supported for single element vectors.
12466 2018-04-24  Richard Biener  <rguenther@suse.de>
12468         PR target/85491
12469         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12470         load cost increase to the case of non-constant step.
12472 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12474         PR target/84828
12475         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12476         destination if any_malformed_asm.
12478 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
12480         PR middle-end/85496
12481         * expr.c (store_field): In the bitfield case, if the value comes from
12482         a function call and is returned in registers by means of a PARALLEL,
12483         do not change the mode of the temporary unless BLKmode and VOIDmode.
12485 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12487         PR rtl-optimization/85423
12488         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12489         dependencies to debug insns when the previous insn is non-debug.
12491 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12493         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12494         enums into a single definition.
12495         (fls): Fix predicates and printing.
12496         (seti): Likewise.
12498 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12500         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12501         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12502         and short u6 immediate.
12503         (check_if_valid_sleep_operand): Remove.
12504         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12506 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12508         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12509         flag_always_save_lp condition.
12510         * config/nds32/nds32.opt (malways-save-lp): New option.
12512 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12514         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12515         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12516         * config/nds32/nds32.h
12517         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12518         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12520 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12522         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12523         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12525 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12526             Chung-Ju Wu  <jasonwucj@gmail.com>
12528         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12529         Declare.
12530         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12531         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12533 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12535         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12537 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12539         * config/nds32/nds32-protos.h (nds32_data_alignment,
12540         nds32_local_alignment): Declare.
12541         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12542         nds32_local_alignment): New functions.
12543         (TARGET_CONSTANT_ALIGNMENT): Define.
12544         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12546 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12548         * config/nds32/nds32.c
12549         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12550         (TARGET_MODES_TIEABLE_P): Likewise.
12552 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12554         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12555         level Ofast and Og.
12557 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12558             Chung-Ju Wu  <jasonwucj@gmail.com>
12560         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12561         for unaligned access.
12562         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12563         unaligned access.
12564         * config/nds32/nds32-intrinsic.md: Likewise.
12565         * config/nds32/nds32_intrinsic.h: Likewise.
12566         * config/nds32/nds32.h (nds32_builtins): Likewise.
12567         * config/nds32/nds32.opt (munaligned-access): New option.
12568         * config/nds32/nds32.c (nds32_asm_file_start): Display
12569         flag_unaligned_access status.
12571 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12573         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12574         -mno-relax is present.
12575         * config/riscv/linux.h (LINK_SPEC): Ditto.
12577 2018-04-20  Martin Sebor  <msebor@redhat.com>
12579         PR c/85365
12580         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12581         for null pointers.
12582         (gimple_fold_builtin_stxcpy_chk): Same.
12583         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12585 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12587         PR target/85456
12588         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12589         __powikf2 when long double is IEEE 128-bit.
12591 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12593         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12594         step to make sure stack always aligned.
12596 2018-04-20  Carl Love  <cel@us.ibm.com>
12598         PR target/83402
12599         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12600         size check for arg0.
12602 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12603             Tom de Vries  <tom@codesourcery.com>
12605         PR target/85445
12606         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12607         Emit insns for calls too.
12608         (nvptx_find_par): Always look for worker-level predecessor insn.
12609         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12610         calls.
12611         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12612         (nvptx_process_pars): Propagate frames for calls.
12614 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12616         PR target/85469
12617         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12618         Removed.
12619         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12620         (ix86_handle_option): Don't handle OPT_mibt.
12621         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12622         __SHSTK__.
12623         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12624         has_ibt and ibt.
12625         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12626         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12627         (ix86_target_macros): Define __CET__ with flag_cf_protection
12628         for -fcf-protection.
12629         * config/i386/i386.c (isa2_opts): Remove -mibt.
12630         * config/i386/i386.h (TARGET_IBT): Removed.
12631         (TARGET_IBT_P): Likewise.
12632         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12633         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12634         * config/i386/i386.opt (mcet): Update help message.
12635         (mshstk): Likewise.
12636         (mibt): Removed.
12637         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12638         -mcet as an alias for -mshstk.
12640 2018-04-20  Richard Biener <rguenther@suse.de>
12642         PR middle-end/85475
12643         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12644         complexity by forcing a single use of the multiply operand.
12646 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12648         ipa/85449
12649         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12650         recursion dependency to only apply to non-clones.
12652 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12654         ipa/85447
12655         * ipa-cp.c (create_specialized_node): Check that clones of
12656         self-recursive edges exist during IPA-CP.
12658 2018-04-19  Toon Moene  <toon@moene.org>
12660         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12661         by -O3.
12663 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12665         PR tree-optimization/85467
12666         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12667         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12668         VECTOR_CST element to type.
12670 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12672         PR target/85397
12673         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12674         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12675         (builtin_longjmp): Likewise.
12676         (save_stack_nonlocal): New pattern.
12677         (restore_stack_nonlocal): Likewise.
12679 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12681         PR target/85404
12682         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12683         Replace ASM_OUTPUT_LABEL with fprintf.
12685 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12687         PR target/85417
12688         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12689         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12690         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12691         define __IBT__ and __SHSTK__ for -fcf-protection.
12692         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12693         TARGET_IBT.
12694         (ix86_trampoline_init): Likewise.
12695         (x86_output_mi_thunk): Likewise.
12696         (ix86_notrack_prefixed_insn_p): Likewise.
12697         (ix86_option_override_internal): Don't disallow -fcf-protection.
12698         * config/i386/i386.md (rdssp<mode>): Also enable for
12699         -fcf-protection.
12700         (incssp<mode>): Likewise.
12701         (nop_endbr): Likewise.
12702         * config/i386/i386.opt (mcet): Change help message to built-in
12703         functions only.
12704         (mibt): Likewise.
12705         (mshstk): Likewise.
12706         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12707         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12708         enable CET built-in functions.
12710 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12712         * common/config/i386/i386-common.c
12713         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12714         OPTION_MASK_ISA_MOVDIRI_UNSET,
12715         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12716         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12717         * config.gcc (movdirintrin.h): New header.
12718         * config/i386/cpuid.h (bit_MOVDIRI,
12719         bit_MOVDIR64B): New bits.
12720         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12721         and -mmvodir64b.
12722         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12723         (VOID, PVOID, PCVOID)): New function types.
12724         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12725         __builtin_ia32_directstoreu_u64,
12726         __builtin_ia32_movdir64b): New builtins.
12727         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12728         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12729         and -mmovdiri.
12730         (ix86_valid_target_attribute_inner_p): Ditto.
12731         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12732         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12733         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12734         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12735         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12736         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12737         (movdiri<mode>, movdir64b_<mode>): New.
12738         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12739         * config/i386/immintrin.h: Include movdirintrin.h.
12740         * config/i386/movdirintrin.h: New file.
12741         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12743 2018-04-19  Richard Biener  <rguenther@suse.de>
12745         PR middle-end/85455
12746         * cfg.c (clear_bb_flags): When loop state says we have
12747         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12749 2018-04-19  Richard Biener  <rguenther@suse.de>
12751         PR tree-optimization/84737
12752         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12753         copying restrict info.
12754         (vect_setup_realignment): Use it.
12755         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12756         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12757         the first DR to all generated stores.
12758         (vectorizable_load): Likewise for loads.
12760 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12762         PR tree-optimization/85446
12763         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12764         the integral and pointer types to have the same precision.
12766         * doc/install.texi: Document --disable-cet being the default and
12767         --enable-cet=auto.
12769 2018-04-18  Martin Liska  <mliska@suse.cz>
12771         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12772         style.
12774 2018-04-18  Martin Liska  <mliska@suse.cz>
12776         Revert
12777         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12779         PR ipa/83983
12780         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12781         arguments if they are comparable.
12783 2018-04-18  Martin Liska  <mliska@suse.cz>
12785         Revert
12786         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12788         PR lto/84805
12789         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12790         incomplete types.
12792 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12794         PR target/85388
12795         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12796         ENDBR after calling __morestack.
12798 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12800         PR jit/85384
12801         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12802         by using gcc_base_ver to generate a gcc_driver_version, and use
12803         it when generating GCC_DRIVER_NAME.
12804         * configure: Regenerate.
12806 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12808         PR target/81084
12809         * config.gcc: Obsolete powerpc*-*-*spe*.
12811 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12813         PR debug/84637
12814         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12815         (stabstr_D): Change type of unum from unsigned int to
12816         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12817         type.
12819 2018-04-17  Jim Wilson  <jimw@sifive.com>
12821         PR 84856
12822         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12823         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12824         Set arg_pointer_offset after using pretend_args_size.
12826 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12828         PR rtl-optimization/85431
12829         * dse.c (record_store): Ignore zero width stores.
12831         PR sanitizer/85230
12832         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12833         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12834         __builtin_stack_restore rather than after it.
12835         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12836         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12837         argument instead of virtual_dynamic_stack_rtx.
12839 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12841         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12842         New prototype.
12843         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12844         Add note to error message to explain internal mapping of overloaded
12845         built-in function name to non-overloaded built-in function name.
12846         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12847         function.
12849 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12851         PR target/85424
12852         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12853         where the inputs overlap with the output.
12855 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12857         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12858         (=v, v) alternative and explicit "memory" attribute.
12859         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12860         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12861         attributes.
12862         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12863         "sselog1" type instead of "sselog".
12864         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12865         "sselog".  Remove explicit "memory" attribute.
12866         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12867         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12868         attributes.
12869         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12870         "sselog1" type instead of "sselog".  Remove explicit "memory"
12871         attribute.
12872         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12873         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12874         attribute.
12875         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12876         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12877         attributes.
12878         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12879         "sselog1" type instead of "sselog".  Remove explicit "memory"
12880         attribute.
12881         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12882         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12883         attribute.
12885         PR target/85430
12886         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12888         PR middle-end/85414
12889         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12890         on a SUBREG.
12892 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12894         PR ipa/85421
12895         * ipa-cp.c (create_specialized_node): Call
12896         expand_all_artificial_thunks if necessary.
12898 2018-04-17  Martin Liska  <mliska@suse.cz>
12900         PR lto/85405
12901         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12902         in message, remote space in between '_G' and '('.
12904 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12906         PR target/85281
12907         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12908         avx512f_vmcmp<mode>3<round_saeonly_name>,
12909         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12910         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12911         avx512f_rndscale<mode><round_saeonly_name>,
12912         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12913         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12914         Use %<iptr>2 instead of %2 for -masm=intel.
12915         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12916         avx512f_vcvttss2usi<round_saeonly_name>,
12917         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12918         -masm=intel.
12919         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12920         avx512f_vcvttsd2usi<round_saeonly_name>,
12921         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12922         Use %q1 instead of %1 for -masm=intel.
12923         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12924         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12925         of %3 for -masm=intel.
12926         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12927         -masm=intel.
12928         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12929         -masm=intel.
12930         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12931         -masm=intel.
12932         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12933         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12934         %g1.
12935         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12936         -masm=intel.
12937         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12938         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12939         %g1 and one with %0 and %1.
12940         (avx512er_vmrcp28<mode><round_saeonly_name>,
12941         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12942         %1 for -masm=intel.
12943         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12944         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12945         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12946         of %0 and %{%4%} for -masm=intel.
12947         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12948         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12949         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12950         order of %0 and %{%5%}%{z%} for -masm=intel.
12952 2018-04-17  Jan Hubicka  <jh@suse.cz>
12954         PR lto/85405
12955         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12957 2018-04-17  Martin Liska  <mliska@suse.cz>
12959         PR ipa/85329
12960         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12961         for target_clone error message.  Make default implementation
12962         clone to be a local declaration.
12963         (separate_attrs): Add new argument and check for an empty
12964         string.
12965         (expand_target_clones): Handle it.
12966         (ipa_target_clone): Make redirection just for target_clones
12967         functions.
12969 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12970             Tom de Vries  <tom@codesourcery.com>
12972         PR middle-end/84955
12973         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12974         tiled basic blocks without omp continue statements.
12976 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12978         PR target/83660
12979         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12980         vec_extract expression as having side effects to make sure it gets
12981         a cleanup point.
12983 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12985         PR target/85403
12986         * config/i386/i386.c (get_builtin_code_for_version): Check
12987         error_mark_node.
12989 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12991         PR target/84331
12992         * config.gcc: Support "skylake".
12993         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12994         PROCESSOR_SKYLAKE.
12995         * config/i386/i386.c (m_SKYLAKE): Define.
12996         (processor_target_table): Add "skylake".
12997         (ix86_option_override_internal): Add "skylake".
12998         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12999         PROCESSOR_CANNONLAKE.
13000         (get_builtin_code_for_version): Fix priority for
13001         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13002         PROCESSOR_SKYLAKE-AVX512.
13003         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13004         (processor_type): Add PROCESSOR_SKYLAKE.
13006 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
13007             Jason Merrill  <jason@redhat.com>
13009         PR c++/85112
13010         * convert.c (convert_to_integer_1): Use direct recursion for
13011         enumeral types and types with a precision less than the number
13012         of bits in their mode.
13014 2018-04-16  Julia Koval  <julia.koval@intel.com>
13016         PR target/84413
13017         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13018         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13020 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
13022         PR target/85293
13023         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13024         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13025         and -mno-direct-move.
13027 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
13029         PR target/83402
13030         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13031         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13032         Ensure negative shifts result in {0}.
13034 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
13036         PR rtl-optimization/79916
13037         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13038         regs (if any) to define how to gnerate SD moves when LRA is in
13039         progress.
13041 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
13043         PR rtl-optimization/85393
13044         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13045         * except.c (expand_dw2_landing_pad_for_region): Make static.
13046         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13047         a label and unconditional jump to old_bb, rather than
13048         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13049         basic block.
13051         PR rtl-optimization/85376
13052         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13053         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13054         instead of a specific value.
13056 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13057             Bin Cheng  <bin.cheng@arm.com>
13059         PR tree-optimization/82965
13060         PR tree-optimization/83991
13061         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13062         by_profile_only parameter.
13063         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13064         information if the loop was predicted to iterate too many times.
13065         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13067 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13069         PR lto/71991
13070         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13071         always inline.
13073 2018-04-13  Martin Liska  <mliska@suse.cz>
13074             Jakub Jelinek  <jakub@redhat.com>
13076         PR middle-end/81657
13077         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13078         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13079         * builtins.c (expand_builtin_memory_copy_args): Use
13080         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13081         handle dest_addr == pc_rtx.
13083 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
13085         PR target/85291
13086         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13087         asked to not generate direct moves.
13088         (fix_trunc<mode>si2_stfiwx): Similar.
13089         (fix_trunc<mode>si2_internal): Similar.
13091 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13093         PR debug/83157
13094         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13095         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13096         lookup if dest in some wider mode is known to be const0_rtx and
13097         if so, record permanent equivalence for it to be ZERO_EXTEND of
13098         the narrower mode destination.
13100 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13102         * lto-streamer-out.c (output_function): Revert 259346.
13103         * omp-expand.c (expand_oacc_for): Likewise.
13105 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
13107         PR rtl-optimization/85354
13108         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13109         * sel-sched.c (sel_global_init): ... here.
13111 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
13113         PR target/85238
13114         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13115         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13116         mode for PE-COFF targets.
13117         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13118         (i386_pe_asm_lto_end): Likewise.
13119         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13120         (TARGET_ASM_LTO_END): Likewise.
13121         * config/i386/winnt.c (saved_debug_info_level): New static variable.
13122         (i386_pe_asm_lto_start): New function.
13123         (i386_pe_asm_lto_end): Likewise.
13125 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13126             Richard Biener  <rguenther@suse.de>
13128         PR middle-end/84955
13129         * lto-streamer-out.c (output_function): Fix CFG loop state before
13130         streaming out.
13131         * omp-expand.c (expand_oacc_for): Handle calls to internal
13132         functions like regular functions.
13134 2018-04-12  Richard Biener  <rguenther@suse.de>
13136         PR lto/85371
13137         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13138         for the early LTO debug to properly generate references to it
13139         during DIE emission.  Do not re-use that for the skeleton for
13140         split-dwarf.
13141         (dwarf2out_early_finish): Likewise.
13143 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13145         PR target/85328
13146         * config/i386/sse.md
13147         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13148         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13149         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13150         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13151         and output is a reg, avoid creating invalid lowpart subreg, but
13152         instead split into a 512-bit move.  Don't split if not AVX512VL,
13153         input is xmm16+ reg and output is a mem.
13154         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13155         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13156         xmm16+ reg and output is a mem.
13158 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13160         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13161         also for flag_dwarf2_cfi_asm.
13163 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13165         PR rtl-optimization/85342
13166         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13167         a bool scalar var inside of the loop instead.  Don't try to update
13168         recog_data.operand after failed apply_change_group.
13170 2018-04-12  Tom de Vries  <tom@codesourcery.com>
13172         PR target/85296
13173         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13174         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
13175         array with flexible array member as array without given dimension.
13176         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13177         argument for undefined param to true.
13179 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
13181         PR target/85321
13182         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13183         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13184         from PowerPC section.
13185         * config/rs6000/sysv4.opt (mcall-): Improve help text.
13186         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13187         help text that is too long.
13188         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13189         help text that is too long.
13190         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13191         help text that is too long.
13193 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
13195         * config/alpha/alpha.md (stack_probe_internal): Rename
13196         from "probe_stack".  Update all callers.
13198 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13200         PR rtl-optimization/84566
13201         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13202         sched_macro_fuse_insns.
13204 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13206         PR target/84301
13207         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13208         (compute_block_dependences): ... from here.
13210 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13212         PR tree-optimization/85331
13213         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13214         from int to HOST_WIDE_INT.
13216 2018-04-11  Martin Jambor  <mjambor@suse.cz>
13218         PR ipa/84149
13219         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13220         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13221         not the same as the source val.
13222         (cgraph_edge_brings_value_p): New parameter.
13223         (gather_edges_for_value): Pass destination value to
13224         cgraph_edge_brings_value_p.
13225         (perhaps_add_new_callers): Likewise.
13226         (get_info_about_necessary_edges): Likewise and exclude values brought
13227         only by self-recursive edges.
13228         (create_specialized_node): Redirect only clones of self-calling edges.
13229         (+self_recursive_pass_through_p): New function.
13230         (find_more_scalar_values_for_callers_subset): Use it.
13231         (find_aggregate_values_for_callers_subset): Likewise.
13232         (known_aggs_to_agg_replacement_list): Removed.
13233         (decide_whether_version_node): Re-calculate known constants for all
13234         remaining context clones.
13236 2018-04-11  Richard Biener  <rguenther@suse.de>
13238         PR lto/85339
13239         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13240         from early DWARF output.
13241         (dwarf2out_early_finish): Output line info unconditionally into
13242         early DWARF and add reference to it.
13244 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13246         PR target/85281
13247         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13248         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13249         other than V2DFmode using iptr mode attribute.
13250         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13252 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13254         PR rtl-optimization/84659
13255         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13257 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13259         PR debug/85302
13260         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13261         SIZEP is NULL.
13262         (output_loc_list): Pass address of a dummy size variable even in the
13263         locview handling loop.
13264         (index_location_lists): Add comment on why skip_loc_list_entry can't
13265         call size_of_locs.
13267 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13269         PR target/85261
13270         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13271         into register.
13273 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
13275         PR target/85321
13276         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13277         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13278         and -mstring-compare-inline-limit.
13280 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13282         PR target/85287
13283         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13284         for stack clash protection in a register whenever we need it to be in
13285         a register.
13287 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13289         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13290         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13292 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13294         PR target/85321
13295         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13296         the help text.
13297         (mlong-double-): Ditto.
13298         * config/rs6000/sysv4.opt (msdata=): Ditto.
13299         (mtls-size=): Ditto.
13301 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13303         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13304         erroneous entries for
13305         "vector int vec_ldl (int, long int *)", and
13306         "vector unsigned int vec_ldl (int, unsigned long int *)".
13307         Add comments and entries for
13308         "vector bool char vec_ldl (int, bool char *)",
13309         "vector bool short vec_ldl (int, bool short *)",
13310         "vector bool int vec_ldl (int, bool int *)",
13311         "vector bool long long vec_ldl (int, bool long long *)",
13312         "vector pixel vec_ldl (int, pixel *)",
13313         "vector long long vec_ldl (int, long long *)",
13314         "vector unsigned long long vec_ldl (int, unsigned long long *)".
13315         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13316         type tree bool_long_long_type_node and correct definition of
13317         bool_V2DI_type_node to make reference to this new type tree.
13318         (rs6000_mangle_type): Replace erroneous reference to
13319         bool_long_type_node with bool_long_long_type_node.
13320         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13321         comments to emphasize sign distinctions for char and int types and
13322         replace RS6000_BTI_bool_long constant with
13323         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
13324         use of RS6000_BTI_pixel.
13325         (bool_long_type_node): Remove this macro definition.
13326         (bool_long_long_type_node): New macro definition
13328 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13330         PR rtl-optimization/85300
13331         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13332         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13333         simplify_unary_operation fails.
13335 2018-04-10  Martin Liska  <mliska@suse.cz>
13337         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13338         cgraph_edge and ipa_ref.
13340 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13342         PR target/85177
13343         PR target/85255
13344         * config/i386/sse.md
13345         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13346         computation of the VEC_MERGE selector from mask.
13347         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13348         Fix decoding of the VEC_MERGE selector into mask.
13350 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13352         PR tree-optimization/85286
13353         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13355 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13357         * final.c (final_1): Set insn_last_address as well as
13358         insn_current_address.
13360 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13362         PR target/85173
13363         * explow.c (emit_stack_probe): Call validize_mem on memory location
13364         before passing it to gen_probe_stack.  Create address operand and
13365         legitimize it for the probe_stack_address case.
13367 2018-04-09  Jan Hubicka  <jh@suse.cz>
13369         PR lto/85078
13370         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13371         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13372         * tree.c (free_lang_data_in_type): Fix handling of binfos;
13373         walk basetypes.
13374         (free_lang_data): Rebuild type inheritance graph.
13376 2018-04-09  Martin Sebor  <msebor@redhat.com>
13378         * invoke.texi (-finline-small-functions): Mention other optimization
13379         options.
13380         (-findirect-inlining, -fpartial-inlining): Same.
13381         (-finline-functions-called-once): Same.
13382         (-freorder-blocks-and-partition): Same.
13384 2018-04-09  Jan Hubicka  <jh@suse.cz>
13386         PR rtl/84058
13387         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13388         jumps; choose last target that matches the criteria (i.e.
13389         no partition changes for non-crossing jumps).
13390         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13391         support for redirecting crossing jumps to non-crossing.
13393 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
13395         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13396         also for naked functions.
13398 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
13400         * config/arc/arc.md (add_shift): New pattern.
13401         (add_shift2): Likewise.
13402         (sub_shift): Likewise.
13403         (sub_shift_cmp0_noout): Likewise.
13404         (compare_si_ashiftsi): Likewise.
13405         (xbfu_cmp0_noout): New combine pattern.
13406         (xbfu_cmp0"): Likewise.
13407         (movsi_set_cc_insn): Place the predicable variant first.
13408         (commutative_binary_cmp0_noout): Remove clobber.
13409         (commutative_binary_cmp0): New pattern.
13410         (noncommutative_binary_cmp0): Likewise.
13411         (noncommutative_binary_cmp0_noout): Likewise.
13412         (noncommutative_binary_comparison_result_used): Removed.
13413         (rsub_cmp0): New pattern.
13414         (rsub_cmp0_noout): Likewise.
13415         (extzvsi): Changed, keep only meaningful variants.
13416         (SQH, SEZ): New iterators.
13417         (SQH_postfix): New mode attribute.
13418         (SEZ_prefix): New code attribute.
13419         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13420         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13421         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13422         of numerical value.
13423         (noncommutative_operator): Check the availability of barrel
13424         shifter option.
13426 2018-04-09  Richard Biener  <rguenther@suse.de>
13428         PR tree-optimization/85284
13429         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13430         Only use the niter constraining form of simple_iv when the exit
13431         is always executed.
13433 2018-04-09  Tom de Vries  <tom@codesourcery.com>
13435         PR target/84041
13436         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13437         (define_expand "*memory_barrier"): New define_expand.
13438         (define_insn "memory_barrier"): New insn.
13440 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13442         PR rtl-optimization/80463
13443         PR rtl-optimization/83972
13444         PR rtl-optimization/83480
13446         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13447         correct producer for the insn.
13448         (tidy_control_flow): Fixup seqnos in case of debug insns.
13450 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13452         PR rtl-optimization/83913
13454         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13455         different sched-times when merging exprs.
13457 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13459         PR rtl-optimization/83962
13461         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13462         tidy_fallthru_edge and tidy_control_flow.
13464 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13466         PR rtl-optimization/83530
13468         * sel-sched.c (force_next_insn): New global variable.
13469         (remove_insn_for_debug): When force_next_insn is true, also leave only
13470         next insn in the ready list.
13471         (sel_sched_region): When the region wasn't scheduled, make another pass
13472         over it with force_next_insn set to 1.
13474 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13476         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13477         into tm_file.
13478         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13479         for interrupt control.
13480         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13481         functions for interrupt control.
13482         * config/nds32/nds32-intrinsic.md: Likewise.
13483         * config/nds32/nds32_intrinsic.h: Likewise.
13484         * config/nds32/nds32.h (nds32_builtins): Likewise.
13486 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13488         * config/nds32/nds32.c (nds32_init_machine_status,
13489         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13490         strict_aligned_p field.
13491         (nds32_expand_to_rtl_hook): New function.
13492         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13493         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13495 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13496             Chung-Ju Wu  <jasonwucj@gmail.com>
13498         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13499         * config/nds32/nds32-n7.md: New file.
13500         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13501         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13502         pipeline.
13503         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13504         * config/nds32/nds32.md (pipeline_model): Add n7.
13505         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13506         * config/nds32/pipelines.md: Include n7 settings.
13508 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13509             Chung-Ju Wu  <jasonwucj@gmail.com>
13511         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13512         * config/nds32/nds32-e8.md: New file.
13513         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13514         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13515         pipeline.
13516         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13517         * config/nds32/nds32.md (pipeline_model): Add e8.
13518         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13519         * config/nds32/pipelines.md: Include e8 settings.
13521 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13522             Chung-Ju Wu  <jasonwucj@gmail.com>
13524         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13525         * config/nds32/nds32-n8.md: New file.
13526         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13527         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13528         pipeline.
13529         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13530         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13531         * config/nds32/nds32.md (pipeline_model): Add n8.
13532         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13533         * config/nds32/pipelines.md: Include n8 settings.
13535 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13536             Chung-Ju Wu  <jasonwucj@gmail.com>
13538         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13539         * config/nds32/nds32-n9-2r1w.md: New file.
13540         * config/nds32/nds32-n9-3r2w.md: New file.
13541         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13542         nds32_register_ports): New or modify for cpu n9.
13543         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13544         pipeline.
13545         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13546         * config/nds32/nds32-utils.c: New file.
13547         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13548         TARGET_MUL_SLOW): Define.
13549         * config/nds32/nds32.md (pipeline_model): New attribute.
13550         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13551         New options that support cpu n9.
13552         * config/nds32/pipelines.md: Include n9 settings.
13553         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13555 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13557         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13558         information if necessary.
13559         (output_cond_branch_compare_zero): Likewise.
13560         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13561         (nds32_target_alignment): Refine for alignment.
13562         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13563         (FUNCTION_BOUNDARY): Modify.
13564         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13565         align case.
13566         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13568 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13570         * config/nds32/constants.md (unspec_volatile_element): Add values for
13571         TLB operation and data prefetch.
13572         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13573         functions for TLB operation and data prefetch.
13574         * config/nds32/nds32-intrinsic.md: Likewise.
13575         * config/nds32/nds32_intrinsic.h: Likewise.
13576         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13577         (nds32_print_operand): Likewise.
13578         * config/nds32/nds32.h (nds32_builtins): Likewise.
13580 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13581         Andrew Pinski <pinsika@gcc.gnu.org>
13583         PR middle-end/82976
13584         * match.pd: Use constant_boolean_node of correct type instead of
13585         boolean_true_node or boolean_false_node for simplifying
13586         pointer comparisons to zero.
13588 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13590         PR tree-optimization/80021
13591         * tree.c (verify_type_variant): Make error call in verify_variant_match
13592         translatable and remove final full stop.
13594 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13596         * config/nds32/constants.md (unspec_volatile_element): Add
13597         UNSPEC_VOLATILE_EH_RETURN.
13598         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13599         nds32_output_stack_pop): Support dwarf exception handling process.
13600         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13601         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13602         exception handling process.
13603         (nds32_compute_stack_frame): Likewise.
13604         (nds32_return_addr_rtx): Likewise.
13605         (nds32_initial_elimination_offset): Likewise.
13606         (nds32_expand_prologue): Likewise.
13607         (nds32_expand_epilogue): Likewise.
13608         (nds32_dynamic_chain_address): New function.
13609         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13610         exception handling.
13611         (DYNAMIC_CHAIN_ADDRESS): Define.
13612         (EH_RETURN_DATA_REGNO): Define.
13613         (EH_RETURN_STACKADJ_RTX): Define.
13614         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13615         patterns for dwarf exception handling.
13617 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13619         * config/nds32/nds32.h: Clean up obsolete macros.
13621 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13623         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13624         Add enum values for particular instructions.
13625         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13626         particular intrinsic functions.
13627         * config/nds32/nds32-intrinsic.md: Likewise.
13628         * config/nds32/nds32_intrinsic.h: Likewise.
13629         * config/nds32/nds32.h (nds32_builtins): Likewise.
13630         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13631         (btst, ave): New patterns for particular instructions.
13633 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13635         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13636         Add enum values for atomic load/store and memory sync.
13637         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13638         and memory sync.
13639         * config/nds32/nds32-intrinsic.md: Likewise.
13640         * config/nds32/nds32_intrinsic.h: Likewise.
13641         * config/nds32/nds32.h (nds32_builtins): Likewise.
13643 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13645         PR tree-optimization/85257
13646         * fold-const.c (native_encode_vector): If not all elts could fit
13647         and off is -1, return 0 rather than offset.
13648         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13649         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13650         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13651         adjust buffer in native_interpret_expr call.
13653 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13655         * config/nds32/constants.md (unspec_volatile_element): Add cache
13656         control enum values.
13657         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13658         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13659         * config/nds32/nds32.c (nds32_cctl_names): New.
13660         (nds32_print_operand): Handle cache control register names.
13661         * config/nds32/nds32.h (nds32_builtins): New enum values.
13662         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13663         macros.
13664         * config/nds32/nds32.md (type): Add mmu.
13665         * config/nds32/pipelines.md (simple_insn): Add mmu.
13667 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13669         * config/nds32/nds32.md (type): Remove call.
13670         * config/nds32/pipelines.md (simple_insn): Likewise.
13672 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13674         * config/nds32/constants.md (unspec_volatile_element): Add
13675         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13676         UNSPEC_VOLATILE_FMFCFG.
13677         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13678         description for fmfcfg and fmfcsr.
13679         (bdesc_1arg): Add fmtcsr.
13680         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13681         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13682         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13683         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13684         unspec_fmfcfg): New patterns.
13685         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13686         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13687         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13688         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13689         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13690         __nds32__fmfcfg): Define.
13692 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13694         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13695         intrinsic register names.
13696         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13697         intrinsic register enum values and macros.
13699 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13701         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13702         for load/store addressing form.
13703         (nds32_print_operand_address): Likewise.
13705 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13707         PR target/85196
13708         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13709         based on LABEL_REF.  Remove useless assertion.
13710         (pic_address_needs_scratch): Fix formatting.
13711         (sparc_legitimize_pic_address): Minor tweaks.
13712         (sparc_delegitimize_address): Adjust assertion accordingly.
13713         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13714         into symbolic_operand.
13715         (movsi_high_pic_label_ref): Likewise.
13716         (movsi_lo_sum_pic_label_ref): Likewise.
13717         (movdi_pic_label_ref): Likewise.
13718         (movdi_high_pic_label_ref): Likewise.
13719         (movdi_lo_sum_pic_label_ref): Likewise.
13721 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13723         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13724         custom LIB_SPEC setup.
13726 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13727             Kito Cheng  <kito.cheng@gmail.com>
13729         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13730         * config/riscv/freebsd.h: New.
13732 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13734         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13735         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13736         file.
13738 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13739             Kito Cheng  <kito.cheng@gmail.com>
13741         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13742         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13743         * config/nds32/nds32-protos.h (nds32_output_call,
13744         nds32_output_return): Declare.
13745         * config/nds32/nds32.md: Refine all the call and return patterns.
13747 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13749         PR debug/85252
13750         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13751         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13753         PR rtl-optimization/84872
13754         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13755         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13756         EDGE_CROSSING edge.
13758 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13760         * expr.c (copy_blkmode_to_reg): Revert 254862.
13761         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13763 2018-04-06  Richard Biener  <rguenther@suse.de>
13765         PR middle-end/85244
13766         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13767         after seeing a component reference with an adjacent field.  Treat
13768         refs to arrays at struct end of external decls similar to
13769         refs to unconstrained commons.
13771 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13773         PR sanitizer/85213
13774         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13775         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13776         recursive calls.
13777         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13778         save_p here.
13780 2018-04-06  Richard Biener  <rguenther@suse.de>
13782         PR middle-end/85180
13783         * alias.c (find_base_term): New wrapper around find_base_term
13784         unwinding CSELIB_VAL_PTR changes.
13785         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13786         recursion.
13788 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13790         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13791         instructions.
13792         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13793         constant definitions.
13794         ("nop"): lr 0,0 -> nopr r0
13795         ("nop_lr0", "nop_lr1"): New insn definitions.
13797 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13799         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13800         NDS32_V3PUSH_AVAILABLE_P macro.
13802 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13803             Chung-Ju Wu  <jasonwucj@gmail.com>
13805         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13806         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13807         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13808         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13809         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13810         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13811         * config/nds32/constraints.md: New constraints and checking for hard
13812         float configuration.
13813         * config/nds32/iterators.md: New mode iterator and attribute for hard
13814         float configuration.
13815         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13816         patterns.
13817         * config/nds32/nds32-fpu.md: New file.
13818         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13819         deal with hard float code generation.
13820         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13821         ARCH_V3S.
13822         (abi_type, float_reg_number): New enum type.
13823         * config/nds32/nds32-predicates.c: New predicates for hard float.
13824         * config/nds32/nds32-protos.h: Declare functions for hard float.
13825         * config/nds32/nds32.c: Implementation for hard float configuration.
13826         * config/nds32/nds32.h: Definitions for hard float configuration.
13827         * config/nds32/nds32.md: Include hard float machine description and
13828         modify patterns for hard float configuration.
13829         * config/nds32/nds32.opt: New options for hard float configuration.
13830         * config/nds32/predicates.md: New predicates for hard float
13831         configuration.
13833 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13835         * common/config/nds32/nds32-common.c
13836         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13838 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13840         PR middle-end/85195
13841         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13842         CONSTRUCTOR_ELT (ctor, ...)->value.
13844 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13846         PR target/85193
13847         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13849 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13851         PR target/85204
13852         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13853         cond jump.
13855 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13856             Kito Cheng  <kito.cheng@gmail.com>
13858         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13859         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13860         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13861         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13863 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13864             Kito Cheng  <kito.cheng@gmail.com>
13866         * config/nds32/constraints.md (Ufe): New memory constraint.
13867         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13868         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13869         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13870         operands.
13871         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13872         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13874 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13876         * config/nds32/nds32.md: Use optimize_size in the condition for
13877         alu-shift instructions.
13879 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13881         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13883 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13885         * config/nds32/nds32.md (negsi2): Refine pattern.
13887 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13888             Chung-Ju Wu  <jasonwucj@gmail.com>
13890         * config/nds32/iterators.md (shift_rotate): New code iterator.
13891         (shift): New code attribute.
13892         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13893         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13894         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13895         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13896         bit-wise operations.
13897         (andsi3, *andsi3): Ditto.
13898         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13899         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13900         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13901         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13902         nds32_ior_operand, nds32_xor_operand): New predicates.
13904 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13906         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13907         (addsi3, subsi3): ... this.
13909 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13911         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13913 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13915         * config/nds32/nds32.md: Adjust indention.
13917 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13919         * config/nds32/nds32.md (feature): New attribute.
13921 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13923         * config/nds32/nds32.md (subtype): New attribute.
13925 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13927         PR target/85203
13928         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13929         expansion to perform a bitwise AND of the argument followed by a
13930         boolean negation of the result.
13932 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13934         PR rtl-optimization/84878
13935         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13936         the basic block.  Assert the use reference is not artificial and that
13937         it has an associated insn.
13939 2018-04-04  Michael Matz  <matz@suse.de>
13941         * builtins.c (compute_objsize): Pass correct operand
13942         to array_at_struct_end_p.
13944 2018-04-04  Richard Biener  <rguenther@suse.de>
13946         PR lto/85176
13947         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13948         from contexts for DINFO_LEVEL_TERSE and below.
13950 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13952         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13953         resiter_operand condition.
13954         * config/nds32/nds32.md (*move<mode>): Ditto.
13956 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13957             Monk Chiang  <sh.chiang04@gmail.com>
13959         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13961 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13963         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13965 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13966             Kito Cheng  <kito.cheng@gmail.com>
13968         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13969         nds32_cond_code_str, output_cond_branch,
13970         output_cond_branch_compare_zero, nds32_expand_cbranch,
13971         nds32_expand_cstore, nds32_expand_movcc,
13972         nds32_output_cbranchsi4_equality_zero,
13973         nds32_output_cbranchsi4_equality_reg,
13974         nds32_output_cbranchsi4_equality_reg_or_const_int,
13975         nds32_output_cbranchsi4_greater_less_zero: New functions.
13976         * config/nds32/nds32-protos.h (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): Declare.
13982         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13983         nds32_rimm11s_operand): New predicates.
13984         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13985         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13986         patterns.
13988 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13990         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13991         * config/nds32/nds32.md: Ditto.
13992         * config/nds32/pipelines.md: Ditto.
13994 2018-04-04  Richard Biener  <rguenther@suse.de>
13996         PR tree-optimization/85168
13997         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13998         propagating abnormals.
14000 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14002         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14004 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
14005             Kito Cheng  <kito.cheng@gmail.com>
14007         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14008         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14009         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14010         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14011         * config/nds32/nds32.md (sibcall_internal): New.
14012         (sibcall_register): Remove.
14013         (sibcall_immediate): Remove.
14014         (sibcall_value_internal): New.
14015         (sibcall_value_register): Remove.
14016         (sibcall_value_immediate): Remove.
14017         * config/nds32/predicates.md (nds32_general_register_operand): New.
14018         (nds32_call_address_operand): New.
14020 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14022         PR rtl-optimization/85167
14023         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14024         bb_defs if *split_p, instead preinitialize it to NULL.
14026         PR tree-optimization/85156
14027         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14028         evaluating the argument multiple times.
14030 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
14032         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14033         than vector.
14034         (_mm_cvtpd_ps): Likewise.
14035         (_mm_cvttpd_epi32): Likewise.
14036         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14037         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14038         vector, pixel, and bool following altivec.h include.
14040 2018-04-03  Martin Sebor  <msebor@redhat.com>
14042         * doc/extend.texi (Common Function Attributes): Clarify.
14043         (const attribute): Likewise.
14044         (pure attribute): Likewise.
14046 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14048         PR target/85169
14049         * config/i386/i386.c (ix86_expand_vector_set): Use
14050         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
14052 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
14054         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14055         instructions when changing rounding bits to preserve precision bits
14056         in the x87 control word.
14058 2018-04-03  Martin Liska  <mliska@suse.cz>
14060         PR tree-optimization/82491
14061         * rtl.h (strip_offset_and_add): Replace += suboffset with
14062         poly_uint64 () + suboffset.
14064 2018-03-29  Martin Liska  <mliska@suse.cz>
14065             Martin Jambor  <mjambor@suse.cz>
14067         PR ipa/84947
14068         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14069         param_type is not an integral or pointer type.
14071 2018-04-03  Richard Biener  <rguenther@suse.de>
14073         * sese.h (recompute_all_dominators): Remove.
14075 2018-04-02  Martin Sebor  <msebor@redhat.com>
14077         * doc/invoke.texi (-Wrestrict): Fix typos.
14079 2018-04-02  Jim Wilson  <jimw@sifive.com>
14081         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14082         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14083         (<optab>di3, <optab>si3_extend): Likewise.
14084         (<optab>si3_mask, <optab>si3_mask_1): New.
14085         (<optab>di3_mask, <optab>di3_mask_1): New.
14086         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14087         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14088         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14090 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
14092         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14093         example.
14095 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14097         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14098         (nds32_canonicalize_comparison): New function.
14100 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14101             Kito Cheng  <kito.cheng@gmail.com>
14102             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
14104         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14105         * config/nds32/constants.md (unspec_volatile_element): Add
14106         UNSPEC_VOLATILE_RELAX_GROUP.
14107         * config/nds32/nds32-relax-opt.c: New file.
14108         * config/nds32/nds32-predicates.c
14109         (nds32_symbol_load_store_p): New function.
14110         * config/nds32/nds32-protos.h
14111         (nds32_symbol_load_store_p): Declare function.
14112         (make_pass_nds32_relax_opt): Declare new rtl pass function.
14113         * config/nds32/nds32.c
14114         (nds32_register_pass): New function to register pass.
14115         (nds32_register_passes): New function to register passes.
14116         * config/nds32/nds32.md (relax_group): New pattern.
14117         * config/nds32/nds32.opt (mrelax-hint): New option.
14118         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14120 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
14122         * config/nds32/t-nds32: Modify files dependency.
14124 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14126         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14127         (PROFILE_HOOK): Define its implementation.
14129 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14131         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14132         type and 32-bit size.
14134 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
14136         PR middle-end/85090
14137         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14138         (V_128_256): New mode iterator.
14139         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14140         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14141         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14142         of V.
14143         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14144         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14146 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
14148         PR target/83315
14149         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14150         NaN inputs correctly.
14152 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
14154         PR target/80546
14155         * config/rs6000/vsx.md (??r): New mode attribute.
14156         (*vsx_mov<mode>_64bit): Use it.
14157         (*vsx_mov<mode>_32bit): Likewise.
14159 2018-03-30  Martin Sebor  <msebor@redhat.com>
14161         PR tree-optimization/84818
14162         * builtins.c (check_access): Use warning_n.
14164 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14166         PR target/83822
14167         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14168         condition.
14169         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14170         condition.
14172 2018-03-30  Julia Koval  <julia.koval@intel.com>
14174         PR target/84413
14175         * x86-tune.def (movx, partial_reg_dependency): Enable for
14176         m_SKYLAKE_AVX512.
14178 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
14180         PR inline-asm/84985
14181         * lra-constraints.c (process_alt_operands): Move setting
14182         this_alternative_matches below.
14184 2018-03-29  Martin Liska  <mliska@suse.cz>
14186         PR lto/84995.
14187         * doc/invoke.texi: Document how LTO works with debug info.
14188         Describe auto-load support of binutils.  Mention 'x86-64'
14189         as valid option value of -march option.
14191 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
14193         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14195         PR c/85094
14196         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14197         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14198         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14199         checking.
14201 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14203         PR target/84912
14204         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14205         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14206         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14207         for RS6000_BTM_POWERPC64.
14208         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14209         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14210         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14211         definition.
14212         (DIVDE): Use it.
14213         (DIVDEU): Likewise.
14215 2018-03-28  Carl Love  <cel@us.ibm.com>
14217         Revert
14218         2017-09-27  Carl Love  <cel@us.ibm.com>
14220         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14221         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14222         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14223         fctiw instruction.
14225 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14227         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14228         instead of __vector bool.
14229         (_mm_max_pu8): Likewise.
14230         (_mm_min_pi16): Likewise.
14232 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14234         PR target/84912
14235         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14236         (DIVWEUO): Likewise.
14237         (DIVDEO): Likewise.
14238         (DIVDEUO): Likewise.
14239         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14240         DIVWEUO and DIVDEUO.
14241         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14242         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14243         (div_extend): Likewise.
14244         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14245         builtin function.
14246         (__builtin_divweuo): Likewise.
14247         (__builtin_divdeo): Likewise.
14248         (__builtin_divdeuo): Likewise.
14250 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14252         PR target/85095
14253         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14254         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14256         PR tree-optimization/82004
14257         * gimple-match-head.c (optimize_pow_to_exp): New function.
14258         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14259         Don't fold to exp if optimize_pow_to_exp is false.
14261 2018-03-28  Martin Liska  <mliska@suse.cz>
14263         PR other/84819
14264         * calls.c (initialize_argument_information): Fix trailing space.
14265         * common.opt: Fix typo and provide better explanation for
14266         -fsanitize-coverage option.
14267         * config/i386/i386.opt: Fix typo.
14269 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14270             Martin Liska  <mliska@suse.cz>
14272         PR sanitizer/85081
14273         * gimplify.c (asan_poison_variable): Don't do the check for
14274         gimplify_omp_ctxp here.
14275         (gimplify_decl_expr): Do it here.
14276         (gimplify_target_expr): Likewise.
14278 2018-03-28  Martin Liska  <mliska@suse.cz>
14280         PR target/84988
14281         * config/i386/i386.c (ix86_function_arg_advance): Do not call
14282         chkp_type_bounds_count if MPX is not enabled.
14284 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14286         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14288 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
14290         PR target/84914
14291         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14292         function to create the function decl for complex long double
14293         multiply and divide for -mabi=ieeelongdouble.
14294         (init_float128_ieee): Call it.
14296 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
14298         PR target/85044
14299         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14300         -fcf-protection=branch -mibt.
14301         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14303 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14305         PR target/81863
14306         * config/arm/arm.c (arm_valid_symbolic_address): Handle
14307         arm_word_relocations.
14309 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
14311         PR target/85056
14312         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14313         extern array declarations.
14315 2018-03-27  Richard Biener  <rguenther@suse.de>
14317         PR middle-end/84067
14318         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14319         explicit single_use checks.
14321 2018-03-27  Richard Biener  <rguenther@suse.de>
14323         PR tree-optimization/85082
14324         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14325         Valueize the VUSE.
14327 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14329         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14330         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14331         Turn on fasynchronous-unwind-tables and funwind-tables.
14333 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
14335         PR target/85073
14336         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14337         (*bmi_blsr_<mode>_ccz): Ditto.
14339 2018-03-26  Tom de Vries  <tom@codesourcery.com>
14341         PR tree-optimization/85063
14342         * omp-general.c (offloading_function_p): New function.  Factor out
14343         of ...
14344         * omp-offload.c (pass_omp_target_link::gate): ... here.
14345         * omp-general.h (offloading_function_p): Declare.
14346         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14347         with attribute omp declare target for offloading functions.
14349 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
14351         PR tree-optimization/84005
14352         * tree-data-ref.h (get_base_for_alignment): Declare.
14353         * tree-data-ref.c (get_base_for_alignment_1): New function.
14354         (get_base_for_alignment): Likewise.
14355         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14356         get_base_for_alignment to find a suitable base object, instead
14357         of always using drb->base_address.
14359 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14361         PR inline-asm/85022
14362         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14363         known size by default.
14365 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
14367         PR inline-asm/85030
14368         * lra-constraints.c (process_alt_operands): Don't match BLKmode
14369         and non BLKmode operands.
14371 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14373         PR target/85026
14374         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14375         Clean up attributes.
14377 2018-03-23  Richard Biener  <rguenther@suse.de>
14379         PR debug/85020
14380         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14381         we are going to emit early debug for LTO.
14383 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14385         PR inline-asm/85034
14386         * function.c (match_asm_constraints_1): Don't optimize if input
14387         doesn't satisfy general_operand predicate for output's mode.
14389         PR inline-asm/85022
14390         * alias.c (write_dependence_p): Don't require for x_canonicalized
14391         non-VOIDmode if x has VOIDmode.
14393         PR sanitizer/85029
14394         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14395         just don't try to optimize it rather than assert it never happens.
14397 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14399         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14400         macro expansions for definition of ST_INTERNAL_<mode> and
14401         LD_INTERNAL_<mode> builtins.
14402         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14403         Remove prototype.
14404         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14405         function.
14406         (altivec_expand_st_builtin): Likewise.
14407         (altivec_expand_builtin): Remove calls to deleted functions.
14408         (rs6000_address_for_altivec): Delete this function.
14409         * config/rs6000/vector.md: Remove expands for
14410         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14412 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
14414         PR target/84826
14415         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14416         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14417         re-computing once computed.
14418         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14419         (arm_init_machine_status): Initialize
14420         machine->static_chain_stack_bytes.
14422 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14424         PR target/84760
14425         * doc/extend.texi: Add four new prototypes for vec_ld.
14426         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14427         definitions for more logical presentation.
14428         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14429         entries for V1TI variants of __builtin_altivec_ld builtin.
14430         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14431         handling of V1TI variant of LVX icode pattern.
14432         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14433         (rs6000_gimple_fold_builtin): Likewise.
14434         (altivec_init_builtins): Add code to define
14435         __builtin_altivec_lvx_v1ti function.
14437 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14439         PR inline-asm/84941
14440         * function.c (match_asm_constraints_1): Don't do the optimization
14441         if input isn't a REG, SUBREG, MEM or constant.
14443 2018-03-22  Tom de Vries  <tom@codesourcery.com>
14445         PR tree-optimization/84956
14446         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14447         bb_has_abnormal_pred.
14449 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14451         PR sanitizer/85018
14452         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14453         DECL_INITIAL (decl) to decl at the end.
14454         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14455         adjust the comment.
14457 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14459         * doc/extend.texi (__builtin_tgmath): Document when complex
14460         integer types are treated as _Complex _Float64.
14462 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14464         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14466 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14468         PR tree-optimization/84960
14469         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14470         if it is ENTRY block, move them into single succ of ENTRY in that case.
14472 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
14474         PR tree-optimization/84811
14475         * poly-int.h (poly_span_traits): Remove the T3 parameter and
14476         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14477         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14478         (known_subrange_p): Update accordingly.  Cast each value involved
14479         in the size comparison, rather than casting the result of the
14480         subtraction.
14482 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14484         PR tree-optimization/84982
14485         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14486         by flipping the least significant bit rather than all bits from
14487         bitpos to bitpos + bitsize - 1.
14489 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14491         * doc/extend.texi (Deprecated Features): Remove mention of
14492         long-deleted deprecations.
14494 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14496         PR jit/84288
14497         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14498         * configure: Regenerate.
14500 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14502         PR tree-optimization/83126
14503         * tree-parloops.c (num_phis): New function.
14504         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14506 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14508         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14509         mention anon-struct/union members and trailing attributes.
14511 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14513         PR tree-optimization/84969
14514         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14515         builtin memset partitions if they set different rhs values.
14517 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14519         PR rtl-optimization/84989
14520         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14521         VEC_DUPLICATE with scalar result mode.
14523 2018-03-21  Martin Liska  <mliska@suse.cz>
14525         PR ipa/84963
14526         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14527         not intended return statement.
14529 2018-03-21  Martin Liska  <mliska@suse.cz>
14531         PR target/84988
14532         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14533         (chkp_find_bound_slots_1): Limit number of iterations.
14535 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14537         PR target/84838
14538         * Minor grammar fixes for x86 options.
14540 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14542         PR debug/84875
14543         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14544         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14546 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14548         PR target/83789
14549         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14550         (altivec_lvx_<mode>_1op): Likewise.
14551         (altivec_stvx_<mode>_2op): Likewise.
14552         (altivec_stvx_<mode>_1op): Likewise.
14553         (altivec_lvx_<VM2:mode>): New define_expand.
14554         (altivec_stvx_<VM2:mode>): Likewise.
14555         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14556         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14557         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14558         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14559         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14560         (rs6000_gen_lvx): Likewise.
14561         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14562         (altivec_expand_stv_builtin): Likewise.
14563         (altivec_expand_builtin): Likewise.
14564         * config/rs6000/vector.md: Likewise.
14566 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14568         PR target/82518
14569         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14570         BYTES_BIG_ENDIAN.
14572 2018-03-20  Richard Biener  <rguenther@suse.de>
14574         PR target/84986
14575         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14576         sign-conversions as zero, fall back to standard scalar_stmt
14577         cost for the rest.
14579 2018-03-20  Martin Liska  <mliska@suse.cz>
14581         PR ipa/84825
14582         * predict.c (rebuild_frequencies): Handle case when we have
14583         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14585 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14587         PR target/84990
14588         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14589         flag_section_anchors.
14590         * varasm.c (use_blocks_for_decl_p): Remove hack for
14591         dw2_force_const_mem.
14593         PR target/84845
14594         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14595         to ...
14596         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14597         be created, use lowpart_subreg of operands[0] rather than operands[0]
14598         itself.
14599         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14600         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14601         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14602         and n constraint instead of aarch64_shift_imm_di and Usd.
14603         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14604         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14606 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14608         PR target/82989
14609         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14610         to favor GPR over NEON registers.
14611         (<shift>di3_neon): Likewise.
14613 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14615         PR target/84952
14616         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14617         (nvptx_process_pars): Emit bar.sync asap and alap.
14619 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14621         PR target/84954
14622         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14623         seen_label if seen_label is already set.
14625 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14627         PR target/84945
14628         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14629         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14630         Use 1U instead of 1.  Formatting fixes.
14632         PR c/84953
14633         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14634         instead of TREE_TYPE (s1) for the return value.
14636 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14638         PR tree-optimization/84946
14639         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14640         bitsize + bitsize in poly_uint64 rather than poly_int64.
14642         PR sanitizer/78651
14643         * dwarf2asm.c: Include fold-const.c.
14644         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14645         of decl rather than decl itself.
14647         PR rtl-optimization/84643
14648         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14650 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14652         PR sanitizer/78651
14653         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14654         calling assemble_variable.
14656 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14658         PR target/81647
14659         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14660         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14662 2018-03-19  Jim Wilson  <jimw@sifive.com>
14664         PR bootstrap/84856
14665         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14666         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14667         (riscv_first_stack_step): Likewise.
14668         (riscv_option_override): Use STACK_BOUNDARY instead of
14669         MIN_STACK_BOUNDARY.
14670         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14671         MIN_STACK_BOUNDARY.
14672         (BIGGEST_ALIGNMENT): Set to 128.
14673         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14674         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14675         STACK_BOUNDARY.
14677 2018-03-19  Richard Biener  <rguenther@suse.de>
14679         PR tree-optimization/84933
14680         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14681         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14683 2018-03-19  Richard Biener  <rguenther@suse.de>
14685         PR tree-optimization/84859
14686         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14687         (cond_if_else_store_replacement): Perform sinking operation on
14688         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14689         Generalize what a BB with a single eligible store is.
14691 2018-03-19  Richard Biener  <rguenther@suse.de>
14693         PR tree-optimization/84929
14694         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14695         chrec_is_positive against non-chrec arg.
14697 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14699         PR target/84711
14700         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14702 2018-03-18  Martin Liska  <mliska@suse.cz>
14704         PR rtl-optimization/84635
14705         * regrename.c (build_def_use): Use matches_mode only when
14706         matches >= 0.
14708 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14710         PR tree-optimization/84913
14711         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14712         vectorize chains of COND_EXPRs.
14714 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14716         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14718 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14720         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14722 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14724         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14726 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14727             Kito Cheng  <kito.cheng@gmail.com>
14729         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14730         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14731         (nds32_adjust_reg_alloc_order): New function.
14732         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14734 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14736         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14737         nds32_print_operand, nds32_print_operand_address): Use
14738         HOST_WIDE_INT_PRINT_DEC instead.
14740 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14742         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14744 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14746         PR target/84902
14747         * config/i386/i386.c (initial_ix86_tune_features,
14748         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14749         unsigned long long.
14750         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14751         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14752         rather than 1u << ix86_tune.  Formatting fix.
14753         (ix86_option_override_internal): Change ix86_arch_mask from
14754         unsigned int to unsigned HOST_WIDE_INT, initialize to
14755         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14756         (ix86_function_specific_restore): Likewise.
14758 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14760         PR target/84899
14761         * postreload.c (reload_combine_recognize_pattern): Perform
14762         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14763         truncate_int_for_mode the result for the destination's mode.
14765         PR c/84909
14766         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14767         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14768         Likewise.
14769         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14770         Likewise.
14772 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14774         PR target/84876
14775         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14776         regno_allocno_class_array and sorted_pseudos.
14777         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14778         insns where regno is used.
14780 2018-03-16  Martin Liska  <mliska@suse.cz>
14782         PR ipa/84833
14783         * multiple_target.c (create_dispatcher_calls): Redirect
14784         reference in the symbol table.
14786 2018-03-16  Martin Liska  <mliska@suse.cz>
14788         PR ipa/84722
14789         * multiple_target.c (create_dispatcher_calls): Redirect also
14790         an alias.
14792 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14794         PR c++/79937
14795         PR c++/82410
14796         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14797         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14798         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14800 2018-03-16  Julia Koval  <julia.koval@intel.com>
14802         * doc/invoke.texi (Skylake Server): Add CLWB.
14803         Cannonlake): Remove CLWB.
14805 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14807         PR tree-optimization/84841
14808         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14809         1 << 3.
14810         (FLOAT_ONE_CONST_TYPE): Define.
14811         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14812         (sort_by_operand_rank): Put entries with higher constant_type last
14813         rather than first to match comments.
14815 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14817         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14818         split predicate.
14820 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14822         PR c++/79085
14823         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14824         check and use address of target always.
14826 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14828         PR target/84574
14829         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14830         (indirect_thunk_bnd_needed): Likewise.
14831         (indirect_thunks_used): Likewise.
14832         (indirect_thunks_bnd_used): Likewise.
14833         (indirect_return_needed): New.
14834         (indirect_return_bnd_needed): Likewise.
14835         (output_indirect_thunk_function): Add a bool argument for
14836         function return.
14837         (output_indirect_thunk_function): Don't generate alias for
14838         function return thunk.
14839         (ix86_code_end): Call output_indirect_thunk_function to generate
14840         function return thunks.
14841         (ix86_output_function_return): Set indirect_return_bnd_needed
14842         and indirect_return_needed instead of indirect_thunk_bnd_needed
14843         and indirect_thunk_needed.
14845 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14847         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14848         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14849         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14851 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14852             Paul Hua <paul.hua.gm@gmail.com>
14854         PR c/84852
14855         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14857 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14859         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14860         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14861         resp. SFmode cases.
14863 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14865         PR target/84711
14866         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14867         instead of GET_MODE_SIZE when comparing Units.
14869 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14871         PR target/68256
14872         * varasm.c (hash_section): Return an unchangeble hash value
14873         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14874         Return !aarch64_can_use_per_function_literal_pools_p ().
14876 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14878         PR target/84860
14879         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14880         rather than address of cmode as last argument to prepare_cmp_insn.
14882 2018-03-15  Julia Koval  <julia.koval@intel.com>
14884         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14885         F_AVX512VNNI, F_AVX512BITALG): New.
14887 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14889         PR target/83451
14890         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14891         insn for floating-point loads and stores.
14893 2018-03-14  Carl Love  <cel@us.ibm.com>
14895         * config/rs6000/rs6000-c.c: Add macro definitions for
14896         ALTIVEC_BUILTIN_VEC_PERMXOR.
14897         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14898         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14899         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14900         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14901         UNSPEC_VPERMXOR.
14902         * config/doc/extend.texi: Add prototypes for vec_permxor.
14904 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14906         PR c/84852
14907         * diagnostic-show-locus.c (class layout_point): Convert m_line
14908         from int to linenum_type.
14909         (line_span::comparator): Use linenum "compare" function when
14910         comparing line numbers.
14911         (test_line_span): New function.
14912         (layout_range::contains_point): Convert param "row" from int to
14913         linenum_type.
14914         (layout_range::intersects_line_p): Likewise.
14915         (layout::will_show_line_p): Likewise.
14916         (layout::print_source_line): Likewise.
14917         (layout::should_print_annotation_line_p): Likewise.
14918         (layout::print_annotation_line): Likewise.
14919         (layout::print_leading_fixits): Likewise.
14920         (layout::annotation_line_showed_range_p): Likewise.
14921         (struct line_corrections): Likewise for field m_row.
14922         (line_corrections::line_corrections): Likewise for param "row".
14923         (layout::print_trailing_fixits): Likewise.
14924         (layout::get_state_at_point): Likewise.
14925         (layout::get_x_bound_for_row): Likewise.
14926         (layout::print_line): Likewise.
14927         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14928         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14929         * input.c (selftest::test_linenum_comparisons): New function.
14930         (selftest::input_c_tests): Call it.
14931         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14932         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14933         * selftest.h (ASSERT_GT): New macro.
14934         (ASSERT_GT_AT): New macro.
14935         (ASSERT_LT): New macro.
14936         (ASSERT_LT_AT): New macro.
14938 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14940         PR rtl-optimization/84780
14941         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14943 2018-03-14  Martin Liska  <mliska@suse.cz>
14945         * tree.c (record_node_allocation_statistics): Use
14946         get_stats_node_kind.
14947         (get_stats_node_kind): New function extracted from
14948         record_node_allocation_statistics.
14949         (free_node): Use get_stats_node_kind.
14951 2018-03-14  Richard Biener  <rguenther@suse.de>
14953         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14954         that the value-set of ANTIC_IN doesn't grow.
14956         Revert
14957         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14958         member.
14959         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14960         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14962 2018-03-14  Julia Koval  <julia.koval@intel.com>
14964         * config.gcc (icelake-client, icelake-server): New.
14965         (icelake): Remove.
14966         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14967         (initial_ix86_arch_features): Ditto.
14968         (PTA_SKYLAKE): Add SGX.
14969         (PTA_ICELAKE): Remove.
14970         (PTA_ICELAKE_CLIENT): New.
14971         (PTA_ICELAKE_SERVER): New.
14972         (ix86_option_override_internal): Split up icelake on icelake client and
14973         icelake server.
14974         (get_builtin_code_for_version): Ditto.
14975         (fold_builtin_cpu): Ditto.
14976         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14977         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14978         * config/i386/i386.h (processor_type): Ditto.
14979         * doc/invoke.texi: Ditto.
14981 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14983         PR sanitizer/83392
14984         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14985         INTEGER_CST offset, add it together with bitpos / 8 and
14986         sign extend based on POINTER_SIZE.
14988         PR target/84844
14989         Revert
14990         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14992         PR target/78090
14993         * config/i386/constraints.md (Yc): New register constraint.
14994         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14995         Use Yc constraint for alternative 2 of operand 0.  Remove
14996         preferred_for_speed attribute.
14998 2018-03-14  Richard Biener  <rguenther@suse.de>
15000         PR tree-optimization/84830
15001         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15002         with the old one to avoid oscillations.
15004 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
15006         PR target/83712
15007         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15008         pseudos.
15009         (assign_by_spills): Return a flag of reload assignment failure.
15010         Do not process the reload assignment failures.  Do not spill other
15011         reload pseudos if they has the same reg class.  Update n if
15012         necessary.
15013         (lra_assign): Add a return arg.  Set up from the result of
15014         assign_by_spills call.
15015         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15016         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15017         usage_insns if it is not NULL.
15018         (spill_hard_reg_in_range): New function.
15019         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15020         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15021         function prototypes.
15022         (lra_assign): Change prototype.
15023         * lra.c (lra): Add code to deal with fails by splitting hard reg
15024         live ranges.
15026 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
15028         * config/riscv/riscv.opt (mrelax): New option.
15029         * config/riscv/riscv.c (riscv_file_start): Emit ".option
15030         "norelax" when riscv_mrelax is disabled.
15031         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15033 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15035         PR target/84743
15036         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15037         reassociation for int modes.
15039 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15041         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15042         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15043         for big-endian.
15044         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15045         * config/aarch64/aarch64-sve.md
15046         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15047         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15048         (*extend<mode><Vwide>2): Rename to...
15049         (aarch64_sve_extend<mode><Vwide>2): ...this.
15050         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15051         renaming the old pattern to...
15052         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
15053         unsigned packs.
15054         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15055         define_expand, renaming the old pattern to...
15056         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15057         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15058         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15059         account when deciding which SVE instruction the optab should use.
15060         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15062 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15064         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15065         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15066         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15067         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15068         (tlsdesc_small_<mode>): Turn a define_expand and use
15069         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
15070         (tlsdesc_small_advsimd_<mode>): ...this.
15071         (tlsdesc_small_sve_<mode>): New pattern.
15073 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15075         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15076         (UNSPEC_UMUL_HIGHPART): New constants.
15077         (MUL_HIGHPART): New int iteraor.
15078         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15079         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15080         define_expand.
15081         (*<su>mul<mode>3_highpart): New define_insn.
15083 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
15085         PR lto/84805
15086         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15087         incomplete types.
15089 2018-03-13  Martin Liska  <mliska@suse.cz>
15091         PR ipa/84658.
15092         * (sem_item_optimizer::sem_item_optimizer): Initialize new
15093         vector.
15094         (sem_item_optimizer::~sem_item_optimizer): Release it.
15095         (sem_item_optimizer::merge_classes): Register variable aliases.
15096         (sem_item_optimizer::fixup_pt_set): New function.
15097         (sem_item_optimizer::fixup_points_to_sets): Likewise.
15098         * ipa-icf.h: Declare new variables and functions.
15100 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
15102         PR middle-end/84834
15103         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15104         integer_pow2p@2 and test integer_pow2p in condition.
15105         (A < 0 ? C : 0): Similarly for @1.
15107         PR middle-end/84831
15108         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15109         characters starting at p contain '\0' character, don't look beyond
15110         that.
15112         PR target/84827
15113         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15114         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15116         PR target/84828
15117         * reg-stack.c (change_stack): Change update_end var from int to
15118         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15119         also call set_block_for_insn on the newly added insns and rescan.
15121         PR target/84786
15122         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15123         on the last operand.
15125         PR c++/84704
15126         * tree.c (stabilize_reference_1): Return save_expr (e) for
15127         STATEMENT_LIST even if it doesn't have side-effects.
15129 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
15131         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15133 2018-03-12  Renlin Li  <renlin.li@arm.com>
15135         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15136         aarch64_output_scalar_simd_mov_immediate.
15138 2018-03-12  Martin Sebor  <msebor@redhat.com>
15140         PR tree-optimization/83456
15141         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15142         for perfectly overlapping calls to memcpy.
15143         (gimple_fold_builtin_memory_chk): Same.
15144         (gimple_fold_builtin_strcpy): Handle no-warning.
15145         (gimple_fold_builtin_stxcpy_chk): Same.
15146         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15148 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15150         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15151         parameter.  Use it for SFmode.
15152         (rs6000_function_arg_advance_1): Adjust.
15153         (rs6000_function_arg): Adjust.
15154         (rs6000_gimplify_va_arg): Pass false for that new parameter.
15156 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15158         PR rtl-optimization/84169
15159         PR rtl-optimization/84780
15160         * combine.c (can_combine_p): Check for a 2-insn combination whether
15161         the destination register is used between the two insns, too.
15163 2018-03-12  Richard Biener  <rguenther@suse.de>
15165         PR tree-optimization/84803
15166         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15167         for refs DR analysis didn't process.
15169 2018-03-12  Richard Biener  <rguenther@suse.de>
15171         PR tree-optimization/84777
15172         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15173         force-vectorize loops ignore whether we are optimizing for size.
15175 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15177         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15178         (TARGET_MD_ASM_ADJUST): Define.
15180 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
15181             Kito Cheng  <kito.cheng@gmail.com>
15182             Chung-Ju Wu  <jasonwucj@gmail.com>
15184         * config/nds32/nds32.c (nds32_compute_stack_frame,
15185         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15186         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15187         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15188         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15189         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15190         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15191         * config/nds32/nds32.md (prologue, epilogue): Use macro
15192         NDS32_V3PUSH_AVAILABLE_P to do checking.
15194 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
15196         PR debug/58150
15197         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15198         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15199         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
15200         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
15201         addition of most attributes on !orig_type_die or the attribute not
15202         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15204 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15205             Chung-Ju Wu  <jasonwucj@gmail.com>
15207         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15208         __NDS32_VH__ macro.
15209         * config/nds32/nds32.opt (mvh): New option.
15211 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15212             Chung-Ju Wu  <jasonwucj@gmail.com>
15214         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15215         function.
15216         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15217         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15218         definition.
15220 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15221             Chung-Ju Wu  <jasonwucj@gmail.com>
15223         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15224         function.
15225         * config/nds32/nds32-multiple.md (strlensi): New pattern.
15226         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15228 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
15229             Kito Cheng  <kito.cheng@gmail.com>
15230             Chung-Ju Wu  <jasonwucj@gmail.com>
15232         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15233         UNSPEC_FFMISM and UNSPEC_FLMISM.
15234         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15235         for ffb, ffmism and flmism.
15236         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15237         (unspec_ffmism): Ditto.
15238         (unspec_flmism): Ditto.
15239         (nds32_expand_builtin_impl): Check if string extension is available.
15240         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15241         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15243 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
15245         Reverting patch:
15246         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15248         PR target/83712
15249         * lra-assigns.c (assign_by_spills): Return a flag of reload
15250         assignment failure.  Do not process the reload assignment
15251         failures.  Do not spill other reload pseudos if they has the same
15252         reg class.
15253         (lra_assign): Add a return arg.  Set up from the result of
15254         assign_by_spills call.
15255         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15256         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15257         usage_insns if it is not NULL.
15258         (spill_hard_reg_in_range): New function.
15259         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15260         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15261         function prototypes.
15262         (lra_assign): Change prototype.
15263         * lra.c (lra): Add code to deal with fails by splitting hard reg
15264         live ranges.
15266 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
15268         PR target/84807
15269         * config/i386/i386.opt: Replace Enforcment with Enforcement.
15271 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
15273         PR debug/84620
15274         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15275         (dw_val_node): Add val_symbolic_view.
15276         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15277         (symview_upper_bound): New.
15278         (new_line_info_table): Initialize symviews_since_reset.
15279         (dwarf2out_source_line): Count symviews_since_reset and set
15280         symview_upper_bound.
15281         (dw_val_equal_p): Handle symview.
15282         (add_AT_symview): New.
15283         (print_dw_val): Handle symview.
15284         (attr_checksum, attr_checksum_ordered): Likewise.
15285         (same_dw_val_p, size_of_die): Likewise.
15286         (value_format, output_die): Likewise.
15287         (add_high_low_attributes): Use add_AT_symview for entry_view.
15288         (dwarf2out_finish): Reset symview_upper_bound, clear
15289         zero_view_p.
15291 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
15293         PR target/83969
15294         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15295         Add strict argument and use it.
15296         (rs6000_split_multireg_move): Update for new strict argument.
15297         (mem_operand_gpr): Disallow all non-offsettable addresses.
15298         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15300 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
15302         PR target/84772
15303         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15304         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15305         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15307         PR c++/84767
15308         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15309         decl, use remap_type if we want to use the type.
15311 2018-03-09  Martin Sebor  <msebor@redhat.com>
15313         PR tree-optimization/84526
15314         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15315         Remove dead code.
15316         (builtin_access::generic_overlap): Be prepared to handle non-array
15317         base objects.
15319 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
15321         PR rtl-optimization/84682
15322         * lra-constraints.c (process_address_1): Check is_address flag
15323         for address constraints.
15324         (process_alt_operands): Likewise.
15325         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15326         preprocess_constraints.
15327         * recog.h (preprocess_constraints): Add oploc parameter.
15328         Adjust callers.
15329         * recog.c (preprocess_constraints): Test address_operand for
15330         CT_ADDRESS constraints.
15332 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15334         PR target/83712
15335         * lra-assigns.c (assign_by_spills): Return a flag of reload
15336         assignment failure.  Do not process the reload assignment
15337         failures.  Do not spill other reload pseudos if they has the same
15338         reg class.
15339         (lra_assign): Add a return arg.  Set up from the result of
15340         assign_by_spills call.
15341         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15342         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15343         usage_insns if it is not NULL.
15344         (spill_hard_reg_in_range): New function.
15345         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15346         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15347         function prototypes.
15348         (lra_assign): Change prototype.
15349         * lra.c (lra): Add code to deal with fails by splitting hard reg
15350         live ranges.
15352 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15354         PR target/83193
15355         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15356         Accept complain bool parameter.  Only emit errors if it is true.
15357         (arm_parse_cpu_option_name): Likewise.
15358         (arm_target_thumb_only): Adjust callers of the above.
15359         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15360         prototype to take a default true bool parameter.
15361         (arm_parse_arch_option_name): Likewise.
15363 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
15364             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15366         PR jit/64089
15367         PR jit/84288
15368         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15369         * configure: Regenerate.
15370         * configure.ac ("linker --version-script option"): New.
15371         ("linker soname option"): New.
15373 2018-03-09  Richard Biener  <rguenther@suse.de>
15375         PR tree-optimization/84775
15376         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15377         immediate uses of predicate stmts and mark them modified.
15379         Revert
15380         PR tree-optimization/84178
15381         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15382         to caller.
15383         (version_loop_for_if_conversion): Delay update_ssa call.
15384         (tree_if_conversion): Delay update_ssa until after predicate
15385         insertion.
15387 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
15389         PR target/84763
15390         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15391         when the function accesses prior frames.
15393 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15395         PR debug/84456
15396         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15397         gen_llsym, otherwise call maybe_gen_llsym.
15399         PR inline-asm/84742
15400         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15401         has ',' character inside of it.
15403 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15405         PR target/84748
15406         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15407         as clobbering CC_REGNUM.
15409 2018-03-08  Richard Biener  <rguenther@suse.de>
15411         PR middle-end/84552
15412         * tree-scalar-evolution.c: Include tree-into-ssa.h.
15413         (follow_copies_to_constant): Do not follow SSA names registered
15414         for update.
15416 2018-03-08  Richard Biener  <rguenther@suse.de>
15418         PR tree-optimization/84178
15419         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15420         to caller.
15421         (version_loop_for_if_conversion): Delay update_ssa call.
15422         (tree_if_conversion): Delay update_ssa until after predicate
15423         insertion.
15425 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
15427         PR tree-optimization/84178
15428         * tree-if-conv.c (release_bb_predicate): Remove the
15429         the assertion that the stmts have NULL use_ops.
15430         Discard the statements, asserting that they haven't
15431         yet been added to a BB.
15433 2018-03-08  Richard Biener  <rguenther@suse.de>
15435         PR tree-optimization/84746
15436         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15437         (phi_translate): Pass in destination ANTIC_OUT set.
15438         (phi_translate_1): Likewise.  For a simplified result lookup
15439         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15440         (phi_translate_set): Adjust.
15441         (do_pre_regular_insertion): Likewise.
15442         (do_pre_partial_partial_insertion): Likewise.
15444 2018-03-08  Martin Liska  <mliska@suse.cz>
15446         PR gcov-profile/84735
15447         * doc/gcov.texi: Document usage of profile files.
15448         * gcov-io.h: Document changes in the format.
15450 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
15452         PR debug/84404
15453         PR debug/84408
15454         * dwarf2out.c (struct dw_line_info_table): Update comments for
15455         view == -1.
15456         (FORCE_RESET_NEXT_VIEW): New.
15457         (FORCE_RESETTING_VIEW_P): New.
15458         (RESETTING_VIEW_P): Check for -1 too.
15459         (ZERO_VIEW_P): Likewise.
15460         (new_line_info_table): Force-reset next view.
15461         (dwarf2out_begin_function): Likewise.
15462         (dwarf2out_source_line): Simplify zero_view_p initialization.
15463         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15464         view directly.  Omit view when omitting .loc at line 0.
15466 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15468         PR tree-optimization/84740
15469         * tree-switch-conversion.c (process_switch): Call build_constructors
15470         only if info.phi_count is non-zero.
15472         PR tree-optimization/84739
15473         * tree-tailcall.c (find_tail_calls): Check call arguments against
15474         DECL_ARGUMENTS (current_function_decl) rather than
15475         DECL_ARGUMENTS (func) when checking for tail recursion.
15477 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15479         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15480         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15481         Volker Reichelt's entry and add entries for people that perform
15482         GCC fuzzy testing and report numerous bugs.
15484 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15486         PR target/82411
15487         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15488         readonly data in sdata, if that is disabled.
15489         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15490         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15491         -mreadonly-in-sdata option.
15493 2018-03-07  Martin Sebor  <msebor@redhat.com>
15495         PR tree-optimization/84468
15496         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15497         basic block when looking for nul assignment.
15499 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15501         PR target/84277
15502         * except.h (output_function_exception_table): Adjust prototype.
15503         * except.c (output_function_exception_table): Remove FNNAME parameter
15504         and add SECTION parameter.  Ouput one part of the table at a time.
15505         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15506         the first part of the exception table and emit unwind directives.
15507         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15508         (i386_pe_seh_cold_init): Likewise.
15509         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15510         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15511         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15512         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15513         * config/i386/winnt.c: Include except.h.
15514         (struct seh_frame_state): Add reg_offset, after_prologue and
15515         in_cold_section fields.
15516         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15517         (i386_pe_seh_cold_init): New function.
15518         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15519         to seh->in_cold_section.
15520         (seh_emit_push): Record the offset of the push.
15521         (seh_emit_save): Record the offet of the save.
15522         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15523         Test seh->after_prologue to disregard the epilogue.
15524         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15525         (i386_pe_end_cold_function): New function.
15527 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15529         PR fortran/84565
15530         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15531         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15533         PR c++/84704
15534         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15535         on tmp_var.
15536         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15537         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15539         PR middle-end/84723
15540         * multiple_target.c: Include tree-inline.h and intl.h.
15541         (expand_target_clones): Diagnose and fail if node->definition and
15542         !tree_versionable_function_p (node->decl).
15544 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15546         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15547         sprint_ul.
15548         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15549         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15550         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15552 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15554         PR target/84710
15555         * combine.c (try_combine): Use reg_or_subregno instead of handling
15556         just paradoxical SUBREGs and REGs.
15558 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15560         * config/arc/arc.c (arc_finalize_pic): Remove function.
15561         (arc_must_save_register): We use single base PIC register, remove
15562         checks to save/restore the PIC register.
15563         (arc_expand_prologue): Likewise.
15564         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15565         Remove.
15566         (arc_verify_short): Likewise.
15567         (arc_attr_type): Likewise.
15568         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15569         (walk_stores): Likewise.
15570         (arc_address_cost): Make it static.
15571         (arc_verify_short): Likewise.
15572         (branch_dest): Likewise.
15573         (arc_attr_type): Likewise.
15574         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15575         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15576         (arc_final_prescan_insn): Remove inserting the nops due to
15577         hardware hazards.  It is done in reorg step.
15578         (insn_length_variant_t): Remove.
15579         (insn_length_parameters_t): Likewise.
15580         (arc_insn_length_parameters): Likewise.
15581         (arc_get_insn_variants): Likewise.
15582         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15584 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15586         PR inline-asm/84683
15587         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15588         assertion failure.
15590         PR tree-optimization/84687
15591         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15592         on new_node->decl.
15593         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15595 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15597         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15598         Rename to ppc_speculation_barrier.
15599         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15600         __builtin_ppc_speculation_barrier.
15602 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15604         PR target/84700
15605         * combine.c (combine_simplify_rtx): Don't try to simplify if
15606         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15607         are equal to x.
15609 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15611         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15612         to 32 bytes when compiling for POWER9.
15614 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15616         PR target/84564
15617         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15618         regparm >= 3 with no arg reg available also for calls with
15619         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15621         PR target/84524
15622         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15623         orig,vex.
15624         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15626 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15628         PR target/84264
15629         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15631 2018-03-05  Richard Biener  <rguenther@suse.de>
15633         PR tree-optimization/84486
15634         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15635         When inserting a __builtin_assume_aligned call set the LHS
15636         SSA name alignment info accordingly.
15638 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15640         PR tree-optimization/84114
15641         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15642         Avoid reassociation of FLOAT_MODE addition.
15644 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15646         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15647         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15648         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15649         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15650         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15651         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15652         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15653         and -mwbnoinvd.
15654         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15655         __builtin_ia32_wbinvd): New builtins.
15656         (SPECIAL_ARGS2): New.
15657         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15658         (SPECIAL_ARGS2): New.
15659         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15660         (ix86_valid_target_attribute_inner_p): Ditto.
15661         (ix86_init_mmx_sse_builtins): Add special_args2.
15662         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15663         TARGET_WBNOINVD_P): New.
15664         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15665         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15666         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15667         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15668         * config/i386/pconfigintrin.h: New file.
15669         * config/i386/wbnoinvdintrin.h: Ditto.
15670         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15671         wbnoinvdintrin.h.
15672         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15674 2018-03-05  Richard Biener  <rguenther@suse.de>
15676         PR tree-optimization/84670
15677         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15678         member.
15679         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15680         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15681         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15682         doesn't grow if all successors (recursively) were visited at least
15683         once.
15685 2018-03-05  Richard Biener  <rguenther@suse.de>
15687         PR tree-optimization/84650
15688         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15689         if executed in the loop pipeline.
15691 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15693         * doc/configfiles.texi (Configuration Files): Move info about
15694         conditionalizing $target-protos.h to...
15695         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15696         differs from $target-protos.h.
15698 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15699             Chung-Ju Wu  <jasonwucj@gmail.com>
15701         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15702         * config/nds32/nds32-multiple.md (setmemsi): Define.
15703         * config/nds32/nds32-memory-manipulation.c
15704         (nds32_gen_dup_4_byte_to_word_value): New.
15705         (emit_setmem_word_loop): New.
15706         (emit_setmem_byte_loop): New.
15707         (nds32_expand_setmem_loop): New.
15708         (nds32_expand_setmem_loop_v3m): New.
15709         (nds32_expand_setmem_unroll): New.
15710         (nds32_expand_setmem): New.
15712 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15713             Chung-Ju Wu  <jasonwucj@gmail.com>
15715         * config/nds32/nds32-memory-manipulation.c
15716         (nds32_emit_load_store): New.
15717         (nds32_emit_post_inc_load_store): New.
15718         (nds32_emit_mem_move): New.
15719         (nds32_emit_mem_move_block): New.
15720         (nds32_expand_movmemsi_loop_unknown_size): New.
15721         (nds32_expand_movmemsi_loop_known_size): New.
15722         (nds32_expand_movmemsi_loop): New.
15723         (nds32_expand_movmemsi_unroll): New.
15724         (nds32_expand_movmemqi): Rename ...
15725         (nds32_expand_movmemsi): ... to this.
15726         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15727         (movmemsi): ... to this.
15728         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15729         (nds32_expand_movmemsi): ... to this.
15731 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15732             Monk Chiang  <sh.chiang04@gmail.com>
15733             Chung-Ju Wu  <jasonwucj@gmail.com>
15735         * config/nds32/nds32-protos.h
15736         (nds32_expand_load_multiple): New arguments.
15737         (nds32_expand_store_multiple): Ditto.
15738         (nds32_valid_multiple_load_store): Rename ...
15739         (nds32_valid_multiple_load_store_p): ... to this.
15740         * config/nds32/nds32-memory-manipulation.c
15741         (nds32_expand_load_multiple): Refine implementation.
15742         (nds32_expand_store_multiple): Ditto.
15743         * config/nds32/nds32-multiple.md
15744         (load_multiple): Update nds32_expand_load_multiple interface.
15745         (store_multiple): Update nds32_expand_store_multiple interface.
15746         * config/nds32/nds32-predicates.c
15747         (nds32_valid_multiple_load_store): Rename ...
15748         (nds32_valid_multiple_load_store_p): ... to this and refine
15749         implementation.
15750         * config/nds32/predicates.md
15751         (nds32_load_multiple_and_update_address_operation): New predicate.
15752         (nds32_store_multiple_and_update_address_operation): New predicate.
15754 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15755             Chung-Ju Wu  <jasonwucj@gmail.com>
15757         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15758         (combo): New attribute.
15759         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15761 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15763         * config/nds32/nds32.opt: Change -mcmodel= default value.
15765 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15766             Monk Chiang  <sh.chiang04@gmail.com>
15767             Chung-Ju Wu  <jasonwucj@gmail.com>
15769         * config/nds32/constants.md (unspec_element): New enum.
15770         * config/nds32/constraints.md (Umw): New constraint.
15771         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15772         * config/nds32/nds32-intrinsic.md: Likewise.
15773         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15774         (nds32_valid_smw_lwm_base_p): New.
15775         (nds32_output_smw_single_word): New.
15776         (nds32_output_lmw_single_word): New.
15777         (nds32_expand_unaligned_load): New.
15778         (nds32_expand_unaligned_store): New.
15779         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15780         (nds32_output_smw_single_word): Declare.
15781         (nds32_output_lmw_single_word): Declare.
15782         (nds32_expand_unaligned_load): Declare.
15783         (nds32_expand_unaligned_store): Declare.
15784         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15785         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15786         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15787         NDS32_BUILTIN_UASTORE_DW.
15788         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15789         predicate.
15791 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15792             Kito Cheng  <kito.cheng@gmail.com>
15793             Chung-Ju Wu  <jasonwucj@gmail.com>
15795         * config/nds32/nds32-intrinsic.c
15796         (nds32_expand_builtin_null_ftype_reg): Delete.
15797         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15798         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15799         (nds32_read_argument): New.
15800         (nds32_legitimize_target): Ditto.
15801         (nds32_legitimize_argument): Ditto.
15802         (nds32_check_constant_argument): Ditto.
15803         (nds32_expand_unop_builtin): Ditto.
15804         (nds32_expand_unopimm_builtin): Ditto.
15805         (nds32_expand_binop_builtin): Ditto.
15806         (nds32_builtin_decl_impl): Ditto.
15807         (builtin_description): Ditto.
15808         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15809         (nds32_init_builtins_impl): Ditto.
15810         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15811         (nds32_builtin_decl): New.
15812         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15813         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15815 2018-03-02  Jeff Law  <law@redhat.com>
15817         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15818         (redundant_insn, fill_simple_delay_slots): Likewise.
15819         (fill_slots_from_thread): Likewise.
15820         * resource.c (mark_referenced_resources): Likewise.
15821         (mark_set_resources, find_dead_or_set_registers): Likewise.
15823 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15825         * substring-locations.h (format_warning_va): Formatting fix for
15826         ATTRIBUTE_GCC_DIAG.
15827         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15828         argument.
15829         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15830         * substring-locations.c: Include intl.h.
15831         (format_warning_va): Turned into small wrapper around
15832         format_warning_n_va, renamed to ...
15833         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15834         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15835         use ngettext.
15836         (format_warning_at_substring_n): New function.
15837         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15838         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15839         format_warning_at_substring with just a shorter name instead of
15840         const function pointer.
15841         (fmtwarn_n): New function.
15842         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15843         appropriate, get rid of all the fmtstr temporaries, move conditionals
15844         with G_() wrapped string literals directly into fmtwarn arguments,
15845         cast dir.len to (int), formatting fixes.
15847 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15849         * doc/invoke.texi: Remove "Cilk Plus" references.
15851 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15852             Richard Biener  <rguenther@suse.de>
15854         PR ipa/84628
15855         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15856         for error or warning attributes if CALL_FROM_THUNK_P is set.
15857         Formatting fixes.
15859 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15861         PR target/56540
15862         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15863         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15865         PR target/56540
15866         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15867         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15869         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15870         instead of -1U in last predictors element's probability member.
15872 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15874         PR ipa/83983
15875         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15876         arguments if they are comparable.
15878 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15880         PR tree-optimization/84634
15881         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15882         masks and masked_loop_p with a single loop_masks, making sure it's
15883         null for bb vectorization.
15885 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15887         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15888         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15889         loop->force_vectorize to check whether there is no alias.
15891 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15893         PR target/84614
15894         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15895         prototypes.
15896         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15897         comments.
15898         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15899         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15900         instead of a loop around prev_real_insn.
15901         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15902         prev_real_insn.
15904         PR inline-asm/84625
15905         * config/i386/i386.c (ix86_print_operand): Use conditional
15906         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15907         zero vector.
15909 2018-03-02  Richard Biener  <rguenther@suse.de>
15911         PR tree-optimization/84427
15912         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15913         (bitmap_set_subtract_values): Rewrite to handle multiple
15914         exprs per value.
15915         (clean): Likewise.
15916         (prune_clobbered_mems): Likewise.
15917         (phi_translate): Take edge instead of pred/phiblock.
15918         (phi_translate_1): Likewise.
15919         (phi_translate_set): Likewise.  Insert all translated
15920         exprs for a value into the set, keeping possibly multiple
15921         expressions per value.
15922         (compute_antic_aux): Adjust for phi_translate changes.
15923         When intersecting union the expressions and prune those
15924         not in the final value set, keeping possibly multiple
15925         expressions per value.  Do not use value-insertion
15926         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15927         all expressions.  Add verification that the value-sets
15928         only shrink during iteration.
15929         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15930         (do_pre_regular_insertion): Likewise.
15931         (do_pre_partial_partial_insertion): Likewise.
15933 2018-03-02  Richard Biener  <rguenther@suse.de>
15935         PR target/82005
15936         * config/darwin.c (saved_debug_info_level): New static global.
15937         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15938         (darwin_asm_lto_end): Restore debug info generation settings.
15940 2018-03-01  Martin Liska  <mliska@suse.cz>
15942         PR sanitizer/82484
15943         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15944         volatile arguments.
15946 2018-03-01  Richard Biener  <rguenther@suse.de>
15948         PR debug/84645
15949         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15950         type annotation with LTO when debug was disabled at compile-time.
15952 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15954         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15955         XINT with INTVAL.
15956         (mips_final_postscan_insn): Likewise.
15958 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15960         PR rtl-optimization/84528
15961         * alias.c (init_alias_target): Add commentary.
15962         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15963         a unique base value if the frame pointer is not eliminated
15964         to the stack pointer.
15966 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15968         PR rtl-optimization/83327
15969         * lra-int.h (hard_regs_spilled_into): Declare.
15970         * lra.c (hard_regs_spilled_into): Define.
15971         (init_reg_info): Init hard_regs_spilled_into.
15972         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15973         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15974         (process_bb_lives): Handle hard_regs_spilled_into.
15975         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15976         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15978 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15980         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15981         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15982         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15983         * config/rs6000/aix72.h: New file.
15985 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15987         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15988         instead of warning_at with conditional singular and plural messages
15989         where possible.
15991         PR target/52991
15992         * stor-layout.c (update_alignment_for_field): For
15993         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15994         && !DECL_PACKED (field), do the alignment update, just use
15995         only desired_align instead of MAX (type_align, desired_align)
15996         as the alignment.
15997         (place_field): Don't do known_align < desired_align handling
15998         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15999         is non-NULL, instead do it after rli->prev_field handling and
16000         only if not within a bitfield word.  For DECL_PACKED (field)
16001         use type_align of BITS_PER_UNIT.
16003 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
16005         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16006         superfluous parentheses and trailing spaces.
16008 2018-02-28  Richard Biener  <rguenther@suse.de>
16010         PR tree-optimization/84584
16011         * graphite-scop-detection.c (scop_detection::add_scop): Discard
16012         SCoPs with fake exit edge.
16014 2018-02-28  Martin Liska  <mliska@suse.cz>
16016         PR testsuite/84597
16017         * timevar.c (timer::print): Fix format to properly print 100%
16018         values.
16020 2018-02-28  Richard Biener  <rguenther@suse.de>
16022         PR middle-end/84607
16023         * genmatch.c (capture_info::walk_match): Do not mark
16024         captured expressions without operands as expr_p given
16025         they act more like predicates and should be subject to
16026         "lost tail" side-effect preserving.
16028 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
16030         PR rtl-optimization/81611
16031         * auto-inc-dec.c (attempt_change): Move dead note from
16032         mem_insn if it's the next use of regno
16033         (find_address): Take address use of reg holding
16034         non-incremented value.  Add parm to limit search to the named
16035         reg only.
16036         (merge_in_block): Attempt to use a mem insn that is the next
16037         use of the original regno.
16039 2018-02-27  Martin Sebor  <msebor@redhat.com>
16041         PR c++/83871
16042         * doc/invoke.texi (-Wmissing-attributes): New option.
16043         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16045 2018-02-27  Martin Sebor  <msebor@redhat.com>
16047         PR translation/84207
16048         * diagnostic-core.h (warning_n, error_n, inform_n): Change
16049         n argument to unsigned HOST_WIDE_INT.
16050         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16051         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
16052         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16053         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16055 2018-02-27  Richard Biener  <rguenther@suse.de>
16057         PR tree-optimization/84512
16058         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16059         Do not use the estimate returned from record_stmt_cost for
16060         the scalar iteration cost but sum properly using add_stmt_cost.
16062 2018-02-27  Richard Biener  <rguenther@suse.de>
16064         PR tree-optimization/84466
16065         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16066         Adjust last change to less strictly validate use operands.
16068 2018-02-27  Martin Liska  <mliska@suse.cz>
16070         PR gcov-profile/84548
16071         * gcov.c (process_file): Allow partial overlap and consider it
16072         also as group functions.
16073         (output_lines): Properly calculate range of lines for a group.
16075 2018-02-27  Martin Liska  <mliska@suse.cz>
16077         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16078         'ggc' suffixes.  Change first column width.
16079         (timer::print): Fix formatting of the column.
16081 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
16083         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16084         preserve inline entry blocks for the sake of debug inline
16085         entry point markers alone.
16086         (remove_unused_locals): Suggest in comments a better place to
16087         force the preservation of inline entry blocks that are
16088         otherwise unused, but do not preserve them.
16090 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16092         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16094 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16096         PR target/84039
16097         * config/i386/constraints.md (Bs): Replace
16098         ix86_indirect_branch_register with
16099         TARGET_INDIRECT_BRANCH_REGISTER.
16100         (Bw): Likewise.
16101         * config/i386/i386.md (indirect_jump): Likewise.
16102         (tablejump): Likewise.
16103         (*sibcall_memory): Likewise.
16104         (*sibcall_value_memory): Likewise.
16105         Peepholes of indirect call and jump via memory: Likewise.
16106         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16107         (*sibcall_value_GOT_32): Likewise.
16108         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16109         (GOT_memory_operand): Likewise.
16110         (call_insn_operand): Likewise.
16111         (sibcall_insn_operand): Likewise.
16112         (GOT32_symbol_operand): Likewise.
16113         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16115 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16117         PR rtl-optimization/83496
16118         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16119         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
16120         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16121         redundant insn, if any.
16122         (relax_delay_slots): Likewise.
16123         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16125 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
16127         PR tree-optimization/83965
16128         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16129         that grouped statements are part of a reduction chain.  Return
16130         true if the statement is not marked as a reduction itself but
16131         is part of a group.
16132         (vect_recog_dot_prod_pattern): Don't check whether the statement
16133         is part of a group here.
16134         (vect_recog_sad_pattern): Likewise.
16135         (vect_recog_widen_sum_pattern): Likewise.
16137 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16139         PR debug/84545
16140         * final.c (rest_of_clean_state): Also look for calls inside sequences.
16142 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16144         PR target/84530
16145         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16146         the bool argument.
16147         (ix86_output_indirect_function_return): New prototype.
16148         (ix86_split_simple_return_pop_internal): Likewise.
16149         * config/i386/i386.c (indirect_return_via_cx): New.
16150         (indirect_return_via_cx_bnd): Likewise.
16151         (indirect_thunk_name): Handle return va CX_REG.
16152         (output_indirect_thunk_function): Create alias for
16153         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16154         (ix86_output_indirect_jmp): Remove the bool argument.
16155         (ix86_output_indirect_function_return): New function.
16156         (ix86_split_simple_return_pop_internal): Likewise.
16157         * config/i386/i386.md (*indirect_jump): Don't pass false
16158         to ix86_output_indirect_jmp.
16159         (*tablejump_1): Likewise.
16160         (simple_return_pop_internal): Change it to define_insn_and_split.
16161         Call ix86_split_simple_return_pop_internal to split it for
16162         -mfunction-return=.
16163         (simple_return_indirect_internal): Call
16164         ix86_output_indirect_function_return instead of
16165         ix86_output_indirect_jmp.
16167 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
16169         PR bootstrap/84405
16170         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16171         memset and value initialization afterwards.
16173 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
16175         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16177 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16179         PR target/84521
16180         * common/config/aarch64/aarch64-common.c
16181         (aarch_option_optimization_table[]): Switch
16182         off fomit-frame-pointer
16184 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16185             Chung-Ju Wu  <jasonwucj@gmail.com>
16187         * config/nds32/nds32-multiple.md (load_multiple): Disallow
16188         volatile memory.
16189         (store_multiple): Ditto.
16191 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16193         * config.gcc: Add --with-cpu support for nds32 target.
16194         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16195         * config/nds32/nds32.opt: Add -mcpu= option.
16197 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
16199         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16200         isel=yes): Warn for these deprecated options.
16202 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
16204         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16205         ISA_2_5_MASKS_EMBEDDED.
16207 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
16209         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16210         p->max as pointers rather than using iterative_hash_expr.
16212 2018-02-23  Carl Love  <cel@us.ibm.com>
16214         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16215         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16216         BU_P8V_OVERLOAD_2.
16217         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16218         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16219         P8V_BUILTIN_VEC_VUNSIGNED2.
16221 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
16223         PR target/81572
16224         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16225         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16226         LRA_UNKNOWN_ALT.
16227         * lra-constraints.c (curr_insn_transform): Set up
16228         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
16229         LRA_UNKNOWN_ALT.
16230         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16231         * lra-eliminations.c (spill_pseudos): Ditto.
16232         (process_insn_for_elimination): Ditto.
16233         * lra-lives.c (reg_early_clobber_p): Use the new macros.
16234         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16235         LRA_NON_CLOBBERED_ALT.
16237 2018-02-22  Martin Sebor  <msebor@redhat.com>
16239         PR tree-optimization/84480
16240         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16241         to maybe_diag_stxncpy_trunc.  Call it.
16242         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16243         from gimple_fold_builtin_strcpy.  Print inlining stack.
16244         (handle_builtin_stxncpy): Print inlining stack.
16245         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16247 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
16249         PR target/84176
16250         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16251         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16252         and -fcheck-pointer-bounds are used together.
16253         (indirect_thunk_prefix): New enum.
16254         (indirect_thunk_need_prefix): New function.
16255         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
16256         "_nt" instead of "_bnd" for NOTRACK prefix.
16257         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16258         (output_indirect_thunk_function): Likewise.
16259         (): Likewise.
16260         (ix86_code_end): Update output_indirect_thunk_function calls.
16261         (ix86_output_indirect_branch_via_reg): Replace
16262         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16263         (ix86_output_indirect_branch_via_push): Likewise.
16264         (ix86_output_function_return): Likewise.
16265         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16266         incompatible with -fcf-protection=branch and
16267         -fcheck-pointer-bounds.
16269 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16271         PR target/83335
16272         * config/aarch64/aarch64.c (aarch64_print_address_internal):
16273         Change gcc_assert call to output_operand_lossage.
16275 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16277         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16279 2018-02-22  DJ Delorie  <dj@redhat.com>
16280             Sebastian Perta  <sebastian.perta@renesas.com>
16281             Oleg Endo  <olegendo@gcc.gnu.org>
16283         * config/rx/rx.c (rx_rtx_costs): New function.
16284         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16286 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16288         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16290 2018-02-22  Martin Liska  <mliska@suse.cz>
16292         PR driver/83193
16293         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16294         Add "native" as a possible value.
16296 2018-02-22  Martin Liska  <mliska@suse.cz>
16298         PR driver/83193
16299         * config/i386/i386.c (ix86_option_override_internal):
16300         Add "native" as a possible value for -march and -mtune.
16302 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
16304         PR target/84502
16305         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16306         to all type variants.
16308         PR tree-optimization/84503
16309         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16310         width as info->bitpos + info->bitsize - start.
16311         (merged_store_group::merge_overlapping): Simplify width computation.
16312         (check_no_overlap): New function.
16313         (imm_store_chain_info::try_coalesce_bswap): Compute expected
16314         start + width and last_order of the group, fail if check_no_overlap
16315         fails.
16316         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16317         to group if check_no_overlap fails.
16319 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16321         * config/rs6000/altivec.md: Delete contraint arguments to
16322         define_expand, define_split, and define_peephole2, and in
16323         define_insn_and_split if always unused.
16324         * config/rs6000/darwin.md: Ditto.
16325         * config/rs6000/dfp.md: Ditto.
16326         * config/rs6000/rs6000.md: Ditto.
16327         * config/rs6000/sync.md: Ditto.
16328         * config/rs6000/vector.md: Ditto.
16329         * config/rs6000/vsx.md: Ditto.
16331 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16333         * config/rs6000/altivec.md: Write output control strings as braced
16334         blocks instead of double-quoted strings.
16335         * config/rs6000/darwin.md: Ditto.
16336         * config/rs6000/rs6000.md: Ditto.
16337         * config/rs6000/vector.md: Ditto.
16338         * config/rs6000/vsx.md: Ditto.
16340 2018-02-21  Jason Merrill  <jason@redhat.com>
16342         PR c++/84314 - ICE with templates and fastcall attribute.
16343         * attribs.c (build_type_attribute_qual_variant): Remove assert.
16345 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16347         * ipa-cp.c (determine_versionability): Fix comment typos.
16349 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16351         PR c/84229
16352         * ipa-cp.c (determine_versionability): Do not version functions caling
16353         va_arg_pack.
16355 2018-02-21  Martin Liska  <mliska@suse.cz>
16357         PR driver/83193
16358         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16359         Add "native" as a possible value.
16360         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
16361         the macro when native cpu detection is available.
16363 2018-02-21  Martin Liska  <mliska@suse.cz>
16365         PR driver/83193
16366         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16367         Add "native" as a possible value.
16368         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16369         when native cpu detection is available.
16371 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
16372             Martin Sebor  <msebor@redhat.com>
16374         PR tree-optimization/84478
16375         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16376         false.
16377         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16378         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16379         support which is conservatively correct, for 2 only stay conservative
16380         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
16381         argument to the 2 argument get_range_strlen, adjust 6 arg
16382         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16383         false.
16384         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16385         (gimple_fold_builtin_strlen): Pass true as last argument to
16386         get_range_strlen.
16388 2018-02-20  Martin Sebor  <msebor@redhat.com>
16390         PR middle-end/84095
16391         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16392         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
16393         (builtin_memref::builtin_memref): Factor out parts into
16394         set_base_and_offset and call it.
16396 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16398         PR middle-end/84406
16399         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16400         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16401         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
16402         search at the associated MODE_INT.
16404 2018-02-20  Jeff Law  <law@redhat.com>
16406         PR middle-end/82123
16407         PR tree-optimization/81592
16408         PR middle-end/79257
16409         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16410         for range data rather than using global data.
16411         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16412         range data rather than using global data.
16413         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16414         pass it to children as needed.
16415         (struct directive::fmtresult): Similarly.
16416         (struct directive::set_width): Similarly.
16417         (struct directive::set_precision): Similarly.
16418         (format_integer, format_directive, parse_directive): Similarly.
16419         (format_none): Accept unnamed vr_values parameter.
16420         (format_percent, format_floating, format_character): Similarly.
16421         (format_string, format_plain): Similarly.
16422         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16423         the EVRP range analyzer for range data rather than using global data.
16424         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16425         gimple-ssa-evrp-analyze.h
16426         (class sprintf_dom_walker): Add after_dom_children member function.
16427         Add evrp_range_analyzer member.
16428         (sprintf_dom_walker::before_dom_children): Call into the EVRP
16429         range analyzer as needed.
16430         (sprintf_dom_walker::after_dom_children): New member function.
16431         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16432         if not optimizing.
16433         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16434         (evrp_range_analyzer::pop_to_marker): Likewise.
16436 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16438         PR tree-optimization/84419
16439         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16440         with the required type if its current type is compatible but
16441         different.
16443 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
16445         PR middle-end/82004
16446         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16447         after vectorization.
16449 2018-02-20  Martin Liska  <mliska@suse.cz>
16451         PR driver/83193
16452         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16453         possible values if we don't have a hint.
16455 2018-02-20  Martin Liska  <mliska@suse.cz>
16457         PR c/84310
16458         PR target/79747
16459         * final.c (shorten_branches): Build align_tab array with one
16460         more element.
16461         * opts.c (finish_options): Add alignment option limit check.
16462         (MAX_CODE_ALIGN): Likewise.
16463         (MAX_CODE_ALIGN_VALUE): Likewise.
16464         * doc/invoke.texi: Document maximum allowed option value for
16465         all -falign-* options.
16467 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
16469         PR target/84146
16470         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16471         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16472         * var-tracking.c (emit_note_insn_var_location): Remove all references
16473         to NOTE_INSN_CALL_ARG_LOCATION.
16474         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16475         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16476         Use copy_rtx_if_shared.
16477         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16478         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16479         (dwarf2out_var_location): Remove handling of
16480         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16481         on call_insn.
16482         * final.c (final_scan_insn): Remove all references to
16483         NOTE_INSN_CALL_ARG_LOCATION.
16484         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16485         before dumping final insns.
16486         * except.c (emit_note_eh_region_end): Remove all references to
16487         NOTE_INSN_CALL_ARG_LOCATION.
16488         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16489         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16490         * config/arc/arc.c (hwloop_optimize): Likewise.
16491         * config/arm/arm.c (create_fix_barrier): Likewise.
16492         * config/s390/s390.c (s390_chunkify_start): Likewise.
16493         * config/sh/sh.c (find_barrier): Likewise.
16494         * config/i386/i386.c (rest_of_insert_endbranch,
16495         ix86_seh_fixup_eh_fallthru): Likewise.
16496         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16497         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16498         * config/frv/frv.c (frv_function_prologue): Likewise.
16499         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16500         reg note.
16501         (note_outside_basic_block_p): Remove all references to
16502         NOTE_INSN_CALL_ARG_LOCATION.
16503         * gengtype.c (adjust_field_rtx_def): Likewise.
16504         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16505         Likewise.
16506         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16507         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16509         PR c++/84444
16510         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16511         is ADDR_EXPR.
16513         PR tree-optimization/84452
16514         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16515         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16516         is NULL.
16518 2018-02-19  Martin Liska  <mliska@suse.cz>
16520         PR sanitizer/82183
16521         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16523 2018-02-19  Martin Liska  <mliska@suse.cz>
16524             Richard Sandiford  <richard.sandiford@linaro.org>
16526         PR tree-optimization/82491
16527         * gimple-fold.c (get_base_constructor): Make earlier bail out
16528         to prevent ubsan.
16530 2018-02-19  Carl Love  <cel@us.ibm.com>
16532         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16533         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16534         BU_P8V_OVERLOAD_1.
16535         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16536         P8V_BUILTIN_VEC_NEG.
16538 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16540         * config/rl78/rl78.md (movdf): New define expand.
16542 2018-02-19  Martin Liska  <mliska@suse.cz>
16544         PR other/80589
16545         * doc/invoke.texi: Fix typo.
16546         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16548 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16550         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16551         handle rs6000_single_float and rs6000_double_float specially for
16552         e500 family CPUs.
16554 2018-02-16  Jeff Law  <law@redhat.com>
16556         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16557         (pop_regs): Use it.
16559 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16561         PR ipa/84425
16562         * ipa-inline.c (inline_small_functions): Fix a typo.
16564 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16566         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16568 2018-02-16  Carl Love  <cel@us.ibm.com>
16570         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16571         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16572         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16573         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16574         expansion to P8V_BUILTIN_VEC_FLOAT2.
16576 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16578         PR rtl-optimization/70023
16579         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16580         src_regno into account.
16582 2018-02-16  Carl Love  <cel@us.ibm.com>
16584         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16585         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16586         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16587         * config/rs6000/rs6000.c: Remove case statements for
16588         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16589         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16590         and P9V_BUILTIN_VEC_VINSERT4B.
16591         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16592         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16593         * config/rs6000/vsx.md:
16594         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16595         vec_insert4b.
16597 2018-02-16  Carl Love  <cel@us.ibm.com>
16599         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16600         vec_insert4b.
16601         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16602         definitions.
16603         * config/rs6000/rs6000-c.c: Add the definitions for
16604         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16605         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16606         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16607         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16608         definition for insert4b and define insn *insert3b_internal.
16609         * doc/extend.texi: Add documentation for vec_extract4b.
16611 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16613         * doc/extend.texi (Backwards Compatibility): Mention friend
16614         injection.  Note for-scope is deprecated.
16615         * doc/invoke.texi (-ffriend-injection): Deprecate.
16617 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16619         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16620         that moved to I2, also allow destinations that are a paradoxical
16621         subreg (instead of a normal reg).
16623 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16625         PR target/83831
16626         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16627         to QImode.
16629 2018-02-16  Richard Biener  <rguenther@suse.de>
16631         PR tree-optimization/84037
16632         PR tree-optimization/84016
16633         PR target/82862
16634         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16635         Adjust vec_construct for the fact we need additional higher latency
16636         128bit inserts for AVX256 and AVX512 vector builds.
16637         (ix86_add_stmt_cost): Scale vector construction cost for
16638         elementwise loads.
16640 2018-02-16  Richard Biener  <rguenther@suse.de>
16642         PR tree-optimization/84417
16643         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16644         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16645         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16647 2018-02-16  Martin Liska  <mliska@suse.cz>
16649         PR sanitizer/84307
16650         * internal-fn.def (ASAN_CHECK): Set proper flags.
16651         (ASAN_MARK): Likewise.
16653 2018-02-16  Julia Koval  <julia.koval@intel.com>
16655         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16656         from PTA_CANNONLAKE.
16658 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16660         PR target/84272
16661         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16662         Use ++iter rather than iter++ for std::list iterators.
16663         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16664         defer deleting them until all nodes in the forest are processed.  Do
16665         free even leaf nodes.  Change to_process into auto_vec.
16667         PR bootstrap/84405
16668         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16669         * vec.h (vec_default_construct): Use memset instead of placement new
16670         if BROKEN_VALUE_INITIALIZATION is defined.
16671         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16672         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16673         is defined.
16675         PR rtl-optimization/83723
16676         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16677         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16678         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16679         recursive calls.
16680         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16681         callers.
16682         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16684 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16686         PR rtl-optimization/81443
16687         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16688         from inner REGs to paradoxical SUBREGs.
16690 2018-02-16  Richard Biener  <rguenther@suse.de>
16692         PR tree-optimization/84399
16693         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16694         For operands we can analyze at their definition make sure we can
16695         analyze them at each use as well.
16697 2018-02-16  Richard Biener  <rguenther@suse.de>
16699         PR tree-optimization/84190
16700         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16701         volatile accesses if the decl isn't volatile.
16703 2018-02-15  Jason Merrill  <jason@redhat.com>
16705         PR c++/84314 - ICE with templates and fastcall attribute.
16706         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16707         TYPE_CANONICAL on an existing type.
16709 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16711         PR tree-optimization/84383
16712         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16713         dstoff nor call operand_equal_p if dstbase is NULL.
16715         PR tree-optimization/84334
16716         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16717         also a CONSTANT_CLASS_P, punt.
16719 2018-02-14  Jim Wilson  <jimw@sifive.com>
16721         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16722         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16723         to where locals are set.  Add TARGET_RVC support.
16724         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16726 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16728         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16730 2018-02-14  Martin Sebor  <msebor@redhat.com>
16732         PR tree-optimization/83698
16733         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16734         arrays constrain the offset range to their bounds.
16735         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16736         (builtin_access::overlap): Avoid setting the size of overlap if it's
16737         already been set.
16738         (maybe_diag_overlap): Also consider arrays when deciding what values
16739         of offsets to include in diagnostics.
16741 2018-02-14  Martin Sebor  <msebor@redhat.com>
16743         PR c/84108
16744         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16745         that correspond to the kind of a declaration.
16747 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16749         PR target/83984
16750         * config/pa/pa.md: Load address of PIC label using the linkage table
16751         if the label is nonlocal.
16753 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16755         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16756         warning message if user requests -maltivec=be.
16757         * doc/invoke.texi: Document deprecation of -maltivec=be.
16759 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16761         PR target/84220
16762         * config/rs6000/rs6000-c.c: Update definitions for
16763         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16764         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16766 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16768         PR target/84239
16769         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16770         add _get_ssp intrinsics. Remove argument from
16771         __builtin_ia32_rdssp[d|q].
16772         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16773         * config/i386/i386-builtin.def: Remove argument from
16774         __builtin_ia32_rdssp[d|q].
16775         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16776         ix86_expand_special_args_builtin for _rdssp[d|q].
16777         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16778         Clear register before usage.
16779         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16780         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16782 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16784         PR tree-optimization/84357
16785         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16786         operand 1 of an ARRAY_REF too.
16788 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16790         PR target/83831
16791         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16792         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16793         declarations.
16794         (set_of_reg): New struct.
16795         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16796         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16797         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16798         functions.
16799         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16800         Split into bitclr, bitset, bitinvert patterns if appropriate.
16801         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16802         use rx_fuse_in_memory_bitop.
16803         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16804         to named insn, correct maximum insn length.
16806 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16808         PR target/79242
16809         * machmode.def: Define a complex mode for PARTIAL_INT.
16810         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16811         MODE_PARTIAL_INT.
16812         * doc/rtl.texi: Document CSPImode.
16813         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16814         handling.
16815         (msp430_hard_regno_nregs_with_padding): Likewise.
16817 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16819         PR target/84279
16820         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16822 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16824         PR rtl-optimization/84169
16825         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16826         we generated a parallel as new i3 and we split that to new i2 and i3
16827         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16828         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16829         those to i2, not i1.  Partially rewrite this scan code.
16831 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16833         PR c/82210
16834         * stor-layout.c (place_field): For variable length fields, adjust
16835         offset_align afterwards not just based on the field's alignment,
16836         but also on the size.
16838         PR middle-end/84309
16839         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16840         of exps and logs in the use_exp2 case.
16842 2018-02-13  Jeff Law  <law@redhat.com>
16844         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16845         entry for "vector".
16847         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16848         ARGS as unused.
16850 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16852         PR debug/84342
16853         PR debug/84319
16854         * common.opt (gas-loc-support, gas-locview-support): New.
16855         (ginline-points, ginternal-reset-location-views): New.
16856         * doc/invoke.texi: Document them.  Use @itemx where intended.
16857         (gvariable-location-views): Adjust.
16858         * target.def (reset_location_view): New.
16859         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16860         (TARGET_RESET_LOCATION_VIEW): New.
16861         * doc/tm.texi: Rebuilt.
16862         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16863         (dwarf2out_default_as_locview_support): New.
16864         (output_asm_line_debug_info): Use option variables.
16865         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16866         (output_loc_list): Likewise.
16867         (add_high_low_attributes): Check option variables.
16868         Don't output entry view attribute in strict mode.
16869         (gen_inlined_subroutine_die): Check option variables.
16870         (dwarf2out_inline_entry): Likewise.
16871         (init_sections_and_labels): Likewise.
16872         (dwarf2out_early_finish): Likewise.
16873         (maybe_reset_location_view): New, from...
16874         (dwarf2out_var_location): ... here.  Call it.
16875         * debug.h (dwarf2out_default_as_loc_support): Declare.
16876         (dwarf2out_default_as_locview_support): Declare.
16877         * hooks.c (hook_int_rtx_insn_0): New.
16878         * hooks.h (hook_int_rtx_insn_0): Declare.
16879         * toplev.c (process_options): Take -gas-loc-support and
16880         -gas-locview-support from dwarf2out.  Enable
16881         -gvariable-location-views by default only with locview
16882         assembler support.  Enable -ginternal-reset-location-views by
16883         default only if the target defines the corresponding hook.
16884         Enable -ginline-points by default if location views are
16885         enabled; force it disabled if statement frontiers are
16886         disabled.
16887         * tree-inline.c (expand_call_inline): Check option variables.
16888         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16890 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16892         PR tree-optimization/84321
16893         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16894         handling.  Also check whether the anti-range contains any values
16895         that satisfy the mask; switch to a VR_RANGE if not.
16897 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16899         PR sanitizer/84340
16900         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16902 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16904         PR c++/83990
16905         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16906         of call statements, also set location of a load to a temporary.
16908 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16910         * config/rl78/rl78.c (add_vector_labels): New function.
16911         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16912         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16913         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16914         which checks that no arguments are passed.
16915         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16916         * doc/extend.texi: Documentation for the new attribute.
16918 2018-02-13  Andreas Schwab  <schwab@suse.de>
16920         * config/riscv/linux.h (CPP_SPEC): Define.
16922 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16924         PR target/84335
16925         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16926         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16927         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16928         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16929         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16930         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16931         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16932         temporarily for AES and PCLMUL builtins.
16934         PR tree-optimization/84339
16935         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16936         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16937         Formatting fixes.
16939         PR middle-end/84309
16940         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16941         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16942         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16943         inline function.
16944         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16945         inline function.
16946         * omp-simd-clone.h: New file.
16947         * omp-simd-clone.c: Include omp-simd-clone.h.
16948         (expand_simd_clones): No longer static.
16949         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16950         cgraph.h and omp-simd-clone.h.
16951         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16952         (vect_recog_widen_shift_pattern): Formatting fix.
16953         (vect_pattern_recog_1): Don't check optab for calls.
16955         PR target/84336
16956         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16957         operands[2] into a REG before using gen_lowpart on it.
16959 2018-02-12  Jeff Law  <law@redhat.com>
16961         PR target/83760
16962         * config/sh/sh.c (find_barrier): Consider a sibling call
16963         a barrier as well.
16965         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16966         successfully back substituting a reg.
16968 2018-02-12  Richard Biener  <rguenther@suse.de>
16970         PR tree-optimization/84037
16971         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16972         parameter, move visited init to caller.
16973         (vect_slp_analyze_operations): Separate cost from validity
16974         check, initialize visited once for all instances.
16975         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16976         for all instances.
16977         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16978         out an assert.
16979         (vect_model_promotion_demotion_cost): Likewise.
16980         (vectorizable_bswap): Guard cost modeling with !slp_node
16981         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16982         SLP stmts.
16983         (vectorizable_call): Likewise.
16984         (vectorizable_conversion): Likewise.
16985         (vectorizable_assignment): Likewise.
16986         (vectorizable_shift): Likewise.
16987         (vectorizable_operation): Likewise.
16988         (vectorizable_store): Likewise.
16989         (vectorizable_load): Likewise.
16990         (vectorizable_condition): Likewise.
16991         (vectorizable_comparison): Likewise.
16993 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16995         PR sanitizer/84307
16996         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16997         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16998         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17000 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17002         PR middle-end/83665
17003         * params.def (inline-min-speedup): Increase from 8 to 15.
17004         (max-inline-insns-auto): Decrease from 40 to 30.
17005         * ipa-split.c (consider_split): Add some buffer for function to
17006         be considered inlining candidate.
17007         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17008         default values.
17010 2018-02-12  Richard Biener  <rguenther@suse.de>
17012         PR tree-optimization/84037
17013         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17014         matched stmts if we cannot swap the non-matched ones.
17016 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17018         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17019         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17020         _mm_maskz_scalef_round_ss): New intrinsics.
17021         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17022         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17023         __builtin_ia32_scalefss_round): Remove.
17024         (__builtin_ia32_scalefsd_mask_round,
17025         __builtin_ia32_scalefss_mask_round): New intrinsics.
17026         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17027         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17028         ((match_operand:VF_128 2 "<round_nimm_predicate>"
17029         "<round_constraint>")): Changed to ...
17030         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17031         "<round_scalar_constraint>")): ... this.
17032         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17033         %0, %1, %2<round_op3>}"): Changed to ...
17034         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17035         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17036         %2<round_scalar_mask_op3>}"): ... this.
17037         * config/i386/subst.md (round_scalar_nimm_predicate): New.
17039 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17041         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17042         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17043         (_mm_maskz_sqrt_round_ss): New intrinsics.
17044         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17045         (__builtin_ia32_sqrtsd_mask_round)
17046         (__builtin_ia32_sqrtss_mask_round): New builtins.
17047         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17048         (__builtin_ia32_sqrtss_round): Remove.
17049         (__builtin_ia32_sqrtsd_mask_round)
17050         (__builtin_ia32_sqrtss_mask_round): New builtins.
17051         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17052         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17053         ((match_operand:VF_128 1 "vector_operand"
17054         "xBm,<round_constraint>")): Changed to ...
17055         ((match_operand:VF_128 1 "vector_operand"
17056         "xBm,<round_scalar_constraint>")): ... this.
17057         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17058         %0, %2, %<iptr>1<round_op3>}): Changed to ...
17059         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17060         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17061         %<iptr>1<round_scalar_mask_op3>}): ... this.
17062         ((set_attr "prefix" "<round_prefix>")): Changed to ...
17063         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17065 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
17067         PR target/84266
17068         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17069         Cast vec_cmpeq result to correct type.
17070         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17071         Cast vec_cmpgt result to correct type.
17073 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
17075         * final.c (final_scan_insn_1): Renamed from...
17076         (final_scan_insn): ... this.  New wrapper, to recover
17077         seen from the outermost call in recursive ones.
17078         * config/sparc/sparc.c (output_return): Drop seen from call.
17079         (output_sibcall): Likewise.
17080         * config/visium/visium.c (output_branch): Likewise.
17082 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
17084         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17085         function label.
17087 2018-02-10  Alan Modra  <amodra@gmail.com>
17089         PR target/84300
17090         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17091         Specify LR as an input.
17093 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
17095         PR sanitizer/83987
17096         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17097         remove_member_access_dummy_vars): New functions.
17098         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17099         lower_omp_1, execute_lower_omp): Use them.
17101         PR rtl-optimization/84308
17102         * shrink-wrap.c (spread_components): Release todo vector.
17104 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
17106         PR rtl-optimization/57193
17107         * ira-color.c (struct allocno_color_data): Add member
17108         conflict_allocno_hard_prefs.
17109         (update_conflict_allocno_hard_prefs): New.
17110         (bucket_allocno_compare_func): Add a preference based on
17111         conflict_allocno_hard_prefs.
17112         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17113         (color_allocnos): Remove a dead code.  Initiate
17114         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
17116 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17118         PR target/84226
17119         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17120         constraint from =wa to wa.  Avoid a subreg on the output operand,
17121         instead use a pseudo and subreg it in a move.
17122         (p9_xxbrd_<mode>): Changed to ...
17123         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17124         (p9_xxbrd_v2df): New expander.
17125         (p9_xxbrw_<mode>): Changed to ...
17126         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17127         (p9_xxbrw_v4sf): New expander.
17129 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17131         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17133 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
17135         PR target/83926
17136         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17137         multiply in 32-bit mode.
17138         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17139         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17140         mode.
17142 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17144         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17145         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17146         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17147         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17149 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
17151         PR lto/84213
17152         * dwarf2out.c (is_trivial_indirect_ref): New function.
17153         (dwarf2out_late_global_decl): Do not generate a location
17154         attribute for variables that have a non-trivial DECL_VALUE_EXPR
17155         and that are not defined in the current unit.
17157 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17159         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17160         instead of a libcall for UNORDERED.
17162 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
17164         PR target/82641
17165         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17166         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17168 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17170         PR target/PR84295
17171         * config/s390/s390.c (s390_set_current_function): Invoke
17172         s390_indirect_branch_settings also if fndecl didn't change.
17174 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17176         * config/rs6000/rs6000.md (blockage): Set length to zero.
17178 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17180         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17182 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17184         PR sanitizer/84285
17185         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17186         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17187         -static-lib*san.
17189         PR debug/84252
17190         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17191         PARALLEL incoming that failed vt_get_decl_and_offset check.
17193         PR middle-end/84237
17194         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17195         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17196         TREE_READONLY bit.
17197         (get_variable_section): For decls in named .bss* sections pass true as
17198         second argument to bss_initializer_p.
17200 2018-02-09  Marek Polacek  <polacek@redhat.com>
17201             Jakub Jelinek  <jakub@redhat.com>
17203         PR c++/83659
17204         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17205         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
17206         Sync some changes from cxx_fold_indirect_ref.
17208 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17210         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17211         markers.
17212         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17213         (BLOCK_INLINE_ENTRY_LABEL): New.
17214         (dwarf2out_var_location): Disregard inline entry markers.
17215         (inline_entry_data): New struct.
17216         (inline_entry_data_hasher): New hashtable type.
17217         (inline_entry_data_hasher::hash): New.
17218         (inline_entry_data_hasher::equal): New.
17219         (inline_entry_data_table): New variable.
17220         (add_high_low_attributes): Add DW_AT_entry_pc and
17221         DW_AT_GNU_entry_view attributes if a pending entry is found
17222         in inline_entry_data_table.  Add old entry_pc attribute only
17223         if debug nonbinding markers are disabled.
17224         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17225         markers are enabled.
17226         (block_within_block_p, dwarf2out_inline_entry): New.
17227         (dwarf2out_finish): Check that no entries remained in
17228         inline_entry_data_table.
17229         * final.c (reemit_insn_block_notes): Handle inline entry notes.
17230         (final_scan_insn, notice_source_line): Likewise.
17231         (rest_of_clean_state): Skip inline entry markers.
17232         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17233         markers.
17234         * gimple.c (gimple_build_debug_inline_entry): New.
17235         * gimple.h (enum gimple_debug_subcode): Add
17236         GIMPLE_DEBUG_INLINE_ENTRY.
17237         (gimple_build_debug_inline_entry): Declare.
17238         (gimple_debug_inline_entry_p): New.
17239         (gimple_debug_nonbind_marker_p): Adjust.
17240         * insn-notes.def (INLINE_ENTRY): New.
17241         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17242         inline entry marker notes.
17243         (print_insn): Likewise.
17244         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17245         (INSN_DEBUG_MARKER_KIND): Likewise.
17246         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17247         * tree-inline.c (expand_call_inline): Build and insert
17248         debug_inline_entry stmt.
17249         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17250         inline entry blocks early, if nonbind markers are enabled.
17251         (dump_scope_block): Dump fragment info.
17252         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17253         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17254         (gimple_build_debug_inline_entry): New.
17255         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17256         Enable/disable inline entry points too.
17257         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17258         (DEBUG_INSN): Describe inline entry markers.
17260         * common.opt (gvariable-location-views): New.
17261         (gvariable-location-views=incompat5): New.
17262         * config.in: Rebuilt.
17263         * configure: Rebuilt.
17264         * configure.ac: Test assembler for view support.
17265         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17266         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17267         * dwarf2out.c (var_loc_view): New typedef.
17268         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17269         (dwarf2out_locviews_in_attribute): New.
17270         (dwarf2out_locviews_in_loclist): New.
17271         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17272         (enum dw_line_info_opcode): Add LI_adv_address.
17273         (struct dw_line_info_table): Add view.
17274         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17275         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17276         (zero_view_p): New variable.
17277         (ZERO_VIEW_P): New macro.
17278         (output_asm_line_debug_info): New.
17279         (struct var_loc_node): Add view.
17280         (add_AT_view_list, AT_loc_list): New.
17281         (add_var_loc_to_decl): Add view param.  Test it against last.
17282         (new_loc_list): Add view params.  Record them.
17283         (AT_loc_list_ptr): Handle loc and view lists.
17284         (view_list_to_loc_list_val_node): New.
17285         (print_dw_val): Handle dw_val_class_view_list.
17286         (size_of_die): Likewise.
17287         (value_format): Likewise.
17288         (loc_list_has_views): New.
17289         (gen_llsym): Set vl_symbol too.
17290         (maybe_gen_llsym, skip_loc_list_entry): New.
17291         (dwarf2out_maybe_output_loclist_view_pair): New.
17292         (output_loc_list): Output view list or entries too.
17293         (output_view_list_offset): New.
17294         (output_die): Handle dw_val_class_view_list.
17295         (output_dwarf_version): New.
17296         (output_compilation_unit_header): Use it.
17297         (output_skeleton_debug_sections): Likewise.
17298         (output_rnglists, output_line_info): Likewise.
17299         (output_pubnames, output_aranges): Update version comments.
17300         (output_one_line_info_table): Output view numbers in asm comments.
17301         (dw_loc_list): Determine current endview, pass it to new_loc_list.
17302         Call maybe_gen_llsym.
17303         (loc_list_from_tree_1): Adjust.
17304         (add_AT_location_description): Create view list attribute if
17305         needed, check it's absent otherwise.
17306         (convert_cfa_to_fb_loc_list): Adjust.
17307         (maybe_emit_file): Call output_asm_line_debug_info for test.
17308         (dwarf2out_var_location): Reset views as needed.  Precompute
17309         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
17310         attribute.  Set view.
17311         (new_line_info_table): Reset next view.
17312         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17313         (dwarf2out_source_line): Likewise.  Output view resets and labels to
17314         the assembler, or select appropriate line info opcodes.
17315         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17316         (optimize_string_length): Catch it.  Adjust.
17317         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
17318         dw_val_class_view_list, and remove it if no longer needed.
17319         (hash_loc_list): Hash view numbers.
17320         (loc_list_hasher::equal): Compare them.
17321         (optimize_location_lists): Check whether a view list symbol is
17322         needed, and whether the locview attribute is present, and
17323         whether they match.  Remove the locview attribute if no longer
17324         needed.
17325         (index_location_lists): Call skip_loc_list_entry for test.
17326         (dwarf2out_finish): Call output_asm_line_debug_info for test.
17327         Use output_dwarf_version.
17328         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17329         (struct dw_val_node): Add val_view_list.
17330         * final.c (SEEN_NEXT_VIEW): New.
17331         (set_next_view_needed): New.
17332         (clear_next_view_needed): New.
17333         (maybe_output_next_view): New.
17334         (final_start_function): Rename to...
17335         (final_start_function_1): ... this.  Take pointer to FIRST,
17336         add SEEN parameter.  Emit param bindings in the initial view.
17337         (final_start_function): Reintroduce SEEN-less interface.
17338         (final): Rename to...
17339         (final_1): ... this.  Take SEEN parameter.  Output final pending
17340         next view at the end.
17341         (final): Reintroduce seen-less interface.
17342         (final_scan_insn): Output pending next view before switching
17343         sections or ending a block.  Mark the next view as needed when
17344         outputting variable locations.  Notify debug backend of section
17345         changes, and of location view changes.
17346         (rest_of_handle_final): Adjust.
17347         * toplev.c (process_options): Autodetect value for debug variable
17348         location views option.  Warn on incompat5 without -gdwarf-5.
17349         * doc/invoke.texi (gvariable-location-views): New.
17350         (gvariable-location-views=incompat5): New.
17351         (gno-variable-location-views): New.
17353 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
17355         PR tree-optimization/84136
17356         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17357         that the result of find_edge is non-NULL.
17359 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17361         PR target/83008
17362         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17363         storing integer register in SImode.  Fix cost of 256 and 512
17364         byte aligned SSE register store.
17366 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17368         * config/i386/i386.c (ix86_multiplication_cost): Fix
17369         multiplication cost for TARGET_AVX512DQ.
17371 2018-02-08  Marek Polacek  <polacek@redhat.com>
17373         PR tree-optimization/84238
17374         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17375         get_range_strlen.
17377 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17379         PR tree-optimization/84265
17380         * tree-vect-stmts.c (vectorizable_store): Don't treat
17381         VMAT_CONTIGUOUS accesses as grouped.
17382         (vectorizable_load): Likewise.
17384 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17386         PR tree-optimization/81635
17387         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17388         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17389         (test_round_for_mask): New functions.
17390         (wide_int_cc_tests): Call test_round_for_mask.
17391         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17392         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17393         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17394         range returned by get_range_info.
17396 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17398         PR ipa/81360
17399         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17400         * symtab.c: Include builtins.h
17401         (symtab_node::output_to_lto_symbol_table_p): Move here
17402         from lto-streamer-out.c:output_symbol_p.
17403         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17404         (output_symbol_p): Move all logic to symtab.c
17405         (produce_symtab): Update.
17407 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17409         * config/s390/s390-opts.h (enum indirect_branch): Define.
17410         * config/s390/s390-protos.h (s390_return_addr_from_memory)
17411         (s390_indirect_branch_via_thunk)
17412         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17413         (enum s390_indirect_branch_type): Define.
17414         * config/s390/s390.c (struct s390_frame_layout, struct
17415         machine_function): Remove.
17416         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17417         (indirect_branch_table_label_no, indirect_branch_table_name):
17418         Define variables.
17419         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17420         (enum s390_indirect_branch_option): Define.
17421         (s390_return_addr_from_memory): New function.
17422         (s390_handle_string_attribute): New function.
17423         (s390_attribute_table): Add new attribute handler.
17424         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17425         (s390_indirect_branch_via_thunk): New function.
17426         (s390_indirect_branch_via_inline_thunk): New function.
17427         (s390_function_ok_for_sibcall): When jumping via thunk disallow
17428         sibling call optimization for non z10 compiles.
17429         (s390_emit_call): Force indirect branch target to be a single
17430         register.  Add r1 clobber for non-z10 compiles.
17431         (s390_emit_epilogue): Emit return jump via return_use expander.
17432         (s390_reorg): Handle JUMP_INSNs as execute targets.
17433         (s390_option_override_internal): Perform validity checks for the
17434         new command line options.
17435         (s390_indirect_branch_attrvalue): New function.
17436         (s390_indirect_branch_settings): New function.
17437         (s390_set_current_function): Invoke s390_indirect_branch_settings.
17438         (s390_output_indirect_thunk_function):  New function.
17439         (s390_code_end): Implement target hook.
17440         (s390_case_values_threshold): Implement target hook.
17441         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17442         macros.
17443         * config/s390/s390.h (struct s390_frame_layout)
17444         (struct machine_function): Move here from s390.c.
17445         (TARGET_INDIRECT_BRANCH_NOBP_RET)
17446         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17447         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17448         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17449         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17450         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17451         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17452         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17453         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17454         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17455         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17456         (mnemonic attribute): Add values which aren't recognized
17457         automatically.
17458         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17459         pattern for branch conversion.  Fix mnemonic attribute.
17460         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17461         indirect branch via thunk if requested.
17462         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17463         ("*indirect_jump"): Disable for branch conversion using out of
17464         line thunks.
17465         ("indirect_jump_via_thunk<mode>_z10")
17466         ("indirect_jump_via_thunk<mode>")
17467         ("indirect_jump_via_inlinethunk<mode>_z10")
17468         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17469         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17470         ("casesi_jump_via_inlinethunk<mode>_z10")
17471         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17472         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17473         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17474         ("*indirect2_jump"): Disable for branch conversion.
17475         ("casesi_jump"): Turn into expander and expand patterns for branch
17476         conversion.
17477         ("return_use"): New expander.
17478         ("*return"): Emit return via thunk and rename it to ...
17479         ("*return<mode>"): ... this one.
17480         * config/s390/s390.opt: Add new options and and enum for the
17481         option values.
17483 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17485         * lra-constraints.c (match_reload): Unconditionally use
17486         gen_lowpart_SUBREG, rather than selecting between that
17487         and equivalent gen_rtx_SUBREG code.
17489 2018-02-08  Richard Biener  <rguenther@suse.de>
17491         PR tree-optimization/84233
17492         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17493         changed flag instead of boguously re-using phi_inserted.
17495 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17497         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17498         static local variables.
17500 2018-02-08  Richard Biener  <rguenther@suse.de>
17502         PR tree-optimization/84278
17503         * tree-vect-stmts.c (vectorizable_store): When looking for
17504         smaller vector types to perform grouped strided loads/stores
17505         make sure the mode is supported by the target.
17506         (vectorizable_load): Likewise.
17508 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17510         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17511         Increase LDP/STP opportunities by adding adjacent callee-saves.
17513 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17515         PR rtl-optimization/84068
17516         PR rtl-optimization/83459
17517         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17519 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17521         PR tree-optimization/84224
17522         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17523         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17524         non-zero arguments.
17526 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17528         PR target/84113
17529         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17530         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17531         count, remove one USE.
17533 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17535         * doc/install.texi (Configuration): Document the
17536         --with-long-double-format={ibm,ieee} PowerPC configuration
17537         options.
17539         PR target/84154
17540         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17541         Convert from define_expand to be define_insn_and_split.  Rework
17542         float/double/_Float128 conversions to QI/HI/SImode to work with
17543         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17544         conversions to QI/HImode types did a store and then a load to
17545         truncate the value.  For conversions to VSX registers, don't split
17546         the insn, instead emit the code directly.  Use the code iterator
17547         any_fix to combine signed and unsigned conversions.
17548         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17549         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17550         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17551         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17552         (fix_<mode>di2_hw): Likewise.
17553         (fixuns_<mode>di2_hw): Likewise.
17554         (fix_<mode>si2_hw): Likewise.
17555         (fixuns_<mode>si2_hw): Likewise.
17556         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17557         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17558         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17559         fix<uns>_trunc<SFDF:mode>si2_p8.
17560         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17561         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17562         (fix<uns>_<mode>_mem): Likewise.
17563         (fctiw<u>z_<mode>_mem): Likewise.
17564         (fix<uns>_<mode>_mem): Likewise.
17565         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17566         the register allocator from doing a direct move to the GPRs to do
17567         a store, and instead use the ISA 3.0 store byte/half-word from
17568         vector register instruction.  For IEEE 128-bit floating point,
17569         also optimize stores of 32-bit ints.
17570         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17572 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17574         * genextract.c (push_pathstr_operand): New function to support
17575         [a-zA-Z].
17576         (walk_rtx): Call push_pathstr_operand.
17577         (print_path): Support [a-zA-Z].
17579 2018-02-07  Richard Biener  <rguenther@suse.de>
17581         PR tree-optimization/84037
17582         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17583         (cse_and_gimplify_to_preheader): Declare.
17584         (vect_get_place_in_interleaving_chain): Likewise.
17585         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17586         ivexpr_map.
17587         (_loop_vec_info::~_loop_vec_info): Delete it.
17588         (cse_and_gimplify_to_preheader): New function.
17589         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17590         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17591         (vectorizable_load): Likewise.  For grouped stores always base
17592         the IV on the first element.
17593         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17594         condition before gimplifying.
17596 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17598         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17599         *DIV_EXPR and *MOD_EXPR.
17601 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17603         PR target/84248
17604         * config/i386/i386.c (ix86_option_override_internal): Mask out
17605         the CF_SET bit when checking -fcf-protection.
17607 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17609         PR libgomp/84217
17610         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17611         enough.
17613 2018-02-07  Richard Biener  <rguenther@suse.de>
17615         PR tree-optimization/84204
17616         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17617         this place.
17619         PR tree-optimization/84205
17620         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17621         special-case isl_ast_op_zdiv_r.
17623         PR tree-optimization/84223
17624         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17625         Only add conditions from within the region.
17626         (gather_bbs::after_dom_children): Adjust.
17628 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17630         PR target/84209
17631         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17632         * config/avr/avr.md: Only post-reload split REG-REG moves if
17633         either register is GENERAL_REG_P.
17635 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17637         PR tree-optimization/84235
17638         * tree-ssa-scopedtables.c
17639         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17640         if the subtraction is performed in floating point type where NaNs are
17641         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17642         build 1.  Formatting fix.
17644 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17646         PR target/84146
17647         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17648         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17649         and skip it regardless of bb boundaries.  Use CALL_P macro,
17650         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17651         unnecessarily, formatting fix.
17653 2018-02-06  Michael Collison  <michael.collison@arm.com>
17655         * config/arm/thumb2.md:
17656         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17657         (*thumb_mov_notscc): Ditto.
17659 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17661         PR target/84154
17662         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17663         unsigned_fix, not "s".
17665 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17667         * configure.ac (gcc_fn_eh_frame_ro): New function.
17668         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17669         correct .eh_frame permissions.
17670         * configure: Regenerate.
17672 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17674         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17675         irrelevant options.
17677 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17679         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17680         Display warning message for -mno-speculate-indirect-jumps.
17682 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17684         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17685         Undocumented.
17686         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17688 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17690         PR tree-optimization/84225
17691         * tree-eh.c (find_trapping_overflow): Only call
17692         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17694 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17696         PR target/84145
17697         * config/i386/i386.c: Reimplement the check of possible options
17698         -mibt/-mshstk conbination. Change error messages.
17699         * doc/invoke.texi: Fix a typo: remove extra '='.
17701 2018-02-06  Marek Polacek  <polacek@redhat.com>
17703         PR tree-optimization/84228
17704         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17706 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17708         PR target/82641
17709         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17710         emitted arch directives.
17711         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17712         __ARM_FEATURE_COPROC before changing architectures.
17714 2018-02-06  Richard Biener  <rguenther@suse.de>
17716         * config/i386/i386.c (print_reg): Fix typo.
17717         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17719 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17721         * configure: Regenerate.
17723 2018-02-05  Martin Sebor  <msebor@redhat.com>
17725         PR tree-optimization/83369
17726         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17727         inlining context.
17729 2018-02-05  Martin Liska  <mliska@suse.cz>
17731         * doc/invoke.texi: Cherry-pick upstream r323995.
17733 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17735         * ira.c (ira_init_register_move_cost): Adjust comment.
17737 2018-02-05  Martin Liska  <mliska@suse.cz>
17739         PR gcov-profile/84137
17740         * doc/gcov.texi: Fix typo in documentation.
17742 2018-02-05  Martin Liska  <mliska@suse.cz>
17744         PR gcov-profile/83879
17745         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17746         using dlopen functionality.
17748 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17750         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17751         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17752         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17753         _mm_maskz_range_round_ss): New intrinsics.
17754         (__builtin_ia32_rangesd128_round)
17755         (__builtin_ia32_rangess128_round): Remove.
17756         (__builtin_ia32_rangesd128_mask_round,
17757         __builtin_ia32_rangess128_mask_round): New builtins.
17758         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17759         __builtin_ia32_rangess128_round): Remove.
17760         (__builtin_ia32_rangesd128_mask_round,
17761         __builtin_ia32_rangess128_mask_round): New builtins.
17762         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17763         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17764         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17765         "<round_saeonly_constraint>")): Changed to ...
17766         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17767         "<round_saeonly_scalar_constraint>")): ... this.
17768         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17769         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17770         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17771         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17772         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17774 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17776         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17777         options.
17778         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17779         Remove all values except native, 8540 and 8548.
17781 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17783         * config/i386/i386.c (ix86_output_function_return): Pass
17784         INVALID_REGNUM, instead of -1, as invalid register number to
17785         indirect_thunk_name and output_indirect_thunk.
17787 2018-02-02  Julia Koval  <julia.koval@intel.com>
17789         * config.gcc: Add -march=icelake.
17790         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17791         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17792         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17793         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17794         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17795         (processor_target_table): Add icelake.
17796         (ix86_option_override_internal): Handle new PTAs.
17797         (get_builtin_code_for_version): Handle icelake.
17798         (M_INTEL_COREI7_ICELAKE): New.
17799         (fold_builtin_cpu): Handle icelake.
17800         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17801         * doc/invoke.texi: Add -march=icelake.
17803 2018-02-02  Julia Koval  <julia.koval@intel.com>
17805         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17806         to wide_int_bitmask.
17807         * wide-int-bitmask.h: New.
17809 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17811         PR target/84066
17812         * config/i386/i386.md: Replace Pmode with word_mode in
17813         builtin_setjmp_setup and builtin_longjmp to support x32.
17815 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17817         PR target/56010
17818         PR target/83743
17819         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17820         #include "opts.h".
17821         (rs6000_supported_cpu_names): New static variable.
17822         (linux_cpu_translation_table): Likewise.
17823         (elf_platform) <cpu>: Define new static variable and use it.
17824         Translate kernel AT_PLATFORM name to canonical name if needed.
17825         Error if platform name is unknown.
17827 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17829         PR target/84089
17830         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17832 2018-02-01  Jeff Law  <law@redhat.com>
17834         PR target/84128
17835         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17836         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17837         the scratch if RELEASE_VIA_POP is false.
17838         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17839         If we have to save a temporary register, decrement SIZE appropriately.
17840         Pass new arguments to release_scratch_register_on_entry.
17841         (ix86_adjust_stack_and_probe): Likewise.
17842         (ix86_emit_probe_stack_range): Pass new arguments to
17843         release_scratch_register_on_entry.
17845 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17847         PR rtl-optimization/84157
17848         * combine.c (change_zero_ext): Use REG_P predicate in
17849         front of HARD_REGISTER_P predicate.
17851 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17853         * config/avr/avr.c (avr_option_override): Move disabling of
17854         -fdelete-null-pointer-checks to...
17855         * common/config/avr/avr-common.c (avr_option_optimization_table):
17856         ...here.
17858 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17860         PR tree-optimization/81635
17861         * tree-data-ref.c (split_constant_offset_1): For types that
17862         wrap on overflow, try to use range info to prove that wrapping
17863         cannot occur.
17865 2018-02-01  Renlin Li  <renlin.li@arm.com>
17867         PR target/83370
17868         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17869         TAILCALL_ADDR_REGS.
17870         (aarch64_register_move_cost): Likewise.
17871         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17872         TAILCALL_ADDR_REGS.
17873         (REG_CLASS_NAMES): Likewise.
17874         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17875         TAILCALL_ADDR_REGS. Remove IP registers.
17876         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17878 2018-02-01  Richard Biener  <rguenther@suse.de>
17880         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17881         for specifying RPO order and allow NULL for that.
17882         * domwalk.c (dom_walker::dom_walker): Likewise.
17883         (dom_walker::walk): Handle NULL RPO order.
17884         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17885         in RPO order.
17886         (rewrite_update_dom_walker): Likewise.
17887         (mark_def_dom_walker): Likewise.
17889 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17891         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17892         (aarch64_maybe_expand_sve_subreg_move): Declare.
17893         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17894         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17895         predicate.
17896         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17897         that are semantically a reverse operation.
17898         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17899         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17900         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17901         functions.
17902         (aarch64_can_change_mode_class): For big-endian, forbid changes
17903         between two SVE modes if they have different element sizes.
17905 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17907         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17908         the TImode handling for big-endian targets.
17910 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17912         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17913         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17914         not just bytes.
17915         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17916         Remove BSWAP handing for big-endian targets and use the form of
17917         LD1RQ appropariate for the mode.
17919 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17921         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17922         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17923         duplicated element.
17925 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17927         PR tearget/83845
17928         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17929         check for operands that need to go through aarch64_sve_reload_be.
17931 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17933         PR tree-optimization/81661
17934         PR tree-optimization/84117
17935         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17936         * tree-eh.c: Include gimplify.h.
17937         (find_trapping_overflow, replace_trapping_overflow,
17938         rewrite_to_non_trapping_overflow): New functions.
17939         * tree-vect-loop.c: Include tree-eh.h.
17940         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17941         * tree-data-ref.c: Include tree-eh.h.
17942         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17944 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17946         PR rtl-optimization/84123
17947         * combine.c (change_zero_ext): Check if hard register satisfies
17948         can_change_dest_mode before calling gen_lowpart_SUBREG.
17950 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17952         PR target/82444
17953         * ira.c (ira_init_register_move_cost): Remove assert.
17955 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17957         PR rtl-optimization/84071
17958         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17959         * doc/tm.texi: Regenerate.
17961 2018-01-31  Richard Biener  <rguenther@suse.de>
17963         PR tree-optimization/84132
17964         * tree-data-ref.c (analyze_miv_subscript): Properly
17965         check whether evolution_function_is_affine_multivariate_p
17966         before calling gcd_of_steps_may_divide_p.
17968 2018-01-31  Julia Koval  <julia.koval@intel.com>
17970         PR target/83618
17971         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17972         * config/i386/i386.md (rdpid_rex64) New.
17973         (rdpid): Make 32bit only.
17975 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17977         PR lto/84105
17978         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17979         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17981 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17983         Revert
17984         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17986         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17988 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17990         PR rtl-optimization/84071
17991         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17992         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17994 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17996         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17997         (arc_attribute_table): Add 'aux' attribute.
17998         (arc_in_small_data_p): Consider aux like variables.
17999         (arc_is_aux_reg_p): New function.
18000         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18001         (arc_get_aux_arg): New function.
18002         (prepare_move_operands): Handle aux-register access.
18003         (arc_handle_aux_attribute): New function.
18004         * doc/extend.texi (ARC Variable attributes): Add subsection.
18006 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
18008         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18009         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18010         (arc_attribute_table): Add 'uncached' attribute.
18011         (arc_print_operand): Print '.di' flag for uncached memory
18012         accesses.
18013         (arc_in_small_data_p): Do not consider for small data the uncached
18014         types.
18015         (arc_is_uncached_mem_p): New function.
18016         * config/arc/predicates.md (compact_store_memory_operand): Check
18017         for uncached memory accesses.
18018         (nonvol_nonimm_operand): Likewise.
18019         * doc/extend.texi (ARC Type Attribute): New subsection.
18021 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
18023         PR c/84100
18024         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18025         falign-loops=): Add Optimization flag.
18027 2018-01-30  Jeff Law  <law@redhat.com>
18029         PR target/84064
18030         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18031         INT_REGISTERS_SAVED.  Check it prior to calling
18032         get_scratch_register_on_entry.
18033         (ix86_adjust_stack_and_probe): Similarly.
18034         (ix86_emit_probe_stack_range): Similarly.
18035         (ix86_expand_prologue): Corresponding changes.
18037 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18039         PR target/40411
18040         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18041         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18043 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
18045         PR target/84112
18046         * lra-constraints.c (curr_insn_transform): Process AND in the
18047         address.
18049 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
18051         PR rtl-optimization/83986
18052         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18053         dependence against last_pending_memory_flush in addition to
18054         pending_jump_insns.
18056 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
18058         PR tree-optimization/81611
18059         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18060         copies.
18062 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18064         PR target/83758
18065         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18066         a reg rtx.
18068 2018-01-30  Richard Biener  <rguenther@suse.de>
18069             Jakub Jelinek  <jakub@redhat.com>
18071         PR tree-optimization/84111
18072         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18073         inner loops added during recursion, as they don't have up-to-date
18074         SSA form.
18076 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18078         PR ipa/81360
18079         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18080         (can_inline_edge_by_limits_p): ... here.
18081         (can_early_inline_edge_p, check_callers,
18082         update_caller_keys, update_callee_keys, recursive_inlining,
18083         add_new_edges_to_heap, speculation_useful_p,
18084         inline_small_functions,
18085         inline_small_functions, flatten_function,
18086         inline_to_all_callers_1): Update.
18088 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18090         * profile-count.c (profile_count::combine_with_ipa_count): Handle
18091         zeros correctly.
18093 2018-01-30  Richard Biener  <rguenther@suse.de>
18095         PR tree-optimization/83008
18096         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18097         invariant and constant vector uses in stmts when they need
18098         more than one stmt.
18100 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18102         PR bootstrap/84017
18103         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18104         * configure: Regenerate.
18106 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18108         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18109         pattern.
18110         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18111         Use gen_rtx_REG rather than gen_lowpart.
18113 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18115         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18116         rather than 0 when creating partial subregs.
18118 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18120         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18121         of usage.
18123 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
18125         PR target/81550
18126         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18127         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18128         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18129         flags.  This restores the settings used before the 2017-07-24.
18130         Turning off pre increment/decrement/modify allows IVOPTS to
18131         optimize DF/SF loops where the index is an int.
18133 2018-01-29  Richard Biener  <rguenther@suse.de>
18134             Kelvin Nilsen  <kelvin@gcc.gnu.org>
18136         PR bootstrap/80867
18137         * tree-vect-stmts.c (vectorizable_call): Don't call
18138         targetm.vectorize_builtin_md_vectorized_function if callee is
18139         NULL.
18141 2018-01-22  Carl Love  <cel@us.ibm.com>
18143         * doc/extend.tex: Fix typo in second arg in
18144         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18146 2018-01-29  Richard Biener  <rguenther@suse.de>
18148         PR tree-optimization/84086
18149         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18150         (flush_ssaname_freelist): When SSA names were released reset
18151         the SCEV hash table.
18153 2018-01-29  Richard Biener  <rguenther@suse.de>
18155         PR tree-optimization/84057
18156         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18157         removed paths when removing edges.
18159 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
18161         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18162         -mfunction-return=@var{choice}.
18164 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18166         PR diagnostic/84034
18167         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18168         Handle CR like TAB.
18169         (layout::print_source_line): Likewise.
18170         (test_get_line_width_without_trailing_whitespace): Add test cases.
18172 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
18174         PR middle-end/84040
18175         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18176         debug insns.
18178 2018-01-26  Jim Wilson  <jimw@sifive.com>
18180         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18182         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18183         specified.
18185 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18187         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18188         and CMP + SUB-immediate -> SUBS.
18190 2018-01-26  Martin Sebor  <msebor@redhat.com>
18192         PR tree-optimization/83896
18193         * tree-ssa-strlen.c (get_string_len): Rename...
18194         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
18195         Avoid assuming length is constant.
18196         (handle_char_store): Use HOST_WIDE_INT for string length.
18198 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
18200         PR target/81763
18201         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18202         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18204 2018-01-26  Richard Biener  <rguenther@suse.de>
18206         PR rtl-optimization/84003
18207         * dse.c (record_store): Only record redundant stores when
18208         the earlier store aliases at least all accesses the later one does.
18210 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
18212         PR rtl-optimization/83985
18213         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18214         REG_CFA_RESTORE insns.
18215         (delete_unmarked_insns): Don't ignore separate shrink wrapping
18216         REG_CFA_RESTORE insns here.
18218         PR c/83989
18219         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18220         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18222 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18224         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18225         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18226         (arc_init): Likewise.
18227         (arc_override_options): Likewise.
18228         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18229         value.
18230         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18231         support.
18232         * config/arc/arc.h (TARGET_DBNZ): Define.
18233         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18234         properly set the tune attribute.
18235         (dbnz): Use TARGET_DBNZ guard.
18236         * config/arc/arc.opt (mtune): Add core3 option.
18238 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18240         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18241         recognize new pic like addresses.
18242         (arc_delegitimize_address): Clean up.
18244 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18246         * config/arc/arc-arches.def: Option mrf16 valid for all
18247         architectures.
18248         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18249         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18250         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18251         * config/arc/arc-tables.opt: Regenerate.
18252         * config/arc/arc.c (arc_conditional_register_usage): Handle
18253         reduced register file case.
18254         (arc_file_start): Set must have build attributes.
18255         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18256         mrf16 option value.
18257         * config/arc/arc.opt (mrf16): Add new option.
18258         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18259         * config/arc/genmultilib.awk: Handle new mrf16 option.
18260         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18261         * config/arc/t-multilib: Regenerate.
18262         * doc/invoke.texi (ARC Options): Document mrf16 option.
18264 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18266         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18267         * config/arc/arc.c (arc_handle_secure_attribute): New function.
18268         (arc_attribute_table): Add 'secure_call' attribute.
18269         (arc_print_operand): Print secure call operand.
18270         (arc_function_ok_for_sibcall): Don't optimize tail calls when
18271         secure.
18272         (arc_is_secure_call_p): New function.  * config/arc/arc.md
18273         (call_i): Add support for sjli instruction.
18274         (call_value_i): Likewise.
18275         * config/arc/constraints.md (Csc): New constraint.
18277 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18278             John Eric Martin  <John.Martin@emmicro-us.com>
18280         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18281         * config/arc/arc.c (_arc_jli_section): New struct.
18282         (arc_jli_section): New type.
18283         (rc_jli_sections): New static variable.
18284         (arc_handle_jli_attribute): New function.
18285         (arc_attribute_table): Add jli_always and jli_fixed attribute.
18286         (arc_file_end): New function.
18287         (TARGET_ASM_FILE_END): Define.
18288         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18289         (arc_add_jli_section): New function.
18290         (jli_call_scan): Likewise.
18291         (arc_reorg): Call jli_call_scan.
18292         (arc_output_addsi): Remove 'S' from printing asm operand.
18293         (arc_is_jli_call_p): New function.
18294         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18295         operand.
18296         (movhi_insn): Likewise.
18297         (movsi_insn): Likewise.
18298         (movsi_set_cc_insn): Likewise.
18299         (loadqi_update): Likewise.
18300         (load_zeroextendqisi_update): Likewise.
18301         (load_signextendqisi_update): Likewise.
18302         (loadhi_update): Likewise.
18303         (load_zeroextendhisi_update): Likewise.
18304         (load_signextendhisi_update): Likewise.
18305         (loadsi_update): Likewise.
18306         (loadsf_update): Likewise.
18307         (movsicc_insn): Likewise.
18308         (bset_insn): Likewise.
18309         (bxor_insn): Likewise.
18310         (bclr_insn): Likewise.
18311         (bmsk_insn): Likewise.
18312         (bicsi3_insn): Likewise.
18313         (cmpsi_cc_c_insn): Likewise.
18314         (movsi_ne): Likewise.
18315         (movsi_cond_exec): Likewise.
18316         (clrsbsi2): Likewise.
18317         (norm_f): Likewise.
18318         (normw): Likewise.
18319         (swap): Likewise.
18320         (divaw): Likewise.
18321         (flag): Likewise.
18322         (sr): Likewise.
18323         (kflag): Likewise.
18324         (ffs): Likewise.
18325         (ffs_f): Likewise.
18326         (fls): Likewise.
18327         (call_i): Remove 'S' asm letter, add jli instruction.
18328         (call_value_i): Likewise.
18329         * config/arc/arc.op (mjli-always): New option.
18330         * config/arc/constraints.md (Cji): New constraint.
18331         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18332         operand.
18333         (subsf3_fpx): Likewise.
18334         (mulsf3_fpx): Likewise.
18335         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18336         asm operand.
18337         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18338         function attrbutes.
18339         * doc/invoke.texi (ARC): Document mjli-always option.
18341 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
18343         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18344         avoid addition with 0 and use incw and decw where possible.
18346 2018-01-26  Richard Biener  <rguenther@suse.de>
18348         PR tree-optimization/81082
18349         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18350         association if it requires casting to unsigned.
18351         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18352         from fold_plusminus_mult_expr to catch important cases late when
18353         range info is available.
18355 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18357         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18358         * configure.ac (hidden_linkonce): New test.
18359         * configure: Regenerate.
18360         * config.in: Regenerate.
18362 2018-01-26  Julia Koval  <julia.koval@intel.com>
18364         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18365         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18366         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18367         _mm_mask_bitshuffle_epi64_mask): Fix type.
18368         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18369         USI_FTYPE_V4DI_V4DI_USI): Remove.
18370         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18371         __builtin_ia32_vpshufbitqmb256_mask,
18372         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18373         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18374         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18376 2018-01-26  Alan Modra  <amodra@gmail.com>
18378         PR target/84033
18379         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18380         UNSPEC_VBPERMQ.  Sort other unspecs.
18382 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
18384         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18386 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
18388         PR middle-end/83055
18389         * predict.c (drop_profile): Do not push/pop cfun; update also
18390         node->count.
18391         (handle_missing_profiles): Fix logic looking for zero profiles.
18393 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
18395         PR middle-end/83977
18396         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18397         on functions with #pragma omp declare simd or functions with simd
18398         attribute.
18399         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18400         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18401         Remove trailing \n from warning_at calls.
18403 2018-01-25  Tom de Vries  <tom@codesourcery.com>
18405         PR target/84028
18406         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18407         for neutered workers.
18409 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
18411         PR target/68467
18412         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18413         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18415 2018-01-24  Jeff Law  <law@redhat.com>
18417         PR target/83994
18418         * i386.c (get_probe_interval): Move to earlier point.
18419         (ix86_compute_frame_layout): If -fstack-clash-protection and
18420         the frame is larger than the probe interval, then use pushes
18421         to save registers rather than reg->mem moves.
18422         (ix86_expand_prologue): Remove conditional for int_registers_saved
18423         assertion.
18425 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
18427         PR target/84014
18428         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18429         min/max for never referenced object.
18431 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
18433         PR middle-end/83977
18434         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18435         here.
18436         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18437         attributes from DECL_ATTRIBUTES (decl) without affecting
18438         DECL_ATTRIBUTES (current_function_decl).
18439         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18440         functions with non-NULL DECL_ABSTRACT_ORIGIN.
18442 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
18444         PR tree-optimization/83979
18445         * fold-const.c (fold_comparison): Use constant_boolean_node
18446         instead of boolean_{true,false}_node.
18448 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
18450         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18451         with zero counts.
18453 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18455         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18456         Simplify the clause that sets the length attribute.
18457         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18458         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18459         clause that sets the length attribute.
18460         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18462 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18464         PR target/83589
18465         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18466         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18467         Add strict parameter.
18468         (prevent_branch_around_nothing): Insert dummy insn between branch to
18469         label and label with no ptx insn inbetween.
18470         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18472 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18474         PR target/81352
18475         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18476         for neutered threads in warp.
18477         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18479 2018-01-24  Richard Biener  <rguenther@suse.de>
18481         PR tree-optimization/83176
18482         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18483         operands.
18485 2018-01-24  Richard Biener  <rguenther@suse.de>
18487         PR tree-optimization/82819
18488         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18489         code generating pluses that are no-ops in the target precision.
18491 2018-01-24  Richard Biener  <rguenther@suse.de>
18493         PR middle-end/84000
18494         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18496 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18498         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18499         to merge probabilities.
18500         * predict.c (probably_never_executed): Also mark as cold functions
18501         with global 0 profile and guessed local profile.
18502         * profile-count.c (profile_probability::combine_with_count): New
18503         member function.
18504         * profile-count.h (profile_probability::operator*,
18505         profile_probability::operator*=, profile_probability::operator/,
18506         profile_probability::operator/=): Reduce precision to adjusted
18507         and set value to guessed on contradictory divisions.
18508         (profile_probability::combine_with_freq): Remove.
18509         (profile_probability::combine_wiht_count): Declare.
18510         (profile_count::force_nonzero):: Set to adjusted.
18511         (profile_count::probability_in):: Set quality to adjusted.
18512         * tree-ssa-tail-merge.c (replace_block_by): Use
18513         combine_with_count.
18515 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18516             Jim Wilson  <jimw@sifive.com>
18518         * config/riscv/riscv.c (riscv_stack_boundary): New.
18519         (riscv_option_override): Set riscv_stack_boundary.  Handle
18520         riscv_preferred_stack_boundary_arg.
18521         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18522         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18523         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18524         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18525         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18526         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18528 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18530         PR target/83905
18531         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18532         of struct ix86_frame.
18533         (ix86_expand_epilogue): Likewise.  Add a local variable for
18534         the reg_save_offset field in struct ix86_frame.
18536 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18538         PR tree-optimization/82604
18539         * tree-loop-distribution.c (enum partition_kind): New enum item
18540         PKIND_PARTIAL_MEMSET.
18541         (partition_builtin_p): Support above new enum item.
18542         (generate_code_for_partition): Ditto.
18543         (compute_access_range): Differentiate cases that equality can be
18544         proven at all loops, the innermost loops or no loops.
18545         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18546         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18547         (finalize_partitions, distribute_loop): Don't fuse partition of
18548         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18549         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18550         parloop is enabled.
18552 2018-01-23  Martin Liska  <mliska@suse.cz>
18554         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18555         order to ignore the predictor.
18556         (PRED_POLYMORPHIC_CALL): Likewise.
18557         (PRED_RECURSIVE_CALL): Likewise.
18559 2018-01-23  Martin Liska  <mliska@suse.cz>
18561         * tree-profile.c (tree_profiling): Print function header to
18562         aware reader which function we are working on.
18563         * value-prof.c (gimple_find_values_to_profile): Do not print
18564         not interesting value histograms.
18566 2018-01-23  Martin Liska  <mliska@suse.cz>
18568         * profile-count.h (enum profile_quality): Add
18569         profile_uninitialized as the first value. Do not number values
18570         as they are zero based.
18571         (profile_count::verify): Update sanity check.
18572         (profile_probability::verify): Likewise.
18574 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18576         * doc/invoke.texi (ffor-scope): Deprecate.
18578 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18580         PR tree-optimization/83510
18581         * domwalk.c (set_all_edges_as_executable): New function.
18582         (dom_walker::dom_walker): Convert bool param
18583         "skip_unreachable_blocks" to enum reachability.  Move setup of
18584         edge flags to set_all_edges_as_executable and only do it when
18585         reachability is REACHABLE_BLOCKS.
18586         * domwalk.h (enum dom_walker::reachability): New enum.
18587         (dom_walker::dom_walker): Convert bool param
18588         "skip_unreachable_blocks" to enum reachability.
18589         (set_all_edges_as_executable): New decl.
18590         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18591         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18592         "reachability".
18593         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18594         but converting true to REACHABLE_BLOCKS.
18595         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18596         * tree-vrp.c
18597         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18598         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18599         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18600         REACHABLE_BLOCKS.
18601         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18602         if check_all_array_refs will be called.
18604 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18606         * tree.c (selftest::test_location_wrappers): Add more test
18607         coverage.
18609 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18611         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18612         (selftest::test_bit_in_range): Likewise.
18614 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18616         PR testsuite/83888
18617         * doc/sourcebuild.texi (vect_float): Say that the selector
18618         only describes the situation when -funsafe-math-optimizations is on.
18619         (vect_float_strict): Document.
18621 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18623         PR tree-optimization/83965
18624         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18625         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18626         instead of checking only for a reduction.
18627         (vect_recog_widen_sum_pattern): Likewise.
18629 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18631         * predict.c (probably_never_executed): Only use precise profile info.
18632         (compute_function_frequency): Skip after inlining hack since we now
18633         have quality checking.
18635 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18637         * profile-count.h (profile_probability::very_unlikely,
18638         profile_probability::unlikely, profile_probability::even): Set
18639         precision to guessed.
18641 2018-01-23  Richard Biener  <rguenther@suse.de>
18643         PR tree-optimization/83963
18644         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18645         Properly terminate dominator walk when crossing the exit edge not
18646         when visiting its source block.
18648 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18650         PR c++/83918
18651         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18652         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18654 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18656         PR tree-optimization/83957
18657         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18658         semicolon after for body surrounded by braces.
18660         PR tree-optimization/83081
18661         * profile-count.h (profile_probability::split): New method.
18662         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18663         Use profile_probability::split.
18664         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18665         when splitting a single conditional jump into 2.
18667 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18669         PR tree-optimization/69452
18670         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18671         decl.
18673 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18675         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18676         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18677         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18679 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18681         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18682         declaration.
18683         * config/rl78/rl78.md (movdi): New define_expand.
18684         * config/rl78/rl78.c (rl78_split_movdi): New function.
18686 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18688         PR target/83862
18689         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18690         no longer used.
18691         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18692         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18693         128-bit to produce an UNSPEC move to get the double word with the
18694         signbit and then a shift directly to do signbit.
18695         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18696         implementation with a new version that just does either a direct
18697         move or a regular move.  Move memory interface to separate insns.
18698         Move insns so they are next to the expander.
18699         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18700         with signbit move.  Split big and little endian case.
18701         (signbit<mode>2_dm_mem_le): Likewise.
18702         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18703         (signbit<mode>2_dm2): Likewise.
18705 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18707         * config/rl78/rl78.md (anddi3): New define_expand.
18709 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18711         * config/rl78/rl78.md (umindi3): New define_expand.
18713 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18715         * config/rl78/rl78.md (smindi3): New define_expand.
18717 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18719         * config/rl78/rl78.md (smaxdi3): New define_expand.
18721 2018-01-22  Carl Love  <cel@us.ibm.com>
18723         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18724         LVX_V1TI): Add macro expansion.
18725         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18726         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18727         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18728         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18729         Change check to determine if the instruction is a byte reversing
18730         entry.  Fix typo in comment.
18731         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18732         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18733         Add def_builtin calls for new builtins.
18734         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18735         Add define_insn expansion.
18737 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18739         * config/rl78/rl78.md (umaxdi3): New define_expand.
18741 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18743         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18744         for non-QImode registers.
18746 2018-01-22  Richard Biener  <rguenther@suse.de>
18748         PR tree-optimization/83963
18749         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18750         including the loop exit block.
18751         (scop_detection::merge_sese): Likewise.
18752         (scop_detection::add_scop): Do it here instead.
18754 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18756         * doc/sourcebuild.texi (arm_softfloat): Document.
18758 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18760         PR gcc/77734
18761         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18762         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18763         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18765 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18766             David Edelsohn  <dje.gcc@gmail.com>
18768         PR target/83946
18769         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18770         Change "crset eq" to "crset 2".
18771         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18772         (*call_indirect_aix<mode>_nospec): Likewise.
18773         (*call_value_indirect_aix<mode>_nospec): Likewise.
18774         (*call_indirect_elfv2<mode>_nospec): Likewise.
18775         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18776         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18777         change assembly output from . to $.
18778         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18779         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18780         (*tablejump<mode>_internal1_nospec): Likewise.
18782 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18784         PR target/80870
18785         * config/sh/sh_optimize_sett_clrt.cc:
18786         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18788 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18790         PR tree-optimization/83940
18791         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18792         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18793         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18794         use it to pass back the definition type.
18795         (vect_check_store_rhs): Likewise rhs_dt_out.
18796         (vect_build_gather_load_calls): Add a mask_dt argument and use
18797         it instead of a call to vect_is_simple_use.
18798         (vectorizable_store): Update calls to vect_check_load_store_mask
18799         and vect_check_store_rhs.  Use the dt returned by the latter instead
18800         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18801         instead of calls to vect_is_simple_use.  Pass the scalar rather
18802         than the vector operand to vect_is_simple_use when handling
18803         second and subsequent copies of an rhs value.
18804         (vectorizable_load): Update calls to vect_check_load_store_mask
18805         and vect_build_gather_load_calls.  Use the cached mask_dt and
18806         gs_info.offset_dt instead of calls to vect_is_simple_use.
18808 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18810         PR middle-end/83945
18811         * tree-emutls.c: Include gimplify.h.
18812         (lower_emutls_2): New function.
18813         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18814         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18815         it before further processing.
18817         PR target/83930
18818         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18819         UINTVAL (trueop1) instead of INTVAL (op1).
18821 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18823         PR debug/81570
18824         PR debug/83728
18825         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18826         INCOMING_FRAME_SP_OFFSET if not defined.
18827         (scan_trace): Add ENTRY argument.  If true and
18828         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18829         emit a note to adjust the CFA offset.
18830         (create_cfi_notes): Adjust scan_trace callers.
18831         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18832         INCOMING_FRAME_SP_OFFSET in the CIE.
18833         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18834         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18835         Likewise.
18836         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18837         * doc/tm.texi: Regenerated.
18839 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18841         PR rtl-optimization/83147
18842         * lra-constraints.c (remove_inheritance_pseudos): Use
18843         lra_substitute_pseudo_within_insn.
18845 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18846             Cesar Philippidis  <cesar@codesourcery.com>
18848         PR target/83920
18849         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18851 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18853         PR target/83790
18854         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18855         spaces for function labels.
18857 2018-01-19  Martin Liska  <mliska@suse.cz>
18859         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18860         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18861         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18862         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18863         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18864         (PRED_CONST_RETURN): Change from 69 to 65.
18865         (PRED_NULL_RETURN): Change from 91 to 71.
18866         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18867         (PRED_LOOP_GUARD): Change from 66 to 73.
18869 2018-01-19  Martin Liska  <mliska@suse.cz>
18871         * predict.c (predict_insn_def): Add new assert.
18872         (struct branch_predictor): Change type to signed integer.
18873         (test_prediction_value_range): Amend test to cover
18874         PROB_UNINITIALIZED.
18875         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18876         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18877         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18878         (PRED_LOOP_IV_COMPARE): Likewise.
18879         * predict.h (PROB_UNINITIALIZED): Define new constant.
18881 2018-01-19  Martin Liska  <mliska@suse.cz>
18883         * predict.c (dump_prediction): Add new format for
18884         analyze_brprob.py script which is enabled with -details
18885         suboption.
18886         * profile-count.h (precise_p): New function.
18888 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18890         PR tree-optimization/83922
18891         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18892         there are no statements that need masking.
18893         (vect_active_double_reduction_p): New function.
18894         (vect_analyze_loop_operations): Use it when handling phis that
18895         are not in the loop header.
18897 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18899         PR tree-optimization/83914
18900         * tree-vect-loop.c (vectorizable_induction): Don't convert
18901         init_expr or apply the peeling adjustment for inductions
18902         that are nested within the vectorized loop.
18904 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18906         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18907         instead of NEG.
18909 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18911         PR sanitizer/81715
18912         PR testsuite/83882
18913         * function.h (gimplify_parameters): Add gimple_seq * argument.
18914         * function.c: Include gimple.h and options.h.
18915         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18916         for the added local temporaries if needed.
18917         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18918         if there are any parameter cleanups, wrap whole body into a
18919         try/finally with the cleanups.
18921 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18923         PR target/82964
18924         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18925         Use GET_MODE_CLASS for scalar floating point.
18927 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18929         PR ipa/82256
18930         patch by PaX Team
18931         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18932         Fix call of call_cgraph_insertion_hooks.
18934 2018-01-18  Martin Sebor  <msebor@redhat.com>
18936         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18938 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18940         PR ipa/83619
18941         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18942         frequencies.
18944 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18946         PR other/70268
18947         * common.opt: (-ffile-prefix-map): New option.
18948         * opts.c (common_handle_option): Defer it.
18949         * opts-global.c (handle_common_deferred_options): Handle it.
18950         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18951         * file-prefix-map.h: New file.
18952         (remap_debug_filename, add_debug_prefix_map): ...here.
18953         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18954         * final.c (debug_prefix_map, add_debug_prefix_map
18955         remap_debug_filename): Move to...
18956         * file-prefix-map.c: New file.
18957         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18958         generalize, get rid of alloca(), use strrchr() instead of strchr().
18959         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18960         Implement in terms of add_prefix_map().
18961         (remap_macro_filename, remap_debug_filename): Implement in term of
18962         remap_filename().
18963         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18964         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18965         * dbxout.c: Include file-prefix-map.h.
18966         * varasm.c: Likewise.
18967         * vmsdbgout.c: Likewise.
18968         * xcoffout.c: Likewise.
18969         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18970         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18971         * doc/invoke.texi (-ffile-prefix-map): Document.
18972         (-fdebug-prefix-map): Update description.
18974 2018-01-18  Martin Liska  <mliska@suse.cz>
18976         * config/i386/i386.c (indirect_thunk_name): Document that also
18977         lfence is emitted.
18978         (output_indirect_thunk): Document why both instructions
18979         (pause and lfence) are generated.
18981 2018-01-18  Richard Biener  <rguenther@suse.de>
18983         PR tree-optimization/83887
18984         * graphite-scop-detection.c
18985         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18986         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18987         (scop_detection::merge_sese): Re-implement with a flood-fill
18988         algorithm that properly finds a SESE region if it exists.
18990 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18992         PR c/61240
18993         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18994         pointer_diff optimizations use view_convert instead of convert.
18996 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18998         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18999         Generate different code for -mno-speculate-indirect-jumps.
19000         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19001         (*call_indirect_aix<mode>): Disable for
19002         -mno-speculate-indirect-jumps.
19003         (*call_indirect_aix<mode>_nospec): New define_insn.
19004         (*call_value_indirect_aix<mode>): Disable for
19005         -mno-speculate-indirect-jumps.
19006         (*call_value_indirect_aix<mode>_nospec): New define_insn.
19007         (*sibcall_nonlocal_sysv<mode>): Generate different code for
19008         -mno-speculate-indirect-jumps.
19009         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19011 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
19013         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19014         long double type, set the flags for noting the default long double
19015         type, even if we don't pass or return a long double type.
19017 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
19019         PR ipa/83051
19020         * ipa-inline.c (flatten_function): Do not overwrite final inlining
19021         failure.
19023 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
19025         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19026         support for merge[hl].
19027         (fold_mergehl_helper): New helper function.
19028         (tree-vector-builder.h): New #include for tree_vector_builder usage.
19029         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19030         (altivec_vmrglw_direct): Add xxmrglw insn.
19032 2018-01-17  Andrew Waterman  <andrew@sifive.com>
19034         * config/riscv/riscv.c (riscv_conditional_register_usage): If
19035         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19037 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
19039         PR lto/83121
19040         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19041         call the lto_location_cache before reading the
19042         DECL_SOURCE_LOCATION of the types.
19044 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
19045             Richard Sandiford  <richard.sandiford@linaro.org>
19047         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19048         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19049         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19050         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19051         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19052         Add declaration.
19053         * config/aarch64/constraints.md (aarch64_movti_operand):
19054         Limit immediates.
19055         * config/aarch64/predicates.md (Uti): Add new constraint.
19057 2018-01-17  Carl Love  <cel@us.ibm.com>
19059         * config/rs6000/vsx.md (define_expand xl_len_r,
19060         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19061         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19062         lxvll.
19063         (define_expand, define_insn): Move the shift left from  the
19064         define_insn to the define_expand for lxvl and stxvl instructions.
19065         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19066         and XL_LEN_R definitions to PURE.
19068 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
19070         * config/i386/i386.c (indirect_thunk_name): Declare regno
19071         as unsigned int.  Compare regno with INVALID_REGNUM.
19072         (output_indirect_thunk): Ditto.
19073         (output_indirect_thunk_function): Ditto.
19074         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
19075         in the call to output_indirect_thunk_function.
19077 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
19079         PR middle-end/83884
19080         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19081         rather than the size of inner_type to determine the stack slot size
19082         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19084 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
19086         PR target/83546
19087         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19088         to PTA_SILVERMONT.
19090 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
19092         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19093         endian Linux systems to optionally enable multilibs for selecting
19094         the long double type if the user configured an explicit type.
19095         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19096         have no long double multilibs if not defined.
19097         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19098         warn if the user used -mabi={ieee,ibm}longdouble and we built
19099         multilibs for long double.
19100         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19101         appropriate multilib option.
19102         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19103         multilib options.
19104         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19105         for building long double multilibs.
19106         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19108 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
19110         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19111         copies.
19113         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19114         64 bits.
19115         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19116         128 bits.
19118         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19119         variables.
19121         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19122         return value.
19124 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19126         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19127         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19129 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19131         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19132         different rtl trees depending on TARGET_64BIT.
19133         (rs6000_gen_lvx): Likewise.
19135 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19137         * config/visium/visium.md (nop): Tweak comment.
19138         (hazard_nop): Likewise.
19140 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19142         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19143         -mspeculate-indirect-jumps.
19144         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19145         for -mno-speculate-indirect-jumps.
19146         (*call_indirect_elfv2<mode>_nospec): New define_insn.
19147         (*call_value_indirect_elfv2<mode>): Disable for
19148         -mno-speculate-indirect-jumps.
19149         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19150         (indirect_jump): Emit different RTL for
19151         -mno-speculate-indirect-jumps.
19152         (*indirect_jump<mode>): Disable for
19153         -mno-speculate-indirect-jumps.
19154         (*indirect_jump<mode>_nospec): New define_insn.
19155         (tablejump): Emit different RTL for
19156         -mno-speculate-indirect-jumps.
19157         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19158         (tablejumpsi_nospec): New define_expand.
19159         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19160         (tablejumpdi_nospec): New define_expand.
19161         (*tablejump<mode>_internal1): Disable for
19162         -mno-speculate-indirect-jumps.
19163         (*tablejump<mode>_internal1_nospec): New define_insn.
19164         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19165         option.
19167 2018-01-16  Artyom Skrobov tyomitch@gmail.com
19169         * caller-save.c (insert_save): Drop unnecessary parameter.  All
19170         callers updated.
19172 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19173             Richard Biener  <rguenth@suse.de>
19175         PR libgomp/83590
19176         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19177         return early, inline manually is_gimple_sizepos.  Make sure if we
19178         call gimplify_expr we don't end up with a gimple constant.
19179         * tree.c (variably_modified_type_p): Don't return true for
19180         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
19181         * gimplify.h (is_gimple_sizepos): Remove.
19183 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19185         PR tree-optimization/83857
19186         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19187         vectorizable_live_operation for pure SLP statements.
19188         (vectorizable_live_operation): Handle PHIs.
19190 2018-01-16  Richard Biener  <rguenther@suse.de>
19192         PR tree-optimization/83867
19193         * tree-vect-stmts.c (vect_transform_stmt): Precompute
19194         nested_in_vect_loop_p since the scalar stmt may get invalidated.
19196 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19198         PR c/83844
19199         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19200         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19201         If off is not INTEGER_CST, issue a may not be aligned warning
19202         rather than isn't aligned.  Use isn%'t rather than isn't.
19203         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19204         into MULT_EXPR.
19205         <case MULT_EXPR>: Improve the case when bottom and one of the
19206         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19207         operand, in that case check if the other operand is multiple of
19208         bottom divided by the INTEGER_CST operand.
19210 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19212         PR target/83858
19213         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19214         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19215         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19216         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19217         * config/pa/pa.c (pa_function_arg_advance): Likewise.
19218         (pa_function_arg, pa_arg_partial_bytes): Likewise.
19219         (pa_function_arg_size): New function.
19221 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19223         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19224         in a separate statement.
19226 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19228         PR tree-optimization/83847
19229         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19230         group gathers and scatters.
19232 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19234         PR rtl-optimization/86620
19235         * params.def (max-sched-ready-insns): Bump minimum value to 1.
19237         PR rtl-optimization/83213
19238         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19239         to last if both are JUMP_INSNs.
19241         PR tree-optimization/83843
19242         * gimple-ssa-store-merging.c
19243         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19244         store_immediate_info for bswap/nop orig_stores.
19246 2018-01-15  Andrew Waterman  <andrew@sifive.com>
19248         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19249         !TARGET_MUL.
19250         <UDIV>: Increase cost if !TARGET_DIV.
19252 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
19254         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19255         (define_attr "cr_logical_3op"): New.
19256         (cceq_ior_compare): Adjust.
19257         (cceq_ior_compare_complement): Adjust.
19258         (*cceq_rev_compare): Adjust.
19259         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19260         (is_cracked_insn): Adjust.
19261         (insn_must_be_first_in_group): Adjust.
19262         * config/rs6000/40x.md: Adjust.
19263         * config/rs6000/440.md: Adjust.
19264         * config/rs6000/476.md: Adjust.
19265         * config/rs6000/601.md: Adjust.
19266         * config/rs6000/603.md: Adjust.
19267         * config/rs6000/6xx.md: Adjust.
19268         * config/rs6000/7450.md: Adjust.
19269         * config/rs6000/7xx.md: Adjust.
19270         * config/rs6000/8540.md: Adjust.
19271         * config/rs6000/cell.md: Adjust.
19272         * config/rs6000/e300c2c3.md: Adjust.
19273         * config/rs6000/e500mc.md: Adjust.
19274         * config/rs6000/e500mc64.md: Adjust.
19275         * config/rs6000/e5500.md: Adjust.
19276         * config/rs6000/e6500.md: Adjust.
19277         * config/rs6000/mpc.md: Adjust.
19278         * config/rs6000/power4.md: Adjust.
19279         * config/rs6000/power5.md: Adjust.
19280         * config/rs6000/power6.md: Adjust.
19281         * config/rs6000/power7.md: Adjust.
19282         * config/rs6000/power8.md: Adjust.
19283         * config/rs6000/power9.md: Adjust.
19284         * config/rs6000/rs64.md: Adjust.
19285         * config/rs6000/titan.md: Adjust.
19287 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19289         * config/i386/predicates.md (indirect_branch_operand): Rewrite
19290         ix86_indirect_branch_register logic.
19292 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19294         * config/i386/constraints.md (Bs): Update
19295         ix86_indirect_branch_register check.  Don't check
19296         ix86_indirect_branch_register with GOT_memory_operand.
19297         (Bw): Likewise.
19298         * config/i386/predicates.md (GOT_memory_operand): Don't check
19299         ix86_indirect_branch_register here.
19300         (GOT32_symbol_operand): Likewise.
19302 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19304         * config/i386/predicates.md (constant_call_address_operand):
19305         Rewrite ix86_indirect_branch_register logic.
19306         (sibcall_insn_operand): Likewise.
19308 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19310         * config/i386/constraints.md (Bs): Replace
19311         ix86_indirect_branch_thunk_register with
19312         ix86_indirect_branch_register.
19313         (Bw): Likewise.
19314         * config/i386/i386.md (indirect_jump): Likewise.
19315         (tablejump): Likewise.
19316         (*sibcall_memory): Likewise.
19317         (*sibcall_value_memory): Likewise.
19318         Peepholes of indirect call and jump via memory: Likewise.
19319         * config/i386/i386.opt: Likewise.
19320         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19321         (GOT_memory_operand): Likewise.
19322         (call_insn_operand): Likewise.
19323         (sibcall_insn_operand): Likewise.
19324         (GOT32_symbol_operand): Likewise.
19326 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19328         PR middle-end/83837
19329         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19330         type rather than type addr's type points to.
19331         (expand_omp_atomic_mutex): Likewise.
19332         (expand_omp_atomic): Likewise.
19334 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19336         PR target/83839
19337         * config/i386/i386.c (output_indirect_thunk_function): Use
19338         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19339         for  __x86_return_thunk.
19341 2018-01-15  Richard Biener  <rguenther@suse.de>
19343         PR middle-end/83850
19344         * expmed.c (extract_bit_field_1): Fix typo.
19346 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19348         PR target/83687
19349         * config/arm/iterators.md (VF): New mode iterator.
19350         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19351         Remove integer-related logic from pattern.
19352         (neon_vabd<mode>_3): Likewise.
19354 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19356         PR middle-end/82694
19357         * common.opt (fstrict-overflow): No longer an alias.
19358         (fwrapv-pointer): New option.
19359         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19360         also for pointer types based on flag_wrapv_pointer.
19361         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19362         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19363         opts->x_flag_wrapv got set.
19364         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19365         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19366         POINTER_TYPE_OVERFLOW_UNDEFINED.
19367         * match.pd: Likewise in address comparison pattern.
19368         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19370 2018-01-15  Richard Biener  <rguenther@suse.de>
19372         PR lto/83804
19373         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19374         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
19375         Reset type names to their identifier if their TYPE_DECL doesn't
19376         have linkage (and thus is used for ODR and devirt).
19377         (save_debug_info_for_decl): Remove.
19378         (save_debug_info_for_type): Likewise.
19379         (add_tree_to_fld_list): Adjust.
19380         * tree-pretty-print.c (dump_generic_node): Make dumping of
19381         type names more robust.
19383 2018-01-15  Richard Biener  <rguenther@suse.de>
19385         * BASE-VER: Bump to 8.0.1.
19387 2018-01-14  Martin Sebor  <msebor@redhat.com>
19389         PR other/83508
19390         * builtins.c (check_access): Avoid warning when the no-warning bit
19391         is set.
19393 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
19395         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19396         * ira-color (allocno_hard_regs_compare): Likewise.
19398 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
19400         PR target/83013
19401         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19402         Use .pushsection/.popsection.
19404 2018-01-14  Martin Sebor  <msebor@redhat.com>
19406         PR c++/81327
19407         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19409 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
19411         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19412         entry from extra_headers.
19413         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19414         extra_headers, make the list bitwise identical to the i?86-*-* one.
19416 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19418         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19419         -mcmodel=large with -mindirect-branch=thunk,
19420         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19421         -mfunction-return=thunk-extern.
19422         * doc/invoke.texi: Document -mcmodel=large is incompatible with
19423         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19424         -mfunction-return=thunk and -mfunction-return=thunk-extern.
19426 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19428         * config/i386/i386.c (print_reg): Print the name of the full
19429         integer register without '%'.
19430         (ix86_print_operand): Handle 'V'.
19431         * doc/extend.texi: Document 'V' modifier.
19433 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19435         * config/i386/constraints.md (Bs): Disallow memory operand for
19436         -mindirect-branch-register.
19437         (Bw): Likewise.
19438         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19439         (GOT_memory_operand): Likewise.
19440         (call_insn_operand): Likewise.
19441         (sibcall_insn_operand): Likewise.
19442         (GOT32_symbol_operand): Likewise.
19443         * config/i386/i386.md (indirect_jump): Call convert_memory_address
19444         for -mindirect-branch-register.
19445         (tablejump): Likewise.
19446         (*sibcall_memory): Likewise.
19447         (*sibcall_value_memory): Likewise.
19448         Disallow peepholes of indirect call and jump via memory for
19449         -mindirect-branch-register.
19450         (*call_pop): Replace m with Bw.
19451         (*call_value_pop): Likewise.
19452         (*sibcall_pop_memory): Replace m with Bs.
19453         * config/i386/i386.opt (mindirect-branch-register): New option.
19454         * doc/invoke.texi: Document -mindirect-branch-register option.
19456 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19458         * config/i386/i386-protos.h (ix86_output_function_return): New.
19459         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19460         set function_return_type.
19461         (indirect_thunk_name): Add ret_p to indicate thunk for function
19462         return.
19463         (output_indirect_thunk_function): Pass false to
19464         indirect_thunk_name.
19465         (ix86_output_indirect_branch_via_reg): Likewise.
19466         (ix86_output_indirect_branch_via_push): Likewise.
19467         (output_indirect_thunk_function): Create alias for function
19468         return thunk if regno < 0.
19469         (ix86_output_function_return): New function.
19470         (ix86_handle_fndecl_attribute): Handle function_return.
19471         (ix86_attribute_table): Add function_return.
19472         * config/i386/i386.h (machine_function): Add
19473         function_return_type.
19474         * config/i386/i386.md (simple_return_internal): Use
19475         ix86_output_function_return.
19476         (simple_return_internal_long): Likewise.
19477         * config/i386/i386.opt (mfunction-return=): New option.
19478         (indirect_branch): Mention -mfunction-return=.
19479         * doc/extend.texi: Document function_return function attribute.
19480         * doc/invoke.texi: Document -mfunction-return= option.
19482 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19484         * config/i386/i386-opts.h (indirect_branch): New.
19485         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19486         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19487         with local indirect jump when converting indirect call and jump.
19488         (ix86_set_indirect_branch_type): New.
19489         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19490         (indirectlabelno): New.
19491         (indirect_thunk_needed): Likewise.
19492         (indirect_thunk_bnd_needed): Likewise.
19493         (indirect_thunks_used): Likewise.
19494         (indirect_thunks_bnd_used): Likewise.
19495         (INDIRECT_LABEL): Likewise.
19496         (indirect_thunk_name): Likewise.
19497         (output_indirect_thunk): Likewise.
19498         (output_indirect_thunk_function): Likewise.
19499         (ix86_output_indirect_branch_via_reg): Likewise.
19500         (ix86_output_indirect_branch_via_push): Likewise.
19501         (ix86_output_indirect_branch): Likewise.
19502         (ix86_output_indirect_jmp): Likewise.
19503         (ix86_code_end): Call output_indirect_thunk_function if needed.
19504         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19505         needed.
19506         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19507         (ix86_attribute_table): Add indirect_branch.
19508         * config/i386/i386.h (machine_function): Add indirect_branch_type
19509         and has_local_indirect_jump.
19510         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19511         to true.
19512         (tablejump): Likewise.
19513         (*indirect_jump): Use ix86_output_indirect_jmp.
19514         (*tablejump_1): Likewise.
19515         (simple_return_indirect_internal): Likewise.
19516         * config/i386/i386.opt (mindirect-branch=): New option.
19517         (indirect_branch): New.
19518         (keep): Likewise.
19519         (thunk): Likewise.
19520         (thunk-inline): Likewise.
19521         (thunk-extern): Likewise.
19522         * doc/extend.texi: Document indirect_branch function attribute.
19523         * doc/invoke.texi: Document -mindirect-branch= option.
19525 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19527         PR ipa/83051
19528         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19530 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19532         * ipa-inline.c (want_inline_small_function_p): Return false if
19533         inlining has already failed with CIF_FINAL_ERROR.
19534         (update_caller_keys): Call want_inline_small_function_p before
19535         can_inline_edge_p.
19536         (update_callee_keys): Likewise.
19538 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19540         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19541         New function.
19542         (rs6000_quadword_masked_address_p): Likewise.
19543         (quad_aligned_load_p): Likewise.
19544         (quad_aligned_store_p): Likewise.
19545         (const_load_sequence_p): Add comment to describe the outer-most loop.
19546         (mimic_memory_attributes_and_flags): New function.
19547         (rs6000_gen_stvx): Likewise.
19548         (replace_swapped_aligned_store): Likewise.
19549         (rs6000_gen_lvx): Likewise.
19550         (replace_swapped_aligned_load): Likewise.
19551         (replace_swapped_load_constant): Capitalize argument name in
19552         comment describing this function.
19553         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19554         and stores that access quad-word aligned addresses and replace
19555         with stvx or lvx instructions when appropriate.
19556         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19557         New function prototype.
19558         (rs6000_quadword_masked_address_p): Likewise.
19559         (rs6000_gen_lvx): Likewise.
19560         (rs6000_gen_stvx): Likewise.
19561         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19562         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19563         when memory address is aligned.
19564         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19565         this split to select lvx instruction when memory address is aligned.
19566         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19567         instruction when memory address is aligned.
19568         (*vsx_le_perm_load_v16qi): Likewise.
19569         (four unnamed splitters): Modify to select the stvx instruction
19570         when memory is aligned.
19572 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19574         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19575         which appears in the queue multiple times.
19577 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19578             Alan Hayward  <alan.hayward@arm.com>
19579             David Sherwood  <david.sherwood@arm.com>
19581         * tree-vectorizer.h (vec_lower_bound): New structure.
19582         (_loop_vec_info): Add check_nonzero and lower_bounds.
19583         (LOOP_VINFO_CHECK_NONZERO): New macro.
19584         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19585         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19586         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19587         fields.  Make seg_len the distance travelled, not including the
19588         access size.
19589         (dr_direction_indicator): Declare.
19590         (dr_zero_step_indicator): Likewise.
19591         (dr_known_forward_stride_p): Likewise.
19592         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19593         tree-ssanames.h.
19594         (runtime_alias_check_p): Allow runtime alias checks with
19595         variable strides.
19596         (operator ==): Compare access_size and align.
19597         (prune_runtime_alias_test_list): Rework for new distinction between
19598         the access_size and seg_len.
19599         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19600         segment lengths.
19601         (get_segment_min_max): New function.
19602         (create_intersect_range_checks): Use it.
19603         (dr_step_indicator): New function.
19604         (dr_direction_indicator): Likewise.
19605         (dr_zero_step_indicator): Likewise.
19606         (dr_known_forward_stride_p): Likewise.
19607         * tree-loop-distribution.c (data_ref_segment_size): Return
19608         DR_STEP * (niters - 1).
19609         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19610         constructor.
19611         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19612         (vect_preserves_scalar_order_p): New function, split out from...
19613         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19614         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19615         (vect_vfa_access_size): New function.
19616         (vect_vfa_align): Likewise.
19617         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19618         (dump_lower_bound): New function.
19619         (vect_check_lower_bound): Likewise.
19620         (vect_small_gap_p): Likewise.
19621         (vectorizable_with_step_bound_p): Likewise.
19622         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19623         depencies if the vectorization factor is 1.  Convert the checks
19624         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19625         a bunds check for variable steps if the minimum required step is
19626         relatively small. Update calls to the dr_with_seg_len
19627         constructor and to vect_compile_time_alias.
19628         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19629         function.
19630         (vect_loop_versioning): Call it.
19631         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19632         when retrying.
19633         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19635 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19636             Alan Hayward  <alan.hayward@arm.com>
19637             David Sherwood  <david.sherwood@arm.com>
19639         * doc/sourcebuild.texi (vect_scatter_store): Document.
19640         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19641         optabs.
19642         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19643         Document.
19644         * genopinit.c (main): Add supports_vec_scatter_store and
19645         supports_vec_scatter_store_cached to target_optabs.
19646         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19647         IFN_MASK_SCATTER_STORE.
19648         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19649         functions.
19650         * internal-fn.h (internal_store_fn_p): Declare.
19651         (internal_fn_stored_value_index): Likewise.
19652         * internal-fn.c (scatter_store_direct): New macro.
19653         (expand_scatter_store_optab_fn): New function.
19654         (direct_scatter_store_optab_supported_p): New macro.
19655         (internal_store_fn_p): New function.
19656         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19657         IFN_MASK_SCATTER_STORE.
19658         (internal_fn_mask_index): Likewise.
19659         (internal_fn_stored_value_index): New function.
19660         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19661         for scatter stores.
19662         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19663         * optabs-query.c (supports_vec_scatter_store_p): New function.
19664         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19665         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19666         true for scatter stores.
19667         (vect_gather_scatter_fn_p): Handle scatter stores too.
19668         (vect_check_gather_scatter): Consider using scatter stores if
19669         supports_vec_scatter_store_p.
19670         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19671         scatter stores too.
19672         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19673         internal_fn_stored_value_index.
19674         (check_load_store_masking): Handle scatter stores too.
19675         (vect_get_store_rhs): Make public.
19676         (vectorizable_call): Use internal_store_fn_p.
19677         (vectorizable_store): Handle scatter store internal functions.
19678         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19679         when deciding whether the end of the group has been reached.
19680         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19681         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19682         (mask_scatter_store<mode>): New insns.
19684 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19685             Alan Hayward  <alan.hayward@arm.com>
19686             David Sherwood  <david.sherwood@arm.com>
19688         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19689         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19690         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19691         function.
19692         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19693         Use vect_truncate_gather_scatter_offset if we can't treat the
19694         operation as a normal gather load or scatter store.
19695         (get_group_load_store_type): Take the gather_scatter_info
19696         as argument.  Try using a gather load or scatter store for
19697         single-element groups.
19698         (get_load_store_type): Update calls to get_group_load_store_type
19699         and vect_use_strided_gather_scatters_p.
19701 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19702             Alan Hayward  <alan.hayward@arm.com>
19703             David Sherwood  <david.sherwood@arm.com>
19705         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19706         optional tree argument.
19707         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19708         null target hooks.
19709         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19710         but continue to use the current value as a fallback.
19711         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19712         to compare the updates.
19713         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19714         (get_load_store_type): Use it when handling a strided access.
19715         (vect_get_strided_load_store_ops): New function.
19716         (vect_get_data_ptr_increment): Likewise.
19717         (vectorizable_load): Handle strided gather loads.  Always pass
19718         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19720 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19721             Alan Hayward  <alan.hayward@arm.com>
19722             David Sherwood  <david.sherwood@arm.com>
19724         * doc/md.texi (gather_load@var{m}): Document.
19725         (mask_gather_load@var{m}): Likewise.
19726         * genopinit.c (main): Add supports_vec_gather_load and
19727         supports_vec_gather_load_cached to target_optabs.
19728         * optabs-tree.c (init_tree_optimization_optabs): Use
19729         ggc_cleared_alloc to allocate target_optabs.
19730         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19731         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19732         functions.
19733         * internal-fn.h (internal_load_fn_p): Declare.
19734         (internal_gather_scatter_fn_p): Likewise.
19735         (internal_fn_mask_index): Likewise.
19736         (internal_gather_scatter_fn_supported_p): Likewise.
19737         * internal-fn.c (gather_load_direct): New macro.
19738         (expand_gather_load_optab_fn): New function.
19739         (direct_gather_load_optab_supported_p): New macro.
19740         (direct_internal_fn_optab): New function.
19741         (internal_load_fn_p): Likewise.
19742         (internal_gather_scatter_fn_p): Likewise.
19743         (internal_fn_mask_index): Likewise.
19744         (internal_gather_scatter_fn_supported_p): Likewise.
19745         * optabs-query.c (supports_at_least_one_mode_p): New function.
19746         (supports_vec_gather_load_p): Likewise.
19747         * optabs-query.h (supports_vec_gather_load_p): Declare.
19748         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19749         and memory_type field.
19750         (NUM_PATTERNS): Bump to 15.
19751         * tree-vect-data-refs.c: Include internal-fn.h.
19752         (vect_gather_scatter_fn_p): New function.
19753         (vect_describe_gather_scatter_call): Likewise.
19754         (vect_check_gather_scatter): Try using internal functions for
19755         gather loads.  Recognize existing calls to a gather load function.
19756         (vect_analyze_data_refs): Consider using gather loads if
19757         supports_vec_gather_load_p.
19758         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19759         (vect_get_gather_scatter_offset_type): Likewise.
19760         (vect_convert_mask_for_vectype): Likewise.
19761         (vect_add_conversion_to_patterm): Likewise.
19762         (vect_try_gather_scatter_pattern): Likewise.
19763         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19764         (vect_vect_recog_func_ptrs): Add it.
19765         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19766         internal_fn_mask_index and internal_gather_scatter_fn_p.
19767         (check_load_store_masking): Take the gather_scatter_info as an
19768         argument and handle gather loads.
19769         (vect_get_gather_scatter_ops): New function.
19770         (vectorizable_call): Check internal_load_fn_p.
19771         (vectorizable_load): Likewise.  Handle gather load internal
19772         functions.
19773         (vectorizable_store): Update call to check_load_store_masking.
19774         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19775         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19776         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19777         (aarch64_gather_scale_operand_d): New predicates.
19778         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19779         (mask_gather_load<mode>): New insns.
19781 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19782             Alan Hayward  <alan.hayward@arm.com>
19783             David Sherwood  <david.sherwood@arm.com>
19785         * optabs.def (fold_left_plus_optab): New optab.
19786         * doc/md.texi (fold_left_plus_@var{m}): Document.
19787         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19788         * internal-fn.c (fold_left_direct): Define.
19789         (expand_fold_left_optab_fn): Likewise.
19790         (direct_fold_left_optab_supported_p): Likewise.
19791         * fold-const-call.c (fold_const_fold_left): New function.
19792         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19793         * tree-parloops.c (valid_reduction_p): New function.
19794         (gather_scalar_reductions): Use it.
19795         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19796         (vect_finish_replace_stmt): Declare.
19797         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19798         (needs_fold_left_reduction_p): New function, split out from...
19799         (vect_is_simple_reduction): ...here.  Accept reductions that
19800         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19801         (vect_force_simple_reduction): Also store the reduction type in
19802         the assignment's STMT_VINFO_REDUC_TYPE.
19803         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19804         (merge_with_identity): New function.
19805         (vect_expand_fold_left): Likewise.
19806         (vectorize_fold_left_reduction): Likewise.
19807         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19808         scalar phi in place for it.  Check for target support and reject
19809         cases that would reassociate the operation.  Defer the transform
19810         phase to vectorize_fold_left_reduction.
19811         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19812         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19813         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19815 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19817         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19818         call to ifc_temp_var.
19820 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19821             Alan Hayward  <alan.hayward@arm.com>
19822             David Sherwood  <david.sherwood@arm.com>
19824         * target.def (legitimize_address_displacement): Take the original
19825         offset as a poly_int.
19826         * targhooks.h (default_legitimize_address_displacement): Update
19827         accordingly.
19828         * targhooks.c (default_legitimize_address_displacement): Likewise.
19829         * doc/tm.texi: Regenerate.
19830         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19831         as an argument, moving assert of ad->disp == ad->disp_term to...
19832         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19833         Try calling targetm.legitimize_address_displacement before expanding
19834         the address rather than afterwards, and adjust for the new interface.
19835         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19836         Match the new hook interface.  Handle SVE addresses.
19837         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19838         new hook interface.
19840 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19842         * Makefile.in (OBJS): Add early-remat.o.
19843         * target.def (select_early_remat_modes): New hook.
19844         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19845         * doc/tm.texi: Regenerate.
19846         * targhooks.h (default_select_early_remat_modes): Declare.
19847         * targhooks.c (default_select_early_remat_modes): New function.
19848         * timevar.def (TV_EARLY_REMAT): New timevar.
19849         * passes.def (pass_early_remat): New pass.
19850         * tree-pass.h (make_pass_early_remat): Declare.
19851         * early-remat.c: New file.
19852         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19853         function.
19854         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19856 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19857             Alan Hayward  <alan.hayward@arm.com>
19858             David Sherwood  <david.sherwood@arm.com>
19860         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19861         vfm1 with a bound_epilog parameter.
19862         (vect_do_peeling): Update calls accordingly, and move the prologue
19863         call earlier in the function.  Treat the base bound_epilog as 0 for
19864         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19865         this base when peeling for gaps.
19866         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19867         with fully-masked loops.
19868         (vect_estimate_min_profitable_iters): Handle the single peeled
19869         iteration in that case.
19871 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19872             Alan Hayward  <alan.hayward@arm.com>
19873             David Sherwood  <david.sherwood@arm.com>
19875         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19876         single-element interleaving even if the size is not a power of 2.
19877         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19878         accesses for single-element interleaving if the group size is
19879         not a power of 2.
19881 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19882             Alan Hayward  <alan.hayward@arm.com>
19883             David Sherwood  <david.sherwood@arm.com>
19885         * doc/md.texi (fold_extract_last_@var{m}): Document.
19886         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19887         * optabs.def (fold_extract_last_optab): New optab.
19888         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19889         * internal-fn.c (fold_extract_direct): New macro.
19890         (expand_fold_extract_optab_fn): Likewise.
19891         (direct_fold_extract_optab_supported_p): Likewise.
19892         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19893         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19894         EXTRACT_LAST_REDUCTION.
19895         (get_initial_def_for_reduction): Do not create an initial vector
19896         for EXTRACT_LAST_REDUCTION reductions.
19897         (vectorizable_reduction): Leave the scalar phi in place for
19898         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19899         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19900         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19901         transform phase to vectorizable_condition.
19902         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19903         split out from...
19904         (vect_finish_stmt_generation): ...here.
19905         (vect_finish_replace_stmt): New function.
19906         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19907         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19908         pattern.
19909         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19911 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19912             Alan Hayward  <alan.hayward@arm.com>
19913             David Sherwood  <david.sherwood@arm.com>
19915         * doc/md.texi (extract_last_@var{m}): Document.
19916         * optabs.def (extract_last_optab): New optab.
19917         * internal-fn.def (EXTRACT_LAST): New internal function.
19918         * internal-fn.c (cond_unary_direct): New macro.
19919         (expand_cond_unary_optab_fn): Likewise.
19920         (direct_cond_unary_optab_supported_p): Likewise.
19921         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19922         loops using EXTRACT_LAST.
19923         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19924         (extract_last_<mode>): ...this optab.
19925         (vec_extract<mode><Vel>): Update accordingly.
19927 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19928             Alan Hayward  <alan.hayward@arm.com>
19929             David Sherwood  <david.sherwood@arm.com>
19931         * target.def (empty_mask_is_expensive): New hook.
19932         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19933         * doc/tm.texi: Regenerate.
19934         * targhooks.h (default_empty_mask_is_expensive): Declare.
19935         * targhooks.c (default_empty_mask_is_expensive): New function.
19936         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19937         if the target says that empty masks are expensive.
19938         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19939         New function.
19940         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19942 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19943             Alan Hayward  <alan.hayward@arm.com>
19944             David Sherwood  <david.sherwood@arm.com>
19946         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19947         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19948         (vect_use_loop_mask_for_alignment_p): New function.
19949         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19950         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19951         niters_skip argument.  Make sure that the first niters_skip elements
19952         of the first iteration are inactive.
19953         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19954         Update call to vect_set_loop_masks_directly.
19955         (get_misalign_in_elems): New function, split out from...
19956         (vect_gen_prolog_loop_niters): ...here.
19957         (vect_update_init_of_dr): Take a code argument that specifies whether
19958         the adjustment should be added or subtracted.
19959         (vect_update_init_of_drs): Likewise.
19960         (vect_prepare_for_masked_peels): New function.
19961         (vect_do_peeling): Skip prologue peeling if we're using a mask
19962         instead.  Update call to vect_update_inits_of_drs.
19963         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19964         mask_skip_niters.
19965         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19966         alignment.  Do not include the number of peeled iterations in
19967         the minimum threshold in that case.
19968         (vectorizable_induction): Adjust the start value down by
19969         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19970         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19971         Take the number of skipped iterations into account when calculating
19972         the loop bounds.
19973         * tree-vect-stmts.c (vect_gen_while_not): New function.
19975 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19976             Alan Hayward  <alan.hayward@arm.com>
19977             David Sherwood  <david.sherwood@arm.com>
19979         * doc/sourcebuild.texi (vect_fully_masked): Document.
19980         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19981         default value to 0.
19982         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19983         split out from...
19984         (vect_analyze_loop_2): ...here. Don't check the vectorization
19985         factor against the number of loop iterations if the loop is
19986         fully-masked.
19988 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19989             Alan Hayward  <alan.hayward@arm.com>
19990             David Sherwood  <david.sherwood@arm.com>
19992         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19993         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19994         (dump_groups): Update accordingly.
19995         (iv_use::mem_type): New member variable.
19996         (address_p): New function.
19997         (record_use): Add a mem_type argument and initialize the new
19998         mem_type field.
19999         (record_group_use): Add a mem_type argument.  Use address_p.
20000         Remove obsolete null checks of base_object.  Update call to record_use.
20001         (find_interesting_uses_op): Update call to record_group_use.
20002         (find_interesting_uses_cond): Likewise.
20003         (find_interesting_uses_address): Likewise.
20004         (get_mem_type_for_internal_fn): New function.
20005         (find_address_like_use): Likewise.
20006         (find_interesting_uses_stmt): Try find_address_like_use before
20007         calling find_interesting_uses_op.
20008         (addr_offset_valid_p): Use the iv mem_type field as the type
20009         of the addressed memory.
20010         (add_autoinc_candidates): Likewise.
20011         (get_address_cost): Likewise.
20012         (split_small_address_groups_p): Use address_p.
20013         (split_address_groups): Likewise.
20014         (add_iv_candidate_for_use): Likewise.
20015         (autoinc_possible_for_pair): Likewise.
20016         (rewrite_groups): Likewise.
20017         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20018         (determine_group_iv_cost): Update after split of USE_ADDRESS.
20019         (get_alias_ptr_type_for_ptr_address): New function.
20020         (rewrite_use_address): Rewrite address uses in calls that were
20021         identified by find_address_like_use.
20023 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20024             Alan Hayward  <alan.hayward@arm.com>
20025             David Sherwood  <david.sherwood@arm.com>
20027         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20028         TARGET_MEM_REFs.
20029         * gimple-expr.h (is_gimple_addressable: Likewise.
20030         * gimple-expr.c (is_gimple_address): Likewise.
20031         * internal-fn.c (expand_call_mem_ref): New function.
20032         (expand_mask_load_optab_fn): Use it.
20033         (expand_mask_store_optab_fn): Likewise.
20035 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20036             Alan Hayward  <alan.hayward@arm.com>
20037             David Sherwood  <david.sherwood@arm.com>
20039         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20040         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20041         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20042         (cond_umax@var{mode}): Document.
20043         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20044         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20045         (cond_umin_optab, cond_umax_optab): New optabs.
20046         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20047         (COND_IOR, COND_XOR): New internal functions.
20048         * internal-fn.h (get_conditional_internal_fn): Declare.
20049         * internal-fn.c (cond_binary_direct): New macro.
20050         (expand_cond_binary_optab_fn): Likewise.
20051         (direct_cond_binary_optab_supported_p): Likewise.
20052         (get_conditional_internal_fn): New function.
20053         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20054         Cope with reduction statements that are vectorized as calls rather
20055         than assignments.
20056         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20057         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20058         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20059         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20060         (UNSPEC_COND_EOR): New unspecs.
20061         (optab): Add mappings for them.
20062         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20063         (sve_int_op, sve_fp_op): New int attributes.
20065 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20066             Alan Hayward  <alan.hayward@arm.com>
20067             David Sherwood  <david.sherwood@arm.com>
20069         * optabs.def (while_ult_optab): New optab.
20070         * doc/md.texi (while_ult@var{m}@var{n}): Document.
20071         * internal-fn.def (WHILE_ULT): New internal function.
20072         * internal-fn.h (direct_internal_fn_supported_p): New override
20073         that takes two types as argument.
20074         * internal-fn.c (while_direct): New macro.
20075         (expand_while_optab_fn): New function.
20076         (convert_optab_supported_p): Likewise.
20077         (direct_while_optab_supported_p): New macro.
20078         * wide-int.h (wi::udiv_ceil): New function.
20079         * tree-vectorizer.h (rgroup_masks): New structure.
20080         (vec_loop_masks): New typedef.
20081         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20082         and fully_masked_p.
20083         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20084         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20085         (vect_max_vf): New function.
20086         (slpeel_make_loop_iterate_ntimes): Delete.
20087         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20088         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20089         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20090         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20091         internal-fn.h, stor-layout.h and optabs-query.h.
20092         (vect_set_loop_mask): New function.
20093         (add_preheader_seq): Likewise.
20094         (add_header_seq): Likewise.
20095         (interleave_supported_p): Likewise.
20096         (vect_maybe_permute_loop_masks): Likewise.
20097         (vect_set_loop_masks_directly): Likewise.
20098         (vect_set_loop_condition_masked): Likewise.
20099         (vect_set_loop_condition_unmasked): New function, split out from
20100         slpeel_make_loop_iterate_ntimes.
20101         (slpeel_make_loop_iterate_ntimes): Rename to..
20102         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
20103         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20104         (vect_do_peeling): Update call accordingly.
20105         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20106         loops.
20107         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20108         mask_compare_type, can_fully_mask_p and fully_masked_p.
20109         (release_vec_loop_masks): New function.
20110         (_loop_vec_info): Use it to free the loop masks.
20111         (can_produce_all_loop_masks_p): New function.
20112         (vect_get_max_nscalars_per_iter): Likewise.
20113         (vect_verify_full_masking): Likewise.
20114         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20115         retries, and free the mask rgroups before retrying.  Check loop-wide
20116         reasons for disallowing fully-masked loops.  Make the final decision
20117         about whether use a fully-masked loop or not.
20118         (vect_estimate_min_profitable_iters): Do not assume that peeling
20119         for the number of iterations will be needed for fully-masked loops.
20120         (vectorizable_reduction): Disable fully-masked loops.
20121         (vectorizable_live_operation): Likewise.
20122         (vect_halve_mask_nunits): New function.
20123         (vect_double_mask_nunits): Likewise.
20124         (vect_record_loop_mask): Likewise.
20125         (vect_get_loop_mask): Likewise.
20126         (vect_transform_loop): Handle the case in which the final loop
20127         iteration might handle a partial vector.  Call vect_set_loop_condition
20128         instead of slpeel_make_loop_iterate_ntimes.
20129         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20130         (check_load_store_masking): New function.
20131         (prepare_load_store_mask): Likewise.
20132         (vectorizable_store): Handle fully-masked loops.
20133         (vectorizable_load): Likewise.
20134         (supportable_widening_operation): Use vect_halve_mask_nunits for
20135         booleans.
20136         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20137         (vect_gen_while): New function.
20138         * config/aarch64/aarch64.md (umax<mode>3): New expander.
20139         (aarch64_uqdec<mode>): New insn.
20141 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20142             Alan Hayward  <alan.hayward@arm.com>
20143             David Sherwood  <david.sherwood@arm.com>
20145         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20146         (reduc_xor_scal_optab): New optabs.
20147         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20148         (reduc_xor_scal_@var{m}): Document.
20149         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20150         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20151         internal functions.
20152         * fold-const-call.c (fold_const_call): Handle them.
20153         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20154         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20155         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20156         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20157         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20158         (UNSPEC_XORV): New unspecs.
20159         (optab): Add entries for them.
20160         (BITWISEV): New int iterator.
20161         (bit_reduc_op): New int attributes.
20163 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20164             Alan Hayward  <alan.hayward@arm.com>
20165             David Sherwood  <david.sherwood@arm.com>
20167         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20168         * internal-fn.def (VEC_SHL_INSERT): New internal function.
20169         * optabs.def (vec_shl_insert_optab): New optab.
20170         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20171         (duplicate_and_interleave): Likewise.
20172         * tree-vect-loop.c: Include internal-fn.h.
20173         (neutral_op_for_slp_reduction): New function, split out from
20174         get_initial_defs_for_reduction.
20175         (get_initial_def_for_reduction): Handle option 2 for variable-length
20176         vectors by loading the neutral value into a vector and then shifting
20177         the initial value into element 0.
20178         (get_initial_defs_for_reduction): Replace the code argument with
20179         the neutral value calculated by neutral_op_for_slp_reduction.
20180         Use gimple_build_vector for constant-length vectors.
20181         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20182         but the first group_size elements have a neutral value.
20183         Use duplicate_and_interleave otherwise.
20184         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20185         Update call to get_initial_defs_for_reduction.  Handle SLP
20186         reductions for variable-length vectors by creating one vector
20187         result for each scalar result, with the elements associated
20188         with other scalar results stubbed out with the neutral value.
20189         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20190         Require IFN_VEC_SHL_INSERT for double reductions on
20191         variable-length vectors, or SLP reductions that have
20192         a neutral value.  Require can_duplicate_and_interleave_p
20193         support for variable-length unchained SLP reductions if there
20194         is no neutral value, such as for MIN/MAX reductions.  Also require
20195         the number of vector elements to be a multiple of the number of
20196         SLP statements when doing variable-length unchained SLP reductions.
20197         Update call to vect_create_epilog_for_reduction.
20198         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20199         and remove initial values.
20200         (duplicate_and_interleave): Make public.
20201         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20202         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20204 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20205             Alan Hayward  <alan.hayward@arm.com>
20206             David Sherwood  <david.sherwood@arm.com>
20208         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20209         (can_duplicate_and_interleave_p): New function.
20210         (vect_get_and_check_slp_defs): Take the vector of statements
20211         rather than just the current one.  Remove excess parentheses.
20212         Restriction rejectinon of vect_constant_def and vect_external_def
20213         for variable-length vectors to boolean types, or types for which
20214         can_duplicate_and_interleave_p is false.
20215         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20216         (duplicate_and_interleave): New function.
20217         (vect_get_constant_vectors): Use gimple_build_vector for
20218         constant-length vectors and suitable variable-length constant
20219         vectors.  Use duplicate_and_interleave for other variable-length
20220         vectors.  Don't defer the update when inserting new statements.
20222 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20223             Alan Hayward  <alan.hayward@arm.com>
20224             David Sherwood  <david.sherwood@arm.com>
20226         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20227         min_profitable_iters doesn't go negative.
20229 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20230             Alan Hayward  <alan.hayward@arm.com>
20231             David Sherwood  <david.sherwood@arm.com>
20233         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20234         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20235         * optabs.def (vec_mask_load_lanes_optab): New optab.
20236         (vec_mask_store_lanes_optab): Likewise.
20237         * internal-fn.def (MASK_LOAD_LANES): New internal function.
20238         (MASK_STORE_LANES): Likewise.
20239         * internal-fn.c (mask_load_lanes_direct): New macro.
20240         (mask_store_lanes_direct): Likewise.
20241         (expand_mask_load_optab_fn): Handle masked operations.
20242         (expand_mask_load_lanes_optab_fn): New macro.
20243         (expand_mask_store_optab_fn): Handle masked operations.
20244         (expand_mask_store_lanes_optab_fn): New macro.
20245         (direct_mask_load_lanes_optab_supported_p): Likewise.
20246         (direct_mask_store_lanes_optab_supported_p): Likewise.
20247         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20248         parameter.
20249         (vect_load_lanes_supported): Likewise.
20250         * tree-vect-data-refs.c (strip_conversion): New function.
20251         (can_group_stmts_p): Likewise.
20252         (vect_analyze_data_ref_accesses): Use it instead of checking
20253         for a pair of assignments.
20254         (vect_store_lanes_supported): Take a masked_p parameter.
20255         (vect_load_lanes_supported): Likewise.
20256         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20257         vect_store_lanes_supported and vect_load_lanes_supported.
20258         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20259         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20260         parameter.  Don't allow gaps for masked accesses.
20261         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
20262         and vect_load_lanes_supported.
20263         (get_load_store_type): Take a masked_p parameter and update
20264         call to get_group_load_store_type.
20265         (vectorizable_store): Update call to get_load_store_type.
20266         Handle IFN_MASK_STORE_LANES.
20267         (vectorizable_load): Update call to get_load_store_type.
20268         Handle IFN_MASK_LOAD_LANES.
20270 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20271             Alan Hayward  <alan.hayward@arm.com>
20272             David Sherwood  <david.sherwood@arm.com>
20274         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20275         modes for SVE.
20276         * config/aarch64/aarch64-protos.h
20277         (aarch64_sve_struct_memory_operand_p): Declare.
20278         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20279         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20280         (VPRED, vpred): Handle SVE structure modes.
20281         * config/aarch64/constraints.md (Utx): New constraint.
20282         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20283         (aarch64_sve_struct_nonimmediate_operand): New predicates.
20284         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20285         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20286         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20287         structure modes.  Split into pieces after RA.
20288         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20289         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20290         New patterns.
20291         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20292         SVE structure modes.
20293         (aarch64_classify_address): Likewise.
20294         (sizetochar): Move earlier in file.
20295         (aarch64_print_operand): Handle SVE register lists.
20296         (aarch64_array_mode): New function.
20297         (aarch64_sve_struct_memory_operand_p): Likewise.
20298         (TARGET_ARRAY_MODE): Redefine.
20300 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20301             Alan Hayward  <alan.hayward@arm.com>
20302             David Sherwood  <david.sherwood@arm.com>
20304         * target.def (array_mode): New target hook.
20305         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20306         * doc/tm.texi: Regenerate.
20307         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20308         * hooks.c (hook_optmode_mode_uhwi_none): New function.
20309         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20310         targetm.array_mode.
20311         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
20312         type sizes.
20314 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20315             Alan Hayward  <alan.hayward@arm.com>
20316             David Sherwood  <david.sherwood@arm.com>
20318         * fold-const.c (fold_binary_loc): Check the argument types
20319         rather than the result type when testing for a vector operation.
20321 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20323         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20324         * doc/tm.texi: Regenerate.
20326 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20327             Alan Hayward  <alan.hayward@arm.com>
20328             David Sherwood  <david.sherwood@arm.com>
20330         * doc/invoke.texi (-msve-vector-bits=): Document new option.
20331         (sve): Document new AArch64 extension.
20332         * doc/md.texi (w): Extend the description of the AArch64
20333         constraint to include SVE vectors.
20334         (Upl, Upa): Document new AArch64 predicate constraints.
20335         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20336         enum.
20337         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20338         (msve-vector-bits=): New option.
20339         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20340         SVE when these are disabled.
20341         (sve): New extension.
20342         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20343         modes.  Adjust their number of units based on aarch64_sve_vg.
20344         (MAX_BITSIZE_MODE_ANY_MODE): Define.
20345         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20346         aarch64_addr_query_type.
20347         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20348         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20349         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20350         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20351         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20352         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20353         (aarch64_simd_imm_zero_p): Delete.
20354         (aarch64_check_zero_based_sve_index_immediate): Declare.
20355         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20356         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20357         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20358         (aarch64_sve_float_mul_immediate_p): Likewise.
20359         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20360         rather than an rtx.
20361         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20362         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20363         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20364         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20365         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20366         (aarch64_regmode_natural_size): Likewise.
20367         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20368         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20369         left one place.
20370         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20371         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20372         for VG and the SVE predicate registers.
20373         (V_ALIASES): Add a "z"-prefixed alias.
20374         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20375         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20376         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20377         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20378         (REG_CLASS_NAMES): Add entries for them.
20379         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
20380         and the predicate registers.
20381         (aarch64_sve_vg): Declare.
20382         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20383         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20384         (REGMODE_NATURAL_SIZE): Define.
20385         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20386         SVE macros.
20387         * config/aarch64/aarch64.c: Include cfgrtl.h.
20388         (simd_immediate_info): Add a constructor for series vectors,
20389         and an associated step field.
20390         (aarch64_sve_vg): New variable.
20391         (aarch64_dbx_register_number): Handle VG and the predicate registers.
20392         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20393         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20394         (VEC_ANY_DATA, VEC_STRUCT): New constants.
20395         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20396         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20397         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20398         (aarch64_get_mask_mode): New functions.
20399         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20400         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20401         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
20402         predicate modes and predicate registers.  Explicitly restrict
20403         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
20404         to store a vector mode if it is recognized by
20405         aarch64_classify_vector_mode.
20406         (aarch64_regmode_natural_size): New function.
20407         (aarch64_hard_regno_caller_save_mode): Return the original mode
20408         for predicates.
20409         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20410         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20411         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20412         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20413         functions.
20414         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
20415         does not overlap dest if the function is frame-related.  Handle
20416         SVE constants.
20417         (aarch64_split_add_offset): New function.
20418         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20419         them aarch64_add_offset.
20420         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20421         and update call to aarch64_sub_sp.
20422         (aarch64_add_cfa_expression): New function.
20423         (aarch64_expand_prologue): Pass extra temporary registers to the
20424         functions above.  Handle the case in which we need to emit new
20425         DW_CFA_expressions for registers that were originally saved
20426         relative to the stack pointer, but now have to be expressed
20427         relative to the frame pointer.
20428         (aarch64_output_mi_thunk): Pass extra temporary registers to the
20429         functions above.
20430         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
20431         IP0 and IP1 values for SVE frames.
20432         (aarch64_expand_vec_series): New function.
20433         (aarch64_expand_sve_widened_duplicate): Likewise.
20434         (aarch64_expand_sve_const_vector): Likewise.
20435         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20436         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
20437         into the register, rather than emitting a SET directly.
20438         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20439         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20440         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20441         (offset_9bit_signed_scaled_p): New functions.
20442         (aarch64_replicate_bitmask_imm): New function.
20443         (aarch64_bitmask_imm): Use it.
20444         (aarch64_cannot_force_const_mem): Reject expressions involving
20445         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
20446         (aarch64_classify_index): Handle SVE indices, by requiring
20447         a plain register index with a scale that matches the element size.
20448         (aarch64_classify_address): Handle SVE addresses.  Assert that
20449         the mode of the address is VOIDmode or an integer mode.
20450         Update call to aarch64_classify_symbol.
20451         (aarch64_classify_symbolic_expression): Update call to
20452         aarch64_classify_symbol.
20453         (aarch64_const_vec_all_in_range_p): New function.
20454         (aarch64_print_vector_float_operand): Likewise.
20455         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20456         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20457         and the FP immediates 1.0 and 0.5.
20458         (aarch64_print_address_internal): Handle SVE addresses.
20459         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20460         (aarch64_regno_regclass): Handle predicate registers.
20461         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20462         data modes.
20463         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20464         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20465         (aarch64_convert_sve_vector_bits): New function.
20466         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20467         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20468         rather than an rtx.
20469         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20470         Handle SVE vector and predicate modes.  Accept VL-based constants
20471         that need only one temporary register, and VL offsets that require
20472         no temporary registers.
20473         (aarch64_conditional_register_usage): Mark the predicate registers
20474         as fixed if SVE isn't available.
20475         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20476         Return true for SVE vector and predicate modes.
20477         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20478         rather than an unsigned int.  Handle SVE modes.
20479         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
20480         SVE modes.
20481         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20482         if SVE is enabled.
20483         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20484         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20485         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20486         (aarch64_sve_float_mul_immediate_p): New functions.
20487         (aarch64_sve_valid_immediate): New function.
20488         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20489         Explicitly reject structure modes.  Check for INDEX constants.
20490         Handle PTRUE and PFALSE constants.
20491         (aarch64_check_zero_based_sve_index_immediate): New function.
20492         (aarch64_simd_imm_zero_p): Delete.
20493         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20494         vector modes.  Accept constants in the range of CNT[BHWD].
20495         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20496         ask for an Advanced SIMD mode.
20497         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20498         (aarch64_simd_vector_alignment): Handle SVE predicates.
20499         (aarch64_vectorize_preferred_vector_alignment): New function.
20500         (aarch64_simd_vector_alignment_reachable): Use it instead of
20501         the vector size.
20502         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20503         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20504         functions.
20505         (MAX_VECT_LEN): Delete.
20506         (expand_vec_perm_d): Add a vec_flags field.
20507         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20508         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20509         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20510         for SVE modes.
20511         (aarch64_evpc_rev): Rename to...
20512         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20513         (aarch64_evpc_rev_global): New function.
20514         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20515         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20516         MAX_VECT_LEN.
20517         (aarch64_evpc_sve_tbl): New function.
20518         (aarch64_expand_vec_perm_const_1): Update after rename of
20519         aarch64_evpc_rev.  Handle SVE permutes too, trying
20520         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20521         than aarch64_evpc_tbl.
20522         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20523         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20524         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20525         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20526         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20527         (aarch64_expand_sve_vcond): New functions.
20528         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20529         of aarch64_vector_mode_p.
20530         (aarch64_dwarf_poly_indeterminate_value): New function.
20531         (aarch64_compute_pressure_classes): Likewise.
20532         (aarch64_can_change_mode_class): Likewise.
20533         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20534         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20535         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20536         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20537         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20538         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20539         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20540         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20541         constraints.
20542         (Dn, Dl, Dr): Accept const as well as const_vector.
20543         (Dz): Likewise.  Compare against CONST0_RTX.
20544         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20545         of "vector" where appropriate.
20546         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20547         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20548         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20549         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20550         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20551         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20552         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20553         (v_int_equiv): Extend to SVE modes.
20554         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20555         mode attributes.
20556         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20557         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20558         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20559         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20560         (SVE_COND_FP_CMP): New int iterators.
20561         (perm_hilo): Handle the new unpack unspecs.
20562         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20563         attributes.
20564         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20565         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20566         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20567         (aarch64_equality_operator, aarch64_constant_vector_operand)
20568         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20569         (aarch64_sve_nonimmediate_operand): Likewise.
20570         (aarch64_sve_general_operand): Likewise.
20571         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20572         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20573         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20574         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20575         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20576         (aarch64_sve_float_arith_immediate): Likewise.
20577         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20578         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20579         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20580         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20581         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20582         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20583         (aarch64_sve_float_arith_operand): Likewise.
20584         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20585         (aarch64_sve_float_mul_operand): Likewise.
20586         (aarch64_sve_vec_perm_operand): Likewise.
20587         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20588         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20589         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20590         as well as const_vector.
20591         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20592         in file.  Use CONST0_RTX and CONSTM1_RTX.
20593         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20594         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20595         Use aarch64_simd_imm_zero.
20596         * config/aarch64/aarch64-sve.md: New file.
20597         * config/aarch64/aarch64.md: Include it.
20598         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20599         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20600         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20601         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20602         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20603         (sve): New attribute.
20604         (enabled): Disable instructions with the sve attribute unless
20605         TARGET_SVE.
20606         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20607         aarch64_expand_mov_immediate.
20608         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20609         CNT[BHSD] immediates.
20610         (movti): Split CONST_POLY_INT moves into two halves.
20611         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20612         Split additions that need a temporary here if the destination
20613         is the stack pointer.
20614         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20615         (*add<mode>3_poly_1): New instruction.
20616         (set_clobber_cc): New expander.
20618 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20620         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20621         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20622         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20623         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20624         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20625         Change innermode from fixed_mode_size to machine_mode.
20626         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20627         subreg of a variable-length CONST_VECTOR.
20629 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20630             Alan Hayward  <alan.hayward@arm.com>
20631             David Sherwood  <david.sherwood@arm.com>
20633         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20634         (add_offset_to_base): New function, split out from...
20635         (create_mem_ref): ...here.  When handling a scale other than 1,
20636         check first whether the address is valid without the offset.
20637         Add it into the base if so, leaving the index and scale as-is.
20639 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20641         PR c++/83778
20642         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20643         fold_for_warn before checking if arg2 is INTEGER_CST.
20645 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20647         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20648         (store_multiple_operation): Delete.
20649         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20650         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20651         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20652         guarded by TARGET_STRING.
20653         (rs6000_output_load_multiple): Delete.
20654         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20655         OPTION_MASK_STRING / TARGET_STRING handling.
20656         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20657         (const rs6000_opt_masks) <"string">: Change mask to 0.
20658         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20659         (MASK_STRING): Delete.
20660         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20661         parts.  Simplify.
20662         (load_multiple): Delete.
20663         (*ldmsi8): Delete.
20664         (*ldmsi7): Delete.
20665         (*ldmsi6): Delete.
20666         (*ldmsi5): Delete.
20667         (*ldmsi4): Delete.
20668         (*ldmsi3): Delete.
20669         (store_multiple): Delete.
20670         (*stmsi8): Delete.
20671         (*stmsi7): Delete.
20672         (*stmsi6): Delete.
20673         (*stmsi5): Delete.
20674         (*stmsi4): Delete.
20675         (*stmsi3): Delete.
20676         (movmemsi_8reg): Delete.
20677         (corresponding unnamed define_insn): Delete.
20678         (movmemsi_6reg): Delete.
20679         (corresponding unnamed define_insn): Delete.
20680         (movmemsi_4reg): Delete.
20681         (corresponding unnamed define_insn): Delete.
20682         (movmemsi_2reg): Delete.
20683         (corresponding unnamed define_insn): Delete.
20684         (movmemsi_1reg): Delete.
20685         (corresponding unnamed define_insn): Delete.
20686         * config/rs6000/rs6000.opt (mno-string): New.
20687         (mstring): Replace by deprecation warning stub.
20688         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20690 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20692         * regrename.c (regrename_do_replace): If replacing the same
20693         reg multiple times, try to reuse last created gen_raw_REG.
20695         PR debug/81155
20696         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20697         main to workaround a bug in GDB.
20699 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20701         PR target/83737
20702         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20704 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20706         PR rtl-optimization/80481
20707         * ira-color.c (get_cap_member): New function.
20708         (allocnos_conflict_by_live_ranges_p): Use it.
20709         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20710         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20712 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20714         PR target/83628
20715         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20716         (*saddl_se_1): Ditto.
20717         (*ssubsi_1): Ditto.
20718         (*ssubl_se_1): Ditto.
20720 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20722         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20723         rather than wi::to_widest for DR_INITs.
20724         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20725         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20726         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20727         INTEGER_CSTs.
20728         (vect_analyze_group_access_1): Note that here.
20730 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20732         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20733         polynomial type sizes.
20735 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20737         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20738         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20739         (gimple_add_tmp_var): Likewise.
20741 2018-01-12  Martin Liska  <mliska@suse.cz>
20743         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20744         (gimple_alloc_sizes): Likewise.
20745         (dump_gimple_statistics): Use PRIu64 in printf format.
20746         * gimple.h: Change uint64_t to int.
20748 2018-01-12  Martin Liska  <mliska@suse.cz>
20750         * tree-core.h: Use uint64_t instead of int.
20751         * tree.c (tree_node_counts): Likewise.
20752         (tree_node_sizes): Likewise.
20753         (dump_tree_statistics): Use PRIu64 in printf format.
20755 2018-01-12  Martin Liska  <mliska@suse.cz>
20757         * Makefile.in: As qsort_chk is implemented in vec.c, add
20758         vec.o to linkage of gencfn-macros.
20759         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20760         passing the info to record_node_allocation_statistics.
20761         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20762         and pass the info.
20763         * ggc-common.c (struct ggc_usage): Add operator== and use
20764         it in operator< and compare function.
20765         * mem-stats.h (struct mem_usage): Likewise.
20766         * vec.c (struct vec_usage): Remove operator< and compare
20767         function. Can be simply inherited.
20769 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20771         PR target/81616
20772         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20773         * tree-ssa-math-opts.c: Include domwalk.h.
20774         (convert_mult_to_fma_1): New function.
20775         (fma_transformation_info): New type.
20776         (fma_deferring_state): Likewise.
20777         (cancel_fma_deferring): New function.
20778         (result_of_phi): Likewise.
20779         (last_fma_candidate_feeds_initial_phi): Likewise.
20780         (convert_mult_to_fma): Added deferring logic, split actual
20781         transformation to convert_mult_to_fma_1.
20782         (math_opts_dom_walker): New type.
20783         (math_opts_dom_walker::after_dom_children): New method, body moved
20784         here from pass_optimize_widening_mul::execute, added deferring logic
20785         bits.
20786         (pass_optimize_widening_mul::execute): Moved most of code to
20787         math_opts_dom_walker::after_dom_children.
20788         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20789         * config/i386/i386.c (ix86_option_override_internal): Added
20790         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20792 2018-01-12  Richard Biener  <rguenther@suse.de>
20794         PR debug/83157
20795         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20796         inline instance vars.
20798 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20800         PR target/81819
20801         * config/rx/rx.c (rx_is_restricted_memory_address):
20802         Handle SUBREG case.
20804 2018-01-12  Richard Biener  <rguenther@suse.de>
20806         PR tree-optimization/80846
20807         * target.def (split_reduction): New target hook.
20808         * targhooks.c (default_split_reduction): New function.
20809         * targhooks.h (default_split_reduction): Declare.
20810         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20811         target requests first reduce vectors by combining low and high
20812         parts.
20813         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20814         (get_vectype_for_scalar_type_and_size): Export.
20815         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20816         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20817         * doc/tm.texi: Regenerate.
20818         * config/i386/i386.c (ix86_split_reduction): Implement
20819         TARGET_VECTORIZE_SPLIT_REDUCTION.
20821 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20823         PR target/83368
20824         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20825         in PIC mode except for TARGET_VXWORKS_RTP.
20826         * config/sparc/sparc.c: Include cfgrtl.h.
20827         (TARGET_INIT_PIC_REG): Define.
20828         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20829         (sparc_pic_register_p): New predicate.
20830         (sparc_legitimate_address_p): Use it.
20831         (sparc_legitimize_pic_address): Likewise.
20832         (sparc_delegitimize_address): Likewise.
20833         (sparc_mode_dependent_address_p): Likewise.
20834         (gen_load_pcrel_sym): Remove 4th parameter.
20835         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20836         (sparc_expand_prologue): Do not call load_got_register here.
20837         (sparc_flat_expand_prologue): Likewise.
20838         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20839         (sparc_use_pseudo_pic_reg): New function.
20840         (sparc_init_pic_reg): Likewise.
20841         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20842         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20844 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20846         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20847         Add item for branch_cost.
20849 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20851         PR rtl-optimization/83565
20852         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20853         not extend the result to a larger mode for rotate operations.
20854         (num_sign_bit_copies1): Likewise.
20856 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20858         PR target/40411
20859         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20860         -symbolic.
20861         Use values-Xc.o for -pedantic.
20862         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20864 2018-01-12  Martin Liska  <mliska@suse.cz>
20866         PR ipa/83054
20867         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20868         New function.
20869         (possible_polymorphic_call_targets): Use it.
20870         (ipa_devirt): Likewise.
20872 2018-01-12  Martin Liska  <mliska@suse.cz>
20874         * profile-count.h (enum profile_quality): Use 0 as invalid
20875         enum value of profile_quality.
20877 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20879         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20880         -mext-string options.
20882 2018-01-12  Richard Biener  <rguenther@suse.de>
20884         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20885         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20886         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20887         Likewise.
20888         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20890 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20892         * configure.ac (--with-long-double-format): Add support for the
20893         configuration option to change the default long double format on
20894         PowerPC systems.
20895         * config.gcc (powerpc*-linux*-*): Likewise.
20896         * configure: Regenerate.
20897         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20898         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20899         used without modification.
20901 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20903         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20904         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20905         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20906         MISC_BUILTIN_SPEC_BARRIER.
20907         (rs6000_init_builtins): Likewise.
20908         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20909         enum value.
20910         (speculation_barrier): New define_insn.
20911         * doc/extend.texi: Document __builtin_speculation_barrier.
20913 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20915         PR target/83203
20916         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20917         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20918         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20919         iterators.
20920         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20921         integral modes instead of "ss" and "sd".
20922         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20923         vectors with 32-bit and 64-bit elements.
20924         (vecdupssescalarmodesuffix): New mode attribute.
20925         (vec_dup<mode>): Use it.
20927 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20929         PR target/83330
20930         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20931         frame if argument is passed on stack.
20933 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20935         PR target/82682
20936         * ree.c (combine_reaching_defs): Optimize also
20937         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20938         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20940 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20942         PR middle-end/83189
20943         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20945 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20947         PR middle-end/83718
20948         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20949         after they are computed.
20951 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20953         PR tree-optimization/83695
20954         * gimple-loop-linterchange.cc
20955         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20956         reset cached scev information after interchange.
20957         (pass_linterchange::execute): Remove call to scev_reset_htab.
20959 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20961         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20962         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20963         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20964         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20965         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20966         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20967         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20968         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20969         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20970         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20971         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20972         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20973         (V_lane_reg): Likewise.
20974         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20975         New define_expand.
20976         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20977         (vfmal_lane_low<mode>_intrinsic,
20978         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20979         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20980         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20981         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20982         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20983         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20985 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20987         * config/arm/arm-cpus.in (fp16fml): New feature.
20988         (ALL_SIMD): Add fp16fml.
20989         (armv8.2-a): Add fp16fml as an option.
20990         (armv8.3-a): Likewise.
20991         (armv8.4-a): Add fp16fml as part of fp16.
20992         * config/arm/arm.h (TARGET_FP16FML): Define.
20993         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20994         when appropriate.
20995         * config/arm/arm-modes.def (V2HF): Define.
20996         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20997         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20998         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20999         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21000         vfmsl_low, vfmsl_high): New set of builtins.
21001         * config/arm/iterators.md (PLUSMINUS): New code iterator.
21002         (vfml_op): New code attribute.
21003         (VFMLHALVES): New int iterator.
21004         (VFML, VFMLSEL): New mode attributes.
21005         (V_reg): Define mapping for V2HF.
21006         (V_hi, V_lo): New mode attributes.
21007         (VF_constraint): Likewise.
21008         (vfml_half, vfml_half_selector): New int attributes.
21009         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21010         define_expand.
21011         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21012         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21013         New define_insn.
21014         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21015         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21016         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21017         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
21018         documentation.
21019         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21020         Document new effective target and option set.
21022 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21024         * config/arm/arm-cpus.in (armv8_4): New feature.
21025         (ARMv8_4a): New fgroup.
21026         (armv8.4-a): New arch.
21027         * config/arm/arm-tables.opt: Regenerate.
21028         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21029         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21030         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21031         Add matching rules for -march=armv8.4-a and extensions.
21032         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21034 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
21036         PR target/81821
21037         * config/rx/rx.md (BW): New mode attribute.
21038         (sync_lock_test_and_setsi): Add mode suffix to insn output.
21040 2018-01-11  Richard Biener  <rguenther@suse.de>
21042         PR tree-optimization/83435
21043         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21044         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21045         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21047 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21048             Alan Hayward  <alan.hayward@arm.com>
21049             David Sherwood  <david.sherwood@arm.com>
21051         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21052         field.
21053         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
21054         (aarch64_print_address_internal): Use it to check for a zero offset.
21056 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21057             Alan Hayward  <alan.hayward@arm.com>
21058             David Sherwood  <david.sherwood@arm.com>
21060         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21061         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21062         Return a poly_int64 rather than a HOST_WIDE_INT.
21063         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21064         rather than a HOST_WIDE_INT.
21065         * config/aarch64/aarch64.h (aarch64_frame): Protect with
21066         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
21067         hard_fp_offset, frame_size, initial_adjust, callee_offset and
21068         final_offset from HOST_WIDE_INT to poly_int64.
21069         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21070         to_constant when getting the number of units in an Advanced SIMD
21071         mode.
21072         (aarch64_builtin_vectorized_function): Check for a constant number
21073         of units.
21074         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21075         GET_MODE_SIZE.
21076         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21077         attribute instead of GET_MODE_NUNITS.
21078         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21079         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21080         GET_MODE_SIZE for fixed-size registers.
21081         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21082         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21083         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21084         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21085         (aarch64_print_operand, aarch64_print_address_internal)
21086         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21087         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21088         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21089         Handle polynomial GET_MODE_SIZE.
21090         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
21091         wider than SImode without modification.
21092         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21093         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21094         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21095         passing and returning SVE modes.
21096         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21097         rather than GEN_INT.
21098         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21099         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21100         (aarch64_allocate_and_probe_stack_space): Likewise.
21101         (aarch64_layout_frame): Cope with polynomial offsets.
21102         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21103         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
21104         polynomial offsets.
21105         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21106         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21107         poly_int64 rather than a HOST_WIDE_INT.
21108         (aarch64_get_separate_components, aarch64_process_components)
21109         (aarch64_expand_prologue, aarch64_expand_epilogue)
21110         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21111         (aarch64_anchor_offset): New function, split out from...
21112         (aarch64_legitimize_address): ...here.
21113         (aarch64_builtin_vectorization_cost): Handle polynomial
21114         TYPE_VECTOR_SUBPARTS.
21115         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21116         GET_MODE_NUNITS.
21117         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21118         number of elements from the PARALLEL rather than the mode.
21119         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21120         rather than GET_MODE_BITSIZE.
21121         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21122         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21123         (aarch64_expand_vec_perm_const_1): Handle polynomial
21124         d->perm.length () and d->perm elements.
21125         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
21126         Apply to_constant to d->perm elements.
21127         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21128         polynomial CONST_VECTOR_NUNITS.
21129         (aarch64_move_pointer): Take amount as a poly_int64 rather
21130         than an int.
21131         (aarch64_progress_pointer): Avoid temporary variable.
21132         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21133         the mode attribute instead of GET_MODE.
21135 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21136             Alan Hayward  <alan.hayward@arm.com>
21137             David Sherwood  <david.sherwood@arm.com>
21139         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21140         x exists before using it.
21141         (aarch64_add_constant_internal): Rename to...
21142         (aarch64_add_offset_1): ...this.  Replace regnum with separate
21143         src and dest rtxes.  Handle the case in which they're different,
21144         including when the offset is zero.  Replace scratchreg with an rtx.
21145         Use 2 additions if there is no spare register into which we can
21146         move a 16-bit constant.
21147         (aarch64_add_constant): Delete.
21148         (aarch64_add_offset): Replace reg with separate src and dest
21149         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
21150         Use aarch64_add_offset_1.
21151         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21152         an rtx rather than an int.  Take the delta as a poly_int64
21153         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
21154         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21155         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21156         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21157         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21158         and aarch64_add_sp.
21159         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21160         aarch64_add_constant.
21162 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21164         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21165         Use scalar_float_mode.
21167 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21169         * config/aarch64/aarch64-simd.md
21170         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21171         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21172         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21173         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21174         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21175         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21176         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21177         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21178         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21179         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21181 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21183         PR target/83514
21184         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21185         targ_options->x_arm_arch_string is non NULL.
21187 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
21189         * config/aarch64/aarch64.h
21190         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
21192 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
21194         PR target/82096
21195         * expmed.c (emit_store_flag_force): Swap if const op0
21196         and change VOIDmode to mode of op0.
21198 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21200         PR rtl-optimization/83761
21201         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21202         than bytes to mode_for_size.
21204 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21206         PR middle-end/83189
21207         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21208         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21209         profile.
21211 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21213         PR middle-end/83575
21214         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21215         when in layout mode.
21216         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21217         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21218         partition fixup.
21220 2018-01-10  Michael Collison  <michael.collison@arm.com>
21222         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21223         * config/aarch64/aarch64-option-extension.def: Add
21224         AARCH64_OPT_EXTENSION of 'fp16fml'.
21225         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21226         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21227         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21228         * config/aarch64/constraints.md (Ui7): New constraint.
21229         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21230         (VFMLA_SEL_W): Ditto.
21231         (f16quad): Ditto.
21232         (f16mac1): Ditto.
21233         (VFMLA16_LOW): New int iterator.
21234         (VFMLA16_HIGH): Ditto.
21235         (UNSPEC_FMLAL): New unspec.
21236         (UNSPEC_FMLSL): Ditto.
21237         (UNSPEC_FMLAL2): Ditto.
21238         (UNSPEC_FMLSL2): Ditto.
21239         (f16mac): New code attribute.
21240         * config/aarch64/aarch64-simd-builtins.def
21241         (aarch64_fmlal_lowv2sf): Ditto.
21242         (aarch64_fmlsl_lowv2sf): Ditto.
21243         (aarch64_fmlalq_lowv4sf): Ditto.
21244         (aarch64_fmlslq_lowv4sf): Ditto.
21245         (aarch64_fmlal_highv2sf): Ditto.
21246         (aarch64_fmlsl_highv2sf): Ditto.
21247         (aarch64_fmlalq_highv4sf): Ditto.
21248         (aarch64_fmlslq_highv4sf): Ditto.
21249         (aarch64_fmlal_lane_lowv2sf): Ditto.
21250         (aarch64_fmlsl_lane_lowv2sf): Ditto.
21251         (aarch64_fmlal_laneq_lowv2sf): Ditto.
21252         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21253         (aarch64_fmlalq_lane_lowv4sf): Ditto.
21254         (aarch64_fmlsl_lane_lowv4sf): Ditto.
21255         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21256         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21257         (aarch64_fmlal_lane_highv2sf): Ditto.
21258         (aarch64_fmlsl_lane_highv2sf): Ditto.
21259         (aarch64_fmlal_laneq_highv2sf): Ditto.
21260         (aarch64_fmlsl_laneq_highv2sf): Ditto.
21261         (aarch64_fmlalq_lane_highv4sf): Ditto.
21262         (aarch64_fmlsl_lane_highv4sf): Ditto.
21263         (aarch64_fmlalq_laneq_highv4sf): Ditto.
21264         (aarch64_fmlsl_laneq_highv4sf): Ditto.
21265         * config/aarch64/aarch64-simd.md:
21266         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21267         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21268         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21269         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21270         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21271         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21272         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21273         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21274         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21275         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21276         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21277         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21278         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21279         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21280         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21281         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21282         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21283         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21284         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21285         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21286         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21287         (vfmlsl_low_u32): Ditto.
21288         (vfmlalq_low_u32): Ditto.
21289         (vfmlslq_low_u32): Ditto.
21290         (vfmlal_high_u32): Ditto.
21291         (vfmlsl_high_u32): Ditto.
21292         (vfmlalq_high_u32): Ditto.
21293         (vfmlslq_high_u32): Ditto.
21294         (vfmlal_lane_low_u32): Ditto.
21295         (vfmlsl_lane_low_u32): Ditto.
21296         (vfmlal_laneq_low_u32): Ditto.
21297         (vfmlsl_laneq_low_u32): Ditto.
21298         (vfmlalq_lane_low_u32): Ditto.
21299         (vfmlslq_lane_low_u32): Ditto.
21300         (vfmlalq_laneq_low_u32): Ditto.
21301         (vfmlslq_laneq_low_u32): Ditto.
21302         (vfmlal_lane_high_u32): Ditto.
21303         (vfmlsl_lane_high_u32): Ditto.
21304         (vfmlal_laneq_high_u32): Ditto.
21305         (vfmlsl_laneq_high_u32): Ditto.
21306         (vfmlalq_lane_high_u32): Ditto.
21307         (vfmlslq_lane_high_u32): Ditto.
21308         (vfmlalq_laneq_high_u32): Ditto.
21309         (vfmlslq_laneq_high_u32): Ditto.
21310         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21311         (AARCH64_FL_FOR_ARCH8_4): New.
21312         (AARCH64_ISA_F16FML): New ISA flag.
21313         (TARGET_F16FML): New feature flag for fp16fml.
21314         (doc/invoke.texi): Document new fp16fml option.
21316 2018-01-10  Michael Collison  <michael.collison@arm.com>
21318         * config/aarch64/aarch64-builtins.c:
21319         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21320         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21321         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21322         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21323         (AARCH64_ISA_SHA3): New ISA flag.
21324         (TARGET_SHA3): New feature flag for sha3.
21325         * config/aarch64/iterators.md (sha512_op): New int attribute.
21326         (CRYPTO_SHA512): New int iterator.
21327         (UNSPEC_SHA512H): New unspec.
21328         (UNSPEC_SHA512H2): Ditto.
21329         (UNSPEC_SHA512SU0): Ditto.
21330         (UNSPEC_SHA512SU1): Ditto.
21331         * config/aarch64/aarch64-simd-builtins.def
21332         (aarch64_crypto_sha512hqv2di): New builtin.
21333         (aarch64_crypto_sha512h2qv2di): Ditto.
21334         (aarch64_crypto_sha512su0qv2di): Ditto.
21335         (aarch64_crypto_sha512su1qv2di): Ditto.
21336         (aarch64_eor3qv8hi): Ditto.
21337         (aarch64_rax1qv2di): Ditto.
21338         (aarch64_xarqv2di): Ditto.
21339         (aarch64_bcaxqv8hi): Ditto.
21340         * config/aarch64/aarch64-simd.md:
21341         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21342         (aarch64_crypto_sha512su0qv2di): Ditto.
21343         (aarch64_crypto_sha512su1qv2di): Ditto.
21344         (aarch64_eor3qv8hi): Ditto.
21345         (aarch64_rax1qv2di): Ditto.
21346         (aarch64_xarqv2di): Ditto.
21347         (aarch64_bcaxqv8hi): Ditto.
21348         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21349         (vsha512h2q_u64): Ditto.
21350         (vsha512su0q_u64): Ditto.
21351         (vsha512su1q_u64): Ditto.
21352         (veor3q_u16): Ditto.
21353         (vrax1q_u64): Ditto.
21354         (vxarq_u64): Ditto.
21355         (vbcaxq_u16): Ditto.
21356         * config/arm/types.md (crypto_sha512): New type attribute.
21357         (crypto_sha3): Ditto.
21358         (doc/invoke.texi): Document new sha3 option.
21360 2018-01-10  Michael Collison  <michael.collison@arm.com>
21362         * config/aarch64/aarch64-builtins.c:
21363         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21364         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21365         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21366         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21367         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21368         (AARCH64_ISA_SM4): New ISA flag.
21369         (TARGET_SM4): New feature flag for sm4.
21370         * config/aarch64/aarch64-simd-builtins.def
21371         (aarch64_sm3ss1qv4si): Ditto.
21372         (aarch64_sm3tt1aq4si): Ditto.
21373         (aarch64_sm3tt1bq4si): Ditto.
21374         (aarch64_sm3tt2aq4si): Ditto.
21375         (aarch64_sm3tt2bq4si): Ditto.
21376         (aarch64_sm3partw1qv4si): Ditto.
21377         (aarch64_sm3partw2qv4si): Ditto.
21378         (aarch64_sm4eqv4si): Ditto.
21379         (aarch64_sm4ekeyqv4si): Ditto.
21380         * config/aarch64/aarch64-simd.md:
21381         (aarch64_sm3ss1qv4si): Ditto.
21382         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21383         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21384         (aarch64_sm4eqv4si): Ditto.
21385         (aarch64_sm4ekeyqv4si): Ditto.
21386         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21387         (sm3part_op): Ditto.
21388         (CRYPTO_SM3TT): Ditto.
21389         (CRYPTO_SM3PART): Ditto.
21390         (UNSPEC_SM3SS1): New unspec.
21391         (UNSPEC_SM3TT1A): Ditto.
21392         (UNSPEC_SM3TT1B): Ditto.
21393         (UNSPEC_SM3TT2A): Ditto.
21394         (UNSPEC_SM3TT2B): Ditto.
21395         (UNSPEC_SM3PARTW1): Ditto.
21396         (UNSPEC_SM3PARTW2): Ditto.
21397         (UNSPEC_SM4E): Ditto.
21398         (UNSPEC_SM4EKEY): Ditto.
21399         * config/aarch64/constraints.md (Ui2): New constraint.
21400         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21401         * config/arm/types.md (crypto_sm3): New type attribute.
21402         (crypto_sm4): Ditto.
21403         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21404         (vsm3tt1aq_u32): Ditto.
21405         (vsm3tt1bq_u32): Ditto.
21406         (vsm3tt2aq_u32): Ditto.
21407         (vsm3tt2bq_u32): Ditto.
21408         (vsm3partw1q_u32): Ditto.
21409         (vsm3partw2q_u32): Ditto.
21410         (vsm4eq_u32): Ditto.
21411         (vsm4ekeyq_u32): Ditto.
21412         (doc/invoke.texi): Document new sm4 option.
21414 2018-01-10  Michael Collison  <michael.collison@arm.com>
21416         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21417         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21418         (AARCH64_FL_FOR_ARCH8_4): New.
21419         (AARCH64_FL_V8_4): New flag.
21420         (doc/invoke.texi): Document new armv8.4-a option.
21422 2018-01-10  Michael Collison  <michael.collison@arm.com>
21424         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21425         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21426         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21427         * config/aarch64/aarch64-option-extension.def: Add
21428         AARCH64_OPT_EXTENSION of 'sha2'.
21429         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21430         (crypto): Disable sha2 and aes if crypto disabled.
21431         (crypto): Enable aes and sha2 if enabled.
21432         (simd): Disable sha2 and aes if simd disabled.
21433         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21434         New flags.
21435         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21436         (TARGET_SHA2): New feature flag for sha2.
21437         (TARGET_AES): New feature flag for aes.
21438         * config/aarch64/aarch64-simd.md:
21439         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21440         conditional on TARGET_AES.
21441         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21442         (aarch64_crypto_sha1hsi): Make pattern conditional
21443         on TARGET_SHA2.
21444         (aarch64_crypto_sha1hv4si): Ditto.
21445         (aarch64_be_crypto_sha1hv4si): Ditto.
21446         (aarch64_crypto_sha1su1v4si): Ditto.
21447         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21448         (aarch64_crypto_sha1su0v4si): Ditto.
21449         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21450         (aarch64_crypto_sha256su0v4si): Ditto.
21451         (aarch64_crypto_sha256su1v4si): Ditto.
21452         (doc/invoke.texi): Document new aes and sha2 options.
21454 2018-01-10  Martin Sebor  <msebor@redhat.com>
21456         PR tree-optimization/83781
21457         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21458         as string arrays.
21460 2018-01-11  Martin Sebor  <msebor@gmail.com>
21461             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21463         PR tree-optimization/83501
21464         PR tree-optimization/81703
21466         * tree-ssa-strlen.c (get_string_cst): Rename...
21467         (get_string_len): ...to this.  Handle global constants.
21468         (handle_char_store): Adjust.
21470 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
21471             Jim Wilson  <jimw@sifive.com>
21473         * config/riscv/riscv-protos.h (riscv_output_return): New.
21474         * config/riscv/riscv.c (struct machine_function): New naked_p field.
21475         (riscv_attribute_table, riscv_output_return),
21476         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21477         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21478         (riscv_compute_frame_info): Only compute frame->mask if not a naked
21479         function.
21480         (riscv_expand_prologue): Add early return for naked function.
21481         (riscv_expand_epilogue): Likewise.
21482         (riscv_function_ok_for_sibcall): Return false for naked function.
21483         (riscv_set_current_function): New.
21484         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21485         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21486         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21487         * doc/extend.texi (RISC-V Function Attributes): New.
21489 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21491         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21492         check for 128-bit long double before checking TCmode.
21493         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21494         128-bit long doubles before checking TFmode or TCmode.
21495         (FLOAT128_IBM_P): Likewise.
21497 2018-01-10  Martin Sebor  <msebor@redhat.com>
21499         PR tree-optimization/83671
21500         * builtins.c (c_strlen): Unconditionally return zero for the empty
21501         string.
21502         Use -Warray-bounds for warnings.
21503         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21504         for non-constant array indices with COMPONENT_REF, arrays of
21505         arrays, and pointers to arrays.
21506         (gimple_fold_builtin_strlen): Determine and set length range for
21507         non-constant character arrays.
21509 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21511         PR middle-end/81897
21512         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21513         empty blocks.
21515 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21517         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21519 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21521         PR target/83399
21522         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21523         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21524         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21525         indexed_or_indirect_operand predicate.
21526         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21527         (*vsx_le_perm_load_v8hi): Likewise.
21528         (*vsx_le_perm_load_v16qi): Likewise.
21529         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21530         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21531         (*vsx_le_perm_store_v8hi): Likewise.
21532         (*vsx_le_perm_store_v16qi): Likewise.
21533         (eight unnamed splitters): Likewise.
21535 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21537         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21538         * config/rs6000/emmintrin.h: Likewise.
21539         * config/rs6000/mmintrin.h: Likewise.
21540         * config/rs6000/xmmintrin.h: Likewise.
21542 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21544         PR c++/43486
21545         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21546         "public_flag".
21547         * tree.c (tree_nop_conversion): Return true for location wrapper
21548         nodes.
21549         (maybe_wrap_with_location): New function.
21550         (selftest::check_strip_nops): New function.
21551         (selftest::test_location_wrappers): New function.
21552         (selftest::tree_c_tests): Call it.
21553         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21554         (maybe_wrap_with_location): New decl.
21555         (EXPR_LOCATION_WRAPPER_P): New macro.
21556         (location_wrapper_p): New inline function.
21557         (tree_strip_any_location_wrapper): New inline function.
21559 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21561         PR target/83735
21562         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21563         stack_realign_offset for the largest alignment of stack slot
21564         actually used.
21565         (ix86_find_max_used_stack_alignment): New function.
21566         (ix86_finalize_stack_frame_flags): Use it.  Set
21567         max_used_stack_alignment if we don't realign stack.
21568         * config/i386/i386.h (machine_function): Add
21569         max_used_stack_alignment.
21571 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21573         * config/arm/arm.opt (-mbranch-cost): New option.
21574         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21575         account.
21577 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21579         PR target/83629
21580         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21581         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21583 2018-01-10  Richard Biener  <rguenther@suse.de>
21585         PR debug/83765
21586         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21587         early out so it also covers the case where we have a non-NULL
21588         origin.
21590 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21592         PR tree-optimization/83753
21593         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21594         for non-strided grouped accesses if the number of elements is 1.
21596 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21598         PR target/81616
21599         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21600         * i386.h (TARGET_USE_GATHER): Define.
21601         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21603 2018-01-10  Martin Liska  <mliska@suse.cz>
21605         PR bootstrap/82831
21606         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21607         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21608         partitioning.
21609         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21610         CLEANUP_NO_PARTITIONING is not set.
21612 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21614         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21615         for vectors, as a partial revert of r254296.
21616         * rtl.h (const_vec_p): Delete.
21617         (const_vec_duplicate_p): Don't test for vector CONSTs.
21618         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21619         * expmed.c (make_tree): Likewise.
21621         Revert:
21622         * common.md (E, F): Use CONSTANT_P instead of checking for
21623         CONST_VECTOR.
21624         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21625         checking for CONST_VECTOR.
21627 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21629         PR middle-end/83575
21630         * predict.c (force_edge_cold): Handle in more sane way edges
21631         with no prediction.
21633 2018-01-09  Carl Love  <cel@us.ibm.com>
21635         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21636         V4SI, V4SF types.
21637         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21638         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21639         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21640         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21641         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21642         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21643         * config/rs6000/rs6000-protos.h: Add extern defition for
21644         rs6000_generate_float2_double_code.
21645         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21646         function.
21647         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21648         (float2_v2df): Add define_expand.
21650 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21652         PR target/83628
21653         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21654         op_mode in the force_to_mode call.
21656 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21658         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21659         instead of checking each element individually.
21660         (aarch64_evpc_uzp): Likewise.
21661         (aarch64_evpc_zip): Likewise.
21662         (aarch64_evpc_ext): Likewise.
21663         (aarch64_evpc_rev): Likewise.
21664         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21665         instead of checking each element individually.  Return true without
21666         generating rtl if
21667         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21668         whether all selected elements come from the same input, instead of
21669         checking each element individually.  Remove calls to gen_rtx_REG,
21670         start_sequence and end_sequence and instead assert that no rtl is
21671         generated.
21673 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21675         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21676         order of HIGH and CONST checks.
21678 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21680         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21681         if the destination isn't an SSA_NAME.
21683 2018-01-09  Richard Biener  <rguenther@suse.de>
21685         PR tree-optimization/83668
21686         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21687         move prologue...
21688         (canonicalize_loop_form): ... here, renamed from ...
21689         (canonicalize_loop_closed_ssa_form): ... this and amended to
21690         swap successor edges for loop exit blocks to make us use
21691         the RPO order we need for initial schedule generation.
21693 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21695         PR tree-optimization/64811
21696         * match.pd: When optimizing comparisons with Inf, avoid
21697         introducing or losing exceptions from comparisons with NaN.
21699 2018-01-09  Martin Liska  <mliska@suse.cz>
21701         PR sanitizer/82517
21702         * asan.c (shadow_mem_size): Add gcc_assert.
21704 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21706         Don't save registers in main().
21708         PR target/83738
21709         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21710         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21711         * config/avr/avr.c (avr_set_current_function): Don't error if
21712         naked, OS_task or OS_main are specified at the same time.
21713         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21714         OS_main.
21715         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21716         attribute.
21717         * common/config/avr/avr-common.c (avr_option_optimization_table):
21718         Switch on -mmain-is-OS_task for optimizing compilations.
21720 2018-01-09  Richard Biener  <rguenther@suse.de>
21722         PR tree-optimization/83572
21723         * graphite.c: Include cfganal.h.
21724         (graphite_transform_loops): Connect infinite loops to exit
21725         and remove fake edges at the end.
21727 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21729         * ipa-inline.c (edge_badness): Revert accidental checkin.
21731 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21733         PR ipa/80763
21734         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21735         symbols; not inline clones.
21737 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21739         PR target/83507
21740         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21741         hard registers.  Formatting fixes.
21743         PR preprocessor/83722
21744         * gcc.c (try_generate_repro): Pass
21745         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21746         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21747         do_report_bug.
21749 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21750             Kito Cheng  <kito.cheng@gmail.com>
21752         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21753         (riscv_leaf_function_p): Delete.
21754         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21756 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21758         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21759         function.
21760         (do_ifelse): New function.
21761         (do_isel): New function.
21762         (do_sub3): New function.
21763         (do_add3): New function.
21764         (do_load_mask_compare): New function.
21765         (do_overlap_load_compare): New function.
21766         (expand_compare_loop): New function.
21767         (expand_block_compare): Call expand_compare_loop() when appropriate.
21768         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21769         option description.
21770         (-mblock-compare-inline-loop-limit): New option.
21772 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21774         PR target/83677
21775         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21776         Reverse order of second and third operands in first alternative.
21777         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21778         of first and second elements in UNSPEC_VPERMR vector.
21779         (altivec_expand_vec_perm_le): Likewise.
21781 2018-01-08  Jeff Law  <law@redhat.com>
21783         PR rtl-optimizatin/81308
21784         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21785         (process_switch): If group_case_labels makes a change, then set
21786         cfg_altered.
21787         (pass_convert_switch::execute): If a switch is converted, then
21788         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21790         PR rtl-optimization/81308
21791         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21792         splitting insns.
21794 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21796         PR target/83663 - Revert r255946
21797         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21798         generation for cases where splatting a value is not useful.
21799         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21800         across a vec_duplicate and a paradoxical subreg forming a vector
21801         mode to a vec_concat.
21803 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21805         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21806         -march=armv8.3-a variants.
21807         * config/arm/t-multilib: Likewise.
21808         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21810 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21812         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21813         to generate rtl.
21814         (cceq_ior_compare_complement): Give it a name so I can use it, and
21815         change boolean_or_operator predicate to boolean_operator so it can
21816         be used to generate a crand.
21817         (eqne): New code iterator.
21818         (bd/bd_neg): New code_attrs.
21819         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21820         a single define_insn.
21821         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21822         decrement (bdnzt/bdnzf/bdzt/bdzf).
21823         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21824         with the new names of the branch decrement patterns, and added the
21825         names of the branch decrement conditional patterns.
21827 2018-01-08  Richard Biener  <rguenther@suse.de>
21829         PR tree-optimization/83563
21830         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21831         cache.
21833 2018-01-08  Richard Biener  <rguenther@suse.de>
21835         PR middle-end/83713
21836         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21838 2018-01-08  Richard Biener  <rguenther@suse.de>
21840         PR tree-optimization/83685
21841         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21842         references to abnormals.
21844 2018-01-08  Richard Biener  <rguenther@suse.de>
21846         PR lto/83719
21847         * dwarf2out.c (output_indirect_strings): Handle empty
21848         skeleton_debug_str_hash.
21849         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21851 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21853         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21854         (emit_store_direct): Likewise.
21855         (arc_trampoline_adjust_address): Likewise.
21856         (arc_asm_trampoline_template): New function.
21857         (arc_initialize_trampoline): Use asm_trampoline_template.
21858         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21859         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21860         * config/arc/arc.md (flush_icache): Delete pattern.
21862 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21864         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21865         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21866         munaligned-access.
21868 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21870         PR target/83681
21871         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21872         by not USED_FOR_TARGET.
21873         (make_pass_resolve_sw_modes): Likewise.
21875 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21877         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21878         USED_FOR_TARGET.
21880 2018-01-08  Richard Biener  <rguenther@suse.de>
21882         PR middle-end/83580
21883         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21885 2018-01-08  Richard Biener  <rguenther@suse.de>
21887         PR middle-end/83517
21888         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21890 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21892         PR middle-end/81897
21893         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21894         basic blocks with a small number of successors.
21895         (convert_control_dep_chain_into_preds): Improve handling of
21896         forwarder blocks.
21897         (dump_predicates): Split apart into...
21898         (dump_pred_chain): ...here...
21899         (dump_pred_info): ...and here.
21900         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21901         (can_chain_union_be_invalidated_p): Improve check for invalidation
21902         of paths.
21903         (uninit_uses_cannot_happen): Avoid unnecessary if
21904         convert_control_dep_chain_into_preds yielded nothing.
21906 2018-01-06  Martin Sebor  <msebor@redhat.com>
21908         PR tree-optimization/83640
21909         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21910         subtracting negative offset from size.
21911         (builtin_access::overlap): Adjust offset bounds of the access to fall
21912         within the size of the object if possible.
21914 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21916         PR rtl-optimization/83699
21917         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21918         extract_bit_field_as_subreg to cases in which the extracted
21919         value is also a vector.
21921         * lra-constraints.c (process_alt_operands): Test for the equivalence
21922         substitutions when detecting a possible reload cycle.
21924 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21926         PR debug/83480
21927         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21928         by default if flag_selective_schedling{,2}.  Formatting fixes.
21930         PR rtl-optimization/83682
21931         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21932         if it has non-VECTOR_MODE element mode.
21933         (vec_duplicate_p): Likewise.
21935         PR middle-end/83694
21936         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21937         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21939 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21941         PR target/83604
21942         * config/i386/i386-builtin.def
21943         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21944         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21945         Require also OPTION_MASK_ISA_AVX512F in addition to
21946         OPTION_MASK_ISA_GFNI.
21947         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21948         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21949         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21950         to OPTION_MASK_ISA_GFNI.
21951         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21952         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21953         OPTION_MASK_ISA_AVX512BW.
21954         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21955         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21956         addition to OPTION_MASK_ISA_GFNI.
21957         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21958         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21959         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21960         to OPTION_MASK_ISA_GFNI.
21961         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21962         a requirement for all ISAs rather than any of them with a few
21963         exceptions.
21964         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21965         processing.
21966         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21967         bitmasks to be enabled with 3 exceptions, instead of requiring any
21968         enabled ISA with lots of exceptions.
21969         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21970         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21971         Change avx512bw in isa attribute to avx512f.
21972         * config/i386/sgxintrin.h: Add license boilerplate.
21973         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21974         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21975         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21976         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21977         defined.
21978         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21979         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21980         temporarily sse2 rather than sse if not enabled already.
21982         PR target/83604
21983         * config/i386/sse.md (VI248_VLBW): Rename to ...
21984         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21985         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21986         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21987         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21988         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21989         mode iterator instead of VI248_VLBW.
21991 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21993         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21994         (record_modified): Skip clobbers; add debug output.
21995         (param_change_prob): Use sreal frequencies.
21997 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21999         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22000         punt for user-aligned variables.
22002 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
22004         * tree-chrec.c (chrec_contains_symbols): Return true for
22005         POLY_INT_CST.
22007 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
22009         PR target/82439
22010         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22011         of (x|y) == x for BICS pattern.
22013 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
22015         PR tree-optimization/83605
22016         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22017         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22018         can throw.
22020 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22022         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22023         * config/epiphany/rtems.h: New file.
22025 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22026             Uros Bizjak  <ubizjak@gmail.com>
22028         PR target/83554
22029         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22030         QIreg_operand instead of register_operand predicate.
22031         * config/i386/i386.c (ix86_rop_should_change_byte_p,
22032         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22033         comments instead of -fmitigate[-_]rop.
22035 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22037         PR bootstrap/81926
22038         * cgraphunit.c (symbol_table::compile): Switch to text_section
22039         before calling assembly_start debug hook.
22040         * run-rtl-passes.c (run_rtl_passes): Likewise.
22041         Include output.h.
22043 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22045         * tree-vrp.c (extract_range_from_binary_expr_1): Check
22046         range_int_cst_p rather than !symbolic_range_p before calling
22047         extract_range_from_multiplicative_op_1.
22049 2018-01-04  Jeff Law  <law@redhat.com>
22051         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22052         redundant test in assertion.
22054 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22056         * doc/rtl.texi: Document machine_mode wrapper classes.
22058 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22060         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22061         using tree_to_uhwi.
22063 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22065         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22066         the VEC_PERM_EXPR fold to fail.
22068 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22070         PR debug/83585
22071         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22072         to switched_sections.
22074 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22076         PR target/83680
22077         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22078         test for d.testing.
22080 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
22082         PR target/83387
22083         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22084         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22086 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22088         PR debug/83666
22089         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22090         is BLKmode and bitpos not zero or mode change is needed.
22092 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22094         PR target/83675
22095         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22096         TARGET_VIS2.
22098 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
22100         PR target/83628
22101         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22102         instead of MULT rtx.  Update all corresponding splitters.
22103         (*saddl_se): Ditto.
22104         (*ssub<modesuffix>): Ditto.
22105         (*ssubl_se): Ditto.
22106         (*cmp_sadd_di): Update split patterns.
22107         (*cmp_sadd_si): Ditto.
22108         (*cmp_sadd_sidi): Ditto.
22109         (*cmp_ssub_di): Ditto.
22110         (*cmp_ssub_si): Ditto.
22111         (*cmp_ssub_sidi): Ditto.
22112         * config/alpha/predicates.md (const23_operand): New predicate.
22113         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22114         Look for ASHIFT, not MULT inner operand.
22115         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22117 2018-01-04  Martin Liska  <mliska@suse.cz>
22119         PR gcov-profile/83669
22120         * gcov.c (output_intermediate_file): Add version to intermediate
22121         gcov file.
22122         * doc/gcov.texi: Document new field 'version' in intermediate
22123         file format. Fix location of '-k' option of gcov command.
22125 2018-01-04  Martin Liska  <mliska@suse.cz>
22127         PR ipa/82352
22128         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22130 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22132         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22134 2018-01-03  Martin Sebor  <msebor@redhat.com>
22136         PR tree-optimization/83655
22137         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22138         checking calls with invalid arguments.
22140 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22142         * tree-vect-stmts.c (vect_get_store_rhs): New function.
22143         (vectorizable_mask_load_store): Delete.
22144         (vectorizable_call): Return false for masked loads and stores.
22145         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
22146         instead of gimple_assign_rhs1.
22147         (vectorizable_load): Handle IFN_MASK_LOAD.
22148         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22152         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22153         split out from..,
22154         (vectorizable_mask_load_store): ...here.
22155         (vectorizable_load): ...and here.
22157 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22159         * tree-vect-stmts.c (vect_build_all_ones_mask)
22160         (vect_build_zero_merge_argument): New functions, split out from...
22161         (vectorizable_load): ...here.
22163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22165         * tree-vect-stmts.c (vect_check_store_rhs): New function,
22166         split out from...
22167         (vectorizable_mask_load_store): ...here.
22168         (vectorizable_store): ...and here.
22170 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22172         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22173         split out from...
22174         (vectorizable_mask_load_store): ...here.
22176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22178         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22179         (vect_model_store_cost): Take a vec_load_store_type instead of a
22180         vect_def_type.
22181         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22182         (vect_model_store_cost): Take a vec_load_store_type instead of a
22183         vect_def_type.
22184         (vectorizable_mask_load_store): Update accordingly.
22185         (vectorizable_store): Likewise.
22186         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22188 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22190         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22191         IFN_MASK_LOAD calls here rather than...
22192         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22195             Alan Hayward  <alan.hayward@arm.com>
22196             David Sherwood  <david.sherwood@arm.com>
22198         * expmed.c (extract_bit_field_1): For vector extracts,
22199         fall back to extract_bit_field_as_subreg if vec_extract
22200         isn't available.
22202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22203             Alan Hayward  <alan.hayward@arm.com>
22204             David Sherwood  <david.sherwood@arm.com>
22206         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22207         they are variable or constant sized.
22208         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22209         slots for constant-sized data.
22211 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22212             Alan Hayward  <alan.hayward@arm.com>
22213             David Sherwood  <david.sherwood@arm.com>
22215         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22216         handling COND_EXPRs with boolean comparisons, try to find a better
22217         basis for the mask type than the boolean itself.
22219 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22221         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22222         is calculated and how it can be overridden.
22223         * genmodes.c (max_bitsize_mode_any_mode): New variable.
22224         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22225         if defined.
22226         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22227         if nonzero.
22229 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22230             Alan Hayward  <alan.hayward@arm.com>
22231             David Sherwood  <david.sherwood@arm.com>
22233         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22234         Remove the mode argument.
22235         (aarch64_simd_valid_immediate): Remove the mode and inverse
22236         arguments.
22237         * config/aarch64/iterators.md (bitsize): New iterator.
22238         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22239         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22240         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22241         aarch64_simd_valid_immediate.
22242         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22243         (aarch64_reg_or_bic_imm): Likewise.
22244         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22245         with an insn_type enum and msl with a modifier_type enum.
22246         Replace element_width with a scalar_mode.  Change the shift
22247         to unsigned int.  Add constructors for scalar_float_mode and
22248         scalar_int_mode elements.
22249         (aarch64_vect_float_const_representable_p): Delete.
22250         (aarch64_can_const_movi_rtx_p)
22251         (aarch64_simd_scalar_immediate_valid_for_move)
22252         (aarch64_simd_make_constant): Update call to
22253         aarch64_simd_valid_immediate.
22254         (aarch64_advsimd_valid_immediate_hs): New function.
22255         (aarch64_advsimd_valid_immediate): Likewise.
22256         (aarch64_simd_valid_immediate): Remove mode and inverse
22257         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
22258         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22259         and aarch64_float_const_representable_p on the result.
22260         (aarch64_output_simd_mov_immediate): Remove mode argument.
22261         Update call to aarch64_simd_valid_immediate and use of
22262         simd_immediate_info.
22263         (aarch64_output_scalar_simd_mov_immediate): Update call
22264         accordingly.
22266 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22267             Alan Hayward  <alan.hayward@arm.com>
22268             David Sherwood  <david.sherwood@arm.com>
22270         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22271         (mode_nunits): Likewise CONST_MODE_NUNITS.
22272         * machmode.def (ADJUST_NUNITS): Document.
22273         * genmodes.c (mode_data::need_nunits_adj): New field.
22274         (blank_mode): Update accordingly.
22275         (adj_nunits): New variable.
22276         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22277         parameter.
22278         (emit_mode_size_inline): Set need_bytesize_adj for all modes
22279         listed in adj_nunits.
22280         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22281         listed in adj_nunits.  Don't emit case statements for such modes.
22282         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22283         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
22284         nothing if adj_nunits is nonnull.
22285         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22286         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22287         (emit_mode_fbit): Update use of print_maybe_const_decl.
22288         (emit_move_size): Likewise.  Treat the array as non-const
22289         if adj_nunits.
22290         (emit_mode_adjustments): Handle adj_nunits.
22292 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22294         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22295         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22296         (VECTOR_MODES): Use it.
22297         (make_vector_modes): Take the prefix as an argument.
22299 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22300             Alan Hayward  <alan.hayward@arm.com>
22301             David Sherwood  <david.sherwood@arm.com>
22303         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22304         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22305         for MODE_VECTOR_BOOL.
22306         * machmode.def (VECTOR_BOOL_MODE): Document.
22307         * genmodes.c (VECTOR_BOOL_MODE): New macro.
22308         (make_vector_bool_mode): New function.
22309         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22310         MODE_VECTOR_BOOL.
22311         * lto-streamer-in.c (lto_input_mode_table): Likewise.
22312         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22313         Likewise.
22314         * stor-layout.c (int_mode_for_mode): Likewise.
22315         * tree.c (build_vector_type_for_mode): Likewise.
22316         * varasm.c (output_constant_pool_2): Likewise.
22317         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22318         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
22319         for MODE_VECTOR_BOOL.
22320         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22321         of mode class checks.
22322         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22323         instead of a list of mode class checks.
22324         (expand_vector_scalar_condition): Likewise.
22325         (type_for_widest_vector_mode): Handle BImode as an inner mode.
22327 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22328             Alan Hayward  <alan.hayward@arm.com>
22329             David Sherwood  <david.sherwood@arm.com>
22331         * machmode.h (mode_size): Change from unsigned short to
22332         poly_uint16_pod.
22333         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22334         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22335         or if measurement_type is not polynomial.
22336         (fixed_size_mode::includes_p): Check for constant-sized modes.
22337         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22338         return a poly_uint16 rather than an unsigned short.
22339         (emit_mode_size): Change the type of mode_size from unsigned short
22340         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
22341         (emit_mode_adjustments): Cope with polynomial vector sizes.
22342         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22343         for GET_MODE_SIZE.
22344         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22345         for GET_MODE_SIZE.
22346         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22347         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22348         * caller-save.c (setup_save_areas): Likewise.
22349         (replace_reg_with_saved_mem): Likewise.
22350         * calls.c (emit_library_call_value_1): Likewise.
22351         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22352         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22353         (gen_lowpart_for_combine): Likewise.
22354         * convert.c (convert_to_integer_1): Likewise.
22355         * cse.c (equiv_constant, cse_insn): Likewise.
22356         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22357         (cselib_subst_to_values): Likewise.
22358         * dce.c (word_dce_process_block): Likewise.
22359         * df-problems.c (df_word_lr_mark_ref): Likewise.
22360         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22361         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22362         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22363         (rtl_for_decl_location): Likewise.
22364         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22365         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22366         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22367         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22368         (expand_expr_real_1): Likewise.
22369         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22370         (pad_below): Likewise.
22371         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22372         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22373         * ira.c (get_subreg_tracking_sizes): Likewise.
22374         * ira-build.c (ira_create_allocno_objects): Likewise.
22375         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22376         (ira_sort_regnos_for_alter_reg): Likewise.
22377         * ira-costs.c (record_operand_costs): Likewise.
22378         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22379         (resolve_simple_move): Likewise.
22380         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22381         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22382         (lra_constraints): Likewise.
22383         (CONST_POOL_OK_P): Reject variable-sized modes.
22384         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22385         (add_pseudo_to_slot, lra_spill): Likewise.
22386         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22387         * optabs-query.c (get_best_extraction_insn): Likewise.
22388         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22389         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22390         (expand_mult_highpart, valid_multiword_target_p): Likewise.
22391         * recog.c (offsettable_address_addr_space_p): Likewise.
22392         * regcprop.c (maybe_mode_change): Likewise.
22393         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22394         * regrename.c (build_def_use): Likewise.
22395         * regstat.c (dump_reg_info): Likewise.
22396         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22397         (find_reloads, find_reloads_subreg_address): Likewise.
22398         * reload1.c (eliminate_regs_1): Likewise.
22399         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22400         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22401         (simplify_binary_operation_1, simplify_subreg): Likewise.
22402         * targhooks.c (default_function_arg_padding): Likewise.
22403         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22404         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22405         (verify_gimple_assign_ternary): Likewise.
22406         * tree-inline.c (estimate_move_cost): Likewise.
22407         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22408         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22409         (get_address_cost_ainc): Likewise.
22410         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22411         (vect_supportable_dr_alignment): Likewise.
22412         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22413         (vectorizable_reduction): Likewise.
22414         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22415         (vectorizable_operation, vectorizable_load): Likewise.
22416         * tree.c (build_same_sized_truth_vector_type): Likewise.
22417         * valtrack.c (cleanup_auto_inc_dec): Likewise.
22418         * var-tracking.c (emit_note_insn_var_location): Likewise.
22419         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22420         (ADDR_VEC_ALIGN): Likewise.
22422 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22423             Alan Hayward  <alan.hayward@arm.com>
22424             David Sherwood  <david.sherwood@arm.com>
22426         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22427         unsigned short.
22428         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22429         or if measurement_type is polynomial.
22430         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22431         * combine.c (make_extraction): Likewise.
22432         * dse.c (find_shift_sequence): Likewise.
22433         * dwarf2out.c (mem_loc_descriptor): Likewise.
22434         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22435         (extract_bit_field, extract_low_bits): Likewise.
22436         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22437         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22438         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22439         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22440         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22441         * reload.c (find_reloads): Likewise.
22442         * reload1.c (alter_reg): Likewise.
22443         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22444         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22445         * tree-if-conv.c (predicate_mem_writes): Likewise.
22446         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22447         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22448         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22449         * valtrack.c (dead_debug_insert_temp): Likewise.
22450         * varasm.c (mergeable_constant_section): Likewise.
22451         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22453 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22454             Alan Hayward  <alan.hayward@arm.com>
22455             David Sherwood  <david.sherwood@arm.com>
22457         * expr.c (expand_assignment): Cope with polynomial mode sizes
22458         when assigning to a CONCAT.
22460 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22461             Alan Hayward  <alan.hayward@arm.com>
22462             David Sherwood  <david.sherwood@arm.com>
22464         * machmode.h (mode_precision): Change from unsigned short to
22465         poly_uint16_pod.
22466         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22467         short.
22468         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22469         or if measurement_type is not polynomial.
22470         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
22471         in which the mode is already known to be a scalar_int_mode.
22472         * genmodes.c (emit_mode_precision): Change the type of mode_precision
22473         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
22474         initializer.
22475         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22476         for GET_MODE_PRECISION.
22477         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22478         for GET_MODE_PRECISION.
22479         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22480         as polynomial.
22481         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22482         (expand_field_assignment, make_extraction): Likewise.
22483         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22484         (get_last_value): Likewise.
22485         * convert.c (convert_to_integer_1): Likewise.
22486         * cse.c (cse_insn): Likewise.
22487         * expr.c (expand_expr_real_1): Likewise.
22488         * lra-constraints.c (simplify_operand_subreg): Likewise.
22489         * optabs-query.c (can_atomic_load_p): Likewise.
22490         * optabs.c (expand_atomic_load): Likewise.
22491         (expand_atomic_store): Likewise.
22492         * ree.c (combine_reaching_defs): Likewise.
22493         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22494         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22495         * tree.h (type_has_mode_precision_p): Likewise.
22496         * ubsan.c (instrument_si_overflow): Likewise.
22498 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22499             Alan Hayward  <alan.hayward@arm.com>
22500             David Sherwood  <david.sherwood@arm.com>
22502         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22503         polynomial numbers of units.
22504         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22505         (valid_vector_subparts_p): New function.
22506         (build_vector_type): Remove temporary shim and take the number
22507         of units as a poly_uint64 rather than an int.
22508         (build_opaque_vector_type): Take the number of units as a
22509         poly_uint64 rather than an int.
22510         * tree.c (build_vector_from_ctor): Handle polynomial
22511         TYPE_VECTOR_SUBPARTS.
22512         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22513         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22514         (build_vector_from_val): If the number of units is variable,
22515         use build_vec_duplicate_cst for constant operands and
22516         VEC_DUPLICATE_EXPR otherwise.
22517         (make_vector_type): Remove temporary is_constant ().
22518         (build_vector_type, build_opaque_vector_type): Take the number of
22519         units as a poly_uint64 rather than an int.
22520         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22521         VECTOR_CST_NELTS.
22522         * cfgexpand.c (expand_debug_expr): Likewise.
22523         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22524         (store_constructor, expand_expr_real_1): Likewise.
22525         (const_scalar_mask_from_tree): Likewise.
22526         * fold-const-call.c (fold_const_reduction): Likewise.
22527         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22528         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22529         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22530         (fold_relational_const): Likewise.
22531         (native_interpret_vector): Likewise.  Change the size from an
22532         int to an unsigned int.
22533         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22534         TYPE_VECTOR_SUBPARTS.
22535         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22536         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22537         duplicating a non-constant operand into a variable-length vector.
22538         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22539         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22540         * ipa-icf.c (sem_variable::equals): Likewise.
22541         * match.pd: Likewise.
22542         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22543         * print-tree.c (print_node): Likewise.
22544         * stor-layout.c (layout_type): Likewise.
22545         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22546         * tree-cfg.c (verify_gimple_comparison): Likewise.
22547         (verify_gimple_assign_binary): Likewise.
22548         (verify_gimple_assign_ternary): Likewise.
22549         (verify_gimple_assign_single): Likewise.
22550         * tree-pretty-print.c (dump_generic_node): Likewise.
22551         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22552         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22553         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22554         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22555         (vect_shift_permute_load_chain): Likewise.
22556         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22557         (expand_vector_condition, optimize_vector_constructor): Likewise.
22558         (lower_vec_perm, get_compute_type): Likewise.
22559         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22560         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22561         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22562         (vect_recog_mask_conversion_pattern): Likewise.
22563         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22564         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22565         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22566         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22567         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22568         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22569         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22570         (supportable_widening_operation): Likewise.
22571         (supportable_narrowing_operation): Likewise.
22572         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22573         Likewise.
22574         * varasm.c (output_constant): Likewise.
22576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22577             Alan Hayward  <alan.hayward@arm.com>
22578             David Sherwood  <david.sherwood@arm.com>
22580         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22581         so that both the length == 3 and length != 3 cases set up their
22582         own permute vectors.  Add comments explaining why we know the
22583         number of elements is constant.
22584         (vect_permute_load_chain): Likewise.
22586 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22587             Alan Hayward  <alan.hayward@arm.com>
22588             David Sherwood  <david.sherwood@arm.com>
22590         * machmode.h (mode_nunits): Change from unsigned char to
22591         poly_uint16_pod.
22592         (ONLY_FIXED_SIZE_MODES): New macro.
22593         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22594         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22595         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22596         New typedefs.
22597         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22598         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22599         or if measurement_type is not polynomial.
22600         * genmodes.c (ZERO_COEFFS): New macro.
22601         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22602         poly_uint16.
22603         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22604         Use ZERO_COEFFS when emitting initializers.
22605         * data-streamer.h (bp_pack_poly_value): New function.
22606         (bp_unpack_poly_value): Likewise.
22607         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22608         for GET_MODE_NUNITS.
22609         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22610         for GET_MODE_NUNITS.
22611         * tree.c (make_vector_type): Remove temporary shim and make
22612         the real function take the number of units as a poly_uint64
22613         rather than an int.
22614         (build_vector_type_for_mode): Handle polynomial nunits.
22615         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22616         * emit-rtl.c (const_vec_series_p_1): Likewise.
22617         (gen_rtx_CONST_VECTOR): Likewise.
22618         * fold-const.c (test_vec_duplicate_folding): Likewise.
22619         * genrecog.c (validate_pattern): Likewise.
22620         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22621         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22622         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22623         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22624         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22625         * rtlanal.c (subreg_get_info): Likewise.
22626         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22627         (vect_grouped_load_supported): Likewise.
22628         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22629         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22630         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22631         (simplify_const_unary_operation, simplify_binary_operation_1)
22632         (simplify_const_binary_operation, simplify_ternary_operation)
22633         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22634         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22635         instead of CONST_VECTOR_NUNITS.
22636         * varasm.c (output_constant_pool_2): Likewise.
22637         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22638         explicit-encoded elements in the XVEC for variable-length vectors.
22640 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22642         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22645             Alan Hayward  <alan.hayward@arm.com>
22646             David Sherwood  <david.sherwood@arm.com>
22648         * coretypes.h (fixed_size_mode): Declare.
22649         (fixed_size_mode_pod): New typedef.
22650         * builtins.h (target_builtins::x_apply_args_mode)
22651         (target_builtins::x_apply_result_mode): Change type to
22652         fixed_size_mode_pod.
22653         * builtins.c (apply_args_size, apply_result_size, result_vector)
22654         (expand_builtin_apply_args_1, expand_builtin_apply)
22655         (expand_builtin_return): Update accordingly.
22657 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22659         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22660         * cselib.c (cselib_hash_rtx): Likewise.
22661         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22662         CONST_VECTOR encoding.
22664 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22665             Jeff Law  <law@redhat.com>
22667         PR target/83641
22668         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22669         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22670         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22671         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22673         PR target/83641
22674         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22675         explicitly probe *sp in a noreturn function if there were any callee
22676         register saves or frame pointer is needed.
22678 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22680         PR debug/83621
22681         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22682         BLKmode for ternary, binary or unary expressions.
22684         PR debug/83645
22685         * var-tracking.c (delete_vta_debug_insn): New inline function.
22686         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22687         insns from get_insns () to NULL instead of each bb separately.
22688         Use delete_vta_debug_insn.  No longer static.
22689         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22690         delete_vta_debug_insns callers.
22691         * rtl.h (delete_vta_debug_insns): Declare.
22692         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22693         instead of variable_tracking_main.
22695 2018-01-03  Martin Sebor  <msebor@redhat.com>
22697         PR tree-optimization/83603
22698         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22699         arguments past the endof the argument list in functions declared
22700         without a prototype.
22701         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22702         Avoid checking when arguments are null.
22704 2018-01-03  Martin Sebor  <msebor@redhat.com>
22706         PR c/83559
22707         * doc/extend.texi (attribute const): Fix a typo.
22708         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22709         issuing -Wsuggest-attribute for void functions.
22711 2018-01-03  Martin Sebor  <msebor@redhat.com>
22713         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22714         offset_int::from instead of wide_int::to_shwi.
22715         (maybe_diag_overlap): Remove assertion.
22716         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22717         * gimple-ssa-sprintf.c (format_directive): Same.
22718         (parse_directive): Same.
22719         (sprintf_dom_walker::compute_format_length): Same.
22720         (try_substitute_return_value): Same.
22722 2018-01-03  Jeff Law  <law@redhat.com>
22724         PR middle-end/83654
22725         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22726         non-constant residual for zero at runtime and avoid probing in
22727         that case.  Reorganize code for trailing problem to mirror handling
22728         of the residual.
22730 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22732         PR tree-optimization/83501
22733         * tree-ssa-strlen.c (get_string_cst): New.
22734         (handle_char_store): Call get_string_cst.
22736 2018-01-03  Martin Liska  <mliska@suse.cz>
22738         PR tree-optimization/83593
22739         * tree-ssa-strlen.c: Include tree-cfg.h.
22740         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22741         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22742         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22743         to false.
22744         (strlen_dom_walker::before_dom_children): Call
22745         gimple_purge_dead_eh_edges. Dump tranformation with details
22746         dump flags.
22747         (strlen_dom_walker::before_dom_children): Update call by adding
22748         new argument cleanup_eh.
22749         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22751 2018-01-03  Martin Liska  <mliska@suse.cz>
22753         PR ipa/83549
22754         * cif-code.def (VARIADIC_THUNK): New enum value.
22755         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22756         thunks.
22758 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22760         * sse.md (mov<mode>_internal): Tighten condition for when to use
22761         vmovdqu<ssescalarsize> for TI and OI modes.
22763 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22765         Update copyright years.
22767 2018-01-03  Martin Liska  <mliska@suse.cz>
22769         PR ipa/83594
22770         * ipa-visibility.c (function_and_variable_visibility): Skip
22771         functions with noipa attribure.
22773 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22775         * gcc.c (process_command): Update copyright notice dates.
22776         * gcov-dump.c (print_version): Ditto.
22777         * gcov.c (print_version): Ditto.
22778         * gcov-tool.c (print_version): Ditto.
22779         * gengtype.c (create_file): Ditto.
22780         * doc/cpp.texi: Bump @copying's copyright year.
22781         * doc/cppinternals.texi: Ditto.
22782         * doc/gcc.texi: Ditto.
22783         * doc/gccint.texi: Ditto.
22784         * doc/gcov.texi: Ditto.
22785         * doc/install.texi: Ditto.
22786         * doc/invoke.texi: Ditto.
22788 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22790         * vector-builder.h (vector_builder::m_full_nelts): Change from
22791         unsigned int to poly_uint64.
22792         (vector_builder::full_nelts): Update prototype accordingly.
22793         (vector_builder::new_vector): Likewise.
22794         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22795         (vector_builder::operator ==): Likewise.
22796         (vector_builder::finalize): Likewise.
22797         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22798         Take the number of elements as a poly_uint64 rather than an
22799         unsigned int.
22800         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22801         from unsigned int to poly_uint64.
22802         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22803         (vec_perm_indices::new_vector): Likewise.
22804         (vec_perm_indices::length): Likewise.
22805         (vec_perm_indices::nelts_per_input): Likewise.
22806         (vec_perm_indices::input_nelts): Likewise.
22807         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22808         number of elements per input as a poly_uint64 rather than an
22809         unsigned int.  Use the original encoding for variable-length
22810         vectors, rather than clamping each individual element.
22811         For the second and subsequent elements in each pattern,
22812         clamp the step and base before clamping their sum.
22813         (vec_perm_indices::series_p): Handle polynomial element counts.
22814         (vec_perm_indices::all_in_range_p): Likewise.
22815         (vec_perm_indices_to_tree): Likewise.
22816         (vec_perm_indices_to_rtx): Likewise.
22817         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22818         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22819         (tree_vector_builder::new_binary_operation): Handle polynomial
22820         element counts.  Return false if we need to know the number
22821         of elements at compile time.
22822         * fold-const.c (fold_vec_perm): Punt if the number of elements
22823         isn't known at compile time.
22825 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22827         * vec-perm-indices.h (vec_perm_builder): Change element type
22828         from HOST_WIDE_INT to poly_int64.
22829         (vec_perm_indices::element_type): Update accordingly.
22830         (vec_perm_indices::clamp): Handle polynomial element_types.
22831         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22832         (vec_perm_indices::all_in_range_p): Likewise.
22833         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22834         than shwi trees.
22835         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22836         polynomial vec_perm_indices element types.
22837         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22838         * fold-const.c (fold_vec_perm): Likewise.
22839         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22840         * tree-vect-generic.c (lower_vec_perm): Likewise.
22841         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22842         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22843         element type to HOST_WIDE_INT.
22845 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22846             Alan Hayward  <alan.hayward@arm.com>
22847             David Sherwood  <david.sherwood@arm.com>
22849         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22850         rather than an int.  Use plus_constant.
22851         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22852         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22854 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22855             Alan Hayward  <alan.hayward@arm.com>
22856             David Sherwood  <david.sherwood@arm.com>
22858         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22859         a HOST_WIDE_INT to a poly_int64.
22861 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22862             Alan Hayward  <alan.hayward@arm.com>
22863             David Sherwood  <david.sherwood@arm.com>
22865         * calls.c (load_register_parameters): Cope with polynomial
22866         mode sizes.  Require a constant size for BLKmode parameters
22867         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22868         forces a parameter to be padded at the lsb end in order to
22869         fill a complete number of words, require the parameter size
22870         to be ordered wrt UNITS_PER_WORD.
22872 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22873             Alan Hayward  <alan.hayward@arm.com>
22874             David Sherwood  <david.sherwood@arm.com>
22876         * reload1.c (spill_stack_slot_width): Change element type
22877         from unsigned int to poly_uint64_pod.
22878         (alter_reg): Treat mode sizes as polynomial.
22880 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22881             Alan Hayward  <alan.hayward@arm.com>
22882             David Sherwood  <david.sherwood@arm.com>
22884         * reload.c (complex_word_subreg_p): New function.
22885         (reload_inner_reg_of_subreg, push_reload): Use it.
22887 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22888             Alan Hayward  <alan.hayward@arm.com>
22889             David Sherwood  <david.sherwood@arm.com>
22891         * lra-constraints.c (process_alt_operands): Reject matched
22892         operands whose sizes aren't ordered.
22893         (match_reload): Refer to this check here.
22895 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22896             Alan Hayward  <alan.hayward@arm.com>
22897             David Sherwood  <david.sherwood@arm.com>
22899         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22900         that the mode size is in the set {1, 2, 4, 8, 16}.
22902 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22903             Alan Hayward  <alan.hayward@arm.com>
22904             David Sherwood  <david.sherwood@arm.com>
22906         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22907         Use plus_constant instead of gen_rtx_PLUS.
22909 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22910             Alan Hayward  <alan.hayward@arm.com>
22911             David Sherwood  <david.sherwood@arm.com>
22913         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22914         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22915         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22916         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22917         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22918         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22919         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22920         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22921         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22922         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22923         a poly_int64.
22924         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22925         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22926         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22927         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22928         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22929         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22930         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22931         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22932         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22933         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22934         function.
22935         * expr.c (emit_move_resolve_push): Treat the input and result
22936         of PUSH_ROUNDING as a poly_int64.
22937         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22938         (emit_push_insn): Likewise.
22939         * lra-eliminations.c (mark_not_eliminable): Likewise.
22940         * recog.c (push_operand): Likewise.
22941         * reload1.c (elimination_effects): Likewise.
22942         * rtlanal.c (nonzero_bits1): Likewise.
22943         * calls.c (store_one_arg): Likewise.  Require the padding to be
22944         known at compile time.
22946 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22947             Alan Hayward  <alan.hayward@arm.com>
22948             David Sherwood  <david.sherwood@arm.com>
22950         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22951         Use plus_constant instead of gen_rtx_PLUS.
22953 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22954             Alan Hayward  <alan.hayward@arm.com>
22955             David Sherwood  <david.sherwood@arm.com>
22957         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22958         rather than an int.
22960 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22961             Alan Hayward  <alan.hayward@arm.com>
22962             David Sherwood  <david.sherwood@arm.com>
22964         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22965         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22966         via stack temporaries.  Treat the mode size as polynomial too.
22968 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22969             Alan Hayward  <alan.hayward@arm.com>
22970             David Sherwood  <david.sherwood@arm.com>
22972         * expr.c (expand_expr_real_2): When handling conversions involving
22973         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22974         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22975         as a poly_uint64 too.
22977 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22978             Alan Hayward  <alan.hayward@arm.com>
22979             David Sherwood  <david.sherwood@arm.com>
22981         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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         * combine.c (can_change_dest_mode): Handle polynomial
22988         REGMODE_NATURAL_SIZE.
22989         * expmed.c (store_bit_field_1): Likewise.
22990         * expr.c (store_constructor): Likewise.
22991         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22992         and polynomial REGMODE_NATURAL_SIZE.
22993         (gen_lowpart_common): Likewise.
22994         * reginfo.c (record_subregs_of_mode): Likewise.
22995         * rtlanal.c (read_modify_subreg_p): Likewise.
22997 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22998             Alan Hayward  <alan.hayward@arm.com>
22999             David Sherwood  <david.sherwood@arm.com>
23001         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23002         numbers of elements.
23004 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23005             Alan Hayward  <alan.hayward@arm.com>
23006             David Sherwood  <david.sherwood@arm.com>
23008         * match.pd: Cope with polynomial numbers of vector 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         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23015         in a POINTER_PLUS_EXPR.
23017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23018             Alan Hayward  <alan.hayward@arm.com>
23019             David Sherwood  <david.sherwood@arm.com>
23021         * omp-simd-clone.c (simd_clone_subparts): New function.
23022         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23023         (ipa_simd_modify_function_body): Likewise.
23025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23026             Alan Hayward  <alan.hayward@arm.com>
23027             David Sherwood  <david.sherwood@arm.com>
23029         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23030         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23031         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23032         (expand_vector_condition, vector_element): Likewise.
23033         (subparts_gt): New function.
23034         (get_compute_type): Use subparts_gt.
23035         (count_type_subparts): Delete.
23036         (expand_vector_operations_1): Use subparts_gt instead of
23037         count_type_subparts.
23039 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23040             Alan Hayward  <alan.hayward@arm.com>
23041             David Sherwood  <david.sherwood@arm.com>
23043         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23044         (vect_compile_time_alias): ...this new function.  Do the calculation
23045         on poly_ints rather than trees.
23046         (vect_prune_runtime_alias_test_list): Update call accordingly.
23048 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23049             Alan Hayward  <alan.hayward@arm.com>
23050             David Sherwood  <david.sherwood@arm.com>
23052         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23053         numbers of units.
23054         (vect_schedule_slp_instance): Likewise.
23056 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23057             Alan Hayward  <alan.hayward@arm.com>
23058             David Sherwood  <david.sherwood@arm.com>
23060         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23061         constant and extern definitions for variable-length vectors.
23062         (vect_get_constant_vectors): Note that the number of units
23063         is known to be constant.
23065 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23066             Alan Hayward  <alan.hayward@arm.com>
23067             David Sherwood  <david.sherwood@arm.com>
23069         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23070         of units as polynomial.  Choose between WIDE and NARROW based
23071         on multiple_p.
23073 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23074             Alan Hayward  <alan.hayward@arm.com>
23075             David Sherwood  <david.sherwood@arm.com>
23077         * tree-vect-stmts.c (simd_clone_subparts): New function.
23078         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23080 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23081             Alan Hayward  <alan.hayward@arm.com>
23082             David Sherwood  <david.sherwood@arm.com>
23084         * tree-vect-stmts.c (vectorizable_call): Treat the number of
23085         vectors as polynomial.  Use build_index_vector for
23086         IFN_GOMP_SIMD_LANE.
23088 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23089             Alan Hayward  <alan.hayward@arm.com>
23090             David Sherwood  <david.sherwood@arm.com>
23092         * tree-vect-stmts.c (get_load_store_type): Treat the number of
23093         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23094         for variable-length vectors.
23095         (vectorizable_mask_load_store): Treat the number of units as
23096         polynomial, asserting that it is constant if the condition has
23097         already been enforced.
23098         (vectorizable_store, vectorizable_load): Likewise.
23100 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23101             Alan Hayward  <alan.hayward@arm.com>
23102             David Sherwood  <david.sherwood@arm.com>
23104         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23105         of units as polynomial.  Punt if we can't tell at compile time
23106         which vector contains the final result.
23108 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23109             Alan Hayward  <alan.hayward@arm.com>
23110             David Sherwood  <david.sherwood@arm.com>
23112         * tree-vect-loop.c (vectorizable_induction): Treat the number
23113         of units as polynomial.  Punt on SLP inductions.  Use an integer
23114         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
23115         cast of such a series for variable-length floating-point
23116         reductions.
23118 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23119             Alan Hayward  <alan.hayward@arm.com>
23120             David Sherwood  <david.sherwood@arm.com>
23122         * tree.h (build_index_vector): Declare.
23123         * tree.c (build_index_vector): New function.
23124         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23125         of units as polynomial, forcibly converting it to a constant if
23126         vectorizable_reduction has already enforced the condition.
23127         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
23128         to create a {1,2,3,...} vector.
23129         (vectorizable_reduction): Treat the number of units as polynomial.
23130         Choose vectype_in based on the largest scalar element size rather
23131         than the smallest number of units.  Enforce the restrictions
23132         relied on above.
23134 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23135             Alan Hayward  <alan.hayward@arm.com>
23136             David Sherwood  <david.sherwood@arm.com>
23138         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23139         number of units as polynomial.
23141 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23142             Alan Hayward  <alan.hayward@arm.com>
23143             David Sherwood  <david.sherwood@arm.com>
23145         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23146         * target.def (autovectorize_vector_sizes): Return the vector sizes
23147         by pointer, using vector_sizes rather than a bitmask.
23148         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23149         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23150         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23151         Likewise.
23152         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23153         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23154         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23155         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23156         * omp-general.c (omp_max_vf): Likewise.
23157         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23158         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23159         * tree-vect-loop.c (vect_analyze_loop): Likewise.
23160         * tree-vect-slp.c (vect_slp_bb): Likewise.
23161         * doc/tm.texi: Regenerate.
23162         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23163         to a poly_uint64.
23164         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23165         the vector size as a poly_uint64 rather than an unsigned int.
23166         (current_vector_size): Change from an unsigned int to a poly_uint64.
23167         (get_vectype_for_scalar_type): Update accordingly.
23168         * tree.h (build_truth_vector_type): Take the size and number of
23169         units as a poly_uint64 rather than an unsigned int.
23170         (build_vector_type): Add a temporary overload that takes
23171         the number of units as a poly_uint64 rather than an unsigned int.
23172         * tree.c (make_vector_type): Likewise.
23173         (build_truth_vector_type): Take the number of units as a poly_uint64
23174         rather than an unsigned int.
23176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23177             Alan Hayward  <alan.hayward@arm.com>
23178             David Sherwood  <david.sherwood@arm.com>
23180         * target.def (get_mask_mode): Take the number of units and length
23181         as poly_uint64s rather than unsigned ints.
23182         * targhooks.h (default_get_mask_mode): Update accordingly.
23183         * targhooks.c (default_get_mask_mode): Likewise.
23184         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23185         * doc/tm.texi: Regenerate.
23187 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23188             Alan Hayward  <alan.hayward@arm.com>
23189             David Sherwood  <david.sherwood@arm.com>
23191         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23192         * omp-general.c (omp_max_vf): Likewise.
23193         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23194         (expand_omp_simd): Handle polynomial safelen.
23195         * omp-low.c (omplow_simd_context): Add a default constructor.
23196         (omplow_simd_context::max_vf): Change from int to poly_uint64.
23197         (lower_rec_simd_input_clauses): Update accordingly.
23198         (lower_rec_input_clauses): Likewise.
23200 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23201             Alan Hayward  <alan.hayward@arm.com>
23202             David Sherwood  <david.sherwood@arm.com>
23204         * tree-vectorizer.h (vect_nunits_for_cost): New function.
23205         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23206         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23207         (vect_analyze_slp_cost): Likewise.
23208         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23209         (vect_model_load_cost): Likewise.
23211 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23212             Alan Hayward  <alan.hayward@arm.com>
23213             David Sherwood  <david.sherwood@arm.com>
23215         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23216         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23217         from an unsigned int * to a poly_uint64_pod *.
23218         (calculate_unrolling_factor): New function.
23219         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
23221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23222             Alan Hayward  <alan.hayward@arm.com>
23223             David Sherwood  <david.sherwood@arm.com>
23225         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23226         from an unsigned int to a poly_uint64.
23227         (_loop_vec_info::slp_unrolling_factor): Likewise.
23228         (_loop_vec_info::vectorization_factor): Change from an int
23229         to a poly_uint64.
23230         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23231         (vect_get_num_vectors): New function.
23232         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23233         (vect_get_num_copies): Use vect_get_num_vectors.
23234         (vect_analyze_data_ref_dependences): Change max_vf from an int *
23235         to an unsigned int *.
23236         (vect_analyze_data_refs): Change min_vf from an int * to a
23237         poly_uint64 *.
23238         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23239         than an unsigned HOST_WIDE_INT.
23240         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23241         (vect_analyze_data_ref_dependence): Change max_vf from an int *
23242         to an unsigned int *.
23243         (vect_analyze_data_ref_dependences): Likewise.
23244         (vect_compute_data_ref_alignment): Handle polynomial vf.
23245         (vect_enhance_data_refs_alignment): Likewise.
23246         (vect_prune_runtime_alias_test_list): Likewise.
23247         (vect_shift_permute_load_chain): Likewise.
23248         (vect_supportable_dr_alignment): Likewise.
23249         (dependence_distance_ge_vf): Take the vectorization factor as a
23250         poly_uint64 rather than an unsigned HOST_WIDE_INT.
23251         (vect_analyze_data_refs): Change min_vf from an int * to a
23252         poly_uint64 *.
23253         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23254         vfm1 as a poly_uint64 rather than an int.  Make the same change
23255         for the returned bound_scalar.
23256         (vect_gen_vector_loop_niters): Handle polynomial vf.
23257         (vect_do_peeling): Likewise.  Update call to
23258         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23259         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23260         be constant.
23261         * tree-vect-loop.c (vect_determine_vectorization_factor)
23262         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23263         (vect_get_known_peeling_cost): Likewise.
23264         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23265         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23266         (vect_transform_loop): Likewise.  Use the lowest possible VF when
23267         updating the upper bounds of the loop.
23268         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
23269         rather than an int.
23270         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23271         polynomial unroll factors.
23272         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23273         (vect_make_slp_decision): Likewise.
23274         (vect_supported_load_permutation_p): Likewise, and polynomial
23275         vf too.
23276         (vect_analyze_slp_cost): Handle polynomial vf.
23277         (vect_slp_analyze_node_operations): Likewise.
23278         (vect_slp_analyze_bb_1): Likewise.
23279         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23280         than an unsigned HOST_WIDE_INT.
23281         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23282         (vectorizable_load): Handle polynomial vf.
23283         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23284         a poly_uint64.
23285         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23288             Alan Hayward  <alan.hayward@arm.com>
23289             David Sherwood  <david.sherwood@arm.com>
23291         * match.pd: Handle bit operations involving three constants
23292         and try to fold one pair.
23294 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23296         * tree-vect-loop-manip.c: Include gimple-fold.h.
23297         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23298         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
23299         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23300         Add a path that uses a step of VF instead of 1, but disable it
23301         for now.
23302         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23303         and niters_no_overflow parameters.  Update calls to
23304         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23305         Create a new SSA name if the latter choses to use a ste other
23306         than zero, and return it via niters_vector_mult_vf_var.
23307         * tree-vect-loop.c (vect_transform_loop): Update calls to
23308         vect_do_peeling, vect_gen_vector_loop_niters and
23309         slpeel_make_loop_iterate_ntimes.
23310         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23311         (vect_gen_vector_loop_niters): Update declarations after above changes.
23313 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
23315         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23316         128-bit round to integer instructions.
23317         (ceil<mode>2): Likewise.
23318         (btrunc<mode>2): Likewise.
23319         (round<mode>2): Likewise.
23321 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23323         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23324         unaligned VSX load/store on P8/P9.
23325         (expand_block_clear): Allow the use of unaligned VSX
23326         load/store on P8/P9.
23328 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23330         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23331         New function.
23332         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23333         swap associated with both a load and a store.
23335 2018-01-02  Andrew Waterman  <andrew@sifive.com>
23337         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23338         * config/riscv/riscv.md (clear_cache): Use it.
23340 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
23342         * web.c: Remove out-of-date comment.
23344 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23346         * expr.c (fixup_args_size_notes): Check that any existing
23347         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23348         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23349         (emit_single_push_insn): ...here.
23351 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23353         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23354         (const_vector_encoded_nelts): New function.
23355         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23356         (const_vector_int_elt, const_vector_elt): Declare.
23357         * emit-rtl.c (const_vector_int_elt_1): New function.
23358         (const_vector_elt): Likewise.
23359         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23360         of CONST_VECTOR_ELT.
23362 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23364         * expr.c: Include rtx-vector-builder.h.
23365         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23366         directly on the tree encoding.
23367         (const_vector_from_tree): Likewise.
23368         * optabs.c: Include rtx-vector-builder.h.
23369         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23370         sequence of "u" values.
23371         * vec-perm-indices.c: Include rtx-vector-builder.h.
23372         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23373         directly on the vec_perm_indices encoding.
23375 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23377         * doc/rtl.texi (const_vector): Describe new encoding scheme.
23378         * Makefile.in (OBJS): Add rtx-vector-builder.o.
23379         * rtx-vector-builder.h: New file.
23380         * rtx-vector-builder.c: Likewise.
23381         * rtl.h (rtx_def::u2): Add a const_vector field.
23382         (CONST_VECTOR_NPATTERNS): New macro.
23383         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23384         (CONST_VECTOR_DUPLICATE_P): Likewise.
23385         (CONST_VECTOR_STEPPED_P): Likewise.
23386         (CONST_VECTOR_ENCODED_ELT): Likewise.
23387         (const_vec_duplicate_p): Check for a duplicated vector encoding.
23388         (unwrap_const_vec_duplicate): Likewise.
23389         (const_vec_series_p): Check for a non-duplicated vector encoding.
23390         Say that the function only returns true for integer vectors.
23391         * emit-rtl.c: Include rtx-vector-builder.h.
23392         (gen_const_vec_duplicate_1): Delete.
23393         (gen_const_vector): Call gen_const_vec_duplicate instead of
23394         gen_const_vec_duplicate_1.
23395         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23396         (gen_const_vec_duplicate): Use rtx_vector_builder.
23397         (gen_const_vec_series): Likewise.
23398         (gen_rtx_CONST_VECTOR): Likewise.
23399         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23400         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23401         Build a new vector rather than modifying a CONST_VECTOR in-place.
23402         (handle_special_swappables): Update call accordingly.
23403         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23404         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23405         Build a new vector rather than modifying a CONST_VECTOR in-place.
23406         (handle_special_swappables): Update call accordingly.
23408 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23410         * simplify-rtx.c (simplify_const_binary_operation): Use
23411         CONST_VECTOR_ELT instead of XVECEXP.
23413 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23415         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23416         the selector elements to be different from the data elements
23417         if the selector is a VECTOR_CST.
23418         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23419         ssizetype for the selector.
23421 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23423         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23424         before testing each element individually.
23425         * tree-vect-generic.c (lower_vec_perm): Likewise.
23427 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23429         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23430         * selftest-run-tests.c (selftest::run_tests): Call it.
23431         * vector-builder.h (vector_builder::operator ==): New function.
23432         (vector_builder::operator !=): Likewise.
23433         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23434         (vec_perm_indices::all_from_input_p): New function.
23435         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23436         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23437         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23438         instead of reading the VECTOR_CST directly.  Detect whether both
23439         vector inputs are the same before constructing the vec_perm_indices,
23440         and update the number of inputs argument accordingly.  Use the
23441         utility functions added above.  Only construct sel2 if we need to.
23443 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23445         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23446         the broadcast of the low byte.
23447         (expand_mult_highpart): Use an explicit encoding for the permutes.
23448         * optabs-query.c (can_mult_highpart_p): Likewise.
23449         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23450         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23451         (vectorizable_bswap): Likewise.
23452         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23453         explicit encoding for the power-of-2 permutes.
23454         (vect_permute_store_chain): Likewise.
23455         (vect_grouped_load_supported): Likewise.
23456         (vect_permute_load_chain): Likewise.
23458 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23460         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23461         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23462         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23463         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23464         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23465         (vect_gen_perm_mask_any): Likewise.
23467 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23469         * int-vector-builder.h: New file.
23470         * vec-perm-indices.h: Include int-vector-builder.h.
23471         (vec_perm_indices): Redefine as an int_vector_builder.
23472         (auto_vec_perm_indices): Delete.
23473         (vec_perm_builder): Redefine as a stand-alone class.
23474         (vec_perm_indices::vec_perm_indices): New function.
23475         (vec_perm_indices::clamp): Likewise.
23476         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23477         (vec_perm_indices::new_vector): New function.
23478         (vec_perm_indices::new_expanded_vector): Update for new
23479         vec_perm_indices class.
23480         (vec_perm_indices::rotate_inputs): New function.
23481         (vec_perm_indices::all_in_range_p): Operate directly on the
23482         encoded form, without computing elided elements.
23483         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23484         encoding.  Update for new vec_perm_indices class.
23485         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23486         the given vec_perm_builder.
23487         (expand_vec_perm_var): Update vec_perm_builder constructor.
23488         (expand_mult_highpart): Use vec_perm_builder instead of
23489         auto_vec_perm_indices.
23490         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23491         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23492         or double series encoding as appropriate.
23493         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23494         vec_perm_indices instead of auto_vec_perm_indices.
23495         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23496         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23497         (vect_permute_store_chain): Likewise.
23498         (vect_grouped_load_supported): Likewise.
23499         (vect_permute_load_chain): Likewise.
23500         (vect_shift_permute_load_chain): Likewise.
23501         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23502         (vect_transform_slp_perm_load): Likewise.
23503         (vect_schedule_slp_instance): Likewise.
23504         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23505         (vectorizable_mask_load_store): Likewise.
23506         (vectorizable_bswap): Likewise.
23507         (vectorizable_store): Likewise.
23508         (vectorizable_load): Likewise.
23509         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23510         vec_perm_indices instead of auto_vec_perm_indices.  Use
23511         tree_to_vec_perm_builder to read the vector from a tree.
23512         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23513         vec_perm_builder instead of a vec_perm_indices.
23514         (have_whole_vector_shift): Use vec_perm_builder and
23515         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23516         truncation to calc_vec_perm_mask_for_shift.
23517         (vect_create_epilog_for_reduction): Likewise.
23518         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23519         from auto_vec_perm_indices to vec_perm_indices.
23520         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23521         instead of changing individual elements.
23522         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23523         the vector in d.perm.
23524         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23525         from auto_vec_perm_indices to vec_perm_indices.
23526         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23527         instead of changing individual elements.
23528         (arm_vectorize_vec_perm_const): Use new_vector to install
23529         the vector in d.perm.
23530         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23531         Update vec_perm_builder constructor.
23532         (rs6000_expand_interleave): Likewise.
23533         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23534         (rs6000_expand_interleave): Likewise.
23536 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23538         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23539         to qimode could truncate the indices.
23540         * optabs.c (expand_vec_perm_var): Likewise.
23542 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23544         * Makefile.in (OBJS): Add vec-perm-indices.o.
23545         * vec-perm-indices.h: New file.
23546         * vec-perm-indices.c: Likewise.
23547         * target.h (vec_perm_indices): Replace with a forward class
23548         declaration.
23549         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23550         * optabs.h: Include vec-perm-indices.h.
23551         (expand_vec_perm): Delete.
23552         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23553         (expand_vec_perm_const): Declare.
23554         * target.def (vec_perm_const_ok): Replace with...
23555         (vec_perm_const): ...this new hook.
23556         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23557         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23558         * doc/tm.texi: Regenerate.
23559         * optabs.def (vec_perm_const): Delete.
23560         * doc/md.texi (vec_perm_const): Likewise.
23561         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23562         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23563         expand_vec_perm for constant permutation vectors.  Assert that
23564         the mode of variable permutation vectors is the integer equivalent
23565         of the mode that is being permuted.
23566         * optabs-query.h (selector_fits_mode_p): Declare.
23567         * optabs-query.c: Include vec-perm-indices.h.
23568         (selector_fits_mode_p): New function.
23569         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23570         is defined, instead of checking whether the vec_perm_const_optab
23571         exists.  Use targetm.vectorize.vec_perm_const instead of
23572         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23573         fit in the vector mode before using a variable permute.
23574         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23575         vec_perm_indices instead of an rtx.
23576         (expand_vec_perm): Replace with...
23577         (expand_vec_perm_const): ...this new function.  Take the selector
23578         as a vec_perm_indices rather than an rtx.  Also take the mode of
23579         the selector.  Update call to shift_amt_for_vec_perm_mask.
23580         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23581         Use vec_perm_indices::new_expanded_vector to expand the original
23582         selector into bytes.  Check whether the indices fit in the vector
23583         mode before using a variable permute.
23584         (expand_vec_perm_var): Make global.
23585         (expand_mult_highpart): Use expand_vec_perm_const.
23586         * fold-const.c: Includes vec-perm-indices.h.
23587         * tree-ssa-forwprop.c: Likewise.
23588         * tree-vect-data-refs.c: Likewise.
23589         * tree-vect-generic.c: Likewise.
23590         * tree-vect-loop.c: Likewise.
23591         * tree-vect-slp.c: Likewise.
23592         * tree-vect-stmts.c: Likewise.
23593         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23594         Delete.
23595         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23596         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23597         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23598         (aarch64_vectorize_vec_perm_const): ...this new function.
23599         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23600         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23601         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23602         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23603         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23604         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23605         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23606         into...
23607         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23608         check for NEON modes.
23609         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23610         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23611         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23612         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23613         into...
23614         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23615         the old VEC_PERM_CONST conditions.
23616         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23617         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23618         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23619         (ia64_vectorize_vec_perm_const_ok): Merge into...
23620         (ia64_vectorize_vec_perm_const): ...this new function.
23621         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23622         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23623         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23624         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23625         * config/mips/mips.c (mips_expand_vec_perm_const)
23626         (mips_vectorize_vec_perm_const_ok): Merge into...
23627         (mips_vectorize_vec_perm_const): ...this new function.
23628         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23629         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23630         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23631         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23632         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23633         (rs6000_expand_vec_perm_const): Delete.
23634         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23635         Delete.
23636         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23637         (altivec_expand_vec_perm_const_le): Take each operand individually.
23638         Operate on constant selectors rather than rtxes.
23639         (altivec_expand_vec_perm_const): Likewise.  Update call to
23640         altivec_expand_vec_perm_const_le.
23641         (rs6000_expand_vec_perm_const): Delete.
23642         (rs6000_vectorize_vec_perm_const_ok): Delete.
23643         (rs6000_vectorize_vec_perm_const): New function.
23644         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23645         an element count and rtx array.
23646         (rs6000_expand_extract_even): Update call accordingly.
23647         (rs6000_expand_interleave): Likewise.
23648         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23649         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23650         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23651         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23652         (rs6000_expand_vec_perm_const): Delete.
23653         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23654         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23655         (altivec_expand_vec_perm_const_le): Take each operand individually.
23656         Operate on constant selectors rather than rtxes.
23657         (altivec_expand_vec_perm_const): Likewise.  Update call to
23658         altivec_expand_vec_perm_const_le.
23659         (rs6000_expand_vec_perm_const): Delete.
23660         (rs6000_vectorize_vec_perm_const_ok): Delete.
23661         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23662         reference to the SPE evmerge intructions.
23663         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23664         an element count and rtx array.
23665         (rs6000_expand_extract_even): Update call accordingly.
23666         (rs6000_expand_interleave): Likewise.
23667         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23668         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23669         new function.
23670         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23672 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23674         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23675         vector mode and that that mode matches the mode of the data
23676         being permuted.
23677         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23678         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23679         directly using expand_vec_perm_1 when forcing selectors into
23680         registers.
23681         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23683 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23685         * optabs-query.h (can_vec_perm_p): Delete.
23686         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23687         * optabs-query.c (can_vec_perm_p): Split into...
23688         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23689         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23690         particular selector is valid.
23691         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23692         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23693         (vect_grouped_load_supported): Likewise.
23694         (vect_shift_permute_load_chain): Likewise.
23695         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23696         (vect_transform_slp_perm_load): Likewise.
23697         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23698         (vectorizable_bswap): Likewise.
23699         (vect_gen_perm_mask_checked): Likewise.
23700         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23701         implementations of variable permutation vectors into account
23702         when deciding which selector to use.
23703         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23704         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23705         with a false third argument.
23706         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23707         to test whether the constant selector is valid and can_vec_perm_var_p
23708         to test whether a variable selector is valid.
23710 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23712         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23713         * optabs-query.c (can_vec_perm_p): Likewise.
23714         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23715         instead of vec_perm_indices.
23716         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23717         (vect_gen_perm_mask_checked): Likewise,
23718         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23719         (vect_gen_perm_mask_checked): Likewise,
23721 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23723         * optabs-query.h (qimode_for_vec_perm): Declare.
23724         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23725         (qimode_for_vec_perm): ...this new function.
23726         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23728 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23730         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23731         does not have a conditional at the top.
23733 2018-01-02  Richard Biener  <rguenther@suse.de>
23735         * ipa-inline.c (big_speedup_p): Fix expression.
23737 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23739         PR target/81616
23740         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23741         for generic 4->6.
23743 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23745         PR target/81616
23746         Generic tuning.
23747         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23748         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23749         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23750         cond_taken_branch_cost 3->4.
23752 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23754         PR tree-optimization/83581
23755         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23756         TODO_cleanup_cfg if any changes have been made.
23758         PR middle-end/83608
23759         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23760         convert_modes if target mode has the right side, but different mode
23761         class.
23763         PR middle-end/83609
23764         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23765         last argument when extracting from CONCAT.  If either from_real or
23766         from_imag is NULL, use expansion through memory.  If result is not
23767         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23768         the parts directly to inner mode, if even that fails, use expansion
23769         through memory.
23771         PR middle-end/83623
23772         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23773         check for bswap in mode rather than HImode and use that in expand_unop
23774         too.
23776 Copyright (C) 2018 Free Software Foundation, Inc.
23778 Copying and distribution of this file, with or without modification,
23779 are permitted in any medium without royalty provided the copyright
23780 notice and this notice are preserved.