1 2018-08-22 Alexandre Oliva <oliva@adacore.com>
3 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4 a comment about how uses of r2 for .sdata2 come about.
6 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
10 2018-08-21 Marek Polacek <polacek@redhat.com>
12 PR c++/86981, Implement -Wpessimizing-move.
13 * doc/invoke.texi: Document -Wpessimizing-move.
15 2018-08-21 Jan Hubicka <jh@suse.cz>
17 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
18 * tree.h (is_redundant_typedef): Remove.
19 * dwarf2out.c (is_redundant_typedef): Turn into static function.
21 2018-08-21 Jan Hubicka <jh@suse.cz>
23 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
26 2018-08-21 Tamar Christina <tamar.christina@arm.com>
28 * expmed.c (extract_low_bits): Reject invalid subregs early.
30 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
33 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
36 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
38 * config/vxworks.h: Guard vxworks_asm_out_constructor and
39 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
40 * config/vxworks.c: Likewise.
42 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
44 * config/vxworks.c: Set targetm.have_ctors_dtors
45 if HAVE_INITFINI_ARRAY_SUPPORT.
46 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
47 if HAVE_INITFINI_ARRAY_SUPPORT.
49 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
51 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
52 default search path for VxWorks < 7.
54 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
56 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
57 (get_format_string): Refer to c_getstr.
59 2018-08-21 Tom de Vries <tdevries@suse.de>
61 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
62 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
63 (debuginfo_early_stop): Declare.
64 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
65 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
66 (debuginfo_early_stop): New function.
67 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
68 and debuginfo_early_stop.
69 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
70 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
71 (general_init): Call debuginfo_early_init.
72 (finalize): Call debuginfo_fini.
73 (do_compile): Call debuginfo_init.
74 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
76 (@item -fdump-debug, @item -fdump-earlydebug): Add.
78 2018-08-21 Tom de Vries <tdevries@suse.de>
80 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
81 flag_dump_noaddr and flag_dump_unnumbered.
83 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
85 * wide-int-range.cc (wide_int_range_abs): New.
86 (wide_int_range_order_set): Rename from wide_int_range_min_max.
87 * wide-int-range.h (wide_int_range_abs): New.
88 (wide_int_range_min_max): New.
89 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
90 case to call wide_int_range_abs.
91 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
92 (extract_range_from_abs_expr): Delete.
94 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
97 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
98 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
101 2018-08-20 Nathan Sidwell <nathan@acm.org>
102 Jeff Law <law@redhat.com>
104 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
105 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
107 2018-08-20 David Malcolm <dmalcolm@redhat.com>
110 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
111 (decl_attributes): Likewise.
112 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
114 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
115 * diagnostic-core.h (class auto_diagnostic_group): New class.
116 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
117 (diagnostic_report_diagnostic): Handle the first diagnostics within
119 (emit_diagnostic): Add auto_diagnostic_group instance.
121 (inform_n): Likewise.
123 (warning_at): Likewise.
124 (warning_n): Likewise.
126 (permerror): Likewise.
129 (error_at): Likewise.
131 (fatal_error): Likewise.
132 (internal_error): Likewise.
133 (internal_error_no_backtrace): Likewise.
134 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
135 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
136 * diagnostic.h (struct diagnostic_context): Add fields
137 "diagnostic_group_nesting_depth",
138 "diagnostic_group_emission_count", "begin_group_cb",
140 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
141 Add auto_diagnostic_group instance(s).
142 (find_explicit_erroneous_behavior): Likewise.
143 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
144 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
145 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
146 (gimplify_va_arg_expr): Likewise.
147 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
148 (HSA_SORRY_AT): Likewise.
149 * ipa-devirt.c (compare_virtual_tables): Likewise.
150 (warn_odr): Likewise.
151 * multiple_target.c (expand_target_clones): Likewise.
152 * opts-common.c (cmdline_handle_error): Likewise.
153 * reginfo.c (globalize_reg): Likewise.
154 * substring-locations.c (format_warning_n_va): Likewise.
155 * tree-inline.c (expand_call_inline): Likewise.
156 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
157 * tree-ssa-loop-niter.c
158 (do_warn_aggressive_loop_optimizations): Likewise.
159 * tree-ssa-uninit.c (warn_uninit): Likewise.
160 * tree.c (warn_deprecated_use): Likewise.
162 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
165 * config/i386/i386.md (eh_return): Always update EH return
166 address in word_mode.
168 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
170 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
171 TARGET_SPLIT_COMPLEX_ARG is defined.
173 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
175 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
177 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
180 * expr.c (expand_assignment): Assert that bitpos is positive.
181 (store_field): Likewise
182 (expand_expr_real_1): Make sure that bitpos is positive.
183 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
186 2018-08-20 Nathan Sidwell <nathan@acm.org>
188 * Makefile.in (CPP_ID_DATA_H): Delete.
189 (CPP_INTERNAL_H): Don't add it.
190 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
191 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
193 2018-08-20 Richard Biener <rguenther@suse.de>
195 PR tree-optimization/78655
196 * tree-vrp.c (extract_range_from_binary_expr_1): Make
197 pointer + offset nonnull if either operand is nonnull work.
199 2018-08-20 Tom de Vries <tdevries@suse.de>
201 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
202 unless the referenced die describes the added property using
203 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
204 Otherwise, add a DW_AT_location to the referenced die.
206 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
209 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
210 register_operand when calling ix86_set_reg_reg_cost.
211 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
212 Set *total to 0 for operands that satisfy x86_64_immediate_operand
213 predicate and to 1 otherwise.
215 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
217 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
218 emit a diagnostic that it is not supported and reset the option.
219 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
220 supported and consume the option. (ASM_FINAL_SPEC): New.
222 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
224 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
227 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
229 C-SKY port: Documentation
231 * doc/extend.texi (C-SKY Function Attributes): New section.
232 * doc/invoke.texi (Option Summary): Add C-SKY options.
233 (C-SKY Options): New section.
234 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
236 2018-08-17 Jojo <jijie_rong@c-sky.com>
237 Huibin Wang <huibin_wang@c-sky.com>
238 Sandra Loosemore <sandra@codesourcery.com>
239 Chung-Lin Tang <cltang@codesourcery.com>
241 C-SKY port: Backend implementation
243 * config/csky/*: New.
244 * common/config/csky/*: New.
246 2018-08-17 Jojo <jijie_rong@c-sky.com>
247 Huibin Wang <huibin_wang@c-sky.com>
248 Sandra Loosemore <sandra@codesourcery.com>
249 Chung-Lin Tang <cltang@codesourcery.com>
250 Andrew Jenner <andrew@codesourcery.com>
252 C-SKY port: Configury
254 * config.gcc (csky-*-*): New.
255 * configure.ac: Add csky to targets for dwarf2 debug_line support.
256 * configure: Regenerated.
258 2018-08-17 David Malcolm <dmalcolm@redhat.com>
260 * dump-context.h: Include "dumpfile.h".
261 (dump_context::dump_printf_va): Convert final param from va_list
262 to va_list *. Convert from ATTRIBUTE_PRINTF to
263 ATTRIBUTE_GCC_DUMP_PRINTF.
264 (dump_context::dump_printf_loc_va): Likewise.
265 * dumpfile.c: Include "stringpool.h".
266 (make_item_for_dump_printf_va): Delete.
267 (make_item_for_dump_printf): Delete.
268 (class dump_pretty_printer): New class.
269 (dump_pretty_printer::dump_pretty_printer): New ctor.
270 (dump_pretty_printer::emit_items): New member function.
271 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
273 (dump_pretty_printer::emit_item): New member function.
274 (dump_pretty_printer::stash_item): New member function.
275 (dump_pretty_printer::format_decoder_cb): New member function.
276 (dump_pretty_printer::decode_format): New member function.
277 (dump_context::dump_printf_va): Reimplement in terms of
279 (dump_context::dump_printf_loc_va): Convert final param from va_list
281 (dump_context::begin_scope): Reimplement call to
282 make_item_for_dump_printf.
283 (dump_printf): Update for change to dump_printf_va.
284 (dump_printf_loc): Likewise.
285 (selftest::test_capture_of_dump_calls): Convert "stmt" from
286 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
288 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
289 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
290 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
291 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
292 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
293 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
294 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
295 within a dump_printf_loc call to "%wu".
296 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
297 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
298 missing space after "=".
299 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
300 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
301 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
302 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
303 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
304 duplicate "vectorized" from message.
306 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
308 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
309 polyNxK_t element's TYPE_STRING_FLAG.
311 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
313 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
314 (they were unnamed before). Fix comments.
316 2018-08-17 Nathan Sidwell <nathan@acm.org>
318 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
320 2018-08-17 Richard Biener <rguenther@suse.de>
322 PR tree-optimization/86841
323 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
325 2018-08-17 Martin Liska <mliska@suse.cz>
327 * common.opt: Remove Warn, Init and Report for options with
328 Ignore/Deprecated flag. Warning is done automatically for
330 * config/i386/i386.opt: Likewise.
331 * config/ia64/ia64.opt: Likewise.
332 * config/rs6000/rs6000.opt: Likewise.
333 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
334 Remove usage of flag_check_pointer_bounds.
335 * lto-wrapper.c (merge_and_complain): Do not handle
336 OPT_fcheck_pointer_bounds.
337 (append_compiler_options): Likewise.
338 * opt-functions.awk: Do not handle Deprecated.
339 * optc-gen.awk: Check that Var, Report and Init are not
340 used for an option with Ignore/Deprecated flag.
341 * opts-common.c (decode_cmdline_option): Do not report
343 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
345 * opts.h (struct cl_option): Remove cl_deprecated flag.
346 (CL_ERR_DEPRECATED): Remove error enum value.
348 2018-08-17 Richard Biener <rguenther@suse.de>
351 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
352 across a va-arg-pack using call adjust its return value accordingly.
354 2018-08-16 Martin Sebor <msebor@redhat.com>
356 PR tree-optimization/86853
357 * gimple-ssa-sprintf.c (struct format_result): Rename member.
358 (struct fmtresult): Add member and initialize it in ctors.
359 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
360 (format_string): Handle %S the same as %ls. Set MAYFAIL.
361 (format_directive): Set POSUNDER4K when MAYFAIL is set.
362 (parse_directive): Handle %C same as %c.
363 (sprintf_dom_walker::compute_format_length): Adjust.
364 (is_call_safe): Adjust.
366 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
368 * builtins.c (c_strlen): Add new parameter eltsize. Use it
369 for determining how to count the elements.
370 * builtins.h (c_strlen): Adjust prototype.
371 * expr.c (string_constant): Add new parameter mem_size.
372 Set *mem_size appropriately.
373 * expr.h (string_constant): Adjust protoype.
374 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
375 * gimple-fold.h (get_range_strlen): Adjust prototype.
376 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
377 (format_string): Call get_string_length with eltsize.
379 2018-08-16 David Malcolm <dmalcolm@redhat.com>
381 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
382 to emit the span, rather than setting it as the prefix.
384 2018-08-16 David Malcolm <dmalcolm@redhat.com>
386 * diagnostic-show-locus.c (layout::start_annotation_line): Add
387 "margin_char" parameter, defaulting to space. Use it in place
388 of pp_space for the initial part of the margin.
389 (layout::print_leading_fixits): Use '+' when filling the margin
390 of line-insertion fix-it hints.
392 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
394 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
397 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
399 * config/rs6000/altivec.md: Don't set length attribute to the default
401 * config/rs6000/darwin.md: Ditto.
402 * config/rs6000/dfp.md: Ditto.
403 * config/rs6000/htm.md: Ditto.
404 * config/rs6000/rs6000.md: Ditto.
405 * config/rs6000/sync.md: Ditto.
406 * config/rs6000/vsx.md: Ditto.
408 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
410 * config/rs6000/altivec.md: Don't set length attribute to the default
411 value, for branch instructions.
412 * config/rs6000/darwin.md: Ditto.
413 * config/rs6000/rs6000.md: Ditto.
415 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
417 * config/rs6000/rs6000.md (length): Always define as const_int 4.
418 (unnamed conditional branch define_insn): Set length to 4 or 8
420 (<bd>_<mode>): Similar, for alternative 0.
421 (<bd>tf_<mode>): Ditto.
423 2018-08-16 Tamar Christina <tamar.christina@arm.com>
425 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
427 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
429 * doc/rtl.texi: Replace old RTX class names with new names.
432 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
434 * expmed.h (canonicalize_comparison): New declaration.
435 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
436 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
437 * optabs.c (prepare_cmp_insn): Likewise.
438 * rtl.h (unsigned_condition_p): New function which checks if a
439 comparison operator is unsigned.
441 2018-08-16 Nathan Sidwell <nathan@acm.org>
443 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
444 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
446 2018-08-16 Tamar Christina <tamar.christina@arm.com>
449 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
450 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
451 (mov<mov>): ..this and enable unconditionally.
453 2018-08-16 Tamar Christina <tamar.christina@arm.com>
455 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
457 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
459 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
460 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
461 "Common" with "Target".
463 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
465 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
466 * doc/invoke.texi (mmitigate-rop): Remove.
467 * config/i386/i386.c: Do not include "regrename.h".
468 (ix86_rop_should_change_byte_p, reg_encoded_number)
469 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
471 (ix86_reorg): Remove call to ix86_mitigate_rop.
472 * config/i386/i386.md (attr "modrm_class"): Remove.
473 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
474 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
475 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
477 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
479 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
480 allow folding of mergeh() and mergel() for the float and double types.
481 (fold_mergehl_helper): Rework to handle building a permute tree
484 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
486 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
489 2018-08-15 David Malcolm <dmalcolm@redhat.com>
491 * common.opt (fdiagnostics-show-labels): New option.
492 * diagnostic-show-locus.c (class layout_range): Add field
494 (class layout): Add field "m_show_labels_p".
495 (layout_range::layout_range): Add param "label" and use it to
497 (make_range): Pass in NULL for new "label" param of layout_range's
499 (layout::layout): Initialize m_show_labels_p.
500 (layout::maybe_add_location_range): Pass in loc_range->m_label
501 when constructing layout_range instances.
502 (struct line_label): New struct.
503 (layout::print_any_labels): New member function.
504 (layout::print_line): Call it if label-printing is enabled.
505 (selftest::test_one_liner_labels): New test.
506 (selftest::test_diagnostic_show_locus_one_liner): Call it.
507 * diagnostic.c (diagnostic_initialize): Initialize
508 context->show_labels_p.
509 * diagnostic.h (struct diagnostic_context): Add field
511 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
512 -fno-diagnostics-show-labels.
513 * dwarf2out.c (gen_producer_string): Add
514 OPT_fdiagnostics_show_labels to the ignored options.
515 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
517 (gcc_rich_location::maybe_add_expr): Likewise.
518 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
519 label" param, defaulting to NULL.
520 (gcc_rich_location::add_expr): Add "label" param.
521 (gcc_rich_location::maybe_add_expr): Likewise.
522 (class text_range_label): New class.
523 (class range_label_for_type_mismatch): New class.
524 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
525 of format_warning_va.
526 (fmtwarn_n): Likewise for new params of format_warning_n_va.
527 * lto-wrapper.c (merge_and_complain): Add
528 OPT_fdiagnostics_show_labels to the "pick one setting" options.
529 (append_compiler_options): Likewise to the dropped options.
530 (append_diag_options): Likewise to the passed-on options.
531 * opts.c (common_handle_option): Handle the new option.
532 * selftest-diagnostic.c
533 (test_diagnostic_context::test_diagnostic_context): Enable
535 * substring-locations.c: Include "gcc-rich-location.h".
536 (format_warning_n_va): Add "fmt_label" and "param_label" params
537 and use them as appropriate.
538 (format_warning_va): Add "fmt_label" and "param_label" params,
539 passing them on to format_warning_n_va.
540 (format_warning_at_substring): Likewise.
541 (format_warning_at_substring_n): Likewise.
542 * substring-locations.h (format_warning_va): Add "fmt_label" and
543 "param_label" params.
544 (format_warning_n_va): Likewise.
545 (format_warning_at_substring): Likewise.
546 (format_warning_at_substring_n): Likewise.
547 * toplev.c (general_init): Initialize global_dc->show_labels_p.
549 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
552 * builtins.c (expand_builtin_memcmp): Do not expand the call
553 when overflow is detected.
555 2018-08-15 Martin Sebor <msebor@redhat.com>
557 PR tree-optimization/71625
558 * config/aarch64/aarch64-builtins.c
559 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
561 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
563 * config/s390/s390.c (s390_reorg): Remove loop.
565 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
568 (darwin_function_switched_text_sections): Delete.
569 * gcc/config/darwin.h
570 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
572 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
575 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
576 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
577 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
579 2018-08-15 Martin Liska <mliska@suse.cz>
581 PR tree-optimization/86925
582 * predict.c (expr_expected_value_1): When taking
583 later predictor, assign also probability.
584 Use fold_build2_initializer_loc in order to fold
585 the expression in -frounding-math.
587 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
589 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
591 (expand_vec_perm_1): Try the new method.
593 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
596 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
597 Check whether lra_live_max_point is 0 before dividing.
599 2018-08-14 Martin Sebor <msebor@redhat.com>
601 PR tree-optimization/86650
602 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
603 (vrp_prop::check_mem_ref): Same.
605 2018-08-13 Liu Hao <lh_mouse@126.com>
607 * pretty-print.c (eat_esc_sequence): Swap the foreground and
608 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
609 and clear it thereafter, as it only works for DBCS.
611 2018-08-13 Liu Hao <lh_mouse@126.com>
613 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
614 handle returned by _get_osf_handle().
616 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
618 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
619 for folding vec_perm.
621 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
623 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
624 Add support for gimple-folding of vec_pack() and vec_unpack()
627 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
629 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
630 vec_xst variants to the list.
631 (rs6000_gimple_fold_builtin): Add support for folding unaligned
632 vector loads and stores.
634 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
636 * config.gcc (rs6000-ibm-aix4.x): Delete.
637 (rs6000-ibm-aix5.1): Delete.
638 (rs6000-ibm-aix5.2): Delete.
639 (rs6000-ibm-aix5.3): Delete.
640 * config/rs6000/aix43.h: Delete.
641 * config/rs6000/aix51.h: Delete.
642 * config/rs6000/aix52.h: Delete.
643 * config/rs6000/t-aix43: Delete.
645 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
647 * config/s390/s390.c (s390_decompose_constant_pool_ref):
649 (s390_decompose_address): Factor out constant pool ref
652 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
654 * config/nds32/nds32-predicates.c
655 (nds32_can_use_bclr_p): Change return type as bool.
656 (nds32_can_use_bset_p): Ditto.
657 (nds32_can_use_btgl_p): Ditto.
658 (nds32_can_use_bitci_p): Ditto.
659 * config/nds32/nds32-protos.h
660 (nds32_can_use_bclr_p): Change declaration.
661 (nds32_can_use_bset_p): Ditto.
662 (nds32_can_use_btgl_p): Ditto.
663 (nds32_can_use_bitci_p): Ditto.
665 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
667 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
668 Support -msched-prolog-epilog option.
669 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
671 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
673 * common/config/nds32/nds32-common.c
674 (nds32_option_optimization_table): Enalbe -malways-align.
676 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
678 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
680 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
681 OPT_misr_secure_ case.
682 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
683 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
684 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
686 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
687 (nds32_isr_info): New field security_level.
688 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
689 * config/nds32/nds32.md (return_internal): Consider critical attribute.
690 * config/nds32/nds32.opt (misr-secure): New option.
691 * config/nds32/nds32_init.inc: New file.
692 * config/nds32/nds32_isr.h: New file.
694 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
696 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
697 Update comment for atomic instructions.
698 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
699 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
701 (atomic_loaddi): Revise fence expansion to only emit fence prior to
702 load for __ATOMIC_SEQ_CST model.
703 (atomic_loaddi_1): Remove float register target.
704 (atomic_storedi): Handle CONST_INT values.
705 (atomic_storedi_1): Remove float register source. Add special case
707 (memory_barrier): New expander and insn.
709 2018-08-11 Jakub Jelinek <jakub@redhat.com>
711 PR tree-optimization/86835
712 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
713 new_stmt after def_gsi, make sure to insert new_square_stmt after
714 that stmt, not 2 stmts before it.
716 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
719 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
722 2018-08-10 Martin Liska <mliska@suse.cz>
725 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
727 * builtins.c (expand_builtin_expect_with_probability):
729 (expand_builtin_expect_with_probability): New function.
730 (build_builtin_expect_predicate): Add new argumnet probability
731 for BUILT_IN_EXPECT_WITH_PROBABILITY.
732 (fold_builtin_expect):
735 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
736 * builtins.h (fold_builtin_expect): Set new argument.
737 * doc/extend.texi: Document __builtin_expect_with_probability.
738 * doc/invoke.texi: Likewise.
739 * gimple-fold.c (gimple_fold_call): Pass new argument.
740 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
741 also BUILT_IN_EXPECT_WITH_PROBABILITY.
742 * predict.c (get_predictor_value): New function.
743 (expr_expected_value): Add new argument probability. Assume
744 that predictor and probability are always non-null.
745 (expr_expected_value_1): Likewise. For __builtin_expect and
746 __builtin_expect_with_probability set probability. Handle
747 combination in binary expressions.
748 (tree_predict_by_opcode): Simplify code by simply calling
750 (pass_strip_predict_hints::execute): Add handling of
751 BUILT_IN_EXPECT_WITH_PROBABILITY.
752 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
754 * tree.h (DECL_BUILT_IN_P): New function.
756 2018-08-10 Martin Liska <mliska@suse.cz>
758 PR tree-optimization/85799
759 * passes.def: Add argument for pass_strip_predict_hints.
760 * predict.c (class pass_strip_predict_hints): Add new argument
762 (strip_predictor_early): New function.
763 (pass_strip_predict_hints::execute): Call the function to
765 (strip_predict_hints): New function.
766 * predict.def: Fix comment.
768 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
770 * Makefile.in: Clarify which tm.texi to copy over to assert the
771 right to grant a GFDL license for all.
773 2018-08-09 Jeff Law <law@redhat.com>
775 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
778 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
780 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
783 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
785 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
786 reductions for variable-length vectors.
788 2018-08-09 David Malcolm <dmalcolm@redhat.com>
791 * common.opt (fdiagnostics-show-line-numbers): New option.
792 * diagnostic-show-locus.c (class layout): Add fields
793 "m_show_line_numbers_p" and "m_linenum_width";
794 (num_digits): New function.
795 (test_num_digits): New function.
796 (layout::layout): Initialize new fields. Update m_x_offset
797 logic to handle any left margin.
798 (layout::print_source_line): Print line number when requested.
799 (layout::start_annotation_line): New member function.
800 (layout::print_annotation_line): Call it.
801 (layout::print_leading_fixits): Likewise.
802 (layout::print_trailing_fixits): Likewise. Update calls to
803 move_to_column for new parameter.
804 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
805 it to potentially call start_annotation_line.
806 (layout::show_ruler): Call start_annotation_line.
807 (selftest::test_line_numbers_multiline_range): New selftest.
808 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
809 and selftest::test_line_numbers_multiline_range.
810 * diagnostic.c (diagnostic_initialize): Initialize
812 * diagnostic.h (struct diagnostic_context): Add field
813 "show_line_numbers_p".
814 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
815 -fno-diagnostics-show-line-numbers.
816 * dwarf2out.c (gen_producer_string): Add
817 OPT_fdiagnostics_show_line_numbers to the ignored options.
818 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
819 one setting" options.
820 (append_compiler_options): Likewise to the dropped options.
821 (append_diag_options): Likewise to the passed-on options.
822 * opts.c (common_handle_option): Handle the new option.
823 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
825 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
827 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
828 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
829 third argument of type "const signed char" to descriptions of
830 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
831 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
832 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
833 __builtin_bcdsub_ov functions.
835 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
837 PR tree-optimization/86858
838 * tree-vect-loop.c (vect_is_simple_reduction): Restore
839 flow_bb_inside_loop_p calls.
841 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
843 PR tree-optimization/86871
844 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
845 instead of gimple_assign_lhs.
847 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
850 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
851 register constraint to operand 0.
852 (add<mode>3_carryinC): Likewise.
853 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
855 2018-08-09 Martin Liska <mliska@suse.cz>
858 * common.opt: Remove extra line.
860 2018-08-09 Martin Liska <mliska@suse.cz>
862 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
863 at the end of a line, make first letter capital and end up
864 a sentence with a dot.
865 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
866 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
867 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
868 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
869 (PARAM_MAX_ISL_OPERATIONS): Likewise.
870 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
871 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
872 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
873 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
874 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
875 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
876 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
877 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
878 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
879 (PARAM_TREE_REASSOC_WIDTH): Likewise.
880 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
881 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
882 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
884 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
887 * config/s390/s390.c (s390_option_override_internal): Reduce the
888 stack-clash-protection-probe-interval param if it would be too big
891 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
894 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
895 * config/m68k/m68k.c (handle_move_double): Don't call
896 m68k_final_prescan_insn.
897 (m68k_adjust_decorated_operand): Renamed from
898 m68k_final_prescan_insn, remove first and third operand and
900 (print_operand): Call it.
901 (print_operand_address): Call it.
903 2018-08-08 Nathan Sidwell <nathan@acm.org>
905 * diagnostic.c (diagnostic_report_current_module): Use
906 linemap_included_from & linemap_included_from_linemap.
908 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
910 * config/aarch64/aarch64-cores.def: Add phecda core.
911 * config/aarch64/aarch64-tune.md: Regenerate.
912 * doc/invoke.texi: Add phecda core.
914 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
917 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
919 * config/s390/s390.md ("movti"): Add more alternatives for
920 constant to GPR copies.
922 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
924 * config/s390/s390.c: Fix whitespace damage throughout the file.
925 * config/s390/s390.h: Likewise.
926 * config/s390/tpf.h: Likewise.
928 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
930 * config/s390/s390.c (s390_loadrelative_operand_p):
931 Remove TARGET_CPU_ZARCH usages.
932 (s390_rtx_costs): Likewise.
933 (s390_legitimate_constant_p): Likewise.
934 (s390_cannot_force_const_mem): Likewise.
935 (legitimate_reload_constant_p): Likewise.
936 (s390_preferred_reload_class): Likewise.
937 (legitimize_pic_address): Likewise.
938 (legitimize_tls_address): Likewise.
939 (s390_split_branches): Removed.
940 (s390_add_execute): Removed.
941 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
942 (s390_mainpool_start): Likewise.
943 (s390_mainpool_finish): Likewise.
944 (s390_mainpool_cancel): Removed.
945 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
946 (s390_chunkify_cancel): Likewise.
947 (s390_return_addr_rtx): Likewise.
948 (s390_register_info): Remove split_branches_pending_p uages.
949 (s390_optimize_register_info): Likewise.
950 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
951 split_branches_pending_p usages.
952 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
953 (s390_load_got): Likewise.
954 (s390_expand_split_stack_prologue): Likewise.
955 (output_asm_nops): Likewise.
956 (s390_function_profiler): Likewise.
957 (s390_emit_call): Likewise.
958 (s390_conditional_register_usage): Likewise.
959 (s390_optimize_prologue): Likewise.
960 (s390_reorg): Remove TARGET_CPU_ZARCH and
961 split_branches_pending_p usages.
962 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
964 (s390_output_indirect_thunk_function): Likewise.
965 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
966 (TARGET_CPU_ZARCH_P): Removed.
967 (struct machine_function): Remove split_branches_pending_p.
968 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
970 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
972 * common/config/s390/s390-common.c (processor_flags_table):
974 * config.gcc: Remove with_arch/with_tune support.
975 * config/s390/2064.md: Remove cpu attribute comparisons.
976 * config/s390/driver-native.c (s390_host_detect_local_cpu):
978 * config/s390/linux.h (ASM_SPEC):
979 Remove -march support.
980 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
981 Use a table to get an arch level.
982 * config/s390/s390-opts.h (enum processor_type):
985 (processor_table): Remove entries, add arch_level values.
986 (s390_issue_rate): Remove cases.
987 (s390_option_override): Adjust
988 s390_option_override_internal() call.
989 (s390_option_override_internal): Remove deprecation warning.
990 (s390_valid_target_attribute_tree): Adjust
991 s390_option_override_internal() call.
992 * config/s390/s390.h (struct s390_processor):
993 Share with s390-c.c, add arch_level field.
994 * config/s390/s390.md:
995 Remove occurrences in cpu attribute.
996 * config/s390/s390.opt: Remove -march/-mtune support.
997 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
998 * doc/invoke.texi: Remove deprecation warning.
1000 2018-08-08 Luis Machado <luis.machado@linaro.org>
1002 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1004 (qdf24xx_tunings): Set vector cost structure to
1005 qdf24xx_vector_cost.
1007 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1008 <register_sextend>: Set to 3.
1010 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1013 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1014 * config/aarch64/aarch64-simd.md
1015 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1016 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1017 (aarch64_frecpx<mode>): ...this new pattern.
1018 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1019 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1021 2018-08-07 Martin Liska <mliska@suse.cz>
1024 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1025 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1026 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1027 * doc/extend.texi: Document that malloc attribute adds
1030 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1033 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1034 Define to speculation_safe_value_not_needed.
1036 2018-08-06 Jeff Law <law@redhat.com>
1038 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1039 the vr_values instance to cprop_into_stmt.
1040 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1041 (cprop_operand): Also query EVRP to determine if OP is a constant.
1043 2018-08-06 Nathan Sidwell <nathan@acm.org>
1045 * diagnostic.c (diagnostic_report_current_module): Reroll
1046 included-at loop. Translate text.
1048 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1050 * function-tests.c (selftest::test_expansion_to_rtl): Call
1051 free_after_compilation.
1053 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1055 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1057 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1059 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1060 loops with memory block operations from getting unrolled.
1062 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1065 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1066 Define to speculation_safe_value_not_needed.
1068 2018-08-06 Jeff Law <law@redhat.com>
1070 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1073 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1076 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1077 with all enabled __intN types.
1079 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1081 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1083 * alias.c (record_set): Check for clobber high.
1084 * cfgexpand.c (expand_gimple_stmt): Likewise.
1085 * combine-stack-adj.c (single_set_for_csa): Likewise.
1086 * combine.c (find_single_use_1): Likewise.
1087 (set_nonzero_bits_and_sign_copies): Likewise.
1088 (get_combine_src_dest): Likewise.
1089 (is_parallel_of_n_reg_sets): Likewise.
1090 (try_combine): Likewise.
1091 (record_dead_and_set_regs_1): Likewise.
1092 (reg_dead_at_p_1): Likewise.
1093 (reg_dead_at_p): Likewise.
1094 * dce.c (deletable_insn_p): Likewise.
1095 (mark_nonreg_stores_1): Likewise.
1096 (mark_nonreg_stores_2): Likewise.
1097 * df-scan.c (df_find_hard_reg_defs): Likewise.
1098 (df_uses_record): Likewise.
1099 (df_get_call_refs): Likewise.
1100 * dwarf2out.c (mem_loc_descriptor): Likewise.
1101 * haifa-sched.c (haifa_classify_rtx): Likewise.
1102 * ira-build.c (create_insn_allocnos): Likewise.
1103 * ira-costs.c (scan_one_insn): Likewise.
1104 * ira.c (equiv_init_movable_p): Likewise.
1105 (rtx_moveable_p): Likewise.
1106 (interesting_dest_for_shprep): Likewise.
1107 * jump.c (mark_jump_label_1): Likewise.
1108 * postreload-gcse.c (record_opr_changes): Likewise.
1109 * postreload.c (reload_cse_simplify): Likewise.
1110 (struct reg_use): Add source expr.
1111 (reload_combine): Check for clobber high.
1112 (reload_combine_note_use): Likewise.
1113 (reload_cse_move2add): Likewise.
1114 (move2add_note_store): Likewise.
1115 * print-rtl.c (print_pattern): Likewise.
1116 * recog.c (decode_asm_operands): Likewise.
1117 (store_data_bypass_p): Likewise.
1118 (if_test_bypass_p): Likewise.
1119 * regcprop.c (kill_clobbered_value): Likewise.
1120 (kill_set_value): Likewise.
1121 * reginfo.c (reg_scan_mark_refs): Likewise.
1122 * reload1.c (maybe_fix_stack_asms): Likewise.
1123 (eliminate_regs_1): Likewise.
1124 (elimination_effects): Likewise.
1125 (mark_not_eliminable): Likewise.
1126 (scan_paradoxical_subregs): Likewise.
1127 (forget_old_reloads_1): Likewise.
1128 * reorg.c (find_end_label): Likewise.
1129 (try_merge_delay_insns): Likewise.
1130 (redundant_insn): Likewise.
1131 (own_thread_p): Likewise.
1132 (fill_simple_delay_slots): Likewise.
1133 (fill_slots_from_thread): Likewise.
1134 (dbr_schedule): Likewise.
1135 * resource.c (update_live_status): Likewise.
1136 (mark_referenced_resources): Likewise.
1137 (mark_set_resources): Likewise.
1138 * rtl.c (copy_rtx): Likewise.
1139 * rtlanal.c (reg_referenced_p): Likewise.
1140 (single_set_2): Likewise.
1141 (noop_move_p): Likewise.
1142 (note_stores): Likewise.
1143 * sched-deps.c (sched_analyze_reg): Likewise.
1144 (sched_analyze_insn): Likewise.
1146 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1148 * cse.c (invalidate_reg): New function extracted from...
1149 (invalidate): ...here.
1150 (canonicalize_insn): Check for clobber high.
1151 (invalidate_from_clobbers): invalidate clobber highs.
1152 (invalidate_from_sets_and_clobbers): Likewise.
1153 (count_reg_usage): Check for clobber high.
1154 (insn_live_p): Likewise.
1155 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1156 (cselib_invalidate_regno): Check for clobber in setter.
1157 (cselib_invalidate_rtx): Pass through setter.
1158 (cselib_invalidate_rtx_note_stores):
1159 (cselib_process_insn): Check for clobber high.
1160 * cselib.h (cselib_invalidate_rtx): Add operand.
1162 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1164 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1165 (mark_not_eliminable): Likewise.
1166 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1167 * lra-lives.c (process_bb_lives): Check for clobber high.
1168 * lra.c (new_insn_reg): Remember clobber highs.
1169 (collect_non_operand_hard_regs): Check for clobber high.
1170 (lra_set_insn_recog_data): Likewise.
1171 (add_regs_to_insn_regno_info): Likewise.
1172 (lra_update_insn_regno_info): Likewise.
1174 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1176 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1177 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1179 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1181 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1182 (copy_insn_1): Likewise.
1183 (gen_hard_reg_clobber_high): New gen function.
1184 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1185 * genemit.c (gen_exp): Likewise.
1186 (gen_emit_seq): Pass through info.
1187 (gen_insn): Check for CLOBBER_HIGH.
1188 (gen_expand): Pass through info.
1189 (gen_split): Likewise.
1190 (output_add_clobbers): Likewise.
1191 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1192 (remove_clobbers): Likewise.
1193 * rtl.h (gen_hard_reg_clobber_high): New declaration.
1195 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1197 * doc/rtl.texi (clobber_high): Add.
1198 (parallel): Add in clobber high
1199 * rtl.c (rtl_check_failed_code3): Add function.
1200 * rtl.def (CLOBBER_HIGH): Add expression.
1201 * rtl.h (RTL_CHECKC3): Add macro.
1202 (rtl_check_failed_code3): Add declaration.
1203 (XC3EXP): Add macro.
1205 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
1208 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1209 cfun->machine->max_used_stack_alignment if needed.
1211 2018-08-04 Martin Sebor <msebor@redhat.com>
1213 PR tree-optimization/86571
1214 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1217 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
1220 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1223 2018-08-03 Jeff Law <law@redhat.com>
1226 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1227 Define to speculation_safe_value_not_needed.
1229 2018-08-03 David Malcolm <dmalcolm@redhat.com>
1231 * doc/gcov.texi (-x): Remove duplicate "to".
1232 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1233 (-Wif-not-aligned): Remove duplicate "is".
1234 (-flto): Remove duplicate "the".
1235 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1236 duplicate "v5.00.b".
1237 (MSP430 Options): Remove duplicate "and" from the description
1238 of "-mgprel-sec=regexp".
1239 (x86 Options): Remove duplicate copies of "vmldLog102" and
1240 vmlsLog104 from description of "-mveclibabi=type".
1242 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
1244 * internal-fn.h (first_commutative_argument): Declare.
1245 * internal-fn.c (first_commutative_argument): New function.
1246 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1247 restrictions for pattern statements. Use first_commutative_argument
1248 to look for commutative operands in calls to internal functions.
1250 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
1252 * Makefile.in (wide-int-range.o): New.
1253 * tree-vrp.c: Move all the wide_int_* functions to...
1254 * wide-int-range.cc: ...here.
1255 * tree-vrp.h: Move all the wide_int_* prototypes to...
1256 * wide-int-range.h: ...here.
1258 2018-08-03 Tom de Vries <tdevries@suse.de>
1260 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1262 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1263 * except.c (output_function_exception_table): Do early exit if
1264 targetm_common.except_unwind_info (&global_options) == UI_NONE.
1266 2018-08-03 Martin Liska <mliska@suse.cz>
1268 * predict.c (dump_prediction): Change to 2 digits
1271 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
1273 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1275 (falkor_am_1_gtov_gtov): ... a new insn reservation.
1277 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
1279 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1280 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1281 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1282 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1283 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1285 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1287 * diagnostic-show-locus.c (diagnostic_show_locus): Use
1288 pp_take_prefix when saving the existing prefix.
1289 * diagnostic.c (diagnostic_append_note): Likewise.
1290 * langhooks.c (lhd_print_error_function): Likewise.
1291 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1292 param's type. Free the existing prefix.
1293 (pp_take_prefix): New function.
1294 (pretty_printer::pretty_printer): Drop the prefix parameter.
1295 Rename the length parameter to match the comment.
1296 (pretty_printer::~pretty_printer): Free the prefix.
1297 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1299 (struct pretty_printer): Drop the "const" from "prefix" field's
1300 type and clarify memory management.
1301 (pp_set_prefix): Drop the "const" from the 2nd param.
1302 (pp_take_prefix): New decl.
1304 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1306 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1307 for word_mode_ok here instead of passing as argument.
1308 (expand_block_compare): Change select_block_compare_mode() call.
1309 (expand_strncmp_gpr_sequence): New function.
1310 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1312 2018-08-02 Jeff Law <law@redhat.com>
1315 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1316 Define to speculation_safe_value_not_needed.
1319 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1320 Define to speculation_safe_value_not_needed.
1322 2018-08-02 Tom de Vries <tdevries@suse.de>
1325 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1326 function. Return UI_TARGET unconditionally.
1327 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1328 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1330 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1332 * genemit.c (print_overload_test): Fix typo.
1334 2018-08-02 Richard Biener <rguenther@suse.de>
1336 PR tree-optimization/86816
1337 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1338 which checks for value availability before querying it.
1339 (gvn_uses_equal): Use it.
1340 (same_succ_hash): Likewise.
1341 (gimple_equal_p): Likewise.
1343 2018-08-02 Nick Clifton <nickc@redhat.com>
1346 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1347 Define to speculation_safe_value_not_needed.
1350 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1351 Define to speculation_safe_value_not_needed.
1354 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1355 Define to speculation_safe_value_not_needed.
1358 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1359 Define to speculation_safe_value_not_needed.
1362 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1363 Define to speculation_safe_value_not_needed.
1366 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1367 Define to speculation_safe_value_not_needed.
1370 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1371 Define to speculation_safe_value_not_needed.
1374 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1375 Define to speculation_safe_value_not_needed.
1378 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1379 speculation_safe_value_not_needed.
1382 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1383 to speculation_safe_value_not_needed.
1385 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1387 * doc/md.texi: Expand the documentation of instruction names
1388 to mention port-local uses. Document '@' in pattern names.
1389 * read-md.h (overloaded_instance, overloaded_name): New structs.
1391 (md_reader::handle_overloaded_name): New member function.
1392 (md_reader::get_overloads): Likewise.
1393 (md_reader::m_first_overload): New member variable.
1394 (md_reader::m_next_overload_ptr): Likewise.
1395 (md_reader::m_overloads_htab): Likewise.
1396 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1397 m_next_overload_ptr and m_overloads_htab.
1398 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1399 (get_mode_token, get_code_token, get_int_token): New functions.
1400 (map_attr_string): Add an optional argument that passes back
1401 the associated iterator.
1402 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1403 (md_reader::handle_overloaded_name, add_overload_instance): New
1405 (apply_iterators): Handle '@' names. Report an error if '@'
1406 is used without iterators.
1407 (initialize_iterators): Initialize the new iterator_group fields.
1408 * genopinit.c (handle_overloaded_code_for)
1409 (handle_overloaded_gen): New functions.
1410 (main): Use them to print declarations of maybe_code_for_* and
1411 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1412 * genemit.c (print_overload_arguments, print_overload_test)
1413 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1414 (main): Use it to print definitions of maybe_code_for_* and
1415 maybe_gen_* functions.
1416 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1417 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1418 instead of explicit mode checks.
1419 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1420 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1421 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1422 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1423 (aarch64_expand_compare_and_swap): Likewise
1424 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1425 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1426 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1427 (aarch64_constant_pool_reload_icode): Delete.
1428 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1429 instead of aarch64_constant_pool_reload_icode. Use
1430 code_for_aarch64_reload_mov instead of explicit mode checks.
1431 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1432 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1433 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1434 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1435 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1436 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1437 (aarch64_atomic_load_op_code): Delete.
1438 (aarch64_emit_atomic_load_op): Likewise.
1439 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1440 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
1441 instead of aarch64_emit_atomic_load_op.
1442 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1443 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1444 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1445 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1446 character before the pattern name.
1447 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1448 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1449 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1450 (aarch64_frecps<mode>): Likewise.
1451 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1452 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1453 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1454 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1455 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1457 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1459 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1460 Allow HFmode constants if TARGET_FP_F16INST.
1462 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
1465 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1466 No longer check last store for clobber of address register.
1468 2018-08-02 Martin Liska <mliska@suse.cz>
1470 PR gcov-profile/86817
1471 * gcov.c (process_all_functions): New function.
1473 (process_file): Move functions processing to
1474 process_all_functions.
1476 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1478 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1479 "const" to the "gimple *" and "rtx_insn *" parameters.
1480 * dumpfile.h (dump_user_location_t::dump_user_location_t):
1482 (dump_location_t::dump_location_t): Likewise.
1484 2018-08-01 Martin Sebor <msebor@redhat.com>
1486 PR tree-optimization/86650
1487 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1488 rather than a "gcall *". Directly pass the data of interest
1489 to percent_K_format, rather than building a temporary CALL_EXPR
1491 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1492 (gimple_fold_builtin_strncat): Adjust.
1493 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1494 gcall* argument with gimple*.
1495 * gimple-ssa-warn-restrict.c (check_call): Same.
1496 (wrestrict_dom_walker::before_dom_children): Same.
1497 (builtin_access::builtin_access): Same.
1498 (check_bounds_or_overlap): Same
1499 (maybe_diag_overlap): Same.
1500 (maybe_diag_offset_bounds): Same.
1501 * tree-diagnostic.c (default_tree_printer): Move usage of
1502 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1504 * tree-pretty-print.c (percent_K_format): Add argument.
1505 * tree-pretty-print.h: Add argument.
1506 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1507 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1508 (maybe_diag_stxncpy_trunc): Same.
1509 (handle_builtin_stxncpy): Same.
1510 (handle_builtin_strcat): Same.
1512 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1514 * match.pd: Optimise pointer range checks.
1516 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1518 PR tree-optimization/86758
1519 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1520 to remove pattern statements.
1522 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1524 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1525 result of dfs_enumerate_from when constructing stmt_vec_infos,
1526 instead of additionally calling get_loop_body.
1528 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1530 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1532 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1533 When creating an iv, assert that the step is not known to be zero.
1534 (vect_setup_realignment): Update call accordingly.
1535 * tree-vect-stmts.c (vectorizable_store): Likewise.
1536 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
1538 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1540 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1541 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1542 (vectorizable_reduction): Likewise.
1543 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1544 (vect_detect_hybrid_slp_stmts): Likewise.
1545 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1547 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
1549 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1550 (wide_int_set_zero_nonzero_bits): ...this.
1551 (zero_nonzero_bits_from_vr): Rename to...
1552 (vrp_set_zero_nonzero_bits): ...this.
1553 (extract_range_from_multiplicative_op_1): Abstract wide int
1555 (wide_int_range_multiplicative_op): ...here.
1556 (extract_range_from_binary_expr_1): Extract wide int binary
1557 operations into their own functions.
1558 (wide_int_range_lshift): New.
1559 (wide_int_range_can_optimize_bit_op): New.
1560 (wide_int_range_shift_undefined_p): New.
1561 (wide_int_range_bit_xor): New.
1562 (wide_int_range_bit_ior): New.
1563 (wide_int_range_bit_and): New.
1564 (wide_int_range_trunc_mod): New.
1565 (extract_range_into_wide_ints): New.
1566 (vrp_shift_undefined_p): New.
1567 (extract_range_from_multiplicative_op): New.
1568 (vrp_can_optimize_bit_op): New.
1569 * tree-vrp.h (value_range::dump): New.
1570 (wide_int_range_multiplicative_op): New.
1571 (wide_int_range_lshift):New.
1572 (wide_int_range_shift_undefined_p): New.
1573 (wide_int_range_bit_xor): New.
1574 (wide_int_range_bit_ior): New.
1575 (wide_int_range_bit_and): New.
1576 (wide_int_range_trunc_mod): New.
1577 (zero_nonzero_bits_from_bounds): Rename to...
1578 (wide_int_set_zero_nonzero_bits): ...this.
1579 (zero_nonzero_bits_from_vr): Rename to...
1580 (vrp_set_zero_nonzero_bits): ...this.
1581 (range_easy_mask_min_max): Rename to...
1582 (wide_int_range_can_optimize_bit_op): this.
1583 * vr-values.c (simplify_bit_ops_using_ranges): Rename
1584 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1586 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1588 * tree-vectorizer.h (vect_orig_stmt): New function.
1589 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1590 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1591 (vect_create_epilog_for_reduction): Likewise.
1592 (vectorizable_live_operation): Likewise.
1593 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1594 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1595 * tree-vect-stmts.c (vectorizable_call): Likewise.
1596 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1598 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1600 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1602 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1603 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1604 (vect_transform_loop): Likewise.
1605 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1607 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1609 * tree-vectorizer.h (vect_schedule_slp): Return void.
1610 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1611 (vect_schedule_slp): Likewise.
1613 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1615 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1617 (vect_transform_loop): Update calls accordingly. Schedule SLP
1618 instances before the main loop, if any exist.
1620 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1622 PR tree-optimization/86749
1623 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1624 If the lhs is used in a COND_EXPR, check that it is being used
1625 as the "then" or "else" value.
1627 2018-08-01 Tom de Vries <tdevries@suse.de>
1630 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1631 speculation_safe_value_not_needed.
1633 2018-08-01 Richard Biener <rguenther@suse.de>
1635 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1638 2018-08-01 Martin Liska <mliska@suse.cz>
1640 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1641 format how successful transformation is dumped.
1642 (gimple_mod_pow2_value_transform): Likewise.
1643 (gimple_mod_subtract_transform): Likewise.
1644 (gimple_stringops_transform): Likewise.
1646 2018-08-01 Martin Liska <mliska@suse.cz>
1649 * value-prof.c (interesting_stringop_to_profile_p):
1650 Simplify the code and add BUILT_IN_MEMMOVE.
1651 (gimple_stringops_transform): Likewise.
1653 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
1655 * config/aarch64/aarch64-simd.md
1656 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1657 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1658 use GPI iterator instead of SI mode.
1660 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
1662 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1663 rs6000_speculation_barrier.
1664 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1665 new barrier pattern name.
1667 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
1669 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1670 (speculation_barrier): New insn.
1672 2018-08-01 Richard Biener <rguenther@suse.de>
1675 * graphite.h: Include isl/id.h and isl/space.h to allow build
1678 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
1681 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1682 mode for COFF targets.
1683 * defaults.h (TARGET_COFF): Define.
1684 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1685 TARGET_COFF): Define.
1686 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1687 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1688 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1690 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1692 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1693 * gimple-streamer-out.c (output_bb): Save it.
1694 * lto-streamer-in.c (input_struct_function_base): Restore
1695 instance discriminator if available. Create map on demand.
1696 * lto-streamer-out.c (output_struct_function_base): Save it if
1698 * final.c (decl_to_instance_map): Document LTO strategy.
1700 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1701 Olivier Hainque <hainque@adacore.com>
1703 * debug.h (decl_to_instance_map_t): New type.
1704 (decl_to_instance_map): Declare.
1705 (maybe_create_decl_to_instance_map): New inline function.
1706 * final.c (bb_discriminator, last_bb_discriminator): New statics,
1707 to track basic block discriminators.
1708 (final_start_function_1): Initialize them.
1709 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1711 (decl_to_instance_map): New variable.
1712 (map_decl_to_instance, maybe_set_discriminator): New functions.
1713 (notice_source_line): Set discriminator.
1715 2018-07-31 Ian Lance Taylor <iant@golang.org>
1717 * targhooks.c (default_have_speculation_safe_value): Add
1720 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1722 * dump-context.h: Include "pretty-print.h".
1723 (dump_context::refresh_dumps_are_enabled): New decl.
1724 (dump_context::emit_item): New decl.
1725 (class dump_context): Add fields "m_test_pp" and
1727 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1728 (temp_dump_context::get_dumped_text): New decl.
1729 (class temp_dump_context): Add field "m_pp".
1730 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1731 (dump_context::refresh_dumps_are_enabled): ...and add a test for
1733 (set_dump_file): Update for above change.
1734 (set_alt_dump_file): Likewise.
1735 (dump_loc): New overload, taking a pretty_printer *.
1736 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
1737 to any test pretty-printer.
1738 (make_item_for_dump_gimple_stmt): New function, adapted from
1739 optinfo::add_gimple_stmt.
1740 (dump_context::dump_gimple_stmt): Call it, and use the result,
1741 eliminating the direct usage of dump_file and alt_dump_file in
1742 favor of indirectly using them via emit_item.
1743 (make_item_for_dump_gimple_expr): New function, adapted from
1744 optinfo::add_gimple_expr.
1745 (dump_context::dump_gimple_expr): Call it, and use the result,
1746 eliminating the direct usage of dump_file and alt_dump_file in
1747 favor of indirectly using them via emit_item.
1748 (make_item_for_dump_generic_expr): New function, adapted from
1750 (dump_context::dump_generic_expr): Call it, and use the result,
1751 eliminating the direct usage of dump_file and alt_dump_file in
1752 favor of indirectly using them via emit_item.
1753 (make_item_for_dump_printf_va): New function, adapted from
1754 optinfo::add_printf_va.
1755 (make_item_for_dump_printf): New function.
1756 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1757 and use the result, eliminating the direct usage of dump_file and
1758 alt_dump_file in favor of indirectly using them via emit_item.
1759 (make_item_for_dump_dec): New function.
1760 (dump_context::dump_dec): Call it, and use the result,
1761 eliminating the direct usage of dump_file and alt_dump_file in
1762 favor of indirectly using them via emit_item.
1763 (make_item_for_dump_symtab_node): New function, adapted from
1764 optinfo::add_symtab_node.
1765 (dump_context::dump_symtab_node): Call it, and use the result,
1766 eliminating the direct usage of dump_file and alt_dump_file in
1767 favor of indirectly using them via emit_item.
1768 (dump_context::begin_scope): Reimplement, avoiding direct usage
1769 of dump_file and alt_dump_file in favor of indirectly using them
1771 (dump_context::emit_item): New member function.
1772 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1773 Set up test pretty-printer on the underlying context. Call
1774 refresh_dumps_are_enabled.
1775 (temp_dump_context::~temp_dump_context): Call
1776 refresh_dumps_are_enabled.
1777 (temp_dump_context::get_dumped_text): New member function.
1778 (selftest::verify_dumped_text): New function.
1779 (ASSERT_DUMPED_TEXT_EQ): New macro.
1780 (selftest::test_capture_of_dump_calls): Run all tests twice, with
1781 and then without optinfo enabled. Add uses of
1782 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
1783 * dumpfile.h: Update comment for the dump_* API.
1784 * optinfo-emit-json.cc
1785 (selftest::test_building_json_from_dump_calls): Update for new
1786 param for temp_dump_context ctor.
1787 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1788 and "m_owned" field.
1789 (optinfo_item::~optinfo_item): Likewise.
1790 (optinfo::add_item): New member function.
1791 (optinfo::emit): Update comment.
1792 (optinfo::add_string): Delete.
1793 (optinfo::add_printf): Delete.
1794 (optinfo::add_printf_va): Delete.
1795 (optinfo::add_gimple_stmt): Delete.
1796 (optinfo::add_gimple_expr): Delete.
1797 (optinfo::add_tree): Delete.
1798 (optinfo::add_symtab_node): Delete.
1799 (optinfo::add_dec): Delete.
1800 * optinfo.h (class dump_context): New forward decl.
1801 (optinfo::add_item): New decl.
1802 (optinfo::add_string): Delete.
1803 (optinfo::add_printf): Delete.
1804 (optinfo::add_printf_va): Delete.
1805 (optinfo::add_gimple_stmt): Delete.
1806 (optinfo::add_gimple_expr): Delete.
1807 (optinfo::add_tree): Delete.
1808 (optinfo::add_symtab_node): Delete.
1809 (optinfo::add_dec): Delete.
1810 (optinfo::add_poly_int): Delete.
1811 (optinfo_item::optinfo_item): Remove "owned" param.
1812 (class optinfo_item): Remove field "m_owned".
1814 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1817 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1818 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1819 requested variable alignment.
1820 (expand_one_ssa_partition): Likewise.
1821 (expand_one_var): Likewise.
1823 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1825 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1826 to speculation_safe_value_not_needed.
1828 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1830 * targhooks.h (speculation_safe_value_not_needed): New prototype.
1831 * targhooks.c (speculation_safe_value_not_needed): New function.
1832 * target.def (have_speculation_safe_value): Update documentation.
1833 * doc/tm.texi: Regenerated.
1835 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1837 * config/aarch64/iterators.md (ALLI_TI): New iterator.
1838 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1840 (despeculate_copy<ALLI:mode>_insn): New insn.
1841 (despeculate_copyti_insn): New insn.
1842 (despeculate_simple<ALLI:mode>): New insn
1843 (despeculate_simpleti): New insn.
1844 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1846 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1847 aarch64_speculation_safe_value.
1848 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1850 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1852 * config/aarch64/aarch64-speculation.cc: New file.
1853 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1854 before pass_reorder_blocks.
1855 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1857 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1858 X14 and X15 when tracking speculation.
1859 * config/aarch64/aarch64.md (register name constants): Add
1860 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1861 (unspec): Add UNSPEC_SPECULATION_TRACKER.
1862 (speculation_barrier): New insn attribute.
1863 (cmp<mode>): Allow SP in comparisons.
1864 (speculation_tracker): New insn.
1865 (speculation_barrier): Add speculation_barrier attribute.
1866 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1867 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1868 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1870 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1872 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1873 aarch64_track_speculation is true.
1874 (tb<optab><mode>1): Likewise.
1875 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1876 generate CB[N]Z when tracking speculation.
1877 (aarch64_split_compare_and_swap): Likewise.
1878 (aarch64_split_atomic_op): Likewise.
1880 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1882 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1884 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1886 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1887 (speculation_barrier): New insn.
1889 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1891 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1892 * config/arm/arm.md (speculation_barrier): New expand.
1893 (speculation_barrier_insn): New pattern.
1895 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1897 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1898 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1899 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1900 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1902 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1903 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1904 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1905 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1906 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1907 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1908 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1909 * builtins.c (expand_speculation_safe_value): New function.
1910 (expand_builtin): Call it.
1911 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1912 * doc/extend.texi: Document __builtin_speculation_safe_value.
1913 * doc/md.texi: Document "speculation_barrier" pattern.
1914 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1915 TARGET_HAVE_SPECULATION_SAFE_VALUE.
1916 * doc/tm.texi: Regenerated.
1917 * target.def (have_speculation_safe_value, speculation_safe_value): New
1919 * targhooks.c (default_have_speculation_safe_value): New function.
1920 (default_speculation_safe_value): New function.
1921 * targhooks.h (default_have_speculation_safe_value): Add prototype.
1922 (default_speculation_safe_value): Add prototype.
1924 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1926 * dump-context.h (dump_context::dump_loc): New decl.
1927 * dumpfile.c (dump_context::dump_loc): New member function.
1928 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1929 and dump_gimple_stmt.
1930 (dump_context::dump_gimple_expr_loc): Likewise, using
1932 (dump_context::dump_generic_expr_loc): Likewise, using
1934 (dump_context::dump_printf_loc_va): Likewise, using
1936 (dump_context::begin_scope): Explicitly using the global function
1937 "dump_loc", rather than the member function.
1939 2018-07-31 Martin Sebor <msebor@redhat.com>
1941 PR tree-optimization/86741
1942 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1944 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
1946 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1947 depend on whether prefetch instructions will be emitted or not.
1948 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1949 will be emitted or not.
1950 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1951 (TARGET_SETMEM_PFD): New macros.
1953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1955 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1956 (NULL_STMT_VEC_INFO): Delete.
1957 (stmt_vec_info::operator*): Likewise.
1958 (stmt_vec_info::operator gimple *): Likewise.
1959 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1960 of NULL_STMT_VEC_INFO.
1961 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1962 (vect_reassociating_reduction_p): Likewise.
1963 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1964 (vectorizable_store): Likewise.
1965 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1966 (vec_info::free_stmt_vec_infos): Likewise.
1968 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1970 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1971 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1973 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1975 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1976 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1977 (vec_info::free_stmt_vec_info): New private member functions.
1978 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1979 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1980 * tree-parloops.c (gather_scalar_reductions): Remove calls to
1981 set_stmt_vec_info_vec and free_stmt_vec_infos.
1982 * tree-vect-loop.c (_loop_vec_info): Remove call to
1983 set_stmt_vec_info_vec.
1984 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1985 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1986 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1987 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1988 (vec_info::free_stmt_vec_info): ...these new functions. Remove
1989 assignments in {vec_info::,}new_stmt_vec_info that are redundant
1990 with the clearing in the xcalloc.
1991 (stmt_vec_info_vec): Delete.
1992 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1993 (vectorize_loops): Likewise.
1994 (vec_info::~vec_info): Remove argument from call to
1995 free_stmt_vec_infos.
1996 (vec_info::add_stmt): Remove vinfo argument from call to
1999 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2001 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2002 rather than a gimple stmt.
2003 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2004 information for pattern statements when passed the original
2005 statement; instead wait to be passed the pattern statement itself.
2006 Don't call set_vinfo_for_stmt here.
2007 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2008 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2009 stmt_vec_infos here.
2010 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2011 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2012 stmt_vec_infos entry.
2014 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2016 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2017 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2018 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2019 * tree-vect-stmts.c (vectorizable_call): Likewise.
2020 (vectorizable_simd_clone_call): Likewise.
2022 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2024 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2025 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2026 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2027 * tree-vect-loop.c (vect_transform_loop): Likewise.
2028 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2029 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2031 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2033 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2034 (vect_dr_stmt): Delete.
2035 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2036 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2038 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2039 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2040 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2041 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2042 (vect_analyze_data_refs): Likewise.
2043 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2045 (vect_find_same_alignment_drs): Likewise.
2046 (vect_slp_analyze_node_dependences): Update calls accordingly.
2047 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2048 instead of DR_VECT_AUX.
2049 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2050 of a vector data references. Use vec_info::lookup_dr instead of
2052 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2053 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2054 instead of DR_VECT_AUX.
2056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2058 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2060 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2062 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2063 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2064 (vect_gen_prolog_loop_niters): Likewise.
2066 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2068 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2069 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2070 (vect_known_alignment_in_bytes, vect_dr_behavior)
2071 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2072 instead of data_references. Update calls to other routines for
2073 which the same change has been made.
2074 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2075 dr_vec_infos instead of stmt_vec_infos.
2076 (vect_analyze_data_ref_dependence): Update call accordingly.
2077 (vect_slp_analyze_data_ref_dependence)
2078 (vect_record_base_alignments): Use DR_VECT_AUX.
2079 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2080 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2081 (vector_alignment_reachable_p, vect_get_data_access_cost)
2082 (vect_peeling_supportable, vect_analyze_group_access_1)
2083 (vect_analyze_group_access, vect_analyze_data_ref_access)
2084 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2085 (vect_compile_time_alias, vect_small_gap_p)
2086 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2087 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2088 instead of data_references. Update calls to other routines for
2089 which the same change has been made.
2090 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2091 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2092 (vect_slp_analyze_and_verify_node_alignment)
2093 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2094 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2095 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2097 (_vect_peel_info::dr): Replace with...
2098 (_vect_peel_info::dr_info): ...this new field.
2099 (vect_peeling_hash_get_most_frequent)
2100 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2101 (vect_peeling_hash_get_lowest_cost):
2102 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2103 routines for which the same change has been made.
2104 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2106 * tree-vect-loop-manip.c (get_misalign_in_elems)
2107 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2109 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2110 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2111 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2112 (get_group_load_store_type, get_negative_load_store_type)
2113 (vect_get_data_ptr_increment, vectorizable_store)
2114 (vectorizable_load): Likewise.
2115 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2116 Update calls to other routines for which the same change has been made.
2118 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2120 * tree-vectorizer.h (vec_info::move_dr): New member function.
2121 (dataref_aux): Rename to...
2122 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2123 (_stmt_vec_info::dr_aux): Update accordingly.
2124 (_stmt_vec_info::data_ref_info): Delete.
2125 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2126 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2127 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2128 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2130 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2131 (STMT_VINFO_DR_INFO): New macro.
2132 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2133 (set_dr_misalignment): Update after rename of dataref_aux.
2134 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2135 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2136 initialization of STMT_VINFO_DATA_REF.
2137 * tree-vectorizer.c (vec_info::move_dr): New function.
2138 * tree-vect-patterns.c (vect_recog_bool_pattern)
2139 (vect_recog_mask_conversion_pattern)
2140 (vect_recog_gather_scatter_pattern): Use it.
2141 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2142 the "dr" and "stmt" fields of dr_vec_info instead of
2143 STMT_VINFO_DATA_REF.
2145 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2147 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2148 (is_pattern_stmt_p): Use it.
2149 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2150 on pattern statements.
2152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2154 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2155 original stmt as a stmt_vec_info rather than a gimple stmt.
2156 (vect_pattern_recog_1): Take the statement directly as a
2157 stmt_vec_info, rather than via a gimple_stmt_iterator.
2158 Update call to vect_mark_pattern_stmts.
2159 (vect_pattern_recog): Update calls accordingly.
2161 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2163 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2164 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2165 a vect_def_type for the first argument.
2166 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2167 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2168 operand if it isn't defined by a vectorized statement.
2169 (vect_build_gather_load_calls): Remove the mask_dt argument and
2170 update calls to vect_get_vec_def_for_stmt_copy.
2171 (vectorizable_bswap): Likewise the dt argument.
2172 (vectorizable_call): Update calls to vectorizable_bswap and
2173 vect_get_vec_def_for_stmt_copy.
2174 (vectorizable_simd_clone_call, vectorizable_assignment)
2175 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2176 (vectorizable_comparison): Update calls to
2177 vect_get_vec_def_for_stmt_copy.
2178 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2180 (vect_get_loop_based_defs): Remove dt argument and update call
2181 to vect_get_vec_def_for_stmt_copy.
2182 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2183 and vect_get_vec_def_for_stmt_copy.
2184 (vectorizable_load): Update calls to vect_build_gather_load_calls
2185 and vect_get_vec_def_for_stmt_copy.
2186 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2187 (vectorizable_reduction, vectorizable_live_operation): Update calls
2188 to vect_get_vec_def_for_stmt_copy.
2190 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2192 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2193 and gimple stmt arguments with a stmt_vec_info.
2194 (vect_record_base_alignments): Update calls accordingly.
2195 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2196 and gimple stmt arguments with a stmt_vec_info.
2197 (vect_build_slp_tree_1): Remove vinfo argument and update call
2198 to vect_record_max_nunits.
2199 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2200 and vect_record_max_nunits.
2202 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2204 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2205 file and take a stmt_vec_info instead of a gimple stmt.
2206 (supportable_widening_operation, vect_finish_replace_stmt)
2207 (vect_finish_stmt_generation, vect_get_store_rhs)
2208 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2209 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2210 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2211 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2212 (vect_create_data_ref_ptr, bump_vector_ptr)
2213 (vect_permute_store_chain, vect_setup_realignment)
2214 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2215 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2216 (vectorizable_reduction, vectorizable_induction)
2217 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2218 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2219 than gimple stmts as arguments.
2220 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2221 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2222 (can_group_stmts_p, vect_check_gather_scatter)
2223 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2224 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2225 (vect_permute_load_chain, vect_shift_permute_load_chain)
2226 (vect_transform_grouped_load)
2227 (vect_record_grouped_load_vectors): Likewise.
2228 * tree-vect-loop.c (vect_fixup_reduc_chain)
2229 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2230 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2231 (vectorizable_reduction, vectorizable_induction)
2232 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2233 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2234 (vect_get_load_store_mask): Likewise.
2235 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2236 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2237 * tree-vect-stmts.c (vect_mark_relevant)
2238 (is_simple_and_all_uses_invariant)
2239 (exist_non_indexing_operands_for_use_p, process_use)
2240 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2241 (vect_get_vec_def_for_operand, vect_get_vec_defs)
2242 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2243 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2244 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2245 (get_negative_load_store_type, get_load_store_type)
2246 (vect_check_load_store_mask, vect_check_store_rhs)
2247 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2248 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2249 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2250 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2251 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2252 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2253 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2254 (supportable_widening_operation): Likewise.
2256 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2258 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2259 a stmt_vec_info instead of a gcall.
2260 (vect_check_gather_scatter): Update call accordingly.
2261 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2263 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2264 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2265 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2266 instead of a gimple stmt.
2267 (vect_transform_loop): Update calls accordingly.
2268 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2269 stmt_vec_infos instead of gimple stmts.
2270 (vect_analyze_slp_instance): Update use accordingly.
2271 * tree-vect-stmts.c (read_vector_array, write_vector_array)
2272 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2273 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2274 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2275 (vect_gen_widened_results_half, vect_get_loop_based_defs)
2276 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2277 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2278 down to subroutines.
2280 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2282 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2283 of the worklist from a vector of gimple stmts to a vector of
2285 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2286 (vect_mark_stmts_to_be_vectorized): Likewise
2288 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2290 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2291 statement before passing it to vect_analyze_stmt.
2292 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2293 the chain of phi vector definitions. Track the exit phi via its
2295 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2296 STMT_VINFO_REDUC_DEF.
2297 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2298 stmt_vec_infos to handle the statement chains.
2299 (vect_get_slp_defs): Record the first statement in the node
2300 using a stmt_vec_info.
2301 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2302 statements here and pass their stmt_vec_info down to subroutines.
2303 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2304 down to vect_finish_stmt_generation.
2305 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2306 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2307 stmt_vec_infos to subroutines.
2308 (vect_remove_stores): Use stmt_vec_infos to handle the statement
2311 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2313 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2314 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2315 (vect_permute_store_chain, vect_setup_realignment)
2316 (vect_permute_load_chain, vect_shift_permute_load_chain)
2317 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2318 stmts internally, and when passing values to other vectorizer routines.
2319 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2320 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2321 (vect_analyze_loop_operations, get_initial_def_for_reduction)
2322 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2323 (vectorizable_reduction, vectorizable_induction)
2324 (vectorizable_live_operation, vect_transform_loop_stmt)
2325 (vect_transform_loop): Likewise.
2326 * tree-vect-patterns.c (vect_reassociating_reduction_p)
2327 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2328 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2329 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2330 (vect_slp_analyze_node_operations_1): Likewise.
2331 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2332 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2333 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2334 (vect_finish_stmt_generation_1, get_group_load_store_type)
2335 (get_load_store_type, vect_build_gather_load_calls)
2336 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2337 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2338 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2339 (vectorizable_store, vectorizable_load, vectorizable_condition)
2340 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2341 (supportable_widening_operation): Likewise.
2342 (vect_get_vector_types_for_stmt): Likewise.
2343 * tree-vectorizer.h (vect_dr_behavior): Likewise.
2345 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2347 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2348 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2349 (vect_permute_store_chain, vect_permute_load_chain)
2350 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2351 repeated stmt_vec_info lookups.
2352 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2353 (vect_update_ivs_after_vectorizer): Likewise.
2354 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2355 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2356 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2357 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2358 (vect_bb_slp_scalar_cost): Likewise.
2359 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2361 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2363 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2364 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2365 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2366 to get gassigns and gcalls, rather than operating on generc gimple
2368 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2369 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2370 (vectorizable_load, vect_analyze_stmt): Likewise.
2371 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2373 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2375 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2376 return stmt_vec_infos rather than gimple stmts. Do not accept
2378 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2380 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2381 Update use of get_later_stmt.
2382 (vect_get_constant_vectors): Update call accordingly.
2383 (vect_schedule_slp_instance): Likewise
2384 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2385 (vect_slp_analyze_instance_dependence): Likewise.
2386 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2388 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2390 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2391 (stmt_info_for_cost::stmt_info): ...this new field.
2392 (add_stmt_costs): Update accordingly.
2393 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2394 (vect_get_known_peeling_cost): Likewise.
2395 (vect_estimate_min_profitable_iters): Likewise.
2396 * tree-vect-stmts.c (record_stmt_cost): Likewise.
2398 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2400 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2401 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2402 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2404 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2406 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2408 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2409 a gimple stmt to a stmt_vec_info.
2410 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2412 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2414 * tree-vectorizer.h (vec_info::grouped_stores): Change from
2415 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2416 (_loop_vec_info::reduction_chains): Likewise.
2417 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2419 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2421 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2423 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2424 a gimple stmt to a stmt_vec_info.
2425 (_stmt_vec_info::next_element): Likewise.
2426 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2427 (vect_slp_analyze_and_verify_node_alignment)
2428 (vect_analyze_group_access_1, vect_analyze_group_access)
2429 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2430 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2431 (vect_supportable_dr_alignment): Update accordingly.
2432 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2433 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2434 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2435 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2436 * tree-vect-slp.c (vect_build_slp_tree_1)
2437 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2438 (vect_split_slp_store_group, vect_analyze_slp_instance)
2439 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2440 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2441 (get_group_load_store_type, get_load_store_type)
2442 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2443 (vect_transform_stmt, vect_remove_stores): Likewise.
2445 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2447 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2449 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2450 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2451 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2452 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2453 (vector_alignment_reachable_p, vect_get_data_access_cost)
2454 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2455 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2456 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2457 (vect_analyze_group_access_1, vect_analyze_group_access)
2458 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2459 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2460 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2461 result of vect_dr_stmt and use the stmt_vec_info instead of
2462 the associated gimple stmt.
2463 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2464 (vect_gen_prolog_loop_niters): Likewise.
2465 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2467 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2469 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2470 to a vec<stmt_vec_info>.
2471 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2472 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2474 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2475 to a vec<stmt_vec_info>.
2476 (bst_traits::value_type, bst_traits::value_type): Likewise.
2477 (bst_traits::hash): Update accordingly.
2478 (vect_get_and_check_slp_defs): Change the stmts parameter from
2479 a vec<gimple *> to a vec<stmt_vec_info>.
2480 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2481 (vect_build_slp_tree): Likewise.
2482 (vect_build_slp_tree_2): Likewise. Update uses of
2483 SLP_TREE_SCALAR_STMTS.
2484 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2485 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2486 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2487 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2488 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2489 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2490 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2491 (vect_get_constant_vectors, vect_get_slp_defs)
2492 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2493 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2494 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2495 instead of gimple stmts.
2496 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2497 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2498 (vect_slp_analyze_instance_dependence): Update uses of
2499 SLP_TREE_SCALAR_STMTS.
2500 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2501 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2502 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2503 (get_initial_defs_for_reduction): Likewise.
2504 (vect_create_epilog_for_reduction): Likewise.
2505 (vectorize_fold_left_reduction): Likewise.
2506 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2507 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2508 (can_vectorize_live_stmts): Likewise.
2510 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2512 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2513 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2514 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2516 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2518 (gather_scalar_reductions): Update after above interface changes.
2519 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2520 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2522 (vect_force_simple_reduction): Likewise.
2523 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2524 LOOP_VINFO_REDUCTIONS.
2525 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2527 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2529 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2530 a gimple stmt to a stmt_vec_info.
2531 * tree-vect-loop.c (vect_active_double_reduction_p)
2532 (vect_force_simple_reduction, vectorizable_reduction): Update
2535 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2537 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2538 vec<gimple *> to a vec<stmt_vec_info>.
2539 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2540 the reduction_phis argument from a vec<gimple *> to a
2542 (vectorizable_reduction): Likewise the phis local variable that
2543 is passed to vect_create_epilog_for_reduction. Update for new type
2544 of SLP_TREE_VEC_STMTS.
2545 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2546 (vectorizable_live_operation): Likewise.
2547 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2548 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2550 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2552 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2553 a gimple stmt to a stmt_vec_info.
2554 (vectorizable_condition, vectorizable_live_operation)
2555 (vectorizable_reduction, vectorizable_induction): Pass back the
2556 vectorized statement as a stmt_vec_info.
2557 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2558 use of STMT_VINFO_VEC_STMT.
2559 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2560 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2561 as stmt_vec_infos rather than gimple stmts.
2562 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2564 (vectorizable_live_operation): Likewise.
2565 (vectorizable_reduction, vectorizable_induction): Likewise,
2566 updating use of STMT_VINFO_VEC_STMT.
2567 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2568 of STMT_VINFO_VEC_STMT.
2569 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2570 (vectorizable_simd_clone_call, vectorizable_conversion)
2571 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2572 (vectorizable_store, vectorizable_load, vectorizable_condition)
2573 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2574 from a gimple stmt to a stmt_vec_info.
2575 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
2576 pointer to a stmt_vec_info to the vectorizable_* routines.
2578 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2580 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2581 a gimple stmt to a stmt_vec_info.
2582 (is_pattern_stmt_p): Update accordingly.
2583 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2584 (vect_record_grouped_load_vectors): Likewise.
2585 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2586 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2587 (vect_model_reduction_cost): Likewise.
2588 (vect_create_epilog_for_reduction): Likewise.
2589 (vectorizable_reduction, vectorizable_induction): Likewise.
2590 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2591 Return the stmt_vec_info for the pattern statement.
2592 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2593 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2594 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2595 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2596 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2597 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2598 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2599 (free_stmt_vec_info, vect_is_simple_use): Likewise.
2601 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2603 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2604 (vect_finish_stmt_generation): Likewise.
2605 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2606 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2607 (vect_build_gather_load_calls): Use the return value of the above
2608 functions instead of a separate call to vinfo_for_stmt. Use narrow
2609 scopes for the input gimple stmt and wider scopes for the associated
2610 stmt_vec_info. Use vec_info::lookup_def when setting these
2611 stmt_vec_infos from an SSA_NAME definition.
2612 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2613 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2614 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2615 (vectorizable_store, vectorizable_load, vectorizable_condition)
2616 (vectorizable_comparison): Likewise.
2617 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2618 (vectorizable_reduction): Likewise.
2620 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2622 * tree-vectorizer.h (vect_is_simple_use): Add an optional
2623 stmt_vec_info * parameter before the optional gimple **.
2624 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2625 (process_use, vect_get_vec_def_for_operand_1): Update callers.
2626 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2627 * tree-vect-loop.c (vectorizable_reduction): Likewise.
2628 (vectorizable_live_operation): Likewise.
2629 * tree-vect-patterns.c (type_conversion_p): Likewise.
2630 (vect_look_through_possible_promotion): Likewise.
2631 (vect_recog_rotate_pattern): Likewise.
2632 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2634 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2636 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2637 a typedef to a wrapper class.
2638 (NULL_STMT_VEC_INFO): New macro.
2639 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2640 (stmt_vec_info::operator*): New function.
2641 (stmt_vec_info::operator gimple *): Likewise.
2642 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2643 (add_stmt_costs): Likewise.
2644 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2645 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2646 (vect_get_known_peeling_cost): Likewise.
2647 (vect_estimate_min_profitable_iters): Likewise.
2648 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2649 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2650 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2651 (vectorizable_store, free_stmt_vec_infos): Likewise.
2652 (new_stmt_vec_info): Change return type of xcalloc to
2655 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2657 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2658 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2659 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2660 a single_imm_use-based sequence.
2661 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2663 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2665 * tree-vectorizer.h (vec_info::lookup_def): Declare.
2666 * tree-vectorizer.c (vec_info::lookup_def): New function.
2667 * tree-vect-patterns.c (vect_get_internal_def): Use it.
2668 (vect_widened_op_tree): Likewise.
2669 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2670 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2671 (vectorizable_reduction): Likewise.
2672 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2674 (vect_is_slp_reduction): Update calls accordingly. Use
2675 vec_info::lookup_def.
2676 (vect_is_simple_reduction): Likewise
2677 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2679 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2681 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2682 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2683 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2685 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2686 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2687 (vect_update_vf_for_slp, vect_analyze_loop_operations)
2688 (vect_is_slp_reduction, vectorizable_induction)
2689 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2690 * tree-vect-patterns.c (vect_init_pattern_stmt):
2691 (vect_determine_min_output_precision_1, vect_determine_precisions)
2692 (vect_pattern_recog): Likewise.
2693 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2694 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2695 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2696 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2697 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2698 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
2699 info field from a loop to a loop_vec_info.
2701 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2703 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2704 (vec_info::add_stmt): Declare.
2705 * tree-vectorizer.c (vec_info::add_stmt): New function.
2706 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2707 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2708 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2709 (vectorizable_induction): Likewise.
2710 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2711 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2712 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2713 (vectorizable_load): Likewise.
2714 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2715 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2716 (vect_recog_gather_scatter_pattern): Likewise.
2717 (append_pattern_def_seq): Likewise. Remove a check that is
2718 performed by add_stmt itself.
2720 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2722 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2723 which make_ssa_name was called with new_stmt before new_stmt
2726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2728 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2730 (vect_is_slp_reduction): ...here...
2731 (vect_is_simple_reduction): ...and here. Remove repetition of tests
2732 that are already known to be false.
2734 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2736 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2737 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
2738 STMT_VINFO_NUM_SLP_USES when it's true.
2739 (vect_free_slp_instance): Add a final_p parameter and pass it to
2741 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2742 (vect_analyze_slp_instance): Likewise.
2743 (vect_slp_analyze_operations): Likewise.
2744 (vect_slp_analyze_bb_1): Likewise.
2745 * tree-vectorizer.c (vec_info): Likewise.
2746 * tree-vect-loop.c (vect_transform_loop): Likewise.
2748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2750 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2751 function is not called for second and subsequent members of
2754 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2756 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2757 cases for nested loops from here to ...
2758 (vect_create_epilog_for_reduction): ...here. Only call
2759 vect_is_simple_use for inner-loop reductions.
2761 2018-07-31 Martin Liska <mliska@suse.cz>
2763 PR gcov-profile/85338
2764 PR gcov-profile/85350
2765 PR gcov-profile/85372
2766 * profile.c (struct location_triplet): New.
2767 (struct location_triplet_hash): Likewise.
2768 (output_location): Do not output a BB that
2769 is already recorded for a line.
2770 (branch_prob): Use streamed_locations.
2772 2018-07-31 Martin Liska <mliska@suse.cz>
2774 PR gcov-profile/85370
2775 * coverage.c (coverage_begin_function): Do not mark target
2776 clones as artificial functions.
2778 2018-07-31 Martin Liska <mliska@suse.cz>
2780 PR gcov-profile/83813
2781 PR gcov-profile/84758
2782 PR gcov-profile/85217
2783 PR gcov-profile/85332
2784 * profile.c (branch_prob): Do not record GOTO expressions
2785 for GIMPLE statements which locations are already streamed.
2787 2018-07-31 Olivier Hainque <hainque@adacore.com>
2789 * gcc.c (handle_spec_function): Accept a soft_matched_part
2790 argument, as do_spec_1. Pass it down to ...
2791 (eval_spec_function): Accept a soft_matched_part argument,
2792 and pass it down to ...
2793 (do_spec_2): Accept a soft_matched_part argument, and pass
2794 it down to do_spec_1.
2795 (do_spec_1): Pass soft_matched_part to handle_spec_function.
2796 (handle_braces): Update call to handle_spec_function.
2797 (driver::set_up_specs): Update calls to do_spec_2.
2798 (compare_debug_dump_opt_spec_function): Likewise.
2799 (compare_debug_self_opt_spec_function): Likewise.
2801 2018-07-31 Olivier Hainque <hainque@adacore.com>
2803 * common.opt (nolibc): New option.
2804 * doc/invoke.texi (Link Options): Document it.
2805 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2806 * config/alpha/linux.h: Likewise.
2807 * config/arc/elf.h: Likewise.
2808 * config/arm/uclinux-elf.h: Likewise.
2809 * config/arm/unknown-elf.h: Likewise.
2810 * config/avr/avrlibc.h: Likewise.
2811 * config/bfin/bfin.h: Likewise.
2812 * config/bfin/linux.h: Likewise.
2813 * config/bfin/uclinux.h: Likewise.
2814 * config/darwin.h: Likewise.
2815 * config/darwin10.h: Likewise.
2816 * config/darwin12.h: Likewise.
2817 * config/gnu-user.h: Likewise.
2818 * config/lm32/uclinux-elf.h: Likewise.
2819 * config/pa/pa-hpux11.h: Likewise.
2820 * config/pa/pa64-hpux.h: Likewise.
2821 * config/sparc/sparc.h: Likewise.
2823 2018-07-31 Olivier Hainque <hainque@adacore.com>
2825 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2826 undefined variables.
2828 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
2831 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2834 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2836 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2837 terminated string literal.
2839 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
2841 PR rtl-optimization/85160
2842 * combine.c (is_just_move): New function.
2843 (try_combine): Allow combining two instructions into two if neither of
2844 the original instructions was a move.
2846 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
2849 * doc/extend.texi (Global Register Variables): Discourage use of type
2851 (Local Register Variables): Likewise.
2853 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
2855 PR tree-optimization/86506
2856 * hwint.h (ceil_log2): Resync with hwint.c implementation.
2858 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
2861 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2862 hard_regno, make sure no insn between `from` and `to` clobbers it.
2864 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
2865 Tom de Vries <tdevries@suse.de>
2867 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2868 (PTX_DEFAULT_RUNTIME_DIM): ... this.
2869 (nvptx_goacc_validate_dims): Set default worker and gang dims to
2870 PTX_DEFAULT_RUNTIME_DIM.
2871 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2873 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
2875 * config/pa/pa.c (pa_output_addr_vec): Align address table.
2876 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2877 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2879 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
2881 * config/rs6000/constraints.md (wG constraint): Delete, no longer
2883 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2884 predicate to reflect toc fusion has been deleted.
2885 (toc_fusion_mem_raw): Delete, no longer used.
2886 (toc_fusion_mem_wrapped): Likewise.
2887 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2889 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2890 Delete, no longer used.
2891 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2892 meant to be used for toc fusion.
2893 (rs6000_debug_print_mode): Delete toc fusion debugging.
2894 (rs6000_debug_reg_global): Likewise.
2895 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2896 fusion and secondary reload support that were never used.
2897 (rs6000_option_override_internal): Delete TOC fusion, that was only
2898 partially defined, and it did not work unless you also used the
2900 (rs6000_legitimate_address_p): Delete TOC fusion support.
2901 (rs6000_opt_masks): Likewise.
2902 (fusion_wrap_memory_address): Delete function, no longer used.
2903 (fusion_split_address); Delete TOC fusion support.
2904 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2905 longer used with toc fusion being deleted.
2906 (TARGET_TOC_FUSION_FP): Likewise.
2907 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2909 (toc fusion spliter): Delete TOC fusion support.
2910 (toc_fusionload_<mode>): Likewise.
2911 (toc_fusionload_di): Likewise.
2912 (fusion_gpr_load_<mode>): Delete generator function, this insn no
2913 longer needs to be named. Rename predicate to delete TOC fusion.
2914 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2915 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2916 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2917 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2918 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2920 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
2922 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2923 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
2924 __int128 in built-in function prototypes.
2925 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2926 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2928 2018-07-27 Martin Sebor <msebor@redhat.com>
2930 PR tree-optimization/86696
2931 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2932 types, including enums.
2933 (handle_char_store): Be prepared for the above function to fail.
2935 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
2937 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2938 when optimization level is lower than 2 or optimize for size.
2940 2018-07-26 Martin Sebor <msebor@redhat.com>
2942 PR tree-optimization/86043
2943 PR tree-optimization/86042
2944 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2945 (get_string_cst_length): Rename...
2946 (get_min_string_length): ...to this. Add argument.
2947 (handle_char_store): Extend to handle multi-character stores by
2949 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
2950 * tree.h (initializer_zerop): Add argument.
2952 2018-07-26 Jakub Jelinek <jakub@redhat.com>
2955 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2956 declare target to variables if they have always,{to,from,tofrom} map
2959 2018-07-26 Martin Liska <mliska@suse.cz>
2962 * lto-wrapper.c: Add linker_output as prefix
2963 for ltrans_output_file.
2965 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
2967 PR rtl-optimization/85805
2968 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2969 value for hard registers if that was written in the same mode.
2971 2018-07-26 Martin Liska <mliska@suse.cz>
2973 PR gcov-profile/86536
2974 * gcov.c (format_gcov): Use printf format %.*f directly
2975 and do not handle special values.
2977 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2979 * common/config/arc/arc-common.c (arc_option_optimization_table):
2980 Update default optimizations for size.
2982 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2984 * config/arc/arc.md (movsf_insn): Add short instruction selection.
2985 * config/arc/constraints.md (CfZ): New constraint.
2986 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2987 (subsf3_fpu): Likewise.
2988 (cmpsf_fpu): Likewise.
2989 (cmpsf_fpu_uneq): Likewise.
2991 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2993 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2995 (arc_is_uncached_mem_p): uncached applies to both the variable and
2998 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3000 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3003 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3005 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3006 field "m_scopes" from vec to auto_vec.
3008 2018-07-25 Martin Liska <mliska@suse.cz>
3010 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3013 2018-07-25 Richard Biener <rguenther@suse.de>
3016 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3017 special wrt context_die late.
3018 (gen_subprogram_die): Re-use DIEs in local scope.
3020 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3022 PR tree-optimization/86644
3023 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3025 2018-07-25 Martin Liska <mliska@suse.cz>
3028 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3029 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3031 2018-07-25 Martin Liska <mliska@suse.cz>
3034 * params.def: Explain ASan abbreviation and provide
3035 a documentation link.
3037 2018-07-24 Martin Sebor <msebor@redhat.com>
3039 PR tree-optimization/86622
3040 PR tree-optimization/86532
3041 * builtins.h (string_length): Declare.
3042 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3043 (check_access): Be prepared for non-constant length ranges.
3044 (string_length): Make extern.
3045 * expr.c (string_constant): Only handle the minor non-constant
3046 array index. Use string_constant to compute the length of
3047 a generic string constant.
3049 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3051 PR tree-optimization/86618
3052 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3053 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3055 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3057 PR tree-optimization/86636
3058 * json.cc (json::object::set): Fix comment. Add assertions.
3059 (json::array::append): Move here from json.h. Add comment and an
3061 (json::string::string): Likewise.
3062 * json.h (json::array::append): Move to json.cc.
3063 (json::string::string): Likewise.
3064 * optinfo-emit-json.cc
3065 (optrecord_json_writer::impl_location_to_json): Assert that we
3066 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3067 wrapper around it. Expand the location once, rather than three
3069 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3070 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3072 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3073 places. Fix some overlong lines.
3075 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3077 * config/aarch64/aarch64-simd.md
3078 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3079 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3080 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3081 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3082 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3083 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3084 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3085 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3086 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3088 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3091 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3092 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3093 and abs_d == d, do the power of two handling if profitable.
3095 2018-07-24 Richard Biener <rguenther@suse.de>
3097 * match.pd: Add BIT_FIELD_REF canonicalizations.
3099 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3102 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3104 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3106 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3107 terminated STRING_CST object.
3109 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3111 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3113 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3115 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3116 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3117 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3118 the elements into a register.
3119 (rs6000_split_v4si_init_di_reg): Delete.
3120 (rs6000_split_v4si_init): Delete.
3121 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3122 (vsx_init_v4si): Rewrite as a define_expand.
3124 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3126 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3127 zero_extend argument from memory): New.
3129 2018-07-22 Martin Sebor <msebor@redhat.com>
3132 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3133 diagnosing calls with unknown arguments unless -Walloca-larger-than
3134 is restricted to less than PTRDIFF_MAX bytes.
3136 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3138 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3140 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3142 * pretty-print.c (text_info::set_location): Remove redundant
3143 "line_table" parameter from call to rich_location::set_range.
3145 2018-07-20 Martin Sebor <msebor@redhat.com>
3148 * builtins.c (expand_builtin_alloca): Adjust.
3149 * calls.c (alloc_max_size): Simplify.
3150 * cgraphunit.c (cgraph_node::expand): Adjust.
3151 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3153 (frame_larger_than_size): Same.
3154 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3155 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3157 * doc/invoke.texi (GCC Command Options): Document option arguments.
3158 Explain byte-size arguments and suffixes.
3159 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3160 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3161 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3162 * doc/options.texi (UInteger): Expand.
3163 (Host_Wide_Int, ByteSize): Document new properties.
3164 * final.c (final_start_function_1): Include sizes in an error message.
3165 * function.c (frame_offset_overflow): Same.
3166 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3167 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3168 Diagnose unbounded alloca calls only for limits of less than
3170 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3171 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3173 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3174 only for limits of less than PTRDIFF_MAX.
3175 * langhooks-def.h (lhd_handle_option): Change function argument
3177 * langhooks.c (lhd_handle_option): Same.
3178 * langhooks.h (handle_option): Same.
3179 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3181 (var_type, var_type_struct): Same.
3182 (var_set): Handle ByteSize flag.
3183 * optc-gen.awk: Add comments to output to ease debugging. Make
3184 use of HOST_WIDE_INT where appropriate.
3185 * opts-gen-save.awk: Use %lx to format unsigned long.
3186 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3187 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3188 arguments. Parse bytes-size suffixes.
3189 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3190 (enum_value_to_arg): Same.
3191 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3192 (handle_option): Adjust.
3193 (generate_option): Change function argument to HOST_WIDE_INT.
3194 (cmdline_handle_error): Adjust.
3195 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3196 (set_option): Change function argument to HOST_WIDE_INT.
3197 (option_enabled): Handle cl_host_wide_int.
3198 (get_option_state): Handle CLVC_SIZE.
3199 (control_warning_option): Same.
3200 * opts.c (common_handle_option): Change function argument to
3201 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
3202 OPT_Wvla_larger_than_.
3203 * opts.h (enum cl_var_type): Add an enumerator.
3204 * stor-layout.c (layout_decl): Print a more meaningful warning.
3205 * toplev.c (output_stack_usage): Adjust.
3207 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
3209 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3210 call to inline_expand_builtin_string_cmp.
3211 (expand_builtin_strcmp): Likewise.
3212 (expand_builtin_strncmp): Likewise.
3213 (inline_string_cmp): Delete the last parameter, change char_type_node
3214 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3216 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3217 the inlining expansion on target where the type of the call has same or
3218 narrower precision than unsigned char.
3220 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3222 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3223 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3224 * common.opt (fsave-optimization-record): New option.
3225 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3226 * doc/invoke.texi (-fsave-optimization-record): New option.
3227 * dumpfile.c: Include "optinfo-emit-json.h".
3228 (struct kv_pair): Move to coretypes.h.
3229 (optgroup_options): Make non-static.
3230 (dump_context::end_scope): Call
3231 optimization_records_maybe_pop_dump_scope.
3232 * dumpfile.h (optgroup_options): New decl.
3233 * json.cc: New file.
3235 * optinfo-emit-json.cc: New file.
3236 * optinfo-emit-json.h: New file.
3237 * optinfo.cc: Include "optinfo-emit-json.h".
3238 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3239 (optinfo_enabled_p): Check optimization_records_enabled_p.
3240 (optinfo_wants_inlining_info_p): Likewise.
3241 * optinfo.h: Update comment.
3242 * profile-count.c (profile_quality_as_string): New function.
3243 * profile-count.h (profile_quality_as_string): New decl.
3244 (profile_count::quality): New accessor.
3245 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3246 and optinfo_emit_json_cc_tests.
3247 * selftest.h (selftest::json_cc_tests): New decl.
3248 (selftest::optinfo_emit_json_cc_tests): New decl.
3249 * toplev.c: Include "optinfo-emit-json.h".
3250 (compile_file): Call optimization_records_finish.
3251 (do_compile): Call optimization_records_start.
3252 * tree-ssa-live.c: Include optinfo.h.
3253 (remove_unused_scope_block_p): Retain inlining information if
3254 optinfo_wants_inlining_info_p returns true.
3256 2018-07-20 Richard Biener <rguenther@suse.de>
3259 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3260 to cover -flto-partition=none.
3262 2018-07-20 Martin Liska <mliska@suse.cz>
3264 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3265 (get_decl_source_range): Remove unused function.
3267 2018-07-20 Richard Biener <rguenther@suse.de>
3269 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3270 (struct vn_phi_s): Likewise.
3271 (struct vn_reference_s): Likewise.
3272 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3273 for searching the slot of an entry known to be in the hash itself.
3274 (vn_phi_hasher::equal): Likewise.
3275 (vn_reference_hasher::equal): Likewise.
3276 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3278 (optimistic_info, current_info): Remove, keeping only valid_info.
3279 (vn_reference_lookup_1): Remove fallback lookup.
3280 (vn_reference_lookup_2): Likewise.
3281 (vn_nary_op_lookup_1): Likewise.
3282 (vn_phi_lookup): Likewise.
3283 (vn_nary_build_or_lookup_1): Make sure to not chain the built
3285 (vn_reference_insert): Adjust, chain the inserted hash element
3286 at last_inserted_ref.
3287 (vn_reference_insert_pieces): Likewise.
3288 (visit_reference_op_call): Likewise.
3289 (vn_nary_op_insert_into): Chain the inserted hash element at
3291 (vn_nary_op_insert_pieces): Adjust.
3292 (vn_nary_op_insert): Likewise.
3293 (vn_nary_op_insert_stmt): Likewise.
3294 (vn_phi_insert): Adjust, chain the inserted hash element at
3296 (process_scc): Remove clearing and copying the optimistic
3297 table. Instead remove elements inserted during an optimistic
3298 iteration from the single table we maintain.
3299 (init_scc_vn): Adjust.
3300 (free_scc_vn): Likewise.
3301 (sccvn_dom_walker::record_cond): Likewise.
3302 (sccvn_dom_walker::after_dom_children): Likewise.
3304 2018-07-19 Martin Sebor <msebor@redhat.com>
3306 PR tree-optimization/84047
3307 PR tree-optimization/83776
3308 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3309 (check_array_bounds): Call it.
3311 2018-07-19 Martin Sebor <msebor@redhat.com>
3313 * align.h (align_flags): Use member initialization.
3315 2018-07-19 David Malcolm <dmalcolm@redhat.com>
3317 * Makefile.in (OBJS): Add optinfo.o.
3318 * coretypes.h (class symtab_node): New forward decl.
3319 (struct cgraph_node): New forward decl.
3320 (class varpool_node): New forward decl.
3321 * dump-context.h: New file.
3322 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3324 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3325 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3326 (set_alt_dump_file): Likewise.
3327 (dump_context::~dump_context): New dtor.
3328 (dump_gimple_stmt): Move implementation to...
3329 (dump_context::dump_gimple_stmt): ...this new member function.
3330 Add the stmt to any pending optinfo, creating one if need be.
3331 (dump_gimple_stmt_loc): Move implementation to...
3332 (dump_context::dump_gimple_stmt_loc): ...this new member function.
3333 Start a new optinfo and add the stmt to it.
3334 (dump_gimple_expr): Move implementation to...
3335 (dump_context::dump_gimple_expr): ...this new member function.
3336 Add the stmt to any pending optinfo, creating one if need be.
3337 (dump_gimple_expr_loc): Move implementation to...
3338 (dump_context::dump_gimple_expr_loc): ...this new member function.
3339 Start a new optinfo and add the stmt to it.
3340 (dump_generic_expr): Move implementation to...
3341 (dump_context::dump_generic_expr): ...this new member function.
3342 Add the tree to any pending optinfo, creating one if need be.
3343 (dump_generic_expr_loc): Move implementation to...
3344 (dump_context::dump_generic_expr_loc): ...this new member
3345 function. Add the tree to any pending optinfo, creating one if
3347 (dump_printf): Move implementation to...
3348 (dump_context::dump_printf_va): ...this new member function. Add
3349 the text to any pending optinfo, creating one if need be.
3350 (dump_printf_loc): Move implementation to...
3351 (dump_context::dump_printf_loc_va): ...this new member function.
3352 Start a new optinfo and add the stmt to it.
3353 (dump_dec): Move implementation to...
3354 (dump_context::dump_dec): ...this new member function. Add the
3355 value to any pending optinfo, creating one if need be.
3356 (dump_context::dump_symtab_node): New member function.
3357 (dump_context::get_scope_depth): New member function.
3358 (dump_context::begin_scope): New member function.
3359 (dump_context::end_scope): New member function.
3360 (dump_context::ensure_pending_optinfo): New member function.
3361 (dump_context::begin_next_optinfo): New member function.
3362 (dump_context::end_any_optinfo): New member function.
3363 (dump_context::s_current): New global.
3364 (dump_context::s_default): New global.
3365 (dump_scope_depth): Delete global.
3366 (dumpfile_ensure_any_optinfo_are_flushed): New function.
3367 (dump_symtab_node): New function.
3368 (get_dump_scope_depth): Reimplement in terms of dump_context.
3369 (dump_begin_scope): Likewise.
3370 (dump_end_scope): Likewise.
3371 (selftest::temp_dump_context::temp_dump_context): New ctor.
3372 (selftest::temp_dump_context::~temp_dump_context): New dtor.
3373 (selftest::verify_item): New function.
3374 (ASSERT_IS_TEXT): New macro.
3375 (ASSERT_IS_TREE): New macro.
3376 (ASSERT_IS_GIMPLE): New macro.
3377 (selftest::test_capture_of_dump_calls): New test.
3378 (selftest::dumpfile_c_tests): Call it.
3379 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3380 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3381 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3382 descriptive comment.
3383 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3384 (dump_node, dump_bb): Move these unrelated decls.
3385 (class dump_manager): Add leading comment.
3386 * optinfo.cc: New file.
3387 * optinfo.h: New file.
3389 2018-07-19 Michael Collison <michael.collison@arm.com>
3390 Richard Henderson <rth@redhat.com>
3392 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3393 (subti): Handle op1 zero.
3394 (subvti4, usub4ti4): New.
3395 (*sub<GPI>3_compare1_imm): New.
3396 (sub<GPI>3_carryinCV): New.
3397 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3398 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3400 2018-07-19 Michael Collison <michael.collison@arm.com>
3401 Richard Henderson <rth@redhat.com>
3403 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3404 (addti3): Create simpler code if low part is already known to be 0.
3405 (addvti4, uaddvti4): New.
3406 (*add<GPI>3_compareC_cconly_imm): New.
3407 (*add<GPI>3_compareC_cconly): New.
3408 (*add<GPI>3_compareC_imm): New.
3409 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3410 handle constants within this pattern..
3411 (*add<GPI>3_compareV_cconly_imm): New.
3412 (*add<GPI>3_compareV_cconly): New.
3413 (*add<GPI>3_compareV_imm): New.
3414 (add<GPI>3_compareV): New.
3415 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3416 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3417 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3418 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3419 with 'comparison' operator.
3420 (*add<GPI>3_compareV_cconly_imm): Ditto.
3421 (*add<GPI>3_compareV_cconly): Ditto.
3422 (*add<GPI>3_compareV_imm): Ditto.
3423 (add<GPI>3_compareV): Ditto.
3424 (add<mode>3_carryinC): Ditto.
3425 (*add<mode>3_carryinC_zero): Ditto.
3426 (*add<mode>3_carryinC): Ditto.
3427 (add<mode>3_carryinV): Ditto.
3428 (*add<mode>3_carryinV_zero): Ditto.
3429 (*add<mode>3_carryinV): Ditto.
3431 2018-07-19 Michael Collison <michael.collison@arm.com>
3432 Richard Henderson <rth@redhat.com>
3434 * config/aarch64/aarch64-modes.def (CC_V): New.
3435 * config/aarch64/aarch64-protos.h
3436 (aarch64_addti_scratch_regs): Declare
3437 (aarch64_subvti_scratch_regs): Declare.
3438 (aarch64_expand_subvti): Declare.
3439 (aarch64_gen_unlikely_cbranch): Declare
3440 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3441 for signed overflow using CC_Vmode.
3442 (aarch64_get_condition_code_1): Handle CC_Vmode.
3443 (aarch64_gen_unlikely_cbranch): New function.
3444 (aarch64_addti_scratch_regs): New function.
3445 (aarch64_subvti_scratch_regs): New function.
3446 (aarch64_expand_subvti): New function.
3448 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3450 * config/aarch64/aarch64-option-extensions.def: New entry for profile
3452 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3453 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3456 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3459 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3460 address check not strict.
3462 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3464 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3466 (store_pair_lanes<mode>): Likewise.
3467 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3468 enum value 'ADDR_QUERY_LDP_STP_N'.
3469 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3470 (aarch64_print_address_internal): Add declaration.
3471 (aarch64_print_ldpstp_address): Remove.
3472 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3473 (aarch64_print_operand): Change printing of 'y'.
3474 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3475 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3476 'true' rather than '1'.
3477 * config/aarch64/constraints.md (Uml): Likewise.
3478 (Uml): Rename to Umn.
3481 2018-07-19 Richard Biener <rguenther@suse.de>
3483 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3485 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3486 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3487 (vn_reference_hasher): Likewise.
3488 (struct vn_tables_s): Remove obstack and alloc-pool members.
3489 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3490 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3491 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3492 (vn_reference_insert_pieces): Likewise.
3493 (alloc_vn_nary_op_noinit): Adjust.
3494 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3495 (vn_phi_eq): Adjust.
3496 (shared_lookup_phiargs): Remove.
3497 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3498 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3499 (visit_reference_op_call): Likewise.
3500 (copy_nary, copy_phi, copy_reference): Remove.
3501 (process_scc): Rewind the obstack when iterating. Do not
3502 copy the elements to valid_info but just move them from one
3503 hashtable to the other.
3504 (allocate_vn_table): Adjust.
3505 (free_vn_table): Likewise.
3506 (init_scc_vn): Likewise.
3507 (free_scc_vn): Likewise.
3509 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
3512 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3513 indirect_return as function type attribute.
3514 (ix86_attribute_table): Change indirect_return to function
3516 * doc/extend.texi: Update indirect_return attribute.
3518 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
3520 * wide-int.h (widest2_int): New.
3521 * gimple-fold.c (arith_overflowed_p): Use it.
3522 * tree.h (widest2_int_cst): New.
3523 * tree-vrp.c (wide_int_binop_overflow): Rename from
3524 vrp_int_const_binop.
3525 Rewrite to work on trees.
3526 (extract_range_from_multiplicative_op_1): Abstract code to...
3527 (wide_int_range_min_max): ...here.
3528 (wide_int_range_cross_product): ...and here.
3529 (extract_range_from_binary_expr_1): Abstract overflow code to...
3530 (wide_int_range_mult_wrapping): ...here.
3531 * tree-vrp.h (wide_int_range_cross_product): New.
3532 (wide_int_range_mult_wrapping): New.
3534 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
3535 Julia Koval <julia.koval@intel.com>
3537 * config/i386/x86-tune-costs.h (skylake_memcpy,
3538 skylake_memset): Replace rep_prefix with unrolling for size 512.
3540 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
3543 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3544 comparision with EQ_EXPR in last stmt.
3546 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
3548 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3549 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3550 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3551 previously known as "PowerPC AltiVec Built-in Functions". Move
3552 some material to new subsubsections "PowerPC AltiVec Built-in
3553 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3555 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3556 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3557 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3558 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3560 2018-07-18 Richard Biener <rguenther@suse.de>
3562 PR tree-optimization/86557
3563 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3566 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
3568 * config/s390/s390.c (s390_function_profiler): Generate CFI.
3570 2018-07-17 Jeff Law <law@redhat.com>
3572 * config/arm/arm.c (get_label_padding): Update for recent
3573 changes to label_to_alignment.
3575 PR tree-optimization/86010
3576 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3578 * config/mips/mips.c (vr4130_align_insns): Update for recent
3579 changes to label_to_alignment.
3581 * config/frv/frv.c (frv_label_align): Update for recent changes
3582 to label_to_alignment.
3584 * config/nios2/nios2.c (nios2_label_align): Update for recent
3585 changes which dropped ALIGN_LABELS_LOG.
3587 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
3589 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3590 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3592 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
3594 * config/arc/arc.c (arc_label_align): Use align_labels instead of
3595 deprecated align_labels_log.
3597 2018-07-17 Richard Biener <rguenther@suse.de>
3600 * dwarf2out.c (init_sections_and_labels): Always generate
3601 a debug_line_str_section for early LTO debug.
3602 (dwarf2out_finish): Reset debug_line_str_hash output early.
3603 Bump counter for extra dwarf5 .debug_loc labels to not conflict
3605 (dwarf2out_early_finish): Output debug_line_str.
3607 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3609 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3610 index register on z196 or later.
3612 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3614 * config/s390/s390.c (s390_default_align): Set default function
3616 (s390_override_options_after_change): Call s390_default align.
3617 (s390_option_override_internal): Call s390_default_align.
3618 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3620 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3623 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3624 to _looptemp_ clauses, other than the first two.
3626 2018-07-17 Martin Liska <mliska@suse.cz>
3628 * opts.c: Do not enable OPT_falign_* for -Os.
3630 2018-07-17 Martin Liska <mliska@suse.cz>
3632 * align.h (MAX_CODE_ALIGN): New.
3633 (MAX_CODE_ALIGN_VALUE): New.
3634 * common/config/i386/i386-common.c (ix86_handle_option):
3635 (MAX_CODE_ALIGN): Moved to align.h.
3636 * final.c (MAX_CODE_ALIGN): Likewise.
3637 * opts.c (parse_and_check_align_values):
3638 (MAX_CODE_ALIGN): Likewise.
3639 (MAX_CODE_ALIGN_VALUE): Likewise.
3641 2018-07-17 Martin Liska <mliska@suse.cz>
3643 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3644 in order to fulfil coding style.
3645 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3646 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3647 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3648 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3649 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3650 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3651 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3652 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3653 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3655 2018-07-17 Martin Liska <mliska@suse.cz>
3657 * align.h: New file.
3658 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3660 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3661 align_flags of label_to_alignment.
3662 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3664 * config/m68k/m68k.c: Do not use removed align_labels_value and
3666 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3667 (LOOP_ALIGN): Likewise.
3668 (LABEL_ALIGN): Likewise.
3669 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3670 Remove not used macro.
3671 (rs6000_loop_align): Change return type to align_flags.
3672 (rs6000_loop_align_max_skip): Remove.
3673 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3674 Change return type to align_flags.
3675 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3676 Remove not used macro.
3677 (rs6000_loop_align): Change return type to align_flags.
3678 (rs6000_loop_align_max_skip): Remove.
3679 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3680 * config/rx/rx-protos.h (rx_align_for_label): Make it
3682 * config/rx/rx.c (rx_align_for_label): Change return type
3684 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3686 into align_flags class.
3687 (LABEL_ALIGN): Likewise.
3688 (LOOP_ALIGN): Likewise.
3689 * config/s390/s390.c (s390_label_align): Use align_flags
3691 (s390_asm_output_function_label): Likewise.
3692 * config/sh/sh.c (sh_override_options_after_change):
3693 Use align_flags class directly without macros.
3694 (find_barrier): Likewise.
3695 (barrier_align): Likewise.
3696 (sh_loop_align): Likewise.
3697 * config/spu/spu.c (spu_option_override):
3698 Use align_flags_tuple::get_value instead of removed macros.
3699 (spu_sched_init): Likewise.
3700 * config/spu/spu.h (GTY): Likewise.
3701 * config/visium/visium.c (visium_option_override):
3702 Set "8" as default secondary alignment.
3703 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3704 in order to guarantee secondary alignment of 8.
3705 * coretypes.h: Include align.h header file.
3706 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3707 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3708 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3709 * doc/tm.texi.in: Likewise.
3710 * final.c (struct label_alignment): Remove not used structure.
3711 (LABEL_ALIGN): Change type to align_flags.
3712 (LOOP_ALIGN): Likewise.
3713 (JUMP_ALIGN): Likewise.
3714 (default_loop_align_max_skip): Remove.
3715 (default_label_align_max_skip): Likewise.
3716 (default_jump_align_max_skip): Likewise.
3717 (default_label_align_after_barrier_max_skip):
3718 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3719 (LABEL_TO_MAX_SKIP): Remove.
3720 (label_to_alignment): Return align_flags type instead of integer.
3721 (label_to_max_skip): Remove.
3722 (align_fuzz): Use align_flags type.
3723 (compute_alignments): Use align_flags type and use align_flags::max
3724 to combine multiple alignments.
3725 (grow_label_align): Grow vec instead of C array.
3726 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3727 (shorten_branches): Use align_flags type and use align_flags::max
3728 to combine multiple alignments.
3729 (final_scan_insn_1): Remove usage of secondary alignment that comes
3730 from label alignment, but instead use proper secondary alignment
3731 which is computed in grow_label_align.
3732 * flags.h (struct align_flags_tuple): Move to align.h.
3733 (struct align_flags): Likewise.
3734 (state_align_loops): Rename to align_loops.
3735 (state_align_jumps): Rename to align_jumps.
3736 (state_align_labels): Rename to align_labels.
3737 (state_align_functions): Rename to align_functions.
3738 (align_loops_log): Remove.
3739 (align_jumps_log): Remove.
3740 (align_labels_log): Remove.
3741 (align_functions_log): Remove.
3742 (align_loops_max_skip): Remove.
3743 (align_jumps_max_skip): Remove.
3744 (align_labels_max_skip): Remove.
3745 (align_functions_max_skip): Remove.
3746 (align_loops_value): Remove.
3747 (align_jumps_value): Remove.
3748 (align_labels_value): Remove.
3749 (align_functions_value): Remove.
3750 * output.h (label_to_alignment): Change return type to align_flags.
3751 (label_to_max_skip): Remove.
3752 * target.def: Remove loop_align_max_skip, label_align_max_skip,
3753 jump_align_max_skip macros.
3754 * targhooks.h (default_loop_align_max_skip): Remove.
3755 (default_label_align_max_skip): Likewise.
3756 (default_jump_align_max_skip): Likewise.
3757 (default_label_align_after_barrier_max_skip): Remove.
3758 * toplev.c (read_log_maxskip): Use ::normalize function.
3759 (parse_N_M): Remove not used argument and also call ::normalize.
3760 (parse_alignment_opts): Do not pass unused arguments.
3761 * varasm.c (assemble_start_function): Use directly align_functions
3762 instead of removed macros.
3763 * system.h: Do not poison removed macros.
3765 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3768 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3769 and cond temporaries don't have reference type if iterator has
3770 pointer type. For init use &for_pre_body instead of pre_p if
3771 for_pre_body is non-empty.
3773 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3775 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3776 double-double modes to SFmode directly directly.
3777 (trunc<mode>sf2_fprs): Delete.
3779 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3781 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3782 for conversions between IFmode and the decimal floating point modes.
3783 (init_float128_ieee): Use the correct names for conversions between
3784 KFmode and the decimal floating point modes.
3786 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3788 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3789 for the conversions between TDmode and IFmode.
3790 (init_float128_ieee): Use more correct names for the conversions
3791 between TDmode and KFmode.
3793 2018-07-16 Jakub Jelinek <jakub@redhat.com>
3795 PR tree-optimization/86526
3796 * builtins.c (expand_builtin_memcmp): Formatting fixes.
3797 (inline_expand_builtin_string_cmp): Likewise.
3798 (inline_string_cmp): Likewise. Use c_readstr instead of
3799 builtin_memcpy_read_str. Add unit_mode temporary.
3801 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3804 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3805 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3807 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
3809 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3810 Alphabetize prototypes of built-in functions, separating out
3811 built-in functions that are listed in this section but should be
3812 described elsewhere.
3814 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
3817 * expmed.c (emit_store_flag): Do not emit setcc followed by a
3818 conditional move when trapping comparison was split to a
3819 non-trapping one (and vice versa).
3821 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
3823 * config/s390/s390.c (s390_function_profiler): Generate nops
3824 instead of profiler call sequences.
3825 * config/s390/s390.opt: Add the new option.
3827 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
3829 * config/s390/s390.c (s390_function_profiler): Generate
3830 __mcount_loc section.
3831 * config/s390/s390.opt: Add the new option.
3833 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
3835 * common.opt: Add the new warning.
3836 * config/s390/s390.c (s390_function_profiler): Emit "brasl
3837 %r0,__fentry__" when -mfentry is specified.
3838 (s390_option_override_internal): Disallow -mfentry for 31-bit
3840 * config/s390/s390.opt: Add the new option.
3842 2018-07-16 Richard Biener <rguenther@suse.de>
3845 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3846 for function-local FUNCTION_DECL and RESULT_DECL immediately.
3848 2018-07-16 Martin Liska <mliska@suse.cz>
3851 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3854 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3856 * config/arc/arcHS.md: Update ARCHS scheduling rules.
3858 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3860 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3862 * config/arc/arc-cpus.def (hs4x): New cpu.
3864 * config/arc/arc-tables.opt: Regenerate.
3865 * config/arc/arc.c (arc_sched_issue_rate): New function.
3866 (TARGET_SCHED_ISSUE_RATE): Define.
3867 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3868 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3870 (attr tune): Add ARCHS4x tune values.
3871 (attr tune_dspmpy): Define.
3872 (*tst): Correct instruction type.
3873 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3874 * config/arc/arcHS4x.md: New file.
3875 * config/arc/fpu.md: Update instruction type attributes.
3876 * config/arc/t-multilib: Regenerate.
3878 2018-07-16 Tom de Vries <tdevries@suse.de>
3881 * var-tracking.c (vt_initialize): Fix pre_dec handling.
3883 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3885 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3888 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
3890 PR tree-optimization/86514
3891 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3892 conversion to a boolean type from a type with greater precision.
3894 2018-07-16 Tom de Vries <tdevries@suse.de>
3896 * var-tracking.c (vt_initialize): Print adjusted insn slim if
3897 dump_flags request TDF_SLIM.
3899 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
3901 * fold-const.c (int_const_binop_1): Abstract...
3902 (wide_int_binop): ...wide int code here.
3903 (poly_int_binop): ...poly int code here.
3904 Abstract the rest of int_const_binop_1 into int_const_binop.
3905 * fold-const.h (wide_int_binop): New.
3906 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3907 Remove useless PLUS/MINUS_EXPR case.
3908 (zero_nonzero_bits_from_vr): Move wide int code...
3909 (zero_nonzero_bits_from_bounds): ...here.
3910 (extract_range_from_binary_expr_1): Move mask optimization code...
3911 (range_easy_mask_min_max): ...here.
3912 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3913 (range_easy_mask_min_max): New.
3915 2018-07-15 Jeff Law <law@redhat.com>
3918 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3921 2018-07-14 Jim Wilson <jimw@sifive.com>
3923 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3925 2018-07-14 Paul Koning <ni1d@arrl.net>
3927 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3929 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
3931 * lto-streamer-out.c (copy_function_or_variable): Dump info about
3934 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
3935 Steve Munroe <munroesj52@gmail.com>
3937 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3938 (_mm_andnot_si128): Likewise.
3939 (_mm_or_si128): Likewise.
3940 (_mm_xor_si128): Likewise.
3942 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
3945 * builtins.c (expand_builtin_memcmp): Inline the calls first
3946 when result_eq is false.
3947 (expand_builtin_strcmp): Inline the calls first.
3948 (expand_builtin_strncmp): Likewise.
3949 (inline_string_cmp): New routine. Expand a string compare
3950 call by using a sequence of char comparison.
3951 (inline_expand_builtin_string_cmp): New routine. Inline expansion
3952 a call to str(n)cmp/memcmp.
3953 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3955 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3957 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
3959 * config/arm/driver-arm.c: Include arm-native.h.
3960 (host_detect_local_cpu): Use auto-generated data tables.
3961 (vendors, arm_cpu_table): Delete. Move part information to ...
3962 * config/arm/arm-cpus.in: ... here.
3963 * config/arm/parsecpu.awk (gen_native): New function.
3964 (vendor, part): New CPU fields.
3965 (END): Add support for building the native CPU detection tables.
3966 * config/arm/t-arm (arm-native.h): Add build rule.
3967 (driver-arm.o): Add dependency on arm-native.h.
3969 2018-07-13 Richard Biener <rguenther@suse.de>
3972 * match.pd (addr1 - addr2): Allow either of the operand to
3975 2018-07-13 Tom de Vries <tdevries@suse.de>
3977 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3980 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
3982 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3983 arrays instead of numbered variables.
3985 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
3987 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3988 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3990 2018-07-13 Richard Biener <rguenther@suse.de>
3993 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3994 instead of get_context_die.
3996 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
3997 Richard Biener <rguenther@suse.de>
4000 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4001 that the loop latch destination where phi is defined.
4003 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4005 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4006 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4007 (riscv_set_current_function): Extract getting interrupt type to new
4009 (riscv_get_interrupt_type): New function.
4010 (riscv_merge_decl_attributes): New function, checking interrupt type is
4012 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4014 2018-07-12 Paul Koning <ni1d@arrl.net>
4016 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4019 2018-07-12 Paul Koning <ni1d@arrl.net>
4021 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4022 zero reference, add doloop_end instead.
4023 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4024 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4025 detail for doloop_end.
4027 2018-07-12 Martin Sebor <msebor@redhat.com>
4030 * attribs.c (decl_attributes): Reject conflicting attributes before
4031 calling attribute handlers.
4033 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4035 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4037 (gcc::dump_manager::get_dump_file_name): likewise.
4038 (dump_begin): Likewise.
4039 * dumpfile.h (dump_begin): Update prototype.
4040 (gcc::dump_manager::get_dump_file_name,
4041 gcc::dump_manager::get_dump_file_name): Update prototype.
4043 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4045 * internal-fn.h (vectorizable_internal_fn_p): New function.
4046 * tree-vect-slp.c (compatible_calls_p): Likewise.
4047 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4048 to internal functions.
4049 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4051 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4053 * fold-const.h (inverse_conditions_p): Declare.
4054 * fold-const.c (inverse_conditions_p): New function.
4055 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4056 that test the inverse condition of a conditional internal function.
4057 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4058 * internal-fn.c (internal_fn_mask_index): Handle conditional
4060 (vectorized_internal_fn_supported_p): New function.
4061 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4062 (any_pred_load_store): Replace with...
4063 (need_to_predicate): ...this new variable.
4064 (redundant_ssa_names): New variable.
4065 (ifcvt_can_use_mask_load_store): Move initial checks to...
4066 (ifcvt_can_predicate): ...this new function. Handle tree codes
4067 for which a conditional internal function exists.
4068 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4069 instead of ifcvt_can_use_mask_load_store. Update after variable
4071 (predicate_load_or_store): New function, split out from
4072 predicate_mem_writes.
4073 (check_redundant_cond_expr): New function.
4074 (value_available_p): Likewise.
4075 (predicate_rhs_code): Likewise.
4076 (predicate_mem_writes): Rename to...
4077 (predicate_statements): ...this. Use predicate_load_or_store
4078 and predicate_rhs_code.
4079 (combine_blocks, tree_if_conversion): Update after above name changes.
4080 (ifcvt_local_dce): Handle redundant_ssa_names.
4081 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4082 general conditional functions.
4083 * tree-vect-stmts.c (vectorizable_call): Likewise.
4085 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4086 Alan Hayward <alan.hayward@arm.com>
4087 David Sherwood <david.sherwood@arm.com>
4089 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4090 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4091 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4092 plus and minus and convert them into IFN_COND_FMA-based sequences.
4093 (convert_mult_to_fma): Handle conditional plus and minus.
4095 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4097 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4098 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4099 (cond_fnms_optab): New optabs.
4100 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4102 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4103 * internal-fn.h (get_conditional_internal_fn): Declare.
4104 (get_unconditional_internal_fn): Likewise.
4105 * internal-fn.c (cond_ternary_direct): New macro.
4106 (expand_cond_ternary_optab_fn): Likewise.
4107 (direct_cond_ternary_optab_supported_p): Likewise.
4108 (FOR_EACH_COND_FN_PAIR): Likewise.
4109 (get_conditional_internal_fn): New function.
4110 (get_unconditional_internal_fn): Likewise.
4111 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4112 (gimple_match_op::gimple_match_op): Add a new overload for 5
4114 (gimple_match_op::set_op): Likewise.
4115 (gimple_resimplify5): Declare.
4116 * genmatch.c (decision_tree::gen): Generate simplifications for
4118 * gimple-match-head.c (gimple_simplify): Define an overload for
4119 5 operands. Handle calls with 5 arguments in the top-level overload.
4120 (convert_conditional_op): Handle conversions from unconditional
4121 internal functions to conditional ones.
4122 (gimple_resimplify5): New function.
4123 (build_call_internal): Pass a fifth operand.
4124 (maybe_push_res_to_seq): Likewise.
4125 (try_conditional_simplification): Try converting conditional
4126 internal functions to unconditional internal functions.
4127 Handle 3-operand unconditional forms.
4128 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4129 Define ternary equivalents of the current rules for binary conditional
4131 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4133 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4134 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4135 (optab): Handle them.
4136 (SVE_COND_FP_TERNARY): New int iterator.
4137 (sve_fmla_op, sve_fmad_op): New int attributes.
4138 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4139 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4140 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4142 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4144 * target.def (preferred_else_value): New target hook.
4145 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4146 * doc/tm.texi: Regenerate.
4147 * targhooks.h (default_preferred_else_value): Declare.
4148 * targhooks.c (default_preferred_else_value): New function.
4149 * internal-fn.h (conditional_internal_fn_code): Declare.
4150 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4151 (get_conditional_internal_fn): Use it.
4152 (conditional_internal_fn_code): New function.
4153 * gimple-match.h (gimple_match_cond): New struct.
4154 (gimple_match_op): Add a cond member function.
4155 (gimple_match_op::gimple_match_op): Update all forms to take a
4157 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4158 for the suboperation, but don't specify a particular else_value.
4159 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4160 (visit_nary_op, visit_reference_op_load): Pass
4161 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4162 * gimple-match-head.c: Include tree-eh.h
4163 (convert_conditional_op): New function.
4164 (maybe_resimplify_conditional_op): Likewise.
4165 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4166 (gimple_resimplify2): Likewise.
4167 (gimple_resimplify3): Likewise.
4168 (gimple_resimplify4): Likewise.
4169 (maybe_push_res_to_seq): Return null for conditional operations.
4170 (try_conditional_simplification): New function.
4171 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4173 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4175 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4177 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4179 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4181 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4183 (hash_tree): Do not hash DECL_FCONTEXT
4184 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4185 Do not stream DECL_FCONTEXT.
4186 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4187 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4189 2018-07-12 Richard Biener <rguenther@suse.de>
4192 * dwarf2out.c (gen_block_die): Only output blocks when they have
4193 at least one !DECL_IGNORED_P variable.
4195 2018-07-12 Richard Biener <rguenther@suse.de>
4198 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4199 Remove -mieee-fp handling.
4201 2018-07-12 Richard Biener <rguenther@suse.de>
4203 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4204 left-over from last patch.
4206 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4208 PR tree-optimization/86492
4209 * gimple-ssa-store-merging.c
4210 (imm_store_chain_info::coalesce_immediate_stores): Call
4211 check_no_overlap even for the merge_overlapping case. Formatting fix.
4213 2018-07-12 Richard Biener <rguenther@suse.de>
4216 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4217 move possibly trapping operations into the conditional.
4219 2018-07-12 Richard Biener <rguenther@suse.de>
4221 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4222 (vn_lookup_simplify_result): Remove recursion limit applied
4224 (vn_nary_build_or_lookup_1): Adjust.
4225 (try_to_simplify): Likewise.
4226 * gimple-match-head.c (gimple_resimplify1): Instead apply one
4228 (gimple_resimplify2): Likewise.
4229 (gimple_resimplify3): Likewise.
4230 (gimple_resimplify4): Likewise.
4232 2018-07-11 Jakub Jelinek <jakub@redhat.com>
4234 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4235 Use __mmask64 type instead of __mmask8 for __M argument.
4236 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4237 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4239 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4240 __mmask16 for __M argument.
4241 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4242 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4243 to __mmask16 instead of __mmask8.
4244 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4245 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4246 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4247 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4248 instead of __mmask16 for __U argument.
4249 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4250 __mmask16 instead of __mmask8 for __U argument.
4251 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4253 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4255 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4257 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4259 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4261 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4263 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4265 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4267 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4269 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4271 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4272 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4273 return type as well as __M argument type and all casts from __mmask8
4275 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4276 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4277 return type as well as __M argument type and all casts from __mmask8
4279 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4280 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4281 return type as well as __M argument type and all casts from __mmask8
4283 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4284 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4285 return type as well as __M argument type and all casts from __mmask8
4287 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4288 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4291 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
4293 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4294 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4297 2018-07-11 Paul Koning <ni1d@arrl.net>
4299 * doc/md.texi (define_subst): Document how multiple occurrences of
4300 the same argument in the replacement pattern are handled.
4302 2018-07-11 Paul Koning <ni1d@arrl.net>
4304 * doc/extend.texi (Common Variable Attributes): Move "mode" into
4306 (Common Type Attributes): Add "mode" attribute.
4308 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
4310 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4311 stream DECL_ORIGINAL_TYPE.
4312 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4313 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4314 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4315 Do not walk original type.
4316 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4318 (write_ts_decl_non_common_tree_pointers): Do not stream
4320 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4321 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4323 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4325 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4326 thread twice from the same starting edge.
4328 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4330 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4331 * gimple.c (gimple_call_nonnull_result_p): ...here...
4332 (gimple_call_nonnull_arg): ...and here.
4333 * gimple.h (gimple_call_nonnull_result_p): New.
4334 (gimple_call_nonnull_arg): New.
4336 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
4338 * config/arm/arm-cpus.in: Move information from fpu field of each
4339 cpu definition to the isa field.
4340 * config/arm/parsecpu.awk (fpu): Delete match rule.
4341 (gen_comm_data): Don't add bits from the CPU's FPU entry.
4343 2018-07-11 Richard Biener <rguenther@suse.de>
4346 * dwarf2out.c (init_sections_and_labels): Use
4347 output_asm_line_debug_info consistently.
4348 (dwarf2out_early_finish): Likewise.
4349 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4352 2018-07-11 Richard Biener <rguenther@suse.de>
4354 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4355 Rework father_bb setting in a way to avoid propagating constants
4356 multiple times on a loop body.
4358 2018-07-10 Mark Wielaard <mark@klomp.org>
4361 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4363 2018-07-10 Richard Biener <rguenther@suse.de>
4365 * hash-map.h (hash_map::iterator::operator*): Return
4366 references to key and value.
4368 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4371 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4372 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4373 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4374 (gimplify_omp_for): For composite loops, move outer
4375 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4376 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
4377 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
4378 TREE_LIST for both the original class iterator and the "last" helper
4379 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
4380 loop, remember has_decl_expr from outer composite loops for the
4381 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4383 2018-07-09 Martin Sebor <msebor@redhat.com>
4387 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4388 accessing implicitly initialized array elements.
4389 * expr.c (string_constant): Handle string initializers of
4390 character arrays within aggregates.
4391 * gimple-fold.c (fold_array_ctor_reference): Add argument.
4392 Store element offset. As a special case, handle zero size.
4393 (fold_nonarray_ctor_reference): Same.
4394 (fold_ctor_reference): Add argument. Store subobject offset.
4395 * gimple-fold.h (fold_ctor_reference): Add argument.
4397 2018-07-09 Paul Koning <ni1d@arrl.net>
4399 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4400 (pdp11_insn_cost): New function.
4401 (pdp11_md_asm_adjust): New function.
4402 (TARGET_INVALID_WITHIN_DOLOOP): Define.
4403 (pdp11_rtx_costs): Update to match machine better.
4404 (output_addr_const_pdp11): Correct format mismatch warnings.
4405 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4406 * config/pdp11/pdp11.md: General change to add base_cost and/or
4407 length attributes for use by new pdp11_insn_cost function.
4408 (MIN_BRANCH): Correct definition.
4410 (doloop_end): Use standard pattern name for looping pattern.
4411 (doloop_end_nocc): New.
4412 (movsf): Add another constraint alternative.
4413 (zero_extendqihi2): Add constraint alternatives for not in place
4415 (zero_extendhisi2): Remove.
4416 (shift patterns): Add CC handling variants.
4420 (define_peephole2): New peephole to recognize mov that sets CC for
4423 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4425 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4426 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4429 2018-07-09 Jakub Jelinek <jakub@redhat.com>
4432 * real.c (real_nextafter): Return true if result is denormal.
4434 2018-07-09 Martin Liska <mliska@suse.cz>
4436 * common.opt: Add back wrongly removed attribute.
4438 2018-07-09 Richard Biener <rguenther@suse.de>
4441 * dwarf2out.c (gen_block_die): For an early generated DIE
4442 always output high/low PC attributes.
4444 2018-07-09 Tom de Vries <tdevries@suse.de>
4446 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4447 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4448 onto VAR_DECL with abstract origin.
4450 2018-07-07 Jim Wilson <jimw@sifive.com>
4452 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4454 2018-07-07 Tom de Vries <tdevries@suse.de>
4456 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4458 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
4460 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4462 (combine_bound): Use wide-int overflow calculation instead of
4464 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4466 * fold-const.c (int_const_binop_2): Same.
4467 (extract_muldiv_1): Same.
4468 (fold_div_compare): Same.
4469 (fold_abs_const): Same.
4471 * poly-int.h (add): Same.
4475 * predict.c (predict_iv_comparison): Same.
4476 * profile-count.c (slow_safe_scale_64bit): Same.
4477 * simplify-rtx.c (simplify_const_binary_operation): Same.
4478 * tree-chrec.c (tree_fold_binomial): Same.
4479 * tree-data-ref.c (split_constant_offset_1): Same.
4480 * tree-if-conv.c (idx_within_array_bound): Same.
4481 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4482 * tree-ssa-phiopt.c (minmax_replacement): Same.
4483 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4484 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4485 * vr-values.c (vr_values::adjust_range_with_scev): Same.
4486 * wide-int.cc (wi::add_large): Same.
4487 (wi::mul_internal): Same.
4488 (wi::sub_large): Same.
4489 (wi::divmod_internal): Same.
4490 * wide-int.h: Change overflow type to overflow_type for neg, add,
4491 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4492 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4493 mul_internal, divmod_internal.
4494 (overflow_type): New enum.
4495 (accumulate_overflow): New.
4497 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4499 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4500 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4502 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4504 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4505 argument is checked for zero before entering loop, avoid checking again.
4507 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4509 * gimplify.h (generic_expr_could_trap_p): Set as global function.
4510 * gimplify.h (generic_expr_could_trap_p): Likwise.
4511 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4513 2018-07-06 Jakub Jelinek <jakub@redhat.com>
4515 PR tree-optimization/86401
4516 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4517 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4518 (fold_bit_and_mask): ... here. New helper function for match.pd.
4519 * fold-const.h (fold_bit_and_mask): Declare.
4520 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4522 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4525 * target.def (translate_mode_attribute): New hook.
4526 * targhooks.h (default_translate_mode_attribute): Declare.
4527 * targhooks.c (default_translate_mode_attribute): New function.
4528 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4529 * doc/tm.texi: Regenerate.
4530 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4531 (rs6000_translate_mode_attribute): New function.
4533 2018-07-06 Paul Koning <ni1d@arrl.net>
4535 * doc/md.texi (define_split): Document DONE and FAIL.
4536 (define_peephole2): Ditto.
4538 2018-07-05 Jeff Law <law@redhat.com>
4540 PR tree-optimization/86010
4541 * tree-ssa-dse.c (compute_trims): More aggressively trim at
4542 both the head and tail of mem* and str* calls.
4544 2018-07-05 Jim Wilson <jimw@sifive.com>
4546 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4548 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
4550 * config/aarch64/aarch64-simd.md: correct flags text for
4551 MIN_EXPR replacement.
4553 2018-07-05 James Clarke <jrtc27@jrtc27.com>
4555 * configure: Regenerated.
4557 2018-07-05 Carl Love <cel@us.ibm.com>
4559 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4560 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4561 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4562 VSX_BUILTIN_DOUBLEL_V4SF.
4564 2018-07-05 Martin Sebor <msebor@redhat.com>
4567 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4568 than its domain to compute its the upper bound of a char array.
4570 2018-07-05 Nathan Sidwell <nathan@acm.org>
4572 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4573 * doc/cpp.texi: Update comment.
4574 * doc/tm.texi: Rebuilt.
4575 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4576 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4577 * doc/extend.texi (Backwards Compatibility): Clarify it is system
4578 headers affected by extern "C".
4579 * system.h: Poison NO_IMPLICIT_EXTERN_C.
4580 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4581 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4582 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4583 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4584 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4585 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4586 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4587 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4588 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4589 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4590 config/sparc/sp64-elf.h, config/spu/spu.h,
4591 config/stormy16/stormy16.h, config/v850/v850.h,
4592 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4593 define NO_IMPLICIT_EXTERN_C.
4594 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4596 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4599 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4600 instead of GET_MODE_SIZE when comparing Units.
4602 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4605 * rtlanal.c (set_noop_p): Constrain on mode change,
4606 include hard-reg-set.h
4608 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4610 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4612 2018-07-05 Jakub Jelinek <jakub@redhat.com>
4615 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4618 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4620 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4622 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4625 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4627 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4629 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
4632 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4634 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
4636 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4637 neg_*_op* variables.
4639 2018-07-04 Martin Liska <mliska@suse.cz>
4641 * tree-switch-conversion.c: Define
4642 max_ratio_for_speed and max_ratio_for_size constants.
4644 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
4645 Martin Liska <mliska@suse.cz>
4650 * common.opt: Rename align options with 'str_' prefix.
4651 * common/config/i386/i386-common.c (set_malign_value): New
4653 (ix86_handle_option): Use it to set -falign-* options/
4654 * config/aarch64/aarch64-protos.h (struct tune_params): Change
4655 type from int to string.
4656 * config/aarch64/aarch64.c: Update default values from int
4658 * config/alpha/alpha.c (alpha_override_options_after_change):
4660 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4661 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4662 max skip conditionally.
4663 * config/i386/freebsd.h (SUBALIGN_LOG): New.
4664 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4665 max skip conditionally.
4666 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4667 max skip conditionally.
4668 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4669 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4670 max skip conditionally.
4671 * config/i386/i386.c (struct ptt): Change type from int to
4673 (ix86_default_align): Set default values.
4674 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4675 max skip conditionally.
4676 * config/i386/iamcu.h (SUBALIGN_LOG): New.
4677 (ASM_OUTPUT_MAX_SKIP_ALIGN):
4678 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4679 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4680 max skip conditionally.
4681 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4682 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4683 * config/i386/x86-64.h (SUBALIGN_LOG): New.
4684 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4685 max skip conditionally.
4686 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4687 * config/ia64/ia64.c (ia64_option_override): Set default values
4688 for alignment options.
4689 * config/m68k/m68k.c: Handle new str_align_* options.
4690 * config/mips/mips.c (mips_set_compression_mode): Change
4692 (mips_option_override): Set default values for options.
4693 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4695 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4697 * config/rx/rx.c (rx_option_override): Likewise.
4698 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4699 (LABEL_ALIGN): Use align_labels_log.
4700 (LOOP_ALIGN): Use align_loops_align.
4701 * config/s390/s390.c (s390_asm_output_function_label): Use new
4703 * config/sh/sh.c (sh_override_options_after_change):
4704 Change type of constants.
4705 * config/spu/spu.c (spu_sched_init): Likewise.
4706 * config/sparc/sparc.c (sparc_option_override): Set default
4708 * config/visium/visium.c (visium_option_override): Likewise.
4709 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4710 emit p2align format with last argument if it's not needed.
4711 * doc/invoke.texi: Document extended format of -falign-*.
4712 * final.c: Use align_labels alignment.
4713 * flags.h (struct target_flag_state): Change type to use
4715 (struct align_flags_tuple): New.
4716 (struct align_flags): Likewise.
4717 (align_loops_log): Redefine macro to use new types.
4718 (align_loops_max_skip): Redefine macro to use new types.
4719 (align_jumps_log): Redefine macro to use new types.
4720 (align_jumps_max_skip): Redefine macro to use new types.
4721 (align_labels_log): Redefine macro to use new types.
4722 (align_labels_max_skip): Redefine macro to use new types.
4723 (align_functions_log): Redefine macro to use new types.
4724 (align_loops): Redefine macro to use new types.
4725 (align_jumps): Redefine macro to use new types.
4726 (align_labels): Redefine macro to use new types.
4727 (align_functions): Redefine macro to use new types.
4728 (align_functions_max_skip): Redefine macro to use new types.
4729 (align_loops_value): New macro.
4730 (align_jumps_value): New macro.
4731 (align_labels_value): New macro.
4732 (align_functions_value): New macro.
4733 * function.c (invoke_set_current_function_hook): Propagate
4734 alignment values from flags to global variables default in
4736 * ipa-icf.c (sem_function::equals_wpa): Use
4737 cl_optimization_option_eq instead of memcmp.
4738 * lto-streamer.h (cl_optimization_stream_out): Support streaming
4740 (cl_optimization_stream_in): Likewise.
4741 * optc-save-gen.awk: Support strings in cl_optimization.
4742 * opth-gen.awk: Likewise.
4743 * opts.c (finish_options): Remove error checking of invalid
4745 (MAX_CODE_ALIGN): Remove.
4746 (MAX_CODE_ALIGN_VALUE): Likewise.
4747 (parse_and_check_align_values): New function.
4748 (check_alignment_argument): Likewise.
4749 (common_handle_option): Use check_alignment_argument.
4750 * opts.h (parse_and_check_align_values): Declare.
4751 * toplev.c (init_alignments): Remove.
4752 (read_log_maxskip): New.
4753 (parse_N_M): Likewise.
4754 (parse_alignment_opts): Likewise.
4755 (backend_init_target): Remove usage of init_alignments.
4756 * toplev.h (parse_alignment_opts): Declare.
4757 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4759 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4760 * tree.c (cl_option_hasher::equal): New.
4761 * varasm.c: Use new global macros.
4763 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
4765 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4766 Use a simpler align directive also if MAXSKIP = ALIGN-1.
4767 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4768 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4769 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4770 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4771 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4772 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4773 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4774 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4775 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4776 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4777 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4779 2018-07-04 Martin Liska <mliska@suse.cz>
4780 Jonathan Wakely <jwakely@redhat.com>
4782 * coverage.c: Use correct type.
4783 * doc/invoke.texi: Language correction.
4785 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
4788 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4789 ENDBRANCH for non-tail call which may return via indirect branch.
4790 * doc/extend.texi: Document indirect_return attribute.
4792 2018-07-03 Martin Sebor <msebor@redhat.com>
4794 PR tree-optimization/86274
4795 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4797 (format_floating): Correct handling of infinities and NaNs.
4799 2018-07-03 Martin Sebor <msebor@redhat.com>
4801 * print-tree.c (print_real_cst): New function.
4802 (print_node_brief): Call it.
4803 (print_node): Ditto.
4805 2018-07-03 Jeff Law <law@redhat.com>
4807 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4808 into a single pattern.
4810 * config/h8300/h8300.md (ors code_iterator): New.
4811 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4812 a single pattern and single splitter.
4813 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4814 (iorqi3_1, xorqi3_1): Likewise.
4815 (iorqi3, xorqi3 expanders): Similarly.
4817 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4818 (movmd_internal) into a single pattern using the P mode iterator.
4819 (movmd splitters): Similarly.
4820 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4821 (movsd splitters): Similarly.
4823 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4824 ADDB, ADDW and ADDL into a single ADD attribute which selects the
4825 right table based on the size of the operand.
4826 * config/h8300/h8300.md (length_table): Corresponding changes. All
4827 references to "addb", "addw" and "addl" changed to "add".
4828 (btst patterns): Merge two variants into a single pattern.
4829 (tstqi, tsthi): Likewise.
4830 (addhi3_incdec, addsi3_incdec): Likewise.
4831 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4832 (mulhi3, mulsi3): Likewise.
4833 (udivhi3, udivsi3): Likewise.
4834 (divhi3, divsi3): Likewise.
4835 (andorqi3, andorhi3, andorsi3): Likewise.
4837 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
4840 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4841 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4843 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4845 PR tree-optimization/85694
4846 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4847 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4849 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4850 (<u>avg<mode>3_ceil): New patterns.
4852 2018-07-03 David Malcolm <dmalcolm@redhat.com>
4854 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4855 scan-tree-dump directive.
4856 * gcc.dg/vect/slp-perm-2.c: Likewise.
4857 * gcc.dg/vect/slp-perm-3.c: Likewise.
4858 * gcc.dg/vect/slp-perm-5.c: Likewise.
4859 * gcc.dg/vect/slp-perm-6.c: Likewise.
4860 * gcc.dg/vect/slp-perm-7.c: Likewise.
4861 * gcc.dg/vect/slp-perm-8.c: Likewise.
4863 2018-07-03 Marek Polacek <polacek@redhat.com>
4866 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4868 2018-07-03 Richard Biener <rguenther@suse.de>
4871 * tree-ssa-structalias.c (find_func_clobbers): Properly
4872 handle indirect calls.
4874 2018-07-03 Jeff Law <law@redhat.com>
4876 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4877 (shifts): New code iterator.
4878 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4879 expander. Fix HImode handling on H8/SX.
4880 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4881 (subqi3, subhi3, subsi3 expanders): Likewise.
4882 (andqi3, andhi3, andsi3 expanders): Likewise.
4883 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4884 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4885 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4886 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4887 (zero_extendqihi2, zero_extendqisi2): Likewise.
4888 (extendqihi2, extendqisi2): Likewise.
4889 (rotlqi3, rotlhi3, rotlsi3): Likewise.
4890 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4891 (rotlqi3_1, rotlhi3_1): Likewise.
4892 (logicalhi3_sn, logicalsi3_sn): Likewise.
4893 (logicalhi3, logicalsi3): Likewise.
4895 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4897 * tree-vect-patterns.c (vect_recog_rotate_pattern)
4898 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4899 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4900 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4901 type to append_pattern_def_seq instead of creating a stmt_vec_info
4903 (build_mask_conversion): Likewise. Remove vinfo argument.
4904 (vect_add_conversion_to_patterm): Likewise, renaming to...
4905 (vect_add_conversion_to_pattern): ...this.
4906 (vect_recog_mask_conversion_pattern): Update call to
4907 build_mask_conversion. Pass the vector type to
4908 append_pattern_def_seq here too.
4909 (vect_recog_gather_scatter_pattern): Update call to
4910 vect_add_conversion_to_pattern.
4912 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4914 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4915 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4916 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4917 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4918 STMT_VINFO_PATTERN_DEF_SEQ to null here.
4919 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4920 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4921 append_pattern_def_seq instead of new_pattern_def_seq.
4922 (vect_recog_divmod_pattern): Do both of the above.
4923 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4926 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4928 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4929 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4930 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4931 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4932 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4933 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4934 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4935 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4936 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4937 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4938 parameter with a single stmt_vec_info.
4939 (vect_recog_func_ptr): Likewise.
4940 (vect_recog_gather_scatter_pattern): Likewise, folding in...
4941 (vect_try_gather_scatter_pattern): ...this.
4942 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4943 the stmt_vec_info of the statement to be matched. Don't clear
4944 STMT_VINFO_RELATED_STMT.
4945 (vect_pattern_recog): Update call accordingly.
4947 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4949 PR tree-optimization/85694
4950 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4951 (uavgM3_ceil): Document new optabs.
4952 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4953 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4955 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4956 (savg_ceil_optab): New optabs.
4957 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4958 (vect_vect_recog_func_ptrs): Add it.
4959 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4960 constant directly from the associated lhs.
4962 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4964 * tree-vect-patterns.c (vect_split_statement): New function.
4965 (vect_convert_input): Use it to try to split an existing cast.
4967 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4969 * poly-int.h (print_hex): New function.
4970 * dumpfile.h (dump_dec, dump_hex): Declare.
4971 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4972 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4973 min_input_precision, operation_precision and operation_sign.
4974 * tree-vect-patterns.c (vect_get_range_info): New function.
4975 (vect_same_loop_or_bb_p, vect_single_imm_use)
4976 (vect_operation_fits_smaller_type): Delete.
4977 (vect_look_through_possible_promotion): Add an optional
4978 single_use_p parameter.
4979 (vect_recog_over_widening_pattern): Rewrite to use new
4980 stmt_vec_info infomration. Handle one operation at a time.
4981 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4982 (vect_truncatable_operation_p, vect_set_operation_type)
4983 (vect_set_min_input_precision): New functions.
4984 (vect_determine_min_output_precision_1): Likewise.
4985 (vect_determine_min_output_precision): Likewise.
4986 (vect_determine_precisions_from_range): Likewise.
4987 (vect_determine_precisions_from_users): Likewise.
4988 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4989 (vect_vect_recog_func_ptrs): Put over_widening first.
4991 (vect_pattern_recog): Call vect_determine_precisions.
4993 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4995 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4996 statements that have been replaced by further pattern statements.
4997 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4999 2018-07-03 Richard Biener <rguenther@suse.de>
5001 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5002 always set *dt. Dump vectype in vectype overload.
5003 * dumpfile.h (dump_gimple_expr): New function.
5004 (dump_gimple_expr_loc): Likewise.
5005 * dumpfile.c (dump_gimple_expr): New function.
5006 (dump_gimple_expr_loc): Likewise.
5008 2018-07-02 Jeff Law <law@redhat.com>
5010 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5011 the H8/300, H8/300H and H8/S variants into a single pattern.
5012 (movhi_h8300, movqi_h8300hs): Similarly.
5013 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5014 (QHI mode iterator): New.
5016 * config/h8300/h8300.md: Remove trailing whitespace.
5018 2018-07-02 Jim Wilson <jimw@sifive.com>
5020 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5021 instead of emit_insn for interrupt returns.
5022 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5023 (riscv_sret, riscv_uret): Likewise.
5025 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5027 * pretty-print.c (selftest::test_pp_format): Move save and restore
5028 of quotes to class auto_fix_quotes, and add an instance.
5029 * selftest.c: Include "intl.h".
5030 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5031 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5032 * selftest.h (selftest::auto_fix_quotes): New class.
5034 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5036 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5037 (aarch64_sve_prepare_conditional_op): Remove.
5038 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5039 Allow aarch64_simd_reg_or_zero as select operand; remove
5040 the aarch64_sve_prepare_conditional_op call.
5041 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5042 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5043 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5044 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5045 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5046 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5047 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5048 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5049 and a splitters to match all of the *_any patterns.
5050 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5052 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5053 (SVE_COND_FP_BINARY_REV): Remove.
5054 (sve_int_op_rev, sve_fp_op_rev): New.
5055 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5056 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5057 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5058 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5059 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5060 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5061 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5062 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5063 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5065 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5066 Remove match_dup 1 from the inner unspec.
5067 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5069 * config/aarch64/aarch64.md (movprfx): New attr.
5070 (length): Default movprfx to 8.
5071 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5072 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5073 (*<su>mul<SVE_I>3_highpart): Likewise.
5074 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5075 (*v<ASHIFT><SVE_I>3): Likewise.
5076 (*<su><MAXMIN><SVE_I>3): Likewise.
5077 (*<su><MAXMIN><SVE_F>3): Likewise.
5078 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5079 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5080 (*div<SVE_F>4): Likewise.
5082 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5084 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5087 2018-07-02 Richard Biener <rguenther@suse.de>
5089 PR tree-optimization/86363
5090 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5091 memset argument refers to a non-variable address.
5093 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5095 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5096 {PLUS,MINUS}_EXPR code to...
5097 (adjust_symbolic_bound): ...here,
5098 (combine_bound): ...here,
5099 (set_value_range_with_overflow): ...and here.
5101 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5103 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5105 (extract_range_from_abs_expr): ...here.
5107 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5109 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5110 -fno-omit-frame-pointer when not optimizing.
5112 2018-07-02 Martin Liska <mliska@suse.cz>
5115 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5116 (propagate_nothrow): Likewise.
5118 2018-07-02 Martin Liska <mliska@suse.cz>
5121 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5123 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5125 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5126 function in r262149, changing "loc" param from source_location to
5127 const dump_location_t &.
5128 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5129 declaration, as above.
5131 2018-07-01 Paul Koning <ni1d@arrl.net>
5133 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5134 -munit-asm, -mgnu-asm, -mdec-asm.
5135 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5136 (pdp11_output_labelref): New.
5137 (pdp11_output_def): New.
5138 (pdp11_output_addr_vec_elt): New.
5139 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5140 %# and %@ format codes.
5141 (pdp11_option_override): New.
5142 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5143 (pdp11_output_ident): New.
5144 (pdp11_asm_named_section): New.
5145 (pdp11_asm_init_sections): New.
5146 (pdp11_file_start): New.
5147 (pdp11_file_end): New.
5148 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5149 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5150 %o, like %c but octal.
5151 (pdp11_option_override): New.
5152 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5154 (DATA_SECTION_ASM_OP): Ditto.
5155 (READONLY_DATA_SECTION_ASM_OP): New.
5156 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5157 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5158 (ASM_OUTPUT_LABELREF): Ditto.
5159 (ASM_OUTPUT_DEF): Ditto.
5160 (ASM_OUTPUT_EXTERNAL): New.
5161 (ASM_OUTPUT_SOURCE_FILENAME): New.
5162 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5163 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5164 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5165 %# and %@ format codes.
5166 * config/pdp11/pdp11.opt (mgnu-asm): New.
5167 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5168 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5169 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5171 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5173 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5174 dereferencing path[] beyond its length.
5176 (debug_all_paths): New.
5177 (rewire_first_differing_edge): New.
5178 (adjust_paths_after_duplication): New.
5179 (duplicate_thread_path): Call adjust_paths_after_duplication.
5181 (thread_through_all_blocks): Add new argument to
5182 duplicate_thread_path.
5184 2018-06-30 Jim Wilson <jimw@sifive.com>
5186 * config/riscv/predicates.md (p2m1_shift_operand): New.
5187 (high_mask_shift_operand): New.
5188 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5189 pattern using p2m1_shift_operand.
5190 (lshsi3_zero_extend_3+2): New combiner pattern using
5191 high_mask_shift_operand.
5193 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5195 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5197 (vect_recog_rotate_pattern): ...here.
5198 (vect_convert_input): Try to insert casts of invariants in the
5200 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5201 preheader to be empty.
5203 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5205 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5206 vector type. If given, install it in the new statement's
5208 (vect_element_precision): New function.
5209 (vect_unpromoted_value): New struct.
5210 (vect_unpromoted_value::vect_unpromoted_value): New function.
5211 (vect_unpromoted_value::set_op): Likewise.
5212 (vect_look_through_possible_promotion): Likewise.
5213 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5214 (vect_widened_op_tree, vect_convert_input): Likewise.
5215 (vect_convert_inputs, vect_convert_output): Likewise.
5216 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5217 to handle the optional cast of the multiplication result and
5218 vect_widened_op_tree to detect the widened multiplication itself.
5219 Do not require the input and output of promotion casts to have
5220 the same sign, but base the signedness of the operation on the
5221 input rather than the result. If the pattern includes two
5222 promotions, check that those promotions have the same sign.
5223 Do not restrict the MULT_EXPR handling to a double-width result;
5224 handle quadruple-width results and wider. Use vect_convert_inputs
5225 to convert the inputs to the common type.
5226 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
5227 to handle the optional cast of the ABS result. Also allow a sign
5228 change or a sign extension between the ABS and MINUS.
5229 Use vect_widened_op_tree to detect the widened subtraction and use
5230 vect_convert_inputs to convert the inputs to the common type.
5231 (vect_handle_widen_op_by_const): Delete.
5232 (vect_recog_widen_op_pattern): New function.
5233 (vect_recog_widen_mult_pattern): Use it.
5234 (vect_recog_widen_shift_pattern): Likewise.
5235 (vect_recog_widen_sum_pattern): Use
5236 vect_look_through_possible_promotion to handle the promoted
5239 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5241 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5242 the containing gimple_seq *.
5243 * gimple-iterator.h (gsi_for_stmt): Declare it.
5244 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5245 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5246 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5247 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5248 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5250 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5252 (vect_mark_pattern_stmts): ...here. Handle cases in which the
5253 statement being replaced is part of an existing pattern
5254 definition sequence, inserting the new pattern statements before
5256 (vect_pattern_recog_1): Don't return a bool. If the statement
5257 is already part of a pattern, instead apply pattern matching
5258 to the pattern definition statements. Don't clear the
5259 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5260 (vect_pattern_recog): Don't break after the first match;
5261 continue processing the pattern definition statements instead.
5262 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5264 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5266 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5267 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5268 (vect_recog_widen_sum_pattern): Use it.
5270 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5272 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5273 phi is not a pattern statement and has not been replaced by
5274 a pattern statement.
5275 * tree-vect-patterns.c (type_conversion_p): Don't check
5276 STMT_VINFO_IN_PATTERN_P.
5277 (vect_recog_vector_vector_shift_pattern): Likewise.
5278 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5279 the pattern statement rather than the original statement; check
5280 directly for a WIDEN_MULT_EXPR here.
5281 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5282 vect_is_simple_use to return the pattern statement rather
5283 than the original statement; use is_pattern_stmt_p to check
5284 for such a pattern statement.
5285 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5286 to return the pattern statement rather than the original statement;
5287 don't do the same transformation here.
5288 (vect_is_simple_use): If the defining statement has been replaced
5289 by a pattern statement, return the pattern statement instead.
5290 Remove the corresponding (local) transformation from the vectype
5293 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5295 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5296 end and default to null.
5297 * tree-vect-loop.c (vect_create_epilog_for_reduction)
5298 (vectorizable_reduction): Update calls accordingly, dropping the
5299 gimple ** argument if the passed-back statement isn't needed.
5300 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5301 (vect_recog_rotate_pattern): Likewise.
5302 (vect_recog_mask_conversion_pattern): Likewise.
5303 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5304 (vect_mask_constant_operand_p): Likewise.
5305 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5306 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5307 (get_group_load_store_type, get_load_store_type): Likewise.
5308 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5309 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5310 (vectorizable_conversion, vectorizable_assignment): Likewise.
5311 (vectorizable_shift, vectorizable_operation): Likewise.
5312 (vectorizable_store, vect_is_simple_cond): Likewise.
5313 (vectorizable_condition, vectorizable_comparison): Likewise.
5314 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5315 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5316 and move it to the end. Cope with null def_stmt_outs.
5318 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5320 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5322 2018-06-29 Jeff Law <law@redhat.com>
5324 * config/v850/v850.c (v850_legitimate_address_p): Handle large
5325 displacements for TARGET_V850E2V3 and newer.
5326 (TARGET_LRA_P): Remove. Defaults to LRA now.
5327 * config/v850/v850.md (sign23byte_load): Remove.
5328 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5329 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5331 2018-06-29 Martin Liska <mliska@suse.cz>
5334 * coverage.c (coverage_init): Mangle full path name.
5335 * doc/invoke.texi: Document the change.
5336 * gcov-io.c (mangle_path): New.
5337 * gcov-io.h (mangle_path): Likewise.
5338 * gcov.c (mangle_name): Use mangle_path for path mangling.
5340 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5342 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5343 if starting source register is not even.
5345 2018-06-29 Martin Liska <mliska@suse.cz>
5347 PR tree-optimization/86263
5348 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5349 Make edge redirection.
5351 2018-06-29 David Malcolm <dmalcolm@redhat.com>
5353 * dumpfile.c (dump_loc): Add indentation based on scope depth.
5354 (dump_scope_depth): New variable.
5355 (get_dump_scope_depth): New function.
5356 (dump_begin_scope): New function.
5357 (dump_end_scope): New function.
5358 * dumpfile.h (get_dump_scope_depth): New declaration.
5359 (dump_begin_scope): New declaration.
5360 (dump_end_scope): New declaration.
5361 (class auto_dump_scope): New class.
5362 (AUTO_DUMP_SCOPE): New macro.
5363 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5366 2018-06-29 Richard Biener <rguenther@suse.de>
5368 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5369 compute_all_dependences succeeds.
5370 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5371 exceed --param loop-max-datarefs-for-datadeps.
5373 2018-06-29 Jakub Jelinek <jakub@redhat.com>
5375 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5377 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
5380 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5381 alternative 0 in preferred_for_speed attribute.
5383 2018-06-28 Paul Koning <ni1d@arrl.net>
5385 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5386 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5387 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5388 * config/pdp11/pdp11.md: Correct "length" attribute calculation
5389 for shift insn patterns.
5391 2018-06-28 David Malcolm <dmalcolm@redhat.com>
5393 * cgraph.c (cgraph_node::get_body): Replace assignments to
5394 "dump_file" with calls to set_dump_file.
5395 * dumpfile.c (alt_dump_file): Make static, and group with...
5396 (alt_flags): ...this definition.
5397 (dumps_are_enabled): New variable.
5398 (refresh_dumps_are_enabled): New function.
5399 (set_dump_file): New function.
5400 (set_alt_dump_file): New function.
5401 (gcc::dump_manager::dump_start): Replace assignments to
5402 "dump_file" and "alt_dump_file" with calls to set_dump_file and
5404 (gcc::dump_manager::dump_finish): Likewise.
5405 * dumpfile.h (alt_dump_file): Delete decl.
5406 (dumps_are_enabled): New variable decl.
5407 (set_dump_file): New function decl.
5408 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5410 * tree-nested.c (lower_nested_functions): Replace assignments to
5411 "dump_file" with calls to set_dump_file.
5413 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5415 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5416 goto_locus of each outgoing edge of each basic block.
5418 2018-06-28 Richard Biener <rguenther@suse.de>
5420 * dwarf2out.c (decl_scope_table): Remove.
5421 (push_decl_scope): Likewise.
5422 (pop_decl_scope): Likewise.
5423 (gen_type_die_for_member): Do not call push/pop_decl_scope.
5424 (gen_struct_or_union_type_die): Likewise.
5425 (gen_tagged_type_die): Likewise.
5426 (dwarf2out_init): Do not initialize decl_scope_table.
5427 (dwarf2out_c_finalize): Do not free it.
5429 2018-06-28 Richard Biener <rguenther@suse.de>
5431 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5432 deciding whether to not re-use a DIE.
5434 2018-06-28 Richard Biener <rguenther@suse.de>
5436 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5437 DW_AT_abstract_origin attribute.
5439 2018-06-28 Martin Liska <mliska@suse.cz>
5441 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5442 Use newly introduced constants.
5443 * tree-switch-conversion.h (struct jump_table_cluster):
5444 Define max_ratio_for_size and max_ratio_for_speed.
5446 2018-06-28 Martin Liska <mliska@suse.cz>
5448 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5449 Add new checking assert to catch invalid state.
5450 (jump_table_cluster::can_be_handled): Handle single case
5452 (jump_table_cluster::is_beneficial): Bail out for such case.
5453 (bit_test_cluster::find_bit_tests):
5454 Add new checking assert to catch invalid state.
5455 (bit_test_cluster::can_be_handled): Handle single case
5457 (bit_test_cluster::is_beneficial): Bail out for such case.
5458 (switch_decision_tree::analyze_switch_statement):
5461 2018-06-28 Martin Liska <mliska@suse.cz>
5463 * common.opt: Introduce -completion option.
5464 * gcc.c (driver_handle_option): Handle it.
5465 (driver::main): Print completions if completion
5467 * opt-suggestions.c (option_proposer::get_completions):
5469 (option_proposer::suggest_completion): Likewise.
5470 (option_proposer::find_param_completions): Likewise.
5471 (verify_autocompletions): Likewise.
5472 (test_completion_valid_options): Likewise.
5473 (test_completion_valid_params): Likewise.
5474 (in_completion_p): Likewise.
5475 (empty_completion_p): Likewise.
5476 (test_completion_partial_match): Likewise.
5477 (test_completion_garbage): Likewise.
5478 (opt_proposer_c_tests): Likewise.
5479 * opt-suggestions.h: Declare new functions.
5480 * opts.c (common_handle_option): Handle OPT__completion_.
5481 * selftest-run-tests.c (selftest::run_tests): Add
5482 opt_proposer_c_tests.
5483 * selftest.c (assert_str_startswith): New.
5484 * selftest.h (assert_str_startswith): Likewise.
5485 (opt_proposer_c_tests): New.
5486 (ASSERT_STR_STARTSWITH): Likewise.
5488 2018-06-28 Martin Liska <mliska@suse.cz>
5490 * Makefile.in: Add opt-suggestions.o.
5491 * gcc-main.c: Include opt-suggestions.h.
5492 * gcc.c (driver::driver): Likewise.
5493 (driver::~driver): Remove m_option_suggestions.
5494 (driver::build_option_suggestions): Moved to option_proposer.
5495 (driver::suggest_option): Likewise.
5496 (driver::handle_unrecognized_options): Use option_proposer.
5497 * gcc.h (class driver): Add new memver m_option_proposer.
5498 * opt-suggestions.c: New file.
5499 * opt-suggestions.h: New file.
5501 2018-06-28 Martin Liska <mliska@suse.cz>
5503 * vec.h (class auto_string_vec): New (moved from auto_argvec).
5504 (auto_string_vec::~auto_string_vec): Likewise.
5506 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5508 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5509 prevent_decl_creation_for_types fields up and add reset_location field.
5510 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5511 statement if id->reset_location is true.
5512 (copy_edges_for_bb): Do not set goto_locus on the new edges if
5513 id->reset_location is true.
5514 (copy_phis_for_bb): Force input_location on the arguments if
5515 id->reset_location is true.
5516 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5517 is set on the function to be inlined.
5519 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
5521 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5523 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
5525 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5526 registers for Pmode.
5527 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5528 hard registers for the clobbered pseudo.
5530 2018-06-27 Paul Koning <ni1d@arrl.net>
5532 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5533 mutually exclusive options.
5534 * config/pdp11/constraints.md (h): New constraint.
5535 (O): Update definition to match shift code generation.
5536 (D): New constraint.
5537 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5539 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5541 (output_jump): Change arguments.
5542 (pdp11_fixed_cc_regs): New function.
5543 (pdp11_cc_mode): Ditto.
5544 (pdp11_expand_shift): Ditto.
5545 (pdp11_assemble_shift): Ditto.
5546 (pdp11_small_shift): Ditto.
5547 (pdp11_branch_cost): Remove.
5548 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5550 (pdp11_register_move_cost): Update for CC registers.
5551 (pdp11_rtx_costs): Add case for LSHIFTRT.
5552 (pdp11_output_jump): Add CCNZ mode conditional branches.
5553 (notice_update_cc_on_set): Remove.
5554 (pdp11_cc_mode): New function.
5555 (simple_memory_operand): Correct pre/post decrement case.
5556 (no_side_effect_operand): New function.
5557 (pdp11_regno_reg_class): Add CC_REGS class.
5558 (pdp11_fixed_cc_regs): New function.
5559 (pdp11_small_shift): New function.
5560 (pdp11_expand_shift): New function to expand shift insns.
5561 (pdp11_assemble_shift): New function to output shifts.
5562 (pdp11_branch_cost): Remove.
5563 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5564 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5565 (WCHAR_TYPE): Ditto.
5566 (PTRDIFF_TYPE): Ditto.
5567 (ADJUST_INSN_LENGTH): New macro.
5568 (FIXED_REGISTERS): Add CC registers.
5569 (CALL_USED_REGISTERS): Ditto.
5571 (REG_CLASS_NAMES): Ditto.
5572 (REG_CLASS_CONTENTS): Ditto.
5573 (SELECT_CC_MODE): Use new function.
5574 (TARGET_FLAGS_REGNUM): New macro.
5575 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5576 (cc0_reg_rtx): Remove.
5577 (CC_STATUS_MDEP): Remove.
5578 (CC_STATUS_MDEFP_INIT): Remove.
5579 (CC_IN_FPU): Remove.
5580 (NOTICE_UPDATE_CC): Remove.
5581 (REGISTER_NAMES): Add CC registers.
5582 (BRANCH_COST): Change to constant 1.
5583 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5585 * config/pdp11/pdp11.opt (mbcopy): Remove.
5586 (mbcopy-builtin): Remove.
5587 (mbranch-cheap): Remove.
5588 (mbranch-expensive): Remove.
5589 * config/pdp11/predicates.md (expand_shift_operand): Update to
5590 match shift code generation.
5591 (ccnz_operator): New predicate.
5592 * doc/invoke.texi (PDP-11 Options): Remove deleted options
5593 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5594 Remove non-existent option -mabshi, -mno-abshi. Document mutually
5596 * doc/md.texi (PDP-11): Document new D and h constraints. Update
5597 description of O constraint.
5599 2018-06-27 Jeff Law <law@redhat.com>
5600 Austin Law <austinklaw@gmail.com>
5602 * config/v850/v850.md (addsi3_set_flags): New pattern.
5603 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5604 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5605 (zero_extendhisi2_v850_set_flags): Likewise.
5606 (zero_extendqisi2_v850_set_flags): Likewise.
5607 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5608 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5609 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5611 * config/v850/v850-protos.h (notice_update_cc): Remove.
5612 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5613 (v850_print_operand): Handle 'D' and "d".
5614 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5615 Add handling of arithmetic/logical operations compared against zero.
5616 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5617 Do not look at v850_compare_op, instead get mode from last argument.
5618 (v850_gen_compare): Remove
5619 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5620 after reload for prologue insns.
5621 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5623 (construct_save_jarl): Likewise.
5624 (TARGET_FLAGS_REGNUM): Define.
5625 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5626 (NOTICE_UPDATE_CC): Remove.
5627 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5628 than cc0. Conditionalize on reload_completed.
5629 (cmpsi_insn, setfcc_insn): Likewise.
5630 (tst1 splitter): Turn into define_and_split which sets the flags
5632 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5633 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5634 (cstoresf4, cstoredf4): Clobber the flags.
5635 (cmpsi, cmpsf, cmpdf): Remove expanders.
5636 (setf_insn): Remove pattern.
5637 (addsi3): Turn into define_and_split which clobbers the flags after
5638 reload and a suitable pattern (addsi3_clobber_flags) for use after
5640 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5641 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5642 (ashrsi3, ashrsi3_v850e2): Likewise.
5643 (bins): Clobber the flags.
5644 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5645 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5646 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5647 (call_value_internal_short, call_value_internal_long): Likewise.
5648 (callt_save_interrupt, callt_return_interrupt): Likewise.
5649 (save_interrupt, return_interrupt): Likewise.
5650 (callt_save_all_interrupt, save_all_interrupt): Likewise.
5651 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5652 (restore_all_interrupt, _restore_all_interrupt): Likewise.
5653 (All FP comparisons): Only allow after reload has completed.
5655 (divh, divhu): Tweak output template.
5656 (branch_z_normal, branch_z_invert): Remove
5657 (branch_nz_normal, branch_nz_invert): Likewise.
5658 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5660 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5661 * config/v850/v850.c (notice_update_cc): Remove.
5662 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
5663 (CC_NO_CARRY): Likewise.
5664 (NOTICE_UPDATE_CC): Define to nothing.
5665 * config/v850/v850.md: Remove block comment on cc0 handling
5666 Remove "cc" attribute from all patterns. Remove cc_status handling
5667 from all patterns. Minor formatting fixes.
5669 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5671 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5672 (cortex-a76.cortex-a55): Likewise.
5673 * config/aarch64/aarch64-tune.md: Regenerate.
5674 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5675 cortex-a76.cortex-a55.
5677 2018-06-27 Jeff Law <law@redhat.com>
5679 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5680 (MULTILIB_DIRNAMES): Similarly.
5682 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
5684 * gimple.h (gimple_return_retbnd): Delete.
5685 (gimple_return_set_retbnd): Likewise.
5686 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5687 gimple_return_set_retbnd.
5688 * gimple-pretty-print.c (dump_gimple_return): Remove call to
5689 gimple_return_retbnd and adjust.
5690 * tree-inline.h (struct copy_body_data): Remove retbnd field.
5691 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5692 Explicitly return NULL in a couple more cases. Move assertion
5693 on debug statements and remove unreachable code.
5694 (reset_debug_binding): Do not test id->retbnd.
5695 (expand_call_inline): Do not set it.
5697 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5699 * configure.ac: Add --disable-gcov option.
5700 * configure: Regenerate.
5701 * Makefile.in: Honour @enable_gcov@.
5702 * doc/install.texi: Document --disable-gcov.
5704 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5706 * config/arm/arm-cpus.in (cortex-a76): New entry.
5707 (cortex-a76.cortex-a55): Likewise.
5708 * config/arm/arm-tables.opt: Regenerate.
5709 * config/arm/arm-tune.md: Likewise.
5710 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5711 * doc/invoke.texi (ARM Options): Document cortex-a76 and
5712 cortex-a76.cortex-a55.
5714 2018-06-27 Tamar Christina <tamar.christina@arm.com>
5717 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5719 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
5721 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5723 (EPILOGUE_USES): Likewise.
5725 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
5727 * tree-inline.c (remap_location): New function extracted from...
5728 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
5729 (copy_phis_for_bb): ...here. Call remap_location.
5730 (copy_cfg_body): Adjust call to copy_edges_for_bb.
5732 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
5734 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5735 unaligned vsx for 16B memset.
5737 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
5740 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5741 ieee128_float_type_node to long_double_type_node unless
5742 TARGET_LONG_DOUBLE_128 is set.
5744 2018-06-26 David Malcolm <dmalcolm@redhat.com>
5746 * cfgloop.c (get_loop_location): Convert return type from
5747 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5748 by implicit construction from rtx_insn *, and using
5749 dump_user_location_t::from_function_decl for the fallback case.
5750 * cfgloop.h (get_loop_location): Convert return type from
5751 location_t to dump_user_location_t.
5752 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5753 dump_printf_loc to pass in a dump_location_t rather than a
5754 location_t, via the gimple stmt.
5755 * coverage.c (get_coverage_counts): Update calls to
5756 dump_printf_loc to pass in dump_location_t rather than a
5758 * doc/optinfo.texi (Dump types): Convert example of
5759 dump_printf_loc from taking "locus" to taking "insn". Update
5760 description of the "_loc" calls to cover dump_location_t.
5761 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5763 (dump_user_location_t::dump_user_location_t): New constructors,
5764 from gimple *stmt and rtx_insn *.
5765 (dump_user_location_t::from_function_decl): New function.
5766 (dump_loc): Make static.
5767 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5768 const dump_location_t &.
5769 (dump_generic_expr_loc): Delete.
5770 (dump_printf_loc): Convert param "loc" from location_t to
5771 const dump_location_t &.
5772 (selftest::test_impl_location): New function.
5773 (selftest::dumpfile_c_tests): New function.
5774 * dumpfile.h: Include "profile-count.h".
5775 (class dump_user_location_t): New class.
5776 (struct dump_impl_location_t): New struct.
5777 (class dump_location_t): New class.
5778 (dump_printf_loc): Convert 2nd param from source_location to
5779 const dump_location_t &.
5780 (dump_generic_expr_loc): Delete.
5781 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5782 const dump_location_t &.
5783 * gimple-fold.c (fold_gimple_assign): Update call to
5784 dump_printf_loc to pass in a dump_location_t rather than a
5785 location_t, via the gimple stmt.
5786 (gimple_fold_call): Likewise.
5787 * gimple-loop-interchange.cc
5788 (loop_cand::analyze_iloop_reduction_var): Update for change to
5789 check_reduction_path.
5790 (tree_loop_interchange::interchange): Update for change to
5792 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5793 change in return-type of find_loop_location.
5794 (graphite_regenerate_ast_isl): Likewise.
5795 * graphite-optimize-isl.c (optimize_isl): Likewise.
5796 * graphite.c (graphite_transform_loops): Likewise.
5797 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5798 pass in a dump_location_t rather than a location_t, via the
5800 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5801 * ipa.c (walk_polymorphic_call_targets): Likewise.
5802 * loop-unroll.c (report_unroll): Convert "locus" param from
5803 location_t to dump_location_t.
5804 (decide_unrolling): Update for change to get_loop_location's
5806 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5807 location_t to dump_user_location_t.
5808 (grid_find_single_omp_among_assignments_1): Updates calls to
5809 dump_printf_loc to pass in a dump_location_t rather than a
5810 location_t, via the gimple stmt.
5811 (grid_parallel_clauses_gridifiable): Convert "tloc" from
5812 location_t to dump_location_t. Updates calls to dump_printf_loc
5813 to pass in a dump_location_t rather than a location_t, via the
5815 (grid_inner_loop_gridifiable_p): Likewise.
5816 (grid_dist_follows_simple_pattern): Likewise.
5817 (grid_gfor_follows_tiling_pattern): Likewise.
5818 (grid_target_follows_gridifiable_pattern): Likewise.
5819 (grid_attempt_target_gridification): Convert initialization
5820 of local "grid" from memset to zero-initialization; FIXME: does
5821 this require C++11? Update call to dump_printf_loc to pass in a
5822 optinfo_location rather than a location_t, via the gimple stmt.
5823 * profile.c (read_profile_edge_counts): Updates call to
5824 dump_printf_loc to pass in a dump_location_t rather than a
5826 (compute_branch_probabilities): Likewise.
5827 * selftest-run-tests.c (selftest::run_tests): Call
5829 * selftest.h (dumpfile_c_tests): New decl.
5830 * tree-loop-distribution.c (pass_loop_distribution::execute):
5831 Update for change in return type of find_loop_location.
5832 * tree-parloops.c (parallelize_loops): Likewise.
5833 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5834 "locus" from location_t to dump_user_location_t.
5835 (canonicalize_loop_induction_variables): Likewise.
5836 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5837 for change in return type of find_loop_location.
5838 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5839 to dump_printf_loc to pass in a dump_location_t rather than a
5840 location_t, via the stmt.
5841 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5843 * tree-vect-loop-manip.c (find_loop_location): Convert return
5844 type from source_location to dump_user_location_t.
5845 (vect_do_peeling): Update for above change.
5846 (vect_loop_versioning): Update for change in type of
5848 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5849 from location_t to dump_user_location_t.
5850 (vect_estimate_min_profitable_iters): Update for change in type
5852 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5853 location_t to dump_location_t.
5854 (vect_slp_bb): Update for change in type of vect_location.
5855 * tree-vectorizer.c (vect_location): Convert from source_location
5856 to dump_user_location_t.
5857 (try_vectorize_loop_1): Update for change in vect_location's type.
5858 (vectorize_loops): Likewise.
5859 (increase_alignment): Likewise.
5860 * tree-vectorizer.h (vect_location): Convert from source_location
5861 to dump_user_location_t.
5862 (find_loop_location): Convert return type from source_location to
5863 dump_user_location_t.
5864 (check_reduction_path): Convert 1st param from location_t to
5865 dump_user_location_t.
5866 * value-prof.c (check_counter): Update call to dump_printf_loc to
5867 pass in a dump_user_location_t rather than a location_t; update
5868 call to error_at for change in type of "locus".
5869 (check_ic_target): Update call to dump_printf_loc to
5870 pass in a dump_user_location_t rather than a location_t, via the
5873 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
5875 * config/s390/s390.h (enum processor_flags): Do not use
5876 default tune parameter when -march was specified.
5878 2018-06-26 Jakub Jelinek <jakub@redhat.com>
5881 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5882 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5885 2018-06-26 Richard Biener <rguenther@suse.de>
5887 PR tree-optimization/86287
5889 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5890 (vect_analyze_loop): Initialize n_stmts.
5892 2018-06-26 Richard Biener <rguenther@suse.de>
5895 * fold-const.c (fold_convertible_p): Pointer extension
5898 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
5901 * dwarf2out.c (loc_list_has_views): Adjust comments.
5902 (dw_loc_list): Split single cross-partition range with
5905 2018-06-25 Jeff Law <law@redhat.com>
5907 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5908 on -mbig-switch by default.
5910 * config/v850/predicates.md (const_float_1_operand): Fix match_code
5912 (const_float_0_operand): Remove unused predicate.
5913 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5914 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5915 (recipsf2): New expander. Original pattern now called
5917 (recipdf2, recipdf2_insn): Similarly.
5918 (rsqrtsf2, rsqrtsf2_insn): Similarly
5919 (rsqrtdf2, rsqrtdf2_insn): Similarly
5921 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
5923 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5924 Simplify logic for FreeBSD (twice).
5926 2018-06-25 Martin Sebor <msebor@redhat.com>
5928 PR tree-optimization/86204
5929 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5930 a strnlen result if it's less than the length of the string.
5932 2018-06-25 Martin Sebor <msebor@redhat.com>
5934 PR tree-optimization/85700
5935 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5936 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5937 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5939 2018-06-25 Martin Sebor <msebor@redhat.com>
5941 * doc/extend.texi (Zero-length arrays): Update and clarify.
5943 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
5945 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5946 added IEEE/IBM long double multilib support on PowerPC little
5947 endian Linux systems.
5948 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5949 (MULTILIB_DEFAULTS): Likewise.
5950 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5952 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5953 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5954 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5956 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
5959 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5960 (REORDER_45): Likewise.
5962 2018-06-25 Jeff Law <law@redhat.com>
5964 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5965 dividend to 32 bits. Adjust length.
5966 (udivmodhi4): Cleanup output template. Fix length.
5968 2018-06-25 Carl Love <cel@us.ibm.com>
5970 * config/rs6000/vsx.md: Change word selector to prefered location.
5972 2018-06-25 Richard Biener <rguenther@suse.de>
5974 PR tree-optimization/86304
5975 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5976 epilogue-if-converted loops as well.
5978 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
5980 * lto-section-out.c (lto_begin_section): Do not print section
5981 name for noaddr and unnumbered dumps.
5983 2018-06-25 Richard Biener <rguenther@suse.de>
5985 * tree-vectorizer.h (struct vec_info_shared): New structure
5986 with parts split out from struct vec_info and loop_nest from
5987 struct _loop_vec_info.
5988 (struct vec_info): Adjust accordingly.
5989 (struct _loop_vec_info): Likewise.
5990 (LOOP_VINFO_LOOP_NEST): Adjust.
5991 (LOOP_VINFO_DATAREFS): Likewise.
5992 (LOOP_VINFO_DDRS): Likewise.
5993 (struct _bb_vec_info): Likewise.
5994 (BB_VINFO_DATAREFS): Likewise.
5995 (BB_VINFO_DDRS): Likewise.
5996 (struct _stmt_vec_info): Add dr_aux member.
5997 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5998 (DR_MISALIGNMENT_UNINITIALIZED): New.
5999 (set_dr_misalignment): Adjust.
6000 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6001 (vect_analyze_loop): Adjust prototype.
6002 (vect_analyze_loop_form): Likewise.
6003 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6004 Compute dependences lazily.
6005 (vect_record_base_alignments): Use shared datarefs/ddrs.
6006 (vect_verify_datarefs_alignment): Likewise.
6007 (vect_analyze_data_refs_alignment): Likewise.
6008 (vect_analyze_data_ref_accesses): Likewise.
6009 (vect_analyze_data_refs): Likewise.
6010 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6011 constructor parameter for shared part.
6012 (vect_analyze_loop_form): Pass in shared part and adjust.
6013 (vect_analyze_loop_2): Pass in storage for the number of
6014 stmts. Move loop nest finding to the caller. Compute
6016 (vect_analyze_loop): Pass in shared part.
6017 (vect_transform_loop): Verify shared datarefs are unchanged.
6018 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6019 constructor parameter for shared part.
6020 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6021 (vect_slp_bb): Verify shared datarefs are unchanged before
6023 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6025 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6026 DR_MISALIGNMENT_UNINITIALIZED.
6027 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6028 parameter for shared part.
6029 (vec_info::~vec_info): Adjust.
6030 (vec_info_shared::vec_info_shared): New.
6031 (vec_info_shared::~vec_info_shared): Likewise.
6032 (vec_info_shared::save_datarefs): Likewise.
6033 (vec_info_shared::check_datarefs): Likewise.
6034 (try_vectorize_loop_1): Construct shared part live for analyses
6035 of a single loop for multiple vector sizes.
6036 * tree-parloops.c (gather_scalar_reductions): Adjust.
6038 2018-06-25 Richard Biener <rguenther@suse.de>
6040 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6041 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6042 (vect_analyze_data_refs): Remove similar code from here and
6043 simplify accordingly.
6045 2018-06-25 Richard Biener <rguenther@suse.de>
6047 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6048 for reverse storage order accesses rather than asserting
6049 they cannot happen here.
6051 2018-06-25 Tom de Vries <tdevries@suse.de>
6054 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6055 Use data16 instead of .byte for insn prefix.
6057 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6060 * parser.c (make_char_string_pack): Pass this literal chars
6061 through cpp_interpret_string.
6062 (cp_parser_userdef_numeric_literal): Check the result of
6063 make_char_string_pack.
6065 2018-06-24 Maya Rashish <coypu@sdf.org>
6067 * ginclude/stddef.h: Simplify conditions around avoiding
6068 re-definition of __size_t.
6070 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6072 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6073 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6075 2018-06-22 Maya Rashish <coypu@sdf.org>
6077 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6078 made to OpenBSD and NetBSD through the years.
6080 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6082 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6083 behavior of vec_pack (vector double, vector double) to match
6084 behavior of vec_float2 (vector double, vector double).
6086 2018-06-22 Olivier Hainque <hainque@adacore.com>
6088 * gimplify.c (gimplify_function_tree): Prevent creation
6089 of a trampoline for the address of the current function
6090 passed to entry/exit instrumentation hooks.
6092 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6095 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6098 2018-06-22 Martin Liska <mliska@suse.cz>
6100 PR tree-optimization/86263
6101 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6102 Bail out if is_enabled is false.
6103 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6105 (jump_table_cluster::is_enabled): New function.
6107 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6109 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6110 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6111 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6112 (lto_input_ts_binfo_tree_pointers): Likewise.
6113 * tree-streamer-out.c (streamer_write_tree_bitfields,
6114 write_ts_binfo_tree_pointers): Likewise.
6115 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6117 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6119 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6121 2018-06-22 Martin Liska <mliska@suse.cz>
6123 * symbol-summary.h (get): Make it pure and inline move
6124 functionality from ::get function.
6125 (get): Remove and inline into ::get and ::get_create.
6126 (get_create): Move code from ::get function.
6128 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6131 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6132 -x assembler-with-cpp.
6134 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6136 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6137 _FILE_OFFSET_BITS=64 for C++.
6139 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6141 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6142 conversion insn that shows up when pr85657-3.c is compiled using
6143 IEEE 128-bit long double.
6144 (neg<mode>2_internal): Use the correct mode to check whether the
6145 mode is IBM extended.
6146 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6147 multiply and divide external functions from being created more
6150 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6152 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6154 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6155 the edge can be forwarded.
6156 (cfg_layout_merge_blocks): Likewise.
6158 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6160 * except.c (finish_eh_generation): Commit edge insertions only after
6161 the EH edges have been redirected from post-landing to landing pads.
6163 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6165 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6166 create_tmp_var_for to create the FRAME decl.
6167 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6169 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6171 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6172 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6173 debug statement when resetting its value.
6174 (expand_call_inline): Copy the locus of the call onto the assignment
6175 of the return value, if any. Use local variable in more cases.
6177 2018-06-21 Martin Liska <mliska@suse.cz>
6179 * ipa-pure-const.c (propagate_nothrow): Use
6180 funct_state_summaries->get.
6181 (dump_malloc_lattice): Likewise.
6182 (propagate_malloc): Likewise.
6184 2018-06-21 Richard Biener <rguenther@suse.de>
6186 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6187 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6188 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6190 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6191 BLOCK_ABSTRACT_ORIGIN unconditionally.
6193 2018-06-21 David Malcolm <dmalcolm@redhat.com>
6195 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6197 * ipa-reference.c (ipa_reference_c_finalize): Delete
6198 ipa_ref_opt_sum_summaries and set it to NULL.
6200 2018-06-21 Tom de Vries <tdevries@suse.de>
6202 PR tree-optimization/85859
6203 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6204 test with comment from bb_no_side_effects_p.
6206 2018-06-21 Richard Biener <rguenther@suse.de>
6208 PR tree-optimization/86232
6209 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6210 max for constant niter.
6212 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6214 * config/aarch64/aarch64-simd.md
6215 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6217 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6219 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6220 Make opernads of the unspec commutative.
6222 2018-06-21 Richard Biener <rguenther@suse.de>
6224 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6225 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6226 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6227 (vect_analyze_data_ref_dependence): Re-order checks to deal with
6229 (vect_record_base_alignments): Do not record base alignment
6230 for gathers or scatters.
6231 (vect_compute_data_ref_alignment): Drop return value that is always
6232 true. Bail out early for gathers or scatters.
6233 (vect_enhance_data_refs_alignment): Bail out early for gathers
6235 (vect_find_same_alignment_drs): Likewise.
6236 (vect_analyze_data_refs_alignment): Remove dead code.
6237 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6238 (vect_analyze_data_refs): For possible gathers or scatters do
6239 not create an alternate DR, just check their possible validity
6240 and mark them. Adjust DECL_NONALIASED handling to not rely
6242 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6243 update inits of gathers or scatters.
6244 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6245 Also copy gather/scatter flag to pattern vinfo.
6247 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
6249 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6250 behavior of vec_packsu (vector unsigned long long, vector unsigned
6251 long long) to match behavior of vec_packs with same signature.
6253 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
6254 Thomas Schwinge <thomas@codesourcery.com>
6255 Cesar Philippidis <cesar@codesourcery.com>
6257 * gimplify.c (gimplify_scan_omp_clauses): Add support for
6258 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6259 (gimplify_adjust_omp_clauses): Likewise.
6260 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6261 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6262 (gimplify_omp_target_update): Update handling of acc update and
6264 * omp-low.c (install_var_field): Remove unused parameter
6265 base_pointers_restrict.
6266 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6267 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6269 (omp_target_base_pointers_restrict_p): Delete.
6270 (scan_omp_target): Update call to scan_sharing_clauses.
6271 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6273 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6274 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6275 (convert_local_omp_clauses): Likewise.
6276 * tree-pretty-print.c (dump_omp_clause): Likewise.
6277 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
6279 (omp_clause_code_name): Likewise.
6281 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6284 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6287 PR tree-optimization/86231
6288 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
6289 anti-range don't overwrite *vr0min before using it to compute *vr0max.
6291 2018-06-20 Tom de Vries <tdevries@suse.de>
6293 PR tree-optimization/86097
6294 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6295 iv type if signedness of iv type is not the same as that of *nit.
6297 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6299 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
6300 EDGE_EH edges, verify they are all EDGE_EH.
6302 2018-06-20 Maya Rashish <coypu@sdf.org>
6304 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6306 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6308 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6309 * config/aarch64/aarch64.c (xgene1_tunings): Add
6310 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6311 (aarch64_mode_valid_for_sched_fusion_p):
6312 Allow 16-byte modes.
6313 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6314 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6316 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6318 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6319 * config/aarch64/iterators.md (VQ2): New mode iterator.
6321 2018-06-20 Martin Liska <mliska@suse.cz>
6323 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6324 Change default ratio from 10 to 8.
6326 2018-06-20 Martin Liska <mliska@suse.cz>
6328 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6330 (bit_test_cluster::find_bit_tests): Likewise.
6331 (switch_decision_tree::analyze_switch_statement): Find clusters.
6332 * tree-switch-conversion.h (struct jump_table_cluster): Document
6335 2018-06-20 Martin Liska <mliska@suse.cz>
6337 * tree-switch-conversion.c (switch_conversion::collect):
6338 Record m_uniq property.
6339 (switch_conversion::expand): Bail out for special conditions.
6340 (group_cluster::~group_cluster): New.
6341 (group_cluster::group_cluster): Likewise.
6342 (group_cluster::dump): Likewise.
6343 (jump_table_cluster::emit): New.
6344 (switch_decision_tree::fix_phi_operands_for_edges): New.
6345 (struct case_node): Remove struct.
6346 (jump_table_cluster::can_be_handled): New.
6347 (case_values_threshold): Moved to header.
6348 (reset_out_edges_aux): Likewise.
6349 (jump_table_cluster::is_beneficial): New.
6350 (bit_test_cluster::can_be_handled): Likewise.
6351 (add_case_node): Remove.
6352 (bit_test_cluster::is_beneficial): New.
6353 (case_bit_test::cmp): New.
6354 (bit_test_cluster::emit): New.
6355 (expand_switch_as_decision_tree_p): Remove.
6356 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6357 (fix_phi_operands_for_edge): Likewise.
6358 (switch_decision_tree::analyze_switch_statement): New.
6359 (compute_cases_per_edge): Move ...
6360 (switch_decision_tree::compute_cases_per_edge): ... here.
6361 (try_switch_expansion): Likewise.
6362 (switch_decision_tree::try_switch_expansion): Likewise.
6363 (record_phi_operand_mapping): Likewise.
6364 (switch_decision_tree::record_phi_operand_mapping): Likewise.
6365 (emit_case_decision_tree): Likewise.
6366 (switch_decision_tree::emit): Likewise.
6367 (balance_case_nodes): Likewise.
6368 (switch_decision_tree::balance_case_nodes): Likewise.
6369 (dump_case_nodes): Likewise.
6370 (switch_decision_tree::dump_case_nodes): Likewise.
6371 (emit_jump): Likewise.
6372 (switch_decision_tree::emit_jump): Likewise.
6373 (emit_cmp_and_jump_insns): Likewise.
6374 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6375 (emit_case_nodes): Likewise.
6376 (switch_decision_tree::emit_case_nodes): Likewise.
6377 (conditional_probability): Remove.
6378 * tree-switch-conversion.h (enum cluster_type): New.
6380 (struct cluster): Likewise.
6381 (cluster::cluster): Likewise.
6382 (struct simple_cluster): Likewise.
6383 (simple_cluster::simple_cluster): Likewise.
6384 (struct group_cluster): Likewise.
6385 (struct jump_table_cluster): Likewise.
6386 (struct bit_test_cluster): Likewise.
6387 (struct min_cluster_item): Likewise.
6388 (struct case_tree_node): Likewise.
6389 (case_tree_node::case_tree_node): Likewise.
6390 (jump_table_cluster::case_values_threshold): Likewise.
6391 (struct case_bit_test): Likewise.
6392 (struct switch_decision_tree): Likewise.
6393 (struct switch_conversion): Likewise.
6394 (switch_decision_tree::reset_out_edges_aux): Likewise.
6396 2018-06-20 Martin Liska <mliska@suse.cz>
6398 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6399 (hoist_edge_and_branch_if_true): Likewise.
6400 (expand_switch_using_bit_tests_p): Likewise.
6401 (struct case_bit_test): Likewise.
6402 (case_bit_test_cmp): Likewise.
6403 (emit_case_bit_tests): Likewise.
6404 (switch_conversion::switch_conversion): New class.
6405 (struct switch_conv_info): Remove old struct.
6406 (collect_switch_conv_info): More to ...
6407 (switch_conversion::collect): ... this.
6408 (check_range): Likewise.
6409 (switch_conversion::check_range): Likewise.
6410 (check_all_empty_except_final): Likewise.
6411 (switch_conversion::check_all_empty_except_final): Likewise.
6412 (check_final_bb): Likewise.
6413 (switch_conversion::check_final_bb): Likewise.
6414 (create_temp_arrays): Likewise.
6415 (switch_conversion::create_temp_arrays): Likewise.
6416 (free_temp_arrays): Likewise.
6417 (gather_default_values): Likewise.
6418 (switch_conversion::gather_default_values): Likewise.
6419 (build_constructors): Likewise.
6420 (switch_conversion::build_constructors): Likewise.
6421 (constructor_contains_same_values_p): Likewise.
6422 (switch_conversion::contains_same_values_p): Likewise.
6423 (array_value_type): Likewise.
6424 (switch_conversion::array_value_type): Likewise.
6425 (build_one_array): Likewise.
6426 (switch_conversion::build_one_array): Likewise.
6427 (build_arrays): Likewise.
6428 (switch_conversion::build_arrays): Likewise.
6429 (gen_def_assigns): Likewise.
6430 (switch_conversion::gen_def_assigns): Likewise.
6431 (prune_bbs): Likewise.
6432 (switch_conversion::prune_bbs): Likewise.
6433 (fix_phi_nodes): Likewise.
6434 (switch_conversion::fix_phi_nodes): Likewise.
6435 (gen_inbound_check): Likewise.
6436 (switch_conversion::gen_inbound_check): Likewise.
6437 (process_switch): Use the newly created class.
6438 (switch_conversion::expand): New.
6439 (switch_conversion::~switch_conversion): New.
6440 * tree-switch-conversion.h: New file.
6442 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6444 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6445 tree-vect-patterns.c.
6446 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6447 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
6448 (vect_recog_sad_pattern): Likewise.
6449 (vect_recog_widen_sum_pattern): Likewise.
6450 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
6451 (vect_recog_widen_shift_pattern): Remove the type_in argument.
6452 (vect_recog_rotate_pattern): Likewise.
6453 (vect_recog_mult_pattern): Likewise.
6454 (vect_recog_vector_vector_shift_pattern): Likewise.
6455 (vect_recog_divmod_pattern): Likewise.
6456 (vect_recog_mixed_size_cond_pattern): Likewise.
6457 (vect_recog_bool_pattern): Likewise.
6458 (vect_recog_mask_conversion_pattern): Likewise.
6459 (vect_try_gather_scatter_pattern): Likewise.
6460 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
6461 (vect_recog_over_widening_pattern): Likewise.
6462 (vect_recog_gather_scatter_pattern): Likewise.
6463 (vect_recog_func_ptr): Move from tree-vectorizer.h
6464 (vect_vect_recog_func_ptrs): Move further down the file.
6465 (vect_recog_func): Likewise. Remove the third argument.
6466 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6467 (vect_pattern_recog_1): Expect the pattern function to do any
6468 necessary target tests. Also expect it to provide a vector type.
6469 Remove the type_in handling.
6471 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6473 * tree-vect-patterns.c (vect_pattern_detected): New function.
6474 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6475 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6476 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6477 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6478 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6479 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6480 (vect_recog_mask_conversion_pattern)
6481 (vect_try_gather_scatter_pattern): Likewise.
6483 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6485 * tree-vect-patterns.c (vect_get_internal_def): New function.
6486 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6487 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6488 (search_type_for_mask_1): Use it.
6490 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6492 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6493 redundant WIDEN_SUM_EXPR handling.
6494 (vect_recog_sad_pattern): Likewise.
6496 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6498 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6499 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6500 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6501 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6502 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6504 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6506 * tree-vect-stmts.c (vectorizable_call): Make sure that we
6507 use the stmt_vec_info of the original bb statement for the
6508 new zero assignment, even if the call is part of a pattern.
6510 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6512 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6513 that the sequence is attached to the original statement rather
6514 than the pattern statement.
6515 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6516 PATTERN_DEF_SEQ from the original statement rather than
6517 the main pattern statement.
6518 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6519 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6520 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6522 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6524 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6525 definition statements before the early exit for statements that aren't
6527 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6529 (vect_transform_loop): ...here. Process pattern definition
6530 statements without first checking whether the main pattern
6531 statement is live or relevant.
6533 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6535 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6536 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6538 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
6540 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6541 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6542 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6543 (expand_block_compare): Change select_block_compare_mode call.
6544 (expand_strncmp_align_check): Use new functions, fix comment.
6545 (emit_final_str_compare_gpr): New function.
6546 (expand_strn_compare): Refactor and clean up code.
6547 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6549 2018-06-19 Tony Reix <tony.reix@atos.com>
6550 Damien Bergamini <damien.bergamini@atos.com>
6551 David Edelsohn <dje.gcc@gmail.com>
6553 * collect2.c (static_obj): New variable.
6554 (static_libs): New variable.
6555 (is_in_list): Uncomment declaration.
6556 (main): Track AIX libraries linked statically.
6557 (is_in_list): Uncomment definition.
6558 (scan_prog_file): Don't add AIX shared libraries initializer
6559 to constructor list if linking statically.
6561 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
6563 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6565 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6567 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
6569 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6572 2018-06-19 Martin Liska <mliska@suse.cz>
6574 * config/i386/i386.c (ix86_can_inline_p): Do not use
6575 ipa_fn_summaries::get_create.
6576 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6578 (devirtualization_time_bonus): Likewise.
6579 (ipcp_propagate_stage): Likewise.
6580 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6581 (edge_set_predicate): Likewise.
6582 (evaluate_conditions_for_known_args): Likewise.
6583 (evaluate_properties_for_edge): Likewise.
6584 (ipa_call_summary::reset): Tranform to ...
6585 (ipa_call_summary::~ipa_call_summary): ... this.
6586 (ipa_fn_summary::reset): Transform to ...
6587 (ipa_fn_summary::~ipa_fn_summary): ... this.
6588 (ipa_fn_summary_t::remove): Rename to ...
6589 (ipa_fn_summary_t::remove_callees): ... this.
6590 (ipa_fn_summary_t::duplicate): Use placement new
6591 instead of memory copy.
6592 (ipa_call_summary_t::duplicate): Likewise.
6593 (ipa_call_summary_t::remove): Remove.
6594 (dump_ipa_call_summary): Change get_create to get.
6595 (ipa_dump_fn_summary): Dump only when summary exists.
6596 (analyze_function_body): Use symbol_summary::get instead
6598 (compute_fn_summary): Likewise.
6599 (estimate_edge_devirt_benefit): Likewise.
6600 (estimate_edge_size_and_time): Likewise.
6601 (inline_update_callee_summaries): Likewise.
6602 (remap_edge_change_prob): Likewise.
6603 (remap_edge_summaries): Likewise.
6604 (ipa_merge_fn_summary_after_inlining): Likewise.
6605 (write_ipa_call_summary): Likewise.
6606 (ipa_fn_summary_write): Likewise.
6607 (ipa_free_fn_summary): Likewise.
6608 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6609 (struct ipa_call_summary): Likewise.
6610 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6612 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6613 (estimate_size_after_inlining): Likewise.
6614 (estimate_growth): Likewise.
6615 (growth_likely_positive): Likewise.
6616 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6617 (inline_call): Likewise.
6618 * ipa-inline.c (caller_growth_limits): Likewise.
6619 (can_inline_edge_p): Likewise.
6620 (can_inline_edge_by_limits_p): Likewise.
6621 (compute_uninlined_call_time): Likewise.
6622 (compute_inlined_call_time): Likewise.
6623 (want_inline_small_function_p): Likewise.
6624 (edge_badness): Likewise.
6625 (update_caller_keys): Likewise.
6626 (update_callee_keys): Likewise.
6627 (inline_small_functions): Likewise.
6628 (inline_to_all_callers_1): Likewise.
6629 (dump_overall_stats): Likewise.
6630 (early_inline_small_functions): Likewise.
6631 (early_inliner): Likewise.
6632 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6633 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6634 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6635 * ipa-split.c (execute_split_functions): Likewise.
6636 * symbol-summary.h: Likewise.
6637 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6639 2018-06-19 Richard Biener <rguenther@suse.de>
6641 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6642 (vectorize_loops): ... here. Fix dbgcnt handling.
6643 (try_vectorize_loop): Wrap try_vectorize_loop_1.
6645 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
6648 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6649 ieee128 argument takes up only one (vector) register, not two (floating
6652 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6654 * gimplify.c (gimplify_init_constructor): Really never clear for an
6655 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6657 2018-06-19 Richard Biener <rguenther@suse.de>
6659 PR tree-optimization/86179
6660 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6661 after failed recognition.
6663 2018-06-18 Martin Sebor <msebor@redhat.com>
6666 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6667 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6668 Handle integer subtraction.
6669 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6670 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6672 2018-06-18 David Malcolm <dmalcolm@redhat.com>
6674 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6675 param from rtx to rtx_insn *.
6676 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6678 (frv_ifcvt_modify_insn): Likwise.
6679 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6680 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
6681 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6682 as_a <rtx_insn *> cast to local "unprotected_region" once
6683 it's been established that it's not NULL or pc_rtx.
6684 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6685 param "sethi" from rtx to rtx_insn *.
6686 (nds32_group_float_insns): Likewise for param "insn".
6687 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6689 (vax_output_int_subtract): Likewise.
6690 * config/vax/vax.c (vax_output_int_add): Likewise for param
6692 (vax_output_int_subtract): Likewise.
6693 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6694 (emit_pattern_after): Likewise for param "after".
6695 (emit_insn_after): Likewise.
6696 (emit_jump_insn_after): Likewise.
6697 (emit_call_insn_after): Likewise.
6698 (emit_debug_insn_after): Likewise.
6699 (emit_pattern_before): Likewise for param "before".
6700 (emit_insn_before): Likewise.
6701 (emit_jump_insn_before): Likewise.
6702 * final.c (get_insn_template): Likewise for param "insn", removing
6704 * output.h (get_insn_template): Likewise for 2nd param.
6705 * rtl.h (emit_insn_before): Likewise.
6706 (emit_jump_insn_before): Likewise.
6707 (emit_debug_insn_before_noloc): Likewise.
6708 (emit_insn_after): Likewise.
6709 (emit_jump_insn_after): Likewise.
6710 (emit_call_insn_after): Likewise.
6711 (emit_debug_insn_after): Likewise.
6712 (set_insn_deleted): Likewise for param.
6714 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
6717 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6718 floating point modes, so that IFmode is numerically greater than
6719 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6720 to declare the ordering. This prevents IFmode from being
6721 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6722 machine. Include rs6000-modes.h to share the fractional values
6723 between genmodes* and the rest of the compiler.
6727 * config/rs6000/rs6000-modes.h: New file.
6728 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6729 meaning of rs6000_long_double_size so that 126..128 selects an
6730 appropriate 128-bit floating point type.
6731 (rs6000_option_override_internal): Likewise.
6732 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6733 (TARGET_LONG_DOUBLE_128): Change the meaning of
6734 rs6000_long_double_size so that 126..128 selects an appropriate
6735 128-bit floating point type.
6736 (LONG_DOUBLE_TYPE_SIZE): Update comment.
6737 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6738 source and destination to match the standard usage.
6739 (truncifkf2): Likewise.
6740 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6741 ISA 2.07 to use an explicit clobber, instead of passing in a
6743 (copysign<mode>3_soft): Likewise.
6745 2018-06-18 David Malcolm <dmalcolm@redhat.com>
6747 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6748 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6749 (vect_slp_analyze_instance_dependence): Likewise.
6750 (vect_enhance_data_refs_alignment): Likewise.
6751 (vect_analyze_data_refs_alignment): Likewise.
6752 (vect_slp_analyze_and_verify_instance_alignment
6753 (vect_analyze_data_ref_accesses): Likewise.
6754 (vect_prune_runtime_alias_test_list): Likewise.
6755 (vect_analyze_data_refs): Likewise.
6756 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6757 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6758 (vect_analyze_scalar_cycles_1): Likewise.
6759 (vect_get_loop_niters): Likewise.
6760 (vect_analyze_loop_form_1): Likewise.
6761 (vect_update_vf_for_slp): Likewise.
6762 (vect_analyze_loop_operations): Likewise.
6763 (vect_analyze_loop): Likewise.
6764 (vectorizable_induction): Likewise.
6765 (vect_transform_loop): Likewise.
6766 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6767 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6768 (vect_make_slp_decision): Likewise.
6769 (vect_detect_hybrid_slp): Likewise.
6770 (vect_slp_analyze_operations): Likewise.
6771 (vect_slp_bb): Likewise.
6772 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6773 (vectorizable_bswap): Likewise.
6774 (vectorizable_call): Likewise.
6775 (vectorizable_simd_clone_call): Likewise.
6776 (vectorizable_conversion): Likewise.
6777 (vectorizable_assignment): Likewise.
6778 (vectorizable_shift): Likewise.
6779 (vectorizable_operation): Likewise.
6780 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6782 2018-06-18 Martin Sebor <msebor@redhat.com>
6784 PR tree-optimization/81384
6785 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6786 * builtins.c (expand_builtin_strnlen): New function.
6787 (expand_builtin): Call it.
6788 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6789 * builtins.def (BUILT_IN_STRNLEN): New.
6790 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6791 Warn for bounds in excess of maximum object size.
6792 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6793 single-value ranges. Handle strnlen.
6794 (handle_builtin_strlen): Handle strnlen.
6795 (strlen_check_and_optimize_stmt): Same.
6796 * doc/extend.texi (Other Builtins): Document strnlen.
6798 2018-06-18 Maya Rashish <coypu@sdf.org>
6800 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6801 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6802 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6804 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6806 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6808 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6810 * tree.c (escaped_string::escape): Replace cast to char * by
6811 const_cast<char *> (unescaped).
6813 2018-06-18 Nick Clifton <nickc@redhat.com>
6816 * tree.c (escaped_string): New class. Converts an unescaped
6817 string into its escaped equivalent.
6818 (warn_deprecated_use): Use the new class to convert the
6819 deprecation message, if present.
6820 (test_escaped_strings): New self test.
6821 (test_c_tests): Add test_escaped_strings.
6822 * doc/extend.texi (deprecated): Add a note that the
6823 deprecation message is affected by the -fmessage-length
6824 option, and that control characters will be escaped.
6825 (#pragma GCC error): Document this pragma.
6826 (#pragma GCC warning): Likewise.
6827 * doc/invoke.texi (-fmessage-length): Document this option's
6828 effect on the #warning and #error preprocessor directives and
6829 the deprecated attribute.
6831 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
6833 * tree.c (decl_value_expr_lookup): Revert latest change.
6834 (decl_value_expr_insert): Likewise.
6836 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
6838 * gimplify.c (nonlocal_vlas): Delete.
6839 (nonlocal_vla_vars): Likewise.
6840 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6842 (gimplify_body): Do not create and destroy nonlocal_vlas.
6843 * tree-nested.c: Include diagnostic.h.
6844 (use_pointer_in_frame): Tweak.
6845 (lookup_field_for_decl): Add assertion and declare the transformation.
6846 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6847 internal error when the reference is in a wrong context. Do not
6848 create a debug decl by default.
6849 (note_nonlocal_block_vlas): Delete.
6850 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6851 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
6852 create a debug decl by default.
6853 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6854 call is in a wrong context.
6855 (fixup_vla_decls): New function.
6856 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
6857 debug variables were created.
6858 * tree.c (decl_value_expr_lookup): Add checking assertion.
6859 (decl_value_expr_insert): Likewise.
6861 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
6864 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6865 * tree-scalar-evolution.c (interpret_expr): Likewise.
6866 (expression_expensive_p): Likewise.
6867 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6868 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6869 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6870 (ssa_defined_by_minus_one_stmt_p): New.
6872 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
6875 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6876 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6877 * dojump.c (do_jump): Likewise.
6878 * expr.c (expand_expr_real_2): Check operand type's sign.
6879 * fold-const.c (const_unop): Handle ABSU_EXPR.
6880 (fold_abs_const): Likewise.
6881 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6882 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6883 (strip_sign_op_1): Likesise.
6884 * match.pd: Add new pattern to generate ABSU_EXPR.
6885 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6886 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6887 * tree-eh.c (operation_could_trap_helper_p): Likewise.
6888 * tree-inline.c (estimate_operator_cost): Likewise.
6889 * tree-pretty-print.c (dump_generic_node): Likewise.
6890 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6891 * tree.def (ABSU_EXPR): New.
6893 2018-06-16 Jakub Jelinek <jakub@redhat.com>
6896 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6897 documented as preserved for backward compatibility only.
6898 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6900 PR rtl-optimization/86108
6901 * bb-reorder.c (create_forwarder_block): Renamed to ...
6902 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
6903 jump from new landing pad to the second part.
6904 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6907 2018-06-15 Jakub Jelinek <jakub@redhat.com>
6910 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6911 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6912 Only call store_expr for halves if the mode is the same.
6915 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6916 Fix up comment formatting.
6918 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
6920 * typed-splay-tree.h (typed_splay_tree::remove): New function.
6921 (typed_splay_tree::closure,
6922 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6923 (typed_splay_tree::typed_splay_tree,
6924 typed_splay_tree::operator =): Declared private.
6925 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6926 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6927 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6928 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6929 typed_splay_tree::splay_tree_splay,
6930 typed_splay_tree::splay_tree_foreach_helper,
6931 typed_splay_tree::splay_tree_insert,
6932 typed_splay_tree::splay_tree_remove,
6933 typed_splay_tree::splay_tree_lookup,
6934 typed_splay_tree::splay_tree_predecessor,
6935 typed_splay_tree::splay_tree_successor,
6936 typed_splay_tree::splay_tree_min,
6937 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6938 (typed_splay_tree::root, typed_splay_tree::comp,
6939 typed_splay_tree::delete_key,
6940 typed_splay_tree::delete_value): New data members.
6941 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6942 typed_splay_tree::remove.
6944 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
6946 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6947 -mginv and -mno-ginv to the assembler.
6948 * config/mips/mips.opt (-mcrc): New option.
6950 * doc/invoke.text (-mcrc): Document.
6953 2018-06-15 Nick Clifton <nickc@redhat.com>
6956 * tree.c (escaped_string): New class. Converts an unescaped
6957 string into its escaped equivalent.
6958 (warn_deprecated_use): Use the new class to convert the
6959 deprecation message, if present.
6960 (test_escaped_strings): New self test.
6961 (test_c_tests): Add test_escaped_strings.
6962 * doc/extend.texi (deprecated): Add a note that the
6963 deprecation message is affected by the -fmessage-length
6964 option, and that control characters will be escaped.
6965 (#pragma GCC error): Document this pragma.
6966 (#pragma GCC warning): Likewise.
6967 * doc/invoke.texi (-fmessage-length): Document this option's
6968 effect on the #warning and #error preprocessor directives and
6969 the deprecated attribute.
6971 2018-06-15 Richard Biener <rguenther@suse.de>
6973 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6974 here, also noting vector size used.
6975 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
6976 size used in MSG_OPTIMIZED_LOCATIONS dump.
6977 (pass_slp_vectorize::execute): Adjust.
6979 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
6982 * config/arc/arc.c (arc_return_address_register): Fix
6985 2018-06-15 Richard Biener <rguenther@suse.de>
6988 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6989 leave useless conversion stripping to force_gimple_operand_gsi.
6990 (gimplify_build2): Likewise.
6991 (gimplify_build1): Likewise.
6993 2018-06-15 Richard Biener <rguenther@suse.de>
6996 * tree-cfg.c (move_stmt_op): unshare invariant addresses
6997 before adjusting their block.
6999 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7001 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7002 multilibs for *-*-rtems*.
7003 * config/riscv/t-rtems: New file.
7005 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7008 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7009 unsigned_type_for returns NULL.
7012 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7013 subregs of multi-word pseudos unless the float mode has word size.
7015 2018-06-14 Richard Biener <rguenther@suse.de>
7018 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7019 duplicate and harmful type_hash_canon.
7020 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7022 2018-06-14 Richard Biener <rguenther@suse.de>
7025 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7028 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7030 * config/rtems.h (STDINT_LONG32): Define.
7032 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7033 Prachi Godbole <prachi.godbole@imgtec.com>
7035 * config/mips/mips-cpus.def: Define P6600.
7036 * config/mips/mips-tables.opt: Regenerate.
7037 * config/mips/mips.c (mips_ucbranch_type): New enum.
7038 (mips_rtx_cost_data): Add support for P6600.
7039 (mips_issue_rate): Likewise.
7040 (mips_multipass_dfa_lookahead): Likewise.
7041 (mips_avoid_hazard): Likewise.
7042 (mips_reorg_process_insns): Likewise.
7043 (mips_classify_branch_p6600): New function.
7044 * config/mips/mips.h (TUNE_P6600): New define.
7045 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7046 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7047 * config/mips/mips.md: Include p6600.md.
7048 (processor): Add p6600.
7049 * config/mips/p6600.md: New file.
7050 * doc/invoke.texi: Add p6600 to supported architectures.
7052 2018-06-13 Martin Sebor <msebor@redhat.com>
7054 PR tree-optimization/86114
7055 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7057 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7059 2018-06-13 Richard Biener <rguenther@suse.de>
7061 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7062 Properly set vector type of the intermediate stmt.
7063 * tree-vect-stmts.c (vectorizable_operation): The destination
7064 var always has vectype_out type.
7066 2018-06-13 Jeff Law <law@redhat.com>
7068 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7069 integer 0 for argument to print_rtl_with_bb.
7070 (rl78_reorg): Likewise.
7072 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7074 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7075 from rtx to rtx_insn *.
7076 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7078 (add_sched_insns_for_speculation): Likewise for local "target",
7079 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7080 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7081 from rtx_insn ** to rtx_code_label **.
7082 (reorg_emit_nops): Likewise.
7083 (c6x_reorg): Likewise for local "call_labels".
7084 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7086 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7087 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7088 the loops over LABEL_REFS.
7089 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7091 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7092 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7093 (split_branches): Strengthen local "olabel" from rtx to
7094 rtx_insn *, adding a safe_as_a cast.
7095 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7097 (add_insn_after): Likewise for first two params.
7098 (add_insn_before): Likewise.
7099 (remove_insn): Likewise for param.
7100 (emit_pattern_before_noloc): Likewise for second and third params.
7101 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7102 (emit_call_insn_before_noloc): Likewise.
7103 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7105 (emit_barrier_before): Likewise.
7106 (emit_label_before): Strengthen "label" param from "rtx" to
7107 "rtx_code_label *". Strengthen "before" param from "rtx" to
7109 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7111 (emit_pattern_after_noloc): Likewise.
7112 (emit_insn_after_noloc): Likewise.
7113 (emit_jump_insn_after_noloc): Likewise.
7114 (emit_call_insn_after_noloc): Likewise.
7115 (emit_debug_insn_after_noloc): Likewise.
7116 (emit_barrier_after): Likewise.
7117 (emit_label_after): Likewise for both params.
7118 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7119 "loc" param from "int" to "location_t".
7120 (emit_insn_after_setloc): Likewise.
7121 (emit_jump_insn_after_setloc): Likewise.
7122 (emit_call_insn_after_setloc): Likewise.
7123 (emit_debug_insn_after_setloc): Likewise.
7124 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7125 "loc" param from "int" to "location_t".
7126 (emit_pattern_before): Convert NULL_RTX to NULL.
7127 (emit_insn_before_setloc): Convert "loc" param from "int" to
7129 (emit_jump_insn_before_setloc): Likewise.
7130 (emit_call_insn_before_setloc): Likewise.
7131 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7132 rtx_insn *. Convert "loc" param from "int" to "location_t".
7133 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7134 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7135 Convert 3rd param from "int" to "location_t".
7136 (emit_barrier_before, emit_barrier_after, next_real_insn):
7137 Strengthen param from rtx to rtx_insn *.
7138 (emit_label_before): Strengthen 1st param from "rtx" to
7139 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7141 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7142 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7143 Strengthen 2nd param from "rtx" to "rtx_insn *".
7144 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7145 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7146 Likewise. Convert 3rd param from "int" to "location_t".
7147 (emit_label_after): Strengthen 1st param from "rtx" to
7149 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7151 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7152 from "rtx" to "rtx_insn *".
7154 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7156 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7157 bodies streamed in with -Q.
7158 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7159 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7160 * gimple-streamer-out.c: Include gimple-pretty-print.h
7161 (output_bb): Dump stmts streamed.
7162 * lto-section-out.c: Include print-tree.h
7163 (lto_begin_section): Dump sections created.
7164 (lto_output_decl_index): Dump decl encoded.
7165 * lto-streamer-out.c: Include print-tree.h
7166 (create_output_block): Dump output block created.
7167 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7168 (output_function): Dump function output.
7169 (output_constructor): Dump constructor streamed.
7170 (write_global_stream): Output indexes encoded.
7171 (produce_asm_for_decls): Dump streams encoded.
7172 * lto-streamer.c (streamer_dump_file): New global var.
7173 * lto-streamer.h (streamer_dump_file): Declare.
7174 * passes.c (ipa_write_summaries): Initialize streamer dump.
7175 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7178 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7181 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7182 offsets for register save directives. Emit a second batch of save
7183 directives, if need be, when the function accesses prior frames.
7185 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7187 * config/arc/fpu.md (fmasf4): Force operand to register.
7188 (fnmasf4): Likewise.
7190 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7192 * config/arc/arc-protos.h (arc_pad_return): Remove.
7193 * config/arc/arc.c (machine_function): Remove force_short_suffix
7195 (arc_print_operand): Adjust printing of '&'.
7196 (arc_verify_short): Remove conditional printing of short suffix.
7197 (arc_final_prescan_insn): Remove reference to size_reason.
7198 (pad_return): New function.
7199 (arc_reorg): Call pad_return.
7200 (arc_pad_return): Remove.
7201 (arc_init_machine_status): Remove reference to force_short_suffix.
7202 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7203 (attr length): When attribute iscompact is true force to 2
7204 regardless; in the case of maybe check if we want to force the
7205 instruction to have 4 bytes length.
7206 (nopv): Change it to generate 4 byte long nop as well.
7207 (blockage): New pattern.
7208 (simple_return): Remove call to arc_pad_return.
7209 (p_return_i): Likewise.
7211 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7213 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7215 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7217 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7220 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7222 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7223 for ARC700 and ARCv2.
7225 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
7228 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7229 operands[2] instead of operands[1].
7232 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7234 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7235 case, check whether the outer register overlaps an unallocatable
7236 register, not just whether it fits the required class.
7238 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7240 * poly-int.h (can_div_trunc_p): Add new overload in which all values
7242 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7243 (memrefs_conflict_p): Likewise.
7244 (init_alias_analysis): Likewise.
7245 * cfgexpand.c (expand_debug_expr): Likewise.
7246 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7247 * cse.c (fold_rtx): Likewise.
7248 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7249 * expr.c (emit_block_move_hints): Likewise.
7250 (clear_storage_hints, push_block, emit_push_insn): Likewise.
7251 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7252 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7253 (emit_group_store): Likewise.
7254 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
7255 to read the PRE/POST_MODIFY increment.
7256 * calls.c (store_one_arg): Use strip_offset.
7257 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7259 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7261 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7262 (simplify_binary_operation_1): Extend CONST_INT handling to
7264 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7265 than a HOST_WIDE_INT.
7266 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7268 (adjust_mems, add_stores): Update accodingly.
7269 (vt_canonicalize_addr): Track polynomial offsets.
7270 (emit_note_insn_var_location): Likewise.
7271 (vt_add_function_parameter): Likewise.
7272 (vt_initialize): Likewise.
7274 2018-06-12 Jeff Law <law@redhat.com>
7276 * config.gcc (alpha*-*-freebsd*): Remove.
7277 * config/alpha/freebsd.h: Remove.
7279 2018-06-12 David Malcolm <dmalcolm@redhat.com>
7282 * spellcheck-tree.c (levenshtein_distance): Rename to...
7283 (get_edit_distance): ...this, and update for underlying renaming.
7284 * spellcheck-tree.h (levenshtein_distance): Rename to...
7285 (get_edit_distance): ...this.
7286 * spellcheck.c (levenshtein_distance): Rename to...
7287 (get_edit_distance): ...this. Convert from Levenshtein distance
7288 to Damerau-Levenshtein distance by supporting transpositions of
7289 adjacent characters. Rename "v1" to "v_next" and "v0" to
7291 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7292 (selftest::test_edit_distance_unit_test_oneway): ...this, and
7293 update for underlying renaming.
7294 (selftest::levenshtein_distance_unit_test): Rename to...
7295 (selftest::test_get_edit_distance_unit): ...this, and update for
7296 underlying renaming.
7297 (selftest::test_find_closest_string): Add example from PR 69968
7298 where transposition helps
7299 (selftest::test_metric_conditions): Update for renaming.
7300 (selftest::test_metric_conditions): Likewise.
7301 (selftest::spellcheck_c_tests): Likewise.
7302 * spellcheck.h (levenshtein_distance): Rename both overloads to...
7303 (get_edit_distance): ...this.
7304 (best_match::consider): Update for renaming.
7306 2018-06-12 Martin Sebor <msebor@redhat.com>
7308 PR tree-optimization/85259
7309 * builtins.c (compute_objsize): Handle constant offsets.
7310 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7311 true iff a warning has been issued.
7312 * gimple.h (gimple_nonartificial_location): New function.
7313 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7314 gimple_nonartificial_location and handle -Wno-system-headers.
7315 (handle_builtin_stxncpy): Same.
7317 2018-06-12 Martin Sebor <msebor@redhat.com>
7320 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7322 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
7324 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7325 BUILTIN_VEC_XST entries for pointer to double and long long.
7327 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
7330 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7332 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7335 2018-06-12 Martin Liska <mliska@suse.cz>
7337 * doc/options.texi: Document IntegerRange.
7339 2018-06-12 Martin Liska <mliska@suse.cz>
7341 * config/i386/i386.opt: Make MPX-related options as Deprecated.
7342 * opt-functions.awk: Handle Deprecated flag.
7343 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7345 (read_cmdline_option): Report warning for a deprecated option.
7346 * opts.h (struct cl_option): Add new field cl_deprecated.
7347 (CL_ERR_DEPRECATED): New.
7349 2018-06-12 Martin Liska <mliska@suse.cz>
7351 * doc/options.texi: Document Deprecated option flag.
7353 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7355 * config/arc/arc-arch.h (arc_extras): New enum.
7356 (arc_cpu_t):Add field extra.
7357 (arc_cpu_types): Consider the extras.
7358 * config/arc/arc-cpus.def: Add extras info.
7359 * config/arc/arc-opts.h (processor_type): Consider extra field.
7360 * config/arc/arc.c (arc_override_options): Handle extra field.
7362 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7364 * config/arc/arc-arch.h: Update ARC_OPTX macro.
7365 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7367 * config/arc/arc.c (arc_init): Update pic warning.
7368 (irq_range): Update irq range parsing warnings.
7369 (arc_override_options): Update various warning messages.
7370 (arc_handle_aux_attribute): Likewise.
7372 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
7374 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7376 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7378 * doc/sourcebuild.texi: Document usage of line number 0 in verify
7379 compiler messages directives.
7381 2018-06-12 Matthew Fortune <mfortune@gmail.com>
7383 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7384 * config/mips/mips-tables.opt: Regenerate.
7385 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7387 * doc/invoke.texi: Document -march=i6500.
7389 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
7391 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7392 (i6400_gpmul): Add cpu_unit.
7393 (i6400_gpdiv): Likewise.
7394 (i6400_msa_add_d): Update reservations.
7395 (i6400_msa_int_add) Likewise.
7396 (i6400_msa_short_logic3) Likewise.
7397 (i6400_msa_short_logic2) Likewise.
7398 (i6400_msa_short_logic) Likewise.
7399 (i6400_msa_move) Likewise.
7400 (i6400_msa_cmp) Likewise.
7401 (i6400_msa_short_float2) Likewise.
7402 (i6400_msa_div_d) Likewise.
7403 (i6400_msa_long_logic1) Likewise.
7404 (i6400_msa_long_logic2) Likewise.
7405 (i6400_msa_mult) Likewise.
7406 (i6400_msa_long_float2) Likewise.
7407 (i6400_msa_long_float4) Likewise.
7408 (i6400_msa_long_float5) Likewise.
7409 (i6400_msa_long_float8) Likewise.
7410 (i6400_fpu_fadd): Include frint type.
7411 (i6400_fpu_store): New define_insn_reservation.
7412 (i6400_fpu_load): Likewise.
7413 (i6400_fpu_move): Likewise.
7414 (i6400_fpu_fcmp): Likewise.
7415 (i6400_fpu_fmadd): Likewise.
7416 (i6400_int_mult): Include imul3nc type and update reservation.
7417 (i6400_int_div): Include idiv3 type and update reservation.
7418 (i6400_int_load): Update to check type not move_type.
7419 (i6400_int_store): Likewise.
7420 (i6400_int_prefetch): Set zero latency.
7422 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
7424 * gcc.c: Document new %@{...} sequence.
7425 (LINK_COMMAND_SPEC): Use it for the -L switches.
7426 (cpp_unique_options): Use it for the -I switches.
7427 (at_file_argbuf): New global variable.
7428 (in_at_file): Likewise.
7429 (alloc_args): Create at_file_argbuf.
7430 (clear_args): Truncate at_file_argbuf.
7431 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7432 (open_at_file): New function.
7433 (close_at_file): Likewise.
7434 (create_at_file): Delete.
7435 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7438 (validate_switches_from_spec): Deal with %@{...} sequence.
7439 (validate_switches): Likewise.
7440 (driver::finalize): Call clear_args.
7442 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
7444 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7446 2018-06-11 Martin Sebor <msebor@redhat.com>
7448 * doc/invoke.texi (-Wall): List -Wc++17-compat.
7449 (Wno-class-memaccess): Add @opindex.
7450 (Wno-templates, Wno-multiple-inheritance): Same.
7451 (Wno-virtual-inheritance, Wno-namespaces): Same.
7452 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7453 (Wno-format-overflow, Wno-format-truncation): Same.
7454 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7455 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7456 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7457 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7458 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7459 (Wno-misspelled-isr): Same.
7461 2018-06-11 Martin Sebor <msebor@redhat.com>
7463 * PR tree-optimization/86083
7464 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7466 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
7468 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7470 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
7473 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7474 on the correct operand.
7475 (*movdi_internal64): Ditto.
7477 2018-06-11 Martin Liska <mliska@suse.cz>
7479 PR tree-optimization/86089
7480 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7482 2018-06-11 Julia Koval <julia.koval@intel.com>
7484 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7485 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7486 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7488 2018-06-11 Olivier Hainque <hainque@adacore.com>
7490 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7491 for Ada with strict dwarf2.
7493 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
7496 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7499 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
7501 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7503 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
7505 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7508 2018-06-08 Martin Liska <mliska@suse.cz>
7510 * tree-cfg.h (debug_function): Fix argument type to match
7513 2018-06-08 Martin Liska <mliska@suse.cz>
7515 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7516 Remove usage of MPX-related (and removed) fields.
7517 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7519 2018-06-08 David Malcolm <dmalcolm@redhat.com>
7521 * cfg.c (debug): Use TDF_NONE rather than 0.
7522 * cfghooks.c (debug): Likewise.
7523 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7524 (struct dump_option_value_info): Convert to...
7525 (struct kv_pair): ...this template type.
7526 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7528 (optinfo_verbosity_options): Likewise.
7529 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7531 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7532 than int for "optgroup_flags" param.
7533 (dump_generic_expr_loc): Use dump_flags_t rather than int for
7535 (dump_dec): Likewise.
7536 (dump_finish): Use TDF_NONE rather than 0.
7537 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7538 rather than int for "optgroup_flags" param. Use TDF_NONE rather
7539 than 0. Update for change to option_ptr.
7540 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7541 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
7542 0. Update for changes to optinfo_verbosity_options and
7544 (opt_info_switch_p): Convert optgroup_flags from int to
7546 (dump_basic_block): Use dump_flags_t rather than int
7547 for "dump_kind" param.
7548 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7549 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7550 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7551 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7552 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7553 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7554 TDF_NONE): Convert from macros to...
7555 (enum dump_flag): ...this new enum.
7556 (dump_flags_t): Update to use enum.
7557 (operator|, operator&, operator~, operator|=, operator&=):
7558 Implement for dump_flags_t.
7559 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7560 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7561 Convert from macros to...
7562 (enum optgroup_flag): ...this new enum.
7563 (optgroup_flags_t): New typedef.
7564 (operator|, operator|=): Implement for optgroup_flags_t.
7565 (struct dump_file_info): Convert field "alt_flags" to
7566 dump_flags_t. Convert field "optgroup_flags" to
7568 (dump_basic_block): Use dump_flags_t rather than int for param.
7569 (dump_generic_expr_loc): Likewise.
7570 (dump_dec): Likewise.
7571 (dump_register): Convert param "optgroup_flags" to
7573 (opt_info_enable_passes): Likewise.
7574 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7576 * gimple-pretty-print.c (debug): Likewise.
7577 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7578 (merged_store_group::apply_stores): Likewise.
7579 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7580 * gimple.c (verify_gimple_pp): Likewise.
7581 * graphite-poly.c (print_pbb_body): Likewise.
7582 * passes.c (pass_manager::register_one_dump_file): Convert
7583 local "optgroup_flags" to optgroup_flags_t.
7584 * print-tree.c (print_node): Use TDF_NONE rather than 0.
7586 (debug_body): Likewise.
7587 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7588 to optgroup_flags_t.
7589 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7591 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7592 (convert_mult_to_fma): Likewise.
7593 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7594 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7595 * tree-vect-data-refs.c (dump_lower_bound): Convert param
7596 "dump_kind" to dump_flags_t.
7598 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7600 * config/rs6000/rs6000.c (min, max): Delete.
7602 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7604 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7605 -mabi=spe and -mabi=no-spe.
7607 2018-06-08 Martin Liska <mliska@suse.cz>
7609 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7610 where we expect an existing summary.
7612 2018-06-08 Martin Liska <mliska@suse.cz>
7614 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7615 * ipa-inline.h (estimate_edge_growth): Likewise.
7617 2018-06-08 Martin Liska <mliska@suse.cz>
7619 * cgraph.c (function_version_hasher::hash): Use
7620 cgraph_node::get_uid ().
7621 (function_version_hasher::equal):
7622 * cgraph.h (cgraph_node::get_uid): New method.
7623 * ipa-inline.c (update_caller_keys): Use
7624 cgraph_node::get_uid ().
7625 (update_callee_keys): Likewise.
7626 * ipa-utils.c (searchc): Likewise.
7627 (ipa_reduced_postorder): Likewise.
7628 * lto-cgraph.c (input_node): Likewise.
7629 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7630 * symbol-summary.h (symtab_insertion): Likewise.
7631 (symtab_removal): Likewise.
7632 (symtab_duplication): Likewise.
7633 * tree-pretty-print.c (dump_function_header): Likewise.
7634 * tree-sra.c (convert_callers_for_node): Likewise.
7636 2018-06-08 Martin Liska <mliska@suse.cz>
7638 * cgraph.c (symbol_table::create_edge): Always assign a new
7640 (symbol_table::free_edge): Do not recycle numbers.
7641 * cgraph.h (cgraph_edge::get): New method.
7642 * symbol-summary.h (symtab_removal): Use it.
7643 (symtab_duplication): Likewise.
7644 (call_summary::hashable_uid): Remove.
7646 2018-06-08 Martin Liska <mliska@suse.cz>
7648 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7649 (initialize_growth_caches): Remove.
7650 (free_growth_caches): Likewise.
7651 (do_estimate_edge_time): Use edge_growth_cache.
7652 (do_estimate_edge_size): Likewise.
7653 (do_estimate_edge_hints): Likewise.
7654 * ipa-inline.c (reset_edge_caches): Likewise.
7655 (recursive_inlining): Likewise.
7656 (inline_small_functions): Likewise.
7657 * ipa-inline.h (initialize_growth_caches): Remove.
7658 (estimate_edge_size): Likewise.
7659 (estimate_edge_time): Likewise.
7660 (estimate_edge_hints): Likewise.
7661 (reset_edge_growth_cache): Likewise.
7662 * symbol-summary.h (call_summary::remove): New method.
7664 2018-06-08 Martin Liska <mliska@suse.cz>
7666 * ipa-cp.c (class edge_clone_summary): New summary.
7667 (grow_edge_clone_vectors): Remove.
7668 (ipcp_edge_duplication_hook): Remove.
7669 (class edge_clone_summary_t): New call_summary class.
7670 (ipcp_edge_removal_hook): Remove.
7671 (edge_clone_summary_t::duplicate): New function.
7672 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7673 (create_specialized_node): Likewise.
7674 (ipcp_driver): Initialize edge_clone_summaries and do not
7677 2018-06-08 Martin Liska <mliska@suse.cz>
7679 * symbol-summary.h (get): New function.
7680 (call_summary::m_initialize_when_cloning): New class member.
7682 2018-06-08 Martin Liska <mliska@suse.cz>
7684 * cgraph.c (cgraph_node::remove): Do not recycle uid.
7685 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7686 (symbol_table::allocate_cgraph_symbol): Do not set uid.
7687 * passes.c (uid_hash_t): Record removed_nodes by their uids.
7688 (remove_cgraph_node_from_order): Use the removed_nodes set.
7689 (do_per_function_toporder): Likwise.
7690 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7691 instead of summary_uid.
7692 (symtab_removal): Likewise.
7693 (symtab_duplication): Likewise.
7695 2018-06-08 Martin Liska <mliska@suse.cz>
7697 * ipa-cp.c (ipcp_store_bits_results): Use
7698 ipcp_transformation_sum.
7699 (ipcp_store_vr_results): Likewise.
7700 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7702 (ipcp_transformation_initialize): ... this.
7703 (ipa_set_node_agg_value_chain):
7704 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7705 (write_ipcp_transformation_info): Likewise.
7706 (read_ipcp_transformation_info): Likewise.
7707 (ipcp_update_bits): Likewise.
7708 (ipcp_update_vr): Likewise.
7709 (ipcp_transform_function): Likewise.
7710 * ipa-prop.h: Rename ipcp_transformation_summary to
7711 ipcp_transformation.
7712 (class ipcp_transformation_t): New function summary.
7713 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7714 (ipa_get_agg_replacements_for_node): Likewise.
7716 2018-06-08 Martin Liska <mliska@suse.cz>
7718 * ipa-pure-const.c (struct funct_state_d): Do it class instead
7720 (class funct_state_summary_t): New function_summary class.
7721 (has_function_state): Remove.
7722 (get_function_state): Likewise.
7723 (set_function_state): Likewise.
7724 (add_new_function): Likewise.
7725 (funct_state_summary_t::insert): New function.
7726 (duplicate_node_data): Remove.
7727 (remove_node_data): Remove.
7728 (funct_state_summary_t::duplicate): New function.
7729 (register_hooks): Create new funct_state_summaries.
7730 (pure_const_generate_summary): Use it.
7731 (pure_const_write_summary): Likewise.
7732 (pure_const_read_summary): Likewise.
7733 (propagate_pure_const): Likewise.
7734 (propagate_nothrow): Likewise.
7735 (dump_malloc_lattice): Likewise.
7736 (propagate_malloc): Likewise.
7737 (execute): Do not register hooks, just remove summary
7739 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7742 2018-06-08 Martin Liska <mliska@suse.cz>
7744 * ipa-reference.c (remove_node_data): Remove.
7745 (duplicate_node_data): Likewise.
7746 (class ipa_ref_var_info_summary_t): New class.
7747 (class ipa_ref_opt_summary_t): Likewise.
7748 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7749 (get_reference_optimization_summary): Use
7750 ipa_ref_opt_sum_summaries.
7751 (set_reference_vars_info): Remove.
7752 (set_reference_optimization_summary): Likewise.
7753 (ipa_init): Create summaries.
7754 (init_function_info): Use function summary.
7755 (ipa_ref_opt_summary_t::duplicate): New function.
7756 (ipa_ref_opt_summary_t::remove): New function.
7757 (get_read_write_all_from_node): Fix GNU coding style.
7758 (propagate): Use function summary.
7759 (write_node_summary_p): Fix GNU coding style.
7760 (stream_out_bitmap): Likewise.
7761 (ipa_reference_read_optimization_summary): Use function summary.
7762 (ipa_reference_c_finalize): Do not release hooks.
7764 2018-06-08 Martin Liska <mliska@suse.cz>
7766 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7767 (analyze_function_body): Extract multiple calls of get_create.
7768 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7769 * ipa-inline.c (recursive_inlining): Use ::get method.
7770 * ipa-inline.h (estimate_edge_growth): Likewise.
7772 2018-06-08 Martin Liska <mliska@suse.cz>
7774 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7776 (hsa_function_summary::hsa_function_summary): Use the new enum
7778 (hsa_gpu_implementation_p): Use hsa_summaries::get.
7779 * hsa-gen.c (hsa_get_host_function): Likewise.
7780 (get_brig_function_name): Likewise.
7781 * ipa-hsa.c (process_hsa_functions): Likewise.
7782 (ipa_hsa_write_summary): Likewise.
7783 * symbol-summary.h (symtab_duplication): Use ::get function/
7784 (get): New function.
7786 2018-06-08 Martin Liska <mliska@suse.cz>
7788 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7790 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7791 (hsa_register_kernel): Likewise.
7792 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7793 * hsa-gen.c (hsa_get_host_function): Likewise.
7794 (get_brig_function_name): Likewise.
7795 (generate_hsa): Likewise.
7796 (pass_gen_hsail::execute): Likewise.
7797 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7798 (devirtualization_time_bonus): Likewise.
7799 (ipcp_propagate_stage): Likewise.
7800 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7801 (edge_set_predicate): Likewise.
7802 (evaluate_conditions_for_known_args): Likewise.
7803 (evaluate_properties_for_edge): Likewise.
7804 (ipa_fn_summary::reset): Likewise.
7805 (ipa_fn_summary_t::duplicate): Likewise.
7806 (dump_ipa_call_summary): Likewise.
7807 (ipa_dump_fn_summary): Likewise.
7808 (analyze_function_body): Likewise.
7809 (compute_fn_summary): Likewise.
7810 (estimate_edge_devirt_benefit): Likewise.
7811 (estimate_edge_size_and_time): Likewise.
7812 (estimate_calls_size_and_time): Likewise.
7813 (estimate_node_size_and_time): Likewise.
7814 (inline_update_callee_summaries): Likewise.
7815 (remap_edge_change_prob): Likewise.
7816 (remap_edge_summaries): Likewise.
7817 (ipa_merge_fn_summary_after_inlining): Likewise.
7818 (ipa_update_overall_fn_summary): Likewise.
7819 (read_ipa_call_summary): Likewise.
7820 (inline_read_section): Likewise.
7821 (write_ipa_call_summary): Likewise.
7822 (ipa_fn_summary_write): Likewise.
7823 (ipa_free_fn_summary): Likewise.
7824 * ipa-hsa.c (process_hsa_functions): Likewise.
7825 (ipa_hsa_write_summary): Likewise.
7826 (ipa_hsa_read_section): Likewise.
7827 * ipa-icf.c (sem_function::merge): Likewise.
7828 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7829 (do_estimate_edge_time): Likewise.
7830 (estimate_size_after_inlining): Likewise.
7831 (estimate_growth): Likewise.
7832 (growth_likely_positive): Likewise.
7833 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7834 (inline_call): Likewise.
7835 * ipa-inline.c (caller_growth_limits): Likewise.
7836 (can_inline_edge_p): Likewise.
7837 (can_inline_edge_by_limits_p): Likewise.
7838 (compute_uninlined_call_time): Likewise.
7839 (compute_inlined_call_time): Likewise.
7840 (want_inline_small_function_p): Likewise.
7841 (edge_badness): Likewise.
7842 (update_caller_keys): Likewise.
7843 (update_callee_keys): Likewise.
7844 (recursive_inlining): Likewise.
7845 (inline_small_functions): Likewise.
7846 (inline_to_all_callers_1): Likewise.
7847 (dump_overall_stats): Likewise.
7848 (early_inline_small_functions): Likewise.
7849 (early_inliner): Likewise.
7850 * ipa-inline.h (estimate_edge_growth): Likewise.
7851 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7852 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7853 * ipa-prop.h (IPA_NODE_REF): Likewise.
7854 (IPA_EDGE_REF): Likewise.
7855 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7856 (propagate_malloc): Likewise.
7857 * ipa-split.c (execute_split_functions): Likewise.
7858 * symbol-summary.h: Rename get to get_create.
7860 (get_create): Likewise.
7861 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7863 2018-06-08 Martin Liska <mliska@suse.cz>
7865 * symbol-summary.h (release): Move definition out of class
7867 (symtab_removal): Likewise.
7868 (symtab_duplication): Likewise.
7870 2018-06-08 Martin Liska <mliska@suse.cz>
7872 * symbol-summary.h (function_summary): Move constructor
7873 implementation out of class declaration.
7874 (release): Likewise.
7875 (symtab_insertion): Likewise.
7876 (symtab_removal): Likewise.
7877 (symtab_duplication): Likewise.
7880 2018-06-08 Martin Liska <mliska@suse.cz>
7882 * Makefile.in: Remove support for MPX (macros, related functions,
7883 fields in cgraph_node, ...).
7884 * builtin-types.def (BT_BND): Likewise.
7885 (BT_FN_BND_CONST_PTR): Likewise.
7886 (BT_FN_CONST_PTR_BND): Likewise.
7887 (BT_FN_VOID_PTR_BND): Likewise.
7888 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7889 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7890 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7891 (expand_builtin_mempcpy_with_bounds): Likewise.
7892 (expand_builtin_memset_with_bounds): Likewise.
7893 (expand_builtin_memset_args): Likewise.
7894 (std_expand_builtin_va_start): Likewise.
7895 (expand_builtin): Likewise.
7896 (expand_builtin_with_bounds): Likewise.
7897 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7898 (DEF_LIB_BUILTIN_CHKP): Likewise.
7899 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7900 (DEF_CHKP_BUILTIN): Likewise.
7901 (BUILT_IN_MEMCPY): Likewise.
7902 (BUILT_IN_MEMMOVE): Likewise.
7903 (BUILT_IN_MEMPCPY): Likewise.
7904 (BUILT_IN_MEMSET): Likewise.
7905 (BUILT_IN_STPCPY): Likewise.
7906 (BUILT_IN_STRCAT): Likewise.
7907 (BUILT_IN_STRCHR): Likewise.
7908 (BUILT_IN_STRCPY): Likewise.
7909 (BUILT_IN_STRLEN): Likewise.
7910 (BUILT_IN_MEMCPY_CHK): Likewise.
7911 (BUILT_IN_MEMMOVE_CHK): Likewise.
7912 (BUILT_IN_MEMPCPY_CHK): Likewise.
7913 (BUILT_IN_MEMSET_CHK): Likewise.
7914 (BUILT_IN_STPCPY_CHK): Likewise.
7915 (BUILT_IN_STRCAT_CHK): Likewise.
7916 (BUILT_IN_STRCPY_CHK): Likewise.
7917 * calls.c (store_bounds): Likewise.
7918 (emit_call_1): Likewise.
7919 (special_function_p): Likewise.
7920 (maybe_warn_nonstring_arg): Likewise.
7921 (initialize_argument_information): Likewise.
7922 (finalize_must_preallocate): Likewise.
7923 (compute_argument_addresses): Likewise.
7924 (expand_call): Likewise.
7925 * cfgexpand.c (expand_call_stmt): Likewise.
7926 (expand_return): Likewise.
7927 (expand_gimple_stmt_1): Likewise.
7928 (pass_expand::execute): Likewise.
7929 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7930 (cgraph_node::remove): Likewise.
7931 (cgraph_node::dump): Likewise.
7932 (cgraph_node::verify_node): Likewise.
7933 * cgraph.h (chkp_function_instrumented_p): Likewise.
7934 (symtab_node::get_alias_target): Likewise.
7935 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7936 (cgraph_local_p): Likewise.
7937 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7938 (cgraph_edge::rebuild_references): Likewise.
7939 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7940 (walk_polymorphic_call_targets): Likewise.
7941 (cgraph_node::expand_thunk): Likewise.
7942 (symbol_table::output_weakrefs): Likewise.
7943 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7944 (ix86_handle_option): Likewise.
7945 * config/i386/constraints.md: Likewise.
7946 * config/i386/i386-builtin-types.def (BND): Likewise.
7950 * config/i386/i386-builtin.def (BDESC_END): Likewise.
7951 (BDESC_FIRST): Likewise.
7953 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7954 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7955 * config/i386/i386.c (enum reg_class): Likewise.
7956 (ix86_target_string): Likewise.
7957 (ix86_option_override_internal): Likewise.
7958 (ix86_conditional_register_usage): Likewise.
7959 (ix86_valid_target_attribute_inner_p): Likewise.
7960 (ix86_set_indirect_branch_type): Likewise.
7961 (ix86_set_current_function): Likewise.
7962 (ix86_function_arg_regno_p): Likewise.
7963 (init_cumulative_args): Likewise.
7964 (ix86_function_arg_advance): Likewise.
7965 (ix86_function_arg): Likewise.
7966 (ix86_pass_by_reference): Likewise.
7967 (ix86_function_value_regno_p): Likewise.
7968 (ix86_function_value_1): Likewise.
7969 (ix86_function_value_bounds): Likewise.
7970 (ix86_return_in_memory): Likewise.
7971 (ix86_setup_incoming_vararg_bounds): Likewise.
7972 (ix86_va_start): Likewise.
7973 (indirect_thunk_need_prefix): Likewise.
7974 (print_reg): Likewise.
7975 (ix86_print_operand): Likewise.
7976 (ix86_expand_call): Likewise.
7977 (ix86_output_function_return): Likewise.
7978 (reg_encoded_number): Likewise.
7979 (BDESC_VERIFYS): Likewise.
7980 (ix86_init_mpx_builtins): Likewise.
7981 (ix86_init_builtins): Likewise.
7982 (ix86_emit_cmove): Likewise.
7983 (ix86_emit_move_max): Likewise.
7984 (ix86_expand_builtin): Likewise.
7985 (ix86_builtin_mpx_function): Likewise.
7986 (ix86_get_arg_address_for_bt): Likewise.
7987 (ix86_load_bounds): Likewise.
7988 (ix86_store_bounds): Likewise.
7989 (ix86_load_returned_bounds): Likewise.
7990 (ix86_store_returned_bounds): Likewise.
7991 (ix86_class_likely_spilled_p): Likewise.
7992 (ix86_hard_regno_mode_ok): Likewise.
7993 (x86_order_regs_for_local_alloc): Likewise.
7994 (ix86_mitigate_rop): Likewise.
7995 (ix86_bnd_prefixed_insn_p): Likewise.
7996 (ix86_mpx_bound_mode): Likewise.
7997 (ix86_make_bounds_constant): Likewise.
7998 (ix86_initialize_bounds): Likewise.
7999 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8000 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8001 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8002 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8003 (TARGET_CHKP_BOUND_MODE): Likewise.
8004 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8005 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8006 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8007 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8008 * config/i386/i386.h (TARGET_MPX): Likewise.
8009 (TARGET_MPX_P): Likewise.
8010 (VALID_BND_REG_MODE): Likewise.
8011 (FIRST_BND_REG): Likewise.
8012 (LAST_BND_REG): Likewise.
8013 (enum reg_class): Likewise.
8014 (BND_REG_P): Likewise.
8015 (BND_REGNO_P): Likewise.
8016 (BNDmode): Likewise.
8017 (ADJUST_INSN_LENGTH): Likewise.
8018 * config/i386/i386.md: Likewise.
8019 * config/i386/i386.opt: Likewise.
8020 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8021 (defined): Likewise.
8022 (LINK_MPX): Likewise.
8023 (MPX_SPEC): Likewise.
8024 (LIBMPX_SPEC): Likewise.
8025 (LIBMPXWRAPPERS_SPEC): Likewise.
8026 (CHKP_SPEC): Likewise.
8027 * config/i386/predicates.md: Likewise.
8028 * dbxout.c (dbxout_type): Likewise.
8029 * doc/extend.texi: Likewise.
8030 * doc/invoke.texi: Likewise.
8031 * doc/md.texi: Likewise.
8032 * doc/tm.texi: Likewise.
8033 * doc/tm.texi.in: Likewise.
8034 * dwarf2out.c (is_base_type): Likewise.
8035 (gen_formal_types_die): Likewise.
8036 (gen_subprogram_die): Likewise.
8037 (gen_type_die_with_usage): Likewise.
8038 (gen_decl_die): Likewise.
8039 (dwarf2out_late_global_decl): Likewise.
8040 * expr.c (expand_assignment): Likewise.
8041 (emit_storent_insn): Likewise.
8042 (store_expr_with_bounds): Likewise.
8043 (store_expr): Likewise.
8044 (expand_expr_real_1): Likewise.
8045 * expr.h (store_expr_with_bounds): Likewise.
8046 * function.c (use_register_for_decl): Likewise.
8047 (struct bounds_parm_data): Likewise.
8048 (assign_parms_augmented_arg_list): Likewise.
8049 (assign_parm_find_entry_rtl): Likewise.
8050 (assign_parm_is_stack_parm): Likewise.
8051 (assign_parm_load_bounds): Likewise.
8052 (assign_bounds): Likewise.
8053 (assign_parms): Likewise.
8054 (expand_function_start): Likewise.
8055 * gcc.c (CHKP_SPEC): Likewise.
8056 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8057 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8058 (wrestrict_dom_walker::check_call): Likewise.
8059 * gimple.c (gimple_build_call_from_tree): Likewise.
8060 * gimple.h (enum gf_mask): Likewise.
8061 (gimple_call_with_bounds_p): Likewise.
8062 (gimple_call_set_with_bounds): Likewise.
8063 * gimplify.c (gimplify_init_constructor): Likewise.
8064 * ipa-cp.c (initialize_node_lattices): Likewise.
8065 (propagate_constants_across_call): Likewise.
8066 (find_more_scalar_values_for_callers_subset): Likewise.
8067 * ipa-hsa.c (process_hsa_functions): Likewise.
8068 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8069 * ipa-icf.c (sem_function::merge): Likewise.
8070 * ipa-inline.c (early_inliner): Likewise.
8071 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8072 (warn_function_cold): Likewise.
8073 (propagate_pure_const): Likewise.
8074 * ipa-ref.h (enum GTY): Likewise.
8075 * ipa-split.c (find_retbnd): Likewise.
8076 (consider_split): Likewise.
8077 (split_function): Likewise.
8078 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8079 * ipa.c (walk_polymorphic_call_targets): Likewise.
8080 (symbol_table::remove_unreachable_nodes): Likewise.
8081 (process_references): Likewise.
8082 (cgraph_build_static_cdtor_1): Likewise.
8083 * lto-cgraph.c (lto_output_node): Likewise.
8084 (output_refs): Likewise.
8085 (compute_ltrans_boundary): Likewise.
8086 (input_overwrite_node): Likewise.
8087 (input_node): Likewise.
8088 (input_cgraph_1): Likewise.
8089 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8090 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8091 (class pass_chkp_instrumentation_passes): Likewise.
8092 (make_pass_chkp_instrumentation_passes): Likewise.
8093 * passes.def: Likewise.
8094 * rtl.h (struct GTY): Likewise.
8095 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8096 * stor-layout.c (layout_type): Likewise.
8097 * symtab.c: Likewise.
8098 * target.def: Likewise.
8099 * targhooks.c (default_chkp_bound_type): Likewise.
8100 (default_chkp_bound_mode): Likewise.
8101 (default_builtin_chkp_function): Likewise.
8102 (default_chkp_function_value_bounds): Likewise.
8103 (default_chkp_make_bounds_constant): Likewise.
8104 (default_chkp_initialize_bounds): Likewise.
8105 * targhooks.h (default_chkp_bound_type): Likewise.
8106 (default_chkp_bound_mode): Likewise.
8107 (default_builtin_chkp_function): Likewise.
8108 (default_chkp_function_value_bounds): Likewise.
8109 (default_chkp_make_bounds_constant): Likewise.
8110 (default_chkp_initialize_bounds): Likewise.
8111 * toplev.c (compile_file): Likewise.
8112 (process_options): Likewise.
8113 * tree-core.h (DEF_BUILTIN): Likewise.
8114 (DEF_BUILTIN_CHKP): Likewise.
8115 * tree-inline.c (declare_return_variable): Likewise.
8116 (remap_gimple_stmt): Likewise.
8117 (copy_bb): Likewise.
8118 (initialize_inlined_parameters): Likewise.
8119 (expand_call_inline): Likewise.
8120 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8121 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8122 (make_pass_ipa_chkp_produce_thunks): Likewise.
8123 (make_pass_chkp): Likewise.
8124 (make_pass_chkp_opt): Likewise.
8125 (make_pass_chkp_instrumentation_passes): Likewise.
8126 * tree-pretty-print.c (dump_generic_node): Likewise.
8127 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8128 * tree-ssa-dce.c (propagate_necessity): Likewise.
8129 (eliminate_unnecessary_stmts): Likewise.
8130 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8131 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8132 * tree-ssa-sccvn.h: Likewise.
8133 * tree-ssa-strlen.c (get_string_length): Likewise.
8134 (valid_builtin_call): Likewise.
8135 (adjust_last_stmt): Likewise.
8136 (handle_builtin_strchr): Likewise.
8137 (handle_builtin_strcpy): Likewise.
8138 (handle_builtin_stxncpy): Likewise.
8139 (handle_builtin_memcpy): Likewise.
8140 (handle_builtin_strcat): Likewise.
8141 (strlen_check_and_optimize_stmt): Likewise.
8142 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8143 * tree-streamer-in.c: Likewise.
8144 * tree-streamer.c (record_common_node): Likewise.
8145 * tree.c (tree_code_size): Likewise.
8146 (wide_int_to_tree_1): Likewise.
8147 (type_contains_placeholder_1): Likewise.
8148 (build_common_tree_nodes): Likewise.
8149 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8150 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8151 (POINTER_BOUNDS_P): Likewise.
8152 (BOUNDED_TYPE_P): Likewise.
8153 (BOUNDED_P): Likewise.
8154 (CALL_WITH_BOUNDS_P): Likewise.
8155 (pointer_bounds_type_node): Likewise.
8156 * value-prof.c (gimple_ic): Likewise.
8157 * var-tracking.c (vt_add_function_parameters): Likewise.
8158 * varasm.c (make_decl_rtl): Likewise.
8159 (assemble_start_function): Likewise.
8160 (output_constant): Likewise.
8161 (maybe_assemble_visibility): Likewise.
8162 * varpool.c (ctor_for_folding): Likewise.
8163 * chkp-builtins.def: Remove.
8164 * ipa-chkp.c: Remove.
8165 * ipa-chkp.h: Remove.
8166 * rtl-chkp.c: Remove.
8167 * rtl-chkp.h: Remove.
8168 * tree-chkp-opt.c: Remove.
8169 * tree-chkp.c: Remove.
8170 * tree-chkp.h: Remove.
8172 2018-06-07 Carl Love <cel@us.ibm.com>
8174 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8175 vextract_fp_from_shortl): Add BE support.
8177 2018-06-07 Paul Koning <ni1d@arrl.net>
8179 * compare-elim.c (try_merge_compare): Don't merge compare if
8180 address contains a side effect.
8181 (try_eliminate_compare): Likewise.
8183 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8185 * config.gcc: Support "tremont".
8186 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8187 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8189 * config/i386/i386.c (m_TREMONT): Define.
8190 (processor_target_table): Add "tremont".
8191 (PTA_TREMONT): Define.
8192 (ix86_lea_outperforms): Add TARGET_TREMONT.
8193 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8194 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8195 and M_INTEL_GOLDMONT_PLUS.
8196 (fold_builtin_cpu): Add "tremont".
8197 (ix86_add_stmt_cost): Add TARGET_TREMONT.
8198 (ix86_option_override_internal): Add "tremont".
8199 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8200 (processor_type): Add PROCESSOR_TREMONT.
8201 * config/i386/x86-tune.def: Add m_TREMONT.
8202 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8204 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8206 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8207 symbol defined for msp430i* devices to be lower case.
8209 2018-06-07 Richard Biener <rguenther@suse.de>
8211 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8212 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
8213 Properly wrap signed arithmetic if overflow wraps.
8215 2018-06-07 Jakub Jelinek <jakub@redhat.com>
8217 PR tree-optimization/69615
8218 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8219 of a cast from a same precision integral SSA_NAME in a bb dominated
8220 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
8221 cast to utype if rhs2 has already a compatible type.
8223 2018-06-07 Richard Biener <rguenther@suse.de>
8225 PR tree-optimization/85935
8226 * graphite-scop-detection.c (find_params_in_bb): Analyze
8227 condition operands with respect to the correct loop. Assert
8228 the analysis doesn't fail.
8230 2018-06-04 Carl Love <cel@us.ibm.com>
8232 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8233 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
8234 as it is slightly cheaper.
8235 (first_match_or_eos_index_<mode>):
8236 Calculate index using natural element order.
8237 (first_match_index_<mode>):
8238 Calculate index using natural element order.
8239 (first_match_or_eos_index_<mode>):
8240 Calculate index using natural order.
8241 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8242 for BE and LE modes.
8243 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8244 P9V_BUILTIN_VCLZLSBB_V16QI.
8245 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8248 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8250 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8251 indentation and line wrap for many prototypes. Add missing
8252 @smallexample directives around block of prototypes for vec_xl and
8255 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
8257 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8258 track if we pass or return IEEE 128-bit floating point.
8259 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8260 C++ mangling that is compatible with GCC 8.1.
8261 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8262 (init_cumulative_args): Note if we pass or return IEEE 128-bit
8263 floating point types.
8264 (rs6000_function_arg_advance_1): Likewise.
8265 (rs6000_mangle_type): Optionally generate mangled names that match
8266 what GCC 8.1 generated for IEEE 128-bit floating point types.
8267 (rs6000_globalize_decl_name): If we have an external function that
8268 passes or returns IEEE 128-bit types, generate a weak reference
8269 from the mangled name used in GCC 8.1 to the current mangled
8271 (rs6000_init_builtins): Make __ibm128 use the long double type if
8272 long double is IBM extended double. Make __float128 use the long
8273 double type if long double is IEEE 128-bit.
8276 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8277 macro for __ibm128 built-in functions.
8278 (PACK_IF): Add __ibm128 pack/unpack functions.
8279 (UNPACK_IF): Likewise.
8280 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8281 enable long double built-in functions if long double is IEEE
8282 128-bit floating point.
8283 (rs6000_invalid_builtin): Update long double built-in function
8285 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8286 functions, adjust the built-in function to use the long double
8287 built-in function if __ibm128 and long double are the same type.
8288 * doc/extend.texi (PowerPC builtins): Update documention for
8289 __builtin_{,un}pack_longdouble. Add documentation for
8290 __builtin_{,un}pack_ibm128.
8292 2018-06-06 Jim Wilson <jimw@sifive.com>
8294 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8295 (struct machine_function): New field interrupt_mode.
8296 (riscv_handle_type_attribute): New function. Add forward declaration.
8297 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8298 (riscv_expand_epilogue): Check interrupt_mode field.
8299 (riscv_set_current_function): Check interrupt attribute args and
8300 set interrupt_mode field.
8301 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8302 (riscv_sret, riscv_uret): New.
8303 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8304 new arguments to interrupt attribute.
8306 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
8309 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8310 Don't handle -mcpu=power8 if -mpower9-vector is also used.
8312 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8314 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8315 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8316 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8317 several redundant entries.
8319 2018-06-06 David Malcolm <dmalcolm@redhat.com>
8321 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8322 type from "rtx" to "rtx_insn *".
8323 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8324 for local "call_insn", removing cast.
8325 (ix86_expand_call): Likewise, introducing a "call_insn" local.
8327 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
8329 PR tree-optimization/86066
8330 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8331 for BIT_INSERT_EXPR stores.
8333 2018-06-06 Richard Biener <rguenther@suse.de>
8335 PR tree-optimization/86062
8336 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8337 component refs ontop
8338 of to be offsetted base.
8340 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8342 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8343 to be static and remove check on interrupt attribute name.
8345 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
8347 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8348 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8350 2018-06-05 Steve Ellcey <sellcey@cavium.com>
8353 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8355 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8356 Remove second argument, change how error is called.
8357 (aarch64_layout_arg): Remove second argument from
8358 aarch64_err_no_fpadvsimd call.
8359 (aarch64_init_cumulative_args): Ditto.
8360 (aarch64_gimplify_va_arg_expr): Ditto.
8361 * config/aarch64/aarch64.md (mov<mode>): Ditto.
8363 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
8365 * config/i386/i386.md (simple_return_indirect_internal): New expander.
8366 (*simple_return_indirect_internal<mode>): Rename from
8367 simple_return_indirect_internal. Use W mode iterator.
8368 (rstorssp): New expander.
8369 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
8370 (clrssbsy): New expander.
8371 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
8373 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
8375 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8377 (cmse_check_pointed_object): Likewise.
8379 2018-06-05 Martin Liska <mliska@suse.cz>
8381 PR gcov-profile/47618
8382 * doc/invoke.texi: Document how -fprofile-dir format
8385 2018-06-05 Richard Biener <rguenther@suse.de>
8387 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8388 removal pretend DOM info isn't available so we do not update
8389 it and only remove edges, not dominated blocks. Actually free
8390 DOM info in case we removed something. Remove unreachable blocks.
8391 (mfb_keep_latches): Work with either DOM info or marked backedges.
8392 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8393 first. Mark backedges if DOM info isn't available.
8394 (Re-)compute DOM info after cleanup_control_flow_pre.
8396 2018-06-05 Richard Biener <rguenther@suse.de>
8398 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8399 (locus_discrim_hasher::hash): Adjust.
8400 (locus_discrim_hasher::equal): Likewise.
8401 (next_discriminator_for_locus): Work on line directly.
8402 (same_line_p): Pass in expanded locus1 as well.
8403 (assign_discriminators): Avoid redundant location expansions.
8405 2018-06-05 Richard Biener <rguenther@suse.de>
8407 PR tree-optimization/86046
8408 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8409 if required after clearing TREE_ADDRESSABLE.
8411 2018-06-05 Richard Biener <rguenther@suse.de>
8413 PR tree-optimization/86047
8414 * tree-ssa-loop.c (for_each_index): Glob handling of all
8415 decls and constants and really handle all of them.
8417 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8420 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8421 qualifier_void_pointer and qualifier_const_void_pointer.
8422 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8423 (arm_init_builtins): Handle the above.
8424 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8425 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8426 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8429 2018-06-05 Martin Liska <mliska@suse.cz>
8431 * auto-profile.c (read_autofdo_file): Do not use
8432 gcov_ctr_summary struct.
8433 (afdo_callsite_hot_enough_for_early_inline): Likewise.
8434 * coverage.c (struct counts_entry): Likewise.
8435 (read_counts_file): Read just single summary entry.
8436 (get_coverage_counts): Use gcov_summary struct.
8437 * coverage.h (get_coverage_counts): Likewise.
8438 * gcov-dump.c (dump_working_sets): Likewise.
8439 (tag_summary): Dump just single summary.
8440 * gcov-io.c (gcov_write_summary): Write just histogram
8442 (gcov_read_summary): Read just single summary.
8443 (compute_working_sets): Use gcov_summary struct.
8444 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8445 of GCOV_COUNTERS_SUMMABLE.
8446 (GCOV_COUNTERS_SUMMABLE): Remove.
8447 (GCOV_FIRST_VALUE_COUNTER): Replace with
8448 GCOV_COUNTER_V_INTERVAL.
8449 (struct gcov_ctr_summary): Remove.
8450 (struct gcov_summary): Directly use fields of former
8452 (compute_working_sets): Use gcov_summary struct.
8453 * gcov.c (read_count_file): Do not use ctrs fields.
8454 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8456 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8458 * profile.c: Likewise.
8459 * profile.h: Likewise.
8461 2018-06-05 Martin Liska <mliska@suse.cz>
8463 PR gcov-profile/84846
8464 * gcov.c (output_lines): Print working directory only
8465 in intermediate format.
8467 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
8469 * config/s390/s390-builtin-types.def: Add void function type.
8470 * config/s390/s390-builtins.def: Use the function type for the
8473 2018-06-04 Jim Wilson <jimw@sifive.com>
8475 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8477 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8478 and maybe_eh_return. Change regno to unsigned int. Use new args to
8479 handle EH_RETURN_DATA_REGNO registers properly.
8480 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8481 (riscv_expand_epilogue): Update comment. Change argument name and
8482 type. Update code to use new name and type. Pass new args to
8483 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
8485 * config/riscv/riscv.md (NORMAL_RETURN): New.
8486 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8487 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8488 (eh_return): Call gen_eh_return_internal and emit barrier.
8489 (eh_return_internal): Call riscv_expand_epilogue.
8491 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
8493 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8494 bit_insertion field and declare can_be_merged_into method.
8495 (merged_store_group::can_be_merged_into): New method.
8496 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8497 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
8498 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8500 2018-06-04 Richard Biener <rguenther@suse.de>
8502 PR tree-optimization/85955
8503 * builtins.c (fold_builtin_sincos): Convert pointers to
8504 destination to appropriate type before dereferencing.
8506 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
8508 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8510 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
8512 * expr.c (expand_expr_real_1): Force the operand into memory if
8513 its TYPE_MODE is BLKmode and if there is no integer mode for
8514 the number of bits being extracted.
8516 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8520 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8521 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8523 2018-06-04 Richard Biener <rguenther@suse.de>
8525 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8526 (cleanup_tree_cfg_noloop): ... single caller. Do
8527 start_recording_case_labels later.
8529 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
8531 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8532 to _IMMINTRIN_H_INCLUDED.
8533 * config/i386/pconfigintrin.h: Ditto.
8534 * config/i386/waitpkgintrin.h: Ditto.
8535 * config/i386/immintrin.h: Add includes for sgxintrin.h,
8536 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8537 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8538 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8539 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8540 waitpkgintrin.h and cldemoteintrin.h.
8542 2018-06-04 Richard Biener <rguenther@suse.de>
8544 PR tree-optimization/86038
8545 * tracer.c (find_best_successor): Check probability for
8546 being initialized, bail out if not.
8548 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
8551 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8552 of bits to ignore when comparing architectures.
8554 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8556 PR tree-optimization/69615
8557 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8558 maximum or minimum of the type, try to merge it also as if
8559 range1 is + [-, x - 1] or + [x + 1, -].
8562 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8564 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
8566 PR tree-optimization/86034
8567 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8568 the unsigned bitfield type in a bit insertion sequence if it does not
8569 have a larger precision than the bitfield size.
8570 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8572 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
8574 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8576 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8578 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8579 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8580 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8581 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8583 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8585 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8586 Disable -fdelete-null-pointer-checks for ELF toolchain.
8588 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8589 Kito Cheng <kito.cheng@gmail.com>
8591 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8592 (nds32le-*-*, nds32be-*-*): Integrate checking process.
8593 (nds32*-*-*): Add glibc and uclibc conditions.
8594 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8595 (TARGET_EXCEPT_UNWIND_INFO): Define.
8596 * config/nds32/elf.h: New file.
8597 * config/nds32/linux.h: New file.
8598 * config/nds32/nds32-elf.opt: New file.
8599 * config/nds32/nds32-linux.opt: New file.
8600 * config/nds32/nds32-fp-as-gp.c
8601 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8602 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8604 (nds32_asm_file_end): Ditto.
8605 (nds32_print_operand): Ditto.
8606 (nds32_insert_attributes): Ditto.
8607 (nds32_init_libfuncs): New function.
8608 (TARGET_HAVE_TLS): Define.
8609 (TARGET_INIT_LIBFUNCS): Define.
8610 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8612 (TARGET_ELF): Apply different mcmodel setting.
8613 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8614 been migrated into elf.h and linux.h files.
8615 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8616 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8617 (mcmodel): The content has been migrated into nds32-elf.opt and
8618 nds32-linux.opt files.
8619 * config/nds32/t-elf: New file.
8620 * config/nds32/t-linux: New file.
8622 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8623 Shiva Chen <shiva0217@gmail.com>
8625 * config/nds32/constants.md (unspec_volatile_element): Add
8626 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8627 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8629 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8630 (make_pass_nds32_fp_as_gp): Declare.
8631 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8633 (nds32_asm_function_end_prologue): Remove unused asm output.
8634 (nds32_asm_function_begin_epilogue): Remove unused asm output.
8635 (nds32_asm_file_start): Output necessary fp_as_gp information.
8636 (nds32_option_override): Adjust register usage.
8637 (nds32_expand_prologue): Consider fp_as_gp situation.
8638 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8639 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8642 (simple_return): Ditto.
8643 (omit_fp_begin): Output special directive for fp_as_gp.
8644 (omit_fp_end): Output special directive for fp_as_gp.
8645 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8646 mforbid-fp-as-gp): New options.
8648 2018-06-01 Mark Wielaard <mark@klomp.org>
8650 * dwarf2out.c (dwarf2out_finish): Remove generation of
8651 DW_AT_loclists_base.
8653 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
8655 * gimple-ssa-store-merging.c: Include gimple-fold.h.
8656 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8657 (struct merged_store_group): Add bit_insertion field.
8658 (dump_char_array): Use standard hexadecimal format.
8659 (merged_store_group::merged_store_group): Set bit_insertion to false.
8660 (merged_store_group::apply_stores): Use optimal buffer size. Deal
8661 with BIT_INSERT_EXPR stores. Move up code updating the mask and
8662 also print the mask in the dump file.
8663 (pass_store_merging::gate): Minor tweak.
8664 (imm_store_chain_info::coalesce_immediate): Fix wrong association
8665 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
8666 stores with INTEGER_CST stores.
8667 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8668 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8669 and use it throughout. Generate bit insertion sequences if need be.
8670 (pass_store_merging::process_store): Remove redundant condition.
8671 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8673 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
8675 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8676 the 128-bit floating point types. Fix function comment.
8678 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8680 * config/aarch64/aarch64-simd.md
8681 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8683 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8686 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
8688 PR tree-optimization/85989
8689 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8691 (backprop::intersect_uses): Check it when deciding whether this
8692 is a backedge reference.
8693 (backprop::process_block): Add each phi to m_visited_phis
8694 after visiting it, then clear it at the end.
8696 2018-06-01 Richard Biener <rguenther@suse.de>
8698 * tree-vectorizer.h (vect_dr_stmt): New function.
8699 (vect_get_load_cost): Adjust.
8700 (vect_get_store_cost): Likewise.
8701 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8702 Use vect_dr_stmt instead of DR_SMTT.
8703 (vect_record_base_alignments): Likewise.
8704 (vect_calculate_target_alignment): Likewise.
8705 (vect_compute_data_ref_alignment): Likewise and make static.
8706 (vect_update_misalignment_for_peel): Likewise.
8707 (vect_verify_datarefs_alignment): Likewise.
8708 (vector_alignment_reachable_p): Likewise.
8709 (vect_get_data_access_cost): Likewise. Pass down
8710 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8711 (vect_get_peeling_costs_all_drs): Likewise.
8712 (vect_peeling_hash_get_lowest_cost): Likewise.
8713 (vect_enhance_data_refs_alignment): Likewise.
8714 (vect_find_same_alignment_drs): Likewise.
8715 (vect_analyze_data_refs_alignment): Likewise.
8716 (vect_analyze_group_access_1): Likewise.
8717 (vect_analyze_group_access): Likewise.
8718 (vect_analyze_data_ref_access): Likewise.
8719 (vect_analyze_data_ref_accesses): Likewise.
8720 (vect_vfa_segment_size): Likewise.
8721 (vect_small_gap_p): Likewise.
8722 (vectorizable_with_step_bound_p): Likewise.
8723 (vect_prune_runtime_alias_test_list): Likewise.
8724 (vect_analyze_data_refs): Likewise.
8725 (vect_supportable_dr_alignment): Likewise.
8726 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8727 (vect_gen_prolog_loop_niters): Likewise.
8728 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8729 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8731 (vect_recog_mask_conversion_pattern): Likewise.
8732 (vect_try_gather_scatter_pattern): Likewise.
8733 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8734 to vect_get_store_cost.
8735 (vect_get_store_cost): Get stmt_info instead of DR.
8736 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8737 (vect_get_load_cost): Get stmt_info instead of DR.
8739 2018-06-01 Richard Biener <rguenther@suse.de>
8742 * gimple-fold.c (var_decl_component_p): Also allow offsetted
8743 vars wrapped in MEM_REFs.
8745 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
8747 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8748 Fix subreg tests so that we only return a choice between
8749 GENERAL_REGS and FP_REGS if the original classes included both.
8751 2018-06-01 Richard Biener <rguenther@suse.de>
8754 * tree-ssa-structalias.c (get_function_part_constraint):
8755 Handle NULL fi->decl.
8756 (find_func_aliases_for_call): Properly handle indirect
8757 fi from direct call.
8758 (find_func_clobbers): Likewise.
8759 (ipa_pta_execute): Likewise.
8760 (create_variable_info_for): For functions that are ifunc_resolver
8761 resolve to a varinfo that contains the result of the resolver call.
8762 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8765 2018-05-31 Michael Collison <michael.collison@arm.com>
8767 * config/aarch64/aarch64.md:
8768 (*fix_to_zero_extenddfdi2): New pattern.
8769 * gcc.target/aarch64/fix_extend1.c: New testcase.
8771 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
8775 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8776 and BUILT_IN_STRNCMP_EQ.
8777 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8778 BUILT_IN_STRNCMP_EQ.
8779 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8780 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8781 (gimple_fold_builtin): Likewise.
8782 * tree-ssa-strlen.c (compute_string_length): New function.
8783 (determine_min_obsize): New function.
8784 (handle_builtin_string_cmp): New function to handle calls to
8785 string compare functions.
8786 (strlen_optimize_stmt): Add handling to builtin string compare
8788 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8789 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8790 * tree.c (build_common_builtin_nodes): Add new defines of
8791 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8793 2018-05-31 Jakub Jelinek <jakub@redhat.com>
8796 * bb-reorder.c (pass_partition_blocks::gate): Return false for
8797 functions with naked attribute.
8799 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8801 * config/i386/sse.md (avx_vec_concat<mode>):
8802 Substitute concat_tg_mode mode attribute with xtg_mode.
8803 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8804 (concat_tg_mode): Remove mode attribute.
8806 2018-05-31 Martin Sebor <msebor@redhat.com>
8809 * calls.c (alloc_max_size): Correct a logic error/typo.
8810 Treat excessive arguments as infinite. Warn for invalid arguments.
8811 * doc/invoke.texi (-Walloc-size-larger-than): Update.
8813 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
8816 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8817 and movx for Haswell.
8819 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
8820 Cesar Philippidis <cesar@codesourcery.com>
8823 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8824 when emitting error on private/firstprivate reductions.
8825 * omp-low.c (lower_omp_target): Avoid reference-type processing
8826 on pointers for firstprivate clause.
8828 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8830 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8833 * config/aarch64/aarch64-simd.md
8834 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8835 (aarch64_ld1_x3_<mode>): Likewise
8836 (aarch64_st1x2<VALLDIF:mode>): Likewise
8837 (aarch64_st1_x2_<mode>): Likewise
8838 (aarch64_st1x3<VALLDIF:mode>): Likewise
8839 (aarch64_st1_x3_<mode>): Likewise
8840 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8841 (vld1_s8_x3): Likewise.
8842 (vld1_u16_x3): Likewise.
8843 (vld1_s16_x3): Likewise.
8844 (vld1_u32_x3): Likewise.
8845 (vld1_s32_x3): Likewise.
8846 (vld1_u64_x3): Likewise.
8847 (vld1_s64_x3): Likewise.
8848 (vld1_f16_x3): Likewise.
8849 (vld1_f32_x3): Likewise.
8850 (vld1_f64_x3): Likewise.
8851 (vld1_p8_x3): Likewise.
8852 (vld1_p16_x3): Likewise.
8853 (vld1_p64_x3): Likewise.
8854 (vld1q_u8_x3): Likewise.
8855 (vld1q_s8_x3): Likewise.
8856 (vld1q_u16_x3): Likewise.
8857 (vld1q_s16_x3): Likewise.
8858 (vld1q_u32_x3): Likewise.
8859 (vld1q_s32_x3): Likewise.
8860 (vld1q_u64_x3): Likewise.
8861 (vld1q_s64_x3): Likewise.
8862 (vld1q_f16_x3): Likewise.
8863 (vld1q_f32_x3): Likewise.
8864 (vld1q_f64_x3): Likewise.
8865 (vld1q_p8_x3): Likewise.
8866 (vld1q_p16_x3): Likewise.
8867 (vld1q_p64_x3): Likewise.
8868 (vst1_s64_x2): Likewise.
8869 (vst1_u64_x2): Likewise.
8870 (vst1_f64_x2): Likewise.
8871 (vst1_s8_x2): Likewise.
8872 (vst1_p8_x2): Likewise.
8873 (vst1_s16_x2): Likewise.
8874 (vst1_p16_x2): Likewise.
8875 (vst1_s32_x2): Likewise.
8876 (vst1_u8_x2): Likewise.
8877 (vst1_u16_x2): Likewise.
8878 (vst1_u32_x2): Likewise.
8879 (vst1_f16_x2): Likewise.
8880 (vst1_f32_x2): Likewise.
8881 (vst1_p64_x2): Likewise.
8882 (vst1q_s8_x2): Likewise.
8883 (vst1q_p8_x2): Likewise.
8884 (vst1q_s16_x2): Likewise.
8885 (vst1q_p16_x2): Likewise.
8886 (vst1q_s32_x2): Likewise.
8887 (vst1q_s64_x2): Likewise.
8888 (vst1q_u8_x2): Likewise.
8889 (vst1q_u16_x2): Likewise.
8890 (vst1q_u32_x2): Likewise.
8891 (vst1q_u64_x2): Likewise.
8892 (vst1q_f16_x2): Likewise.
8893 (vst1q_f32_x2): Likewise.
8894 (vst1q_f64_x2): Likewise.
8895 (vst1q_p64_x2): Likewise.
8896 (vst1_s64_x3): Likewise.
8897 (vst1_u64_x3): Likewise.
8898 (vst1_f64_x3): Likewise.
8899 (vst1_s8_x3): Likewise.
8900 (vst1_p8_x3): Likewise.
8901 (vst1_s16_x3): Likewise.
8902 (vst1_p16_x3): Likewise.
8903 (vst1_s32_x3): Likewise.
8904 (vst1_u8_x3): Likewise.
8905 (vst1_u16_x3): Likewise.
8906 (vst1_u32_x3): Likewise.
8907 (vst1_f16_x3): Likewise.
8908 (vst1_f32_x3): Likewise.
8909 (vst1_p64_x3): Likewise.
8910 (vst1q_s8_x3): Likewise.
8911 (vst1q_p8_x3): Likewise.
8912 (vst1q_s16_x3): Likewise.
8913 (vst1q_p16_x3): Likewise.
8914 (vst1q_s32_x3): Likewise.
8915 (vst1q_s64_x3): Likewise.
8916 (vst1q_u8_x3): Likewise.
8917 (vst1q_u16_x3): Likewise.
8918 (vst1q_u32_x3): Likewise.
8919 (vst1q_u64_x3): Likewise.
8920 (vst1q_f16_x3): Likewise.
8921 (vst1q_f32_x3): Likewise.
8922 (vst1q_f64_x3): Likewise.
8923 (vst1q_p64_x3): Likewise.
8925 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8927 * config/msp430/msp430.c (msp430_output_labelref): Prepend
8928 user_label_prefix to name.
8930 * tree-core.h: Update comment about the format of NAME string
8931 passed to handler in attribute_spec.
8933 * config/msp430/msp430.md: Remove erroneous subreg expression from
8934 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8935 zero_extend{q,h}isi2.
8937 2018-05-30 Borislav Petkov <bp@suse.de>
8939 * doc/extend.texi: Document some architecture specific
8940 constraints and sort entries.
8942 2018-05-30 Martin Sebor <msebor@redhat.com>
8945 * builtins.c (expand_builtin_stpcpy_1): New function.
8946 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8947 only if the former succeeds.
8949 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8951 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8954 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8956 * doc/invoke.texi (-flinker-output): Document
8958 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8960 * passes.c (ipa_write_summaries): Only modify statements if body
8962 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8963 incrementally linking.
8964 (ipa_passes): Likewise.
8965 * lto-cgraph.c (lto_output_node): When incrementally linking do not
8966 pass down resolution info.
8967 * common.opt (flag_incremental_link): Update info.
8968 * gcc.c (plugin specs): Turn flinker-output=* to
8969 -plugin-opt=-linker-output-known
8970 * toplev.c (compile_file): Also cut compilation when doing incremental
8972 * flag-types. (enum lto_partition_model): Add
8973 LTO_LINKER_OUTPUT_NOLTOREL.
8974 (invoke.texi): Add -flinker-output docs.
8975 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8976 link same way as WPA; do not stream in dead initializers.
8978 * dwarf2out.c (dwarf2out_die_ref_for_decl,
8979 darf2out_register_external_decl): Support incremental link.
8981 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8983 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8985 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8987 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8988 it down to simple_object_copy_lto_debug_sections.
8989 (run_gcc): Determine incremental LTO link time and configure
8990 lto1 into non-wpa mode, disable renaming of debug sections.
8992 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
8994 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8995 descriptions of various incorrectly documented functions.
8997 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9000 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9001 address check not strict.
9003 2018-05-30 Richard Biener <rguenther@suse.de>
9005 PR tree-optimization/85964
9006 * tracer.c (better_p): Drop initialized count check, we only
9007 call the function with initialized counts now.
9008 (find_best_successor): Do find a best edge if one
9009 has uninitialized count.
9010 (find_best_predecessor): Likewise. Do BB frequency check only
9011 if count is initialized.
9013 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9015 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9016 (aarch64_ldrstr_offset_compare): New.
9017 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9018 load/store orderings.
9019 (aarch64_gen_adjusted_ldpstp): Likewise.
9021 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9023 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9024 Check for subset of GENERAL_REGS and FP_REGS.
9025 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9028 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9030 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9031 and wi::to_poly_offset. Add the current offset and then check
9032 whether the sum fits, rather than using an unchecked addition of
9033 a checked term. Check for a shwi rather than a uhwi.
9034 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9035 (store_constructor): Use poly_int_tree_p.
9036 (expand_expr_real_1): Likewise.
9037 * function.c (assign_temp): Likewise.
9038 * fold-const.c (const_binop): Use poly_int_tree_p and
9040 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9042 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9043 to_poly_offset for MEM offsets.
9044 * ipa-icf.c (sem_variable::equals): Likewise.
9045 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9046 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9047 wi::to_poly_offset for BIT_FIELD_REF offsets.
9048 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9050 * var-tracking.c (emit_note_insn_var_location): Use
9051 tree_to_poly_uint64.
9053 2018-05-29 Jim Wilson <jimw@sifive.com>
9055 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9057 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9060 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9061 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9063 (sse4_1_round<mode>2): Use nonimmediate_operand
9064 for operand 1 predicate.
9066 2018-05-29 Martin Sebor <msebor@redhat.com>
9067 Richard Biener <rguenther@suse.de>
9070 * calls.c (get_size_range): Call determine_value_range instead
9071 of get_value_range..
9072 * tree-vrp.h (determine_value_range): Declared new function.
9073 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9075 2018-05-29 Richard Biener <rguenther@suse.de>
9077 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9078 sure to use non-pattern stmts for get_earlier_stmt arguments.
9079 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9080 called on pattern stmts.
9081 (get_later_stmt): Likewise.
9083 2018-05-29 Martin Liska <mliska@suse.cz>
9085 PR gcov-profile/85759
9086 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9089 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9091 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9093 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9097 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9098 VEC_PACK_FLOAT_EXPR): New tree codes.
9099 * tree-pretty-print.c (op_code_prio): Handle
9100 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9101 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9102 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9103 * tree-inline.c (estimate_operator_cost): Likewise.
9104 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9105 * fold-const.c (const_binop): Likewise.
9106 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9107 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9108 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9109 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9110 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9111 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9112 * expr.c (expand_expr_real_2): Likewise.
9113 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9114 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9115 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9117 * optabs.c (expand_widen_pattern_expr): For
9118 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9119 sign from result type rather than operand's type.
9120 (expand_binop_directly): For vec_packu_float_optab and
9121 vec_packs_float_optab allow result type to be different from operand's
9123 * optabs-tree.c (optab_for_tree_code): Handle
9124 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9125 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9126 * tree-vect-generic.c (expand_vector_operations_1): Handle
9127 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9128 VEC_PACK_FLOAT_EXPR.
9129 * tree-vect-stmts.c (supportable_widening_operation): Handle
9131 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9132 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9133 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9134 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9135 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9137 (vec_pack<floatprefix>_float_<mode>): New expander.
9138 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9140 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9141 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9142 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9143 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9144 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9146 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9147 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9148 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9149 VEC_PACK_FLOAT_EXPR): Document.
9151 2018-05-29 Richard Biener <rguenther@suse.de>
9153 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9155 (stmt_vec_info_vec): Make pointer.
9156 (init_stmt_vec_info_vec): Remove.
9157 (free_stmt_vec_info_vec): Likewise.
9158 (set_stmt_vec_info_vec): New function.
9159 (free_stmt_vec_infos): Likewise.
9160 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9161 (set_vinfo_for_stmt): Likewise.
9162 (get_earlier_stmt): Likewise.
9163 (get_later_stmt): Likewise.
9164 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9165 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9166 (vec_info::~vec_info): Free stmt_vec_infos.
9167 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9168 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9169 (pass_slp_vectorize::execute): Likewise.
9170 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9171 (free_stmt_vec_info_vec): Likewise.
9172 (set_stmt_vec_info_vec): New function.
9173 (free_stmt_vec_infos): Likewise.
9174 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9175 the global stmt_vec_info_vec.
9176 * tree-parloops.c (gather_scalar_reductions): Use
9177 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9180 2018-05-29 Richard Biener <rguenther@suse.de>
9182 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9184 2018-05-29 Martin Liska <mliska@suse.cz>
9185 David Malcolm <dmalcolm@redhat.com>
9187 * vec.c (test_reverse): New.
9188 (vec_c_tests): Add new test.
9189 * vec.h (vl_ptr>::reverse): New function.
9191 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9193 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9195 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9198 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
9200 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9202 2018-05-28 Richard Biener <rguenther@suse.de>
9204 PR tree-optimization/85933
9205 * tree-vect-data-refs.c (vect_record_base_alignments): Only
9206 look at stmts marked as vectorizable.
9208 2018-05-28 Richard Biener <rguenther@suse.de>
9210 PR tree-optimization/85934
9211 * tree-vect-generic.c (expand_vector_operations_1): Hoist
9212 vector boolean check before scalar optimization.
9214 2018-05-28 Jakub Jelinek <jakub@redhat.com>
9216 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9219 2018-05-28 Mark Wielaard <mark@klomp.org>
9221 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9222 if it is an expression containing a minus sign.
9224 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
9226 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9228 2018-05-27 Paul Koning <ni1d@arrl.net>
9230 * config/pdp11/pdp11.md (truncsihi2): Remove.
9232 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
9233 Chung-Ju Wu <jasonwucj@gmail.com>
9235 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9237 (unaligned_store_dw): Ditto.
9238 * config/nds32/nds32-memory-manipulation.c
9239 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9240 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9241 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9242 (emit_setmem_word_loop): Rename to ...
9243 (emit_setmem_doubleword_loop): ... this.
9244 (nds32_gen_dup_4_byte_to_word_value): New function.
9245 (nds32_gen_dup_8_byte_to_double_word_value): New function.
9246 (nds32_expand_setmem_loop): Refine implementation.
9247 (nds32_expand_setmem_loop_v3m): Ditto.
9248 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9251 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9253 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9255 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9257 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9258 (nds32_init_machine_status): Initialize machine->attr_naked_p and
9259 machine->attr_no_prologue_p.
9260 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9261 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9262 (nds32_expand_epilogue): Consider attr_naked_p.
9263 (nds32_expand_epilogue_v3pop): Likewise.
9264 (nds32_can_use_return_insn): Likewise.
9265 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9266 attr_no_prologue_p fields.
9267 * config/nds32/nds32.opt (mret-in-naked-func): New option.
9269 2018-05-27 Jakub Jelinek <jakub@redhat.com>
9272 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9274 * config/i386/sse.md
9275 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9277 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9279 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9281 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9283 (*<floatsuffix>floatv2div2sf2): Rename to ...
9284 (*float<floatunssuffix>v2div2sf2): ... this.
9285 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9286 (float<floatunssuffix>v2div2sf2_mask): ... this.
9287 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9288 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9289 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9291 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9293 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9295 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9297 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9299 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9301 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9302 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9303 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9304 gen_ufix_truncv8dfv8si2.
9305 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9306 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9307 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9308 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9309 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9310 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9311 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9312 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9314 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9318 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9320 2018-05-25 Jim Wilson <jimw@sifive.com>
9322 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9323 * config/riscv/riscv.c (struct machine_function): Add
9324 interrupt_handler_p and attribute_checked_p fields.
9325 (riscv_attribute_table): Add interrupt.
9326 (riscv_interrupt_type_p): New.
9327 (riscv_save_reg_p): Save extra regs for interrupt handler.
9328 (riscv_use_save_libcall): Return false for interrupt handler.
9329 (riscv_first_stack_step): Add forward declaration.
9330 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
9331 for interrupt handler with large frame. Use it for saved reg list.
9332 (riscv_expand_prologue): Move flag_stack_usage_info support to
9333 eliminate duplication.
9334 (riscv_expand_epilogue): Generate mret for interrupt handler.
9335 (riscv_epilogue_uses): New.
9336 (riscv_can_use_return_insn): Return false for interrupt handler.
9337 (riscv_function_ok_for_sibcall): Likewise.
9338 (riscv_set_current_function): Add interrupt handler support.
9339 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9340 * config/riscv/riscv.md (UNSPECV_MRET): New.
9342 (riscv_frflags, riscv_fsflags): Use tab after opcode.
9344 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9346 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
9348 PR tree-optimization/85712
9349 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9350 this candidate has already been replaced in-situ by a copy.
9352 2018-05-25 Jason Merrill <jason@redhat.com>
9354 PR c++/80485 - inline function non-zero address.
9355 * symtab.c (nonzero_address): Check DECL_COMDAT.
9357 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
9360 * config/alpha/alpha.md (ashlsi3): New insn pattern.
9361 (*ashlsi_se): Rename from *ashldi_se. Define as sign
9362 extension of SImode operation. Use const123_operand predicate.
9363 (*saddsi_1): Remove.
9364 (*saddl_se_1): Ditto.
9366 (*ssubl_se_1): Ditto.
9367 * config/alpha/predicates.md (const123_operand): New predicate.
9368 * config/alpha/constraints.md (P): Use IN_RANGE.
9370 2018-05-25 Richard Biener <rguenther@suse.de>
9372 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9374 (ref_maybe_used_by_stmt_p): Likewise.
9375 (stmt_may_clobber_ref_p): Likewise.
9376 (stmt_may_clobber_ref_p_1): Likewise.
9377 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9379 (ref_maybe_used_by_stmt_p): Likewise.
9380 (stmt_may_clobber_ref_p): Likewise.
9381 (stmt_may_clobber_ref_p_1): Likewise.
9382 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9383 the alias oracle to disambiguate DRs with stmts DR analysis
9385 (vect_analyze_data_refs): Do not give up on not analyzable
9386 DRs for BB vectorization. Remove code truncating the dataref
9389 2018-05-25 Jakub Jelinek <jakub@redhat.com>
9392 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9393 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
9394 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9396 2018-05-25 Richard Biener <rguenther@suse.de>
9398 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9399 function, combining stmt data ref gathering and fatal analysis
9401 (vect_analyze_data_refs): Remove now redudnant code and simplify.
9402 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9403 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9404 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9405 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9407 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9409 PR tree-optimization/85720
9410 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9411 SCC if all partitions are builtins.
9412 (version_loop_by_alias_check): New parameter. Generate cancelable
9413 runtime alias check if all partitions are builtins.
9414 (distribute_loop): Update call to above function.
9416 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9418 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9419 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9420 (parm_default_def_partition_arg): Ditto.
9421 (set_parm_default_def_partition): Ditto.
9422 (get_parm_default_def_partitions): Ditto and make it static.
9423 (get_undefined_value_partitions): Ditto and make it static.
9424 (remove_ssa_form): Refactor call to init_var_map here.
9425 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9426 computation for loop region.
9427 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9428 (register_default_def): Delete.
9429 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9430 (parm_default_def_partition_arg): Ditto.
9431 (set_parm_default_def_partition): Ditto.
9432 (get_parm_default_def_partitions): Ditto and make it static.
9433 (get_undefined_value_partitions): Ditto and make it static.
9434 (coalesce_with_default, coalesce_with_default): Update comment.
9435 (create_coalesce_list_for_region): New func factored out from
9436 create_outofssa_var_map.
9437 (populate_coalesce_list_for_outofssa): New func factored out from
9438 create_outofssa_var_map and coalesce_ssa_name.
9439 (create_outofssa_var_map): Delete.
9440 (coalesce_ssa_name): Refactor to support live range computation.
9441 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9442 (get_parm_default_def_partitions): Delete.
9443 (get_undefined_value_partitions): Ditto.
9444 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9445 computation for loop region.
9446 (new_tree_live_info, loe_visit_block): Ditto.
9447 (live_worklist, set_var_live_on_entry): Ditto.
9448 (calculate_live_on_exit, verify_live_on_entry): Ditto.
9449 * tree-ssa-live.h (struct _var_map): New fields.
9450 (init_var_map): Change decl.
9451 (region_contains_p): New.
9453 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9455 * tree-ssa-live.h (live_merge_and_clear): Delete.
9457 2018-05-25 Richard Biener <rguenther@suse.de>
9460 * tree-dump.c (dequeue_and_dump): Remove access to removed
9461 operand 2 of a SWITCH_EXPR.
9463 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9465 * doc/sourcebuild.texi (vect_double_cond_arith): Include
9466 multiplication and division.
9467 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9468 (cond_udiv@var{m}, cond_umod@var{m}): Document.
9469 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9470 (cond_udiv_optab, cond_umod_optab): New optabs.
9471 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9472 (IFN_COND_RDIV): New internal functions.
9473 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9474 TRUNC_MOD_EXPR and RDIV_EXPR.
9475 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9476 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9478 (SVE_INT_BINARY): Include mult.
9479 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9480 (optab, sve_int_op): Handle mult.
9481 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9483 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9484 for SVE_INT_BINARY_SD.
9486 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9488 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9489 (optab, sve_int_op): Handle div and udiv.
9490 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9491 for SVE_INT_BINARY_SD.
9492 (*<optab><mode>3): New insn for the same.
9494 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9496 * tree-vect-patterns.c: Include predict.h.
9497 (vect_recog_divmod_pattern): Restrict check for division support
9498 to when optimizing for size.
9500 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9502 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9503 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9504 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9505 (gimple_match_op::set_op): Likewise.
9506 (gimple_resimplify4): Declare.
9507 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9508 (expr::gen_transform): Likewise.
9509 (decision_tree::gen): Generate a simplification routine for 4 operands.
9510 * gimple-match-head.c (gimple_simplify): Add an overload for
9511 4 operands. In the top-level function, handle up to 4 call
9512 arguments and call gimple_resimplify4.
9513 (gimple_resimplify4): New function.
9514 (build_call_internal): Pass a fourth operand.
9515 (maybe_push_to_seq): Likewise.
9516 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9517 Fold VEC_COND_EXPRs of an operation and a default value into
9518 an IFN_COND_* function if possible.
9519 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9521 (SVE_COND_FP_BINARY): Include them.
9522 (optab, sve_fp_op): Handle them.
9523 (SVE_INT_BINARY_REV): New code iterator.
9524 (SVE_COND_FP_BINARY_REV): New int iterator.
9525 (commutative): New int attribute.
9526 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9528 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9530 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9531 (*cond_<optab><mode>): New patterns for reversed operands.
9533 2018-05-25 Richard Biener <rguenther@suse.de>
9535 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9536 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9537 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9538 (STMT_VINFO_GROUPED_ACCESS): Adjust.
9539 * tree-vect-data-refs.c (everywhere): Adjust users.
9540 * tree-vect-loop.c (everywhere): Likewise.
9541 * tree-vect-slp.c (everywhere): Likewise.
9542 * tree-vect-stmts.c (everywhere): Likewise.
9543 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9545 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9547 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9549 (gcc_cv_as_section_exclude): ... this.
9550 Try Solaris as #exclude syntax.
9551 * configure: Regenerate.
9552 * config.in: Regenerate.
9553 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9555 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9556 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9558 * varasm.c (default_elf_asm_named_section): Don't check if
9559 HAVE_GAS_SECTION_EXCLUDE is defined.
9561 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9563 * doc/md.texi: Update the documentation of the cond_* optabs
9564 to mention the new final operand. Fix GET_MODE_NUNITS call.
9565 Describe the scalar case too.
9566 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9567 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9569 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9570 (get_conditional_internal_fn): Update comment.
9571 * tree-vect-loop.c (vectorizable_reduction): Pass the original
9572 accumulator value as a final argument to conditional functions.
9573 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9574 a define_expand and add an "else" operand. Assert for now that
9575 the else operand is equal to operand 2. Use SVE_INT_BINARY and
9576 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9577 (*cond_<optab><mode>): New patterns.
9578 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9579 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9580 (UNSPEC_COND_EOR): Delete.
9581 (optab): Remove associated mappings.
9582 (SVE_INT_BINARY): New code iterator.
9583 (sve_int_op): Remove int attribute and add "minus" to the code
9585 (SVE_COND_INT_OP): Delete.
9586 (SVE_COND_FP_OP): Rename to...
9587 (SVE_COND_FP_BINARY): ...this.
9589 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9591 * optabs.c (can_reuse_operands_p): New function.
9592 (maybe_legitimize_operands): Try to reuse the results for
9595 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9597 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9598 Add {q} suffix to insn mnemonic.
9600 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9602 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9603 (msp430_warn_func_return): New.
9605 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
9607 * fold-const.c (tree_nonzero_bits): New function.
9608 * fold-const.h (tree_nonzero_bits): Likewise.
9609 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9610 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9612 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9616 * varasm.c (assemble_alias): Check ifunc_resolver only on
9619 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9622 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9623 when memory input operand is handled.
9625 2018-05-24 Luis Machado <luis.machado@linaro.org>
9627 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9629 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9631 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9633 * match.pd: Delay FMA folds until after vectorization.
9635 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
9638 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9639 address check not strict.
9641 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9643 * gimple-match.h (gimple_match_op): New class.
9644 (mprts_hook): Replace parameters with a gimple_match_op *.
9645 (maybe_build_generic_op): Likewise.
9646 (gimple_simplified_result_is_gimple_val): Replace parameters with
9647 a const gimple_match_op *.
9648 (gimple_simplify): Replace code_helper * and tree * parameters with
9649 a gimple_match_op * parameter.
9650 (gimple_resimplify1): Replace code_helper *, tree and tree *
9651 parameters with a gimple_match_op * parameter.
9652 (gimple_resimplify2): Likewise.
9653 (gimple_resimplify3): Likewise.
9654 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9655 parameters with a gimple_match_op * parameter.
9656 * gimple-match-head.c (gimple_simplify): Change prototypes of
9657 auto-generated functions to take a gimple_match_op * instead of
9658 separate code_helper * and tree * parameters. Make the same
9659 change in the top-level overload and update calls to the
9660 gimple_resimplify routines. Update calls to the auto-generated
9661 functions and to maybe_push_res_to_seq in the publicly-facing
9662 operation-specific gimple_simplify overloads.
9663 (gimple_match_op::MAX_NUM_OPS): Define.
9664 (gimple_resimplify1): Replace rcode and ops with a single res_op
9665 parameter. Update call to gimple_simplify.
9666 (gimple_resimplify2): Likewise.
9667 (gimple_resimplify3): Likewise.
9668 (mprts_hook): Replace parameters with a gimple_match_op *.
9669 (maybe_build_generic_op): Likewise.
9670 (build_call_internal): Replace type, nargs and ops with
9671 a gimple_match_op *.
9672 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9673 with a single gimple_match_op *. Update calls to mprts_hook,
9674 build_call_internal and gimple_simplified_result_is_gimple_val.
9675 Factor out code that is common to the tree_code and combined_fn cases.
9676 * genmatch.c (expr::gen_transform): Replace tem_code and
9677 tem_ops with a gimple_match_op called tem_op. Update calls
9678 to the gimple_resimplify functions and maybe_push_res_to_seq.
9679 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9680 res_ops. Update call to the gimple_resimplify functions.
9681 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9682 (decision_tree::gen): Make the functions take a gimple_match_op *
9683 called res_op instead of separate res_code and res_ops parameters.
9684 Update call accordingly.
9685 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9686 and ops with a single res_op parameter. Update calls to
9687 maybe_build_generic_op and maybe_push_res_to_seq.
9688 (fold_stmt_1): Update calls to gimple_simplify and
9689 replace_stmt_with_simplification.
9690 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9691 and gimple_simplified_result_is_gimple_val.
9692 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9694 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9695 with a gimple_match_op *.
9696 (vn_nary_build_or_lookup): Likewise. Update call to
9697 vn_nary_build_or_lookup_1.
9698 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9699 gimple_match_op *. Update calls to the gimple_resimplify routines
9700 and to gimple_simplified_result_is_gimple_val.
9701 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9702 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9703 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9704 (visit_nary_op): Likewise.
9705 (visit_reference_op_load): Likewise.
9707 2018-05-23 Luis Machado <luis.machado@linaro.org>
9709 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9710 modifier for printing the step amount.
9712 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
9715 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9718 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
9720 * doc/sourcebuild.texi (Endianness): New subsubsection.
9722 2018-05-23 Luis Machado <luis.machado@linaro.org>
9724 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9725 <prefetch_dynamic_strides>: New const bool field.
9726 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9727 prefetch_dynamic_strides.
9728 (exynosm1_prefetch_tune): Likewise.
9729 (thunderxt88_prefetch_tune): Likewise.
9730 (thunderx_prefetch_tune): Likewise.
9731 (thunderx2t99_prefetch_tune): Likewise.
9732 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9734 (aarch64_override_options_internal): Update to set
9735 PARAM_PREFETCH_DYNAMIC_STRIDES.
9736 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9737 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9738 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9739 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9740 prefetch-dynamic-strides setting.
9742 2018-05-23 Luis Machado <luis.machado@linaro.org>
9744 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9745 <minimum_stride>: New const int field.
9746 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9747 minimum_stride field defaulting to -1.
9748 (exynosm1_prefetch_tune): Likewise.
9749 (thunderxt88_prefetch_tune): Likewise.
9750 (thunderx_prefetch_tune): Likewise.
9751 (thunderx2t99_prefetch_tune): Likewise.
9752 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9753 <default_opt_level>: Set to 3.
9754 (aarch64_override_options_internal): Update to set
9755 PARAM_PREFETCH_MINIMUM_STRIDE.
9756 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9757 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9758 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9759 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9760 stride is constant and is below the minimum stride threshold.
9762 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9764 * config/arm/arm-cpus.in (mode26): Delete.
9765 (armv4): Delete mode26 reference.
9766 * config/arm/arm.c (arm_configure_build_target): Delete use of
9769 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
9771 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9773 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9774 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
9776 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
9777 (floatunsdidf2): Ditto.
9779 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
9781 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9782 (fixuns_trunc<mode>si2_avx512f): Ditto.
9783 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9784 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9785 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9787 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
9789 PR rtl-optimization/79985
9790 * df-scan.c (df_insn_refs_collect): Remove special case for
9791 global registers and asm statements.
9793 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
9795 * extend.texi (Global Register Variables): Rewrite the bullet list.
9796 Note that the register is available for allocation. Note that access
9797 via inline asm must use constraints. Add note about async-signal
9798 handlers. Remove paragraph about automagic register selection.
9800 2018-05-23 Richard Biener <rguenther@suse.de>
9802 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9803 of fixed offset from memset VN.
9805 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
9807 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9809 (alloc_cand_and_find_basis): Initialize first_interp field.
9810 (slsr_process_mul): Modify first_interp field.
9811 (slsr_process_add): Likewise.
9812 (slsr_process_cast): Modify first_interp field for each new
9814 (slsr_process_copy): Likewise.
9815 (dump_candidate): Dump first_interp field.
9816 (replace_mult_candidate): Process all interpretations, not just
9818 (replace_rhs_if_not_dup): Likewise.
9819 (replace_one_candidate): Likewise.
9821 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
9823 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9825 (aarch64_needs_frame_chain): New function.
9826 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9828 2018-05-23 Sudakshina Das <sudi.das@arm.com>
9831 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9832 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9833 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9834 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9835 as true for strict-align.
9836 (aarch64_can_inline_p): Perform checks even when callee has no
9837 attributes to check for strict alignment.
9838 * doc/extend.texi (AArch64 Function Attributes): Document
9840 * doc/invoke.texi: (AArch64 Options): Likewise.
9842 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
9844 PR tree-optimization/85853
9845 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9846 the handling of the root of the node to...
9847 (vect_slp_analyze_node_operations_1): ...this new function,
9848 and run the whole thing with the child nodes' def types
9849 set according to their SLP node's def type.
9851 2018-05-23 Richard Biener <rguenther@suse.de>
9854 * tree-data-ref.c (create_runtime_alias_checks): Defer
9855 and ignore overflow warnings.
9857 2018-05-23 Yury Gribov <tetra2005@gmail.com>
9859 PR tree-optimization/85822
9860 * tree-vrp.c (is_masked_range_test): Fix handling of negative
9863 2018-05-23 Richard Biener <rguenther@suse.de>
9865 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9866 memset constants via native_interpret_expr.
9868 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
9871 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9873 (cgraph_node::create_alias): Likewise.
9874 (cgraph_node::get_availability): Check ifunc_resolver instead
9875 of looking up ifunc attribute.
9876 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9877 * varasm.c (do_assemble_alias): Likewise.
9878 (assemble_alias): Likewise.
9879 (default_binds_local_p_3): Likewise.
9880 * cgraph.h (cgraph_node): Add ifunc_resolver.
9881 (cgraph_node::only_called_directly_or_aliased_p): Return false
9883 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9885 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9886 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9887 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9888 instead of looking up ifunc attribute.
9890 2018-05-22 Luis Machado <luis.machado@linaro.org>
9892 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9894 2018-05-22 Martin Sebor <msebor@redhat.com>
9897 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9898 only when expasion succeeds.
9899 (expand_builtin_strcmp): Same.
9900 (expand_builtin_strncmp): Same.
9902 2018-05-22 Martin Sebor <msebor@redhat.com>
9904 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9906 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
9907 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9909 * config/aarch64/aarch64-ldpstp.md: Replace uses of
9910 aarch64_mem_pair_operand with memory_operand and delete operand swapping
9912 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9913 Add check for legitimate_address.
9914 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9915 (aarch64_swap_ldrstr_operands): New.
9916 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9919 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
9920 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9922 * config/aarch64/aarch64.md: New patterns to generate stp
9924 (store_pair_sw, store_pair_dw): New patterns to generate stp for
9925 single words and double words.
9926 (load_pair_sw, load_pair_dw): Likewise.
9927 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9929 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9931 * config/aarch64/aarch64-ldpstp.md: Modify peephole
9932 for different mode ldpstp and add peephole for merged zero stores.
9934 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9936 (aarch64_gen_store_pair): Rename calls to match new patterns.
9937 (aarch64_gen_load_pair): Rename calls to match new patterns.
9938 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9939 (load_pair<DREG:mode><DREG2:mode>): ... This.
9940 (store_pair<mode>): Rename to...
9941 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9942 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9944 (V_INT_EQUIV): Handle SImode.
9945 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9948 2018-05-22 Martin Sebor <msebor@redhat.com>
9951 * calls.c (maybe_warn_nonstring_arg): Use string length to set
9952 or ajust the presumed bound on an operation to avoid unnecessary
9955 2018-05-22 Martin Sebor <msebor@redhat.com>
9957 PR tree-optimization/85826
9958 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9959 assuming that a DECL necesarily has a constant size.
9961 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
9964 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9966 2018-05-22 Richard Biener <rguenther@suse.de>
9968 PR tree-optimization/85834
9969 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9970 non-constant and non-zero memset arguments.
9972 2018-05-22 Martin Liska <mliska@suse.cz>
9975 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9977 2018-05-22 Richard Biener <rguenther@suse.de>
9979 PR tree-optimization/85863
9980 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9981 comparisons when vectype is specified.
9982 (vectorizable_condition): Do not specify vectype for
9983 vect_is_simple_cond when SLP vectorizing.
9985 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
9988 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9989 define __ibm128 as long double.
9990 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9991 as a distinct type when IEEE 128-bit support is enabled.
9992 (init_float128_ieee): Fix up conversions between IFmode and IEEE
9993 128-bit types to use the correct functions.
9994 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9995 convert between 128-bit floating point types that have different
9996 modes but the same representation, instead of using gen_lowpart to
9998 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10000 (IFKF_reg): New attributes to give the register constraints for
10002 (extend<mode>tf2_internal): New insns to mark an explicit
10003 conversion between 128-bit floating point types that have a
10004 different mode but share the same representation.
10006 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10008 PR tree-optimization/85814
10009 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10010 a null return from get_strinfo when unsharing the next
10011 strinfo in the chain.
10013 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10016 * varasm.c (weak_finish): Clean up weak_decls.
10018 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10020 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10021 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10022 UNSPEC_UADALP values.
10023 * config/aarch64/iterators.md (ABAL): New int iterator.
10026 (sur): Add mappings for the above.
10027 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10029 (aarch64_<sur>abal<mode>_4): Likewise.
10030 (aarch64_<sur>adalp<mode>_3): Likewise.
10031 (<sur>sadv16qi): New define_expand.
10033 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10035 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10036 (*movdf_internal): Ditto.
10037 (*rcpsf2_sse): Ditto.
10038 (*rsqrtsf2_sse): Ditto.
10039 (*sqrt<mode>2_sse): Ditto.
10041 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10043 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10045 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10046 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10047 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10048 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10050 * config/aarch64/arm_neon.h: Likewise.
10051 * config/aarch64/iterators.md (VQ_I): New.
10053 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10055 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10057 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10060 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10062 * config/nds32/constraints.md (S): New constraint.
10063 * config/nds32/nds32.md (call_internal): Use constraint S.
10064 (call_value_internal): Likewise.
10065 (sibcall_internal): Likewise.
10066 (sibcall_value_internal): Likewise.
10068 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10069 Chung-Ju Wu <jasonwucj@gmail.com>
10071 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10072 into consideration.
10074 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10075 Chung-Ju Wu <jasonwucj@gmail.com>
10077 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10078 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10079 (nds32_rtx_costs_impl): Simplify.
10080 (nds32_address_cost_impl): Simplify.
10081 (nds32_init_rtx_costs): New function.
10082 (nds32_rtx_costs_speed_prefer): Likewise.
10083 (nds32_rtx_costs_size_prefer): Likewise.
10084 (nds32_address_cost_speed_prefer): Likewise.
10085 (nds32_address_cost_speed_fwprop): Likewise.
10086 (nds32_address_cost_size_prefer): Likewise.
10087 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10088 * config/nds32/nds32.c (nds32_option_override): Use
10089 nds32_init_rtx_costs function.
10091 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10093 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10094 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10095 (TARGET_PIPELINE_N8): Likewise.
10096 (TARGET_PIPELINE_N10): Likewise.
10097 (TARGET_PIPELINE_N13): Likewise.
10098 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10100 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10102 * config/nds32/nds32-fpu.md: Update copyright year.
10104 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10106 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10108 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10110 * config/nds32/nds32.c
10111 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10112 * config/nds32/nds32.opt (minline-asm-r15): New option.
10114 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10116 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10118 * config/nds32/nds32.md (abssi2): New pattern.
10120 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10122 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10123 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10124 Merge insn pattern from sse_cvtsi2ss<round_name> and
10125 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10126 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10127 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10128 using SWI48 mode iterator.
10129 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10130 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10131 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10132 pattern from sse_cvttss2si<round_saeonly_name>
10133 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10134 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10135 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10136 using SWI48 mode iterator.
10137 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10138 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10139 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10140 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10141 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10142 using SWI48 mode iterator.
10143 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10144 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10145 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10146 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10147 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10148 SWI48 mode iterator.
10149 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10150 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10151 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10152 pattern from sse_cvttsd2si<round_saeonly_name>
10153 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10155 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10157 * config/nds32/nds32-md-auxiliary.c
10158 (nds32_valid_smw_lwm_base_p): Refine.
10159 (nds32_output_smw_single_word): Refine.
10160 (nds32_output_smw_double_word): New.
10161 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10163 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10165 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10166 (nds32_output_stack_pop): Refine.
10167 (nds32_expand_unaligned_load): Refine.
10168 (nds32_expand_unaligned_store): Refine.
10170 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10171 Chung-Ju Wu <jasonwucj@gmail.com>
10173 * config/nds32/constants.md: Add TP_REGNUM constant.
10174 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10175 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10177 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10178 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10179 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10180 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10181 and PIC code generation.
10182 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10184 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10186 * config/nds32/nds32.md: Support TLS and PIC.
10187 * config/nds32/nds32.c: Support TLS and PIC.
10188 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10189 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10192 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10194 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10195 mode with E_ prefix.
10197 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10198 Chung-Ju Wu <jasonwucj@gmail.com>
10200 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10201 * config/nds32/nds32-md-auxiliary.c
10202 (symbolic_reference_mentioned_p): New.
10203 (nds32_legitimize_ict_address): New.
10204 (nds32_expand_ict_move): New.
10205 (nds32_indirect_call_referenced_p): New.
10206 (nds32_symbol_binds_local_p): Delete.
10207 (nds32_long_call_p): Modify.
10208 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10209 * config/nds32/nds32-protos.h
10210 (symbolic_reference_mentioned_p): Declare.
10211 (nds32_legitimize_ict_address): Declare.
10212 (nds32_expand_ict_move): Declare.
10213 (nds32_indirect_call_referenced_p): Declare.
10214 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10215 (nds32_relax_group): Use nds32_ict_const_p as condition.
10216 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10217 (nds32_asm_file_start): Output ict_model directive in asm code.
10218 (nds32_legitimate_address_p): Consider indirect call.
10219 (nds32_print_operand): Consider indirect call.
10220 (nds32_print_operand_address): Consider indirect call.
10221 (nds32_insert_attributes): Handle "indirect_call" attribute.
10222 (TARGET_LEGITIMATE_ADDRESS_P): Define.
10223 (TARGET_LEGITIMATE_CONSTANT_P): Define.
10224 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10225 (TARGET_DELEGITIMIZE_ADDRESS): Define.
10226 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10227 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10228 (TARGET_ICT_MODEL_SMALL): Define.
10229 (TARGET_ICT_MODEL_LARGE): Define.
10230 * config/nds32/nds32.md (movsi): Consider ict model.
10231 (call, call_value): Consider ict model.
10232 (sibcall, sibcall_value): Consider ict model.
10233 * config/nds32/nds32.opt (mict-model): New option.
10234 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10237 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
10238 Monk Chiang <sh.chiang04@gmail.com>
10239 Jim Wilson <jimw@sifive.com>
10241 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10242 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
10243 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10244 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10245 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
10246 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10247 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10248 compute save_libcall_adjustment properly.
10249 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10250 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10251 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10252 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10253 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10254 (ABI_SPEC): Handle mabi=ilp32e.
10255 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10256 (RVE): Add RVE mask.
10257 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10258 <-march>: Add rv32e as an example.
10260 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
10263 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10264 (intra_create_variable_infos): Handle C++ constructors.
10266 2018-05-18 Martin Liska <mliska@suse.cz>
10268 * passes.def: Remove a redundant pass.
10270 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
10273 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10275 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10277 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10279 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10281 (armv2, armv2a, armv3, armv3m): Delete architectures.
10282 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10283 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10284 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10286 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10287 (*mulsidi3adddi): Likewise.
10288 (mulsidi3): Likewise.
10289 (*mulsidi3_nov6): Likewise.
10290 (umulsidi3): Likewise.
10291 (umulsidi3_nov6): Likewise.
10292 (umaddsidi4): Likewise.
10293 (*umulsidi3adddi): Likewise.
10294 (smulsi3_highpart): Likewise.
10295 (*smulsi3_highpart_nov6): Likewise.
10296 (umulsi3_highpart): Likewise.
10297 (*umulsi3_highpart_nov6): Likewise.
10298 * config/arm/arm.h (arm_arch3m): Delete.
10299 * config/arm/arm.c (arm_arch3m): Delete.
10300 (arm_option_override_internal): Update armv3-related comment.
10301 (arm_configure_build_target): Delete use of isa_bit_mode32.
10302 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10303 (arm_rtx_costs_internal): Delete check of arm_arch3m.
10304 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10305 (mulsa3): Likewise.
10306 (mulusa3): Likewise.
10307 * config/arm/arm-protos.h (arm_arch3m): Delete.
10308 * config/arm/arm-tables.opt: Regenerate.
10309 * config/arm/arm-tune.md: Likewise.
10310 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10311 deleted architectures.
10313 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10315 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10316 (armv5t, armv5te): New features.
10317 (ARMv5, ARMv5e): Delete fgroups.
10318 (ARMv5t, ARMv5te): Adjust for above changes.
10319 (ARMv6m): Likewise.
10320 (armv5, armv5e): Delete arches.
10321 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10323 (*call_reg_arm): Likewise.
10324 (*call_value_reg_armv5): Likewise.
10325 (*call_value_reg_arm): Likewise.
10326 (*call_symbol): Likewise.
10327 (*call_value_symbol): Likewise.
10328 (*sibcall_insn): Likewise.
10329 (*sibcall_value_insn): Likewise.
10330 (clzsi2): Likewise.
10331 (prefetch): Likewise.
10332 (define_split and define_peephole2 dependent on arm_arch5):
10334 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10336 (TARGET_ARM_QBIT): Likewise.
10337 (TARGET_DSP_MULTIPLY): Likewise.
10338 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10339 (arm_arch5, arm_arch5e): Delete.
10340 (arm_arch5t, arm_arch5te): Declare.
10341 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10342 (arm_arch5t): Declare.
10343 (arm_option_reconfigure_globals): Update for the above.
10344 (arm_options_perform_arch_sanity_checks): Update comment, replace
10345 use of arm_arch5 with arm_arch5t.
10346 (use_return_insn): Likewise.
10347 (arm_emit_call_insn): Likewise.
10348 (output_return_instruction): Likewise.
10349 (arm_final_prescan_insn): Likewise.
10350 (arm_coproc_builtin_available): Likewise.
10351 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10352 arm_arch5e with arm_arch5t and arm_arch5te.
10353 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10354 (arm_arch5t, arm_arch5te): Declare.
10355 * config/arm/arm-tables.opt: Regenerate.
10356 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10357 * config/arm/t-multilib: Likewise.
10358 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10359 instead of arm_arch5.
10360 (*call_reg_thumb1): Likewise.
10361 (*call_value_reg_thumb1_v5): Likewise.
10362 (*call_value_reg_thumb1): Likewise.
10363 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10365 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10367 2018-05-18 Martin Liska <mliska@suse.cz>
10369 PR gcov-profile/84846
10370 * doc/gcov.texi: Document -t option of gcov tool.
10372 2018-05-18 Martin Liska <mliska@suse.cz>
10374 PR gcov-profile/84846
10375 * gcov.c (print_usage): Add new -t option.
10376 (process_args): Handle the option.
10377 (generate_results): Use stdout as output when requested by
10380 2018-05-18 Martin Liska <mliska@suse.cz>
10382 PR gcov-profile/84846
10383 * coverage.c (coverage_init): Write PWD to .gcno file.
10384 * doc/gcov.texi: Document how working directory is printed.
10385 * gcov-dump.c (dump_gcov_file): Print PWD.
10386 * gcov.c (output_intermediate_file): Likewise.
10387 (read_graph_file): Read PWD string.
10388 (output_lines): Print PWD.
10390 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10392 PR middle-end/85817
10393 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10394 for retval and return false if all args to phi are zero.
10396 2018-05-18 Richard Biener <rguenther@suse.de>
10398 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10400 (evrp_dom_walker::before_dom_children): Call it.
10402 2018-05-18 Richard Biener <rguenther@suse.de>
10404 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10405 results when processing array refs with variable index.
10407 2018-05-18 Toon Moene <toon@moene.org>
10409 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10410 directly after that of -floop-interchange. Indicate that both
10411 options are enabled by default when specifying -O3.
10413 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10415 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10416 iterator. Delete separate integer-mode vec_set<mode> expander.
10417 (aarch64_simd_vec_setv2di): Delete.
10418 (vec_setv2di): Delete.
10419 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10420 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
10421 the "w, r" alternative.
10423 2018-05-18 Martin Liska <mliska@suse.cz>
10425 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10426 * tree-pass.h (make_pass_lower_switch_O0): New function.
10427 * tree-switch-conversion.c (node_has_low_bound): Remove.
10428 (node_has_high_bound): Likewise.
10429 (node_is_bounded): Likewise.
10430 (class pass_lower_switch): Make it a template type and create
10432 (pass_lower_switch::execute): Add template argument.
10433 (make_pass_lower_switch): New function.
10434 (make_pass_lower_switch_O0): New function.
10435 (do_jump_if_equal): Remove.
10436 (emit_case_nodes): Simplify to just handle all 3 cases and leave
10437 all the hard work to tree optimization passes.
10439 2018-05-18 Martin Liska <mliska@suse.cz>
10441 * dbgcnt.c (limit_low): Renamed from limit.
10442 (limit_high): New variable.
10443 (dbg_cnt_is_enabled): Check for upper limit.
10444 (dbg_cnt): Adjust dumping.
10445 (dbg_cnt_set_limit_by_index): Add new argument for high
10447 (dbg_cnt_set_limit_by_name): Likewise.
10448 (dbg_cnt_process_single_pair): Parse new format.
10449 (dbg_cnt_process_opt): Use strtok.
10450 (dbg_cnt_list_all_counters): Remove 'value' and add
10452 * doc/invoke.texi: Document changes.
10454 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
10456 * doc/sourcebuild.texi (scalar_all_fma): Document.
10457 * tree.def (FMA_EXPR): Delete.
10458 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10459 * internal-fn.c (ternary_direct): New macro.
10460 (expand_ternary_optab_fn): Likewise.
10461 (direct_ternary_optab_supported_p): Likewise.
10462 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10463 * builtins.c (fold_builtin_fma): Delete.
10464 (fold_builtin_3): Don't call it.
10465 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10466 * expr.c (expand_expr_real_2): Likewise.
10467 * fold-const.c (operand_equal_p): Likewise.
10468 (fold_ternary_loc): Likewise.
10469 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10470 * gimple.c (DEFTREECODE): Likewise.
10471 * gimplify.c (gimplify_expr): Likewise.
10472 * optabs-tree.c (optab_for_tree_code): Likewise.
10473 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10474 * tree-eh.c (operation_could_trap_p): Likewise.
10475 (stmt_could_throw_1_p): Likewise.
10476 * tree-inline.c (estimate_operator_cost): Likewise.
10477 * tree-pretty-print.c (dump_generic_node): Likewise.
10478 (op_code_prio): Likewise.
10479 * tree-ssa-loop-im.c (stmt_cost): Likewise.
10480 * tree-ssa-operands.c (get_expr_operands): Likewise.
10481 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10482 * fold-const-call.h (fold_fma): Delete.
10483 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10484 CFN_FNMA and CFN_FNMS.
10485 (fold_fma): Delete.
10486 * genmatch.c (combined_fn): New enum.
10487 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10488 (commutative_op): New function.
10489 (commutate): Use it. Handle more than 2 operands.
10490 (dt_operand::gen_gimple_expr): Use commutative_op.
10491 (parser::parse_expr): Allow :c to be used with non-binary
10492 operators if the commutative operand is known.
10493 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10494 CFN_FMS, CFN_FNMA and CFN_FNMS.
10495 (backprop::process_assign_use): Remove FMA_EXPR handling.
10496 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10497 (gen_hsa_fma): New function.
10498 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10499 IFN_FNMA and IFN_FNMS.
10500 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10501 * gimple-fold.h (follow_all_ssa_edges): Declare.
10502 * gimple-fold.c (follow_all_ssa_edges): New function.
10503 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10504 gimple_build interface and use follow_all_ssa_edges to fold the result.
10505 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10506 instead of checking for optabs directly.
10507 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10508 rather than FMA_EXPRs.
10509 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10510 call to IFN_FMA instead of an FMA_EXPR.
10512 2018-05-17 Jim Wilson <jimw@sifive.com>
10514 * expr.c (do_tablejump): When converting index to Pmode, if we have a
10515 sign extended promoted subreg, and the range does not have the sign bit
10516 set, then do a sign extend.
10518 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10519 test, check for sign extended subreg and/or constant operands, and
10520 do a sign extend in that case.
10522 2018-05-17 Steve Ellcey <sellcey@cavium.com>
10524 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10525 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10527 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10528 Change logics_shift_reg to logics_shift_imm.
10529 (thunderx2t99_fp_loadpair_basic): Delete.
10530 (thunderx2t99_fp_storepair_basic): Delete.
10531 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10532 (thunderx2t99_asimd_polynomial): Delete.
10533 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10534 and neon_fp_mul_d_scalar_q.
10535 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10536 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10537 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10538 (thunderx2t99_asimd_lut): Add missing tbl types.
10539 (thunderx2t99_asimd_ext): Delete.
10540 (thunderx2t99_asimd_load1_1_mult): Delete.
10541 (thunderx2t99_asimd_load1_2_mult): Delete.
10542 (thunderx2t99_asimd_load1_ldp): New.
10543 (thunderx2t99_asimd_load1): New.
10544 (thunderx2t99_asimd_load2): Add missing *load2* types.
10545 (thunderx2t99_asimd_load3): New.
10546 (thunderx2t99_asimd_load4): New.
10547 (thunderx2t99_asimd_store1_1_mult): Delete.
10548 (thunderx2t99_asimd_store1_2_mult): Delete.
10549 (thunderx2t99_asimd_store2_mult): Delete.
10550 (thunderx2t99_asimd_store2_onelane): Delete.
10551 (thunderx2t99_asimd_store_stp): New.
10552 (thunderx2t99_asimd_store1): New.
10553 (thunderx2t99_asimd_store2): New.
10554 (thunderx2t99_asimd_store3): New.
10555 (thunderx2t99_asimd_store4): New.
10557 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
10559 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10560 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
10562 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
10563 Segher Boessenkool <segher@kernel.crashing.org>
10566 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10569 2018-05-17 Richard Biener <rguenther@suse.de>
10571 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10572 for pruning loop and prune defs feeding only already visited PHIs.
10574 2018-05-17 Richard Biener <rguenther@suse.de>
10576 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10578 2018-05-17 Bin Cheng <bin.cheng@arm.com>
10579 Richard Biener <rguenther@suse.de>
10581 PR tree-optimization/85793
10582 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10583 for VMAT_ELEMENTWISE.
10585 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10587 * internal-fn.h (lookup_internal_fn): Declare
10588 * internal-fn.c (lookup_internal_fn): New function.
10589 * gimple.c (gimple_build_call_from_tree): Handle calls to
10590 internal functions.
10591 * gimple-pretty-print.c (dump_gimple_call): Print "." before
10592 internal function names.
10593 * tree-pretty-print.c (dump_generic_node): Likewise.
10594 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10596 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10598 * gimple-fold.h (gimple_build): Make the function forms take
10599 combined_fn rather than built_in_function.
10600 (gimple_simplify): Likewise.
10601 * gimple-match-head.c (gimple_simplify): Likewise.
10602 * gimple-fold.c (gimple_build): Likewise.
10603 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10604 rather than gimple_build_call_internal.
10605 (get_initial_defs_for_reduction): Likewise.
10606 (vect_create_epilog_for_reduction): Likewise.
10607 (vectorizable_live_operation): Likewise.
10609 2018-05-17 Martin Liska <mliska@suse.cz>
10611 * gimple-ssa-sprintf.c (format_directive): Do not use
10612 space in between 'G_' and '('.
10614 2018-05-17 Jakub Jelinek <jakub@redhat.com>
10617 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10618 even if the mask is not all ones.
10621 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10623 (ix86_gimple_fold_builtin): Likewise.
10626 * config/i386/i386.c: Include tree-vector-builder.h.
10627 (ix86_vector_shift_count): New function.
10628 (ix86_fold_builtin): Fold shift builtins by scalar count.
10629 (ix86_gimple_fold_builtin): Likewise.
10631 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10632 _mm512_setzero): New intrinsics.
10634 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
10635 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10637 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10638 code generation for cases where splatting a value is not useful.
10639 * simplify-rtx.c (simplify_ternary_operation): Simplify
10640 vec_merge across a vec_duplicate and a paradoxical subreg forming
10641 a vector mode to a vec_concat.
10643 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
10645 * config.gcc: Support "goldmont-plus".
10646 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10648 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10649 PROCESSOR_GOLDMONT_PLUS.
10650 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10651 (processor_target_table): Add "goldmont-plus".
10652 (PTA_GOLDMONT_PLUS): Define.
10653 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10654 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10655 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10656 (fold_builtin_cpu): Add "goldmont-plus".
10657 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10658 (ix86_option_override_internal): Add "goldmont-plus".
10659 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10660 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10661 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10662 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10664 2018-05-17 Richard Biener <rguenther@suse.de>
10666 PR tree-optimization/85757
10667 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10668 remove defs that only feed that PHI from further processing.
10670 2018-05-16 Jim Wilson <jimw@sifive.com>
10672 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10674 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10676 2018-05-16 Mark Wielaard <mark@klomp.org>
10678 * dwarf2out.c (count_index_strings): New function.
10679 (output_indirect_strings): Call count_index_strings and generate
10680 header for dwarf_version >= 5.
10682 2018-05-16 Mark Wielaard <mark@klomp.org>
10684 * dwarf2out.c (dwarf_FORM): New function.
10685 (set_indirect_string): Use dwarf_FORM.
10686 (reset_indirect_string): Likewise.
10687 (size_of_die): Likewise.
10688 (value_format): Likewise.
10689 (output_die): Likewise.
10690 (add_skeleton_AT_string): Likewise.
10691 (output_macinfo_op): Likewise.
10692 (index_string): Likewise.
10693 (output_index_string_offset): Likewise.
10694 (output_index_string): Likewise.
10695 (count_index_strings): Likewise.
10697 2018-05-16 Carl Love <cel@us.ibm.com>
10699 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10700 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10702 2018-05-16 Martin Jambor <mjambor@suse.cz>
10704 * ipa-prop.c (ipa_free_all_edge_args): Remove.
10705 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10707 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
10709 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10710 (fnma<mode>4): Likewise.
10711 (fms<mode>4): Likewise.
10712 (fnms<mode>4): Likewise.
10713 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10714 (aarch64_fnma<mode>4): Likewise.
10715 (aarch64_fms<mode>4): Likewise.
10716 (aarch64_fnms<mode>4): Likewise.
10717 (aarch64_fnmadd<mode>4): Likewise.
10719 2018-05-16 Jason Merrill <jason@redhat.com>
10721 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
10723 2018-05-16 Richard Biener <rguenther@suse.de>
10725 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10726 (dump_stmt_cost): Declare.
10727 (add_stmt_cost): Dump cost we add.
10728 (add_stmt_costs): New function.
10729 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10730 No longer exported.
10731 (vect_analyze_stmt): Adjust prototype.
10732 (vectorizable_condition): Likewise.
10733 (vectorizable_live_operation): Likewise.
10734 (vectorizable_reduction): Likewise.
10735 (vectorizable_induction): Likewise.
10736 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10737 cost vector to pass to vectorizable_ and record afterwards.
10738 (vect_model_reduction_cost): Take cost vector argument and adjust.
10739 (vect_model_induction_cost): Likewise.
10740 (vectorizable_reduction): Likewise.
10741 (vectorizable_induction): Likewise.
10742 (vectorizable_live_operation): Likewise.
10743 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10744 SLP_TREE_NUMBER_OF_VEC_STMTS.
10745 (vect_analyze_slp_cost_1): Remove.
10746 (vect_analyze_slp_cost): Likewise.
10747 (vect_slp_analyze_node_operations): Take visited args and
10748 a target cost vector. Avoid processing already visited stmt sets.
10749 (vect_slp_analyze_operations): Use a local cost vector to gather
10750 costs and register those of non-discarded instances.
10751 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10752 (vect_schedule_slp_instance): Remove copying of
10753 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
10755 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10756 adding cost. Record cost entry location.
10757 (vect_prologue_cost_for_slp_op): Function to compute cost of
10758 a constant or invariant generated for SLP vect in the prologue,
10759 split out from vect_analyze_slp_cost_1.
10760 (vect_model_simple_cost): Make static. Adjust for SLP costing.
10761 (vect_model_promotion_demotion_cost): Likewise.
10762 (vect_model_store_cost): Likewise, make static.
10763 (vect_model_load_cost): Likewise.
10764 (vectorizable_bswap): Add cost vector arg and adjust.
10765 (vectorizable_call): Likewise.
10766 (vectorizable_simd_clone_call): Likewise.
10767 (vectorizable_conversion): Likewise.
10768 (vectorizable_assignment): Likewise.
10769 (vectorizable_shift): Likewise.
10770 (vectorizable_operation): Likewise.
10771 (vectorizable_store): Likewise.
10772 (vectorizable_load): Likewise.
10773 (vectorizable_condition): Likewise.
10774 (vectorizable_comparison): Likewise.
10775 (can_vectorize_live_stmts): Likewise.
10776 (vect_analyze_stmt): Likewise.
10777 (vect_transform_stmt): Adjust calls to vectorizable_*.
10778 * tree-vectorizer.c: Include gimple-pretty-print.h.
10779 (dump_stmt_cost): New function.
10781 2018-05-16 Richard Biener <rguenther@suse.de>
10783 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10784 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10785 * tree-ssa-dse.c: Include tree-ssa-loop.h.
10786 (check_name): New callback.
10787 (dse_classify_store): Track cycles via a visited bitmap of PHI
10788 defs and simplify handling of in-loop and across loop dead stores
10789 and properly fail for loop-variant refs. Handle byte-tracking with
10790 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10793 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
10795 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10796 (vect_get_mask_type_for_stmt): Likewise.
10797 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10799 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
10800 to determine the statement's vector type and the vector type that
10801 should be used for calculating nunits. Deal with cases in which
10802 the type has to be deferred.
10803 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10804 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10805 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10806 (vect_determine_vf_for_stmt): New functions, split out from...
10807 (vect_determine_vectorization_factor): ...here.
10808 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10809 (vect_get_mask_type_for_stmt): New functions, split out from
10810 vect_determine_vectorization_factor.
10812 2018-05-16 Richard Biener <rguenther@suse.de>
10814 * tree-cfg.c (verify_gimple_assign_ternary): Properly
10815 verify the [VEC_]COND_EXPR embedded comparison.
10817 2018-05-15 Martin Sebor <msebor@redhat.com>
10819 PR tree-optimization/85753
10820 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10821 RECORD_TYPE in addition to ARRAY_TYPE.
10823 2018-05-15 Martin Sebor <msebor@redhat.com>
10825 PR middle-end/85643
10826 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10828 2018-05-15 Richard Biener <rguenther@suse.de>
10830 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10831 add by_clobber_p one. Change algorithm to collect all defs
10832 representing uses we need to walk and try reducing them to
10833 a single one before failing.
10834 (dse_dom_walker::dse_optimize_stmt): Adjust.
10836 2018-05-13 Mark Wielaard <mark@klomp.org>
10838 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10839 (size_of_loc_descr): Likewise.
10840 (output_loc_operands): Likewise.
10841 (output_loc_operands_raw): Likewise.
10842 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10843 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10844 (hash_loc_operands): Likewise.
10845 (compare_loc_operands): Likewise.
10847 2018-05-14 Mark Wielaard <mark@klomp.org>
10849 * dwarf2out.c (count_index_addrs): New function.
10850 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10852 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10854 PR tree-optimization/83648
10855 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10856 return value as malloc candidate.
10858 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10861 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10862 param as true in call to suggest_attribute.
10864 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
10866 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10867 -mreadonly-in-sdata.
10869 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10871 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10873 (aarch64_crypto_aesd_fused): Likewise.
10875 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
10877 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10878 (movsi_aarch64): Likewise.
10879 (load_pairsi): Likewise.
10880 (load_pairdi): Likewise.
10881 (store_pairsi): Likewise.
10882 (store_pairdi): Likewise.
10883 (load_pairsf): Likewise.
10884 (load_pairdf): Likewise.
10885 (store_pairsf): Likewise.
10886 (store_pairdf): Likewise.
10887 (zero_extend): Likewise.
10888 (trunc): Swap alternatives.
10889 (fcvt_target): Add '?' to prefer w over r.
10891 2018-05-14 Jakub Jelinek <jakub@redhat.com>
10894 * config/i386/i386.md: Disallow non-commutative arithmetics in
10895 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10896 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
10897 in the peephole2 before it.
10899 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
10901 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10902 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10903 (ix86_handle_option): Handle -mcldemote.
10904 * config.gcc: New header.
10905 * config/i386/cldemoteintrin.h: New file.
10906 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10907 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10909 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10910 OPTION_MASK_ISA_CLDEMOTE.
10911 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10912 (ix86_valid_target_attribute_inner_p): Ditto.
10913 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10914 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10915 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10916 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10917 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10919 * config/i386/i386.opt: Add -mcldemote.
10920 * config/i386/x86intrin.h: New header.
10921 * doc/invoke.texi: Add -mcldemote.
10923 2018-05-14 Richard Biener <rguenther@suse.de>
10925 * doc/match-and-simplify.texi: Adjust :s documentation.
10927 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
10929 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10930 intended memcpy size.
10931 (REORDER_45): Likewise.
10933 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
10935 * sort.cc: New file.
10936 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10937 * vec.c (qsort_chk): Use gcc_qsort.
10938 * Makefile.in (OBJS-libcommon): Add sort.o.
10939 (build/sort.o): New target. Use it...
10940 (BUILD_RTL): ... here, and...
10941 (build/gencfn-macros): ... here, and...
10942 (build/genmatch): ... here.
10944 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10945 Chung-Ju Wu <jasonwucj@gmail.com>
10947 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10948 * config/nds32/nds32-graywolf.md: New file.
10949 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10950 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10952 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10953 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10954 * config/nds32/nds32.md (pipeline_model): Add graywolf.
10955 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10956 * config/nds32/pipelines.md: Include n15 settings.
10958 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10959 Chung-Ju Wu <jasonwucj@gmail.com>
10961 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10962 * config/nds32/nds32-n13.md: New file.
10963 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10964 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10966 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10967 * config/nds32/nds32.md (pipeline_model): Add n13.
10968 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10969 * config/nds32/pipelines.md: Include n13 settings.
10971 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10972 Chung-Ju Wu <jasonwucj@gmail.com>
10974 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10975 * config/nds32/nds32-n10.md: New file.
10976 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10977 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10979 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10980 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10981 * config/nds32/nds32.md (pipeline_model): Add n10.
10982 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10983 * config/nds32/pipelines.md: Include n10 settings.
10985 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
10986 Kito Cheng <kito.cheng@gmail.com>
10987 Chung-Ju Wu <jasonwucj@gmail.com>
10989 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10990 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10991 Add enum values for DSP extension instructions.
10992 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10994 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10995 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10996 New code iterators.
10997 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10998 * config/nds32/nds32-dspext.md: New file for DSP implementation.
10999 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11000 * config/nds32/nds32-intrinsic.md: Likewise.
11001 * config/nds32/nds32_intrinsic.h: Likewise.
11002 * config/nds32/nds32-md-auxiliary.c: Likewise.
11003 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11004 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11005 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11006 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11007 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11008 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11009 TYPE_DMAC in switch statement.
11010 * config/nds32/nds32.c: New checking and implementation for DSP
11011 extension instructions.
11012 * config/nds32/nds32.h: Likewise.
11013 * config/nds32/nds32.md: Likewise.
11014 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11015 * config/nds32/predicates.md: Implement new predicates for DSP
11018 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11020 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11021 Reformat alternatives and attributes so it is easier to identify
11022 which constraints/attributes go with which instruction.
11023 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11024 (mov<mode>_softfloat32, FMOVE64): Likewise.
11025 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11026 (mov<mode>_softfloat64, FMOVE64): Likewise.
11028 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11030 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11032 (Basic PowerPC Built-in Functions): The new name of the
11033 subsection previously known as "PowerPC Built-in Functions".
11034 (Basic PowerPC Built-in Functions Available on all Configurations):
11036 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11037 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11038 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11039 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11041 2018-05-11 Martin Jambor <mjambor@suse.cz>
11044 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11047 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11050 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11052 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11054 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11055 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11056 (ix86_handle_option): Handle -mwaitpkg.
11057 * config.gcc: New header.
11058 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11059 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11060 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11062 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11063 OPTION_MASK_ISA_WAITPKG.
11064 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11065 (ix86_option_override_internal): Add PTA_WAITPKG.
11066 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11067 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11068 IX86_BUILTIN_TPAUSE.
11069 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11070 __builtin_ia32_umwait and __builtin_ia32_tpause.
11071 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11072 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11073 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11074 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11075 UNSPECV_TPAUSE): New.
11076 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11077 * config/i386/i386.opt: Add -mwaitpkg.
11078 * config/i386/waitpkgintrin.h: New file.
11079 * config/i386/x86intrin.h: New header.
11080 * doc/invoke.texi: Add -mwaitpkg.
11082 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11085 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11087 (cortex-m0): Use armv6s-m isa.
11088 (cortex-m0plus): Likewise.
11089 (cortex-m1): Likewise.
11090 (cortex-m0.small-multiply): Likewise.
11091 (cortex-m0plus.small-multiply): Likewise.
11092 (cortex-m1.small-multiply): Likewise.
11094 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11095 Jakub Jelinek <jakub@redhat.com>
11097 PR tree-optimization/85692
11098 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11099 source permute as well.
11101 2018-05-11 Martin Liska <mliska@suse.cz>
11104 * doc/extend.texi: Document LLVM style format for no_sanitize
11107 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11109 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11110 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11111 (mode_supports_vsx_dform_quad): Likewise.
11112 (mode_supports_vmx_dform): Move these functions to be next to the
11113 other mode_supports functions.
11114 (mode_supports_dq_form): Likewise.
11115 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11116 mode_supports_dq_form.
11117 (reg_offset_addressing_ok_p): Likewise.
11118 (offsettable_ok_by_alignment): Likewise.
11119 (rs6000_legitimate_offset_address_p): Likewise.
11120 (legitimate_lo_sum_address_p): Likewise.
11121 (rs6000_legitimize_address): Likewise.
11122 (rs6000_legitimize_reload_address): Likewise.
11123 (rs6000_secondary_reload_inner): Likewise.
11124 (rs6000_preferred_reload_class): Likewise.
11125 (rs6000_output_move_128bit): Likewise.
11127 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11129 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11130 Generate SImode target register for null target.
11131 <case IX86_BUILTIN_XGETBV>: Ditto.
11132 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11133 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11135 2018-05-10 Carl Love <cel@us.ibm.com>
11137 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11138 dcbtt and dcbtstt if operands[2] is 0.
11140 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11143 * config/i386/sse.md (usadv64qi): New expander.
11145 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11147 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11148 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11149 -maltivec=be support.
11150 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11151 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11152 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11153 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11154 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11155 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11156 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11157 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11158 altivec_vsumsws): Adjust.
11159 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11160 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11161 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11163 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11164 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11165 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11166 (altivec_lve<VI_char>x): Delete expand.
11167 (*altivec_lve<VI_char>x_internal): Rename to...
11168 (altivec_lve<VI_char>x): ... this.
11169 (altivec_lvxl_<mode>): Delete expand.
11170 (*altivec_lvxl_<mode>_internal): Rename to ...
11171 (altivec_lvxl_<mode>): ... this.
11172 (altivec_stvxl_<mode>): Delete expand.
11173 (*altivec_stvxl_<mode>_internal): Rename to ...
11174 (altivec_stvxl_<mode>): ... this.
11175 (altivec_stve<VI_char>x): Delete expand.
11176 (*altivec_stve<VI_char>x_internal): Rename to ...
11177 (altivec_stve<VI_char>x): ... this.
11178 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11179 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11180 reduc_plus_scal_<mode>): Adjust.
11181 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11183 (rs6000_cpu_cpp_builtins): Adjust.
11184 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11185 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11186 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11187 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11188 -maltivec=be support.
11189 (rs6000_split_vec_extract_var): Adjust.
11190 (rs6000_split_v4si_init): Adjust.
11191 (swap_selector_for_mode): Delete.
11192 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11193 altivec_expand_stvex_be): Delete.
11194 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11195 -maltivec=be support.
11196 (rs6000_gimple_fold_builtin): Ditto.
11197 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11199 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11200 (TARGET_DIRECT_MOVE_64BIT): Adjust.
11201 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11202 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11203 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11204 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11205 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11206 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11207 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11208 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11209 anonymous split): Adjust.
11210 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11211 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11213 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
11215 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11216 when --with-gxx-include-dir is also specified.
11217 * configure: Regenerate.
11219 2018-05-09 Jim Wilson <jimw@sifive.com>
11222 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11223 * config/riscv/t-withmultilib: New.
11224 * config/riscv/withmultilib.h: New.
11225 * doc/install.texi: Document RISC-V --with-multilib-list support.
11227 2018-05-09 Richard Biener <rguenther@suse.de>
11229 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11231 (vect_bb_vectorization_profitable_p): Adjust. Compute
11232 actual scalar cost using the cost vector and the add_stmt_cost
11235 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11237 PR rtl-optimization/85645
11238 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11239 in the REG_CFA_REGISTER note for LR, don't leave it empty.
11241 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11243 PR rtl-optimization/85645
11244 * shrink-wrap.c (spread_components): Return a boolean saying if
11245 anything was changed.
11246 (try_shrink_wrapping_separate): Iterate spread_components until
11247 nothing changes anymore.
11249 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11251 PR rtl-optimization/85645
11252 * regrename.c (build_def_use): Also kill the chains that include the
11253 destination of a REG_CFA_REGISTER note.
11255 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11257 PR rtl-optimization/85645
11258 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11259 insn that has a REG_CFA_REGISTER note.
11261 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
11263 * cfgexpand.c (expand_clobber): New function.
11264 (expand_gimple_stmt_1): Use it.
11265 * tree-vect-stmts.c (vect_clobber_variable): New function,
11267 (vectorizable_simd_clone_call): ...here.
11268 (vectorizable_store): Emit a clobber either side of an
11269 IFN_STORE_LANES sequence.
11270 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11272 2018-05-09 Tom de Vries <tom@codesourcery.com>
11275 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11276 (define_insn "trap_if_false"): Add exit after trap.
11278 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
11280 PR rtl-optimization/85638
11281 * bb-reorder.c: Include common/common-target.h.
11282 (create_forwarder_block): New function extracted from...
11283 (fix_up_crossing_landing_pad): ...here. Rename into...
11284 (dw2_fix_up_crossing_landing_pad): ...this.
11285 (sjlj_fix_up_crossing_landing_pad): New function.
11286 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11287 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11288 from both partitions and exit the loop after one iteration.
11290 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11293 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11295 (Basic PowerPC Built-in Functions): The new name of the
11296 subsection previously known as "PowerPC Built-in Functions".
11297 (Basic PowerPC Built-in Functions Available on all Configurations):
11299 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11301 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11303 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11305 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11308 2018-05-08 Jim Wilson <jimw@sifive.com>
11310 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11311 (LD_EMUL_SUFFIX): New.
11312 (LINK_SPEC): Use it.
11314 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11316 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11318 (Basic PowerPC Built-in Functions): The new name of the
11319 subsection previously known as "PowerPC Built-in Functions".
11320 (Basic PowerPC Built-in Functions Available on all Configurations):
11322 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11324 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11326 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11328 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11331 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11334 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11335 after cmpelim optimization.
11337 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
11339 * config.gcc: Support "goldmont".
11340 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11341 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11342 PROCESSOR_GOLDMONT.
11343 * config/i386/i386.c (m_GOLDMONT): Define.
11344 (processor_target_table): Add "goldmont".
11345 (PTA_GOLDMONT): Define.
11346 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11347 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11348 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11349 (fold_builtin_cpu): Add "goldmont".
11350 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11351 (ix86_option_override_internal): Add "goldmont".
11352 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11353 (processor_type): Add PROCESSOR_GOLDMONT.
11354 * config/i386/i386.md: Add CPU "glm".
11355 * config/i386/glm.md: New file.
11356 * config/i386/x86-tune.def: Add m_GOLDMONT.
11357 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11359 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11362 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11364 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11365 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
11366 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
11369 * config/i386/i386.c (ix86_fold_builtin): Handle
11370 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11373 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11374 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11376 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
11379 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11380 (check_arch): Likewise.
11381 (check_fpu): Return the result rather than printing it.
11382 (end arch): Fix operator precedence.
11383 (end cpu): Likewise.
11384 (END): Print the result from check_fpu.
11386 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11387 Alan Hayward <alan.hayward@arm.com>
11388 David Sherwood <david.sherwood@arm.com>
11390 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11391 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11392 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11393 (*fcmuo<mode>_and): New patterns.
11395 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11397 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11398 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11399 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11400 (cmp_op, sve_imm_con): New code attributes.
11401 (SVE_COND_INT_CMP, imm_con): Delete.
11402 (cmp_op): Remove above unspecs from int attribute.
11403 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11405 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
11406 comparison-specific unspecs.
11407 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11408 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11409 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11410 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11411 (*vec_fcm<cmp_op><mode>): Rename to...
11412 (*fcm<cmp_op><mode>): ...this and adjust likewise.
11413 (*vec_fcmuo<mode>): Rename to...
11414 (*fcmuo<mode>): ...this and adjust likewise.
11415 (*pred_fcm<cmp_op><mode>): New pattern.
11416 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11417 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11419 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11421 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11422 (aarch64_emit_sve_predicated_cond): New function.
11423 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11424 (aarch64_emit_unspec_cond_or): Replace with...
11425 (aarch64_emit_sve_or_conds): ...this new function. Use
11426 aarch64_emit_sve_ptrue_op for the individual comparisons and
11427 aarch64_emit_binop to OR them together.
11428 (aarch64_emit_inverted_unspec_cond): Replace with...
11429 (aarch64_emit_sve_inverted_cond): ...this new function. Use
11430 aarch64_emit_sve_ptrue_op for the comparison and
11431 aarch64_emit_unop to invert the result.
11432 (aarch64_expand_sve_vec_cmp_float): Update after the above
11433 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
11435 2018-05-07 Nathan Sidwell <nathan@acm.org>
11437 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11438 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11439 (Backwards Compatibility): Likewise.
11441 2018-05-07 Luis Machado <luis.machado@linaro.org>
11445 2018-05-07 Luis Machado <luis.machado@linaro.org>
11447 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11448 <prefetch_dynamic_strides>: New const bool field.
11449 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11450 prefetch_dynamic_strides.
11451 (exynosm1_prefetch_tune): Likewise.
11452 (thunderxt88_prefetch_tune): Likewise.
11453 (thunderx_prefetch_tune): Likewise.
11454 (thunderx2t99_prefetch_tune): Likewise.
11455 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11457 (aarch64_override_options_internal): Update to set
11458 PARAM_PREFETCH_DYNAMIC_STRIDES.
11459 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11460 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11461 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11462 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11463 prefetch-dynamic-strides setting.
11465 2018-05-07 Luis Machado <luis.machado@linaro.org>
11467 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11468 <minimum_stride>: New const int field.
11469 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11470 minimum_stride field.
11471 (exynosm1_prefetch_tune): Likewise.
11472 (thunderxt88_prefetch_tune): Likewise.
11473 (thunderx_prefetch_tune): Likewise.
11474 (thunderx2t99_prefetch_tune): Likewise.
11475 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11476 (aarch64_override_options_internal): Update to set
11477 PARAM_PREFETCH_MINIMUM_STRIDE.
11478 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11479 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11480 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11481 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11482 stride is constant and is below the minimum stride threshold.
11484 2018-05-07 Luis Machado <luis.machado@linaro.org>
11486 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11489 2018-05-07 Luis Machado <luis.machado@linaro.org>
11491 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11492 <prefetch_dynamic_strides>: New const bool field.
11493 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11494 prefetch_dynamic_strides.
11495 (exynosm1_prefetch_tune): Likewise.
11496 (thunderxt88_prefetch_tune): Likewise.
11497 (thunderx_prefetch_tune): Likewise.
11498 (thunderx2t99_prefetch_tune): Likewise.
11499 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11501 (aarch64_override_options_internal): Update to set
11502 PARAM_PREFETCH_DYNAMIC_STRIDES.
11503 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11504 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11505 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11506 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11507 prefetch-dynamic-strides setting.
11509 2018-05-07 Luis Machado <luis.machado@linaro.org>
11511 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11512 <minimum_stride>: New const int field.
11513 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11514 minimum_stride field.
11515 (exynosm1_prefetch_tune): Likewise.
11516 (thunderxt88_prefetch_tune): Likewise.
11517 (thunderx_prefetch_tune): Likewise.
11518 (thunderx2t99_prefetch_tune): Likewise.
11519 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11520 (aarch64_override_options_internal): Update to set
11521 PARAM_PREFETCH_MINIMUM_STRIDE.
11522 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11523 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11524 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11525 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11526 stride is constant and is below the minimum stride threshold.
11528 2018-05-06 Jakub Jelinek <jakub@redhat.com>
11531 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11532 the type is addressable. Don't force op into register if it has
11535 2018-05-05 Roland McGrath <mcgrathr@google.com>
11538 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11539 any section for which we don't know a specific type it should have,
11540 regardless of name. Previously this was done only for the exact
11541 names ".init_array", ".fini_array", and ".preinit_array".
11542 (default_elf_asm_named_section): Add comment about
11543 relationship with default_section_type_flags and SECTION_NOTYPE.
11544 (get_section): Don't consider it a type conflict if one side has
11545 SECTION_NOTYPE and the other doesn't, as long as neither has the
11546 SECTION_BSS et al used in the default_section_type_flags logic.
11548 2018-05-05 Tom de Vries <tom@codesourcery.com>
11551 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11552 (workaround_barsyncs): New function.
11553 (nvptx_reorg): Use workaround_barsyncs.
11554 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11555 (define_expand "nvptx_membar_cta"): New define_expand.
11556 (define_insn "*nvptx_membar_cta"): New insn.
11558 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
11560 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11561 To improve optimization opportunities.
11562 * builtin-types.def: The new needed builtin types for the above.
11564 2018-05-04 Richard Biener <rguenther@suse.de>
11566 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11567 * gimple-ssa-store-merging.c
11568 (imm_store_chain_info::output_merged_store): Remove redundant create,
11569 release split_store vector contents on failure.
11570 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11571 scalar stmt vector on cache hit.
11573 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
11575 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11577 * config.gcc (powerpc-xilinx-eabi*): Remove.
11578 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11580 (fusion_addis_mem_combo_load): Ditto.
11581 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11583 (rs6000_cpu_cpp_builtins): Ditto.
11584 * config/rs6000/rs6000-linux.c
11585 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11586 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11587 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11589 (rs6000_setup_reg_addr_masks): Ditto.
11590 (rs6000_init_hard_regno_mode_ok): Ditto.
11591 (rs6000_option_override_internal): Ditto.
11592 (legitimate_lo_sum_address_p): Ditto.
11593 (rs6000_legitimize_address): Ditto.
11594 (rs6000_legitimize_reload_address): Ditto.
11595 (rs6000_legitimate_address_p): Ditto.
11596 (abi_v4_pass_in_fpr): Ditto.
11597 (setup_incoming_varargs): Ditto.
11598 (rs6000_gimplify_va_arg): Ditto.
11599 (rs6000_split_multireg_move): Ditto.
11600 (rs6000_savres_strategy): Ditto.
11601 (rs6000_emit_prologue_components): Ditto.
11602 (rs6000_emit_epilogue_components): Ditto.
11603 (rs6000_emit_prologue): Ditto.
11604 (rs6000_emit_epilogue): Ditto.
11605 (rs6000_elf_file_end): Ditto.
11606 (rs6000_function_value): Ditto.
11607 (rs6000_libcall_value): Ditto.
11608 * config/rs6000/rs6000.h: Ditto.
11609 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11610 (TARGET_MINMAX): ... this. New.
11611 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11612 * config/rs6000/rs6000.md: Remove Xilinx FP support.
11613 (*movsi_internal1_single): Delete.
11614 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11615 mfpu=, mxilinx-fpu): Delete.
11616 * config/rs6000/singlefp.h: Delete.
11617 * config/rs6000/sysv4.h: Remove Xilinx FP support.
11618 * config/rs6000/t-rs6000: Ditto.
11619 * config/rs6000/t-xilinx: Delete.
11620 * config/rs6000/titan.md: Adjust for fp_type removal.
11621 * config/rs6000/vsx.md: Remove Xilinx FP support.
11622 (VStype_simple): Delete.
11623 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11624 * config/rs6000/xfpu.h: Delete.
11625 * config/rs6000/xfpu.md: Delete.
11626 * config/rs6000/xilinx.h: Delete.
11627 * config/rs6000/xilinx.opt: Delete.
11628 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11629 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11631 2018-05-04 Tom de Vries <tom@codesourcery.com>
11634 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11637 2018-05-04 Richard Biener <rguenther@suse.de>
11639 PR middle-end/85627
11640 * tree-complex.c (update_complex_assignment): We are always in SSA form.
11641 (expand_complex_div_wide): Likewise.
11642 (expand_complex_operations_1): Likewise.
11643 (expand_complex_libcall): Preserve EH info of the original stmt.
11644 (tree_lower_complex): Handle removed blocks.
11645 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11646 on complex multiplication and division libcall builtins.
11648 2018-05-04 Richard Biener <rguenther@suse.de>
11650 PR middle-end/85574
11651 * fold-const.c (negate_expr_p): Restrict negation of operand
11652 zero of a division to when we know that can happen without
11654 (fold_negate_expr_1): Likewise.
11656 2018-05-04 Jakub Jelinek <jakub@redhat.com>
11659 * real.h (real_nextafter): Declare.
11660 * real.c (real_nextafter): New function.
11661 * fold-const-call.c (fold_const_nextafter): New function.
11662 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11663 CASE_CFN_NEXTTOWARD.
11664 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11665 even when arg1_mode is different from arg0_mode.
11667 2018-05-03 Nathan Sidwell <nathan@acm.org>
11669 * doc/extend.texi (Deprecated Features): Remove
11670 -ffriend-injection.
11671 (Backwards Compatibility): Likewise.
11672 * doc/invoke.texi (C++ Language Options): Likewise.
11673 (C++ Dialect Options): Likewise.
11675 2018-05-03 Jakub Jelinek <jakub@redhat.com>
11678 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11679 _mm512_mask_mullox_epi64): New intrinsics.
11681 2018-05-03 Tom de Vries <tom@codesourcery.com>
11684 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11685 dump files): Add offload-tree.
11687 2018-05-03 Richard Biener <rguenther@suse.de>
11689 PR tree-optimization/85615
11690 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11691 to loops not nested in BBs loop father to avoid creating multi-entry
11694 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11696 PR tree-optimization/70291
11697 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11698 arguments. Change return type to tree. Emit libcall as a new
11699 statement rather than replacing existing one when inplace_p is true.
11700 (expand_complex_multiplication_components): New function.
11701 (expand_complex_multiplication): Expand floating-point complex
11702 multiplication using the above.
11703 (expand_complex_division): Rename inner_type parameter to type.
11704 Update expand_complex_libcall call-site.
11705 (expand_complex_operations_1): Update expand_complex_multiplication
11706 and expand_complex_division call-sites.
11708 2018-05-02 Jakub Jelinek <jakub@redhat.com>
11711 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11712 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11713 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11714 the highest significant bit of the shift count mask is clear. In
11715 check whether and[sq]i3 is needed verify that all significant bits
11716 of the shift count other than the highest are set.
11718 2018-05-02 Tom de Vries <tom@codesourcery.com>
11721 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11722 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11723 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11724 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11725 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11726 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11727 __builtin_goacc_parlevel_size.
11729 2018-05-02 Richard Biener <rguenther@suse.de>
11731 PR tree-optimization/85597
11732 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11733 do not use split vect_get_vec_defs call but call vect_get_slp_defs
11736 2018-05-02 Tom de Vries <tom@codesourcery.com>
11739 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11740 dump files): Add ltrans-tree.
11742 2018-05-02 Tom de Vries <tom@codesourcery.com>
11745 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11746 dump files): Add wpa-ipa.
11748 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
11750 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
11751 powerpc*-*-linux*paired* target.
11752 * config/rs6000/750cl.h: Delete.
11753 * config/rs6000/paired.h: Delete.
11754 * config/rs6000/paired.md: Delete.
11755 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11757 * config/rs6000/rs6000-builtin.def: Remove paired float support.
11758 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11759 comment. Remove paired float support.
11760 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11761 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11763 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11764 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11766 * config/rs6000/rs6000.c: Remove paired float support.
11767 (paired_expand_vector_init, paired_expand_vector_move,
11768 paired_emit_vector_compare, paired_emit_vector_cond_expr,
11769 (paired_expand_lv_builtin, paired_expand_stv_builtin,
11770 paired_expand_builtin, paired_expand_predicate_builtin,
11771 paired_init_builtins): Delete.
11772 * config/rs6000/rs6000.h: Remove paired float support.
11773 * config/rs6000/rs6000.md: Remove paired float support.
11774 (move_from_CR_ov_bit): Delete.
11775 * config/rs6000/rs6000.opt (mpaired): Delete.
11776 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11777 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11779 2018-05-02 Richard Biener <rguenther@suse.de>
11781 PR middle-end/85567
11782 * gimplify.c (gimplify_save_expr): When in SSA form allow
11783 SAVE_EXPRs to compute to SSA vars.
11785 2018-05-02 Jakub Jelinek <jakub@redhat.com>
11788 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11789 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11790 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11791 clobber operands[2], instead use a new pseudo. Formatting fixes.
11793 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
11795 PR tree-optimization/85586
11796 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11797 exit early for statements in the same group if the accesses are
11800 2018-05-02 Tom de Vries <tom@codesourcery.com>
11803 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11806 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
11808 PR tree-optimization/85143
11809 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11811 2018-05-01 Tom de Vries <tom@codesourcery.com>
11814 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11815 not found" error message.
11817 2018-05-01 Tom de Vries <tom@codesourcery.com>
11820 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11821 * vec.c (test_ordered_remove_if): New function.
11822 (vec_c_tests): Call test_ordered_remove_if.
11823 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11824 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11825 * tree-vect-patterns.c (vect_pattern_recog_1): Use
11826 VEC_ORDERED_REMOVE_IF.
11828 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11830 PR tree-optimization/82665
11831 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11832 pointer subtraction where arguments come from a memchr call.
11834 2018-05-01 Jakub Jelinek <jakub@redhat.com>
11836 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11837 --push-state --as-needed and --pop-state instead of --as-needed and
11838 --no-as-needed if ld supports it.
11839 * configure: Regenerated.
11842 * doc/install.texi2html: Replace _002d with - and _002a with * in
11843 generated html files using sed.
11845 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11848 * gcc-rich-location.c (blank_line_before_p): New function.
11849 (use_new_line): New function.
11850 (gcc_rich_location::add_fixit_insert_formatted): New function.
11851 * gcc-rich-location.h
11852 (gcc_rich_location::add_fixit_insert_formatted): New function.
11854 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11856 * selftest.c (assert_streq): Rename "expected" and "actual" to
11857 "val1" and "val2". Extend NULL-handling to cover both inputs
11858 symmetrically, while still requiring both to be non-NULL for a pass.
11859 * selftest.h (assert_streq): Rename "expected" and "actual" to
11861 (ASSERT_EQ): Likewise.
11862 (ASSERT_EQ_AT): Likewise.
11863 (ASSERT_KNOWN_EQ): Likewise.
11864 (ASSERT_KNOWN_EQ_AT): Likewise.
11865 (ASSERT_NE): Likewise.
11866 (ASSERT_MAYBE_NE): Likewise.
11867 (ASSERT_MAYBE_NE_AT): Likewise.
11868 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
11869 the assertion to pass.
11870 (ASSERT_STREQ_AT): Likewise.
11872 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
11874 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11875 interaction with -pie.
11877 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11879 * selftest.h: Fix alphabetization of per-source-file selftest
11882 2018-04-30 Jason Merrill <jason@redhat.com>
11884 PR c++/61982 - dead stores to destroyed objects.
11885 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11888 2018-04-30 Jason Merrill <jason@redhat.com>
11890 * tree.c (build_clobber): New.
11891 * tree.h: Declare it.
11892 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11894 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11896 * diagnostic-show-locus.c (layout::layout): Update for
11897 location_get_source_line returning a char_span.
11898 (struct char_span): Move to input.h.
11899 (struct correction): Update for fields in char_span becoming
11901 (struct source_line): Update for location_get_source_line
11902 returning a char_span.
11903 (layout::print_line): Likewise.
11904 * edit-context.c (edited_file::print_content): Likewise.
11905 (edited_file::print_diff_hunk): Likewise.
11906 (edited_file::print_run_of_changed_lines): Likewise.
11907 (edited_file::get_num_lines): Likewise.
11908 (edited_line::edited_line): Likewise.
11909 * final.c (asm_show_source): Likewise.
11910 * input.c (location_get_source_line): Convert return type
11911 from const char * to char_span, losing the final "line_len"
11913 (dump_location_info): Update for the above.
11914 (get_substring_ranges_for_loc): Likewise. Use a char_span
11915 when handling the literal within the line.
11916 (test_reading_source_line): Update for location_get_source_line
11917 returning a char_span.
11918 * input.h (class char_span): Move here from
11919 diagnostic-show-locus.c, converting from a struct to a class.
11920 Make data members private.
11921 (char_span::operator bool): New.
11922 (char_span::length): New.
11923 (char_span::get_buffer): New.
11924 (char_span::operator[]): New.
11925 (char_span::subspan): Make const.
11926 (char_span::xstrdup): New.
11927 (location_get_source_line): Convert return type from const char *
11928 to char_span, losing the final "line_size" param.
11930 2018-04-30 Jan Hubicka <jh@suse.cz>
11932 * lto-wrapper.c (ltrans_priorities): New static var.
11933 (cmp_priority): New.
11934 (run_gcc): Read priorities and if doing parallel build order
11935 the Makefile by them.
11937 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11939 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11941 2018-04-30 Richard Biener <rguenther@suse.de>
11943 * tree-cfg.c (verify_address): Remove base argument, add
11944 flag whether to check TREE_ADDRESSABLE and do that.
11945 (verify_expr): Remove.
11946 (verify_types_in_gimple_reference): Add pieces from verify_expr.
11947 (verify_gimple_assign_single): Likewise.
11948 (verify_gimple_switch): Likewise.
11949 (verify_expr_location_1): Dereference tp once. Add (disabled)
11950 piece from verify_expr.
11951 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11953 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11955 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11957 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11959 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11960 (small_data_pattern): Likewise.
11961 (arc_rewrite_small_data): Likewise.
11962 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11963 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11964 (get_symbol_alignment): New function.
11965 (legitimate_small_data_address_p): Likewise.
11966 (legitimate_scaled_address): Update, call
11967 legitimate_small_data_address_p.
11968 (output_sdata): New static variable.
11969 (arc_print_operand): Update how we handle small data operands.
11970 (arc_print_operand_address): Likewise.
11971 (arc_legitimate_address_p): Update, use
11972 legitimate_small_data_address_p.
11973 (arc_rewrite_small_data_p): Remove.
11974 (arc_rewrite_small_data_1): Likewise.
11975 (arc_rewrite_small_data): Likewise.
11976 (small_data_pattern): Likewise.
11977 (compact_sda_memory_operand): Update to use
11978 legitimate_small_data_address_p and get_symbol_alignment.
11979 (prepare_move_operands): Don't rewite sdata pattern.
11980 (prepare_extend_operands): Remove.
11981 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11983 (zero_extendqisi2): Likewise.
11984 (zero_extendhisi2): Likewise.
11985 (extendqihi2): Likewise.
11986 (extendqisi2): Likewise.
11987 (extendhisi2): Likewise.
11988 (addsi3): Likewise.
11989 (subsi3): Likewise.
11990 (andsi3): Likewise.
11991 * config/arc/constraints.md (Usd): Change it to memory constraint.
11993 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11995 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11996 as source of std instructions.
11997 * config/arc/arc.md (movsi_insn): Update pattern predicate to
11998 allow 6-bit constants as source for store instructions.
11999 (movdi_insn): Update instruction pattern to allow 6-bit constants
12000 as source for store instructions.
12002 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12004 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12006 2018-04-30 Nathan Sidwell <nathan@acm.org>
12007 Sandra Loosemore <sandra@codesourcery.com>
12009 * dumpfile.c (dump_open): Allow '-' for stdout.
12010 * doc/invoke.texi (Developer Options): Document dump filename
12011 determination early. Document stdin/stdout selection.
12013 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12015 Microblaze Target: PIC data text relative
12017 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12018 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12020 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12021 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12022 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12023 New addressing mode for data-text relative position indepenedent code.
12024 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12025 'ADDRESS_SYMBOLIC_TXT_REL'.
12026 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12027 (microblaze_legitimate_pic_operand): Exclude function calls from
12028 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12029 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12031 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12032 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12033 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12034 for 'address + offset'.
12035 (microblaze_expand_prologue): Add new function prologue call for
12037 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12038 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12039 table in case of TARGET_PIC_DATA_TEXT_REL.
12040 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12041 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12042 Add new macros 'UNSPEC_TEXT',
12043 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12044 + exclude function calls from 'UNSPEC_PLT' in case of data text
12046 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12047 new target hook for generating address diff vector tables in case of
12049 * doc/tm.texi : Regenerate.
12050 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12051 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12052 of addr diff vector generation.
12053 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12054 target hook definition.
12055 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12056 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12057 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12058 option for data text relative.
12060 2018-04-30 Richard Biener <rguenther@suse.de>
12062 * tree-chrec.h (evolution_function_is_constant_p): Remove
12064 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12066 2018-04-30 Richard Biener <rguenther@suse.de>
12069 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12071 2018-04-30 Richard Biener <rguenther@suse.de>
12073 PR tree-optimization/28364
12074 PR tree-optimization/85275
12075 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12076 copying first exit test.
12078 2018-04-28 Mark Wielaard <mark@klomp.org>
12080 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12081 dwarf_version >= 5.
12082 (dwarf_AT): Handle DW_AT_addr_base.
12083 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12085 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12088 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12089 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12090 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12091 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12093 2018-04-28 Richard Biener <rguenther@suse.de>
12095 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12096 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12097 to reflect use. Only add interesting stmts.
12099 2018-04-27 Martin Jambor <mjambor@suse.cz>
12102 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12103 the jump function allows for passing through aggregate values.
12105 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12107 * input.h (in_system_header_at): Convert from macro to inline
12109 (from_macro_expansion_at): Likewise.
12110 (from_macro_definition_at): Likewise.
12112 2018-04-27 Jeff Law <law@redhat.com>
12114 * config.gcc: Mark tile* targets as deprecated/obsolete.
12116 2018-04-27 Richard Biener <rguenther@suse.de>
12118 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12121 2018-04-27 Richard Biener <rguenther@suse.de>
12123 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12125 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12127 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12128 with Yd constraint. Set "preferred_for_speed" attribute from
12129 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12130 with Yd constraint.
12131 (*movdi_internal): Ditto.
12132 (movti_interunit splitters): Remove
12133 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12134 (movdi_interunit splitters): Ditto.
12135 * config/i386/constraints.md (Ye): Remove.
12136 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12138 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12141 * config/aarch64/constraints.md (Usg): Limit to 31.
12142 (Usj): Limit to 63.
12144 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12146 PR tree-optimization/85529
12147 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12148 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12149 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12150 zero extension or masking of the MSB bit.
12151 (optimize_range_tests): Add FIRST_BB argument, pass it through
12152 to optimize_range_tests_var_bound.
12153 (maybe_optimize_range_tests, reassociate_bb): Adjust
12154 optimize_range_tests callers.
12156 2018-04-26 Richard Biener <rguenther@suse.de>
12157 Jakub Jelinek <jakub@redhat.com>
12159 * cgraph.h (symbol_table): Just declare debug method here.
12160 * symtab.c (symbol_table::debug): Define.
12162 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12164 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12166 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12168 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12169 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12170 (*movdi_internal): Substitute Yi and Yj constraint with x
12171 and Ym and Yn constraint with y constraint. Update "isa"
12172 attribute and set "preferred_for_speed" attribute from
12173 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12174 (*movsi_internal): Ditto.
12175 (*movdf_internal): Ditto.
12176 (*movsf_internal): Ditto.
12177 (*zero_extendsidi2): Ditto.
12178 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12179 (sse2_loadld): Ditto.
12180 (*vec_extract<ssevecmodelower>_0): Ditto.
12181 (*vec_extractv4si_0_zext_sse4): Ditto.
12182 (vec_concatv2di): Ditto.
12183 (*vec_dup<mode>): Ditto.
12184 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12185 * config/i386/constraints.md (Yi): Remove.
12190 2018-04-26 Nathan Sidwell <nathan@acm.org>
12192 * dumpfile.c (dump_open): New.
12193 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12194 (dump_finish): Detect stdio/stderr by value not name.
12196 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
12198 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12200 2018-04-26 Tom de Vries <tom@codesourcery.com>
12203 * config/nvptx/nvptx.c (verify_neutering_jumps)
12204 (verify_neutering_labels): New function
12205 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12207 2018-04-26 Tom de Vries <tom@codesourcery.com>
12210 * config/nvptx/nvptx.c (needs_neutering_p): New function.
12211 (nvptx_single): Use needs_neutering_p to skip over insns that do not
12214 2018-04-26 Richard Biener <rguenther@suse.de>
12215 Tom de Vries <tom@codesourcery.com>
12218 * lto-streamer-out.c (output_function): Fixup loops if required to match
12219 discovery done in the reader.
12221 2018-04-26 Richard Biener <rguenther@suse.de>
12223 PR tree-optimization/85116
12224 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12225 have a loop exit from the single latch predecessor. Remove
12226 case of header with just condition.
12227 (ch_base::copy_headers): Exclude infinite loops from any
12229 (pass_ch::execute): Record exits.
12231 2018-04-26 Richard Biener <rguenther@suse.de>
12233 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12234 prologue cost vector and pass it to vect_get_load_cost.
12235 (vect_get_peeling_costs_all_drs): Likewise.
12236 (vect_peeling_hash_get_lowest_cost): Likewise.
12237 (vect_enhance_data_refs_alignment): Likewise.
12239 2018-04-26 Richard Biener <rguenther@suse.de>
12241 PR middle-end/85450
12242 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12243 checking of integer<->pointer conversions.
12244 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12245 sign-/zero-extending pointer types.
12246 (expand_omp_for_static_chunk): Likewise.
12248 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
12249 Jean Lee <xiaoyur347@gmail.com>
12251 * config/mips/mips.c (mips_asan_shadow_offset): New function.
12252 (TARGET_ASAN_SHADOW_OFFSET): Define.
12253 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12254 true for -fsanitize=address.
12256 2018-04-25 Mark Wielaard <mark@klomp.org>
12258 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12261 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12263 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12264 than "alu", remove explicit "memory" and "imm_disp" attributes.
12265 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12267 PR middle-end/85414
12268 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12269 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12270 gen_lowpart_no_emit.
12272 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
12275 * config/i386/i386.c (ix86_expand_builtin): Change memory
12276 operand to XI, extend p0 to Pmode.
12277 * config/i386/i386.md: Change unspec volatile and operand
12278 1 mode to XI, change operand 0 mode to P.
12280 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12282 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12283 GET_MODE_MASK before any checking.
12284 (nds32_can_use_bset_p): Likewise.
12285 (nds32_can_use_btgl_p): Likewise.
12287 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12289 * config/nds32/nds32-doubleword.md: New define_split pattern for
12290 illegal register number.
12292 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12294 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12296 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12298 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12300 2018-04-25 Richard Biener <rguenther@suse.de>
12302 * lto-streamer.h (LTO_major_version): Bump to 8.
12304 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12306 * BASE-VER: Set to 9.0.0.
12308 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
12310 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12311 in __abskf2 and __powikf2.
12313 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12316 * config/aarch64/constraints.md (Usg, Usj): New constraints.
12317 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12318 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12319 Use the above on operand 2. Reindent.
12320 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12322 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12325 * common/config/i386/i386-common.c (ix86_handle_option): Don't
12327 * config/i386/i386.opt (mcet): Removed.
12328 * doc/install.texi: Remove -mcet documentation.
12329 * doc/invoke.texi: Likewise.
12331 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12334 * doc/install.texi: Remove -mcet from bootstrap-cet.
12336 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12339 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12340 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12344 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12345 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12346 containing a CONST_VECTOR.
12348 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
12350 * doc/install.texi: Update newlib dependency for nvptx.
12352 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12355 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12356 instead of INTVAL when shifting x left.
12358 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
12360 PR tree-optimization/85478
12361 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12362 vect_grouped_store_supported for single element vectors.
12364 2018-04-24 Richard Biener <rguenther@suse.de>
12367 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12368 load cost increase to the case of non-constant step.
12370 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12373 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12374 destination if any_malformed_asm.
12376 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
12378 PR middle-end/85496
12379 * expr.c (store_field): In the bitfield case, if the value comes from
12380 a function call and is returned in registers by means of a PARALLEL,
12381 do not change the mode of the temporary unless BLKmode and VOIDmode.
12383 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
12385 PR rtl-optimization/85423
12386 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12387 dependencies to debug insns when the previous insn is non-debug.
12389 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12391 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12392 enums into a single definition.
12393 (fls): Fix predicates and printing.
12396 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12398 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12399 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12400 and short u6 immediate.
12401 (check_if_valid_sleep_operand): Remove.
12402 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12404 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12406 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12407 flag_always_save_lp condition.
12408 * config/nds32/nds32.opt (malways-save-lp): New option.
12410 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12412 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12413 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12414 * config/nds32/nds32.h
12415 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12416 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12418 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12420 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12421 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12423 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12424 Chung-Ju Wu <jasonwucj@gmail.com>
12426 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12428 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12429 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12431 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12433 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12435 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12437 * config/nds32/nds32-protos.h (nds32_data_alignment,
12438 nds32_local_alignment): Declare.
12439 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12440 nds32_local_alignment): New functions.
12441 (TARGET_CONSTANT_ALIGNMENT): Define.
12442 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12444 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12446 * config/nds32/nds32.c
12447 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12448 (TARGET_MODES_TIEABLE_P): Likewise.
12450 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12452 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12453 level Ofast and Og.
12455 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
12456 Chung-Ju Wu <jasonwucj@gmail.com>
12458 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12459 for unaligned access.
12460 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12462 * config/nds32/nds32-intrinsic.md: Likewise.
12463 * config/nds32/nds32_intrinsic.h: Likewise.
12464 * config/nds32/nds32.h (nds32_builtins): Likewise.
12465 * config/nds32/nds32.opt (munaligned-access): New option.
12466 * config/nds32/nds32.c (nds32_asm_file_start): Display
12467 flag_unaligned_access status.
12469 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12471 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12472 -mno-relax is present.
12473 * config/riscv/linux.h (LINK_SPEC): Ditto.
12475 2018-04-20 Martin Sebor <msebor@redhat.com>
12478 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12480 (gimple_fold_builtin_stxcpy_chk): Same.
12481 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12483 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
12486 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12487 __powikf2 when long double is IEEE 128-bit.
12489 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12491 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12492 step to make sure stack always aligned.
12494 2018-04-20 Carl Love <cel@us.ibm.com>
12497 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12498 size check for arg0.
12500 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
12501 Tom de Vries <tom@codesourcery.com>
12504 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12505 Emit insns for calls too.
12506 (nvptx_find_par): Always look for worker-level predecessor insn.
12507 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
12509 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12510 (nvptx_process_pars): Propagate frames for calls.
12512 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
12515 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12517 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12518 (ix86_handle_option): Don't handle OPT_mibt.
12519 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12521 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12523 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12524 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12525 (ix86_target_macros): Define __CET__ with flag_cf_protection
12526 for -fcf-protection.
12527 * config/i386/i386.c (isa2_opts): Remove -mibt.
12528 * config/i386/i386.h (TARGET_IBT): Removed.
12529 (TARGET_IBT_P): Likewise.
12530 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12531 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12532 * config/i386/i386.opt (mcet): Update help message.
12533 (mshstk): Likewise.
12535 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
12536 -mcet as an alias for -mshstk.
12538 2018-04-20 Richard Biener <rguenther@suse.de>
12540 PR middle-end/85475
12541 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12542 complexity by forcing a single use of the multiply operand.
12544 2018-04-20 Martin Jambor <mjambor@suse.cz>
12547 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12548 recursion dependency to only apply to non-clones.
12550 2018-04-20 Martin Jambor <mjambor@suse.cz>
12553 * ipa-cp.c (create_specialized_node): Check that clones of
12554 self-recursive edges exist during IPA-CP.
12556 2018-04-19 Toon Moene <toon@moene.org>
12558 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12561 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12563 PR tree-optimization/85467
12564 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12565 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
12566 VECTOR_CST element to type.
12568 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12571 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12572 * config/i386/i386.md (builtin_setjmp_setup): Removed.
12573 (builtin_longjmp): Likewise.
12574 (save_stack_nonlocal): New pattern.
12575 (restore_stack_nonlocal): Likewise.
12577 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12580 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12581 Replace ASM_OUTPUT_LABEL with fprintf.
12583 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12586 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12587 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12588 * config/i386/i386-c.c (ix86_target_macros_internal): Also
12589 define __IBT__ and __SHSTK__ for -fcf-protection.
12590 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12592 (ix86_trampoline_init): Likewise.
12593 (x86_output_mi_thunk): Likewise.
12594 (ix86_notrack_prefixed_insn_p): Likewise.
12595 (ix86_option_override_internal): Don't disallow -fcf-protection.
12596 * config/i386/i386.md (rdssp<mode>): Also enable for
12598 (incssp<mode>): Likewise.
12599 (nop_endbr): Likewise.
12600 * config/i386/i386.opt (mcet): Change help message to built-in
12603 (mshstk): Likewise.
12604 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12605 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
12606 enable CET built-in functions.
12608 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
12610 * common/config/i386/i386-common.c
12611 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12612 OPTION_MASK_ISA_MOVDIRI_UNSET,
12613 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12614 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12615 * config.gcc (movdirintrin.h): New header.
12616 * config/i386/cpuid.h (bit_MOVDIRI,
12617 bit_MOVDIR64B): New bits.
12618 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12620 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12621 (VOID, PVOID, PCVOID)): New function types.
12622 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12623 __builtin_ia32_directstoreu_u64,
12624 __builtin_ia32_movdir64b): New builtins.
12625 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12626 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12628 (ix86_valid_target_attribute_inner_p): Ditto.
12629 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12630 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12631 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12632 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12633 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12634 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12635 (movdiri<mode>, movdir64b_<mode>): New.
12636 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12637 * config/i386/immintrin.h: Include movdirintrin.h.
12638 * config/i386/movdirintrin.h: New file.
12639 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12641 2018-04-19 Richard Biener <rguenther@suse.de>
12643 PR middle-end/85455
12644 * cfg.c (clear_bb_flags): When loop state says we have
12645 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12647 2018-04-19 Richard Biener <rguenther@suse.de>
12649 PR tree-optimization/84737
12650 * tree-vect-data-refs.c (vect_copy_ref_info): New function
12651 copying restrict info.
12652 (vect_setup_realignment): Use it.
12653 * tree-vectorizer.h (vect_copy_ref_info): Declare.
12654 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12655 the first DR to all generated stores.
12656 (vectorizable_load): Likewise for loads.
12658 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12660 PR tree-optimization/85446
12661 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12662 the integral and pointer types to have the same precision.
12664 * doc/install.texi: Document --disable-cet being the default and
12667 2018-04-18 Martin Liska <mliska@suse.cz>
12669 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12672 2018-04-18 Martin Liska <mliska@suse.cz>
12675 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12678 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12679 arguments if they are comparable.
12681 2018-04-18 Martin Liska <mliska@suse.cz>
12684 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12687 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12690 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
12693 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12694 ENDBR after calling __morestack.
12696 2018-04-18 David Malcolm <dmalcolm@redhat.com>
12699 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12700 by using gcc_base_ver to generate a gcc_driver_version, and use
12701 it when generating GCC_DRIVER_NAME.
12702 * configure: Regenerate.
12704 2018-04-18 Jakub Jelinek <jakub@redhat.com>
12707 * config.gcc: Obsolete powerpc*-*-*spe*.
12709 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12712 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12713 (stabstr_D): Change type of unum from unsigned int to
12714 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
12717 2018-04-17 Jim Wilson <jimw@sifive.com>
12720 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12721 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12722 Set arg_pointer_offset after using pretend_args_size.
12724 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12726 PR rtl-optimization/85431
12727 * dse.c (record_store): Ignore zero width stores.
12730 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
12731 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12732 __builtin_stack_restore rather than after it.
12733 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12734 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12735 argument instead of virtual_dynamic_stack_rtx.
12737 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
12739 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12741 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12742 Add note to error message to explain internal mapping of overloaded
12743 built-in function name to non-overloaded built-in function name.
12744 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12747 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
12750 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12751 where the inputs overlap with the output.
12753 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12755 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12756 (=v, v) alternative and explicit "memory" attribute.
12757 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
12758 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12760 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12761 "sselog1" type instead of "sselog".
12762 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12763 "sselog". Remove explicit "memory" attribute.
12764 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12765 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12767 (vec_extract_hi_v32hi): Merge all alternatives into one, use
12768 "sselog1" type instead of "sselog". Remove explicit "memory"
12770 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12771 use "sselog1" type instead of "sselog". Remove explicit "memory"
12773 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12774 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12776 (vec_extract_hi_v64qi): Merge all alternatives into one, use
12777 "sselog1" type instead of "sselog". Remove explicit "memory"
12779 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12780 use "sselog1" type instead of "sselog". Remove explicit "memory"
12784 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12786 PR middle-end/85414
12787 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12790 2018-04-17 Martin Jambor <mjambor@suse.cz>
12793 * ipa-cp.c (create_specialized_node): Call
12794 expand_all_artificial_thunks if necessary.
12796 2018-04-17 Martin Liska <mliska@suse.cz>
12799 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12800 in message, remote space in between '_G' and '('.
12802 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12805 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12806 avx512f_vmcmp<mode>3<round_saeonly_name>,
12807 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12808 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12809 avx512f_rndscale<mode><round_saeonly_name>,
12810 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12811 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12812 Use %<iptr>2 instead of %2 for -masm=intel.
12813 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12814 avx512f_vcvttss2usi<round_saeonly_name>,
12815 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12817 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12818 avx512f_vcvttsd2usi<round_saeonly_name>,
12819 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12820 Use %q1 instead of %1 for -masm=intel.
12821 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12822 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12823 of %3 for -masm=intel.
12824 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12826 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12828 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12830 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12831 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12833 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12835 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12836 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12837 %g1 and one with %0 and %1.
12838 (avx512er_vmrcp28<mode><round_saeonly_name>,
12839 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12840 %1 for -masm=intel.
12841 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12842 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12843 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12844 of %0 and %{%4%} for -masm=intel.
12845 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12846 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12847 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12848 order of %0 and %{%5%}%{z%} for -masm=intel.
12850 2018-04-17 Jan Hubicka <jh@suse.cz>
12853 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12855 2018-04-17 Martin Liska <mliska@suse.cz>
12858 * multiple_target.c (create_dispatcher_calls): Set apostrophes
12859 for target_clone error message. Make default implementation
12860 clone to be a local declaration.
12861 (separate_attrs): Add new argument and check for an empty
12863 (expand_target_clones): Handle it.
12864 (ipa_target_clone): Make redirection just for target_clones
12867 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
12868 Tom de Vries <tom@codesourcery.com>
12870 PR middle-end/84955
12871 * omp-expand.c (expand_oacc_for): Add dummy false branch for
12872 tiled basic blocks without omp continue statements.
12874 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
12877 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12878 vec_extract expression as having side effects to make sure it gets
12881 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
12884 * config/i386/i386.c (get_builtin_code_for_version): Check
12887 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
12890 * config.gcc: Support "skylake".
12891 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12893 * config/i386/i386.c (m_SKYLAKE): Define.
12894 (processor_target_table): Add "skylake".
12895 (ix86_option_override_internal): Add "skylake".
12896 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12897 PROCESSOR_CANNONLAKE.
12898 (get_builtin_code_for_version): Fix priority for
12899 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12900 PROCESSOR_SKYLAKE-AVX512.
12901 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12902 (processor_type): Add PROCESSOR_SKYLAKE.
12904 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
12905 Jason Merrill <jason@redhat.com>
12908 * convert.c (convert_to_integer_1): Use direct recursion for
12909 enumeral types and types with a precision less than the number
12910 of bits in their mode.
12912 2018-04-16 Julia Koval <julia.koval@intel.com>
12915 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12916 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12918 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
12921 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12922 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12923 and -mno-direct-move.
12925 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
12928 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12929 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12930 Ensure negative shifts result in {0}.
12932 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
12934 PR rtl-optimization/79916
12935 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12936 regs (if any) to define how to gnerate SD moves when LRA is in
12939 2018-04-13 Jakub Jelinek <jakub@redhat.com>
12941 PR rtl-optimization/85393
12942 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12943 * except.c (expand_dw2_landing_pad_for_region): Make static.
12944 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12945 a label and unconditional jump to old_bb, rather than
12946 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12949 PR rtl-optimization/85376
12950 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12951 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12952 instead of a specific value.
12954 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
12955 Bin Cheng <bin.cheng@arm.com>
12957 PR tree-optimization/82965
12958 PR tree-optimization/83991
12959 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12960 by_profile_only parameter.
12961 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12962 information if the loop was predicted to iterate too many times.
12963 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12965 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
12968 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12971 2018-04-13 Martin Liska <mliska@suse.cz>
12972 Jakub Jelinek <jakub@redhat.com>
12974 PR middle-end/81657
12975 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12976 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12977 * builtins.c (expand_builtin_memory_copy_args): Use
12978 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12979 handle dest_addr == pc_rtx.
12981 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
12984 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12985 asked to not generate direct moves.
12986 (fix_trunc<mode>si2_stfiwx): Similar.
12987 (fix_trunc<mode>si2_internal): Similar.
12989 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12992 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12993 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12994 lookup if dest in some wider mode is known to be const0_rtx and
12995 if so, record permanent equivalence for it to be ZERO_EXTEND of
12996 the narrower mode destination.
12998 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13000 * lto-streamer-out.c (output_function): Revert 259346.
13001 * omp-expand.c (expand_oacc_for): Likewise.
13003 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13005 PR rtl-optimization/85354
13006 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13007 * sel-sched.c (sel_global_init): ... here.
13009 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13012 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13013 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13014 mode for PE-COFF targets.
13015 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13016 (i386_pe_asm_lto_end): Likewise.
13017 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13018 (TARGET_ASM_LTO_END): Likewise.
13019 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13020 (i386_pe_asm_lto_start): New function.
13021 (i386_pe_asm_lto_end): Likewise.
13023 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13024 Richard Biener <rguenther@suse.de>
13026 PR middle-end/84955
13027 * lto-streamer-out.c (output_function): Fix CFG loop state before
13029 * omp-expand.c (expand_oacc_for): Handle calls to internal
13030 functions like regular functions.
13032 2018-04-12 Richard Biener <rguenther@suse.de>
13035 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13036 for the early LTO debug to properly generate references to it
13037 during DIE emission. Do not re-use that for the skeleton for
13039 (dwarf2out_early_finish): Likewise.
13041 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13044 * config/i386/sse.md
13045 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13046 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13047 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13048 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13049 and output is a reg, avoid creating invalid lowpart subreg, but
13050 instead split into a 512-bit move. Don't split if not AVX512VL,
13051 input is xmm16+ reg and output is a mem.
13052 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13053 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13054 xmm16+ reg and output is a mem.
13056 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13058 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13059 also for flag_dwarf2_cfi_asm.
13061 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13063 PR rtl-optimization/85342
13064 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13065 a bool scalar var inside of the loop instead. Don't try to update
13066 recog_data.operand after failed apply_change_group.
13068 2018-04-12 Tom de Vries <tom@codesourcery.com>
13071 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13072 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13073 array with flexible array member as array without given dimension.
13074 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13075 argument for undefined param to true.
13077 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13080 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13081 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13082 from PowerPC section.
13083 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13084 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13085 help text that is too long.
13086 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13087 help text that is too long.
13088 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13089 help text that is too long.
13091 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13093 * config/alpha/alpha.md (stack_probe_internal): Rename
13094 from "probe_stack". Update all callers.
13096 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13098 PR rtl-optimization/84566
13099 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13100 sched_macro_fuse_insns.
13102 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13105 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13106 (compute_block_dependences): ... from here.
13108 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13110 PR tree-optimization/85331
13111 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13112 from int to HOST_WIDE_INT.
13114 2018-04-11 Martin Jambor <mjambor@suse.cz>
13117 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13118 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13119 not the same as the source val.
13120 (cgraph_edge_brings_value_p): New parameter.
13121 (gather_edges_for_value): Pass destination value to
13122 cgraph_edge_brings_value_p.
13123 (perhaps_add_new_callers): Likewise.
13124 (get_info_about_necessary_edges): Likewise and exclude values brought
13125 only by self-recursive edges.
13126 (create_specialized_node): Redirect only clones of self-calling edges.
13127 (+self_recursive_pass_through_p): New function.
13128 (find_more_scalar_values_for_callers_subset): Use it.
13129 (find_aggregate_values_for_callers_subset): Likewise.
13130 (known_aggs_to_agg_replacement_list): Removed.
13131 (decide_whether_version_node): Re-calculate known constants for all
13132 remaining context clones.
13134 2018-04-11 Richard Biener <rguenther@suse.de>
13137 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13138 from early DWARF output.
13139 (dwarf2out_early_finish): Output line info unconditionally into
13140 early DWARF and add reference to it.
13142 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13145 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13146 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13147 other than V2DFmode using iptr mode attribute.
13148 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13150 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13152 PR rtl-optimization/84659
13153 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13155 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13158 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13160 (output_loc_list): Pass address of a dummy size variable even in the
13161 locview handling loop.
13162 (index_location_lists): Add comment on why skip_loc_list_entry can't
13165 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13168 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13171 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13174 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13175 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13176 and -mstring-compare-inline-limit.
13178 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13181 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13182 for stack clash protection in a register whenever we need it to be in
13185 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13187 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13188 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13190 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13193 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13195 (mlong-double-): Ditto.
13196 * config/rs6000/sysv4.opt (msdata=): Ditto.
13197 (mtls-size=): Ditto.
13199 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13201 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13202 erroneous entries for
13203 "vector int vec_ldl (int, long int *)", and
13204 "vector unsigned int vec_ldl (int, unsigned long int *)".
13205 Add comments and entries for
13206 "vector bool char vec_ldl (int, bool char *)",
13207 "vector bool short vec_ldl (int, bool short *)",
13208 "vector bool int vec_ldl (int, bool int *)",
13209 "vector bool long long vec_ldl (int, bool long long *)",
13210 "vector pixel vec_ldl (int, pixel *)",
13211 "vector long long vec_ldl (int, long long *)",
13212 "vector unsigned long long vec_ldl (int, unsigned long long *)".
13213 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13214 type tree bool_long_long_type_node and correct definition of
13215 bool_V2DI_type_node to make reference to this new type tree.
13216 (rs6000_mangle_type): Replace erroneous reference to
13217 bool_long_type_node with bool_long_long_type_node.
13218 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13219 comments to emphasize sign distinctions for char and int types and
13220 replace RS6000_BTI_bool_long constant with
13221 RS6000_BTI_bool_long_long constant. Also add comment to restrict
13222 use of RS6000_BTI_pixel.
13223 (bool_long_type_node): Remove this macro definition.
13224 (bool_long_long_type_node): New macro definition
13226 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13228 PR rtl-optimization/85300
13229 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13230 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13231 simplify_unary_operation fails.
13233 2018-04-10 Martin Liska <mliska@suse.cz>
13235 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13236 cgraph_edge and ipa_ref.
13238 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13242 * config/i386/sse.md
13243 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13244 computation of the VEC_MERGE selector from mask.
13245 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13246 Fix decoding of the VEC_MERGE selector into mask.
13248 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13250 PR tree-optimization/85286
13251 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13253 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13255 * final.c (final_1): Set insn_last_address as well as
13256 insn_current_address.
13258 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13261 * explow.c (emit_stack_probe): Call validize_mem on memory location
13262 before passing it to gen_probe_stack. Create address operand and
13263 legitimize it for the probe_stack_address case.
13265 2018-04-09 Jan Hubicka <jh@suse.cz>
13268 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13269 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13270 * tree.c (free_lang_data_in_type): Fix handling of binfos;
13272 (free_lang_data): Rebuild type inheritance graph.
13274 2018-04-09 Martin Sebor <msebor@redhat.com>
13276 * invoke.texi (-finline-small-functions): Mention other optimization
13278 (-findirect-inlining, -fpartial-inlining): Same.
13279 (-finline-functions-called-once): Same.
13280 (-freorder-blocks-and-partition): Same.
13282 2018-04-09 Jan Hubicka <jh@suse.cz>
13285 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13286 jumps; choose last target that matches the criteria (i.e.
13287 no partition changes for non-crossing jumps).
13288 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13289 support for redirecting crossing jumps to non-crossing.
13291 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
13293 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13294 also for naked functions.
13296 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
13298 * config/arc/arc.md (add_shift): New pattern.
13299 (add_shift2): Likewise.
13300 (sub_shift): Likewise.
13301 (sub_shift_cmp0_noout): Likewise.
13302 (compare_si_ashiftsi): Likewise.
13303 (xbfu_cmp0_noout): New combine pattern.
13304 (xbfu_cmp0"): Likewise.
13305 (movsi_set_cc_insn): Place the predicable variant first.
13306 (commutative_binary_cmp0_noout): Remove clobber.
13307 (commutative_binary_cmp0): New pattern.
13308 (noncommutative_binary_cmp0): Likewise.
13309 (noncommutative_binary_cmp0_noout): Likewise.
13310 (noncommutative_binary_comparison_result_used): Removed.
13311 (rsub_cmp0): New pattern.
13312 (rsub_cmp0_noout): Likewise.
13313 (extzvsi): Changed, keep only meaningful variants.
13314 (SQH, SEZ): New iterators.
13315 (SQH_postfix): New mode attribute.
13316 (SEZ_prefix): New code attribute.
13317 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13318 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13319 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13320 of numerical value.
13321 (noncommutative_operator): Check the availability of barrel
13324 2018-04-09 Richard Biener <rguenther@suse.de>
13326 PR tree-optimization/85284
13327 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13328 Only use the niter constraining form of simple_iv when the exit
13329 is always executed.
13331 2018-04-09 Tom de Vries <tom@codesourcery.com>
13334 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13335 (define_expand "*memory_barrier"): New define_expand.
13336 (define_insn "memory_barrier"): New insn.
13338 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13340 PR rtl-optimization/80463
13341 PR rtl-optimization/83972
13342 PR rtl-optimization/83480
13344 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13345 correct producer for the insn.
13346 (tidy_control_flow): Fixup seqnos in case of debug insns.
13348 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13350 PR rtl-optimization/83913
13352 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13353 different sched-times when merging exprs.
13355 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13357 PR rtl-optimization/83962
13359 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13360 tidy_fallthru_edge and tidy_control_flow.
13362 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13364 PR rtl-optimization/83530
13366 * sel-sched.c (force_next_insn): New global variable.
13367 (remove_insn_for_debug): When force_next_insn is true, also leave only
13368 next insn in the ready list.
13369 (sel_sched_region): When the region wasn't scheduled, make another pass
13370 over it with force_next_insn set to 1.
13372 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13374 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13376 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13377 for interrupt control.
13378 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13379 functions for interrupt control.
13380 * config/nds32/nds32-intrinsic.md: Likewise.
13381 * config/nds32/nds32_intrinsic.h: Likewise.
13382 * config/nds32/nds32.h (nds32_builtins): Likewise.
13384 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13386 * config/nds32/nds32.c (nds32_init_machine_status,
13387 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13388 strict_aligned_p field.
13389 (nds32_expand_to_rtl_hook): New function.
13390 (TARGET_EXPAND_TO_RTL_HOOK): Define.
13391 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13393 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13394 Chung-Ju Wu <jasonwucj@gmail.com>
13396 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13397 * config/nds32/nds32-n7.md: New file.
13398 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13399 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13401 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13402 * config/nds32/nds32.md (pipeline_model): Add n7.
13403 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13404 * config/nds32/pipelines.md: Include n7 settings.
13406 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13407 Chung-Ju Wu <jasonwucj@gmail.com>
13409 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13410 * config/nds32/nds32-e8.md: New file.
13411 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13412 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13414 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13415 * config/nds32/nds32.md (pipeline_model): Add e8.
13416 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13417 * config/nds32/pipelines.md: Include e8 settings.
13419 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13420 Chung-Ju Wu <jasonwucj@gmail.com>
13422 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13423 * config/nds32/nds32-n8.md: New file.
13424 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13425 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13427 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13428 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13429 * config/nds32/nds32.md (pipeline_model): Add n8.
13430 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13431 * config/nds32/pipelines.md: Include n8 settings.
13433 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13434 Chung-Ju Wu <jasonwucj@gmail.com>
13436 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13437 * config/nds32/nds32-n9-2r1w.md: New file.
13438 * config/nds32/nds32-n9-3r2w.md: New file.
13439 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13440 nds32_register_ports): New or modify for cpu n9.
13441 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13443 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13444 * config/nds32/nds32-utils.c: New file.
13445 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13446 TARGET_MUL_SLOW): Define.
13447 * config/nds32/nds32.md (pipeline_model): New attribute.
13448 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13449 New options that support cpu n9.
13450 * config/nds32/pipelines.md: Include n9 settings.
13451 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13453 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13455 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13456 information if necessary.
13457 (output_cond_branch_compare_zero): Likewise.
13458 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13459 (nds32_target_alignment): Refine for alignment.
13460 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13461 (FUNCTION_BOUNDARY): Modify.
13462 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13464 * config/nds32/nds32.opt (malways-align, malign-functions): New.
13466 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13468 * config/nds32/constants.md (unspec_volatile_element): Add values for
13469 TLB operation and data prefetch.
13470 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13471 functions for TLB operation and data prefetch.
13472 * config/nds32/nds32-intrinsic.md: Likewise.
13473 * config/nds32/nds32_intrinsic.h: Likewise.
13474 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13475 (nds32_print_operand): Likewise.
13476 * config/nds32/nds32.h (nds32_builtins): Likewise.
13478 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
13479 Andrew Pinski <pinsika@gcc.gnu.org>
13481 PR middle-end/82976
13482 * match.pd: Use constant_boolean_node of correct type instead of
13483 boolean_true_node or boolean_false_node for simplifying
13484 pointer comparisons to zero.
13486 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13488 PR tree-optimization/80021
13489 * tree.c (verify_type_variant): Make error call in verify_variant_match
13490 translatable and remove final full stop.
13492 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13494 * config/nds32/constants.md (unspec_volatile_element): Add
13495 UNSPEC_VOLATILE_EH_RETURN.
13496 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13497 nds32_output_stack_pop): Support dwarf exception handling process.
13498 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13499 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13500 exception handling process.
13501 (nds32_compute_stack_frame): Likewise.
13502 (nds32_return_addr_rtx): Likewise.
13503 (nds32_initial_elimination_offset): Likewise.
13504 (nds32_expand_prologue): Likewise.
13505 (nds32_expand_epilogue): Likewise.
13506 (nds32_dynamic_chain_address): New function.
13507 * config/nds32/nds32.h (machine_function): Add fields for dwarf
13508 exception handling.
13509 (DYNAMIC_CHAIN_ADDRESS): Define.
13510 (EH_RETURN_DATA_REGNO): Define.
13511 (EH_RETURN_STACKADJ_RTX): Define.
13512 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13513 patterns for dwarf exception handling.
13515 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13517 * config/nds32/nds32.h: Clean up obsolete macros.
13519 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13521 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13522 Add enum values for particular instructions.
13523 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13524 particular intrinsic functions.
13525 * config/nds32/nds32-intrinsic.md: Likewise.
13526 * config/nds32/nds32_intrinsic.h: Likewise.
13527 * config/nds32/nds32.h (nds32_builtins): Likewise.
13528 * config/nds32/nds32.md (type): Add pbsad and pbsada.
13529 (btst, ave): New patterns for particular instructions.
13531 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13533 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13534 Add enum values for atomic load/store and memory sync.
13535 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13537 * config/nds32/nds32-intrinsic.md: Likewise.
13538 * config/nds32/nds32_intrinsic.h: Likewise.
13539 * config/nds32/nds32.h (nds32_builtins): Likewise.
13541 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13543 PR tree-optimization/85257
13544 * fold-const.c (native_encode_vector): If not all elts could fit
13545 and off is -1, return 0 rather than offset.
13546 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13547 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13548 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
13549 adjust buffer in native_interpret_expr call.
13551 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13553 * config/nds32/constants.md (unspec_volatile_element): Add cache
13554 control enum values.
13555 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13556 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13557 * config/nds32/nds32.c (nds32_cctl_names): New.
13558 (nds32_print_operand): Handle cache control register names.
13559 * config/nds32/nds32.h (nds32_builtins): New enum values.
13560 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13562 * config/nds32/nds32.md (type): Add mmu.
13563 * config/nds32/pipelines.md (simple_insn): Add mmu.
13565 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13567 * config/nds32/nds32.md (type): Remove call.
13568 * config/nds32/pipelines.md (simple_insn): Likewise.
13570 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13572 * config/nds32/constants.md (unspec_volatile_element): Add
13573 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13574 UNSPEC_VOLATILE_FMFCFG.
13575 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13576 description for fmfcfg and fmfcsr.
13577 (bdesc_1arg): Add fmtcsr.
13578 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13579 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13580 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13581 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13582 unspec_fmfcfg): New patterns.
13583 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13584 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13585 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13586 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13587 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13588 __nds32__fmfcfg): Define.
13590 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13592 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13593 intrinsic register names.
13594 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13595 intrinsic register enum values and macros.
13597 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13599 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13600 for load/store addressing form.
13601 (nds32_print_operand_address): Likewise.
13603 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
13606 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13607 based on LABEL_REF. Remove useless assertion.
13608 (pic_address_needs_scratch): Fix formatting.
13609 (sparc_legitimize_pic_address): Minor tweaks.
13610 (sparc_delegitimize_address): Adjust assertion accordingly.
13611 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13612 into symbolic_operand.
13613 (movsi_high_pic_label_ref): Likewise.
13614 (movsi_lo_sum_pic_label_ref): Likewise.
13615 (movdi_pic_label_ref): Likewise.
13616 (movdi_high_pic_label_ref): Likewise.
13617 (movdi_lo_sum_pic_label_ref): Likewise.
13619 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
13621 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13622 custom LIB_SPEC setup.
13624 2018-04-06 Ruslan Bukin <br@bsdpad.com>
13625 Kito Cheng <kito.cheng@gmail.com>
13627 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13628 * config/riscv/freebsd.h: New.
13630 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13632 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13633 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13636 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13637 Kito Cheng <kito.cheng@gmail.com>
13639 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13640 nds32_output_call, nds32_symbol_binds_local_p): New functions.
13641 * config/nds32/nds32-protos.h (nds32_output_call,
13642 nds32_output_return): Declare.
13643 * config/nds32/nds32.md: Refine all the call and return patterns.
13645 2018-04-06 Jakub Jelinek <jakub@redhat.com>
13648 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13649 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13651 PR rtl-optimization/84872
13652 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13653 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13654 EDGE_CROSSING edge.
13656 2018-04-06 Tamar Christina <tamar.christina@arm.com>
13658 * expr.c (copy_blkmode_to_reg): Revert 254862.
13659 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13661 2018-04-06 Richard Biener <rguenther@suse.de>
13663 PR middle-end/85244
13664 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13665 after seeing a component reference with an adjacent field. Treat
13666 refs to arrays at struct end of external decls similar to
13667 refs to unconstrained commons.
13669 2018-04-06 Jakub Jelinek <jakub@redhat.com>
13672 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13673 look through SAVE_EXPRs with non-side-effects argument. Adjust
13675 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13678 2018-04-06 Richard Biener <rguenther@suse.de>
13680 PR middle-end/85180
13681 * alias.c (find_base_term): New wrapper around find_base_term
13682 unwinding CSELIB_VAL_PTR changes.
13683 (find_base_term): Do not restore CSELIB_VAL_PTR during the
13686 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13688 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13690 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13691 constant definitions.
13692 ("nop"): lr 0,0 -> nopr r0
13693 ("nop_lr0", "nop_lr1"): New insn definitions.
13695 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13697 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13698 NDS32_V3PUSH_AVAILABLE_P macro.
13700 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
13701 Chung-Ju Wu <jasonwucj@gmail.com>
13703 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13704 (nds32*-*-*): Add float and fpu_config into supported_defaults.
13705 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13706 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13707 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13708 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13709 * config/nds32/constraints.md: New constraints and checking for hard
13710 float configuration.
13711 * config/nds32/iterators.md: New mode iterator and attribute for hard
13712 float configuration.
13713 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13715 * config/nds32/nds32-fpu.md: New file.
13716 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13717 deal with hard float code generation.
13718 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13720 (abi_type, float_reg_number): New enum type.
13721 * config/nds32/nds32-predicates.c: New predicates for hard float.
13722 * config/nds32/nds32-protos.h: Declare functions for hard float.
13723 * config/nds32/nds32.c: Implementation for hard float configuration.
13724 * config/nds32/nds32.h: Definitions for hard float configuration.
13725 * config/nds32/nds32.md: Include hard float machine description and
13726 modify patterns for hard float configuration.
13727 * config/nds32/nds32.opt: New options for hard float configuration.
13728 * config/nds32/predicates.md: New predicates for hard float
13731 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13733 * common/config/nds32/nds32-common.c
13734 (nds32_option_optimization_table): Enable -mreleax-hint by default.
13736 2018-04-05 Jakub Jelinek <jakub@redhat.com>
13738 PR middle-end/85195
13739 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13740 CONSTRUCTOR_ELT (ctor, ...)->value.
13742 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
13745 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13747 2018-04-05 Tom de Vries <tom@codesourcery.com>
13750 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13753 2018-04-05 Shiva Chen <shiva0217@gmail.com>
13754 Kito Cheng <kito.cheng@gmail.com>
13756 * config/nds32/constraints.md (U33): Fine-tune checking condition.
13757 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13758 * config/nds32/nds32.h (nds32_16bit_address_type): Add
13759 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13761 2018-04-05 Shiva Chen <shiva0217@gmail.com>
13762 Kito Cheng <kito.cheng@gmail.com>
13764 * config/nds32/constraints.md (Ufe): New memory constraint.
13765 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13766 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13767 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13769 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13770 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13772 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13774 * config/nds32/nds32.md: Use optimize_size in the condition for
13775 alu-shift instructions.
13777 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13779 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13781 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13783 * config/nds32/nds32.md (negsi2): Refine pattern.
13785 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
13786 Chung-Ju Wu <jasonwucj@gmail.com>
13788 * config/nds32/iterators.md (shift_rotate): New code iterator.
13789 (shift): New code attribute.
13790 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13791 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13792 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13793 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13794 bit-wise operations.
13795 (andsi3, *andsi3): Ditto.
13796 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13797 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13798 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13799 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13800 nds32_ior_operand, nds32_xor_operand): New predicates.
13802 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13804 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13805 (addsi3, subsi3): ... this.
13807 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13809 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13811 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13813 * config/nds32/nds32.md: Adjust indention.
13815 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
13817 * config/nds32/nds32.md (feature): New attribute.
13819 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13821 * config/nds32/nds32.md (subtype): New attribute.
13823 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
13826 * config/arm/arm-builtins.c (arm_expand_builtin): Change
13827 expansion to perform a bitwise AND of the argument followed by a
13828 boolean negation of the result.
13830 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
13832 PR rtl-optimization/84878
13833 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13834 the basic block. Assert the use reference is not artificial and that
13835 it has an associated insn.
13837 2018-04-04 Michael Matz <matz@suse.de>
13839 * builtins.c (compute_objsize): Pass correct operand
13840 to array_at_struct_end_p.
13842 2018-04-04 Richard Biener <rguenther@suse.de>
13845 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13846 from contexts for DINFO_LEVEL_TERSE and below.
13848 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13850 * config/nds32/nds32-doubleword.md (move_<mode>): Require
13851 resiter_operand condition.
13852 * config/nds32/nds32.md (*move<mode>): Ditto.
13854 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13855 Monk Chiang <sh.chiang04@gmail.com>
13857 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13859 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13861 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13863 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13864 Kito Cheng <kito.cheng@gmail.com>
13866 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13867 nds32_cond_code_str, output_cond_branch,
13868 output_cond_branch_compare_zero, nds32_expand_cbranch,
13869 nds32_expand_cstore, nds32_expand_movcc,
13870 nds32_output_cbranchsi4_equality_zero,
13871 nds32_output_cbranchsi4_equality_reg,
13872 nds32_output_cbranchsi4_equality_reg_or_const_int,
13873 nds32_output_cbranchsi4_greater_less_zero: New functions.
13874 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13875 nds32_expand_cstore, nds32_expand_movcc,
13876 nds32_output_cbranchsi4_equality_zero,
13877 nds32_output_cbranchsi4_equality_reg,
13878 nds32_output_cbranchsi4_equality_reg_or_const_int,
13879 nds32_output_cbranchsi4_greater_less_zero): Declare.
13880 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13881 nds32_rimm11s_operand): New predicates.
13882 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13883 * config/nds32/nds32.md: Rewrite all the branch and conditional move
13886 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13888 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13889 * config/nds32/nds32.md: Ditto.
13890 * config/nds32/pipelines.md: Ditto.
13892 2018-04-04 Richard Biener <rguenther@suse.de>
13894 PR tree-optimization/85168
13895 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13896 propagating abnormals.
13898 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13900 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13902 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13903 Kito Cheng <kito.cheng@gmail.com>
13905 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13906 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13907 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13908 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13909 * config/nds32/nds32.md (sibcall_internal): New.
13910 (sibcall_register): Remove.
13911 (sibcall_immediate): Remove.
13912 (sibcall_value_internal): New.
13913 (sibcall_value_register): Remove.
13914 (sibcall_value_immediate): Remove.
13915 * config/nds32/predicates.md (nds32_general_register_operand): New.
13916 (nds32_call_address_operand): New.
13918 2018-04-03 Jakub Jelinek <jakub@redhat.com>
13920 PR rtl-optimization/85167
13921 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13922 bb_defs if *split_p, instead preinitialize it to NULL.
13924 PR tree-optimization/85156
13925 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13926 evaluating the argument multiple times.
13928 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
13930 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13932 (_mm_cvtpd_ps): Likewise.
13933 (_mm_cvttpd_epi32): Likewise.
13934 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13935 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13936 vector, pixel, and bool following altivec.h include.
13938 2018-04-03 Martin Sebor <msebor@redhat.com>
13940 * doc/extend.texi (Common Function Attributes): Clarify.
13941 (const attribute): Likewise.
13942 (pure attribute): Likewise.
13944 2018-04-03 Jakub Jelinek <jakub@redhat.com>
13947 * config/i386/i386.c (ix86_expand_vector_set): Use
13948 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
13950 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
13952 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13953 instructions when changing rounding bits to preserve precision bits
13954 in the x87 control word.
13956 2018-04-03 Martin Liska <mliska@suse.cz>
13958 PR tree-optimization/82491
13959 * rtl.h (strip_offset_and_add): Replace += suboffset with
13960 poly_uint64 () + suboffset.
13962 2018-03-29 Martin Liska <mliska@suse.cz>
13963 Martin Jambor <mjambor@suse.cz>
13966 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13967 param_type is not an integral or pointer type.
13969 2018-04-03 Richard Biener <rguenther@suse.de>
13971 * sese.h (recompute_all_dominators): Remove.
13973 2018-04-02 Martin Sebor <msebor@redhat.com>
13975 * doc/invoke.texi (-Wrestrict): Fix typos.
13977 2018-04-02 Jim Wilson <jimw@sifive.com>
13979 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13980 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13981 (<optab>di3, <optab>si3_extend): Likewise.
13982 (<optab>si3_mask, <optab>si3_mask_1): New.
13983 (<optab>di3_mask, <optab>di3_mask_1): New.
13984 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13985 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13986 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13988 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
13990 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13993 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
13995 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13996 (nds32_canonicalize_comparison): New function.
13998 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13999 Kito Cheng <kito.cheng@gmail.com>
14000 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14002 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14003 * config/nds32/constants.md (unspec_volatile_element): Add
14004 UNSPEC_VOLATILE_RELAX_GROUP.
14005 * config/nds32/nds32-relax-opt.c: New file.
14006 * config/nds32/nds32-predicates.c
14007 (nds32_symbol_load_store_p): New function.
14008 * config/nds32/nds32-protos.h
14009 (nds32_symbol_load_store_p): Declare function.
14010 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14011 * config/nds32/nds32.c
14012 (nds32_register_pass): New function to register pass.
14013 (nds32_register_passes): New function to register passes.
14014 * config/nds32/nds32.md (relax_group): New pattern.
14015 * config/nds32/nds32.opt (mrelax-hint): New option.
14016 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14018 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14020 * config/nds32/t-nds32: Modify files dependency.
14022 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14024 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14025 (PROFILE_HOOK): Define its implementation.
14027 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14029 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14030 type and 32-bit size.
14032 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14034 PR middle-end/85090
14035 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14036 (V_128_256): New mode iterator.
14037 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14038 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14039 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14041 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14042 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14044 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14047 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14048 NaN inputs correctly.
14050 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14053 * config/rs6000/vsx.md (??r): New mode attribute.
14054 (*vsx_mov<mode>_64bit): Use it.
14055 (*vsx_mov<mode>_32bit): Likewise.
14057 2018-03-30 Martin Sebor <msebor@redhat.com>
14059 PR tree-optimization/84818
14060 * builtins.c (check_access): Use warning_n.
14062 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14065 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14067 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14070 2018-03-30 Julia Koval <julia.koval@intel.com>
14073 * x86-tune.def (movx, partial_reg_dependency): Enable for
14076 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14078 PR inline-asm/84985
14079 * lra-constraints.c (process_alt_operands): Move setting
14080 this_alternative_matches below.
14082 2018-03-29 Martin Liska <mliska@suse.cz>
14085 * doc/invoke.texi: Document how LTO works with debug info.
14086 Describe auto-load support of binutils. Mention 'x86-64'
14087 as valid option value of -march option.
14089 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14091 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14094 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14095 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14096 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14099 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14102 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14103 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14104 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14105 for RS6000_BTM_POWERPC64.
14106 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14107 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14108 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14111 (DIVDEU): Likewise.
14113 2018-03-28 Carl Love <cel@us.ibm.com>
14116 2017-09-27 Carl Love <cel@us.ibm.com>
14118 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14119 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14120 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14123 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14125 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14126 instead of __vector bool.
14127 (_mm_max_pu8): Likewise.
14128 (_mm_min_pi16): Likewise.
14130 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14133 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14134 (DIVWEUO): Likewise.
14135 (DIVDEO): Likewise.
14136 (DIVDEUO): Likewise.
14137 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14138 DIVWEUO and DIVDEUO.
14139 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14140 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14141 (div_extend): Likewise.
14142 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14144 (__builtin_divweuo): Likewise.
14145 (__builtin_divdeo): Likewise.
14146 (__builtin_divdeuo): Likewise.
14148 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14151 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14152 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14154 PR tree-optimization/82004
14155 * gimple-match-head.c (optimize_pow_to_exp): New function.
14156 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14157 Don't fold to exp if optimize_pow_to_exp is false.
14159 2018-03-28 Martin Liska <mliska@suse.cz>
14162 * calls.c (initialize_argument_information): Fix trailing space.
14163 * common.opt: Fix typo and provide better explanation for
14164 -fsanitize-coverage option.
14165 * config/i386/i386.opt: Fix typo.
14167 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14168 Martin Liska <mliska@suse.cz>
14171 * gimplify.c (asan_poison_variable): Don't do the check for
14172 gimplify_omp_ctxp here.
14173 (gimplify_decl_expr): Do it here.
14174 (gimplify_target_expr): Likewise.
14176 2018-03-28 Martin Liska <mliska@suse.cz>
14179 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14180 chkp_type_bounds_count if MPX is not enabled.
14182 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14184 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14186 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14189 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14190 function to create the function decl for complex long double
14191 multiply and divide for -mabi=ieeelongdouble.
14192 (init_float128_ieee): Call it.
14194 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
14197 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14198 -fcf-protection=branch -mibt.
14199 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14201 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14204 * config/arm/arm.c (arm_valid_symbolic_address): Handle
14205 arm_word_relocations.
14207 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
14210 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14211 extern array declarations.
14213 2018-03-27 Richard Biener <rguenther@suse.de>
14215 PR middle-end/84067
14216 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14217 explicit single_use checks.
14219 2018-03-27 Richard Biener <rguenther@suse.de>
14221 PR tree-optimization/85082
14222 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14225 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14227 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14228 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14229 Turn on fasynchronous-unwind-tables and funwind-tables.
14231 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
14234 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14235 (*bmi_blsr_<mode>_ccz): Ditto.
14237 2018-03-26 Tom de Vries <tom@codesourcery.com>
14239 PR tree-optimization/85063
14240 * omp-general.c (offloading_function_p): New function. Factor out
14242 * omp-offload.c (pass_omp_target_link::gate): ... here.
14243 * omp-general.h (offloading_function_p): Declare.
14244 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14245 with attribute omp declare target for offloading functions.
14247 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
14249 PR tree-optimization/84005
14250 * tree-data-ref.h (get_base_for_alignment): Declare.
14251 * tree-data-ref.c (get_base_for_alignment_1): New function.
14252 (get_base_for_alignment): Likewise.
14253 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14254 get_base_for_alignment to find a suitable base object, instead
14255 of always using drb->base_address.
14257 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14259 PR inline-asm/85022
14260 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14261 known size by default.
14263 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
14265 PR inline-asm/85030
14266 * lra-constraints.c (process_alt_operands): Don't match BLKmode
14267 and non BLKmode operands.
14269 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14272 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14273 Clean up attributes.
14275 2018-03-23 Richard Biener <rguenther@suse.de>
14278 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14279 we are going to emit early debug for LTO.
14281 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14283 PR inline-asm/85034
14284 * function.c (match_asm_constraints_1): Don't optimize if input
14285 doesn't satisfy general_operand predicate for output's mode.
14287 PR inline-asm/85022
14288 * alias.c (write_dependence_p): Don't require for x_canonicalized
14289 non-VOIDmode if x has VOIDmode.
14292 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14293 just don't try to optimize it rather than assert it never happens.
14295 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14297 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14298 macro expansions for definition of ST_INTERNAL_<mode> and
14299 LD_INTERNAL_<mode> builtins.
14300 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14302 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14304 (altivec_expand_st_builtin): Likewise.
14305 (altivec_expand_builtin): Remove calls to deleted functions.
14306 (rs6000_address_for_altivec): Delete this function.
14307 * config/rs6000/vector.md: Remove expands for
14308 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14310 2018-03-22 Sudakshina Das <sudi.das@arm.com>
14313 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14314 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14315 re-computing once computed.
14316 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14317 (arm_init_machine_status): Initialize
14318 machine->static_chain_stack_bytes.
14320 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14323 * doc/extend.texi: Add four new prototypes for vec_ld.
14324 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14325 definitions for more logical presentation.
14326 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14327 entries for V1TI variants of __builtin_altivec_ld builtin.
14328 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14329 handling of V1TI variant of LVX icode pattern.
14330 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14331 (rs6000_gimple_fold_builtin): Likewise.
14332 (altivec_init_builtins): Add code to define
14333 __builtin_altivec_lvx_v1ti function.
14335 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14337 PR inline-asm/84941
14338 * function.c (match_asm_constraints_1): Don't do the optimization
14339 if input isn't a REG, SUBREG, MEM or constant.
14341 2018-03-22 Tom de Vries <tom@codesourcery.com>
14343 PR tree-optimization/84956
14344 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14345 bb_has_abnormal_pred.
14347 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14350 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14351 DECL_INITIAL (decl) to decl at the end.
14352 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14353 adjust the comment.
14355 2018-03-21 Joseph Myers <joseph@codesourcery.com>
14357 * doc/extend.texi (__builtin_tgmath): Document when complex
14358 integer types are treated as _Complex _Float64.
14360 2018-03-21 Tom de Vries <tom@codesourcery.com>
14362 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14364 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14366 PR tree-optimization/84960
14367 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14368 if it is ENTRY block, move them into single succ of ENTRY in that case.
14370 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
14372 PR tree-optimization/84811
14373 * poly-int.h (poly_span_traits): Remove the T3 parameter and
14374 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14375 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14376 (known_subrange_p): Update accordingly. Cast each value involved
14377 in the size comparison, rather than casting the result of the
14380 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14382 PR tree-optimization/84982
14383 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14384 by flipping the least significant bit rather than all bits from
14385 bitpos to bitpos + bitsize - 1.
14387 2018-03-21 Nathan Sidwell <nathan@acm.org>
14389 * doc/extend.texi (Deprecated Features): Remove mention of
14390 long-deleted deprecations.
14392 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14395 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14396 * configure: Regenerate.
14398 2018-03-21 Tom de Vries <tom@codesourcery.com>
14400 PR tree-optimization/83126
14401 * tree-parloops.c (num_phis): New function.
14402 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14404 2018-03-21 Nathan Sidwell <nathan@acm.org>
14406 * doc/extend.texi (Deprecated Features): Update deprecated flags,
14407 mention anon-struct/union members and trailing attributes.
14409 2018-03-21 Bin Cheng <bin.cheng@arm.com>
14411 PR tree-optimization/84969
14412 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14413 builtin memset partitions if they set different rhs values.
14415 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14417 PR rtl-optimization/84989
14418 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14419 VEC_DUPLICATE with scalar result mode.
14421 2018-03-21 Martin Liska <mliska@suse.cz>
14424 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14425 not intended return statement.
14427 2018-03-21 Martin Liska <mliska@suse.cz>
14430 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14431 (chkp_find_bound_slots_1): Limit number of iterations.
14433 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
14436 * Minor grammar fixes for x86 options.
14438 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14441 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14442 holding REG_CFA_RESTORE notes, instead turn them into a USE.
14444 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
14447 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14448 (altivec_lvx_<mode>_1op): Likewise.
14449 (altivec_stvx_<mode>_2op): Likewise.
14450 (altivec_stvx_<mode>_1op): Likewise.
14451 (altivec_lvx_<VM2:mode>): New define_expand.
14452 (altivec_stvx_<VM2:mode>): Likewise.
14453 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14454 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14455 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14456 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14457 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14458 (rs6000_gen_lvx): Likewise.
14459 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14460 (altivec_expand_stv_builtin): Likewise.
14461 (altivec_expand_builtin): Likewise.
14462 * config/rs6000/vector.md: Likewise.
14464 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14467 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14470 2018-03-20 Richard Biener <rguenther@suse.de>
14473 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14474 sign-conversions as zero, fall back to standard scalar_stmt
14477 2018-03-20 Martin Liska <mliska@suse.cz>
14480 * predict.c (rebuild_frequencies): Handle case when we have
14481 PROFILE_ABSENT, but flag_guess_branch_prob is false.
14483 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14486 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14487 flag_section_anchors.
14488 * varasm.c (use_blocks_for_decl_p): Remove hack for
14489 dw2_force_const_mem.
14492 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14494 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
14495 be created, use lowpart_subreg of operands[0] rather than operands[0]
14497 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14498 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14499 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14500 and n constraint instead of aarch64_shift_imm_di and Usd.
14501 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14502 (*aarch64_<optab>_reg_minus<mode>3): ... this.
14504 2018-03-20 Sudakshina Das <sudi.das@arm.com>
14507 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14508 to favor GPR over NEON registers.
14509 (<shift>di3_neon): Likewise.
14511 2018-03-20 Tom de Vries <tom@codesourcery.com>
14514 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14515 (nvptx_process_pars): Emit bar.sync asap and alap.
14517 2018-03-20 Tom de Vries <tom@codesourcery.com>
14520 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14521 seen_label if seen_label is already set.
14523 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14526 * config/i386/i386.c (fold_builtin_cpu): For features above 31
14527 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14528 Use 1U instead of 1. Formatting fixes.
14531 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14532 instead of TREE_TYPE (s1) for the return value.
14534 2018-03-19 Jakub Jelinek <jakub@redhat.com>
14536 PR tree-optimization/84946
14537 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14538 bitsize + bitsize in poly_uint64 rather than poly_int64.
14541 * dwarf2asm.c: Include fold-const.c.
14542 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14543 of decl rather than decl itself.
14545 PR rtl-optimization/84643
14546 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14548 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
14551 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14552 calling assemble_variable.
14554 2018-03-19 Sudakshina Das <sudi.das@arm.com>
14557 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14558 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14560 2018-03-19 Jim Wilson <jimw@sifive.com>
14563 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14564 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14565 (riscv_first_stack_step): Likewise.
14566 (riscv_option_override): Use STACK_BOUNDARY instead of
14567 MIN_STACK_BOUNDARY.
14568 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14569 MIN_STACK_BOUNDARY.
14570 (BIGGEST_ALIGNMENT): Set to 128.
14571 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14572 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14575 2018-03-19 Richard Biener <rguenther@suse.de>
14577 PR tree-optimization/84933
14578 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14579 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14581 2018-03-19 Richard Biener <rguenther@suse.de>
14583 PR tree-optimization/84859
14584 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14585 (cond_if_else_store_replacement): Perform sinking operation on
14586 single-store BBs regardless of MAX_STORES_TO_SINK setting.
14587 Generalize what a BB with a single eligible store is.
14589 2018-03-19 Richard Biener <rguenther@suse.de>
14591 PR tree-optimization/84929
14592 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14593 chrec_is_positive against non-chrec arg.
14595 2018-03-19 Tamar Christina <tamar.christina@arm.com>
14598 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14600 2018-03-18 Martin Liska <mliska@suse.cz>
14602 PR rtl-optimization/84635
14603 * regrename.c (build_def_use): Use matches_mode only when
14606 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
14608 PR tree-optimization/84913
14609 * tree-vect-loop.c (vectorizable_reduction): Don't try to
14610 vectorize chains of COND_EXPRs.
14612 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14614 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14616 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14618 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14620 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14622 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14624 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14625 Kito Cheng <kito.cheng@gmail.com>
14627 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14628 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14629 (nds32_adjust_reg_alloc_order): New function.
14630 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14632 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
14634 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14635 nds32_print_operand, nds32_print_operand_address): Use
14636 HOST_WIDE_INT_PRINT_DEC instead.
14638 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14640 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14642 2018-03-17 Jakub Jelinek <jakub@redhat.com>
14645 * config/i386/i386.c (initial_ix86_tune_features,
14646 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14647 unsigned long long.
14648 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14649 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14650 rather than 1u << ix86_tune. Formatting fix.
14651 (ix86_option_override_internal): Change ix86_arch_mask from
14652 unsigned int to unsigned HOST_WIDE_INT, initialize to
14653 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14654 (ix86_function_specific_restore): Likewise.
14656 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14659 * postreload.c (reload_combine_recognize_pattern): Perform
14660 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14661 truncate_int_for_mode the result for the destination's mode.
14664 * hsa-gen.c (mem_type_for_type): Fix comment typo.
14665 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14667 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14670 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
14673 * lra-assigns.c (lra_split_hard_reg_for): Don't use
14674 regno_allocno_class_array and sorted_pseudos.
14675 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14676 insns where regno is used.
14678 2018-03-16 Martin Liska <mliska@suse.cz>
14681 * multiple_target.c (create_dispatcher_calls): Redirect
14682 reference in the symbol table.
14684 2018-03-16 Martin Liska <mliska@suse.cz>
14687 * multiple_target.c (create_dispatcher_calls): Redirect also
14690 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14694 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14695 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14696 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14698 2018-03-16 Julia Koval <julia.koval@intel.com>
14700 * doc/invoke.texi (Skylake Server): Add CLWB.
14701 Cannonlake): Remove CLWB.
14703 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14705 PR tree-optimization/84841
14706 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14708 (FLOAT_ONE_CONST_TYPE): Define.
14709 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14710 (sort_by_operand_rank): Put entries with higher constant_type last
14711 rather than first to match comments.
14713 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
14715 * config/nios2/nios2.md (movsi_internal): Fix thinko in
14718 2018-03-15 Jakub Jelinek <jakub@redhat.com>
14721 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14722 check and use address of target always.
14724 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
14727 * config/i386/i386.c (indirect_thunk_needed): Update comments.
14728 (indirect_thunk_bnd_needed): Likewise.
14729 (indirect_thunks_used): Likewise.
14730 (indirect_thunks_bnd_used): Likewise.
14731 (indirect_return_needed): New.
14732 (indirect_return_bnd_needed): Likewise.
14733 (output_indirect_thunk_function): Add a bool argument for
14735 (output_indirect_thunk_function): Don't generate alias for
14736 function return thunk.
14737 (ix86_code_end): Call output_indirect_thunk_function to generate
14738 function return thunks.
14739 (ix86_output_function_return): Set indirect_return_bnd_needed
14740 and indirect_return_needed instead of indirect_thunk_bnd_needed
14741 and indirect_thunk_needed.
14743 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
14745 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14746 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14747 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14749 2018-03-15 David Malcolm <dmalcolm@redhat.com>
14750 Paul Hua <paul.hua.gm@gmail.com>
14753 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14755 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
14757 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14758 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14759 resp. SFmode cases.
14761 2018-03-15 Tamar Christina <tamar.christina@arm.com>
14764 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14765 instead of GET_MODE_SIZE when comparing Units.
14767 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14770 * varasm.c (hash_section): Return an unchangeble hash value
14771 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14772 Return !aarch64_can_use_per_function_literal_pools_p ().
14774 2018-03-15 Jakub Jelinek <jakub@redhat.com>
14777 * optabs.c (emit_conditional_move): Pass address of cmode's copy
14778 rather than address of cmode as last argument to prepare_cmp_insn.
14780 2018-03-15 Julia Koval <julia.koval@intel.com>
14782 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14783 F_AVX512VNNI, F_AVX512BITALG): New.
14785 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
14788 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
14789 insn for floating-point loads and stores.
14791 2018-03-14 Carl Love <cel@us.ibm.com>
14793 * config/rs6000/rs6000-c.c: Add macro definitions for
14794 ALTIVEC_BUILTIN_VEC_PERMXOR.
14795 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14796 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14797 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14798 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14800 * config/doc/extend.texi: Add prototypes for vec_permxor.
14802 2018-03-14 David Malcolm <dmalcolm@redhat.com>
14805 * diagnostic-show-locus.c (class layout_point): Convert m_line
14806 from int to linenum_type.
14807 (line_span::comparator): Use linenum "compare" function when
14808 comparing line numbers.
14809 (test_line_span): New function.
14810 (layout_range::contains_point): Convert param "row" from int to
14812 (layout_range::intersects_line_p): Likewise.
14813 (layout::will_show_line_p): Likewise.
14814 (layout::print_source_line): Likewise.
14815 (layout::should_print_annotation_line_p): Likewise.
14816 (layout::print_annotation_line): Likewise.
14817 (layout::print_leading_fixits): Likewise.
14818 (layout::annotation_line_showed_range_p): Likewise.
14819 (struct line_corrections): Likewise for field m_row.
14820 (line_corrections::line_corrections): Likewise for param "row".
14821 (layout::print_trailing_fixits): Likewise.
14822 (layout::get_state_at_point): Likewise.
14823 (layout::get_x_bound_for_row): Likewise.
14824 (layout::print_line): Likewise.
14825 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14826 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14827 * input.c (selftest::test_linenum_comparisons): New function.
14828 (selftest::input_c_tests): Call it.
14829 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14830 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14831 * selftest.h (ASSERT_GT): New macro.
14832 (ASSERT_GT_AT): New macro.
14833 (ASSERT_LT): New macro.
14834 (ASSERT_LT_AT): New macro.
14836 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
14838 PR rtl-optimization/84780
14839 * combine.c (distribute_links): Don't make a link based on pc_rtx.
14841 2018-03-14 Martin Liska <mliska@suse.cz>
14843 * tree.c (record_node_allocation_statistics): Use
14844 get_stats_node_kind.
14845 (get_stats_node_kind): New function extracted from
14846 record_node_allocation_statistics.
14847 (free_node): Use get_stats_node_kind.
14849 2018-03-14 Richard Biener <rguenther@suse.de>
14851 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14852 that the value-set of ANTIC_IN doesn't grow.
14855 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14857 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14858 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14860 2018-03-14 Julia Koval <julia.koval@intel.com>
14862 * config.gcc (icelake-client, icelake-server): New.
14864 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14865 (initial_ix86_arch_features): Ditto.
14866 (PTA_SKYLAKE): Add SGX.
14867 (PTA_ICELAKE): Remove.
14868 (PTA_ICELAKE_CLIENT): New.
14869 (PTA_ICELAKE_SERVER): New.
14870 (ix86_option_override_internal): Split up icelake on icelake client and
14872 (get_builtin_code_for_version): Ditto.
14873 (fold_builtin_cpu): Ditto.
14874 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14875 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14876 * config/i386/i386.h (processor_type): Ditto.
14877 * doc/invoke.texi: Ditto.
14879 2018-03-14 Jakub Jelinek <jakub@redhat.com>
14882 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14883 INTEGER_CST offset, add it together with bitpos / 8 and
14884 sign extend based on POINTER_SIZE.
14888 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
14891 * config/i386/constraints.md (Yc): New register constraint.
14892 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14893 Use Yc constraint for alternative 2 of operand 0. Remove
14894 preferred_for_speed attribute.
14896 2018-03-14 Richard Biener <rguenther@suse.de>
14898 PR tree-optimization/84830
14899 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14900 with the old one to avoid oscillations.
14902 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
14905 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14907 (assign_by_spills): Return a flag of reload assignment failure.
14908 Do not process the reload assignment failures. Do not spill other
14909 reload pseudos if they has the same reg class. Update n if
14911 (lra_assign): Add a return arg. Set up from the result of
14912 assign_by_spills call.
14913 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14914 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14915 usage_insns if it is not NULL.
14916 (spill_hard_reg_in_range): New function.
14917 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14918 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14919 function prototypes.
14920 (lra_assign): Change prototype.
14921 * lra.c (lra): Add code to deal with fails by splitting hard reg
14924 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
14926 * config/riscv/riscv.opt (mrelax): New option.
14927 * config/riscv/riscv.c (riscv_file_start): Emit ".option
14928 "norelax" when riscv_mrelax is disabled.
14929 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14931 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14934 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14935 reassociation for int modes.
14937 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14939 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14940 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14942 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14943 * config/aarch64/aarch64-sve.md
14944 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14945 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14946 (*extend<mode><Vwide>2): Rename to...
14947 (aarch64_sve_extend<mode><Vwide>2): ...this.
14948 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14949 renaming the old pattern to...
14950 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
14952 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14953 define_expand, renaming the old pattern to...
14954 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14955 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14956 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14957 account when deciding which SVE instruction the optab should use.
14958 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14960 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14962 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14963 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14964 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14965 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14966 (tlsdesc_small_<mode>): Turn a define_expand and use
14967 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
14968 (tlsdesc_small_advsimd_<mode>): ...this.
14969 (tlsdesc_small_sve_<mode>): New pattern.
14971 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14973 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14974 (UNSPEC_UMUL_HIGHPART): New constants.
14975 (MUL_HIGHPART): New int iteraor.
14976 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14977 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14979 (*<su>mul<mode>3_highpart): New define_insn.
14981 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14984 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14987 2018-03-13 Martin Liska <mliska@suse.cz>
14990 * (sem_item_optimizer::sem_item_optimizer): Initialize new
14992 (sem_item_optimizer::~sem_item_optimizer): Release it.
14993 (sem_item_optimizer::merge_classes): Register variable aliases.
14994 (sem_item_optimizer::fixup_pt_set): New function.
14995 (sem_item_optimizer::fixup_points_to_sets): Likewise.
14996 * ipa-icf.h: Declare new variables and functions.
14998 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15000 PR middle-end/84834
15001 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15002 integer_pow2p@2 and test integer_pow2p in condition.
15003 (A < 0 ? C : 0): Similarly for @1.
15005 PR middle-end/84831
15006 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15007 characters starting at p contain '\0' character, don't look beyond
15011 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15012 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15015 * reg-stack.c (change_stack): Change update_end var from int to
15016 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15017 also call set_block_for_insn on the newly added insns and rescan.
15020 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15021 on the last operand.
15024 * tree.c (stabilize_reference_1): Return save_expr (e) for
15025 STATEMENT_LIST even if it doesn't have side-effects.
15027 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15029 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15031 2018-03-12 Renlin Li <renlin.li@arm.com>
15033 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15034 aarch64_output_scalar_simd_mov_immediate.
15036 2018-03-12 Martin Sebor <msebor@redhat.com>
15038 PR tree-optimization/83456
15039 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15040 for perfectly overlapping calls to memcpy.
15041 (gimple_fold_builtin_memory_chk): Same.
15042 (gimple_fold_builtin_strcpy): Handle no-warning.
15043 (gimple_fold_builtin_stxcpy_chk): Same.
15044 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15046 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15048 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15049 parameter. Use it for SFmode.
15050 (rs6000_function_arg_advance_1): Adjust.
15051 (rs6000_function_arg): Adjust.
15052 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15054 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15056 PR rtl-optimization/84169
15057 PR rtl-optimization/84780
15058 * combine.c (can_combine_p): Check for a 2-insn combination whether
15059 the destination register is used between the two insns, too.
15061 2018-03-12 Richard Biener <rguenther@suse.de>
15063 PR tree-optimization/84803
15064 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15065 for refs DR analysis didn't process.
15067 2018-03-12 Richard Biener <rguenther@suse.de>
15069 PR tree-optimization/84777
15070 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15071 force-vectorize loops ignore whether we are optimizing for size.
15073 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15075 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15076 (TARGET_MD_ASM_ADJUST): Define.
15078 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15079 Kito Cheng <kito.cheng@gmail.com>
15080 Chung-Ju Wu <jasonwucj@gmail.com>
15082 * config/nds32/nds32.c (nds32_compute_stack_frame,
15083 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15084 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15085 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15086 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15087 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15088 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15089 * config/nds32/nds32.md (prologue, epilogue): Use macro
15090 NDS32_V3PUSH_AVAILABLE_P to do checking.
15092 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15095 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15096 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15097 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15098 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15099 addition of most attributes on !orig_type_die or the attribute not
15100 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15102 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15103 Chung-Ju Wu <jasonwucj@gmail.com>
15105 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15106 __NDS32_VH__ macro.
15107 * config/nds32/nds32.opt (mvh): New option.
15109 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15110 Chung-Ju Wu <jasonwucj@gmail.com>
15112 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15114 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15115 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15118 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15119 Chung-Ju Wu <jasonwucj@gmail.com>
15121 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15123 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15124 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15126 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15127 Kito Cheng <kito.cheng@gmail.com>
15128 Chung-Ju Wu <jasonwucj@gmail.com>
15130 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15131 UNSPEC_FFMISM and UNSPEC_FLMISM.
15132 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15133 for ffb, ffmism and flmism.
15134 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15135 (unspec_ffmism): Ditto.
15136 (unspec_flmism): Ditto.
15137 (nds32_expand_builtin_impl): Check if string extension is available.
15138 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15139 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15141 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15144 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15147 * lra-assigns.c (assign_by_spills): Return a flag of reload
15148 assignment failure. Do not process the reload assignment
15149 failures. Do not spill other reload pseudos if they has the same
15151 (lra_assign): Add a return arg. Set up from the result of
15152 assign_by_spills call.
15153 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15154 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15155 usage_insns if it is not NULL.
15156 (spill_hard_reg_in_range): New function.
15157 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15158 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15159 function prototypes.
15160 (lra_assign): Change prototype.
15161 * lra.c (lra): Add code to deal with fails by splitting hard reg
15164 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15167 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15169 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15172 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15173 (dw_val_node): Add val_symbolic_view.
15174 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15175 (symview_upper_bound): New.
15176 (new_line_info_table): Initialize symviews_since_reset.
15177 (dwarf2out_source_line): Count symviews_since_reset and set
15178 symview_upper_bound.
15179 (dw_val_equal_p): Handle symview.
15180 (add_AT_symview): New.
15181 (print_dw_val): Handle symview.
15182 (attr_checksum, attr_checksum_ordered): Likewise.
15183 (same_dw_val_p, size_of_die): Likewise.
15184 (value_format, output_die): Likewise.
15185 (add_high_low_attributes): Use add_AT_symview for entry_view.
15186 (dwarf2out_finish): Reset symview_upper_bound, clear
15189 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15192 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15193 Add strict argument and use it.
15194 (rs6000_split_multireg_move): Update for new strict argument.
15195 (mem_operand_gpr): Disallow all non-offsettable addresses.
15196 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15198 2018-03-09 Jakub Jelinek <jakub@redhat.com>
15201 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15202 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15203 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15206 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15207 decl, use remap_type if we want to use the type.
15209 2018-03-09 Martin Sebor <msebor@redhat.com>
15211 PR tree-optimization/84526
15212 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15214 (builtin_access::generic_overlap): Be prepared to handle non-array
15217 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
15219 PR rtl-optimization/84682
15220 * lra-constraints.c (process_address_1): Check is_address flag
15221 for address constraints.
15222 (process_alt_operands): Likewise.
15223 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15224 preprocess_constraints.
15225 * recog.h (preprocess_constraints): Add oploc parameter.
15227 * recog.c (preprocess_constraints): Test address_operand for
15228 CT_ADDRESS constraints.
15230 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15233 * lra-assigns.c (assign_by_spills): Return a flag of reload
15234 assignment failure. Do not process the reload assignment
15235 failures. Do not spill other reload pseudos if they has the same
15237 (lra_assign): Add a return arg. Set up from the result of
15238 assign_by_spills call.
15239 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15240 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15241 usage_insns if it is not NULL.
15242 (spill_hard_reg_in_range): New function.
15243 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15244 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15245 function prototypes.
15246 (lra_assign): Change prototype.
15247 * lra.c (lra): Add code to deal with fails by splitting hard reg
15250 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15253 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15254 Accept complain bool parameter. Only emit errors if it is true.
15255 (arm_parse_cpu_option_name): Likewise.
15256 (arm_target_thumb_only): Adjust callers of the above.
15257 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15258 prototype to take a default true bool parameter.
15259 (arm_parse_arch_option_name): Likewise.
15261 2018-03-09 David Malcolm <dmalcolm@redhat.com>
15262 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
15266 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15267 * configure: Regenerate.
15268 * configure.ac ("linker --version-script option"): New.
15269 ("linker soname option"): New.
15271 2018-03-09 Richard Biener <rguenther@suse.de>
15273 PR tree-optimization/84775
15274 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15275 immediate uses of predicate stmts and mark them modified.
15278 PR tree-optimization/84178
15279 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15281 (version_loop_for_if_conversion): Delay update_ssa call.
15282 (tree_if_conversion): Delay update_ssa until after predicate
15285 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
15288 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15289 when the function accesses prior frames.
15291 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15294 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15295 gen_llsym, otherwise call maybe_gen_llsym.
15297 PR inline-asm/84742
15298 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15299 has ',' character inside of it.
15301 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15304 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15305 as clobbering CC_REGNUM.
15307 2018-03-08 Richard Biener <rguenther@suse.de>
15309 PR middle-end/84552
15310 * tree-scalar-evolution.c: Include tree-into-ssa.h.
15311 (follow_copies_to_constant): Do not follow SSA names registered
15314 2018-03-08 Richard Biener <rguenther@suse.de>
15316 PR tree-optimization/84178
15317 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15319 (version_loop_for_if_conversion): Delay update_ssa call.
15320 (tree_if_conversion): Delay update_ssa until after predicate
15323 2018-03-08 David Malcolm <dmalcolm@redhat.com>
15325 PR tree-optimization/84178
15326 * tree-if-conv.c (release_bb_predicate): Remove the
15327 the assertion that the stmts have NULL use_ops.
15328 Discard the statements, asserting that they haven't
15329 yet been added to a BB.
15331 2018-03-08 Richard Biener <rguenther@suse.de>
15333 PR tree-optimization/84746
15334 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15335 (phi_translate): Pass in destination ANTIC_OUT set.
15336 (phi_translate_1): Likewise. For a simplified result lookup
15337 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15338 (phi_translate_set): Adjust.
15339 (do_pre_regular_insertion): Likewise.
15340 (do_pre_partial_partial_insertion): Likewise.
15342 2018-03-08 Martin Liska <mliska@suse.cz>
15344 PR gcov-profile/84735
15345 * doc/gcov.texi: Document usage of profile files.
15346 * gcov-io.h: Document changes in the format.
15348 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
15352 * dwarf2out.c (struct dw_line_info_table): Update comments for
15354 (FORCE_RESET_NEXT_VIEW): New.
15355 (FORCE_RESETTING_VIEW_P): New.
15356 (RESETTING_VIEW_P): Check for -1 too.
15357 (ZERO_VIEW_P): Likewise.
15358 (new_line_info_table): Force-reset next view.
15359 (dwarf2out_begin_function): Likewise.
15360 (dwarf2out_source_line): Simplify zero_view_p initialization.
15361 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15362 view directly. Omit view when omitting .loc at line 0.
15364 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15366 PR tree-optimization/84740
15367 * tree-switch-conversion.c (process_switch): Call build_constructors
15368 only if info.phi_count is non-zero.
15370 PR tree-optimization/84739
15371 * tree-tailcall.c (find_tail_calls): Check call arguments against
15372 DECL_ARGUMENTS (current_function_decl) rather than
15373 DECL_ARGUMENTS (func) when checking for tail recursion.
15375 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15377 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15378 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15379 Volker Reichelt's entry and add entries for people that perform
15380 GCC fuzzy testing and report numerous bugs.
15382 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
15385 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15386 readonly data in sdata, if that is disabled.
15387 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15388 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15389 -mreadonly-in-sdata option.
15391 2018-03-07 Martin Sebor <msebor@redhat.com>
15393 PR tree-optimization/84468
15394 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15395 basic block when looking for nul assignment.
15397 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
15400 * except.h (output_function_exception_table): Adjust prototype.
15401 * except.c (output_function_exception_table): Remove FNNAME parameter
15402 and add SECTION parameter. Ouput one part of the table at a time.
15403 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15404 the first part of the exception table and emit unwind directives.
15405 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15406 (i386_pe_seh_cold_init): Likewise.
15407 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15408 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15409 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15410 (ix86_output_call_insn): Emit a nop in one more case for SEH.
15411 * config/i386/winnt.c: Include except.h.
15412 (struct seh_frame_state): Add reg_offset, after_prologue and
15413 in_cold_section fields.
15414 (i386_pe_seh_end_prologue): Set seh->after_prologue.
15415 (i386_pe_seh_cold_init): New function.
15416 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15417 to seh->in_cold_section.
15418 (seh_emit_push): Record the offset of the push.
15419 (seh_emit_save): Record the offet of the save.
15420 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15421 Test seh->after_prologue to disregard the epilogue.
15422 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15423 (i386_pe_end_cold_function): New function.
15425 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15428 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15429 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15432 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15434 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15435 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15437 PR middle-end/84723
15438 * multiple_target.c: Include tree-inline.h and intl.h.
15439 (expand_target_clones): Diagnose and fail if node->definition and
15440 !tree_versionable_function_p (node->decl).
15442 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
15444 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15446 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15447 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15448 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15450 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15453 * combine.c (try_combine): Use reg_or_subregno instead of handling
15454 just paradoxical SUBREGs and REGs.
15456 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
15458 * config/arc/arc.c (arc_finalize_pic): Remove function.
15459 (arc_must_save_register): We use single base PIC register, remove
15460 checks to save/restore the PIC register.
15461 (arc_expand_prologue): Likewise.
15462 * config/arc/arc-protos.h (arc_set_default_type_attributes):
15464 (arc_verify_short): Likewise.
15465 (arc_attr_type): Likewise.
15466 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15467 (walk_stores): Likewise.
15468 (arc_address_cost): Make it static.
15469 (arc_verify_short): Likewise.
15470 (branch_dest): Likewise.
15471 (arc_attr_type): Likewise.
15472 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15473 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15474 (arc_final_prescan_insn): Remove inserting the nops due to
15475 hardware hazards. It is done in reorg step.
15476 (insn_length_variant_t): Remove.
15477 (insn_length_parameters_t): Likewise.
15478 (arc_insn_length_parameters): Likewise.
15479 (arc_get_insn_variants): Likewise.
15480 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15482 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15484 PR inline-asm/84683
15485 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15488 PR tree-optimization/84687
15489 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15491 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15493 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15495 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15496 Rename to ppc_speculation_barrier.
15497 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15498 __builtin_ppc_speculation_barrier.
15500 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15503 * combine.c (combine_simplify_rtx): Don't try to simplify if
15504 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15507 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
15509 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15510 to 32 bytes when compiling for POWER9.
15512 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15515 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15516 regparm >= 3 with no arg reg available also for calls with
15517 flag_force_indirect_call. Pass decl to ix86_function_regparm.
15520 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15522 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
15524 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
15527 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15529 2018-03-05 Richard Biener <rguenther@suse.de>
15531 PR tree-optimization/84486
15532 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15533 When inserting a __builtin_assume_aligned call set the LHS
15534 SSA name alignment info accordingly.
15536 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
15538 PR tree-optimization/84114
15539 * config/aarch64/aarch64.c (aarch64_reassociation_width)
15540 Avoid reassociation of FLOAT_MODE addition.
15542 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
15544 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15545 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15546 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15547 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15548 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15549 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15550 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15552 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15553 __builtin_ia32_wbinvd): New builtins.
15554 (SPECIAL_ARGS2): New.
15555 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15556 (SPECIAL_ARGS2): New.
15557 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15558 (ix86_valid_target_attribute_inner_p): Ditto.
15559 (ix86_init_mmx_sse_builtins): Add special_args2.
15560 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15561 TARGET_WBNOINVD_P): New.
15562 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15563 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15564 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15565 * config/i386/immintrin.h (_wbinvd): New intrinsic.
15566 * config/i386/pconfigintrin.h: New file.
15567 * config/i386/wbnoinvdintrin.h: Ditto.
15568 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15570 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15572 2018-03-05 Richard Biener <rguenther@suse.de>
15574 PR tree-optimization/84670
15575 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15577 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15578 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15579 (compute_antic_aux): Only assert the number of values in ANTIC_IN
15580 doesn't grow if all successors (recursively) were visited at least
15583 2018-03-05 Richard Biener <rguenther@suse.de>
15585 PR tree-optimization/84650
15586 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15587 if executed in the loop pipeline.
15589 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
15591 * doc/configfiles.texi (Configuration Files): Move info about
15592 conditionalizing $target-protos.h to...
15593 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
15594 differs from $target-protos.h.
15596 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
15597 Chung-Ju Wu <jasonwucj@gmail.com>
15599 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15600 * config/nds32/nds32-multiple.md (setmemsi): Define.
15601 * config/nds32/nds32-memory-manipulation.c
15602 (nds32_gen_dup_4_byte_to_word_value): New.
15603 (emit_setmem_word_loop): New.
15604 (emit_setmem_byte_loop): New.
15605 (nds32_expand_setmem_loop): New.
15606 (nds32_expand_setmem_loop_v3m): New.
15607 (nds32_expand_setmem_unroll): New.
15608 (nds32_expand_setmem): New.
15610 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15611 Chung-Ju Wu <jasonwucj@gmail.com>
15613 * config/nds32/nds32-memory-manipulation.c
15614 (nds32_emit_load_store): New.
15615 (nds32_emit_post_inc_load_store): New.
15616 (nds32_emit_mem_move): New.
15617 (nds32_emit_mem_move_block): New.
15618 (nds32_expand_movmemsi_loop_unknown_size): New.
15619 (nds32_expand_movmemsi_loop_known_size): New.
15620 (nds32_expand_movmemsi_loop): New.
15621 (nds32_expand_movmemsi_unroll): New.
15622 (nds32_expand_movmemqi): Rename ...
15623 (nds32_expand_movmemsi): ... to this.
15624 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15625 (movmemsi): ... to this.
15626 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15627 (nds32_expand_movmemsi): ... to this.
15629 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15630 Monk Chiang <sh.chiang04@gmail.com>
15631 Chung-Ju Wu <jasonwucj@gmail.com>
15633 * config/nds32/nds32-protos.h
15634 (nds32_expand_load_multiple): New arguments.
15635 (nds32_expand_store_multiple): Ditto.
15636 (nds32_valid_multiple_load_store): Rename ...
15637 (nds32_valid_multiple_load_store_p): ... to this.
15638 * config/nds32/nds32-memory-manipulation.c
15639 (nds32_expand_load_multiple): Refine implementation.
15640 (nds32_expand_store_multiple): Ditto.
15641 * config/nds32/nds32-multiple.md
15642 (load_multiple): Update nds32_expand_load_multiple interface.
15643 (store_multiple): Update nds32_expand_store_multiple interface.
15644 * config/nds32/nds32-predicates.c
15645 (nds32_valid_multiple_load_store): Rename ...
15646 (nds32_valid_multiple_load_store_p): ... to this and refine
15648 * config/nds32/predicates.md
15649 (nds32_load_multiple_and_update_address_operation): New predicate.
15650 (nds32_store_multiple_and_update_address_operation): New predicate.
15652 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15653 Chung-Ju Wu <jasonwucj@gmail.com>
15655 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15656 (combo): New attribute.
15657 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15659 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
15661 * config/nds32/nds32.opt: Change -mcmodel= default value.
15663 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
15664 Monk Chiang <sh.chiang04@gmail.com>
15665 Chung-Ju Wu <jasonwucj@gmail.com>
15667 * config/nds32/constants.md (unspec_element): New enum.
15668 * config/nds32/constraints.md (Umw): New constraint.
15669 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15670 * config/nds32/nds32-intrinsic.md: Likewise.
15671 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15672 (nds32_valid_smw_lwm_base_p): New.
15673 (nds32_output_smw_single_word): New.
15674 (nds32_output_lmw_single_word): New.
15675 (nds32_expand_unaligned_load): New.
15676 (nds32_expand_unaligned_store): New.
15677 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15678 (nds32_output_smw_single_word): Declare.
15679 (nds32_output_lmw_single_word): Declare.
15680 (nds32_expand_unaligned_load): Declare.
15681 (nds32_expand_unaligned_store): Declare.
15682 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15683 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15684 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15685 NDS32_BUILTIN_UASTORE_DW.
15686 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15689 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
15690 Kito Cheng <kito.cheng@gmail.com>
15691 Chung-Ju Wu <jasonwucj@gmail.com>
15693 * config/nds32/nds32-intrinsic.c
15694 (nds32_expand_builtin_null_ftype_reg): Delete.
15695 (nds32_expand_builtin_reg_ftype_imm): Ditto.
15696 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15697 (nds32_read_argument): New.
15698 (nds32_legitimize_target): Ditto.
15699 (nds32_legitimize_argument): Ditto.
15700 (nds32_check_constant_argument): Ditto.
15701 (nds32_expand_unop_builtin): Ditto.
15702 (nds32_expand_unopimm_builtin): Ditto.
15703 (nds32_expand_binop_builtin): Ditto.
15704 (nds32_builtin_decl_impl): Ditto.
15705 (builtin_description): Ditto.
15706 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15707 (nds32_init_builtins_impl): Ditto.
15708 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15709 (nds32_builtin_decl): New.
15710 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15711 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15713 2018-03-02 Jeff Law <law@redhat.com>
15715 * reorg.c (stop_search_p): Handle DEBUG_INSN.
15716 (redundant_insn, fill_simple_delay_slots): Likewise.
15717 (fill_slots_from_thread): Likewise.
15718 * resource.c (mark_referenced_resources): Likewise.
15719 (mark_set_resources, find_dead_or_set_registers): Likewise.
15721 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15723 * substring-locations.h (format_warning_va): Formatting fix for
15724 ATTRIBUTE_GCC_DIAG.
15725 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15727 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15728 * substring-locations.c: Include intl.h.
15729 (format_warning_va): Turned into small wrapper around
15730 format_warning_n_va, renamed to ...
15731 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15732 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15734 (format_warning_at_substring_n): New function.
15735 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15736 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
15737 format_warning_at_substring with just a shorter name instead of
15738 const function pointer.
15739 (fmtwarn_n): New function.
15740 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15741 appropriate, get rid of all the fmtstr temporaries, move conditionals
15742 with G_() wrapped string literals directly into fmtwarn arguments,
15743 cast dir.len to (int), formatting fixes.
15745 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
15747 * doc/invoke.texi: Remove "Cilk Plus" references.
15749 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15750 Richard Biener <rguenther@suse.de>
15753 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15754 for error or warning attributes if CALL_FROM_THUNK_P is set.
15757 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15760 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15761 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15764 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15765 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15767 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15768 instead of -1U in last predictors element's probability member.
15770 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15773 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15774 arguments if they are comparable.
15776 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
15778 PR tree-optimization/84634
15779 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15780 masks and masked_loop_p with a single loop_masks, making sure it's
15781 null for bb vectorization.
15783 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
15785 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15786 (vect_analyze_data_ref_access): Use loop->safe_len rather than
15787 loop->force_vectorize to check whether there is no alias.
15789 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15792 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15794 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15796 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15797 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15798 instead of a loop around prev_real_insn.
15799 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15802 PR inline-asm/84625
15803 * config/i386/i386.c (ix86_print_operand): Use conditional
15804 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15807 2018-03-02 Richard Biener <rguenther@suse.de>
15809 PR tree-optimization/84427
15810 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15811 (bitmap_set_subtract_values): Rewrite to handle multiple
15814 (prune_clobbered_mems): Likewise.
15815 (phi_translate): Take edge instead of pred/phiblock.
15816 (phi_translate_1): Likewise.
15817 (phi_translate_set): Likewise. Insert all translated
15818 exprs for a value into the set, keeping possibly multiple
15819 expressions per value.
15820 (compute_antic_aux): Adjust for phi_translate changes.
15821 When intersecting union the expressions and prune those
15822 not in the final value set, keeping possibly multiple
15823 expressions per value. Do not use value-insertion
15824 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15825 all expressions. Add verification that the value-sets
15826 only shrink during iteration.
15827 (compute_partial_antic_aux): Adjust for the phi_translate changes.
15828 (do_pre_regular_insertion): Likewise.
15829 (do_pre_partial_partial_insertion): Likewise.
15831 2018-03-02 Richard Biener <rguenther@suse.de>
15834 * config/darwin.c (saved_debug_info_level): New static global.
15835 (darwin_asm_lto_start): Disable debug info generation for LTO out.
15836 (darwin_asm_lto_end): Restore debug info generation settings.
15838 2018-03-01 Martin Liska <mliska@suse.cz>
15841 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15842 volatile arguments.
15844 2018-03-01 Richard Biener <rguenther@suse.de>
15847 * dwarf2out.c (gen_variable_die): Properly handle late VLA
15848 type annotation with LTO when debug was disabled at compile-time.
15850 2018-03-01 Matthew Fortune <mfortune@gmail.com>
15852 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15854 (mips_final_postscan_insn): Likewise.
15856 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
15858 PR rtl-optimization/84528
15859 * alias.c (init_alias_target): Add commentary.
15860 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15861 a unique base value if the frame pointer is not eliminated
15862 to the stack pointer.
15864 2018-03-01 Tom de Vries <tom@codesourcery.com>
15866 PR rtl-optimization/83327
15867 * lra-int.h (hard_regs_spilled_into): Declare.
15868 * lra.c (hard_regs_spilled_into): Define.
15869 (init_reg_info): Init hard_regs_spilled_into.
15870 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15871 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15872 (process_bb_lives): Handle hard_regs_spilled_into.
15873 (lra_create_live_ranges_1): Before doing liveness propagation, clear
15874 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15876 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
15878 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15879 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15880 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15881 * config/rs6000/aix72.h: New file.
15883 2018-02-28 Jakub Jelinek <jakub@redhat.com>
15885 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15886 instead of warning_at with conditional singular and plural messages
15890 * stor-layout.c (update_alignment_for_field): For
15891 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15892 && !DECL_PACKED (field), do the alignment update, just use
15893 only desired_align instead of MAX (type_align, desired_align)
15895 (place_field): Don't do known_align < desired_align handling
15896 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15897 is non-NULL, instead do it after rli->prev_field handling and
15898 only if not within a bitfield word. For DECL_PACKED (field)
15899 use type_align of BITS_PER_UNIT.
15901 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
15903 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15904 superfluous parentheses and trailing spaces.
15906 2018-02-28 Richard Biener <rguenther@suse.de>
15908 PR tree-optimization/84584
15909 * graphite-scop-detection.c (scop_detection::add_scop): Discard
15910 SCoPs with fake exit edge.
15912 2018-02-28 Martin Liska <mliska@suse.cz>
15915 * timevar.c (timer::print): Fix format to properly print 100%
15918 2018-02-28 Richard Biener <rguenther@suse.de>
15920 PR middle-end/84607
15921 * genmatch.c (capture_info::walk_match): Do not mark
15922 captured expressions without operands as expr_p given
15923 they act more like predicates and should be subject to
15924 "lost tail" side-effect preserving.
15926 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
15928 PR rtl-optimization/81611
15929 * auto-inc-dec.c (attempt_change): Move dead note from
15930 mem_insn if it's the next use of regno
15931 (find_address): Take address use of reg holding
15932 non-incremented value. Add parm to limit search to the named
15934 (merge_in_block): Attempt to use a mem insn that is the next
15935 use of the original regno.
15937 2018-02-27 Martin Sebor <msebor@redhat.com>
15940 * doc/invoke.texi (-Wmissing-attributes): New option.
15941 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15943 2018-02-27 Martin Sebor <msebor@redhat.com>
15945 PR translation/84207
15946 * diagnostic-core.h (warning_n, error_n, inform_n): Change
15947 n argument to unsigned HOST_WIDE_INT.
15948 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15949 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
15950 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15951 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15953 2018-02-27 Richard Biener <rguenther@suse.de>
15955 PR tree-optimization/84512
15956 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15957 Do not use the estimate returned from record_stmt_cost for
15958 the scalar iteration cost but sum properly using add_stmt_cost.
15960 2018-02-27 Richard Biener <rguenther@suse.de>
15962 PR tree-optimization/84466
15963 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15964 Adjust last change to less strictly validate use operands.
15966 2018-02-27 Martin Liska <mliska@suse.cz>
15968 PR gcov-profile/84548
15969 * gcov.c (process_file): Allow partial overlap and consider it
15970 also as group functions.
15971 (output_lines): Properly calculate range of lines for a group.
15973 2018-02-27 Martin Liska <mliska@suse.cz>
15975 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15976 'ggc' suffixes. Change first column width.
15977 (timer::print): Fix formatting of the column.
15979 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
15981 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15982 preserve inline entry blocks for the sake of debug inline
15983 entry point markers alone.
15984 (remove_unused_locals): Suggest in comments a better place to
15985 force the preservation of inline entry blocks that are
15986 otherwise unused, but do not preserve them.
15988 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15990 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15992 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15995 * config/i386/constraints.md (Bs): Replace
15996 ix86_indirect_branch_register with
15997 TARGET_INDIRECT_BRANCH_REGISTER.
15999 * config/i386/i386.md (indirect_jump): Likewise.
16000 (tablejump): Likewise.
16001 (*sibcall_memory): Likewise.
16002 (*sibcall_value_memory): Likewise.
16003 Peepholes of indirect call and jump via memory: Likewise.
16004 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16005 (*sibcall_value_GOT_32): Likewise.
16006 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16007 (GOT_memory_operand): Likewise.
16008 (call_insn_operand): Likewise.
16009 (sibcall_insn_operand): Likewise.
16010 (GOT32_symbol_operand): Likewise.
16011 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16013 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16015 PR rtl-optimization/83496
16016 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16017 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16018 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16019 redundant insn, if any.
16020 (relax_delay_slots): Likewise.
16021 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16023 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16025 PR tree-optimization/83965
16026 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16027 that grouped statements are part of a reduction chain. Return
16028 true if the statement is not marked as a reduction itself but
16029 is part of a group.
16030 (vect_recog_dot_prod_pattern): Don't check whether the statement
16031 is part of a group here.
16032 (vect_recog_sad_pattern): Likewise.
16033 (vect_recog_widen_sum_pattern): Likewise.
16035 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16038 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16040 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16043 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16045 (ix86_output_indirect_function_return): New prototype.
16046 (ix86_split_simple_return_pop_internal): Likewise.
16047 * config/i386/i386.c (indirect_return_via_cx): New.
16048 (indirect_return_via_cx_bnd): Likewise.
16049 (indirect_thunk_name): Handle return va CX_REG.
16050 (output_indirect_thunk_function): Create alias for
16051 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16052 (ix86_output_indirect_jmp): Remove the bool argument.
16053 (ix86_output_indirect_function_return): New function.
16054 (ix86_split_simple_return_pop_internal): Likewise.
16055 * config/i386/i386.md (*indirect_jump): Don't pass false
16056 to ix86_output_indirect_jmp.
16057 (*tablejump_1): Likewise.
16058 (simple_return_pop_internal): Change it to define_insn_and_split.
16059 Call ix86_split_simple_return_pop_internal to split it for
16060 -mfunction-return=.
16061 (simple_return_indirect_internal): Call
16062 ix86_output_indirect_function_return instead of
16063 ix86_output_indirect_jmp.
16065 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16068 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16069 memset and value initialization afterwards.
16071 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16073 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16075 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16078 * common/config/aarch64/aarch64-common.c
16079 (aarch_option_optimization_table[]): Switch
16080 off fomit-frame-pointer
16082 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16083 Chung-Ju Wu <jasonwucj@gmail.com>
16085 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16087 (store_multiple): Ditto.
16089 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16091 * config.gcc: Add --with-cpu support for nds32 target.
16092 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16093 * config/nds32/nds32.opt: Add -mcpu= option.
16095 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16097 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16098 isel=yes): Warn for these deprecated options.
16100 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16102 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16103 ISA_2_5_MASKS_EMBEDDED.
16105 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16107 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16108 p->max as pointers rather than using iterative_hash_expr.
16110 2018-02-23 Carl Love <cel@us.ibm.com>
16112 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16113 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16115 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16116 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16117 P8V_BUILTIN_VEC_VUNSIGNED2.
16119 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16122 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16123 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16125 * lra-constraints.c (curr_insn_transform): Set up
16126 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16128 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16129 * lra-eliminations.c (spill_pseudos): Ditto.
16130 (process_insn_for_elimination): Ditto.
16131 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16132 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16133 LRA_NON_CLOBBERED_ALT.
16135 2018-02-22 Martin Sebor <msebor@redhat.com>
16137 PR tree-optimization/84480
16138 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16139 to maybe_diag_stxncpy_trunc. Call it.
16140 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16141 from gimple_fold_builtin_strcpy. Print inlining stack.
16142 (handle_builtin_stxncpy): Print inlining stack.
16143 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16145 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16148 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16149 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16150 and -fcheck-pointer-bounds are used together.
16151 (indirect_thunk_prefix): New enum.
16152 (indirect_thunk_need_prefix): New function.
16153 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16154 "_nt" instead of "_bnd" for NOTRACK prefix.
16155 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16156 (output_indirect_thunk_function): Likewise.
16158 (ix86_code_end): Update output_indirect_thunk_function calls.
16159 (ix86_output_indirect_branch_via_reg): Replace
16160 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16161 (ix86_output_indirect_branch_via_push): Likewise.
16162 (ix86_output_function_return): Likewise.
16163 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16164 incompatible with -fcf-protection=branch and
16165 -fcheck-pointer-bounds.
16167 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16170 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16171 Change gcc_assert call to output_operand_lossage.
16173 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16175 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16177 2018-02-22 DJ Delorie <dj@redhat.com>
16178 Sebastian Perta <sebastian.perta@renesas.com>
16179 Oleg Endo <olegendo@gcc.gnu.org>
16181 * config/rx/rx.c (rx_rtx_costs): New function.
16182 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16184 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16186 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16188 2018-02-22 Martin Liska <mliska@suse.cz>
16191 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16192 Add "native" as a possible value.
16194 2018-02-22 Martin Liska <mliska@suse.cz>
16197 * config/i386/i386.c (ix86_option_override_internal):
16198 Add "native" as a possible value for -march and -mtune.
16200 2018-02-22 Jakub Jelinek <jakub@redhat.com>
16203 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16204 to all type variants.
16206 PR tree-optimization/84503
16207 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16208 width as info->bitpos + info->bitsize - start.
16209 (merged_store_group::merge_overlapping): Simplify width computation.
16210 (check_no_overlap): New function.
16211 (imm_store_chain_info::try_coalesce_bswap): Compute expected
16212 start + width and last_order of the group, fail if check_no_overlap
16214 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16215 to group if check_no_overlap fails.
16217 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16219 * config/rs6000/altivec.md: Delete contraint arguments to
16220 define_expand, define_split, and define_peephole2, and in
16221 define_insn_and_split if always unused.
16222 * config/rs6000/darwin.md: Ditto.
16223 * config/rs6000/dfp.md: Ditto.
16224 * config/rs6000/rs6000.md: Ditto.
16225 * config/rs6000/sync.md: Ditto.
16226 * config/rs6000/vector.md: Ditto.
16227 * config/rs6000/vsx.md: Ditto.
16229 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16231 * config/rs6000/altivec.md: Write output control strings as braced
16232 blocks instead of double-quoted strings.
16233 * config/rs6000/darwin.md: Ditto.
16234 * config/rs6000/rs6000.md: Ditto.
16235 * config/rs6000/vector.md: Ditto.
16236 * config/rs6000/vsx.md: Ditto.
16238 2018-02-21 Jason Merrill <jason@redhat.com>
16240 PR c++/84314 - ICE with templates and fastcall attribute.
16241 * attribs.c (build_type_attribute_qual_variant): Remove assert.
16243 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16245 * ipa-cp.c (determine_versionability): Fix comment typos.
16247 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16250 * ipa-cp.c (determine_versionability): Do not version functions caling
16253 2018-02-21 Martin Liska <mliska@suse.cz>
16256 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16257 Add "native" as a possible value.
16258 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
16259 the macro when native cpu detection is available.
16261 2018-02-21 Martin Liska <mliska@suse.cz>
16264 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16265 Add "native" as a possible value.
16266 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16267 when native cpu detection is available.
16269 2018-02-21 Jakub Jelinek <jakub@redhat.com>
16270 Martin Sebor <msebor@redhat.com>
16272 PR tree-optimization/84478
16273 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16275 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16276 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16277 support which is conservatively correct, for 2 only stay conservative
16278 for maxlen. Formatting and comment capitalization fixes. Add STRICT
16279 argument to the 2 argument get_range_strlen, adjust 6 arg
16280 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16282 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16283 (gimple_fold_builtin_strlen): Pass true as last argument to
16286 2018-02-20 Martin Sebor <msebor@redhat.com>
16288 PR middle-end/84095
16289 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16290 (builtin_memref::set_base_and_offset): Same. Handle inner references.
16291 (builtin_memref::builtin_memref): Factor out parts into
16292 set_base_and_offset and call it.
16294 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16296 PR middle-end/84406
16297 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16298 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16299 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
16300 search at the associated MODE_INT.
16302 2018-02-20 Jeff Law <law@redhat.com>
16304 PR middle-end/82123
16305 PR tree-optimization/81592
16306 PR middle-end/79257
16307 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16308 for range data rather than using global data.
16309 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16310 range data rather than using global data.
16311 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16312 pass it to children as needed.
16313 (struct directive::fmtresult): Similarly.
16314 (struct directive::set_width): Similarly.
16315 (struct directive::set_precision): Similarly.
16316 (format_integer, format_directive, parse_directive): Similarly.
16317 (format_none): Accept unnamed vr_values parameter.
16318 (format_percent, format_floating, format_character): Similarly.
16319 (format_string, format_plain): Similarly.
16320 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16321 the EVRP range analyzer for range data rather than using global data.
16322 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16323 gimple-ssa-evrp-analyze.h
16324 (class sprintf_dom_walker): Add after_dom_children member function.
16325 Add evrp_range_analyzer member.
16326 (sprintf_dom_walker::before_dom_children): Call into the EVRP
16327 range analyzer as needed.
16328 (sprintf_dom_walker::after_dom_children): New member function.
16329 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16331 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16332 (evrp_range_analyzer::pop_to_marker): Likewise.
16334 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16336 PR tree-optimization/84419
16337 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16338 with the required type if its current type is compatible but
16341 2018-02-20 Jakub Jelinek <jakub@redhat.com>
16343 PR middle-end/82004
16344 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16345 after vectorization.
16347 2018-02-20 Martin Liska <mliska@suse.cz>
16350 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16351 possible values if we don't have a hint.
16353 2018-02-20 Martin Liska <mliska@suse.cz>
16357 * final.c (shorten_branches): Build align_tab array with one
16359 * opts.c (finish_options): Add alignment option limit check.
16360 (MAX_CODE_ALIGN): Likewise.
16361 (MAX_CODE_ALIGN_VALUE): Likewise.
16362 * doc/invoke.texi: Document maximum allowed option value for
16363 all -falign-* options.
16365 2018-02-19 Jakub Jelinek <jakub@redhat.com>
16368 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16369 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16370 * var-tracking.c (emit_note_insn_var_location): Remove all references
16371 to NOTE_INSN_CALL_ARG_LOCATION.
16372 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16373 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16374 Use copy_rtx_if_shared.
16375 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16376 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16377 (dwarf2out_var_location): Remove handling of
16378 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16380 * final.c (final_scan_insn): Remove all references to
16381 NOTE_INSN_CALL_ARG_LOCATION.
16382 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
16383 before dumping final insns.
16384 * except.c (emit_note_eh_region_end): Remove all references to
16385 NOTE_INSN_CALL_ARG_LOCATION.
16386 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16387 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16388 * config/arc/arc.c (hwloop_optimize): Likewise.
16389 * config/arm/arm.c (create_fix_barrier): Likewise.
16390 * config/s390/s390.c (s390_chunkify_start): Likewise.
16391 * config/sh/sh.c (find_barrier): Likewise.
16392 * config/i386/i386.c (rest_of_insert_endbranch,
16393 ix86_seh_fixup_eh_fallthru): Likewise.
16394 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16395 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16396 * config/frv/frv.c (frv_function_prologue): Likewise.
16397 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
16399 (note_outside_basic_block_p): Remove all references to
16400 NOTE_INSN_CALL_ARG_LOCATION.
16401 * gengtype.c (adjust_field_rtx_def): Likewise.
16402 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16404 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16405 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16408 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16411 PR tree-optimization/84452
16412 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16413 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16416 2018-02-19 Martin Liska <mliska@suse.cz>
16419 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16421 2018-02-19 Martin Liska <mliska@suse.cz>
16422 Richard Sandiford <richard.sandiford@linaro.org>
16424 PR tree-optimization/82491
16425 * gimple-fold.c (get_base_constructor): Make earlier bail out
16428 2018-02-19 Carl Love <cel@us.ibm.com>
16430 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16431 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16433 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16434 P8V_BUILTIN_VEC_NEG.
16436 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
16438 * config/rl78/rl78.md (movdf): New define expand.
16440 2018-02-19 Martin Liska <mliska@suse.cz>
16443 * doc/invoke.texi: Fix typo.
16444 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16446 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
16448 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16449 handle rs6000_single_float and rs6000_double_float specially for
16452 2018-02-16 Jeff Law <law@redhat.com>
16454 * config/rx/rx.c (add_pop_cfi_notes): New function.;
16455 (pop_regs): Use it.
16457 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16460 * ipa-inline.c (inline_small_functions): Fix a typo.
16462 2018-02-16 Nathan Sidwell <nathan@acm.org>
16464 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16466 2018-02-16 Carl Love <cel@us.ibm.com>
16468 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16469 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16470 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16471 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16472 expansion to P8V_BUILTIN_VEC_FLOAT2.
16474 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
16476 PR rtl-optimization/70023
16477 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16478 src_regno into account.
16480 2018-02-16 Carl Love <cel@us.ibm.com>
16482 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16483 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16484 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16485 * config/rs6000/rs6000.c: Remove case statements for
16486 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16487 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16488 and P9V_BUILTIN_VEC_VINSERT4B.
16489 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16490 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16491 * config/rs6000/vsx.md:
16492 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16495 2018-02-16 Carl Love <cel@us.ibm.com>
16497 * config/rs6000/altivec.h: Add builtin names vec_extract4b
16499 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16501 * config/rs6000/rs6000-c.c: Add the definitions for
16502 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16503 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16504 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16505 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
16506 definition for insert4b and define insn *insert3b_internal.
16507 * doc/extend.texi: Add documentation for vec_extract4b.
16509 2018-02-16 Nathan Sidwell <nathan@acm.org>
16511 * doc/extend.texi (Backwards Compatibility): Mention friend
16512 injection. Note for-scope is deprecated.
16513 * doc/invoke.texi (-ffriend-injection): Deprecate.
16515 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
16517 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16518 that moved to I2, also allow destinations that are a paradoxical
16519 subreg (instead of a normal reg).
16521 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
16524 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16527 2018-02-16 Richard Biener <rguenther@suse.de>
16529 PR tree-optimization/84037
16530 PR tree-optimization/84016
16532 * config/i386/i386.c (ix86_builtin_vectorization_cost):
16533 Adjust vec_construct for the fact we need additional higher latency
16534 128bit inserts for AVX256 and AVX512 vector builds.
16535 (ix86_add_stmt_cost): Scale vector construction cost for
16538 2018-02-16 Richard Biener <rguenther@suse.de>
16540 PR tree-optimization/84417
16541 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16542 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16543 (non_rewritable_lvalue_p): Likewise, use poly-ints.
16545 2018-02-16 Martin Liska <mliska@suse.cz>
16548 * internal-fn.def (ASAN_CHECK): Set proper flags.
16549 (ASAN_MARK): Likewise.
16551 2018-02-16 Julia Koval <julia.koval@intel.com>
16553 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16554 from PTA_CANNONLAKE.
16556 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16559 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16560 Use ++iter rather than iter++ for std::list iterators.
16561 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
16562 defer deleting them until all nodes in the forest are processed. Do
16563 free even leaf nodes. Change to_process into auto_vec.
16566 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16567 * vec.h (vec_default_construct): Use memset instead of placement new
16568 if BROKEN_VALUE_INITIALIZATION is defined.
16569 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16570 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16573 PR rtl-optimization/83723
16574 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16575 * lra.c (lra_substitute_pseudo): Likewise. If true, use
16576 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
16578 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16580 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16582 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
16584 PR rtl-optimization/81443
16585 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16586 from inner REGs to paradoxical SUBREGs.
16588 2018-02-16 Richard Biener <rguenther@suse.de>
16590 PR tree-optimization/84399
16591 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16592 For operands we can analyze at their definition make sure we can
16593 analyze them at each use as well.
16595 2018-02-16 Richard Biener <rguenther@suse.de>
16597 PR tree-optimization/84190
16598 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16599 volatile accesses if the decl isn't volatile.
16601 2018-02-15 Jason Merrill <jason@redhat.com>
16603 PR c++/84314 - ICE with templates and fastcall attribute.
16604 * attribs.c (build_type_attribute_qual_variant): Don't clobber
16605 TYPE_CANONICAL on an existing type.
16607 2018-02-15 Jakub Jelinek <jakub@redhat.com>
16609 PR tree-optimization/84383
16610 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16611 dstoff nor call operand_equal_p if dstbase is NULL.
16613 PR tree-optimization/84334
16614 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16615 also a CONSTANT_CLASS_P, punt.
16617 2018-02-14 Jim Wilson <jimw@sifive.com>
16619 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16620 first SMALL_OPERAND check. New local min_second_step. Move assert
16621 to where locals are set. Add TARGET_RVC support.
16622 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16624 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
16626 * doc/invoke.texi: Correct -Wformat-overflow code sample.
16628 2018-02-14 Martin Sebor <msebor@redhat.com>
16630 PR tree-optimization/83698
16631 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16632 arrays constrain the offset range to their bounds.
16633 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16634 (builtin_access::overlap): Avoid setting the size of overlap if it's
16636 (maybe_diag_overlap): Also consider arrays when deciding what values
16637 of offsets to include in diagnostics.
16639 2018-02-14 Martin Sebor <msebor@redhat.com>
16642 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16643 that correspond to the kind of a declaration.
16645 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
16648 * config/pa/pa.md: Load address of PIC label using the linkage table
16649 if the label is nonlocal.
16651 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
16653 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16654 warning message if user requests -maltivec=be.
16655 * doc/invoke.texi: Document deprecation of -maltivec=be.
16657 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
16660 * config/rs6000/rs6000-c.c: Update definitions for
16661 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16662 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16664 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16667 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16668 add _get_ssp intrinsics. Remove argument from
16669 __builtin_ia32_rdssp[d|q].
16670 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16671 * config/i386/i386-builtin.def: Remove argument from
16672 __builtin_ia32_rdssp[d|q].
16673 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16674 ix86_expand_special_args_builtin for _rdssp[d|q].
16675 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16676 Clear register before usage.
16677 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16678 Add documentation for new _get_ssp and _inc_ssp intrinsics.
16680 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
16682 PR tree-optimization/84357
16683 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16684 operand 1 of an ARRAY_REF too.
16686 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
16689 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16690 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16692 (set_of_reg): New struct.
16693 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16694 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16695 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16697 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16698 Split into bitclr, bitset, bitinvert patterns if appropriate.
16699 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16700 use rx_fuse_in_memory_bitop.
16701 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16702 to named insn, correct maximum insn length.
16704 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
16707 * machmode.def: Define a complex mode for PARTIAL_INT.
16708 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16710 * doc/rtl.texi: Document CSPImode.
16711 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16713 (msp430_hard_regno_nregs_with_padding): Likewise.
16715 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
16718 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16720 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
16722 PR rtl-optimization/84169
16723 * combine.c (try_combine): New variable split_i2i3. Set it to true if
16724 we generated a parallel as new i3 and we split that to new i2 and i3
16725 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
16726 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
16727 those to i2, not i1. Partially rewrite this scan code.
16729 2018-02-13 Jakub Jelinek <jakub@redhat.com>
16732 * stor-layout.c (place_field): For variable length fields, adjust
16733 offset_align afterwards not just based on the field's alignment,
16734 but also on the size.
16736 PR middle-end/84309
16737 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16738 of exps and logs in the use_exp2 case.
16740 2018-02-13 Jeff Law <law@redhat.com>
16742 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16743 entry for "vector".
16745 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16748 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
16752 * common.opt (gas-loc-support, gas-locview-support): New.
16753 (ginline-points, ginternal-reset-location-views): New.
16754 * doc/invoke.texi: Document them. Use @itemx where intended.
16755 (gvariable-location-views): Adjust.
16756 * target.def (reset_location_view): New.
16757 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16758 (TARGET_RESET_LOCATION_VIEW): New.
16759 * doc/tm.texi: Rebuilt.
16760 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16761 (dwarf2out_default_as_locview_support): New.
16762 (output_asm_line_debug_info): Use option variables.
16763 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16764 (output_loc_list): Likewise.
16765 (add_high_low_attributes): Check option variables.
16766 Don't output entry view attribute in strict mode.
16767 (gen_inlined_subroutine_die): Check option variables.
16768 (dwarf2out_inline_entry): Likewise.
16769 (init_sections_and_labels): Likewise.
16770 (dwarf2out_early_finish): Likewise.
16771 (maybe_reset_location_view): New, from...
16772 (dwarf2out_var_location): ... here. Call it.
16773 * debug.h (dwarf2out_default_as_loc_support): Declare.
16774 (dwarf2out_default_as_locview_support): Declare.
16775 * hooks.c (hook_int_rtx_insn_0): New.
16776 * hooks.h (hook_int_rtx_insn_0): Declare.
16777 * toplev.c (process_options): Take -gas-loc-support and
16778 -gas-locview-support from dwarf2out. Enable
16779 -gvariable-location-views by default only with locview
16780 assembler support. Enable -ginternal-reset-location-views by
16781 default only if the target defines the corresponding hook.
16782 Enable -ginline-points by default if location views are
16783 enabled; force it disabled if statement frontiers are
16785 * tree-inline.c (expand_call_inline): Check option variables.
16786 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16788 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
16790 PR tree-optimization/84321
16791 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16792 handling. Also check whether the anti-range contains any values
16793 that satisfy the mask; switch to a VR_RANGE if not.
16795 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
16798 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16800 2018-02-13 Martin Jambor <mjambor@suse.cz>
16803 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16804 of call statements, also set location of a load to a temporary.
16806 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
16808 * config/rl78/rl78.c (add_vector_labels): New function.
16809 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16810 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16811 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16812 which checks that no arguments are passed.
16813 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16814 * doc/extend.texi: Documentation for the new attribute.
16816 2018-02-13 Andreas Schwab <schwab@suse.de>
16818 * config/riscv/linux.h (CPP_SPEC): Define.
16820 2018-02-13 Jakub Jelinek <jakub@redhat.com>
16823 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16824 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16825 OPTION_MASK_ISA_AES as first argument to def_builtin_const
16826 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16827 instead of OPTION_MASK_ISA_PCLMUL as first argument to
16828 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16829 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16830 temporarily for AES and PCLMUL builtins.
16832 PR tree-optimization/84339
16833 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16834 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16837 PR middle-end/84309
16838 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16839 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16840 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16842 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16844 * omp-simd-clone.h: New file.
16845 * omp-simd-clone.c: Include omp-simd-clone.h.
16846 (expand_simd_clones): No longer static.
16847 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16848 cgraph.h and omp-simd-clone.h.
16849 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16850 (vect_recog_widen_shift_pattern): Formatting fix.
16851 (vect_pattern_recog_1): Don't check optab for calls.
16854 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16855 operands[2] into a REG before using gen_lowpart on it.
16857 2018-02-12 Jeff Law <law@redhat.com>
16860 * config/sh/sh.c (find_barrier): Consider a sibling call
16863 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16864 successfully back substituting a reg.
16866 2018-02-12 Richard Biener <rguenther@suse.de>
16868 PR tree-optimization/84037
16869 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16870 parameter, move visited init to caller.
16871 (vect_slp_analyze_operations): Separate cost from validity
16872 check, initialize visited once for all instances.
16873 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16875 * tree-vect-stmts.c (vect_model_simple_cost): Make early
16877 (vect_model_promotion_demotion_cost): Likewise.
16878 (vectorizable_bswap): Guard cost modeling with !slp_node
16879 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16881 (vectorizable_call): Likewise.
16882 (vectorizable_conversion): Likewise.
16883 (vectorizable_assignment): Likewise.
16884 (vectorizable_shift): Likewise.
16885 (vectorizable_operation): Likewise.
16886 (vectorizable_store): Likewise.
16887 (vectorizable_load): Likewise.
16888 (vectorizable_condition): Likewise.
16889 (vectorizable_comparison): Likewise.
16891 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
16894 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16895 (ASAN_MARK): Fix fnspec to account for return value, change pointer
16896 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16898 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16900 PR middle-end/83665
16901 * params.def (inline-min-speedup): Increase from 8 to 15.
16902 (max-inline-insns-auto): Decrease from 40 to 30.
16903 * ipa-split.c (consider_split): Add some buffer for function to
16904 be considered inlining candidate.
16905 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16908 2018-02-12 Richard Biener <rguenther@suse.de>
16910 PR tree-optimization/84037
16911 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16912 matched stmts if we cannot swap the non-matched ones.
16914 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
16916 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16917 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16918 _mm_maskz_scalef_round_ss): New intrinsics.
16919 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16920 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16921 __builtin_ia32_scalefss_round): Remove.
16922 (__builtin_ia32_scalefsd_mask_round,
16923 __builtin_ia32_scalefss_mask_round): New intrinsics.
16924 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16925 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16926 ((match_operand:VF_128 2 "<round_nimm_predicate>"
16927 "<round_constraint>")): Changed to ...
16928 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16929 "<round_scalar_constraint>")): ... this.
16930 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16931 %0, %1, %2<round_op3>}"): Changed to ...
16932 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16933 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16934 %2<round_scalar_mask_op3>}"): ... this.
16935 * config/i386/subst.md (round_scalar_nimm_predicate): New.
16937 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
16939 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16940 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16941 (_mm_maskz_sqrt_round_ss): New intrinsics.
16942 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16943 (__builtin_ia32_sqrtsd_mask_round)
16944 (__builtin_ia32_sqrtss_mask_round): New builtins.
16945 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16946 (__builtin_ia32_sqrtss_round): Remove.
16947 (__builtin_ia32_sqrtsd_mask_round)
16948 (__builtin_ia32_sqrtss_mask_round): New builtins.
16949 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16950 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16951 ((match_operand:VF_128 1 "vector_operand"
16952 "xBm,<round_constraint>")): Changed to ...
16953 ((match_operand:VF_128 1 "vector_operand"
16954 "xBm,<round_scalar_constraint>")): ... this.
16955 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16956 %0, %2, %<iptr>1<round_op3>}): Changed to ...
16957 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16958 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16959 %<iptr>1<round_scalar_mask_op3>}): ... this.
16960 ((set_attr "prefix" "<round_prefix>")): Changed to ...
16961 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16963 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
16966 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16967 Cast vec_cmpeq result to correct type.
16968 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16969 Cast vec_cmpgt result to correct type.
16971 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
16973 * final.c (final_scan_insn_1): Renamed from...
16974 (final_scan_insn): ... this. New wrapper, to recover
16975 seen from the outermost call in recursive ones.
16976 * config/sparc/sparc.c (output_return): Drop seen from call.
16977 (output_sibcall): Likewise.
16978 * config/visium/visium.c (output_branch): Likewise.
16980 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
16982 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16985 2018-02-10 Alan Modra <amodra@gmail.com>
16988 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16989 Specify LR as an input.
16991 2018-02-10 Jakub Jelinek <jakub@redhat.com>
16994 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16995 remove_member_access_dummy_vars): New functions.
16996 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16997 lower_omp_1, execute_lower_omp): Use them.
16999 PR rtl-optimization/84308
17000 * shrink-wrap.c (spread_components): Release todo vector.
17002 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17004 PR rtl-optimization/57193
17005 * ira-color.c (struct allocno_color_data): Add member
17006 conflict_allocno_hard_prefs.
17007 (update_conflict_allocno_hard_prefs): New.
17008 (bucket_allocno_compare_func): Add a preference based on
17009 conflict_allocno_hard_prefs.
17010 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17011 (color_allocnos): Remove a dead code. Initiate
17012 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17014 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17017 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17018 constraint from =wa to wa. Avoid a subreg on the output operand,
17019 instead use a pseudo and subreg it in a move.
17020 (p9_xxbrd_<mode>): Changed to ...
17021 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17022 (p9_xxbrd_v2df): New expander.
17023 (p9_xxbrw_<mode>): Changed to ...
17024 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17025 (p9_xxbrw_v4sf): New expander.
17027 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17029 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17031 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17034 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17035 multiply in 32-bit mode.
17036 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17037 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17040 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17042 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17043 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17044 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17045 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17047 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17050 * dwarf2out.c (is_trivial_indirect_ref): New function.
17051 (dwarf2out_late_global_decl): Do not generate a location
17052 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17053 and that are not defined in the current unit.
17055 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17057 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17058 instead of a libcall for UNORDERED.
17060 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17063 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17064 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17066 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17069 * config/s390/s390.c (s390_set_current_function): Invoke
17070 s390_indirect_branch_settings also if fndecl didn't change.
17072 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17074 * config/rs6000/rs6000.md (blockage): Set length to zero.
17076 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17078 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17080 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17083 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17084 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17088 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17089 PARALLEL incoming that failed vt_get_decl_and_offset check.
17091 PR middle-end/84237
17092 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17093 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17095 (get_variable_section): For decls in named .bss* sections pass true as
17096 second argument to bss_initializer_p.
17098 2018-02-09 Marek Polacek <polacek@redhat.com>
17099 Jakub Jelinek <jakub@redhat.com>
17102 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17103 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17104 Sync some changes from cxx_fold_indirect_ref.
17106 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17108 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17110 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17111 (BLOCK_INLINE_ENTRY_LABEL): New.
17112 (dwarf2out_var_location): Disregard inline entry markers.
17113 (inline_entry_data): New struct.
17114 (inline_entry_data_hasher): New hashtable type.
17115 (inline_entry_data_hasher::hash): New.
17116 (inline_entry_data_hasher::equal): New.
17117 (inline_entry_data_table): New variable.
17118 (add_high_low_attributes): Add DW_AT_entry_pc and
17119 DW_AT_GNU_entry_view attributes if a pending entry is found
17120 in inline_entry_data_table. Add old entry_pc attribute only
17121 if debug nonbinding markers are disabled.
17122 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17123 markers are enabled.
17124 (block_within_block_p, dwarf2out_inline_entry): New.
17125 (dwarf2out_finish): Check that no entries remained in
17126 inline_entry_data_table.
17127 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17128 (final_scan_insn, notice_source_line): Likewise.
17129 (rest_of_clean_state): Skip inline entry markers.
17130 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17132 * gimple.c (gimple_build_debug_inline_entry): New.
17133 * gimple.h (enum gimple_debug_subcode): Add
17134 GIMPLE_DEBUG_INLINE_ENTRY.
17135 (gimple_build_debug_inline_entry): Declare.
17136 (gimple_debug_inline_entry_p): New.
17137 (gimple_debug_nonbind_marker_p): Adjust.
17138 * insn-notes.def (INLINE_ENTRY): New.
17139 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17140 inline entry marker notes.
17141 (print_insn): Likewise.
17142 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17143 (INSN_DEBUG_MARKER_KIND): Likewise.
17144 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17145 * tree-inline.c (expand_call_inline): Build and insert
17146 debug_inline_entry stmt.
17147 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17148 inline entry blocks early, if nonbind markers are enabled.
17149 (dump_scope_block): Dump fragment info.
17150 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17151 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17152 (gimple_build_debug_inline_entry): New.
17153 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17154 Enable/disable inline entry points too.
17155 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17156 (DEBUG_INSN): Describe inline entry markers.
17158 * common.opt (gvariable-location-views): New.
17159 (gvariable-location-views=incompat5): New.
17160 * config.in: Rebuilt.
17161 * configure: Rebuilt.
17162 * configure.ac: Test assembler for view support.
17163 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17164 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17165 * dwarf2out.c (var_loc_view): New typedef.
17166 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17167 (dwarf2out_locviews_in_attribute): New.
17168 (dwarf2out_locviews_in_loclist): New.
17169 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17170 (enum dw_line_info_opcode): Add LI_adv_address.
17171 (struct dw_line_info_table): Add view.
17172 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17173 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17174 (zero_view_p): New variable.
17175 (ZERO_VIEW_P): New macro.
17176 (output_asm_line_debug_info): New.
17177 (struct var_loc_node): Add view.
17178 (add_AT_view_list, AT_loc_list): New.
17179 (add_var_loc_to_decl): Add view param. Test it against last.
17180 (new_loc_list): Add view params. Record them.
17181 (AT_loc_list_ptr): Handle loc and view lists.
17182 (view_list_to_loc_list_val_node): New.
17183 (print_dw_val): Handle dw_val_class_view_list.
17184 (size_of_die): Likewise.
17185 (value_format): Likewise.
17186 (loc_list_has_views): New.
17187 (gen_llsym): Set vl_symbol too.
17188 (maybe_gen_llsym, skip_loc_list_entry): New.
17189 (dwarf2out_maybe_output_loclist_view_pair): New.
17190 (output_loc_list): Output view list or entries too.
17191 (output_view_list_offset): New.
17192 (output_die): Handle dw_val_class_view_list.
17193 (output_dwarf_version): New.
17194 (output_compilation_unit_header): Use it.
17195 (output_skeleton_debug_sections): Likewise.
17196 (output_rnglists, output_line_info): Likewise.
17197 (output_pubnames, output_aranges): Update version comments.
17198 (output_one_line_info_table): Output view numbers in asm comments.
17199 (dw_loc_list): Determine current endview, pass it to new_loc_list.
17200 Call maybe_gen_llsym.
17201 (loc_list_from_tree_1): Adjust.
17202 (add_AT_location_description): Create view list attribute if
17203 needed, check it's absent otherwise.
17204 (convert_cfa_to_fb_loc_list): Adjust.
17205 (maybe_emit_file): Call output_asm_line_debug_info for test.
17206 (dwarf2out_var_location): Reset views as needed. Precompute
17207 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
17208 attribute. Set view.
17209 (new_line_info_table): Reset next view.
17210 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17211 (dwarf2out_source_line): Likewise. Output view resets and labels to
17212 the assembler, or select appropriate line info opcodes.
17213 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17214 (optimize_string_length): Catch it. Adjust.
17215 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
17216 dw_val_class_view_list, and remove it if no longer needed.
17217 (hash_loc_list): Hash view numbers.
17218 (loc_list_hasher::equal): Compare them.
17219 (optimize_location_lists): Check whether a view list symbol is
17220 needed, and whether the locview attribute is present, and
17221 whether they match. Remove the locview attribute if no longer
17223 (index_location_lists): Call skip_loc_list_entry for test.
17224 (dwarf2out_finish): Call output_asm_line_debug_info for test.
17225 Use output_dwarf_version.
17226 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17227 (struct dw_val_node): Add val_view_list.
17228 * final.c (SEEN_NEXT_VIEW): New.
17229 (set_next_view_needed): New.
17230 (clear_next_view_needed): New.
17231 (maybe_output_next_view): New.
17232 (final_start_function): Rename to...
17233 (final_start_function_1): ... this. Take pointer to FIRST,
17234 add SEEN parameter. Emit param bindings in the initial view.
17235 (final_start_function): Reintroduce SEEN-less interface.
17236 (final): Rename to...
17237 (final_1): ... this. Take SEEN parameter. Output final pending
17238 next view at the end.
17239 (final): Reintroduce seen-less interface.
17240 (final_scan_insn): Output pending next view before switching
17241 sections or ending a block. Mark the next view as needed when
17242 outputting variable locations. Notify debug backend of section
17243 changes, and of location view changes.
17244 (rest_of_handle_final): Adjust.
17245 * toplev.c (process_options): Autodetect value for debug variable
17246 location views option. Warn on incompat5 without -gdwarf-5.
17247 * doc/invoke.texi (gvariable-location-views): New.
17248 (gvariable-location-views=incompat5): New.
17249 (gno-variable-location-views): New.
17251 2018-02-08 David Malcolm <dmalcolm@redhat.com>
17253 PR tree-optimization/84136
17254 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17255 that the result of find_edge is non-NULL.
17257 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17260 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17261 storing integer register in SImode. Fix cost of 256 and 512
17262 byte aligned SSE register store.
17264 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17266 * config/i386/i386.c (ix86_multiplication_cost): Fix
17267 multiplication cost for TARGET_AVX512DQ.
17269 2018-02-08 Marek Polacek <polacek@redhat.com>
17271 PR tree-optimization/84238
17272 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17275 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17277 PR tree-optimization/84265
17278 * tree-vect-stmts.c (vectorizable_store): Don't treat
17279 VMAT_CONTIGUOUS accesses as grouped.
17280 (vectorizable_load): Likewise.
17282 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17284 PR tree-optimization/81635
17285 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17286 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17287 (test_round_for_mask): New functions.
17288 (wide_int_cc_tests): Call test_round_for_mask.
17289 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17290 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17291 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17292 range returned by get_range_info.
17294 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17297 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17298 * symtab.c: Include builtins.h
17299 (symtab_node::output_to_lto_symbol_table_p): Move here
17300 from lto-streamer-out.c:output_symbol_p.
17301 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17302 (output_symbol_p): Move all logic to symtab.c
17303 (produce_symtab): Update.
17305 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17307 * config/s390/s390-opts.h (enum indirect_branch): Define.
17308 * config/s390/s390-protos.h (s390_return_addr_from_memory)
17309 (s390_indirect_branch_via_thunk)
17310 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17311 (enum s390_indirect_branch_type): Define.
17312 * config/s390/s390.c (struct s390_frame_layout, struct
17313 machine_function): Remove.
17314 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17315 (indirect_branch_table_label_no, indirect_branch_table_name):
17317 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17318 (enum s390_indirect_branch_option): Define.
17319 (s390_return_addr_from_memory): New function.
17320 (s390_handle_string_attribute): New function.
17321 (s390_attribute_table): Add new attribute handler.
17322 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17323 (s390_indirect_branch_via_thunk): New function.
17324 (s390_indirect_branch_via_inline_thunk): New function.
17325 (s390_function_ok_for_sibcall): When jumping via thunk disallow
17326 sibling call optimization for non z10 compiles.
17327 (s390_emit_call): Force indirect branch target to be a single
17328 register. Add r1 clobber for non-z10 compiles.
17329 (s390_emit_epilogue): Emit return jump via return_use expander.
17330 (s390_reorg): Handle JUMP_INSNs as execute targets.
17331 (s390_option_override_internal): Perform validity checks for the
17332 new command line options.
17333 (s390_indirect_branch_attrvalue): New function.
17334 (s390_indirect_branch_settings): New function.
17335 (s390_set_current_function): Invoke s390_indirect_branch_settings.
17336 (s390_output_indirect_thunk_function): New function.
17337 (s390_code_end): Implement target hook.
17338 (s390_case_values_threshold): Implement target hook.
17339 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17341 * config/s390/s390.h (struct s390_frame_layout)
17342 (struct machine_function): Move here from s390.c.
17343 (TARGET_INDIRECT_BRANCH_NOBP_RET)
17344 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17345 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17346 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17347 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17348 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17349 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17350 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17351 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17352 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17353 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17354 (mnemonic attribute): Add values which aren't recognized
17356 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17357 pattern for branch conversion. Fix mnemonic attribute.
17358 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17359 indirect branch via thunk if requested.
17360 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17361 ("*indirect_jump"): Disable for branch conversion using out of
17363 ("indirect_jump_via_thunk<mode>_z10")
17364 ("indirect_jump_via_thunk<mode>")
17365 ("indirect_jump_via_inlinethunk<mode>_z10")
17366 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17367 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17368 ("casesi_jump_via_inlinethunk<mode>_z10")
17369 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17370 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17371 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17372 ("*indirect2_jump"): Disable for branch conversion.
17373 ("casesi_jump"): Turn into expander and expand patterns for branch
17375 ("return_use"): New expander.
17376 ("*return"): Emit return via thunk and rename it to ...
17377 ("*return<mode>"): ... this one.
17378 * config/s390/s390.opt: Add new options and and enum for the
17381 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17383 * lra-constraints.c (match_reload): Unconditionally use
17384 gen_lowpart_SUBREG, rather than selecting between that
17385 and equivalent gen_rtx_SUBREG code.
17387 2018-02-08 Richard Biener <rguenther@suse.de>
17389 PR tree-optimization/84233
17390 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17391 changed flag instead of boguously re-using phi_inserted.
17393 2018-02-08 Martin Jambor <mjambor@suse.cz>
17395 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17396 static local variables.
17398 2018-02-08 Richard Biener <rguenther@suse.de>
17400 PR tree-optimization/84278
17401 * tree-vect-stmts.c (vectorizable_store): When looking for
17402 smaller vector types to perform grouped strided loads/stores
17403 make sure the mode is supported by the target.
17404 (vectorizable_load): Likewise.
17406 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17408 * config/aarch64/aarch64.c (aarch64_components_for_bb):
17409 Increase LDP/STP opportunities by adding adjacent callee-saves.
17411 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17413 PR rtl-optimization/84068
17414 PR rtl-optimization/83459
17415 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17417 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
17419 PR tree-optimization/84224
17420 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17421 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17422 non-zero arguments.
17424 2018-02-07 Iain Sandoe <iain@codesourcery.com>
17427 * config/rs6000/altivec.md (*restore_world): Remove LR use.
17428 * config/rs6000/predicates.md (restore_world_operation): Adjust op
17429 count, remove one USE.
17431 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
17433 * doc/install.texi (Configuration): Document the
17434 --with-long-double-format={ibm,ieee} PowerPC configuration
17438 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17439 Convert from define_expand to be define_insn_and_split. Rework
17440 float/double/_Float128 conversions to QI/HI/SImode to work with
17441 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
17442 conversions to QI/HImode types did a store and then a load to
17443 truncate the value. For conversions to VSX registers, don't split
17444 the insn, instead emit the code directly. Use the code iterator
17445 any_fix to combine signed and unsigned conversions.
17446 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17447 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17448 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17449 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17450 (fix_<mode>di2_hw): Likewise.
17451 (fixuns_<mode>di2_hw): Likewise.
17452 (fix_<mode>si2_hw): Likewise.
17453 (fixuns_<mode>si2_hw): Likewise.
17454 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17455 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17456 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17457 fix<uns>_trunc<SFDF:mode>si2_p8.
17458 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17459 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17460 (fix<uns>_<mode>_mem): Likewise.
17461 (fctiw<u>z_<mode>_mem): Likewise.
17462 (fix<uns>_<mode>_mem): Likewise.
17463 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17464 the register allocator from doing a direct move to the GPRs to do
17465 a store, and instead use the ISA 3.0 store byte/half-word from
17466 vector register instruction. For IEEE 128-bit floating point,
17467 also optimize stores of 32-bit ints.
17468 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17470 2018-02-07 Alan Hayward <alan.hayward@arm.com>
17472 * genextract.c (push_pathstr_operand): New function to support
17474 (walk_rtx): Call push_pathstr_operand.
17475 (print_path): Support [a-zA-Z].
17477 2018-02-07 Richard Biener <rguenther@suse.de>
17479 PR tree-optimization/84037
17480 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17481 (cse_and_gimplify_to_preheader): Declare.
17482 (vect_get_place_in_interleaving_chain): Likewise.
17483 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17485 (_loop_vec_info::~_loop_vec_info): Delete it.
17486 (cse_and_gimplify_to_preheader): New function.
17487 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17488 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17489 (vectorizable_load): Likewise. For grouped stores always base
17490 the IV on the first element.
17491 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17492 condition before gimplifying.
17494 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17496 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17497 *DIV_EXPR and *MOD_EXPR.
17499 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
17502 * config/i386/i386.c (ix86_option_override_internal): Mask out
17503 the CF_SET bit when checking -fcf-protection.
17505 2018-02-07 Tom de Vries <tom@codesourcery.com>
17508 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17511 2018-02-07 Richard Biener <rguenther@suse.de>
17513 PR tree-optimization/84204
17514 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17517 PR tree-optimization/84205
17518 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17519 special-case isl_ast_op_zdiv_r.
17521 PR tree-optimization/84223
17522 * graphite-scop-detection.c (gather_bbs::before_dom_children):
17523 Only add conditions from within the region.
17524 (gather_bbs::after_dom_children): Adjust.
17526 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
17529 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17530 * config/avr/avr.md: Only post-reload split REG-REG moves if
17531 either register is GENERAL_REG_P.
17533 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17535 PR tree-optimization/84235
17536 * tree-ssa-scopedtables.c
17537 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17538 if the subtraction is performed in floating point type where NaNs are
17539 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17540 build 1. Formatting fix.
17542 2018-02-06 Jakub Jelinek <jakub@redhat.com>
17545 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17546 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17547 and skip it regardless of bb boundaries. Use CALL_P macro,
17548 don't test INSN_P (insn) together with CALL_P or JUMP_P check
17549 unnecessarily, formatting fix.
17551 2018-02-06 Michael Collison <michael.collison@arm.com>
17553 * config/arm/thumb2.md:
17554 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17555 (*thumb_mov_notscc): Ditto.
17557 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
17560 * config/rs6000/rs6000.md (su code attribute): Use "u" for
17561 unsigned_fix, not "s".
17563 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17565 * configure.ac (gcc_fn_eh_frame_ro): New function.
17566 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17567 correct .eh_frame permissions.
17568 * configure: Regenerate.
17570 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
17572 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17573 irrelevant options.
17575 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17577 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17578 Display warning message for -mno-speculate-indirect-jumps.
17580 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
17582 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17584 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17586 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
17588 PR tree-optimization/84225
17589 * tree-eh.c (find_trapping_overflow): Only call
17590 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17592 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17595 * config/i386/i386.c: Reimplement the check of possible options
17596 -mibt/-mshstk conbination. Change error messages.
17597 * doc/invoke.texi: Fix a typo: remove extra '='.
17599 2018-02-06 Marek Polacek <polacek@redhat.com>
17601 PR tree-optimization/84228
17602 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17604 2018-02-06 Tamar Christina <tamar.christina@arm.com>
17607 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17608 emitted arch directives.
17609 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17610 __ARM_FEATURE_COPROC before changing architectures.
17612 2018-02-06 Richard Biener <rguenther@suse.de>
17614 * config/i386/i386.c (print_reg): Fix typo.
17615 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17617 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
17619 * configure: Regenerate.
17621 2018-02-05 Martin Sebor <msebor@redhat.com>
17623 PR tree-optimization/83369
17624 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17627 2018-02-05 Martin Liska <mliska@suse.cz>
17629 * doc/invoke.texi: Cherry-pick upstream r323995.
17631 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
17633 * ira.c (ira_init_register_move_cost): Adjust comment.
17635 2018-02-05 Martin Liska <mliska@suse.cz>
17637 PR gcov-profile/84137
17638 * doc/gcov.texi: Fix typo in documentation.
17640 2018-02-05 Martin Liska <mliska@suse.cz>
17642 PR gcov-profile/83879
17643 * doc/gcov.texi: Document necessity of --dynamic-list-data when
17644 using dlopen functionality.
17646 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
17648 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17649 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17650 _mm_maskz_range_ss, _mm_mask_range_round_ss,
17651 _mm_maskz_range_round_ss): New intrinsics.
17652 (__builtin_ia32_rangesd128_round)
17653 (__builtin_ia32_rangess128_round): Remove.
17654 (__builtin_ia32_rangesd128_mask_round,
17655 __builtin_ia32_rangess128_mask_round): New builtins.
17656 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17657 __builtin_ia32_rangess128_round): Remove.
17658 (__builtin_ia32_rangesd128_mask_round,
17659 __builtin_ia32_rangess128_mask_round): New builtins.
17660 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17661 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17662 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17663 "<round_saeonly_constraint>")): Changed to ...
17664 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17665 "<round_saeonly_scalar_constraint>")): ... this.
17666 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17667 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17668 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17669 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17670 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17672 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
17674 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17676 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17677 Remove all values except native, 8540 and 8548.
17679 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
17681 * config/i386/i386.c (ix86_output_function_return): Pass
17682 INVALID_REGNUM, instead of -1, as invalid register number to
17683 indirect_thunk_name and output_indirect_thunk.
17685 2018-02-02 Julia Koval <julia.koval@intel.com>
17687 * config.gcc: Add -march=icelake.
17688 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17689 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17690 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17691 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17692 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17693 (processor_target_table): Add icelake.
17694 (ix86_option_override_internal): Handle new PTAs.
17695 (get_builtin_code_for_version): Handle icelake.
17696 (M_INTEL_COREI7_ICELAKE): New.
17697 (fold_builtin_cpu): Handle icelake.
17698 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17699 * doc/invoke.texi: Add -march=icelake.
17701 2018-02-02 Julia Koval <julia.koval@intel.com>
17703 * config/i386/i386.c (ix86_option_override_internal): Change flags type
17704 to wide_int_bitmask.
17705 * wide-int-bitmask.h: New.
17707 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17710 * config/i386/i386.md: Replace Pmode with word_mode in
17711 builtin_setjmp_setup and builtin_longjmp to support x32.
17713 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
17717 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17719 (rs6000_supported_cpu_names): New static variable.
17720 (linux_cpu_translation_table): Likewise.
17721 (elf_platform) <cpu>: Define new static variable and use it.
17722 Translate kernel AT_PLATFORM name to canonical name if needed.
17723 Error if platform name is unknown.
17725 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
17728 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17730 2018-02-01 Jeff Law <law@redhat.com>
17733 * config/i386/i386.c (release_scratch_register_on_entry): Add new
17734 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
17735 the scratch if RELEASE_VIA_POP is false.
17736 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17737 If we have to save a temporary register, decrement SIZE appropriately.
17738 Pass new arguments to release_scratch_register_on_entry.
17739 (ix86_adjust_stack_and_probe): Likewise.
17740 (ix86_emit_probe_stack_range): Pass new arguments to
17741 release_scratch_register_on_entry.
17743 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
17745 PR rtl-optimization/84157
17746 * combine.c (change_zero_ext): Use REG_P predicate in
17747 front of HARD_REGISTER_P predicate.
17749 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
17751 * config/avr/avr.c (avr_option_override): Move disabling of
17752 -fdelete-null-pointer-checks to...
17753 * common/config/avr/avr-common.c (avr_option_optimization_table):
17756 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17758 PR tree-optimization/81635
17759 * tree-data-ref.c (split_constant_offset_1): For types that
17760 wrap on overflow, try to use range info to prove that wrapping
17763 2018-02-01 Renlin Li <renlin.li@arm.com>
17766 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17767 TAILCALL_ADDR_REGS.
17768 (aarch64_register_move_cost): Likewise.
17769 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17770 TAILCALL_ADDR_REGS.
17771 (REG_CLASS_NAMES): Likewise.
17772 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17773 TAILCALL_ADDR_REGS. Remove IP registers.
17774 * config/aarch64/aarch64.md (Ucs): Update register constraint.
17776 2018-02-01 Richard Biener <rguenther@suse.de>
17778 * domwalk.h (dom_walker::dom_walker): Add additional constructor
17779 for specifying RPO order and allow NULL for that.
17780 * domwalk.c (dom_walker::dom_walker): Likewise.
17781 (dom_walker::walk): Handle NULL RPO order.
17782 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17784 (rewrite_update_dom_walker): Likewise.
17785 (mark_def_dom_walker): Likewise.
17787 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17789 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17790 (aarch64_maybe_expand_sve_subreg_move): Declare.
17791 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17792 * config/aarch64/predicates.md (aarch64_any_register_operand): New
17794 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17795 that are semantically a reverse operation.
17796 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17797 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17798 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17800 (aarch64_can_change_mode_class): For big-endian, forbid changes
17801 between two SVE modes if they have different element sizes.
17803 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17805 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17806 the TImode handling for big-endian targets.
17808 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17810 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17811 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
17813 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17814 Remove BSWAP handing for big-endian targets and use the form of
17815 LD1RQ appropariate for the mode.
17817 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17819 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17820 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17821 duplicated element.
17823 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17826 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17827 check for operands that need to go through aarch64_sve_reload_be.
17829 2018-02-01 Jakub Jelinek <jakub@redhat.com>
17831 PR tree-optimization/81661
17832 PR tree-optimization/84117
17833 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17834 * tree-eh.c: Include gimplify.h.
17835 (find_trapping_overflow, replace_trapping_overflow,
17836 rewrite_to_non_trapping_overflow): New functions.
17837 * tree-vect-loop.c: Include tree-eh.h.
17838 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17839 * tree-data-ref.c: Include tree-eh.h.
17840 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17842 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
17844 PR rtl-optimization/84123
17845 * combine.c (change_zero_ext): Check if hard register satisfies
17846 can_change_dest_mode before calling gen_lowpart_SUBREG.
17848 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
17851 * ira.c (ira_init_register_move_cost): Remove assert.
17853 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17855 PR rtl-optimization/84071
17856 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17857 * doc/tm.texi: Regenerate.
17859 2018-01-31 Richard Biener <rguenther@suse.de>
17861 PR tree-optimization/84132
17862 * tree-data-ref.c (analyze_miv_subscript): Properly
17863 check whether evolution_function_is_affine_multivariate_p
17864 before calling gcd_of_steps_may_divide_p.
17866 2018-01-31 Julia Koval <julia.koval@intel.com>
17869 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17870 * config/i386/i386.md (rdpid_rex64) New.
17871 (rdpid): Make 32bit only.
17873 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
17876 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17877 an IDENTIFIER_NODE for FUNCTION_TYPE's.
17879 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17882 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17884 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17886 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17888 PR rtl-optimization/84071
17889 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17890 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17892 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
17894 * config/arc/arc.c (arc_handle_aux_attribute): New function.
17895 (arc_attribute_table): Add 'aux' attribute.
17896 (arc_in_small_data_p): Consider aux like variables.
17897 (arc_is_aux_reg_p): New function.
17898 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17899 (arc_get_aux_arg): New function.
17900 (prepare_move_operands): Handle aux-register access.
17901 (arc_handle_aux_attribute): New function.
17902 * doc/extend.texi (ARC Variable attributes): Add subsection.
17904 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
17906 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17907 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17908 (arc_attribute_table): Add 'uncached' attribute.
17909 (arc_print_operand): Print '.di' flag for uncached memory
17911 (arc_in_small_data_p): Do not consider for small data the uncached
17913 (arc_is_uncached_mem_p): New function.
17914 * config/arc/predicates.md (compact_store_memory_operand): Check
17915 for uncached memory accesses.
17916 (nonvol_nonimm_operand): Likewise.
17917 * doc/extend.texi (ARC Type Attribute): New subsection.
17919 2018-01-31 Jakub Jelinek <jakub@redhat.com>
17922 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17923 falign-loops=): Add Optimization flag.
17925 2018-01-30 Jeff Law <law@redhat.com>
17928 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17929 INT_REGISTERS_SAVED. Check it prior to calling
17930 get_scratch_register_on_entry.
17931 (ix86_adjust_stack_and_probe): Similarly.
17932 (ix86_emit_probe_stack_range): Similarly.
17933 (ix86_expand_prologue): Corresponding changes.
17935 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17938 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17939 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17941 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
17944 * lra-constraints.c (curr_insn_transform): Process AND in the
17947 2018-01-30 Jakub Jelinek <jakub@redhat.com>
17949 PR rtl-optimization/83986
17950 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17951 dependence against last_pending_memory_flush in addition to
17952 pending_jump_insns.
17954 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
17956 PR tree-optimization/81611
17957 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17960 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17963 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17966 2018-01-30 Richard Biener <rguenther@suse.de>
17967 Jakub Jelinek <jakub@redhat.com>
17969 PR tree-optimization/84111
17970 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17971 inner loops added during recursion, as they don't have up-to-date
17974 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
17977 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17978 (can_inline_edge_by_limits_p): ... here.
17979 (can_early_inline_edge_p, check_callers,
17980 update_caller_keys, update_callee_keys, recursive_inlining,
17981 add_new_edges_to_heap, speculation_useful_p,
17982 inline_small_functions,
17983 inline_small_functions, flatten_function,
17984 inline_to_all_callers_1): Update.
17986 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
17988 * profile-count.c (profile_count::combine_with_ipa_count): Handle
17991 2018-01-30 Richard Biener <rguenther@suse.de>
17993 PR tree-optimization/83008
17994 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17995 invariant and constant vector uses in stmts when they need
17996 more than one stmt.
17998 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18001 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18002 * configure: Regenerate.
18004 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18006 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18008 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18009 Use gen_rtx_REG rather than gen_lowpart.
18011 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18013 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18014 rather than 0 when creating partial subregs.
18016 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18018 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18021 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18024 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18025 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18026 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18027 flags. This restores the settings used before the 2017-07-24.
18028 Turning off pre increment/decrement/modify allows IVOPTS to
18029 optimize DF/SF loops where the index is an int.
18031 2018-01-29 Richard Biener <rguenther@suse.de>
18032 Kelvin Nilsen <kelvin@gcc.gnu.org>
18035 * tree-vect-stmts.c (vectorizable_call): Don't call
18036 targetm.vectorize_builtin_md_vectorized_function if callee is
18039 2018-01-22 Carl Love <cel@us.ibm.com>
18041 * doc/extend.tex: Fix typo in second arg in
18042 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18044 2018-01-29 Richard Biener <rguenther@suse.de>
18046 PR tree-optimization/84086
18047 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18048 (flush_ssaname_freelist): When SSA names were released reset
18049 the SCEV hash table.
18051 2018-01-29 Richard Biener <rguenther@suse.de>
18053 PR tree-optimization/84057
18054 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18055 removed paths when removing edges.
18057 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18059 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18060 -mfunction-return=@var{choice}.
18062 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18064 PR diagnostic/84034
18065 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18066 Handle CR like TAB.
18067 (layout::print_source_line): Likewise.
18068 (test_get_line_width_without_trailing_whitespace): Add test cases.
18070 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18072 PR middle-end/84040
18073 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18076 2018-01-26 Jim Wilson <jimw@sifive.com>
18078 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18080 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18083 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18085 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18086 and CMP + SUB-immediate -> SUBS.
18088 2018-01-26 Martin Sebor <msebor@redhat.com>
18090 PR tree-optimization/83896
18091 * tree-ssa-strlen.c (get_string_len): Rename...
18092 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18093 Avoid assuming length is constant.
18094 (handle_char_store): Use HOST_WIDE_INT for string length.
18096 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18099 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18100 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18102 2018-01-26 Richard Biener <rguenther@suse.de>
18104 PR rtl-optimization/84003
18105 * dse.c (record_store): Only record redundant stores when
18106 the earlier store aliases at least all accesses the later one does.
18108 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18110 PR rtl-optimization/83985
18111 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18112 REG_CFA_RESTORE insns.
18113 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18114 REG_CFA_RESTORE insns here.
18117 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18118 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18120 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18122 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18123 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18124 (arc_init): Likewise.
18125 (arc_override_options): Likewise.
18126 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18128 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18130 * config/arc/arc.h (TARGET_DBNZ): Define.
18131 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18132 properly set the tune attribute.
18133 (dbnz): Use TARGET_DBNZ guard.
18134 * config/arc/arc.opt (mtune): Add core3 option.
18136 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18138 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18139 recognize new pic like addresses.
18140 (arc_delegitimize_address): Clean up.
18142 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18144 * config/arc/arc-arches.def: Option mrf16 valid for all
18146 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18147 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18148 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18149 * config/arc/arc-tables.opt: Regenerate.
18150 * config/arc/arc.c (arc_conditional_register_usage): Handle
18151 reduced register file case.
18152 (arc_file_start): Set must have build attributes.
18153 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18154 mrf16 option value.
18155 * config/arc/arc.opt (mrf16): Add new option.
18156 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18157 * config/arc/genmultilib.awk: Handle new mrf16 option.
18158 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18159 * config/arc/t-multilib: Regenerate.
18160 * doc/invoke.texi (ARC Options): Document mrf16 option.
18162 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18164 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18165 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18166 (arc_attribute_table): Add 'secure_call' attribute.
18167 (arc_print_operand): Print secure call operand.
18168 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18170 (arc_is_secure_call_p): New function. * config/arc/arc.md
18171 (call_i): Add support for sjli instruction.
18172 (call_value_i): Likewise.
18173 * config/arc/constraints.md (Csc): New constraint.
18175 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18176 John Eric Martin <John.Martin@emmicro-us.com>
18178 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18179 * config/arc/arc.c (_arc_jli_section): New struct.
18180 (arc_jli_section): New type.
18181 (rc_jli_sections): New static variable.
18182 (arc_handle_jli_attribute): New function.
18183 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18184 (arc_file_end): New function.
18185 (TARGET_ASM_FILE_END): Define.
18186 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18187 (arc_add_jli_section): New function.
18188 (jli_call_scan): Likewise.
18189 (arc_reorg): Call jli_call_scan.
18190 (arc_output_addsi): Remove 'S' from printing asm operand.
18191 (arc_is_jli_call_p): New function.
18192 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18194 (movhi_insn): Likewise.
18195 (movsi_insn): Likewise.
18196 (movsi_set_cc_insn): Likewise.
18197 (loadqi_update): Likewise.
18198 (load_zeroextendqisi_update): Likewise.
18199 (load_signextendqisi_update): Likewise.
18200 (loadhi_update): Likewise.
18201 (load_zeroextendhisi_update): Likewise.
18202 (load_signextendhisi_update): Likewise.
18203 (loadsi_update): Likewise.
18204 (loadsf_update): Likewise.
18205 (movsicc_insn): Likewise.
18206 (bset_insn): Likewise.
18207 (bxor_insn): Likewise.
18208 (bclr_insn): Likewise.
18209 (bmsk_insn): Likewise.
18210 (bicsi3_insn): Likewise.
18211 (cmpsi_cc_c_insn): Likewise.
18212 (movsi_ne): Likewise.
18213 (movsi_cond_exec): Likewise.
18214 (clrsbsi2): Likewise.
18215 (norm_f): Likewise.
18225 (call_i): Remove 'S' asm letter, add jli instruction.
18226 (call_value_i): Likewise.
18227 * config/arc/arc.op (mjli-always): New option.
18228 * config/arc/constraints.md (Cji): New constraint.
18229 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18231 (subsf3_fpx): Likewise.
18232 (mulsf3_fpx): Likewise.
18233 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18235 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18236 function attrbutes.
18237 * doc/invoke.texi (ARC): Document mjli-always option.
18239 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
18241 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18242 avoid addition with 0 and use incw and decw where possible.
18244 2018-01-26 Richard Biener <rguenther@suse.de>
18246 PR tree-optimization/81082
18247 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18248 association if it requires casting to unsigned.
18249 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18250 from fold_plusminus_mult_expr to catch important cases late when
18251 range info is available.
18253 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18255 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18256 * configure.ac (hidden_linkonce): New test.
18257 * configure: Regenerate.
18258 * config.in: Regenerate.
18260 2018-01-26 Julia Koval <julia.koval@intel.com>
18262 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18263 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18264 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18265 _mm_mask_bitshuffle_epi64_mask): Fix type.
18266 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18267 USI_FTYPE_V4DI_V4DI_USI): Remove.
18268 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18269 __builtin_ia32_vpshufbitqmb256_mask,
18270 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18271 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18272 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18274 2018-01-26 Alan Modra <amodra@gmail.com>
18277 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18278 UNSPEC_VBPERMQ. Sort other unspecs.
18280 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
18282 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18284 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
18286 PR middle-end/83055
18287 * predict.c (drop_profile): Do not push/pop cfun; update also
18289 (handle_missing_profiles): Fix logic looking for zero profiles.
18291 2018-01-25 Jakub Jelinek <jakub@redhat.com>
18293 PR middle-end/83977
18294 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18295 on functions with #pragma omp declare simd or functions with simd
18297 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18298 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18299 Remove trailing \n from warning_at calls.
18301 2018-01-25 Tom de Vries <tom@codesourcery.com>
18304 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18305 for neutered workers.
18307 2018-01-24 Joseph Myers <joseph@codesourcery.com>
18310 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18311 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18313 2018-01-24 Jeff Law <law@redhat.com>
18316 * i386.c (get_probe_interval): Move to earlier point.
18317 (ix86_compute_frame_layout): If -fstack-clash-protection and
18318 the frame is larger than the probe interval, then use pushes
18319 to save registers rather than reg->mem moves.
18320 (ix86_expand_prologue): Remove conditional for int_registers_saved
18323 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
18326 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18327 min/max for never referenced object.
18329 2018-01-24 Jakub Jelinek <jakub@redhat.com>
18331 PR middle-end/83977
18332 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18334 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18335 attributes from DECL_ATTRIBUTES (decl) without affecting
18336 DECL_ATTRIBUTES (current_function_decl).
18337 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18338 functions with non-NULL DECL_ABSTRACT_ORIGIN.
18340 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
18342 PR tree-optimization/83979
18343 * fold-const.c (fold_comparison): Use constant_boolean_node
18344 instead of boolean_{true,false}_node.
18346 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
18348 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18351 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18353 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18354 Simplify the clause that sets the length attribute.
18355 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18356 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18357 clause that sets the length attribute.
18358 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18360 2018-01-24 Tom de Vries <tom@codesourcery.com>
18363 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18364 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18365 Add strict parameter.
18366 (prevent_branch_around_nothing): Insert dummy insn between branch to
18367 label and label with no ptx insn inbetween.
18368 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18370 2018-01-24 Tom de Vries <tom@codesourcery.com>
18373 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18374 for neutered threads in warp.
18375 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18377 2018-01-24 Richard Biener <rguenther@suse.de>
18379 PR tree-optimization/83176
18380 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18383 2018-01-24 Richard Biener <rguenther@suse.de>
18385 PR tree-optimization/82819
18386 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18387 code generating pluses that are no-ops in the target precision.
18389 2018-01-24 Richard Biener <rguenther@suse.de>
18391 PR middle-end/84000
18392 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18394 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18396 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18397 to merge probabilities.
18398 * predict.c (probably_never_executed): Also mark as cold functions
18399 with global 0 profile and guessed local profile.
18400 * profile-count.c (profile_probability::combine_with_count): New
18402 * profile-count.h (profile_probability::operator*,
18403 profile_probability::operator*=, profile_probability::operator/,
18404 profile_probability::operator/=): Reduce precision to adjusted
18405 and set value to guessed on contradictory divisions.
18406 (profile_probability::combine_with_freq): Remove.
18407 (profile_probability::combine_wiht_count): Declare.
18408 (profile_count::force_nonzero):: Set to adjusted.
18409 (profile_count::probability_in):: Set quality to adjusted.
18410 * tree-ssa-tail-merge.c (replace_block_by): Use
18411 combine_with_count.
18413 2018-01-23 Andrew Waterman <andrew@sifive.com>
18414 Jim Wilson <jimw@sifive.com>
18416 * config/riscv/riscv.c (riscv_stack_boundary): New.
18417 (riscv_option_override): Set riscv_stack_boundary. Handle
18418 riscv_preferred_stack_boundary_arg.
18419 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18420 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18421 (STACK_BOUNDARY): Set to riscv_stack_boundary.
18422 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18423 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18424 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18426 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
18429 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18430 of struct ix86_frame.
18431 (ix86_expand_epilogue): Likewise. Add a local variable for
18432 the reg_save_offset field in struct ix86_frame.
18434 2018-01-23 Bin Cheng <bin.cheng@arm.com>
18436 PR tree-optimization/82604
18437 * tree-loop-distribution.c (enum partition_kind): New enum item
18438 PKIND_PARTIAL_MEMSET.
18439 (partition_builtin_p): Support above new enum item.
18440 (generate_code_for_partition): Ditto.
18441 (compute_access_range): Differentiate cases that equality can be
18442 proven at all loops, the innermost loops or no loops.
18443 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18444 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
18445 (finalize_partitions, distribute_loop): Don't fuse partition of
18446 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18447 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18448 parloop is enabled.
18450 2018-01-23 Martin Liska <mliska@suse.cz>
18452 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18453 order to ignore the predictor.
18454 (PRED_POLYMORPHIC_CALL): Likewise.
18455 (PRED_RECURSIVE_CALL): Likewise.
18457 2018-01-23 Martin Liska <mliska@suse.cz>
18459 * tree-profile.c (tree_profiling): Print function header to
18460 aware reader which function we are working on.
18461 * value-prof.c (gimple_find_values_to_profile): Do not print
18462 not interesting value histograms.
18464 2018-01-23 Martin Liska <mliska@suse.cz>
18466 * profile-count.h (enum profile_quality): Add
18467 profile_uninitialized as the first value. Do not number values
18468 as they are zero based.
18469 (profile_count::verify): Update sanity check.
18470 (profile_probability::verify): Likewise.
18472 2018-01-23 Nathan Sidwell <nathan@acm.org>
18474 * doc/invoke.texi (ffor-scope): Deprecate.
18476 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18478 PR tree-optimization/83510
18479 * domwalk.c (set_all_edges_as_executable): New function.
18480 (dom_walker::dom_walker): Convert bool param
18481 "skip_unreachable_blocks" to enum reachability. Move setup of
18482 edge flags to set_all_edges_as_executable and only do it when
18483 reachability is REACHABLE_BLOCKS.
18484 * domwalk.h (enum dom_walker::reachability): New enum.
18485 (dom_walker::dom_walker): Convert bool param
18486 "skip_unreachable_blocks" to enum reachability.
18487 (set_all_edges_as_executable): New decl.
18488 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
18489 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18491 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18492 but converting true to REACHABLE_BLOCKS.
18493 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18495 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18496 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18497 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18499 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18500 if check_all_array_refs will be called.
18502 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18504 * tree.c (selftest::test_location_wrappers): Add more test
18507 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18509 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18510 (selftest::test_bit_in_range): Likewise.
18512 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18515 * doc/sourcebuild.texi (vect_float): Say that the selector
18516 only describes the situation when -funsafe-math-optimizations is on.
18517 (vect_float_strict): Document.
18519 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18521 PR tree-optimization/83965
18522 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18523 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18524 instead of checking only for a reduction.
18525 (vect_recog_widen_sum_pattern): Likewise.
18527 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18529 * predict.c (probably_never_executed): Only use precise profile info.
18530 (compute_function_frequency): Skip after inlining hack since we now
18531 have quality checking.
18533 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18535 * profile-count.h (profile_probability::very_unlikely,
18536 profile_probability::unlikely, profile_probability::even): Set
18537 precision to guessed.
18539 2018-01-23 Richard Biener <rguenther@suse.de>
18541 PR tree-optimization/83963
18542 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18543 Properly terminate dominator walk when crossing the exit edge not
18544 when visiting its source block.
18546 2018-01-23 Jakub Jelinek <jakub@redhat.com>
18549 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18550 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18552 2018-01-22 Jakub Jelinek <jakub@redhat.com>
18554 PR tree-optimization/83957
18555 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
18556 semicolon after for body surrounded by braces.
18558 PR tree-optimization/83081
18559 * profile-count.h (profile_probability::split): New method.
18560 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18561 Use profile_probability::split.
18562 (do_compare_rtx_and_jump): Fix adjustment of probabilities
18563 when splitting a single conditional jump into 2.
18565 2018-01-22 David Malcolm <dmalcolm@redhat.com>
18567 PR tree-optimization/69452
18568 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18571 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18573 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18574 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18575 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18577 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18579 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18581 * config/rl78/rl78.md (movdi): New define_expand.
18582 * config/rl78/rl78.c (rl78_split_movdi): New function.
18584 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
18587 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18589 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18590 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18591 128-bit to produce an UNSPEC move to get the double word with the
18592 signbit and then a shift directly to do signbit.
18593 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18594 implementation with a new version that just does either a direct
18595 move or a regular move. Move memory interface to separate insns.
18596 Move insns so they are next to the expander.
18597 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18598 with signbit move. Split big and little endian case.
18599 (signbit<mode>2_dm_mem_le): Likewise.
18600 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18601 (signbit<mode>2_dm2): Likewise.
18603 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18605 * config/rl78/rl78.md (anddi3): New define_expand.
18607 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18609 * config/rl78/rl78.md (umindi3): New define_expand.
18611 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18613 * config/rl78/rl78.md (smindi3): New define_expand.
18615 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18617 * config/rl78/rl78.md (smaxdi3): New define_expand.
18619 2018-01-22 Carl Love <cel@us.ibm.com>
18621 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18622 LVX_V1TI): Add macro expansion.
18623 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18624 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18625 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18626 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18627 Change check to determine if the instruction is a byte reversing
18628 entry. Fix typo in comment.
18629 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18630 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18631 Add def_builtin calls for new builtins.
18632 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18633 Add define_insn expansion.
18635 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18637 * config/rl78/rl78.md (umaxdi3): New define_expand.
18639 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18641 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18642 for non-QImode registers.
18644 2018-01-22 Richard Biener <rguenther@suse.de>
18646 PR tree-optimization/83963
18647 * graphite-scop-detection.c (scop_detection::get_sese): Delay
18648 including the loop exit block.
18649 (scop_detection::merge_sese): Likewise.
18650 (scop_detection::add_scop): Do it here instead.
18652 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18654 * doc/sourcebuild.texi (arm_softfloat): Document.
18656 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
18659 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18660 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18661 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18663 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18664 David Edelsohn <dje.gcc@gmail.com>
18667 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18668 Change "crset eq" to "crset 2".
18669 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18670 (*call_indirect_aix<mode>_nospec): Likewise.
18671 (*call_value_indirect_aix<mode>_nospec): Likewise.
18672 (*call_indirect_elfv2<mode>_nospec): Likewise.
18673 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18674 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18675 change assembly output from . to $.
18676 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18677 (indirect_jump<mode>_nospec): Change assembly output from . to $.
18678 (*tablejump<mode>_internal1_nospec): Likewise.
18680 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
18683 * config/sh/sh_optimize_sett_clrt.cc:
18684 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18686 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
18688 PR tree-optimization/83940
18689 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18690 offset_dt to vect_constant_def rather than vect_unknown_def_type.
18691 (vect_check_load_store_mask): Add a mask_dt_out parameter and
18692 use it to pass back the definition type.
18693 (vect_check_store_rhs): Likewise rhs_dt_out.
18694 (vect_build_gather_load_calls): Add a mask_dt argument and use
18695 it instead of a call to vect_is_simple_use.
18696 (vectorizable_store): Update calls to vect_check_load_store_mask
18697 and vect_check_store_rhs. Use the dt returned by the latter instead
18698 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
18699 instead of calls to vect_is_simple_use. Pass the scalar rather
18700 than the vector operand to vect_is_simple_use when handling
18701 second and subsequent copies of an rhs value.
18702 (vectorizable_load): Update calls to vect_check_load_store_mask
18703 and vect_build_gather_load_calls. Use the cached mask_dt and
18704 gs_info.offset_dt instead of calls to vect_is_simple_use.
18706 2018-01-20 Jakub Jelinek <jakub@redhat.com>
18708 PR middle-end/83945
18709 * tree-emutls.c: Include gimplify.h.
18710 (lower_emutls_2): New function.
18711 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18712 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18713 it before further processing.
18716 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18717 UINTVAL (trueop1) instead of INTVAL (op1).
18719 2018-01-19 Jakub Jelinek <jakub@redhat.com>
18723 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18724 INCOMING_FRAME_SP_OFFSET if not defined.
18725 (scan_trace): Add ENTRY argument. If true and
18726 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18727 emit a note to adjust the CFA offset.
18728 (create_cfi_notes): Adjust scan_trace callers.
18729 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18730 INCOMING_FRAME_SP_OFFSET in the CIE.
18731 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18732 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18734 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18735 * doc/tm.texi: Regenerated.
18737 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18739 PR rtl-optimization/83147
18740 * lra-constraints.c (remove_inheritance_pseudos): Use
18741 lra_substitute_pseudo_within_insn.
18743 2018-01-19 Tom de Vries <tom@codesourcery.com>
18744 Cesar Philippidis <cesar@codesourcery.com>
18747 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18749 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
18752 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18753 spaces for function labels.
18755 2018-01-19 Martin Liska <mliska@suse.cz>
18757 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18758 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18759 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18760 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18761 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18762 (PRED_CONST_RETURN): Change from 69 to 65.
18763 (PRED_NULL_RETURN): Change from 91 to 71.
18764 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18765 (PRED_LOOP_GUARD): Change from 66 to 73.
18767 2018-01-19 Martin Liska <mliska@suse.cz>
18769 * predict.c (predict_insn_def): Add new assert.
18770 (struct branch_predictor): Change type to signed integer.
18771 (test_prediction_value_range): Amend test to cover
18772 PROB_UNINITIALIZED.
18773 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18774 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18775 (PRED_LOOP_ITERATIONS_MAX): Likewise.
18776 (PRED_LOOP_IV_COMPARE): Likewise.
18777 * predict.h (PROB_UNINITIALIZED): Define new constant.
18779 2018-01-19 Martin Liska <mliska@suse.cz>
18781 * predict.c (dump_prediction): Add new format for
18782 analyze_brprob.py script which is enabled with -details
18784 * profile-count.h (precise_p): New function.
18786 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
18788 PR tree-optimization/83922
18789 * tree-vect-loop.c (vect_verify_full_masking): Return false if
18790 there are no statements that need masking.
18791 (vect_active_double_reduction_p): New function.
18792 (vect_analyze_loop_operations): Use it when handling phis that
18793 are not in the loop header.
18795 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
18797 PR tree-optimization/83914
18798 * tree-vect-loop.c (vectorizable_induction): Don't convert
18799 init_expr or apply the peeling adjustment for inductions
18800 that are nested within the vectorized loop.
18802 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18804 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18807 2018-01-18 Jakub Jelinek <jakub@redhat.com>
18811 * function.h (gimplify_parameters): Add gimple_seq * argument.
18812 * function.c: Include gimple.h and options.h.
18813 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18814 for the added local temporaries if needed.
18815 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18816 if there are any parameter cleanups, wrap whole body into a
18817 try/finally with the cleanups.
18819 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
18822 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18823 Use GET_MODE_CLASS for scalar floating point.
18825 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
18829 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18830 Fix call of call_cgraph_insertion_hooks.
18832 2018-01-18 Martin Sebor <msebor@redhat.com>
18834 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18836 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
18839 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18842 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
18845 * common.opt: (-ffile-prefix-map): New option.
18846 * opts.c (common_handle_option): Defer it.
18847 * opts-global.c (handle_common_deferred_options): Handle it.
18848 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18849 * file-prefix-map.h: New file.
18850 (remap_debug_filename, add_debug_prefix_map): ...here.
18851 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18852 * final.c (debug_prefix_map, add_debug_prefix_map
18853 remap_debug_filename): Move to...
18854 * file-prefix-map.c: New file.
18855 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18856 generalize, get rid of alloca(), use strrchr() instead of strchr().
18857 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18858 Implement in terms of add_prefix_map().
18859 (remap_macro_filename, remap_debug_filename): Implement in term of
18861 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18862 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18863 * dbxout.c: Include file-prefix-map.h.
18864 * varasm.c: Likewise.
18865 * vmsdbgout.c: Likewise.
18866 * xcoffout.c: Likewise.
18867 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18868 * doc/cppopts.texi (-fmacro-prefix-map): Document.
18869 * doc/invoke.texi (-ffile-prefix-map): Document.
18870 (-fdebug-prefix-map): Update description.
18872 2018-01-18 Martin Liska <mliska@suse.cz>
18874 * config/i386/i386.c (indirect_thunk_name): Document that also
18876 (output_indirect_thunk): Document why both instructions
18877 (pause and lfence) are generated.
18879 2018-01-18 Richard Biener <rguenther@suse.de>
18881 PR tree-optimization/83887
18882 * graphite-scop-detection.c
18883 (scop_detection::get_nearest_dom_with_single_entry): Remove.
18884 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18885 (scop_detection::merge_sese): Re-implement with a flood-fill
18886 algorithm that properly finds a SESE region if it exists.
18888 2018-01-18 Jakub Jelinek <jakub@redhat.com>
18891 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18892 pointer_diff optimizations use view_convert instead of convert.
18894 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18896 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18897 Generate different code for -mno-speculate-indirect-jumps.
18898 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18899 (*call_indirect_aix<mode>): Disable for
18900 -mno-speculate-indirect-jumps.
18901 (*call_indirect_aix<mode>_nospec): New define_insn.
18902 (*call_value_indirect_aix<mode>): Disable for
18903 -mno-speculate-indirect-jumps.
18904 (*call_value_indirect_aix<mode>_nospec): New define_insn.
18905 (*sibcall_nonlocal_sysv<mode>): Generate different code for
18906 -mno-speculate-indirect-jumps.
18907 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18909 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18911 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18912 long double type, set the flags for noting the default long double
18913 type, even if we don't pass or return a long double type.
18915 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
18918 * ipa-inline.c (flatten_function): Do not overwrite final inlining
18921 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
18923 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18924 support for merge[hl].
18925 (fold_mergehl_helper): New helper function.
18926 (tree-vector-builder.h): New #include for tree_vector_builder usage.
18927 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18928 (altivec_vmrglw_direct): Add xxmrglw insn.
18930 2018-01-17 Andrew Waterman <andrew@sifive.com>
18932 * config/riscv/riscv.c (riscv_conditional_register_usage): If
18933 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18935 2018-01-17 David Malcolm <dmalcolm@redhat.com>
18938 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18939 call the lto_location_cache before reading the
18940 DECL_SOURCE_LOCATION of the types.
18942 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
18943 Richard Sandiford <richard.sandiford@linaro.org>
18945 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18946 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18947 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18948 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18949 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18951 * config/aarch64/constraints.md (aarch64_movti_operand):
18953 * config/aarch64/predicates.md (Uti): Add new constraint.
18955 2018-01-17 Carl Love <cel@us.ibm.com>
18957 * config/rs6000/vsx.md (define_expand xl_len_r,
18958 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18959 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18961 (define_expand, define_insn): Move the shift left from the
18962 define_insn to the define_expand for lxvl and stxvl instructions.
18963 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18964 and XL_LEN_R definitions to PURE.
18966 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
18968 * config/i386/i386.c (indirect_thunk_name): Declare regno
18969 as unsigned int. Compare regno with INVALID_REGNUM.
18970 (output_indirect_thunk): Ditto.
18971 (output_indirect_thunk_function): Ditto.
18972 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
18973 in the call to output_indirect_thunk_function.
18975 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
18977 PR middle-end/83884
18978 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18979 rather than the size of inner_type to determine the stack slot size
18980 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18982 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
18985 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18988 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
18990 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18991 endian Linux systems to optionally enable multilibs for selecting
18992 the long double type if the user configured an explicit type.
18993 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18994 have no long double multilibs if not defined.
18995 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18996 warn if the user used -mabi={ieee,ibm}longdouble and we built
18997 multilibs for long double.
18998 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18999 appropriate multilib option.
19000 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19002 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19003 for building long double multilibs.
19004 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19006 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19008 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19011 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19013 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19016 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19019 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19022 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19024 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19025 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19027 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19029 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19030 different rtl trees depending on TARGET_64BIT.
19031 (rs6000_gen_lvx): Likewise.
19033 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19035 * config/visium/visium.md (nop): Tweak comment.
19036 (hazard_nop): Likewise.
19038 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19040 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19041 -mspeculate-indirect-jumps.
19042 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19043 for -mno-speculate-indirect-jumps.
19044 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19045 (*call_value_indirect_elfv2<mode>): Disable for
19046 -mno-speculate-indirect-jumps.
19047 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19048 (indirect_jump): Emit different RTL for
19049 -mno-speculate-indirect-jumps.
19050 (*indirect_jump<mode>): Disable for
19051 -mno-speculate-indirect-jumps.
19052 (*indirect_jump<mode>_nospec): New define_insn.
19053 (tablejump): Emit different RTL for
19054 -mno-speculate-indirect-jumps.
19055 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19056 (tablejumpsi_nospec): New define_expand.
19057 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19058 (tablejumpdi_nospec): New define_expand.
19059 (*tablejump<mode>_internal1): Disable for
19060 -mno-speculate-indirect-jumps.
19061 (*tablejump<mode>_internal1_nospec): New define_insn.
19062 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19065 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19067 * caller-save.c (insert_save): Drop unnecessary parameter. All
19070 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19071 Richard Biener <rguenth@suse.de>
19074 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19075 return early, inline manually is_gimple_sizepos. Make sure if we
19076 call gimplify_expr we don't end up with a gimple constant.
19077 * tree.c (variably_modified_type_p): Don't return true for
19078 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19079 * gimplify.h (is_gimple_sizepos): Remove.
19081 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19083 PR tree-optimization/83857
19084 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19085 vectorizable_live_operation for pure SLP statements.
19086 (vectorizable_live_operation): Handle PHIs.
19088 2018-01-16 Richard Biener <rguenther@suse.de>
19090 PR tree-optimization/83867
19091 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19092 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19094 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19097 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19098 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19099 If off is not INTEGER_CST, issue a may not be aligned warning
19100 rather than isn't aligned. Use isn%'t rather than isn't.
19101 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19103 <case MULT_EXPR>: Improve the case when bottom and one of the
19104 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19105 operand, in that case check if the other operand is multiple of
19106 bottom divided by the INTEGER_CST operand.
19108 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19111 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19112 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19113 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19114 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19115 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19116 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19117 (pa_function_arg_size): New function.
19119 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19121 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19122 in a separate statement.
19124 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19126 PR tree-optimization/83847
19127 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19128 group gathers and scatters.
19130 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19132 PR rtl-optimization/86620
19133 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19135 PR rtl-optimization/83213
19136 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19137 to last if both are JUMP_INSNs.
19139 PR tree-optimization/83843
19140 * gimple-ssa-store-merging.c
19141 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19142 store_immediate_info for bswap/nop orig_stores.
19144 2018-01-15 Andrew Waterman <andrew@sifive.com>
19146 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19148 <UDIV>: Increase cost if !TARGET_DIV.
19150 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19152 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19153 (define_attr "cr_logical_3op"): New.
19154 (cceq_ior_compare): Adjust.
19155 (cceq_ior_compare_complement): Adjust.
19156 (*cceq_rev_compare): Adjust.
19157 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19158 (is_cracked_insn): Adjust.
19159 (insn_must_be_first_in_group): Adjust.
19160 * config/rs6000/40x.md: Adjust.
19161 * config/rs6000/440.md: Adjust.
19162 * config/rs6000/476.md: Adjust.
19163 * config/rs6000/601.md: Adjust.
19164 * config/rs6000/603.md: Adjust.
19165 * config/rs6000/6xx.md: Adjust.
19166 * config/rs6000/7450.md: Adjust.
19167 * config/rs6000/7xx.md: Adjust.
19168 * config/rs6000/8540.md: Adjust.
19169 * config/rs6000/cell.md: Adjust.
19170 * config/rs6000/e300c2c3.md: Adjust.
19171 * config/rs6000/e500mc.md: Adjust.
19172 * config/rs6000/e500mc64.md: Adjust.
19173 * config/rs6000/e5500.md: Adjust.
19174 * config/rs6000/e6500.md: Adjust.
19175 * config/rs6000/mpc.md: Adjust.
19176 * config/rs6000/power4.md: Adjust.
19177 * config/rs6000/power5.md: Adjust.
19178 * config/rs6000/power6.md: Adjust.
19179 * config/rs6000/power7.md: Adjust.
19180 * config/rs6000/power8.md: Adjust.
19181 * config/rs6000/power9.md: Adjust.
19182 * config/rs6000/rs64.md: Adjust.
19183 * config/rs6000/titan.md: Adjust.
19185 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19187 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19188 ix86_indirect_branch_register logic.
19190 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19192 * config/i386/constraints.md (Bs): Update
19193 ix86_indirect_branch_register check. Don't check
19194 ix86_indirect_branch_register with GOT_memory_operand.
19196 * config/i386/predicates.md (GOT_memory_operand): Don't check
19197 ix86_indirect_branch_register here.
19198 (GOT32_symbol_operand): Likewise.
19200 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19202 * config/i386/predicates.md (constant_call_address_operand):
19203 Rewrite ix86_indirect_branch_register logic.
19204 (sibcall_insn_operand): Likewise.
19206 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19208 * config/i386/constraints.md (Bs): Replace
19209 ix86_indirect_branch_thunk_register with
19210 ix86_indirect_branch_register.
19212 * config/i386/i386.md (indirect_jump): Likewise.
19213 (tablejump): Likewise.
19214 (*sibcall_memory): Likewise.
19215 (*sibcall_value_memory): Likewise.
19216 Peepholes of indirect call and jump via memory: Likewise.
19217 * config/i386/i386.opt: Likewise.
19218 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19219 (GOT_memory_operand): Likewise.
19220 (call_insn_operand): Likewise.
19221 (sibcall_insn_operand): Likewise.
19222 (GOT32_symbol_operand): Likewise.
19224 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19226 PR middle-end/83837
19227 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19228 type rather than type addr's type points to.
19229 (expand_omp_atomic_mutex): Likewise.
19230 (expand_omp_atomic): Likewise.
19232 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19235 * config/i386/i386.c (output_indirect_thunk_function): Use
19236 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19237 for __x86_return_thunk.
19239 2018-01-15 Richard Biener <rguenther@suse.de>
19241 PR middle-end/83850
19242 * expmed.c (extract_bit_field_1): Fix typo.
19244 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19247 * config/arm/iterators.md (VF): New mode iterator.
19248 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19249 Remove integer-related logic from pattern.
19250 (neon_vabd<mode>_3): Likewise.
19252 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19254 PR middle-end/82694
19255 * common.opt (fstrict-overflow): No longer an alias.
19256 (fwrapv-pointer): New option.
19257 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19258 also for pointer types based on flag_wrapv_pointer.
19259 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19260 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19261 opts->x_flag_wrapv got set.
19262 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19263 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19264 POINTER_TYPE_OVERFLOW_UNDEFINED.
19265 * match.pd: Likewise in address comparison pattern.
19266 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19268 2018-01-15 Richard Biener <rguenther@suse.de>
19271 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19272 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
19273 Reset type names to their identifier if their TYPE_DECL doesn't
19274 have linkage (and thus is used for ODR and devirt).
19275 (save_debug_info_for_decl): Remove.
19276 (save_debug_info_for_type): Likewise.
19277 (add_tree_to_fld_list): Adjust.
19278 * tree-pretty-print.c (dump_generic_node): Make dumping of
19279 type names more robust.
19281 2018-01-15 Richard Biener <rguenther@suse.de>
19283 * BASE-VER: Bump to 8.0.1.
19285 2018-01-14 Martin Sebor <msebor@redhat.com>
19288 * builtins.c (check_access): Avoid warning when the no-warning bit
19291 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
19293 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19294 * ira-color (allocno_hard_regs_compare): Likewise.
19296 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
19299 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19300 Use .pushsection/.popsection.
19302 2018-01-14 Martin Sebor <msebor@redhat.com>
19305 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19307 2018-01-14 Jakub Jelinek <jakub@redhat.com>
19309 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19310 entry from extra_headers.
19311 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19312 extra_headers, make the list bitwise identical to the i?86-*-* one.
19314 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19316 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19317 -mcmodel=large with -mindirect-branch=thunk,
19318 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19319 -mfunction-return=thunk-extern.
19320 * doc/invoke.texi: Document -mcmodel=large is incompatible with
19321 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19322 -mfunction-return=thunk and -mfunction-return=thunk-extern.
19324 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19326 * config/i386/i386.c (print_reg): Print the name of the full
19327 integer register without '%'.
19328 (ix86_print_operand): Handle 'V'.
19329 * doc/extend.texi: Document 'V' modifier.
19331 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19333 * config/i386/constraints.md (Bs): Disallow memory operand for
19334 -mindirect-branch-register.
19336 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19337 (GOT_memory_operand): Likewise.
19338 (call_insn_operand): Likewise.
19339 (sibcall_insn_operand): Likewise.
19340 (GOT32_symbol_operand): Likewise.
19341 * config/i386/i386.md (indirect_jump): Call convert_memory_address
19342 for -mindirect-branch-register.
19343 (tablejump): Likewise.
19344 (*sibcall_memory): Likewise.
19345 (*sibcall_value_memory): Likewise.
19346 Disallow peepholes of indirect call and jump via memory for
19347 -mindirect-branch-register.
19348 (*call_pop): Replace m with Bw.
19349 (*call_value_pop): Likewise.
19350 (*sibcall_pop_memory): Replace m with Bs.
19351 * config/i386/i386.opt (mindirect-branch-register): New option.
19352 * doc/invoke.texi: Document -mindirect-branch-register option.
19354 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19356 * config/i386/i386-protos.h (ix86_output_function_return): New.
19357 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19358 set function_return_type.
19359 (indirect_thunk_name): Add ret_p to indicate thunk for function
19361 (output_indirect_thunk_function): Pass false to
19362 indirect_thunk_name.
19363 (ix86_output_indirect_branch_via_reg): Likewise.
19364 (ix86_output_indirect_branch_via_push): Likewise.
19365 (output_indirect_thunk_function): Create alias for function
19366 return thunk if regno < 0.
19367 (ix86_output_function_return): New function.
19368 (ix86_handle_fndecl_attribute): Handle function_return.
19369 (ix86_attribute_table): Add function_return.
19370 * config/i386/i386.h (machine_function): Add
19371 function_return_type.
19372 * config/i386/i386.md (simple_return_internal): Use
19373 ix86_output_function_return.
19374 (simple_return_internal_long): Likewise.
19375 * config/i386/i386.opt (mfunction-return=): New option.
19376 (indirect_branch): Mention -mfunction-return=.
19377 * doc/extend.texi: Document function_return function attribute.
19378 * doc/invoke.texi: Document -mfunction-return= option.
19380 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19382 * config/i386/i386-opts.h (indirect_branch): New.
19383 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19384 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19385 with local indirect jump when converting indirect call and jump.
19386 (ix86_set_indirect_branch_type): New.
19387 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19388 (indirectlabelno): New.
19389 (indirect_thunk_needed): Likewise.
19390 (indirect_thunk_bnd_needed): Likewise.
19391 (indirect_thunks_used): Likewise.
19392 (indirect_thunks_bnd_used): Likewise.
19393 (INDIRECT_LABEL): Likewise.
19394 (indirect_thunk_name): Likewise.
19395 (output_indirect_thunk): Likewise.
19396 (output_indirect_thunk_function): Likewise.
19397 (ix86_output_indirect_branch_via_reg): Likewise.
19398 (ix86_output_indirect_branch_via_push): Likewise.
19399 (ix86_output_indirect_branch): Likewise.
19400 (ix86_output_indirect_jmp): Likewise.
19401 (ix86_code_end): Call output_indirect_thunk_function if needed.
19402 (ix86_output_call_insn): Call ix86_output_indirect_branch if
19404 (ix86_handle_fndecl_attribute): Handle indirect_branch.
19405 (ix86_attribute_table): Add indirect_branch.
19406 * config/i386/i386.h (machine_function): Add indirect_branch_type
19407 and has_local_indirect_jump.
19408 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19410 (tablejump): Likewise.
19411 (*indirect_jump): Use ix86_output_indirect_jmp.
19412 (*tablejump_1): Likewise.
19413 (simple_return_indirect_internal): Likewise.
19414 * config/i386/i386.opt (mindirect-branch=): New option.
19415 (indirect_branch): New.
19418 (thunk-inline): Likewise.
19419 (thunk-extern): Likewise.
19420 * doc/extend.texi: Document indirect_branch function attribute.
19421 * doc/invoke.texi: Document -mindirect-branch= option.
19423 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
19426 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19428 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
19430 * ipa-inline.c (want_inline_small_function_p): Return false if
19431 inlining has already failed with CIF_FINAL_ERROR.
19432 (update_caller_keys): Call want_inline_small_function_p before
19434 (update_callee_keys): Likewise.
19436 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19438 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19440 (rs6000_quadword_masked_address_p): Likewise.
19441 (quad_aligned_load_p): Likewise.
19442 (quad_aligned_store_p): Likewise.
19443 (const_load_sequence_p): Add comment to describe the outer-most loop.
19444 (mimic_memory_attributes_and_flags): New function.
19445 (rs6000_gen_stvx): Likewise.
19446 (replace_swapped_aligned_store): Likewise.
19447 (rs6000_gen_lvx): Likewise.
19448 (replace_swapped_aligned_load): Likewise.
19449 (replace_swapped_load_constant): Capitalize argument name in
19450 comment describing this function.
19451 (rs6000_analyze_swaps): Add a third pass to search for vector loads
19452 and stores that access quad-word aligned addresses and replace
19453 with stvx or lvx instructions when appropriate.
19454 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19455 New function prototype.
19456 (rs6000_quadword_masked_address_p): Likewise.
19457 (rs6000_gen_lvx): Likewise.
19458 (rs6000_gen_stvx): Likewise.
19459 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19460 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19461 when memory address is aligned.
19462 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19463 this split to select lvx instruction when memory address is aligned.
19464 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19465 instruction when memory address is aligned.
19466 (*vsx_le_perm_load_v16qi): Likewise.
19467 (four unnamed splitters): Modify to select the stvx instruction
19468 when memory is aligned.
19470 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
19472 * predict.c (determine_unlikely_bbs): Handle correctly BBs
19473 which appears in the queue multiple times.
19475 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19476 Alan Hayward <alan.hayward@arm.com>
19477 David Sherwood <david.sherwood@arm.com>
19479 * tree-vectorizer.h (vec_lower_bound): New structure.
19480 (_loop_vec_info): Add check_nonzero and lower_bounds.
19481 (LOOP_VINFO_CHECK_NONZERO): New macro.
19482 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19483 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19484 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19485 fields. Make seg_len the distance travelled, not including the
19487 (dr_direction_indicator): Declare.
19488 (dr_zero_step_indicator): Likewise.
19489 (dr_known_forward_stride_p): Likewise.
19490 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19492 (runtime_alias_check_p): Allow runtime alias checks with
19494 (operator ==): Compare access_size and align.
19495 (prune_runtime_alias_test_list): Rework for new distinction between
19496 the access_size and seg_len.
19497 (create_intersect_range_checks_index): Likewise. Cope with polynomial
19499 (get_segment_min_max): New function.
19500 (create_intersect_range_checks): Use it.
19501 (dr_step_indicator): New function.
19502 (dr_direction_indicator): Likewise.
19503 (dr_zero_step_indicator): Likewise.
19504 (dr_known_forward_stride_p): Likewise.
19505 * tree-loop-distribution.c (data_ref_segment_size): Return
19506 DR_STEP * (niters - 1).
19507 (compute_alias_check_pairs): Update call to the dr_with_seg_len
19509 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19510 (vect_preserves_scalar_order_p): New function, split out from...
19511 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
19512 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19513 (vect_vfa_access_size): New function.
19514 (vect_vfa_align): Likewise.
19515 (vect_compile_time_alias): Take access_size_a and access_b arguments.
19516 (dump_lower_bound): New function.
19517 (vect_check_lower_bound): Likewise.
19518 (vect_small_gap_p): Likewise.
19519 (vectorizable_with_step_bound_p): Likewise.
19520 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19521 depencies if the vectorization factor is 1. Convert the checks
19522 for nonzero steps into checks on the bounds of DR_STEP. Try using
19523 a bunds check for variable steps if the minimum required step is
19524 relatively small. Update calls to the dr_with_seg_len
19525 constructor and to vect_compile_time_alias.
19526 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19528 (vect_loop_versioning): Call it.
19529 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19531 (vect_estimate_min_profitable_iters): Account for any bounds checks.
19533 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19534 Alan Hayward <alan.hayward@arm.com>
19535 David Sherwood <david.sherwood@arm.com>
19537 * doc/sourcebuild.texi (vect_scatter_store): Document.
19538 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19540 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19542 * genopinit.c (main): Add supports_vec_scatter_store and
19543 supports_vec_scatter_store_cached to target_optabs.
19544 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19545 IFN_MASK_SCATTER_STORE.
19546 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19548 * internal-fn.h (internal_store_fn_p): Declare.
19549 (internal_fn_stored_value_index): Likewise.
19550 * internal-fn.c (scatter_store_direct): New macro.
19551 (expand_scatter_store_optab_fn): New function.
19552 (direct_scatter_store_optab_supported_p): New macro.
19553 (internal_store_fn_p): New function.
19554 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19555 IFN_MASK_SCATTER_STORE.
19556 (internal_fn_mask_index): Likewise.
19557 (internal_fn_stored_value_index): New function.
19558 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19559 for scatter stores.
19560 * optabs-query.h (supports_vec_scatter_store_p): Declare.
19561 * optabs-query.c (supports_vec_scatter_store_p): New function.
19562 * tree-vectorizer.h (vect_get_store_rhs): Declare.
19563 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19564 true for scatter stores.
19565 (vect_gather_scatter_fn_p): Handle scatter stores too.
19566 (vect_check_gather_scatter): Consider using scatter stores if
19567 supports_vec_scatter_store_p.
19568 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19569 scatter stores too.
19570 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19571 internal_fn_stored_value_index.
19572 (check_load_store_masking): Handle scatter stores too.
19573 (vect_get_store_rhs): Make public.
19574 (vectorizable_call): Use internal_store_fn_p.
19575 (vectorizable_store): Handle scatter store internal functions.
19576 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19577 when deciding whether the end of the group has been reached.
19578 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19579 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19580 (mask_scatter_store<mode>): New insns.
19582 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19583 Alan Hayward <alan.hayward@arm.com>
19584 David Sherwood <david.sherwood@arm.com>
19586 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19587 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19588 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19590 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19591 Use vect_truncate_gather_scatter_offset if we can't treat the
19592 operation as a normal gather load or scatter store.
19593 (get_group_load_store_type): Take the gather_scatter_info
19594 as argument. Try using a gather load or scatter store for
19595 single-element groups.
19596 (get_load_store_type): Update calls to get_group_load_store_type
19597 and vect_use_strided_gather_scatters_p.
19599 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19600 Alan Hayward <alan.hayward@arm.com>
19601 David Sherwood <david.sherwood@arm.com>
19603 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19604 optional tree argument.
19605 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19607 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19608 but continue to use the current value as a fallback.
19609 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19610 to compare the updates.
19611 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19612 (get_load_store_type): Use it when handling a strided access.
19613 (vect_get_strided_load_store_ops): New function.
19614 (vect_get_data_ptr_increment): Likewise.
19615 (vectorizable_load): Handle strided gather loads. Always pass
19616 a step to vect_create_data_ref_ptr and bump_vector_ptr.
19618 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19619 Alan Hayward <alan.hayward@arm.com>
19620 David Sherwood <david.sherwood@arm.com>
19622 * doc/md.texi (gather_load@var{m}): Document.
19623 (mask_gather_load@var{m}): Likewise.
19624 * genopinit.c (main): Add supports_vec_gather_load and
19625 supports_vec_gather_load_cached to target_optabs.
19626 * optabs-tree.c (init_tree_optimization_optabs): Use
19627 ggc_cleared_alloc to allocate target_optabs.
19628 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19629 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19631 * internal-fn.h (internal_load_fn_p): Declare.
19632 (internal_gather_scatter_fn_p): Likewise.
19633 (internal_fn_mask_index): Likewise.
19634 (internal_gather_scatter_fn_supported_p): Likewise.
19635 * internal-fn.c (gather_load_direct): New macro.
19636 (expand_gather_load_optab_fn): New function.
19637 (direct_gather_load_optab_supported_p): New macro.
19638 (direct_internal_fn_optab): New function.
19639 (internal_load_fn_p): Likewise.
19640 (internal_gather_scatter_fn_p): Likewise.
19641 (internal_fn_mask_index): Likewise.
19642 (internal_gather_scatter_fn_supported_p): Likewise.
19643 * optabs-query.c (supports_at_least_one_mode_p): New function.
19644 (supports_vec_gather_load_p): Likewise.
19645 * optabs-query.h (supports_vec_gather_load_p): Declare.
19646 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19647 and memory_type field.
19648 (NUM_PATTERNS): Bump to 15.
19649 * tree-vect-data-refs.c: Include internal-fn.h.
19650 (vect_gather_scatter_fn_p): New function.
19651 (vect_describe_gather_scatter_call): Likewise.
19652 (vect_check_gather_scatter): Try using internal functions for
19653 gather loads. Recognize existing calls to a gather load function.
19654 (vect_analyze_data_refs): Consider using gather loads if
19655 supports_vec_gather_load_p.
19656 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19657 (vect_get_gather_scatter_offset_type): Likewise.
19658 (vect_convert_mask_for_vectype): Likewise.
19659 (vect_add_conversion_to_patterm): Likewise.
19660 (vect_try_gather_scatter_pattern): Likewise.
19661 (vect_recog_gather_scatter_pattern): New pattern recognizer.
19662 (vect_vect_recog_func_ptrs): Add it.
19663 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19664 internal_fn_mask_index and internal_gather_scatter_fn_p.
19665 (check_load_store_masking): Take the gather_scatter_info as an
19666 argument and handle gather loads.
19667 (vect_get_gather_scatter_ops): New function.
19668 (vectorizable_call): Check internal_load_fn_p.
19669 (vectorizable_load): Likewise. Handle gather load internal
19671 (vectorizable_store): Update call to check_load_store_masking.
19672 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19673 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19674 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19675 (aarch64_gather_scale_operand_d): New predicates.
19676 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19677 (mask_gather_load<mode>): New insns.
19679 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19680 Alan Hayward <alan.hayward@arm.com>
19681 David Sherwood <david.sherwood@arm.com>
19683 * optabs.def (fold_left_plus_optab): New optab.
19684 * doc/md.texi (fold_left_plus_@var{m}): Document.
19685 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19686 * internal-fn.c (fold_left_direct): Define.
19687 (expand_fold_left_optab_fn): Likewise.
19688 (direct_fold_left_optab_supported_p): Likewise.
19689 * fold-const-call.c (fold_const_fold_left): New function.
19690 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19691 * tree-parloops.c (valid_reduction_p): New function.
19692 (gather_scalar_reductions): Use it.
19693 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19694 (vect_finish_replace_stmt): Declare.
19695 * tree-vect-loop.c (fold_left_reduction_fn): New function.
19696 (needs_fold_left_reduction_p): New function, split out from...
19697 (vect_is_simple_reduction): ...here. Accept reductions that
19698 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19699 (vect_force_simple_reduction): Also store the reduction type in
19700 the assignment's STMT_VINFO_REDUC_TYPE.
19701 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19702 (merge_with_identity): New function.
19703 (vect_expand_fold_left): Likewise.
19704 (vectorize_fold_left_reduction): Likewise.
19705 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
19706 scalar phi in place for it. Check for target support and reject
19707 cases that would reassociate the operation. Defer the transform
19708 phase to vectorize_fold_left_reduction.
19709 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19710 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19711 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19713 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19715 * tree-if-conv.c (predicate_mem_writes): Remove redundant
19716 call to ifc_temp_var.
19718 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19719 Alan Hayward <alan.hayward@arm.com>
19720 David Sherwood <david.sherwood@arm.com>
19722 * target.def (legitimize_address_displacement): Take the original
19723 offset as a poly_int.
19724 * targhooks.h (default_legitimize_address_displacement): Update
19726 * targhooks.c (default_legitimize_address_displacement): Likewise.
19727 * doc/tm.texi: Regenerate.
19728 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19729 as an argument, moving assert of ad->disp == ad->disp_term to...
19730 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
19731 Try calling targetm.legitimize_address_displacement before expanding
19732 the address rather than afterwards, and adjust for the new interface.
19733 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19734 Match the new hook interface. Handle SVE addresses.
19735 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19736 new hook interface.
19738 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19740 * Makefile.in (OBJS): Add early-remat.o.
19741 * target.def (select_early_remat_modes): New hook.
19742 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19743 * doc/tm.texi: Regenerate.
19744 * targhooks.h (default_select_early_remat_modes): Declare.
19745 * targhooks.c (default_select_early_remat_modes): New function.
19746 * timevar.def (TV_EARLY_REMAT): New timevar.
19747 * passes.def (pass_early_remat): New pass.
19748 * tree-pass.h (make_pass_early_remat): Declare.
19749 * early-remat.c: New file.
19750 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19752 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19754 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19755 Alan Hayward <alan.hayward@arm.com>
19756 David Sherwood <david.sherwood@arm.com>
19758 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19759 vfm1 with a bound_epilog parameter.
19760 (vect_do_peeling): Update calls accordingly, and move the prologue
19761 call earlier in the function. Treat the base bound_epilog as 0 for
19762 fully-masked loops and retain vf - 1 for other loops. Add 1 to
19763 this base when peeling for gaps.
19764 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19765 with fully-masked loops.
19766 (vect_estimate_min_profitable_iters): Handle the single peeled
19767 iteration in that case.
19769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19770 Alan Hayward <alan.hayward@arm.com>
19771 David Sherwood <david.sherwood@arm.com>
19773 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19774 single-element interleaving even if the size is not a power of 2.
19775 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19776 accesses for single-element interleaving if the group size is
19779 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19780 Alan Hayward <alan.hayward@arm.com>
19781 David Sherwood <david.sherwood@arm.com>
19783 * doc/md.texi (fold_extract_last_@var{m}): Document.
19784 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19785 * optabs.def (fold_extract_last_optab): New optab.
19786 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19787 * internal-fn.c (fold_extract_direct): New macro.
19788 (expand_fold_extract_optab_fn): Likewise.
19789 (direct_fold_extract_optab_supported_p): Likewise.
19790 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19791 * tree-vect-loop.c (vect_model_reduction_cost): Handle
19792 EXTRACT_LAST_REDUCTION.
19793 (get_initial_def_for_reduction): Do not create an initial vector
19794 for EXTRACT_LAST_REDUCTION reductions.
19795 (vectorizable_reduction): Leave the scalar phi in place for
19796 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
19797 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
19798 epilogue code for EXTRACT_LAST_REDUCTION and defer the
19799 transform phase to vectorizable_condition.
19800 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19802 (vect_finish_stmt_generation): ...here.
19803 (vect_finish_replace_stmt): New function.
19804 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19805 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19807 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19809 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19810 Alan Hayward <alan.hayward@arm.com>
19811 David Sherwood <david.sherwood@arm.com>
19813 * doc/md.texi (extract_last_@var{m}): Document.
19814 * optabs.def (extract_last_optab): New optab.
19815 * internal-fn.def (EXTRACT_LAST): New internal function.
19816 * internal-fn.c (cond_unary_direct): New macro.
19817 (expand_cond_unary_optab_fn): Likewise.
19818 (direct_cond_unary_optab_supported_p): Likewise.
19819 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19820 loops using EXTRACT_LAST.
19821 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19822 (extract_last_<mode>): ...this optab.
19823 (vec_extract<mode><Vel>): Update accordingly.
19825 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19826 Alan Hayward <alan.hayward@arm.com>
19827 David Sherwood <david.sherwood@arm.com>
19829 * target.def (empty_mask_is_expensive): New hook.
19830 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19831 * doc/tm.texi: Regenerate.
19832 * targhooks.h (default_empty_mask_is_expensive): Declare.
19833 * targhooks.c (default_empty_mask_is_expensive): New function.
19834 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19835 if the target says that empty masks are expensive.
19836 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19838 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19840 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19841 Alan Hayward <alan.hayward@arm.com>
19842 David Sherwood <david.sherwood@arm.com>
19844 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19845 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19846 (vect_use_loop_mask_for_alignment_p): New function.
19847 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19848 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19849 niters_skip argument. Make sure that the first niters_skip elements
19850 of the first iteration are inactive.
19851 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19852 Update call to vect_set_loop_masks_directly.
19853 (get_misalign_in_elems): New function, split out from...
19854 (vect_gen_prolog_loop_niters): ...here.
19855 (vect_update_init_of_dr): Take a code argument that specifies whether
19856 the adjustment should be added or subtracted.
19857 (vect_update_init_of_drs): Likewise.
19858 (vect_prepare_for_masked_peels): New function.
19859 (vect_do_peeling): Skip prologue peeling if we're using a mask
19860 instead. Update call to vect_update_inits_of_drs.
19861 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19863 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19864 alignment. Do not include the number of peeled iterations in
19865 the minimum threshold in that case.
19866 (vectorizable_induction): Adjust the start value down by
19867 LOOP_VINFO_MASK_SKIP_NITERS iterations.
19868 (vect_transform_loop): Call vect_prepare_for_masked_peels.
19869 Take the number of skipped iterations into account when calculating
19871 * tree-vect-stmts.c (vect_gen_while_not): New function.
19873 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19874 Alan Hayward <alan.hayward@arm.com>
19875 David Sherwood <david.sherwood@arm.com>
19877 * doc/sourcebuild.texi (vect_fully_masked): Document.
19878 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19879 default value to 0.
19880 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19882 (vect_analyze_loop_2): ...here. Don't check the vectorization
19883 factor against the number of loop iterations if the loop is
19886 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19887 Alan Hayward <alan.hayward@arm.com>
19888 David Sherwood <david.sherwood@arm.com>
19890 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19891 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19892 (dump_groups): Update accordingly.
19893 (iv_use::mem_type): New member variable.
19894 (address_p): New function.
19895 (record_use): Add a mem_type argument and initialize the new
19897 (record_group_use): Add a mem_type argument. Use address_p.
19898 Remove obsolete null checks of base_object. Update call to record_use.
19899 (find_interesting_uses_op): Update call to record_group_use.
19900 (find_interesting_uses_cond): Likewise.
19901 (find_interesting_uses_address): Likewise.
19902 (get_mem_type_for_internal_fn): New function.
19903 (find_address_like_use): Likewise.
19904 (find_interesting_uses_stmt): Try find_address_like_use before
19905 calling find_interesting_uses_op.
19906 (addr_offset_valid_p): Use the iv mem_type field as the type
19907 of the addressed memory.
19908 (add_autoinc_candidates): Likewise.
19909 (get_address_cost): Likewise.
19910 (split_small_address_groups_p): Use address_p.
19911 (split_address_groups): Likewise.
19912 (add_iv_candidate_for_use): Likewise.
19913 (autoinc_possible_for_pair): Likewise.
19914 (rewrite_groups): Likewise.
19915 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19916 (determine_group_iv_cost): Update after split of USE_ADDRESS.
19917 (get_alias_ptr_type_for_ptr_address): New function.
19918 (rewrite_use_address): Rewrite address uses in calls that were
19919 identified by find_address_like_use.
19921 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19922 Alan Hayward <alan.hayward@arm.com>
19923 David Sherwood <david.sherwood@arm.com>
19925 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19927 * gimple-expr.h (is_gimple_addressable: Likewise.
19928 * gimple-expr.c (is_gimple_address): Likewise.
19929 * internal-fn.c (expand_call_mem_ref): New function.
19930 (expand_mask_load_optab_fn): Use it.
19931 (expand_mask_store_optab_fn): Likewise.
19933 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19934 Alan Hayward <alan.hayward@arm.com>
19935 David Sherwood <david.sherwood@arm.com>
19937 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19938 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19939 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19940 (cond_umax@var{mode}): Document.
19941 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19942 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19943 (cond_umin_optab, cond_umax_optab): New optabs.
19944 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19945 (COND_IOR, COND_XOR): New internal functions.
19946 * internal-fn.h (get_conditional_internal_fn): Declare.
19947 * internal-fn.c (cond_binary_direct): New macro.
19948 (expand_cond_binary_optab_fn): Likewise.
19949 (direct_cond_binary_optab_supported_p): Likewise.
19950 (get_conditional_internal_fn): New function.
19951 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19952 Cope with reduction statements that are vectorized as calls rather
19954 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19955 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19956 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19957 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19958 (UNSPEC_COND_EOR): New unspecs.
19959 (optab): Add mappings for them.
19960 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19961 (sve_int_op, sve_fp_op): New int attributes.
19963 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19964 Alan Hayward <alan.hayward@arm.com>
19965 David Sherwood <david.sherwood@arm.com>
19967 * optabs.def (while_ult_optab): New optab.
19968 * doc/md.texi (while_ult@var{m}@var{n}): Document.
19969 * internal-fn.def (WHILE_ULT): New internal function.
19970 * internal-fn.h (direct_internal_fn_supported_p): New override
19971 that takes two types as argument.
19972 * internal-fn.c (while_direct): New macro.
19973 (expand_while_optab_fn): New function.
19974 (convert_optab_supported_p): Likewise.
19975 (direct_while_optab_supported_p): New macro.
19976 * wide-int.h (wi::udiv_ceil): New function.
19977 * tree-vectorizer.h (rgroup_masks): New structure.
19978 (vec_loop_masks): New typedef.
19979 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19980 and fully_masked_p.
19981 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19982 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19983 (vect_max_vf): New function.
19984 (slpeel_make_loop_iterate_ntimes): Delete.
19985 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19986 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19987 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19988 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19989 internal-fn.h, stor-layout.h and optabs-query.h.
19990 (vect_set_loop_mask): New function.
19991 (add_preheader_seq): Likewise.
19992 (add_header_seq): Likewise.
19993 (interleave_supported_p): Likewise.
19994 (vect_maybe_permute_loop_masks): Likewise.
19995 (vect_set_loop_masks_directly): Likewise.
19996 (vect_set_loop_condition_masked): Likewise.
19997 (vect_set_loop_condition_unmasked): New function, split out from
19998 slpeel_make_loop_iterate_ntimes.
19999 (slpeel_make_loop_iterate_ntimes): Rename to..
20000 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20001 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20002 (vect_do_peeling): Update call accordingly.
20003 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20005 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20006 mask_compare_type, can_fully_mask_p and fully_masked_p.
20007 (release_vec_loop_masks): New function.
20008 (_loop_vec_info): Use it to free the loop masks.
20009 (can_produce_all_loop_masks_p): New function.
20010 (vect_get_max_nscalars_per_iter): Likewise.
20011 (vect_verify_full_masking): Likewise.
20012 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20013 retries, and free the mask rgroups before retrying. Check loop-wide
20014 reasons for disallowing fully-masked loops. Make the final decision
20015 about whether use a fully-masked loop or not.
20016 (vect_estimate_min_profitable_iters): Do not assume that peeling
20017 for the number of iterations will be needed for fully-masked loops.
20018 (vectorizable_reduction): Disable fully-masked loops.
20019 (vectorizable_live_operation): Likewise.
20020 (vect_halve_mask_nunits): New function.
20021 (vect_double_mask_nunits): Likewise.
20022 (vect_record_loop_mask): Likewise.
20023 (vect_get_loop_mask): Likewise.
20024 (vect_transform_loop): Handle the case in which the final loop
20025 iteration might handle a partial vector. Call vect_set_loop_condition
20026 instead of slpeel_make_loop_iterate_ntimes.
20027 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20028 (check_load_store_masking): New function.
20029 (prepare_load_store_mask): Likewise.
20030 (vectorizable_store): Handle fully-masked loops.
20031 (vectorizable_load): Likewise.
20032 (supportable_widening_operation): Use vect_halve_mask_nunits for
20034 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20035 (vect_gen_while): New function.
20036 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20037 (aarch64_uqdec<mode>): New insn.
20039 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20040 Alan Hayward <alan.hayward@arm.com>
20041 David Sherwood <david.sherwood@arm.com>
20043 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20044 (reduc_xor_scal_optab): New optabs.
20045 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20046 (reduc_xor_scal_@var{m}): Document.
20047 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20048 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20049 internal functions.
20050 * fold-const-call.c (fold_const_call): Handle them.
20051 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20052 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20053 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20054 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20055 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20056 (UNSPEC_XORV): New unspecs.
20057 (optab): Add entries for them.
20058 (BITWISEV): New int iterator.
20059 (bit_reduc_op): New int attributes.
20061 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20062 Alan Hayward <alan.hayward@arm.com>
20063 David Sherwood <david.sherwood@arm.com>
20065 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20066 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20067 * optabs.def (vec_shl_insert_optab): New optab.
20068 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20069 (duplicate_and_interleave): Likewise.
20070 * tree-vect-loop.c: Include internal-fn.h.
20071 (neutral_op_for_slp_reduction): New function, split out from
20072 get_initial_defs_for_reduction.
20073 (get_initial_def_for_reduction): Handle option 2 for variable-length
20074 vectors by loading the neutral value into a vector and then shifting
20075 the initial value into element 0.
20076 (get_initial_defs_for_reduction): Replace the code argument with
20077 the neutral value calculated by neutral_op_for_slp_reduction.
20078 Use gimple_build_vector for constant-length vectors.
20079 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20080 but the first group_size elements have a neutral value.
20081 Use duplicate_and_interleave otherwise.
20082 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20083 Update call to get_initial_defs_for_reduction. Handle SLP
20084 reductions for variable-length vectors by creating one vector
20085 result for each scalar result, with the elements associated
20086 with other scalar results stubbed out with the neutral value.
20087 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20088 Require IFN_VEC_SHL_INSERT for double reductions on
20089 variable-length vectors, or SLP reductions that have
20090 a neutral value. Require can_duplicate_and_interleave_p
20091 support for variable-length unchained SLP reductions if there
20092 is no neutral value, such as for MIN/MAX reductions. Also require
20093 the number of vector elements to be a multiple of the number of
20094 SLP statements when doing variable-length unchained SLP reductions.
20095 Update call to vect_create_epilog_for_reduction.
20096 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20097 and remove initial values.
20098 (duplicate_and_interleave): Make public.
20099 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20100 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20102 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20103 Alan Hayward <alan.hayward@arm.com>
20104 David Sherwood <david.sherwood@arm.com>
20106 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20107 (can_duplicate_and_interleave_p): New function.
20108 (vect_get_and_check_slp_defs): Take the vector of statements
20109 rather than just the current one. Remove excess parentheses.
20110 Restriction rejectinon of vect_constant_def and vect_external_def
20111 for variable-length vectors to boolean types, or types for which
20112 can_duplicate_and_interleave_p is false.
20113 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20114 (duplicate_and_interleave): New function.
20115 (vect_get_constant_vectors): Use gimple_build_vector for
20116 constant-length vectors and suitable variable-length constant
20117 vectors. Use duplicate_and_interleave for other variable-length
20118 vectors. Don't defer the update when inserting new statements.
20120 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20121 Alan Hayward <alan.hayward@arm.com>
20122 David Sherwood <david.sherwood@arm.com>
20124 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20125 min_profitable_iters doesn't go negative.
20127 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20128 Alan Hayward <alan.hayward@arm.com>
20129 David Sherwood <david.sherwood@arm.com>
20131 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20132 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20133 * optabs.def (vec_mask_load_lanes_optab): New optab.
20134 (vec_mask_store_lanes_optab): Likewise.
20135 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20136 (MASK_STORE_LANES): Likewise.
20137 * internal-fn.c (mask_load_lanes_direct): New macro.
20138 (mask_store_lanes_direct): Likewise.
20139 (expand_mask_load_optab_fn): Handle masked operations.
20140 (expand_mask_load_lanes_optab_fn): New macro.
20141 (expand_mask_store_optab_fn): Handle masked operations.
20142 (expand_mask_store_lanes_optab_fn): New macro.
20143 (direct_mask_load_lanes_optab_supported_p): Likewise.
20144 (direct_mask_store_lanes_optab_supported_p): Likewise.
20145 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20147 (vect_load_lanes_supported): Likewise.
20148 * tree-vect-data-refs.c (strip_conversion): New function.
20149 (can_group_stmts_p): Likewise.
20150 (vect_analyze_data_ref_accesses): Use it instead of checking
20151 for a pair of assignments.
20152 (vect_store_lanes_supported): Take a masked_p parameter.
20153 (vect_load_lanes_supported): Likewise.
20154 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20155 vect_store_lanes_supported and vect_load_lanes_supported.
20156 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20157 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20158 parameter. Don't allow gaps for masked accesses.
20159 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20160 and vect_load_lanes_supported.
20161 (get_load_store_type): Take a masked_p parameter and update
20162 call to get_group_load_store_type.
20163 (vectorizable_store): Update call to get_load_store_type.
20164 Handle IFN_MASK_STORE_LANES.
20165 (vectorizable_load): Update call to get_load_store_type.
20166 Handle IFN_MASK_LOAD_LANES.
20168 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20169 Alan Hayward <alan.hayward@arm.com>
20170 David Sherwood <david.sherwood@arm.com>
20172 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20174 * config/aarch64/aarch64-protos.h
20175 (aarch64_sve_struct_memory_operand_p): Declare.
20176 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20177 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20178 (VPRED, vpred): Handle SVE structure modes.
20179 * config/aarch64/constraints.md (Utx): New constraint.
20180 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20181 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20182 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20183 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20184 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20185 structure modes. Split into pieces after RA.
20186 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20187 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20189 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20190 SVE structure modes.
20191 (aarch64_classify_address): Likewise.
20192 (sizetochar): Move earlier in file.
20193 (aarch64_print_operand): Handle SVE register lists.
20194 (aarch64_array_mode): New function.
20195 (aarch64_sve_struct_memory_operand_p): Likewise.
20196 (TARGET_ARRAY_MODE): Redefine.
20198 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20199 Alan Hayward <alan.hayward@arm.com>
20200 David Sherwood <david.sherwood@arm.com>
20202 * target.def (array_mode): New target hook.
20203 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20204 * doc/tm.texi: Regenerate.
20205 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20206 * hooks.c (hook_optmode_mode_uhwi_none): New function.
20207 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20208 targetm.array_mode.
20209 * stor-layout.c (mode_for_array): Likewise. Support polynomial
20212 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20213 Alan Hayward <alan.hayward@arm.com>
20214 David Sherwood <david.sherwood@arm.com>
20216 * fold-const.c (fold_binary_loc): Check the argument types
20217 rather than the result type when testing for a vector operation.
20219 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20221 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20222 * doc/tm.texi: Regenerate.
20224 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20225 Alan Hayward <alan.hayward@arm.com>
20226 David Sherwood <david.sherwood@arm.com>
20228 * doc/invoke.texi (-msve-vector-bits=): Document new option.
20229 (sve): Document new AArch64 extension.
20230 * doc/md.texi (w): Extend the description of the AArch64
20231 constraint to include SVE vectors.
20232 (Upl, Upa): Document new AArch64 predicate constraints.
20233 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20235 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20236 (msve-vector-bits=): New option.
20237 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20238 SVE when these are disabled.
20239 (sve): New extension.
20240 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20241 modes. Adjust their number of units based on aarch64_sve_vg.
20242 (MAX_BITSIZE_MODE_ANY_MODE): Define.
20243 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20244 aarch64_addr_query_type.
20245 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20246 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20247 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20248 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20249 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20250 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20251 (aarch64_simd_imm_zero_p): Delete.
20252 (aarch64_check_zero_based_sve_index_immediate): Declare.
20253 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20254 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20255 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20256 (aarch64_sve_float_mul_immediate_p): Likewise.
20257 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20258 rather than an rtx.
20259 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20260 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20261 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20262 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20263 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20264 (aarch64_regmode_natural_size): Likewise.
20265 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20266 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20268 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20269 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20270 for VG and the SVE predicate registers.
20271 (V_ALIASES): Add a "z"-prefixed alias.
20272 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20273 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20274 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20275 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20276 (REG_CLASS_NAMES): Add entries for them.
20277 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
20278 and the predicate registers.
20279 (aarch64_sve_vg): Declare.
20280 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20281 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20282 (REGMODE_NATURAL_SIZE): Define.
20283 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20285 * config/aarch64/aarch64.c: Include cfgrtl.h.
20286 (simd_immediate_info): Add a constructor for series vectors,
20287 and an associated step field.
20288 (aarch64_sve_vg): New variable.
20289 (aarch64_dbx_register_number): Handle VG and the predicate registers.
20290 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20291 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20292 (VEC_ANY_DATA, VEC_STRUCT): New constants.
20293 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20294 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20295 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20296 (aarch64_get_mask_mode): New functions.
20297 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20298 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20299 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
20300 predicate modes and predicate registers. Explicitly restrict
20301 GPRs to modes of 16 bytes or smaller. Only allow FP registers
20302 to store a vector mode if it is recognized by
20303 aarch64_classify_vector_mode.
20304 (aarch64_regmode_natural_size): New function.
20305 (aarch64_hard_regno_caller_save_mode): Return the original mode
20307 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20308 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20309 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20310 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20312 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
20313 does not overlap dest if the function is frame-related. Handle
20315 (aarch64_split_add_offset): New function.
20316 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20317 them aarch64_add_offset.
20318 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20319 and update call to aarch64_sub_sp.
20320 (aarch64_add_cfa_expression): New function.
20321 (aarch64_expand_prologue): Pass extra temporary registers to the
20322 functions above. Handle the case in which we need to emit new
20323 DW_CFA_expressions for registers that were originally saved
20324 relative to the stack pointer, but now have to be expressed
20325 relative to the frame pointer.
20326 (aarch64_output_mi_thunk): Pass extra temporary registers to the
20328 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
20329 IP0 and IP1 values for SVE frames.
20330 (aarch64_expand_vec_series): New function.
20331 (aarch64_expand_sve_widened_duplicate): Likewise.
20332 (aarch64_expand_sve_const_vector): Likewise.
20333 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20334 Handle SVE constants. Use emit_move_insn to move a force_const_mem
20335 into the register, rather than emitting a SET directly.
20336 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20337 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20338 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20339 (offset_9bit_signed_scaled_p): New functions.
20340 (aarch64_replicate_bitmask_imm): New function.
20341 (aarch64_bitmask_imm): Use it.
20342 (aarch64_cannot_force_const_mem): Reject expressions involving
20343 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
20344 (aarch64_classify_index): Handle SVE indices, by requiring
20345 a plain register index with a scale that matches the element size.
20346 (aarch64_classify_address): Handle SVE addresses. Assert that
20347 the mode of the address is VOIDmode or an integer mode.
20348 Update call to aarch64_classify_symbol.
20349 (aarch64_classify_symbolic_expression): Update call to
20350 aarch64_classify_symbol.
20351 (aarch64_const_vec_all_in_range_p): New function.
20352 (aarch64_print_vector_float_operand): Likewise.
20353 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
20354 "vN" for FP registers with SVE modes. Handle (const ...) vectors
20355 and the FP immediates 1.0 and 0.5.
20356 (aarch64_print_address_internal): Handle SVE addresses.
20357 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20358 (aarch64_regno_regclass): Handle predicate registers.
20359 (aarch64_secondary_reload): Handle big-endian reloads of SVE
20361 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20362 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20363 (aarch64_convert_sve_vector_bits): New function.
20364 (aarch64_override_options): Use it to handle -msve-vector-bits=.
20365 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20366 rather than an rtx.
20367 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20368 Handle SVE vector and predicate modes. Accept VL-based constants
20369 that need only one temporary register, and VL offsets that require
20370 no temporary registers.
20371 (aarch64_conditional_register_usage): Mark the predicate registers
20372 as fixed if SVE isn't available.
20373 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20374 Return true for SVE vector and predicate modes.
20375 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20376 rather than an unsigned int. Handle SVE modes.
20377 (aarch64_preferred_simd_mode): Update call accordingly. Handle
20379 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20381 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20382 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20383 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20384 (aarch64_sve_float_mul_immediate_p): New functions.
20385 (aarch64_sve_valid_immediate): New function.
20386 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20387 Explicitly reject structure modes. Check for INDEX constants.
20388 Handle PTRUE and PFALSE constants.
20389 (aarch64_check_zero_based_sve_index_immediate): New function.
20390 (aarch64_simd_imm_zero_p): Delete.
20391 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20392 vector modes. Accept constants in the range of CNT[BHWD].
20393 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20394 ask for an Advanced SIMD mode.
20395 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20396 (aarch64_simd_vector_alignment): Handle SVE predicates.
20397 (aarch64_vectorize_preferred_vector_alignment): New function.
20398 (aarch64_simd_vector_alignment_reachable): Use it instead of
20400 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20401 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20403 (MAX_VECT_LEN): Delete.
20404 (expand_vec_perm_d): Add a vec_flags field.
20405 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20406 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20407 (aarch64_evpc_ext): Don't apply a big-endian lane correction
20409 (aarch64_evpc_rev): Rename to...
20410 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
20411 (aarch64_evpc_rev_global): New function.
20412 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20413 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20415 (aarch64_evpc_sve_tbl): New function.
20416 (aarch64_expand_vec_perm_const_1): Update after rename of
20417 aarch64_evpc_rev. Handle SVE permutes too, trying
20418 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20419 than aarch64_evpc_tbl.
20420 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20421 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20422 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20423 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20424 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20425 (aarch64_expand_sve_vcond): New functions.
20426 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20427 of aarch64_vector_mode_p.
20428 (aarch64_dwarf_poly_indeterminate_value): New function.
20429 (aarch64_compute_pressure_classes): Likewise.
20430 (aarch64_can_change_mode_class): Likewise.
20431 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20432 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20433 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20434 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20435 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20436 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20437 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20438 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20440 (Dn, Dl, Dr): Accept const as well as const_vector.
20441 (Dz): Likewise. Compare against CONST0_RTX.
20442 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20443 of "vector" where appropriate.
20444 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20445 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20446 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20447 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20448 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20449 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20450 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20451 (v_int_equiv): Extend to SVE modes.
20452 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20454 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20455 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20456 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20457 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20458 (SVE_COND_FP_CMP): New int iterators.
20459 (perm_hilo): Handle the new unpack unspecs.
20460 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20462 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20463 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20464 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20465 (aarch64_equality_operator, aarch64_constant_vector_operand)
20466 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20467 (aarch64_sve_nonimmediate_operand): Likewise.
20468 (aarch64_sve_general_operand): Likewise.
20469 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20470 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20471 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20472 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20473 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20474 (aarch64_sve_float_arith_immediate): Likewise.
20475 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20476 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20477 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20478 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20479 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20480 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20481 (aarch64_sve_float_arith_operand): Likewise.
20482 (aarch64_sve_float_arith_with_sub_operand): Likewise.
20483 (aarch64_sve_float_mul_operand): Likewise.
20484 (aarch64_sve_vec_perm_operand): Likewise.
20485 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20486 (aarch64_mov_operand): Accept const_poly_int and const_vector.
20487 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20488 as well as const_vector.
20489 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20490 in file. Use CONST0_RTX and CONSTM1_RTX.
20491 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
20492 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20493 Use aarch64_simd_imm_zero.
20494 * config/aarch64/aarch64-sve.md: New file.
20495 * config/aarch64/aarch64.md: Include it.
20496 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20497 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20498 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20499 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20500 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20501 (sve): New attribute.
20502 (enabled): Disable instructions with the sve attribute unless
20504 (movqi, movhi): Pass CONST_POLY_INT operaneds through
20505 aarch64_expand_mov_immediate.
20506 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20507 CNT[BHSD] immediates.
20508 (movti): Split CONST_POLY_INT moves into two halves.
20509 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20510 Split additions that need a temporary here if the destination
20511 is the stack pointer.
20512 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20513 (*add<mode>3_poly_1): New instruction.
20514 (set_clobber_cc): New expander.
20516 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20518 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20519 parameter and use it instead of GET_MODE_SIZE (innermode). Use
20520 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20521 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20522 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
20523 Change innermode from fixed_mode_size to machine_mode.
20524 (simplify_subreg): Update call accordingly. Handle a constant-sized
20525 subreg of a variable-length CONST_VECTOR.
20527 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20528 Alan Hayward <alan.hayward@arm.com>
20529 David Sherwood <david.sherwood@arm.com>
20531 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20532 (add_offset_to_base): New function, split out from...
20533 (create_mem_ref): ...here. When handling a scale other than 1,
20534 check first whether the address is valid without the offset.
20535 Add it into the base if so, leaving the index and scale as-is.
20537 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20540 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20541 fold_for_warn before checking if arg2 is INTEGER_CST.
20543 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
20545 * config/rs6000/predicates.md (load_multiple_operation): Delete.
20546 (store_multiple_operation): Delete.
20547 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20548 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20549 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20550 guarded by TARGET_STRING.
20551 (rs6000_output_load_multiple): Delete.
20552 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20553 OPTION_MASK_STRING / TARGET_STRING handling.
20554 (print_operand) <'N', 'O'>: Add comment that these are unused now.
20555 (const rs6000_opt_masks) <"string">: Change mask to 0.
20556 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20557 (MASK_STRING): Delete.
20558 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20560 (load_multiple): Delete.
20567 (store_multiple): Delete.
20574 (movmemsi_8reg): Delete.
20575 (corresponding unnamed define_insn): Delete.
20576 (movmemsi_6reg): Delete.
20577 (corresponding unnamed define_insn): Delete.
20578 (movmemsi_4reg): Delete.
20579 (corresponding unnamed define_insn): Delete.
20580 (movmemsi_2reg): Delete.
20581 (corresponding unnamed define_insn): Delete.
20582 (movmemsi_1reg): Delete.
20583 (corresponding unnamed define_insn): Delete.
20584 * config/rs6000/rs6000.opt (mno-string): New.
20585 (mstring): Replace by deprecation warning stub.
20586 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20588 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20590 * regrename.c (regrename_do_replace): If replacing the same
20591 reg multiple times, try to reuse last created gen_raw_REG.
20594 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20595 main to workaround a bug in GDB.
20597 2018-01-12 Tom de Vries <tom@codesourcery.com>
20600 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20602 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
20604 PR rtl-optimization/80481
20605 * ira-color.c (get_cap_member): New function.
20606 (allocnos_conflict_by_live_ranges_p): Use it.
20607 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20608 (setup_slot_coalesced_allocno_live_ranges): Ditto.
20610 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
20613 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20614 (*saddl_se_1): Ditto.
20615 (*ssubsi_1): Ditto.
20616 (*ssubl_se_1): Ditto.
20618 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20620 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20621 rather than wi::to_widest for DR_INITs.
20622 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20623 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20624 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20626 (vect_analyze_group_access_1): Note that here.
20628 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20630 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20631 polynomial type sizes.
20633 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20635 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20636 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20637 (gimple_add_tmp_var): Likewise.
20639 2018-01-12 Martin Liska <mliska@suse.cz>
20641 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20642 (gimple_alloc_sizes): Likewise.
20643 (dump_gimple_statistics): Use PRIu64 in printf format.
20644 * gimple.h: Change uint64_t to int.
20646 2018-01-12 Martin Liska <mliska@suse.cz>
20648 * tree-core.h: Use uint64_t instead of int.
20649 * tree.c (tree_node_counts): Likewise.
20650 (tree_node_sizes): Likewise.
20651 (dump_tree_statistics): Use PRIu64 in printf format.
20653 2018-01-12 Martin Liska <mliska@suse.cz>
20655 * Makefile.in: As qsort_chk is implemented in vec.c, add
20656 vec.o to linkage of gencfn-macros.
20657 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20658 passing the info to record_node_allocation_statistics.
20659 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20661 * ggc-common.c (struct ggc_usage): Add operator== and use
20662 it in operator< and compare function.
20663 * mem-stats.h (struct mem_usage): Likewise.
20664 * vec.c (struct vec_usage): Remove operator< and compare
20665 function. Can be simply inherited.
20667 2018-01-12 Martin Jambor <mjambor@suse.cz>
20670 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20671 * tree-ssa-math-opts.c: Include domwalk.h.
20672 (convert_mult_to_fma_1): New function.
20673 (fma_transformation_info): New type.
20674 (fma_deferring_state): Likewise.
20675 (cancel_fma_deferring): New function.
20676 (result_of_phi): Likewise.
20677 (last_fma_candidate_feeds_initial_phi): Likewise.
20678 (convert_mult_to_fma): Added deferring logic, split actual
20679 transformation to convert_mult_to_fma_1.
20680 (math_opts_dom_walker): New type.
20681 (math_opts_dom_walker::after_dom_children): New method, body moved
20682 here from pass_optimize_widening_mul::execute, added deferring logic
20684 (pass_optimize_widening_mul::execute): Moved most of code to
20685 math_opts_dom_walker::after_dom_children.
20686 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20687 * config/i386/i386.c (ix86_option_override_internal): Added
20688 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20690 2018-01-12 Richard Biener <rguenther@suse.de>
20693 * dwarf2out.c (gen_variable_die): Do not reset old_die for
20694 inline instance vars.
20696 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
20699 * config/rx/rx.c (rx_is_restricted_memory_address):
20700 Handle SUBREG case.
20702 2018-01-12 Richard Biener <rguenther@suse.de>
20704 PR tree-optimization/80846
20705 * target.def (split_reduction): New target hook.
20706 * targhooks.c (default_split_reduction): New function.
20707 * targhooks.h (default_split_reduction): Declare.
20708 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20709 target requests first reduce vectors by combining low and high
20711 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20712 (get_vectype_for_scalar_type_and_size): Export.
20713 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20714 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20715 * doc/tm.texi: Regenerate.
20716 * config/i386/i386.c (ix86_split_reduction): Implement
20717 TARGET_VECTORIZE_SPLIT_REDUCTION.
20719 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20722 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20723 in PIC mode except for TARGET_VXWORKS_RTP.
20724 * config/sparc/sparc.c: Include cfgrtl.h.
20725 (TARGET_INIT_PIC_REG): Define.
20726 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20727 (sparc_pic_register_p): New predicate.
20728 (sparc_legitimate_address_p): Use it.
20729 (sparc_legitimize_pic_address): Likewise.
20730 (sparc_delegitimize_address): Likewise.
20731 (sparc_mode_dependent_address_p): Likewise.
20732 (gen_load_pcrel_sym): Remove 4th parameter.
20733 (load_got_register): Adjust call to above. Remove obsolete stuff.
20734 (sparc_expand_prologue): Do not call load_got_register here.
20735 (sparc_flat_expand_prologue): Likewise.
20736 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20737 (sparc_use_pseudo_pic_reg): New function.
20738 (sparc_init_pic_reg): Likewise.
20739 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20740 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20742 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
20744 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20745 Add item for branch_cost.
20747 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20749 PR rtl-optimization/83565
20750 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20751 not extend the result to a larger mode for rotate operations.
20752 (num_sign_bit_copies1): Likewise.
20754 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20757 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20759 Use values-Xc.o for -pedantic.
20760 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20762 2018-01-12 Martin Liska <mliska@suse.cz>
20765 * ipa-devirt.c (final_warning_record::grow_type_warnings):
20767 (possible_polymorphic_call_targets): Use it.
20768 (ipa_devirt): Likewise.
20770 2018-01-12 Martin Liska <mliska@suse.cz>
20772 * profile-count.h (enum profile_quality): Use 0 as invalid
20773 enum value of profile_quality.
20775 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
20777 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20778 -mext-string options.
20780 2018-01-12 Richard Biener <rguenther@suse.de>
20782 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20783 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20784 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20786 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20788 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
20790 * configure.ac (--with-long-double-format): Add support for the
20791 configuration option to change the default long double format on
20793 * config.gcc (powerpc*-linux*-*): Likewise.
20794 * configure: Regenerate.
20795 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20796 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20797 used without modification.
20799 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20801 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20802 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20803 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20804 MISC_BUILTIN_SPEC_BARRIER.
20805 (rs6000_init_builtins): Likewise.
20806 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20808 (speculation_barrier): New define_insn.
20809 * doc/extend.texi: Document __builtin_speculation_barrier.
20811 2018-01-11 Jakub Jelinek <jakub@redhat.com>
20814 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20815 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20816 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20818 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
20819 integral modes instead of "ss" and "sd".
20820 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20821 vectors with 32-bit and 64-bit elements.
20822 (vecdupssescalarmodesuffix): New mode attribute.
20823 (vec_dup<mode>): Use it.
20825 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
20828 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20829 frame if argument is passed on stack.
20831 2018-01-11 Jakub Jelinek <jakub@redhat.com>
20834 * ree.c (combine_reaching_defs): Optimize also
20835 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20836 reg2=any_extend(exp); reg1=reg2;, formatting fix.
20838 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
20840 PR middle-end/83189
20841 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20843 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
20845 PR middle-end/83718
20846 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20847 after they are computed.
20849 2018-01-11 Bin Cheng <bin.cheng@arm.com>
20851 PR tree-optimization/83695
20852 * gimple-loop-linterchange.cc
20853 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20854 reset cached scev information after interchange.
20855 (pass_linterchange::execute): Remove call to scev_reset_htab.
20857 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20859 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20860 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20861 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20862 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20863 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20864 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20865 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20866 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20867 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20868 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20869 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20870 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20871 (V_lane_reg): Likewise.
20872 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20874 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20875 (vfmal_lane_low<mode>_intrinsic,
20876 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20877 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20878 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20879 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20880 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20881 vfmsl_lane_high<mode>_intrinsic): New define_insns.
20883 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20885 * config/arm/arm-cpus.in (fp16fml): New feature.
20886 (ALL_SIMD): Add fp16fml.
20887 (armv8.2-a): Add fp16fml as an option.
20888 (armv8.3-a): Likewise.
20889 (armv8.4-a): Add fp16fml as part of fp16.
20890 * config/arm/arm.h (TARGET_FP16FML): Define.
20891 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20893 * config/arm/arm-modes.def (V2HF): Define.
20894 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20895 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20896 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20897 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20898 vfmsl_low, vfmsl_high): New set of builtins.
20899 * config/arm/iterators.md (PLUSMINUS): New code iterator.
20900 (vfml_op): New code attribute.
20901 (VFMLHALVES): New int iterator.
20902 (VFML, VFMLSEL): New mode attributes.
20903 (V_reg): Define mapping for V2HF.
20904 (V_hi, V_lo): New mode attributes.
20905 (VF_constraint): Likewise.
20906 (vfml_half, vfml_half_selector): New int attributes.
20907 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20909 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20910 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20912 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20913 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20914 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20915 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
20917 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20918 Document new effective target and option set.
20920 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20922 * config/arm/arm-cpus.in (armv8_4): New feature.
20923 (ARMv8_4a): New fgroup.
20924 (armv8.4-a): New arch.
20925 * config/arm/arm-tables.opt: Regenerate.
20926 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20927 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20928 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20929 Add matching rules for -march=armv8.4-a and extensions.
20930 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20932 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
20935 * config/rx/rx.md (BW): New mode attribute.
20936 (sync_lock_test_and_setsi): Add mode suffix to insn output.
20938 2018-01-11 Richard Biener <rguenther@suse.de>
20940 PR tree-optimization/83435
20941 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20942 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20943 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20945 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20946 Alan Hayward <alan.hayward@arm.com>
20947 David Sherwood <david.sherwood@arm.com>
20949 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20951 (aarch64_classify_address): Initialize it. Track polynomial offsets.
20952 (aarch64_print_address_internal): Use it to check for a zero offset.
20954 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20955 Alan Hayward <alan.hayward@arm.com>
20956 David Sherwood <david.sherwood@arm.com>
20958 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20959 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20960 Return a poly_int64 rather than a HOST_WIDE_INT.
20961 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20962 rather than a HOST_WIDE_INT.
20963 * config/aarch64/aarch64.h (aarch64_frame): Protect with
20964 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
20965 hard_fp_offset, frame_size, initial_adjust, callee_offset and
20966 final_offset from HOST_WIDE_INT to poly_int64.
20967 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20968 to_constant when getting the number of units in an Advanced SIMD
20970 (aarch64_builtin_vectorized_function): Check for a constant number
20972 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20974 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20975 attribute instead of GET_MODE_NUNITS.
20976 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20977 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20978 GET_MODE_SIZE for fixed-size registers.
20979 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20980 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20981 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20982 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20983 (aarch64_print_operand, aarch64_print_address_internal)
20984 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20985 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20986 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20987 Handle polynomial GET_MODE_SIZE.
20988 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
20989 wider than SImode without modification.
20990 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20991 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20992 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20993 passing and returning SVE modes.
20994 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20995 rather than GEN_INT.
20996 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20997 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20998 (aarch64_allocate_and_probe_stack_space): Likewise.
20999 (aarch64_layout_frame): Cope with polynomial offsets.
21000 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21001 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21002 polynomial offsets.
21003 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21004 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21005 poly_int64 rather than a HOST_WIDE_INT.
21006 (aarch64_get_separate_components, aarch64_process_components)
21007 (aarch64_expand_prologue, aarch64_expand_epilogue)
21008 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21009 (aarch64_anchor_offset): New function, split out from...
21010 (aarch64_legitimize_address): ...here.
21011 (aarch64_builtin_vectorization_cost): Handle polynomial
21012 TYPE_VECTOR_SUBPARTS.
21013 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21015 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21016 number of elements from the PARALLEL rather than the mode.
21017 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21018 rather than GET_MODE_BITSIZE.
21019 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21020 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21021 (aarch64_expand_vec_perm_const_1): Handle polynomial
21022 d->perm.length () and d->perm elements.
21023 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21024 Apply to_constant to d->perm elements.
21025 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21026 polynomial CONST_VECTOR_NUNITS.
21027 (aarch64_move_pointer): Take amount as a poly_int64 rather
21029 (aarch64_progress_pointer): Avoid temporary variable.
21030 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21031 the mode attribute instead of GET_MODE.
21033 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21034 Alan Hayward <alan.hayward@arm.com>
21035 David Sherwood <david.sherwood@arm.com>
21037 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21038 x exists before using it.
21039 (aarch64_add_constant_internal): Rename to...
21040 (aarch64_add_offset_1): ...this. Replace regnum with separate
21041 src and dest rtxes. Handle the case in which they're different,
21042 including when the offset is zero. Replace scratchreg with an rtx.
21043 Use 2 additions if there is no spare register into which we can
21044 move a 16-bit constant.
21045 (aarch64_add_constant): Delete.
21046 (aarch64_add_offset): Replace reg with separate src and dest
21047 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21048 Use aarch64_add_offset_1.
21049 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21050 an rtx rather than an int. Take the delta as a poly_int64
21051 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21052 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21053 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21054 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21055 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21056 and aarch64_add_sp.
21057 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21058 aarch64_add_constant.
21060 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21062 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21063 Use scalar_float_mode.
21065 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21067 * config/aarch64/aarch64-simd.md
21068 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21069 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21070 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21071 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21072 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21073 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21074 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21075 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21076 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21077 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21079 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21082 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21083 targ_options->x_arm_arch_string is non NULL.
21085 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21087 * config/aarch64/aarch64.h
21088 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21090 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21093 * expmed.c (emit_store_flag_force): Swap if const op0
21094 and change VOIDmode to mode of op0.
21096 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21098 PR rtl-optimization/83761
21099 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21100 than bytes to mode_for_size.
21102 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21104 PR middle-end/83189
21105 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21106 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21109 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21111 PR middle-end/83575
21112 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21113 when in layout mode.
21114 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21115 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21118 2018-01-10 Michael Collison <michael.collison@arm.com>
21120 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21121 * config/aarch64/aarch64-option-extension.def: Add
21122 AARCH64_OPT_EXTENSION of 'fp16fml'.
21123 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21124 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21125 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21126 * config/aarch64/constraints.md (Ui7): New constraint.
21127 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21128 (VFMLA_SEL_W): Ditto.
21131 (VFMLA16_LOW): New int iterator.
21132 (VFMLA16_HIGH): Ditto.
21133 (UNSPEC_FMLAL): New unspec.
21134 (UNSPEC_FMLSL): Ditto.
21135 (UNSPEC_FMLAL2): Ditto.
21136 (UNSPEC_FMLSL2): Ditto.
21137 (f16mac): New code attribute.
21138 * config/aarch64/aarch64-simd-builtins.def
21139 (aarch64_fmlal_lowv2sf): Ditto.
21140 (aarch64_fmlsl_lowv2sf): Ditto.
21141 (aarch64_fmlalq_lowv4sf): Ditto.
21142 (aarch64_fmlslq_lowv4sf): Ditto.
21143 (aarch64_fmlal_highv2sf): Ditto.
21144 (aarch64_fmlsl_highv2sf): Ditto.
21145 (aarch64_fmlalq_highv4sf): Ditto.
21146 (aarch64_fmlslq_highv4sf): Ditto.
21147 (aarch64_fmlal_lane_lowv2sf): Ditto.
21148 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21149 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21150 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21151 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21152 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21153 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21154 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21155 (aarch64_fmlal_lane_highv2sf): Ditto.
21156 (aarch64_fmlsl_lane_highv2sf): Ditto.
21157 (aarch64_fmlal_laneq_highv2sf): Ditto.
21158 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21159 (aarch64_fmlalq_lane_highv4sf): Ditto.
21160 (aarch64_fmlsl_lane_highv4sf): Ditto.
21161 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21162 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21163 * config/aarch64/aarch64-simd.md:
21164 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21165 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21166 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21167 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21168 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21169 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21170 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21171 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21172 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21173 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21174 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21175 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21176 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21177 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21178 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21179 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21180 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21181 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21182 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21183 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21184 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21185 (vfmlsl_low_u32): Ditto.
21186 (vfmlalq_low_u32): Ditto.
21187 (vfmlslq_low_u32): Ditto.
21188 (vfmlal_high_u32): Ditto.
21189 (vfmlsl_high_u32): Ditto.
21190 (vfmlalq_high_u32): Ditto.
21191 (vfmlslq_high_u32): Ditto.
21192 (vfmlal_lane_low_u32): Ditto.
21193 (vfmlsl_lane_low_u32): Ditto.
21194 (vfmlal_laneq_low_u32): Ditto.
21195 (vfmlsl_laneq_low_u32): Ditto.
21196 (vfmlalq_lane_low_u32): Ditto.
21197 (vfmlslq_lane_low_u32): Ditto.
21198 (vfmlalq_laneq_low_u32): Ditto.
21199 (vfmlslq_laneq_low_u32): Ditto.
21200 (vfmlal_lane_high_u32): Ditto.
21201 (vfmlsl_lane_high_u32): Ditto.
21202 (vfmlal_laneq_high_u32): Ditto.
21203 (vfmlsl_laneq_high_u32): Ditto.
21204 (vfmlalq_lane_high_u32): Ditto.
21205 (vfmlslq_lane_high_u32): Ditto.
21206 (vfmlalq_laneq_high_u32): Ditto.
21207 (vfmlslq_laneq_high_u32): Ditto.
21208 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21209 (AARCH64_FL_FOR_ARCH8_4): New.
21210 (AARCH64_ISA_F16FML): New ISA flag.
21211 (TARGET_F16FML): New feature flag for fp16fml.
21212 (doc/invoke.texi): Document new fp16fml option.
21214 2018-01-10 Michael Collison <michael.collison@arm.com>
21216 * config/aarch64/aarch64-builtins.c:
21217 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21218 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21219 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21220 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21221 (AARCH64_ISA_SHA3): New ISA flag.
21222 (TARGET_SHA3): New feature flag for sha3.
21223 * config/aarch64/iterators.md (sha512_op): New int attribute.
21224 (CRYPTO_SHA512): New int iterator.
21225 (UNSPEC_SHA512H): New unspec.
21226 (UNSPEC_SHA512H2): Ditto.
21227 (UNSPEC_SHA512SU0): Ditto.
21228 (UNSPEC_SHA512SU1): Ditto.
21229 * config/aarch64/aarch64-simd-builtins.def
21230 (aarch64_crypto_sha512hqv2di): New builtin.
21231 (aarch64_crypto_sha512h2qv2di): Ditto.
21232 (aarch64_crypto_sha512su0qv2di): Ditto.
21233 (aarch64_crypto_sha512su1qv2di): Ditto.
21234 (aarch64_eor3qv8hi): Ditto.
21235 (aarch64_rax1qv2di): Ditto.
21236 (aarch64_xarqv2di): Ditto.
21237 (aarch64_bcaxqv8hi): Ditto.
21238 * config/aarch64/aarch64-simd.md:
21239 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21240 (aarch64_crypto_sha512su0qv2di): Ditto.
21241 (aarch64_crypto_sha512su1qv2di): Ditto.
21242 (aarch64_eor3qv8hi): Ditto.
21243 (aarch64_rax1qv2di): Ditto.
21244 (aarch64_xarqv2di): Ditto.
21245 (aarch64_bcaxqv8hi): Ditto.
21246 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21247 (vsha512h2q_u64): Ditto.
21248 (vsha512su0q_u64): Ditto.
21249 (vsha512su1q_u64): Ditto.
21250 (veor3q_u16): Ditto.
21251 (vrax1q_u64): Ditto.
21252 (vxarq_u64): Ditto.
21253 (vbcaxq_u16): Ditto.
21254 * config/arm/types.md (crypto_sha512): New type attribute.
21255 (crypto_sha3): Ditto.
21256 (doc/invoke.texi): Document new sha3 option.
21258 2018-01-10 Michael Collison <michael.collison@arm.com>
21260 * config/aarch64/aarch64-builtins.c:
21261 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21262 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21263 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21264 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21265 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21266 (AARCH64_ISA_SM4): New ISA flag.
21267 (TARGET_SM4): New feature flag for sm4.
21268 * config/aarch64/aarch64-simd-builtins.def
21269 (aarch64_sm3ss1qv4si): Ditto.
21270 (aarch64_sm3tt1aq4si): Ditto.
21271 (aarch64_sm3tt1bq4si): Ditto.
21272 (aarch64_sm3tt2aq4si): Ditto.
21273 (aarch64_sm3tt2bq4si): Ditto.
21274 (aarch64_sm3partw1qv4si): Ditto.
21275 (aarch64_sm3partw2qv4si): Ditto.
21276 (aarch64_sm4eqv4si): Ditto.
21277 (aarch64_sm4ekeyqv4si): Ditto.
21278 * config/aarch64/aarch64-simd.md:
21279 (aarch64_sm3ss1qv4si): Ditto.
21280 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21281 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21282 (aarch64_sm4eqv4si): Ditto.
21283 (aarch64_sm4ekeyqv4si): Ditto.
21284 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21285 (sm3part_op): Ditto.
21286 (CRYPTO_SM3TT): Ditto.
21287 (CRYPTO_SM3PART): Ditto.
21288 (UNSPEC_SM3SS1): New unspec.
21289 (UNSPEC_SM3TT1A): Ditto.
21290 (UNSPEC_SM3TT1B): Ditto.
21291 (UNSPEC_SM3TT2A): Ditto.
21292 (UNSPEC_SM3TT2B): Ditto.
21293 (UNSPEC_SM3PARTW1): Ditto.
21294 (UNSPEC_SM3PARTW2): Ditto.
21295 (UNSPEC_SM4E): Ditto.
21296 (UNSPEC_SM4EKEY): Ditto.
21297 * config/aarch64/constraints.md (Ui2): New constraint.
21298 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21299 * config/arm/types.md (crypto_sm3): New type attribute.
21300 (crypto_sm4): Ditto.
21301 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21302 (vsm3tt1aq_u32): Ditto.
21303 (vsm3tt1bq_u32): Ditto.
21304 (vsm3tt2aq_u32): Ditto.
21305 (vsm3tt2bq_u32): Ditto.
21306 (vsm3partw1q_u32): Ditto.
21307 (vsm3partw2q_u32): Ditto.
21308 (vsm4eq_u32): Ditto.
21309 (vsm4ekeyq_u32): Ditto.
21310 (doc/invoke.texi): Document new sm4 option.
21312 2018-01-10 Michael Collison <michael.collison@arm.com>
21314 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21315 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21316 (AARCH64_FL_FOR_ARCH8_4): New.
21317 (AARCH64_FL_V8_4): New flag.
21318 (doc/invoke.texi): Document new armv8.4-a option.
21320 2018-01-10 Michael Collison <michael.collison@arm.com>
21322 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21323 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21324 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21325 * config/aarch64/aarch64-option-extension.def: Add
21326 AARCH64_OPT_EXTENSION of 'sha2'.
21327 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21328 (crypto): Disable sha2 and aes if crypto disabled.
21329 (crypto): Enable aes and sha2 if enabled.
21330 (simd): Disable sha2 and aes if simd disabled.
21331 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21333 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21334 (TARGET_SHA2): New feature flag for sha2.
21335 (TARGET_AES): New feature flag for aes.
21336 * config/aarch64/aarch64-simd.md:
21337 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21338 conditional on TARGET_AES.
21339 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21340 (aarch64_crypto_sha1hsi): Make pattern conditional
21342 (aarch64_crypto_sha1hv4si): Ditto.
21343 (aarch64_be_crypto_sha1hv4si): Ditto.
21344 (aarch64_crypto_sha1su1v4si): Ditto.
21345 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21346 (aarch64_crypto_sha1su0v4si): Ditto.
21347 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21348 (aarch64_crypto_sha256su0v4si): Ditto.
21349 (aarch64_crypto_sha256su1v4si): Ditto.
21350 (doc/invoke.texi): Document new aes and sha2 options.
21352 2018-01-10 Martin Sebor <msebor@redhat.com>
21354 PR tree-optimization/83781
21355 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21358 2018-01-11 Martin Sebor <msebor@gmail.com>
21359 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21361 PR tree-optimization/83501
21362 PR tree-optimization/81703
21364 * tree-ssa-strlen.c (get_string_cst): Rename...
21365 (get_string_len): ...to this. Handle global constants.
21366 (handle_char_store): Adjust.
21368 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
21369 Jim Wilson <jimw@sifive.com>
21371 * config/riscv/riscv-protos.h (riscv_output_return): New.
21372 * config/riscv/riscv.c (struct machine_function): New naked_p field.
21373 (riscv_attribute_table, riscv_output_return),
21374 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21375 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21376 (riscv_compute_frame_info): Only compute frame->mask if not a naked
21378 (riscv_expand_prologue): Add early return for naked function.
21379 (riscv_expand_epilogue): Likewise.
21380 (riscv_function_ok_for_sibcall): Return false for naked function.
21381 (riscv_set_current_function): New.
21382 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21383 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21384 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21385 * doc/extend.texi (RISC-V Function Attributes): New.
21387 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
21389 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21390 check for 128-bit long double before checking TCmode.
21391 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21392 128-bit long doubles before checking TFmode or TCmode.
21393 (FLOAT128_IBM_P): Likewise.
21395 2018-01-10 Martin Sebor <msebor@redhat.com>
21397 PR tree-optimization/83671
21398 * builtins.c (c_strlen): Unconditionally return zero for the empty
21400 Use -Warray-bounds for warnings.
21401 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21402 for non-constant array indices with COMPONENT_REF, arrays of
21403 arrays, and pointers to arrays.
21404 (gimple_fold_builtin_strlen): Determine and set length range for
21405 non-constant character arrays.
21407 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
21409 PR middle-end/81897
21410 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21413 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
21415 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21417 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21420 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21421 VECTOR_MEM_ALTIVEC_OR_VSX_P.
21422 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21423 indexed_or_indirect_operand predicate.
21424 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21425 (*vsx_le_perm_load_v8hi): Likewise.
21426 (*vsx_le_perm_load_v16qi): Likewise.
21427 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21428 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21429 (*vsx_le_perm_store_v8hi): Likewise.
21430 (*vsx_le_perm_store_v16qi): Likewise.
21431 (eight unnamed splitters): Likewise.
21433 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21435 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21436 * config/rs6000/emmintrin.h: Likewise.
21437 * config/rs6000/mmintrin.h: Likewise.
21438 * config/rs6000/xmmintrin.h: Likewise.
21440 2018-01-10 David Malcolm <dmalcolm@redhat.com>
21443 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21445 * tree.c (tree_nop_conversion): Return true for location wrapper
21447 (maybe_wrap_with_location): New function.
21448 (selftest::check_strip_nops): New function.
21449 (selftest::test_location_wrappers): New function.
21450 (selftest::tree_c_tests): Call it.
21451 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21452 (maybe_wrap_with_location): New decl.
21453 (EXPR_LOCATION_WRAPPER_P): New macro.
21454 (location_wrapper_p): New inline function.
21455 (tree_strip_any_location_wrapper): New inline function.
21457 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
21460 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21461 stack_realign_offset for the largest alignment of stack slot
21463 (ix86_find_max_used_stack_alignment): New function.
21464 (ix86_finalize_stack_frame_flags): Use it. Set
21465 max_used_stack_alignment if we don't realign stack.
21466 * config/i386/i386.h (machine_function): Add
21467 max_used_stack_alignment.
21469 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
21471 * config/arm/arm.opt (-mbranch-cost): New option.
21472 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21475 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
21478 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21479 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21481 2018-01-10 Richard Biener <rguenther@suse.de>
21484 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21485 early out so it also covers the case where we have a non-NULL
21488 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21490 PR tree-optimization/83753
21491 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21492 for non-strided grouped accesses if the number of elements is 1.
21494 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21497 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21498 * i386.h (TARGET_USE_GATHER): Define.
21499 * x86-tune.def (X86_TUNE_USE_GATHER): New.
21501 2018-01-10 Martin Liska <mliska@suse.cz>
21504 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21505 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21507 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21508 CLEANUP_NO_PARTITIONING is not set.
21510 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21512 * doc/rtl.texi: Remove documentation of (const ...) wrappers
21513 for vectors, as a partial revert of r254296.
21514 * rtl.h (const_vec_p): Delete.
21515 (const_vec_duplicate_p): Don't test for vector CONSTs.
21516 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21517 * expmed.c (make_tree): Likewise.
21520 * common.md (E, F): Use CONSTANT_P instead of checking for
21522 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21523 checking for CONST_VECTOR.
21525 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21527 PR middle-end/83575
21528 * predict.c (force_edge_cold): Handle in more sane way edges
21529 with no prediction.
21531 2018-01-09 Carl Love <cel@us.ibm.com>
21533 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21535 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21536 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21537 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21538 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
21539 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21540 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
21541 * config/rs6000/rs6000-protos.h: Add extern defition for
21542 rs6000_generate_float2_double_code.
21543 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21545 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21546 (float2_v2df): Add define_expand.
21548 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
21551 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21552 op_mode in the force_to_mode call.
21554 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21556 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21557 instead of checking each element individually.
21558 (aarch64_evpc_uzp): Likewise.
21559 (aarch64_evpc_zip): Likewise.
21560 (aarch64_evpc_ext): Likewise.
21561 (aarch64_evpc_rev): Likewise.
21562 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21563 instead of checking each element individually. Return true without
21565 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21566 whether all selected elements come from the same input, instead of
21567 checking each element individually. Remove calls to gen_rtx_REG,
21568 start_sequence and end_sequence and instead assert that no rtl is
21571 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21573 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21574 order of HIGH and CONST checks.
21576 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21578 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21579 if the destination isn't an SSA_NAME.
21581 2018-01-09 Richard Biener <rguenther@suse.de>
21583 PR tree-optimization/83668
21584 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21586 (canonicalize_loop_form): ... here, renamed from ...
21587 (canonicalize_loop_closed_ssa_form): ... this and amended to
21588 swap successor edges for loop exit blocks to make us use
21589 the RPO order we need for initial schedule generation.
21591 2018-01-09 Joseph Myers <joseph@codesourcery.com>
21593 PR tree-optimization/64811
21594 * match.pd: When optimizing comparisons with Inf, avoid
21595 introducing or losing exceptions from comparisons with NaN.
21597 2018-01-09 Martin Liska <mliska@suse.cz>
21600 * asan.c (shadow_mem_size): Add gcc_assert.
21602 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
21604 Don't save registers in main().
21607 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21608 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21609 * config/avr/avr.c (avr_set_current_function): Don't error if
21610 naked, OS_task or OS_main are specified at the same time.
21611 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21613 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21615 * common/config/avr/avr-common.c (avr_option_optimization_table):
21616 Switch on -mmain-is-OS_task for optimizing compilations.
21618 2018-01-09 Richard Biener <rguenther@suse.de>
21620 PR tree-optimization/83572
21621 * graphite.c: Include cfganal.h.
21622 (graphite_transform_loops): Connect infinite loops to exit
21623 and remove fake edges at the end.
21625 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21627 * ipa-inline.c (edge_badness): Revert accidental checkin.
21629 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21632 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21633 symbols; not inline clones.
21635 2018-01-09 Jakub Jelinek <jakub@redhat.com>
21638 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21639 hard registers. Formatting fixes.
21641 PR preprocessor/83722
21642 * gcc.c (try_generate_repro): Pass
21643 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21644 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21647 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
21648 Kito Cheng <kito.cheng@gmail.com>
21650 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21651 (riscv_leaf_function_p): Delete.
21652 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21654 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21656 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21658 (do_ifelse): New function.
21659 (do_isel): New function.
21660 (do_sub3): New function.
21661 (do_add3): New function.
21662 (do_load_mask_compare): New function.
21663 (do_overlap_load_compare): New function.
21664 (expand_compare_loop): New function.
21665 (expand_block_compare): Call expand_compare_loop() when appropriate.
21666 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21667 option description.
21668 (-mblock-compare-inline-loop-limit): New option.
21670 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21673 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21674 Reverse order of second and third operands in first alternative.
21675 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21676 of first and second elements in UNSPEC_VPERMR vector.
21677 (altivec_expand_vec_perm_le): Likewise.
21679 2018-01-08 Jeff Law <law@redhat.com>
21681 PR rtl-optimizatin/81308
21682 * tree-switch-conversion.c (cfg_altered): New file scoped static.
21683 (process_switch): If group_case_labels makes a change, then set
21685 (pass_convert_switch::execute): If a switch is converted, then
21686 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
21688 PR rtl-optimization/81308
21689 * recog.c (split_all_insns): Conditionally cleanup the CFG after
21692 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
21694 PR target/83663 - Revert r255946
21695 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21696 generation for cases where splatting a value is not useful.
21697 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21698 across a vec_duplicate and a paradoxical subreg forming a vector
21699 mode to a vec_concat.
21701 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21703 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21704 -march=armv8.3-a variants.
21705 * config/arm/t-multilib: Likewise.
21706 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
21708 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21710 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21712 (cceq_ior_compare_complement): Give it a name so I can use it, and
21713 change boolean_or_operator predicate to boolean_operator so it can
21714 be used to generate a crand.
21715 (eqne): New code iterator.
21716 (bd/bd_neg): New code_attrs.
21717 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21718 a single define_insn.
21719 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21720 decrement (bdnzt/bdnzf/bdzt/bdzf).
21721 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21722 with the new names of the branch decrement patterns, and added the
21723 names of the branch decrement conditional patterns.
21725 2018-01-08 Richard Biener <rguenther@suse.de>
21727 PR tree-optimization/83563
21728 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21731 2018-01-08 Richard Biener <rguenther@suse.de>
21733 PR middle-end/83713
21734 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21736 2018-01-08 Richard Biener <rguenther@suse.de>
21738 PR tree-optimization/83685
21739 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21740 references to abnormals.
21742 2018-01-08 Richard Biener <rguenther@suse.de>
21745 * dwarf2out.c (output_indirect_strings): Handle empty
21746 skeleton_debug_str_hash.
21747 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21749 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
21751 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21752 (emit_store_direct): Likewise.
21753 (arc_trampoline_adjust_address): Likewise.
21754 (arc_asm_trampoline_template): New function.
21755 (arc_initialize_trampoline): Use asm_trampoline_template.
21756 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21757 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21758 * config/arc/arc.md (flush_icache): Delete pattern.
21760 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
21762 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21763 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21766 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
21769 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21770 by not USED_FOR_TARGET.
21771 (make_pass_resolve_sw_modes): Likewise.
21773 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
21775 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21778 2018-01-08 Richard Biener <rguenther@suse.de>
21780 PR middle-end/83580
21781 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21783 2018-01-08 Richard Biener <rguenther@suse.de>
21785 PR middle-end/83517
21786 * match.pd ((t * 2) / 2) -> t): Add missing :c.
21788 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
21790 PR middle-end/81897
21791 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21792 basic blocks with a small number of successors.
21793 (convert_control_dep_chain_into_preds): Improve handling of
21795 (dump_predicates): Split apart into...
21796 (dump_pred_chain): ...here...
21797 (dump_pred_info): ...and here.
21798 (can_one_predicate_be_invalidated_p): Add debugging printfs.
21799 (can_chain_union_be_invalidated_p): Improve check for invalidation
21801 (uninit_uses_cannot_happen): Avoid unnecessary if
21802 convert_control_dep_chain_into_preds yielded nothing.
21804 2018-01-06 Martin Sebor <msebor@redhat.com>
21806 PR tree-optimization/83640
21807 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21808 subtracting negative offset from size.
21809 (builtin_access::overlap): Adjust offset bounds of the access to fall
21810 within the size of the object if possible.
21812 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
21814 PR rtl-optimization/83699
21815 * expmed.c (extract_bit_field_1): Restrict the vector usage of
21816 extract_bit_field_as_subreg to cases in which the extracted
21817 value is also a vector.
21819 * lra-constraints.c (process_alt_operands): Test for the equivalence
21820 substitutions when detecting a possible reload cycle.
21822 2018-01-06 Jakub Jelinek <jakub@redhat.com>
21825 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21826 by default if flag_selective_schedling{,2}. Formatting fixes.
21828 PR rtl-optimization/83682
21829 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21830 if it has non-VECTOR_MODE element mode.
21831 (vec_duplicate_p): Likewise.
21833 PR middle-end/83694
21834 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21835 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21837 2018-01-05 Jakub Jelinek <jakub@redhat.com>
21840 * config/i386/i386-builtin.def
21841 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21842 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21843 Require also OPTION_MASK_ISA_AVX512F in addition to
21844 OPTION_MASK_ISA_GFNI.
21845 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21846 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21847 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21848 to OPTION_MASK_ISA_GFNI.
21849 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21850 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21851 OPTION_MASK_ISA_AVX512BW.
21852 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21853 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21854 addition to OPTION_MASK_ISA_GFNI.
21855 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21856 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21857 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21858 to OPTION_MASK_ISA_GFNI.
21859 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21860 a requirement for all ISAs rather than any of them with a few
21862 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21864 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21865 bitmasks to be enabled with 3 exceptions, instead of requiring any
21866 enabled ISA with lots of exceptions.
21867 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21868 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21869 Change avx512bw in isa attribute to avx512f.
21870 * config/i386/sgxintrin.h: Add license boilerplate.
21871 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
21872 to __AVX512F__ and __AVX512VL to __AVX512VL__.
21873 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21874 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21876 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21877 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21878 temporarily sse2 rather than sse if not enabled already.
21881 * config/i386/sse.md (VI248_VLBW): Rename to ...
21882 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
21883 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21884 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21885 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21886 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21887 mode iterator instead of VI248_VLBW.
21889 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
21891 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21892 (record_modified): Skip clobbers; add debug output.
21893 (param_change_prob): Use sreal frequencies.
21895 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
21897 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21898 punt for user-aligned variables.
21900 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
21902 * tree-chrec.c (chrec_contains_symbols): Return true for
21905 2018-01-05 Sudakshina Das <sudi.das@arm.com>
21908 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21909 of (x|y) == x for BICS pattern.
21911 2018-01-05 Jakub Jelinek <jakub@redhat.com>
21913 PR tree-optimization/83605
21914 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21915 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21918 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
21920 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21921 * config/epiphany/rtems.h: New file.
21923 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21924 Uros Bizjak <ubizjak@gmail.com>
21927 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21928 QIreg_operand instead of register_operand predicate.
21929 * config/i386/i386.c (ix86_rop_should_change_byte_p,
21930 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21931 comments instead of -fmitigate[-_]rop.
21933 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21936 * cgraphunit.c (symbol_table::compile): Switch to text_section
21937 before calling assembly_start debug hook.
21938 * run-rtl-passes.c (run_rtl_passes): Likewise.
21941 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21943 * tree-vrp.c (extract_range_from_binary_expr_1): Check
21944 range_int_cst_p rather than !symbolic_range_p before calling
21945 extract_range_from_multiplicative_op_1.
21947 2018-01-04 Jeff Law <law@redhat.com>
21949 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21950 redundant test in assertion.
21952 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21954 * doc/rtl.texi: Document machine_mode wrapper classes.
21956 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21958 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21959 using tree_to_uhwi.
21961 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21963 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21964 the VEC_PERM_EXPR fold to fail.
21966 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21969 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21970 to switched_sections.
21972 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21975 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21976 test for d.testing.
21978 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
21981 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21982 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21984 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21987 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21988 is BLKmode and bitpos not zero or mode change is needed.
21990 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21993 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21996 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
21999 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22000 instead of MULT rtx. Update all corresponding splitters.
22001 (*saddl_se): Ditto.
22002 (*ssub<modesuffix>): Ditto.
22003 (*ssubl_se): Ditto.
22004 (*cmp_sadd_di): Update split patterns.
22005 (*cmp_sadd_si): Ditto.
22006 (*cmp_sadd_sidi): Ditto.
22007 (*cmp_ssub_di): Ditto.
22008 (*cmp_ssub_si): Ditto.
22009 (*cmp_ssub_sidi): Ditto.
22010 * config/alpha/predicates.md (const23_operand): New predicate.
22011 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22012 Look for ASHIFT, not MULT inner operand.
22013 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22015 2018-01-04 Martin Liska <mliska@suse.cz>
22017 PR gcov-profile/83669
22018 * gcov.c (output_intermediate_file): Add version to intermediate
22020 * doc/gcov.texi: Document new field 'version' in intermediate
22021 file format. Fix location of '-k' option of gcov command.
22023 2018-01-04 Martin Liska <mliska@suse.cz>
22026 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22028 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22030 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22032 2018-01-03 Martin Sebor <msebor@redhat.com>
22034 PR tree-optimization/83655
22035 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22036 checking calls with invalid arguments.
22038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22040 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22041 (vectorizable_mask_load_store): Delete.
22042 (vectorizable_call): Return false for masked loads and stores.
22043 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22044 instead of gimple_assign_rhs1.
22045 (vectorizable_load): Handle IFN_MASK_LOAD.
22046 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22048 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22050 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22052 (vectorizable_mask_load_store): ...here.
22053 (vectorizable_load): ...and here.
22055 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22057 * tree-vect-stmts.c (vect_build_all_ones_mask)
22058 (vect_build_zero_merge_argument): New functions, split out from...
22059 (vectorizable_load): ...here.
22061 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22063 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22065 (vectorizable_mask_load_store): ...here.
22066 (vectorizable_store): ...and here.
22068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22070 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22072 (vectorizable_mask_load_store): ...here.
22074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22076 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22077 (vect_model_store_cost): Take a vec_load_store_type instead of a
22079 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22080 (vect_model_store_cost): Take a vec_load_store_type instead of a
22082 (vectorizable_mask_load_store): Update accordingly.
22083 (vectorizable_store): Likewise.
22084 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22088 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22089 IFN_MASK_LOAD calls here rather than...
22090 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22092 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22093 Alan Hayward <alan.hayward@arm.com>
22094 David Sherwood <david.sherwood@arm.com>
22096 * expmed.c (extract_bit_field_1): For vector extracts,
22097 fall back to extract_bit_field_as_subreg if vec_extract
22100 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22101 Alan Hayward <alan.hayward@arm.com>
22102 David Sherwood <david.sherwood@arm.com>
22104 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22105 they are variable or constant sized.
22106 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22107 slots for constant-sized data.
22109 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22110 Alan Hayward <alan.hayward@arm.com>
22111 David Sherwood <david.sherwood@arm.com>
22113 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22114 handling COND_EXPRs with boolean comparisons, try to find a better
22115 basis for the mask type than the boolean itself.
22117 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22119 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22120 is calculated and how it can be overridden.
22121 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22122 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22124 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22128 Alan Hayward <alan.hayward@arm.com>
22129 David Sherwood <david.sherwood@arm.com>
22131 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22132 Remove the mode argument.
22133 (aarch64_simd_valid_immediate): Remove the mode and inverse
22135 * config/aarch64/iterators.md (bitsize): New iterator.
22136 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22137 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22138 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22139 aarch64_simd_valid_immediate.
22140 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22141 (aarch64_reg_or_bic_imm): Likewise.
22142 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22143 with an insn_type enum and msl with a modifier_type enum.
22144 Replace element_width with a scalar_mode. Change the shift
22145 to unsigned int. Add constructors for scalar_float_mode and
22146 scalar_int_mode elements.
22147 (aarch64_vect_float_const_representable_p): Delete.
22148 (aarch64_can_const_movi_rtx_p)
22149 (aarch64_simd_scalar_immediate_valid_for_move)
22150 (aarch64_simd_make_constant): Update call to
22151 aarch64_simd_valid_immediate.
22152 (aarch64_advsimd_valid_immediate_hs): New function.
22153 (aarch64_advsimd_valid_immediate): Likewise.
22154 (aarch64_simd_valid_immediate): Remove mode and inverse
22155 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22156 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22157 and aarch64_float_const_representable_p on the result.
22158 (aarch64_output_simd_mov_immediate): Remove mode argument.
22159 Update call to aarch64_simd_valid_immediate and use of
22160 simd_immediate_info.
22161 (aarch64_output_scalar_simd_mov_immediate): Update call
22164 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22165 Alan Hayward <alan.hayward@arm.com>
22166 David Sherwood <david.sherwood@arm.com>
22168 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22169 (mode_nunits): Likewise CONST_MODE_NUNITS.
22170 * machmode.def (ADJUST_NUNITS): Document.
22171 * genmodes.c (mode_data::need_nunits_adj): New field.
22172 (blank_mode): Update accordingly.
22173 (adj_nunits): New variable.
22174 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22176 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22177 listed in adj_nunits.
22178 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22179 listed in adj_nunits. Don't emit case statements for such modes.
22180 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22181 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22182 nothing if adj_nunits is nonnull.
22183 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22184 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22185 (emit_mode_fbit): Update use of print_maybe_const_decl.
22186 (emit_move_size): Likewise. Treat the array as non-const
22188 (emit_mode_adjustments): Handle adj_nunits.
22190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22192 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22193 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22194 (VECTOR_MODES): Use it.
22195 (make_vector_modes): Take the prefix as an argument.
22197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22198 Alan Hayward <alan.hayward@arm.com>
22199 David Sherwood <david.sherwood@arm.com>
22201 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22202 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22203 for MODE_VECTOR_BOOL.
22204 * machmode.def (VECTOR_BOOL_MODE): Document.
22205 * genmodes.c (VECTOR_BOOL_MODE): New macro.
22206 (make_vector_bool_mode): New function.
22207 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22209 * lto-streamer-in.c (lto_input_mode_table): Likewise.
22210 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22212 * stor-layout.c (int_mode_for_mode): Likewise.
22213 * tree.c (build_vector_type_for_mode): Likewise.
22214 * varasm.c (output_constant_pool_2): Likewise.
22215 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22216 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
22217 for MODE_VECTOR_BOOL.
22218 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22219 of mode class checks.
22220 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22221 instead of a list of mode class checks.
22222 (expand_vector_scalar_condition): Likewise.
22223 (type_for_widest_vector_mode): Handle BImode as an inner mode.
22225 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22226 Alan Hayward <alan.hayward@arm.com>
22227 David Sherwood <david.sherwood@arm.com>
22229 * machmode.h (mode_size): Change from unsigned short to
22231 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22232 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22233 or if measurement_type is not polynomial.
22234 (fixed_size_mode::includes_p): Check for constant-sized modes.
22235 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22236 return a poly_uint16 rather than an unsigned short.
22237 (emit_mode_size): Change the type of mode_size from unsigned short
22238 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
22239 (emit_mode_adjustments): Cope with polynomial vector sizes.
22240 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22242 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22244 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22245 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22246 * caller-save.c (setup_save_areas): Likewise.
22247 (replace_reg_with_saved_mem): Likewise.
22248 * calls.c (emit_library_call_value_1): Likewise.
22249 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22250 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22251 (gen_lowpart_for_combine): Likewise.
22252 * convert.c (convert_to_integer_1): Likewise.
22253 * cse.c (equiv_constant, cse_insn): Likewise.
22254 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22255 (cselib_subst_to_values): Likewise.
22256 * dce.c (word_dce_process_block): Likewise.
22257 * df-problems.c (df_word_lr_mark_ref): Likewise.
22258 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22259 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22260 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22261 (rtl_for_decl_location): Likewise.
22262 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22263 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22264 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22265 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22266 (expand_expr_real_1): Likewise.
22267 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22268 (pad_below): Likewise.
22269 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22270 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22271 * ira.c (get_subreg_tracking_sizes): Likewise.
22272 * ira-build.c (ira_create_allocno_objects): Likewise.
22273 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22274 (ira_sort_regnos_for_alter_reg): Likewise.
22275 * ira-costs.c (record_operand_costs): Likewise.
22276 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22277 (resolve_simple_move): Likewise.
22278 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22279 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22280 (lra_constraints): Likewise.
22281 (CONST_POOL_OK_P): Reject variable-sized modes.
22282 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22283 (add_pseudo_to_slot, lra_spill): Likewise.
22284 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22285 * optabs-query.c (get_best_extraction_insn): Likewise.
22286 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22287 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22288 (expand_mult_highpart, valid_multiword_target_p): Likewise.
22289 * recog.c (offsettable_address_addr_space_p): Likewise.
22290 * regcprop.c (maybe_mode_change): Likewise.
22291 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22292 * regrename.c (build_def_use): Likewise.
22293 * regstat.c (dump_reg_info): Likewise.
22294 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22295 (find_reloads, find_reloads_subreg_address): Likewise.
22296 * reload1.c (eliminate_regs_1): Likewise.
22297 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22298 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22299 (simplify_binary_operation_1, simplify_subreg): Likewise.
22300 * targhooks.c (default_function_arg_padding): Likewise.
22301 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22302 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22303 (verify_gimple_assign_ternary): Likewise.
22304 * tree-inline.c (estimate_move_cost): Likewise.
22305 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22306 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22307 (get_address_cost_ainc): Likewise.
22308 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22309 (vect_supportable_dr_alignment): Likewise.
22310 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22311 (vectorizable_reduction): Likewise.
22312 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22313 (vectorizable_operation, vectorizable_load): Likewise.
22314 * tree.c (build_same_sized_truth_vector_type): Likewise.
22315 * valtrack.c (cleanup_auto_inc_dec): Likewise.
22316 * var-tracking.c (emit_note_insn_var_location): Likewise.
22317 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22318 (ADDR_VEC_ALIGN): Likewise.
22320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22321 Alan Hayward <alan.hayward@arm.com>
22322 David Sherwood <david.sherwood@arm.com>
22324 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22326 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22327 or if measurement_type is polynomial.
22328 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22329 * combine.c (make_extraction): Likewise.
22330 * dse.c (find_shift_sequence): Likewise.
22331 * dwarf2out.c (mem_loc_descriptor): Likewise.
22332 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22333 (extract_bit_field, extract_low_bits): Likewise.
22334 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22335 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22336 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22337 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22338 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22339 * reload.c (find_reloads): Likewise.
22340 * reload1.c (alter_reg): Likewise.
22341 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22342 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22343 * tree-if-conv.c (predicate_mem_writes): Likewise.
22344 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22345 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22346 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22347 * valtrack.c (dead_debug_insert_temp): Likewise.
22348 * varasm.c (mergeable_constant_section): Likewise.
22349 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22351 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22352 Alan Hayward <alan.hayward@arm.com>
22353 David Sherwood <david.sherwood@arm.com>
22355 * expr.c (expand_assignment): Cope with polynomial mode sizes
22356 when assigning to a CONCAT.
22358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22359 Alan Hayward <alan.hayward@arm.com>
22360 David Sherwood <david.sherwood@arm.com>
22362 * machmode.h (mode_precision): Change from unsigned short to
22364 (mode_to_precision): Return a poly_uint16 rather than an unsigned
22366 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22367 or if measurement_type is not polynomial.
22368 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
22369 in which the mode is already known to be a scalar_int_mode.
22370 * genmodes.c (emit_mode_precision): Change the type of mode_precision
22371 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
22373 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22374 for GET_MODE_PRECISION.
22375 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22376 for GET_MODE_PRECISION.
22377 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22379 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22380 (expand_field_assignment, make_extraction): Likewise.
22381 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22382 (get_last_value): Likewise.
22383 * convert.c (convert_to_integer_1): Likewise.
22384 * cse.c (cse_insn): Likewise.
22385 * expr.c (expand_expr_real_1): Likewise.
22386 * lra-constraints.c (simplify_operand_subreg): Likewise.
22387 * optabs-query.c (can_atomic_load_p): Likewise.
22388 * optabs.c (expand_atomic_load): Likewise.
22389 (expand_atomic_store): Likewise.
22390 * ree.c (combine_reaching_defs): Likewise.
22391 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22392 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22393 * tree.h (type_has_mode_precision_p): Likewise.
22394 * ubsan.c (instrument_si_overflow): Likewise.
22396 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22397 Alan Hayward <alan.hayward@arm.com>
22398 David Sherwood <david.sherwood@arm.com>
22400 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22401 polynomial numbers of units.
22402 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22403 (valid_vector_subparts_p): New function.
22404 (build_vector_type): Remove temporary shim and take the number
22405 of units as a poly_uint64 rather than an int.
22406 (build_opaque_vector_type): Take the number of units as a
22407 poly_uint64 rather than an int.
22408 * tree.c (build_vector_from_ctor): Handle polynomial
22409 TYPE_VECTOR_SUBPARTS.
22410 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22411 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22412 (build_vector_from_val): If the number of units is variable,
22413 use build_vec_duplicate_cst for constant operands and
22414 VEC_DUPLICATE_EXPR otherwise.
22415 (make_vector_type): Remove temporary is_constant ().
22416 (build_vector_type, build_opaque_vector_type): Take the number of
22417 units as a poly_uint64 rather than an int.
22418 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22420 * cfgexpand.c (expand_debug_expr): Likewise.
22421 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22422 (store_constructor, expand_expr_real_1): Likewise.
22423 (const_scalar_mask_from_tree): Likewise.
22424 * fold-const-call.c (fold_const_reduction): Likewise.
22425 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22426 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22427 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22428 (fold_relational_const): Likewise.
22429 (native_interpret_vector): Likewise. Change the size from an
22430 int to an unsigned int.
22431 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22432 TYPE_VECTOR_SUBPARTS.
22433 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22434 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22435 duplicating a non-constant operand into a variable-length vector.
22436 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22437 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22438 * ipa-icf.c (sem_variable::equals): Likewise.
22439 * match.pd: Likewise.
22440 * omp-simd-clone.c (simd_clone_subparts): Likewise.
22441 * print-tree.c (print_node): Likewise.
22442 * stor-layout.c (layout_type): Likewise.
22443 * targhooks.c (default_builtin_vectorization_cost): Likewise.
22444 * tree-cfg.c (verify_gimple_comparison): Likewise.
22445 (verify_gimple_assign_binary): Likewise.
22446 (verify_gimple_assign_ternary): Likewise.
22447 (verify_gimple_assign_single): Likewise.
22448 * tree-pretty-print.c (dump_generic_node): Likewise.
22449 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22450 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22451 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22452 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22453 (vect_shift_permute_load_chain): Likewise.
22454 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22455 (expand_vector_condition, optimize_vector_constructor): Likewise.
22456 (lower_vec_perm, get_compute_type): Likewise.
22457 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22458 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22459 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22460 (vect_recog_mask_conversion_pattern): Likewise.
22461 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22462 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22463 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22464 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22465 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22466 (vectorizable_shift, vectorizable_operation, vectorizable_store)
22467 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22468 (supportable_widening_operation): Likewise.
22469 (supportable_narrowing_operation): Likewise.
22470 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22472 * varasm.c (output_constant): Likewise.
22474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22475 Alan Hayward <alan.hayward@arm.com>
22476 David Sherwood <david.sherwood@arm.com>
22478 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22479 so that both the length == 3 and length != 3 cases set up their
22480 own permute vectors. Add comments explaining why we know the
22481 number of elements is constant.
22482 (vect_permute_load_chain): Likewise.
22484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22485 Alan Hayward <alan.hayward@arm.com>
22486 David Sherwood <david.sherwood@arm.com>
22488 * machmode.h (mode_nunits): Change from unsigned char to
22490 (ONLY_FIXED_SIZE_MODES): New macro.
22491 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22492 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22493 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22495 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22496 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22497 or if measurement_type is not polynomial.
22498 * genmodes.c (ZERO_COEFFS): New macro.
22499 (emit_mode_nunits_inline): Make mode_nunits_inline return a
22501 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22502 Use ZERO_COEFFS when emitting initializers.
22503 * data-streamer.h (bp_pack_poly_value): New function.
22504 (bp_unpack_poly_value): Likewise.
22505 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22506 for GET_MODE_NUNITS.
22507 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22508 for GET_MODE_NUNITS.
22509 * tree.c (make_vector_type): Remove temporary shim and make
22510 the real function take the number of units as a poly_uint64
22511 rather than an int.
22512 (build_vector_type_for_mode): Handle polynomial nunits.
22513 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22514 * emit-rtl.c (const_vec_series_p_1): Likewise.
22515 (gen_rtx_CONST_VECTOR): Likewise.
22516 * fold-const.c (test_vec_duplicate_folding): Likewise.
22517 * genrecog.c (validate_pattern): Likewise.
22518 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22519 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22520 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22521 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22522 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22523 * rtlanal.c (subreg_get_info): Likewise.
22524 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22525 (vect_grouped_load_supported): Likewise.
22526 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22527 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22528 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22529 (simplify_const_unary_operation, simplify_binary_operation_1)
22530 (simplify_const_binary_operation, simplify_ternary_operation)
22531 (test_vector_ops_duplicate, test_vector_ops): Likewise.
22532 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22533 instead of CONST_VECTOR_NUNITS.
22534 * varasm.c (output_constant_pool_2): Likewise.
22535 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22536 explicit-encoded elements in the XVEC for variable-length vectors.
22538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22540 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22543 Alan Hayward <alan.hayward@arm.com>
22544 David Sherwood <david.sherwood@arm.com>
22546 * coretypes.h (fixed_size_mode): Declare.
22547 (fixed_size_mode_pod): New typedef.
22548 * builtins.h (target_builtins::x_apply_args_mode)
22549 (target_builtins::x_apply_result_mode): Change type to
22550 fixed_size_mode_pod.
22551 * builtins.c (apply_args_size, apply_result_size, result_vector)
22552 (expand_builtin_apply_args_1, expand_builtin_apply)
22553 (expand_builtin_return): Update accordingly.
22555 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22557 * cse.c (hash_rtx_cb): Hash only the encoded elements.
22558 * cselib.c (cselib_hash_rtx): Likewise.
22559 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22560 CONST_VECTOR encoding.
22562 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22563 Jeff Law <law@redhat.com>
22566 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22567 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22568 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22569 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22572 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22573 explicitly probe *sp in a noreturn function if there were any callee
22574 register saves or frame pointer is needed.
22576 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22579 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22580 BLKmode for ternary, binary or unary expressions.
22583 * var-tracking.c (delete_vta_debug_insn): New inline function.
22584 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22585 insns from get_insns () to NULL instead of each bb separately.
22586 Use delete_vta_debug_insn. No longer static.
22587 (vt_debug_insns_local, variable_tracking_main_1): Adjust
22588 delete_vta_debug_insns callers.
22589 * rtl.h (delete_vta_debug_insns): Declare.
22590 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22591 instead of variable_tracking_main.
22593 2018-01-03 Martin Sebor <msebor@redhat.com>
22595 PR tree-optimization/83603
22596 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22597 arguments past the endof the argument list in functions declared
22598 without a prototype.
22599 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22600 Avoid checking when arguments are null.
22602 2018-01-03 Martin Sebor <msebor@redhat.com>
22605 * doc/extend.texi (attribute const): Fix a typo.
22606 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22607 issuing -Wsuggest-attribute for void functions.
22609 2018-01-03 Martin Sebor <msebor@redhat.com>
22611 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22612 offset_int::from instead of wide_int::to_shwi.
22613 (maybe_diag_overlap): Remove assertion.
22614 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22615 * gimple-ssa-sprintf.c (format_directive): Same.
22616 (parse_directive): Same.
22617 (sprintf_dom_walker::compute_format_length): Same.
22618 (try_substitute_return_value): Same.
22620 2018-01-03 Jeff Law <law@redhat.com>
22622 PR middle-end/83654
22623 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22624 non-constant residual for zero at runtime and avoid probing in
22625 that case. Reorganize code for trailing problem to mirror handling
22628 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22630 PR tree-optimization/83501
22631 * tree-ssa-strlen.c (get_string_cst): New.
22632 (handle_char_store): Call get_string_cst.
22634 2018-01-03 Martin Liska <mliska@suse.cz>
22636 PR tree-optimization/83593
22637 * tree-ssa-strlen.c: Include tree-cfg.h.
22638 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22639 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22640 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22642 (strlen_dom_walker::before_dom_children): Call
22643 gimple_purge_dead_eh_edges. Dump tranformation with details
22645 (strlen_dom_walker::before_dom_children): Update call by adding
22646 new argument cleanup_eh.
22647 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22649 2018-01-03 Martin Liska <mliska@suse.cz>
22652 * cif-code.def (VARIADIC_THUNK): New enum value.
22653 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22656 2018-01-03 Jan Beulich <jbeulich@suse.com>
22658 * sse.md (mov<mode>_internal): Tighten condition for when to use
22659 vmovdqu<ssescalarsize> for TI and OI modes.
22661 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22663 Update copyright years.
22665 2018-01-03 Martin Liska <mliska@suse.cz>
22668 * ipa-visibility.c (function_and_variable_visibility): Skip
22669 functions with noipa attribure.
22671 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22673 * gcc.c (process_command): Update copyright notice dates.
22674 * gcov-dump.c (print_version): Ditto.
22675 * gcov.c (print_version): Ditto.
22676 * gcov-tool.c (print_version): Ditto.
22677 * gengtype.c (create_file): Ditto.
22678 * doc/cpp.texi: Bump @copying's copyright year.
22679 * doc/cppinternals.texi: Ditto.
22680 * doc/gcc.texi: Ditto.
22681 * doc/gccint.texi: Ditto.
22682 * doc/gcov.texi: Ditto.
22683 * doc/install.texi: Ditto.
22684 * doc/invoke.texi: Ditto.
22686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22688 * vector-builder.h (vector_builder::m_full_nelts): Change from
22689 unsigned int to poly_uint64.
22690 (vector_builder::full_nelts): Update prototype accordingly.
22691 (vector_builder::new_vector): Likewise.
22692 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22693 (vector_builder::operator ==): Likewise.
22694 (vector_builder::finalize): Likewise.
22695 * int-vector-builder.h (int_vector_builder::int_vector_builder):
22696 Take the number of elements as a poly_uint64 rather than an
22698 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22699 from unsigned int to poly_uint64.
22700 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22701 (vec_perm_indices::new_vector): Likewise.
22702 (vec_perm_indices::length): Likewise.
22703 (vec_perm_indices::nelts_per_input): Likewise.
22704 (vec_perm_indices::input_nelts): Likewise.
22705 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22706 number of elements per input as a poly_uint64 rather than an
22707 unsigned int. Use the original encoding for variable-length
22708 vectors, rather than clamping each individual element.
22709 For the second and subsequent elements in each pattern,
22710 clamp the step and base before clamping their sum.
22711 (vec_perm_indices::series_p): Handle polynomial element counts.
22712 (vec_perm_indices::all_in_range_p): Likewise.
22713 (vec_perm_indices_to_tree): Likewise.
22714 (vec_perm_indices_to_rtx): Likewise.
22715 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22716 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22717 (tree_vector_builder::new_binary_operation): Handle polynomial
22718 element counts. Return false if we need to know the number
22719 of elements at compile time.
22720 * fold-const.c (fold_vec_perm): Punt if the number of elements
22721 isn't known at compile time.
22723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22725 * vec-perm-indices.h (vec_perm_builder): Change element type
22726 from HOST_WIDE_INT to poly_int64.
22727 (vec_perm_indices::element_type): Update accordingly.
22728 (vec_perm_indices::clamp): Handle polynomial element_types.
22729 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22730 (vec_perm_indices::all_in_range_p): Likewise.
22731 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22733 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22734 polynomial vec_perm_indices element types.
22735 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22736 * fold-const.c (fold_vec_perm): Likewise.
22737 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22738 * tree-vect-generic.c (lower_vec_perm): Likewise.
22739 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22740 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22741 element type to HOST_WIDE_INT.
22743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22744 Alan Hayward <alan.hayward@arm.com>
22745 David Sherwood <david.sherwood@arm.com>
22747 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22748 rather than an int. Use plus_constant.
22749 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22750 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22753 Alan Hayward <alan.hayward@arm.com>
22754 David Sherwood <david.sherwood@arm.com>
22756 * calls.c (emit_call_1, expand_call): Change struct_value_size from
22757 a HOST_WIDE_INT to a poly_int64.
22759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22760 Alan Hayward <alan.hayward@arm.com>
22761 David Sherwood <david.sherwood@arm.com>
22763 * calls.c (load_register_parameters): Cope with polynomial
22764 mode sizes. Require a constant size for BLKmode parameters
22765 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
22766 forces a parameter to be padded at the lsb end in order to
22767 fill a complete number of words, require the parameter size
22768 to be ordered wrt UNITS_PER_WORD.
22770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22771 Alan Hayward <alan.hayward@arm.com>
22772 David Sherwood <david.sherwood@arm.com>
22774 * reload1.c (spill_stack_slot_width): Change element type
22775 from unsigned int to poly_uint64_pod.
22776 (alter_reg): Treat mode sizes as polynomial.
22778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22779 Alan Hayward <alan.hayward@arm.com>
22780 David Sherwood <david.sherwood@arm.com>
22782 * reload.c (complex_word_subreg_p): New function.
22783 (reload_inner_reg_of_subreg, push_reload): Use it.
22785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22786 Alan Hayward <alan.hayward@arm.com>
22787 David Sherwood <david.sherwood@arm.com>
22789 * lra-constraints.c (process_alt_operands): Reject matched
22790 operands whose sizes aren't ordered.
22791 (match_reload): Refer to this check here.
22793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22794 Alan Hayward <alan.hayward@arm.com>
22795 David Sherwood <david.sherwood@arm.com>
22797 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22798 that the mode size is in the set {1, 2, 4, 8, 16}.
22800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22801 Alan Hayward <alan.hayward@arm.com>
22802 David Sherwood <david.sherwood@arm.com>
22804 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22805 Use plus_constant instead of gen_rtx_PLUS.
22807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22808 Alan Hayward <alan.hayward@arm.com>
22809 David Sherwood <david.sherwood@arm.com>
22811 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22812 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22813 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22814 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22815 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22816 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22817 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22818 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22819 * config/i386/i386.c (ix86_push_rounding): ...this new function.
22820 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22822 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22823 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22824 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22825 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22826 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22827 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22828 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22829 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22830 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22831 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22833 * expr.c (emit_move_resolve_push): Treat the input and result
22834 of PUSH_ROUNDING as a poly_int64.
22835 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22836 (emit_push_insn): Likewise.
22837 * lra-eliminations.c (mark_not_eliminable): Likewise.
22838 * recog.c (push_operand): Likewise.
22839 * reload1.c (elimination_effects): Likewise.
22840 * rtlanal.c (nonzero_bits1): Likewise.
22841 * calls.c (store_one_arg): Likewise. Require the padding to be
22842 known at compile time.
22844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22845 Alan Hayward <alan.hayward@arm.com>
22846 David Sherwood <david.sherwood@arm.com>
22848 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22849 Use plus_constant instead of gen_rtx_PLUS.
22851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22852 Alan Hayward <alan.hayward@arm.com>
22853 David Sherwood <david.sherwood@arm.com>
22855 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22856 rather than an int.
22858 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22859 Alan Hayward <alan.hayward@arm.com>
22860 David Sherwood <david.sherwood@arm.com>
22862 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22863 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22864 via stack temporaries. Treat the mode size as polynomial too.
22866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22867 Alan Hayward <alan.hayward@arm.com>
22868 David Sherwood <david.sherwood@arm.com>
22870 * expr.c (expand_expr_real_2): When handling conversions involving
22871 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22872 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
22873 as a poly_uint64 too.
22875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22876 Alan Hayward <alan.hayward@arm.com>
22877 David Sherwood <david.sherwood@arm.com>
22879 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22882 Alan Hayward <alan.hayward@arm.com>
22883 David Sherwood <david.sherwood@arm.com>
22885 * combine.c (can_change_dest_mode): Handle polynomial
22886 REGMODE_NATURAL_SIZE.
22887 * expmed.c (store_bit_field_1): Likewise.
22888 * expr.c (store_constructor): Likewise.
22889 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22890 and polynomial REGMODE_NATURAL_SIZE.
22891 (gen_lowpart_common): Likewise.
22892 * reginfo.c (record_subregs_of_mode): Likewise.
22893 * rtlanal.c (read_modify_subreg_p): Likewise.
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 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22900 numbers of elements.
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 * match.pd: Cope with polynomial numbers of vector elements.
22908 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22909 Alan Hayward <alan.hayward@arm.com>
22910 David Sherwood <david.sherwood@arm.com>
22912 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22913 in a POINTER_PLUS_EXPR.
22915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22916 Alan Hayward <alan.hayward@arm.com>
22917 David Sherwood <david.sherwood@arm.com>
22919 * omp-simd-clone.c (simd_clone_subparts): New function.
22920 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22921 (ipa_simd_modify_function_body): Likewise.
22923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22924 Alan Hayward <alan.hayward@arm.com>
22925 David Sherwood <david.sherwood@arm.com>
22927 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22928 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22929 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22930 (expand_vector_condition, vector_element): Likewise.
22931 (subparts_gt): New function.
22932 (get_compute_type): Use subparts_gt.
22933 (count_type_subparts): Delete.
22934 (expand_vector_operations_1): Use subparts_gt instead of
22935 count_type_subparts.
22937 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22938 Alan Hayward <alan.hayward@arm.com>
22939 David Sherwood <david.sherwood@arm.com>
22941 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22942 (vect_compile_time_alias): ...this new function. Do the calculation
22943 on poly_ints rather than trees.
22944 (vect_prune_runtime_alias_test_list): Update call accordingly.
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 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22952 (vect_schedule_slp_instance): Likewise.
22954 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22955 Alan Hayward <alan.hayward@arm.com>
22956 David Sherwood <david.sherwood@arm.com>
22958 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22959 constant and extern definitions for variable-length vectors.
22960 (vect_get_constant_vectors): Note that the number of units
22961 is known to be constant.
22963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22964 Alan Hayward <alan.hayward@arm.com>
22965 David Sherwood <david.sherwood@arm.com>
22967 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22968 of units as polynomial. Choose between WIDE and NARROW based
22971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22972 Alan Hayward <alan.hayward@arm.com>
22973 David Sherwood <david.sherwood@arm.com>
22975 * tree-vect-stmts.c (simd_clone_subparts): New function.
22976 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22979 Alan Hayward <alan.hayward@arm.com>
22980 David Sherwood <david.sherwood@arm.com>
22982 * tree-vect-stmts.c (vectorizable_call): Treat the number of
22983 vectors as polynomial. Use build_index_vector for
22984 IFN_GOMP_SIMD_LANE.
22986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22987 Alan Hayward <alan.hayward@arm.com>
22988 David Sherwood <david.sherwood@arm.com>
22990 * tree-vect-stmts.c (get_load_store_type): Treat the number of
22991 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22992 for variable-length vectors.
22993 (vectorizable_mask_load_store): Treat the number of units as
22994 polynomial, asserting that it is constant if the condition has
22995 already been enforced.
22996 (vectorizable_store, vectorizable_load): Likewise.
22998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22999 Alan Hayward <alan.hayward@arm.com>
23000 David Sherwood <david.sherwood@arm.com>
23002 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23003 of units as polynomial. Punt if we can't tell at compile time
23004 which vector contains the final result.
23006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23007 Alan Hayward <alan.hayward@arm.com>
23008 David Sherwood <david.sherwood@arm.com>
23010 * tree-vect-loop.c (vectorizable_induction): Treat the number
23011 of units as polynomial. Punt on SLP inductions. Use an integer
23012 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23013 cast of such a series for variable-length floating-point
23016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23017 Alan Hayward <alan.hayward@arm.com>
23018 David Sherwood <david.sherwood@arm.com>
23020 * tree.h (build_index_vector): Declare.
23021 * tree.c (build_index_vector): New function.
23022 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23023 of units as polynomial, forcibly converting it to a constant if
23024 vectorizable_reduction has already enforced the condition.
23025 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23026 to create a {1,2,3,...} vector.
23027 (vectorizable_reduction): Treat the number of units as polynomial.
23028 Choose vectype_in based on the largest scalar element size rather
23029 than the smallest number of units. Enforce the restrictions
23032 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23033 Alan Hayward <alan.hayward@arm.com>
23034 David Sherwood <david.sherwood@arm.com>
23036 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23037 number of units as polynomial.
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 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23044 * target.def (autovectorize_vector_sizes): Return the vector sizes
23045 by pointer, using vector_sizes rather than a bitmask.
23046 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23047 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23048 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23050 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23051 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23052 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23053 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23054 * omp-general.c (omp_max_vf): Likewise.
23055 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23056 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23057 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23058 * tree-vect-slp.c (vect_slp_bb): Likewise.
23059 * doc/tm.texi: Regenerate.
23060 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23062 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23063 the vector size as a poly_uint64 rather than an unsigned int.
23064 (current_vector_size): Change from an unsigned int to a poly_uint64.
23065 (get_vectype_for_scalar_type): Update accordingly.
23066 * tree.h (build_truth_vector_type): Take the size and number of
23067 units as a poly_uint64 rather than an unsigned int.
23068 (build_vector_type): Add a temporary overload that takes
23069 the number of units as a poly_uint64 rather than an unsigned int.
23070 * tree.c (make_vector_type): Likewise.
23071 (build_truth_vector_type): Take the number of units as a poly_uint64
23072 rather than an unsigned int.
23074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23075 Alan Hayward <alan.hayward@arm.com>
23076 David Sherwood <david.sherwood@arm.com>
23078 * target.def (get_mask_mode): Take the number of units and length
23079 as poly_uint64s rather than unsigned ints.
23080 * targhooks.h (default_get_mask_mode): Update accordingly.
23081 * targhooks.c (default_get_mask_mode): Likewise.
23082 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23083 * doc/tm.texi: Regenerate.
23085 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23086 Alan Hayward <alan.hayward@arm.com>
23087 David Sherwood <david.sherwood@arm.com>
23089 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23090 * omp-general.c (omp_max_vf): Likewise.
23091 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23092 (expand_omp_simd): Handle polynomial safelen.
23093 * omp-low.c (omplow_simd_context): Add a default constructor.
23094 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23095 (lower_rec_simd_input_clauses): Update accordingly.
23096 (lower_rec_input_clauses): Likewise.
23098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23099 Alan Hayward <alan.hayward@arm.com>
23100 David Sherwood <david.sherwood@arm.com>
23102 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23103 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23104 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23105 (vect_analyze_slp_cost): Likewise.
23106 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23107 (vect_model_load_cost): Likewise.
23109 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23110 Alan Hayward <alan.hayward@arm.com>
23111 David Sherwood <david.sherwood@arm.com>
23113 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23114 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23115 from an unsigned int * to a poly_uint64_pod *.
23116 (calculate_unrolling_factor): New function.
23117 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23120 Alan Hayward <alan.hayward@arm.com>
23121 David Sherwood <david.sherwood@arm.com>
23123 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23124 from an unsigned int to a poly_uint64.
23125 (_loop_vec_info::slp_unrolling_factor): Likewise.
23126 (_loop_vec_info::vectorization_factor): Change from an int
23128 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23129 (vect_get_num_vectors): New function.
23130 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23131 (vect_get_num_copies): Use vect_get_num_vectors.
23132 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23133 to an unsigned int *.
23134 (vect_analyze_data_refs): Change min_vf from an int * to a
23136 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23137 than an unsigned HOST_WIDE_INT.
23138 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23139 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23140 to an unsigned int *.
23141 (vect_analyze_data_ref_dependences): Likewise.
23142 (vect_compute_data_ref_alignment): Handle polynomial vf.
23143 (vect_enhance_data_refs_alignment): Likewise.
23144 (vect_prune_runtime_alias_test_list): Likewise.
23145 (vect_shift_permute_load_chain): Likewise.
23146 (vect_supportable_dr_alignment): Likewise.
23147 (dependence_distance_ge_vf): Take the vectorization factor as a
23148 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23149 (vect_analyze_data_refs): Change min_vf from an int * to a
23151 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23152 vfm1 as a poly_uint64 rather than an int. Make the same change
23153 for the returned bound_scalar.
23154 (vect_gen_vector_loop_niters): Handle polynomial vf.
23155 (vect_do_peeling): Likewise. Update call to
23156 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23157 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23159 * tree-vect-loop.c (vect_determine_vectorization_factor)
23160 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23161 (vect_get_known_peeling_cost): Likewise.
23162 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23163 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23164 (vect_transform_loop): Likewise. Use the lowest possible VF when
23165 updating the upper bounds of the loop.
23166 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23167 rather than an int.
23168 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23169 polynomial unroll factors.
23170 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23171 (vect_make_slp_decision): Likewise.
23172 (vect_supported_load_permutation_p): Likewise, and polynomial
23174 (vect_analyze_slp_cost): Handle polynomial vf.
23175 (vect_slp_analyze_node_operations): Likewise.
23176 (vect_slp_analyze_bb_1): Likewise.
23177 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23178 than an unsigned HOST_WIDE_INT.
23179 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23180 (vectorizable_load): Handle polynomial vf.
23181 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23183 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23186 Alan Hayward <alan.hayward@arm.com>
23187 David Sherwood <david.sherwood@arm.com>
23189 * match.pd: Handle bit operations involving three constants
23190 and try to fold one pair.
23192 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23194 * tree-vect-loop-manip.c: Include gimple-fold.h.
23195 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23196 niters_maybe_zero parameters. Handle other cases besides a step of 1.
23197 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23198 Add a path that uses a step of VF instead of 1, but disable it
23200 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23201 and niters_no_overflow parameters. Update calls to
23202 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23203 Create a new SSA name if the latter choses to use a ste other
23204 than zero, and return it via niters_vector_mult_vf_var.
23205 * tree-vect-loop.c (vect_transform_loop): Update calls to
23206 vect_do_peeling, vect_gen_vector_loop_niters and
23207 slpeel_make_loop_iterate_ntimes.
23208 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23209 (vect_gen_vector_loop_niters): Update declarations after above changes.
23211 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
23213 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23214 128-bit round to integer instructions.
23215 (ceil<mode>2): Likewise.
23216 (btrunc<mode>2): Likewise.
23217 (round<mode>2): Likewise.
23219 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23221 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23222 unaligned VSX load/store on P8/P9.
23223 (expand_block_clear): Allow the use of unaligned VSX
23224 load/store on P8/P9.
23226 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23228 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23230 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23231 swap associated with both a load and a store.
23233 2018-01-02 Andrew Waterman <andrew@sifive.com>
23235 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23236 * config/riscv/riscv.md (clear_cache): Use it.
23238 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
23240 * web.c: Remove out-of-date comment.
23242 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23244 * expr.c (fixup_args_size_notes): Check that any existing
23245 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23246 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23247 (emit_single_push_insn): ...here.
23249 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23251 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23252 (const_vector_encoded_nelts): New function.
23253 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23254 (const_vector_int_elt, const_vector_elt): Declare.
23255 * emit-rtl.c (const_vector_int_elt_1): New function.
23256 (const_vector_elt): Likewise.
23257 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23258 of CONST_VECTOR_ELT.
23260 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23262 * expr.c: Include rtx-vector-builder.h.
23263 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23264 directly on the tree encoding.
23265 (const_vector_from_tree): Likewise.
23266 * optabs.c: Include rtx-vector-builder.h.
23267 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23268 sequence of "u" values.
23269 * vec-perm-indices.c: Include rtx-vector-builder.h.
23270 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23271 directly on the vec_perm_indices encoding.
23273 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23275 * doc/rtl.texi (const_vector): Describe new encoding scheme.
23276 * Makefile.in (OBJS): Add rtx-vector-builder.o.
23277 * rtx-vector-builder.h: New file.
23278 * rtx-vector-builder.c: Likewise.
23279 * rtl.h (rtx_def::u2): Add a const_vector field.
23280 (CONST_VECTOR_NPATTERNS): New macro.
23281 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23282 (CONST_VECTOR_DUPLICATE_P): Likewise.
23283 (CONST_VECTOR_STEPPED_P): Likewise.
23284 (CONST_VECTOR_ENCODED_ELT): Likewise.
23285 (const_vec_duplicate_p): Check for a duplicated vector encoding.
23286 (unwrap_const_vec_duplicate): Likewise.
23287 (const_vec_series_p): Check for a non-duplicated vector encoding.
23288 Say that the function only returns true for integer vectors.
23289 * emit-rtl.c: Include rtx-vector-builder.h.
23290 (gen_const_vec_duplicate_1): Delete.
23291 (gen_const_vector): Call gen_const_vec_duplicate instead of
23292 gen_const_vec_duplicate_1.
23293 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23294 (gen_const_vec_duplicate): Use rtx_vector_builder.
23295 (gen_const_vec_series): Likewise.
23296 (gen_rtx_CONST_VECTOR): Likewise.
23297 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23298 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23299 Build a new vector rather than modifying a CONST_VECTOR in-place.
23300 (handle_special_swappables): Update call accordingly.
23301 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23302 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23303 Build a new vector rather than modifying a CONST_VECTOR in-place.
23304 (handle_special_swappables): Update call accordingly.
23306 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23308 * simplify-rtx.c (simplify_const_binary_operation): Use
23309 CONST_VECTOR_ELT instead of XVECEXP.
23311 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23313 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23314 the selector elements to be different from the data elements
23315 if the selector is a VECTOR_CST.
23316 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23317 ssizetype for the selector.
23319 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23321 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23322 before testing each element individually.
23323 * tree-vect-generic.c (lower_vec_perm): Likewise.
23325 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23327 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23328 * selftest-run-tests.c (selftest::run_tests): Call it.
23329 * vector-builder.h (vector_builder::operator ==): New function.
23330 (vector_builder::operator !=): Likewise.
23331 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23332 (vec_perm_indices::all_from_input_p): New function.
23333 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23334 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23335 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23336 instead of reading the VECTOR_CST directly. Detect whether both
23337 vector inputs are the same before constructing the vec_perm_indices,
23338 and update the number of inputs argument accordingly. Use the
23339 utility functions added above. Only construct sel2 if we need to.
23341 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23343 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23344 the broadcast of the low byte.
23345 (expand_mult_highpart): Use an explicit encoding for the permutes.
23346 * optabs-query.c (can_mult_highpart_p): Likewise.
23347 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23348 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23349 (vectorizable_bswap): Likewise.
23350 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23351 explicit encoding for the power-of-2 permutes.
23352 (vect_permute_store_chain): Likewise.
23353 (vect_grouped_load_supported): Likewise.
23354 (vect_permute_load_chain): Likewise.
23356 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23358 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23359 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23360 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23361 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23362 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23363 (vect_gen_perm_mask_any): Likewise.
23365 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23367 * int-vector-builder.h: New file.
23368 * vec-perm-indices.h: Include int-vector-builder.h.
23369 (vec_perm_indices): Redefine as an int_vector_builder.
23370 (auto_vec_perm_indices): Delete.
23371 (vec_perm_builder): Redefine as a stand-alone class.
23372 (vec_perm_indices::vec_perm_indices): New function.
23373 (vec_perm_indices::clamp): Likewise.
23374 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23375 (vec_perm_indices::new_vector): New function.
23376 (vec_perm_indices::new_expanded_vector): Update for new
23377 vec_perm_indices class.
23378 (vec_perm_indices::rotate_inputs): New function.
23379 (vec_perm_indices::all_in_range_p): Operate directly on the
23380 encoded form, without computing elided elements.
23381 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23382 encoding. Update for new vec_perm_indices class.
23383 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23384 the given vec_perm_builder.
23385 (expand_vec_perm_var): Update vec_perm_builder constructor.
23386 (expand_mult_highpart): Use vec_perm_builder instead of
23387 auto_vec_perm_indices.
23388 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23389 vec_perm_indices instead of auto_vec_perm_indices. Use a single
23390 or double series encoding as appropriate.
23391 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23392 vec_perm_indices instead of auto_vec_perm_indices.
23393 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23394 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23395 (vect_permute_store_chain): Likewise.
23396 (vect_grouped_load_supported): Likewise.
23397 (vect_permute_load_chain): Likewise.
23398 (vect_shift_permute_load_chain): Likewise.
23399 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23400 (vect_transform_slp_perm_load): Likewise.
23401 (vect_schedule_slp_instance): Likewise.
23402 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23403 (vectorizable_mask_load_store): Likewise.
23404 (vectorizable_bswap): Likewise.
23405 (vectorizable_store): Likewise.
23406 (vectorizable_load): Likewise.
23407 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23408 vec_perm_indices instead of auto_vec_perm_indices. Use
23409 tree_to_vec_perm_builder to read the vector from a tree.
23410 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23411 vec_perm_builder instead of a vec_perm_indices.
23412 (have_whole_vector_shift): Use vec_perm_builder and
23413 vec_perm_indices instead of auto_vec_perm_indices. Leave the
23414 truncation to calc_vec_perm_mask_for_shift.
23415 (vect_create_epilog_for_reduction): Likewise.
23416 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23417 from auto_vec_perm_indices to vec_perm_indices.
23418 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23419 instead of changing individual elements.
23420 (aarch64_vectorize_vec_perm_const): Use new_vector to install
23421 the vector in d.perm.
23422 * config/arm/arm.c (expand_vec_perm_d::perm): Change
23423 from auto_vec_perm_indices to vec_perm_indices.
23424 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23425 instead of changing individual elements.
23426 (arm_vectorize_vec_perm_const): Use new_vector to install
23427 the vector in d.perm.
23428 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23429 Update vec_perm_builder constructor.
23430 (rs6000_expand_interleave): Likewise.
23431 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23432 (rs6000_expand_interleave): Likewise.
23434 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23436 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23437 to qimode could truncate the indices.
23438 * optabs.c (expand_vec_perm_var): Likewise.
23440 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23442 * Makefile.in (OBJS): Add vec-perm-indices.o.
23443 * vec-perm-indices.h: New file.
23444 * vec-perm-indices.c: Likewise.
23445 * target.h (vec_perm_indices): Replace with a forward class
23447 (auto_vec_perm_indices): Move to vec-perm-indices.h.
23448 * optabs.h: Include vec-perm-indices.h.
23449 (expand_vec_perm): Delete.
23450 (selector_fits_mode_p, expand_vec_perm_var): Declare.
23451 (expand_vec_perm_const): Declare.
23452 * target.def (vec_perm_const_ok): Replace with...
23453 (vec_perm_const): ...this new hook.
23454 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23455 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23456 * doc/tm.texi: Regenerate.
23457 * optabs.def (vec_perm_const): Delete.
23458 * doc/md.texi (vec_perm_const): Likewise.
23459 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23460 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23461 expand_vec_perm for constant permutation vectors. Assert that
23462 the mode of variable permutation vectors is the integer equivalent
23463 of the mode that is being permuted.
23464 * optabs-query.h (selector_fits_mode_p): Declare.
23465 * optabs-query.c: Include vec-perm-indices.h.
23466 (selector_fits_mode_p): New function.
23467 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23468 is defined, instead of checking whether the vec_perm_const_optab
23469 exists. Use targetm.vectorize.vec_perm_const instead of
23470 targetm.vectorize.vec_perm_const_ok. Check whether the indices
23471 fit in the vector mode before using a variable permute.
23472 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23473 vec_perm_indices instead of an rtx.
23474 (expand_vec_perm): Replace with...
23475 (expand_vec_perm_const): ...this new function. Take the selector
23476 as a vec_perm_indices rather than an rtx. Also take the mode of
23477 the selector. Update call to shift_amt_for_vec_perm_mask.
23478 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23479 Use vec_perm_indices::new_expanded_vector to expand the original
23480 selector into bytes. Check whether the indices fit in the vector
23481 mode before using a variable permute.
23482 (expand_vec_perm_var): Make global.
23483 (expand_mult_highpart): Use expand_vec_perm_const.
23484 * fold-const.c: Includes vec-perm-indices.h.
23485 * tree-ssa-forwprop.c: Likewise.
23486 * tree-vect-data-refs.c: Likewise.
23487 * tree-vect-generic.c: Likewise.
23488 * tree-vect-loop.c: Likewise.
23489 * tree-vect-slp.c: Likewise.
23490 * tree-vect-stmts.c: Likewise.
23491 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23493 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23494 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23495 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23496 (aarch64_vectorize_vec_perm_const): ...this new function.
23497 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23498 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23499 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23500 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23501 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23502 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23503 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23505 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
23506 check for NEON modes.
23507 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23508 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23509 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23510 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23512 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
23513 the old VEC_PERM_CONST conditions.
23514 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23515 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23516 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23517 (ia64_vectorize_vec_perm_const_ok): Merge into...
23518 (ia64_vectorize_vec_perm_const): ...this new function.
23519 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23520 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23521 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23522 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23523 * config/mips/mips.c (mips_expand_vec_perm_const)
23524 (mips_vectorize_vec_perm_const_ok): Merge into...
23525 (mips_vectorize_vec_perm_const): ...this new function.
23526 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23527 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23528 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23529 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23530 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23531 (rs6000_expand_vec_perm_const): Delete.
23532 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23534 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23535 (altivec_expand_vec_perm_const_le): Take each operand individually.
23536 Operate on constant selectors rather than rtxes.
23537 (altivec_expand_vec_perm_const): Likewise. Update call to
23538 altivec_expand_vec_perm_const_le.
23539 (rs6000_expand_vec_perm_const): Delete.
23540 (rs6000_vectorize_vec_perm_const_ok): Delete.
23541 (rs6000_vectorize_vec_perm_const): New function.
23542 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23543 an element count and rtx array.
23544 (rs6000_expand_extract_even): Update call accordingly.
23545 (rs6000_expand_interleave): Likewise.
23546 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23547 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23548 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23549 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23550 (rs6000_expand_vec_perm_const): Delete.
23551 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23552 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23553 (altivec_expand_vec_perm_const_le): Take each operand individually.
23554 Operate on constant selectors rather than rtxes.
23555 (altivec_expand_vec_perm_const): Likewise. Update call to
23556 altivec_expand_vec_perm_const_le.
23557 (rs6000_expand_vec_perm_const): Delete.
23558 (rs6000_vectorize_vec_perm_const_ok): Delete.
23559 (rs6000_vectorize_vec_perm_const): New function. Remove stray
23560 reference to the SPE evmerge intructions.
23561 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23562 an element count and rtx array.
23563 (rs6000_expand_extract_even): Update call accordingly.
23564 (rs6000_expand_interleave): Likewise.
23565 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23566 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23568 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23570 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23572 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23573 vector mode and that that mode matches the mode of the data
23575 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23576 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
23577 directly using expand_vec_perm_1 when forcing selectors into
23579 (expand_vec_perm_var): New function, split out from expand_vec_perm.
23581 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23583 * optabs-query.h (can_vec_perm_p): Delete.
23584 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23585 * optabs-query.c (can_vec_perm_p): Split into...
23586 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23587 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23588 particular selector is valid.
23589 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23590 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23591 (vect_grouped_load_supported): Likewise.
23592 (vect_shift_permute_load_chain): Likewise.
23593 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23594 (vect_transform_slp_perm_load): Likewise.
23595 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23596 (vectorizable_bswap): Likewise.
23597 (vect_gen_perm_mask_checked): Likewise.
23598 * fold-const.c (fold_ternary_loc): Likewise. Don't take
23599 implementations of variable permutation vectors into account
23600 when deciding which selector to use.
23601 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23602 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23603 with a false third argument.
23604 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23605 to test whether the constant selector is valid and can_vec_perm_var_p
23606 to test whether a variable selector is valid.
23608 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23610 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23611 * optabs-query.c (can_vec_perm_p): Likewise.
23612 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23613 instead of vec_perm_indices.
23614 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23615 (vect_gen_perm_mask_checked): Likewise,
23616 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23617 (vect_gen_perm_mask_checked): Likewise,
23619 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23621 * optabs-query.h (qimode_for_vec_perm): Declare.
23622 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23623 (qimode_for_vec_perm): ...this new function.
23624 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23626 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23628 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23629 does not have a conditional at the top.
23631 2018-01-02 Richard Biener <rguenther@suse.de>
23633 * ipa-inline.c (big_speedup_p): Fix expression.
23635 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23638 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23641 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23645 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23646 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23647 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23648 cond_taken_branch_cost 3->4.
23650 2018-01-01 Jakub Jelinek <jakub@redhat.com>
23652 PR tree-optimization/83581
23653 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23654 TODO_cleanup_cfg if any changes have been made.
23656 PR middle-end/83608
23657 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23658 convert_modes if target mode has the right side, but different mode
23661 PR middle-end/83609
23662 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23663 last argument when extracting from CONCAT. If either from_real or
23664 from_imag is NULL, use expansion through memory. If result is not
23665 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23666 the parts directly to inner mode, if even that fails, use expansion
23669 PR middle-end/83623
23670 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23671 check for bswap in mode rather than HImode and use that in expand_unop
23674 Copyright (C) 2018 Free Software Foundation, Inc.
23676 Copying and distribution of this file, with or without modification,
23677 are permitted in any medium without royalty provided the copyright
23678 notice and this notice are preserved.