1 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
3 * expmed.h (canonicalize_comparison): New declaration.
4 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
5 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6 * optabs.c (prepare_cmp_insn): Likewise.
7 * rtl.h (unsigned_condition_p): New function which checks if a
8 comparison operator is unsigned.
10 2018-08-16 Nathan Sidwell <nathan@acm.org>
12 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
13 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
15 2018-08-16 Tamar Christina <tamar.christina@arm.com>
18 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
19 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
20 (mov<mov>): ..this and enable unconditionally.
22 2018-08-16 Tamar Christina <tamar.christina@arm.com>
24 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
26 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
28 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
29 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
30 "Common" with "Target".
32 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
34 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
35 * doc/invoke.texi (mmitigate-rop): Remove.
36 * config/i386/i386.c: Do not include "regrename.h".
37 (ix86_rop_should_change_byte_p, reg_encoded_number)
38 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
40 (ix86_reorg): Remove call to ix86_mitigate_rop.
41 * config/i386/i386.md (attr "modrm_class"): Remove.
42 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
43 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
44 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
46 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
48 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
49 allow folding of mergeh() and mergel() for the float and double types.
50 (fold_mergehl_helper): Rework to handle building a permute tree
53 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
55 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
58 2018-08-15 David Malcolm <dmalcolm@redhat.com>
60 * common.opt (fdiagnostics-show-labels): New option.
61 * diagnostic-show-locus.c (class layout_range): Add field
63 (class layout): Add field "m_show_labels_p".
64 (layout_range::layout_range): Add param "label" and use it to
66 (make_range): Pass in NULL for new "label" param of layout_range's
68 (layout::layout): Initialize m_show_labels_p.
69 (layout::maybe_add_location_range): Pass in loc_range->m_label
70 when constructing layout_range instances.
71 (struct line_label): New struct.
72 (layout::print_any_labels): New member function.
73 (layout::print_line): Call it if label-printing is enabled.
74 (selftest::test_one_liner_labels): New test.
75 (selftest::test_diagnostic_show_locus_one_liner): Call it.
76 * diagnostic.c (diagnostic_initialize): Initialize
77 context->show_labels_p.
78 * diagnostic.h (struct diagnostic_context): Add field
80 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
81 -fno-diagnostics-show-labels.
82 * dwarf2out.c (gen_producer_string): Add
83 OPT_fdiagnostics_show_labels to the ignored options.
84 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
86 (gcc_rich_location::maybe_add_expr): Likewise.
87 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
88 label" param, defaulting to NULL.
89 (gcc_rich_location::add_expr): Add "label" param.
90 (gcc_rich_location::maybe_add_expr): Likewise.
91 (class text_range_label): New class.
92 (class range_label_for_type_mismatch): New class.
93 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
95 (fmtwarn_n): Likewise for new params of format_warning_n_va.
96 * lto-wrapper.c (merge_and_complain): Add
97 OPT_fdiagnostics_show_labels to the "pick one setting" options.
98 (append_compiler_options): Likewise to the dropped options.
99 (append_diag_options): Likewise to the passed-on options.
100 * opts.c (common_handle_option): Handle the new option.
101 * selftest-diagnostic.c
102 (test_diagnostic_context::test_diagnostic_context): Enable
104 * substring-locations.c: Include "gcc-rich-location.h".
105 (format_warning_n_va): Add "fmt_label" and "param_label" params
106 and use them as appropriate.
107 (format_warning_va): Add "fmt_label" and "param_label" params,
108 passing them on to format_warning_n_va.
109 (format_warning_at_substring): Likewise.
110 (format_warning_at_substring_n): Likewise.
111 * substring-locations.h (format_warning_va): Add "fmt_label" and
112 "param_label" params.
113 (format_warning_n_va): Likewise.
114 (format_warning_at_substring): Likewise.
115 (format_warning_at_substring_n): Likewise.
116 * toplev.c (general_init): Initialize global_dc->show_labels_p.
118 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
121 * builtins.c (expand_builtin_memcmp): Do not expand the call
122 when overflow is detected.
124 2018-08-15 Martin Sebor <msebor@redhat.com>
126 PR tree-optimization/71625
127 * config/aarch64/aarch64-builtins.c
128 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
130 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
132 * config/s390/s390.c (s390_reorg): Remove loop.
134 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
137 (darwin_function_switched_text_sections): Delete.
138 * gcc/config/darwin.h
139 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
141 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
144 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
145 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
146 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
148 2018-08-15 Martin Liska <mliska@suse.cz>
150 PR tree-optimization/86925
151 * predict.c (expr_expected_value_1): When taking
152 later predictor, assign also probability.
153 Use fold_build2_initializer_loc in order to fold
154 the expression in -frounding-math.
156 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
158 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
160 (expand_vec_perm_1): Try the new method.
162 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
165 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
166 Check whether lra_live_max_point is 0 before dividing.
168 2018-08-14 Martin Sebor <msebor@redhat.com>
170 PR tree-optimization/86650
171 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
172 (vrp_prop::check_mem_ref): Same.
174 2018-08-13 Liu Hao <lh_mouse@126.com>
176 * pretty-print.c (eat_esc_sequence): Swap the foreground and
177 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
178 and clear it thereafter, as it only works for DBCS.
180 2018-08-13 Liu Hao <lh_mouse@126.com>
182 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
183 handle returned by _get_osf_handle().
185 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
187 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
188 for folding vec_perm.
190 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
192 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
193 Add support for gimple-folding of vec_pack() and vec_unpack()
196 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
198 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
199 vec_xst variants to the list.
200 (rs6000_gimple_fold_builtin): Add support for folding unaligned
201 vector loads and stores.
203 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
205 * config.gcc (rs6000-ibm-aix4.x): Delete.
206 (rs6000-ibm-aix5.1): Delete.
207 (rs6000-ibm-aix5.2): Delete.
208 (rs6000-ibm-aix5.3): Delete.
209 * config/rs6000/aix43.h: Delete.
210 * config/rs6000/aix51.h: Delete.
211 * config/rs6000/aix52.h: Delete.
212 * config/rs6000/t-aix43: Delete.
214 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
216 * config/s390/s390.c (s390_decompose_constant_pool_ref):
218 (s390_decompose_address): Factor out constant pool ref
221 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
223 * config/nds32/nds32-predicates.c
224 (nds32_can_use_bclr_p): Change return type as bool.
225 (nds32_can_use_bset_p): Ditto.
226 (nds32_can_use_btgl_p): Ditto.
227 (nds32_can_use_bitci_p): Ditto.
228 * config/nds32/nds32-protos.h
229 (nds32_can_use_bclr_p): Change declaration.
230 (nds32_can_use_bset_p): Ditto.
231 (nds32_can_use_btgl_p): Ditto.
232 (nds32_can_use_bitci_p): Ditto.
234 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
236 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
237 Support -msched-prolog-epilog option.
238 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
240 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
242 * common/config/nds32/nds32-common.c
243 (nds32_option_optimization_table): Enalbe -malways-align.
245 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
247 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
249 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
250 OPT_misr_secure_ case.
251 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
252 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
253 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
255 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
256 (nds32_isr_info): New field security_level.
257 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
258 * config/nds32/nds32.md (return_internal): Consider critical attribute.
259 * config/nds32/nds32.opt (misr-secure): New option.
260 * config/nds32/nds32_init.inc: New file.
261 * config/nds32/nds32_isr.h: New file.
263 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
265 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
266 Update comment for atomic instructions.
267 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
268 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
270 (atomic_loaddi): Revise fence expansion to only emit fence prior to
271 load for __ATOMIC_SEQ_CST model.
272 (atomic_loaddi_1): Remove float register target.
273 (atomic_storedi): Handle CONST_INT values.
274 (atomic_storedi_1): Remove float register source. Add special case
276 (memory_barrier): New expander and insn.
278 2018-08-11 Jakub Jelinek <jakub@redhat.com>
280 PR tree-optimization/86835
281 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
282 new_stmt after def_gsi, make sure to insert new_square_stmt after
283 that stmt, not 2 stmts before it.
285 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
288 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
291 2018-08-10 Martin Liska <mliska@suse.cz>
294 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
296 * builtins.c (expand_builtin_expect_with_probability):
298 (expand_builtin_expect_with_probability): New function.
299 (build_builtin_expect_predicate): Add new argumnet probability
300 for BUILT_IN_EXPECT_WITH_PROBABILITY.
301 (fold_builtin_expect):
304 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
305 * builtins.h (fold_builtin_expect): Set new argument.
306 * doc/extend.texi: Document __builtin_expect_with_probability.
307 * doc/invoke.texi: Likewise.
308 * gimple-fold.c (gimple_fold_call): Pass new argument.
309 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
310 also BUILT_IN_EXPECT_WITH_PROBABILITY.
311 * predict.c (get_predictor_value): New function.
312 (expr_expected_value): Add new argument probability. Assume
313 that predictor and probability are always non-null.
314 (expr_expected_value_1): Likewise. For __builtin_expect and
315 __builtin_expect_with_probability set probability. Handle
316 combination in binary expressions.
317 (tree_predict_by_opcode): Simplify code by simply calling
319 (pass_strip_predict_hints::execute): Add handling of
320 BUILT_IN_EXPECT_WITH_PROBABILITY.
321 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
323 * tree.h (DECL_BUILT_IN_P): New function.
325 2018-08-10 Martin Liska <mliska@suse.cz>
327 PR tree-optimization/85799
328 * passes.def: Add argument for pass_strip_predict_hints.
329 * predict.c (class pass_strip_predict_hints): Add new argument
331 (strip_predictor_early): New function.
332 (pass_strip_predict_hints::execute): Call the function to
334 (strip_predict_hints): New function.
335 * predict.def: Fix comment.
337 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
339 * Makefile.in: Clarify which tm.texi to copy over to assert the
340 right to grant a GFDL license for all.
342 2018-08-09 Jeff Law <law@redhat.com>
344 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
347 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
349 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
352 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
354 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
355 reductions for variable-length vectors.
357 2018-08-09 David Malcolm <dmalcolm@redhat.com>
360 * common.opt (fdiagnostics-show-line-numbers): New option.
361 * diagnostic-show-locus.c (class layout): Add fields
362 "m_show_line_numbers_p" and "m_linenum_width";
363 (num_digits): New function.
364 (test_num_digits): New function.
365 (layout::layout): Initialize new fields. Update m_x_offset
366 logic to handle any left margin.
367 (layout::print_source_line): Print line number when requested.
368 (layout::start_annotation_line): New member function.
369 (layout::print_annotation_line): Call it.
370 (layout::print_leading_fixits): Likewise.
371 (layout::print_trailing_fixits): Likewise. Update calls to
372 move_to_column for new parameter.
373 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
374 it to potentially call start_annotation_line.
375 (layout::show_ruler): Call start_annotation_line.
376 (selftest::test_line_numbers_multiline_range): New selftest.
377 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
378 and selftest::test_line_numbers_multiline_range.
379 * diagnostic.c (diagnostic_initialize): Initialize
381 * diagnostic.h (struct diagnostic_context): Add field
382 "show_line_numbers_p".
383 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
384 -fno-diagnostics-show-line-numbers.
385 * dwarf2out.c (gen_producer_string): Add
386 OPT_fdiagnostics_show_line_numbers to the ignored options.
387 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
388 one setting" options.
389 (append_compiler_options): Likewise to the dropped options.
390 (append_diag_options): Likewise to the passed-on options.
391 * opts.c (common_handle_option): Handle the new option.
392 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
394 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
396 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
397 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
398 third argument of type "const signed char" to descriptions of
399 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
400 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
401 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
402 __builtin_bcdsub_ov functions.
404 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
406 PR tree-optimization/86858
407 * tree-vect-loop.c (vect_is_simple_reduction): Restore
408 flow_bb_inside_loop_p calls.
410 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
412 PR tree-optimization/86871
413 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
414 instead of gimple_assign_lhs.
416 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
419 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
420 register constraint to operand 0.
421 (add<mode>3_carryinC): Likewise.
422 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
424 2018-08-09 Martin Liska <mliska@suse.cz>
427 * common.opt: Remove extra line.
429 2018-08-09 Martin Liska <mliska@suse.cz>
431 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
432 at the end of a line, make first letter capital and end up
433 a sentence with a dot.
434 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
435 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
436 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
437 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
438 (PARAM_MAX_ISL_OPERATIONS): Likewise.
439 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
440 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
441 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
442 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
443 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
444 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
445 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
446 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
447 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
448 (PARAM_TREE_REASSOC_WIDTH): Likewise.
449 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
450 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
451 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
453 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
456 * config/s390/s390.c (s390_option_override_internal): Reduce the
457 stack-clash-protection-probe-interval param if it would be too big
460 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
463 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
464 * config/m68k/m68k.c (handle_move_double): Don't call
465 m68k_final_prescan_insn.
466 (m68k_adjust_decorated_operand): Renamed from
467 m68k_final_prescan_insn, remove first and third operand and
469 (print_operand): Call it.
470 (print_operand_address): Call it.
472 2018-08-08 Nathan Sidwell <nathan@acm.org>
474 * diagnostic.c (diagnostic_report_current_module): Use
475 linemap_included_from & linemap_included_from_linemap.
477 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
479 * config/aarch64/aarch64-cores.def: Add phecda core.
480 * config/aarch64/aarch64-tune.md: Regenerate.
481 * doc/invoke.texi: Add phecda core.
483 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
486 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
488 * config/s390/s390.md ("movti"): Add more alternatives for
489 constant to GPR copies.
491 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
493 * config/s390/s390.c: Fix whitespace damage throughout the file.
494 * config/s390/s390.h: Likewise.
495 * config/s390/tpf.h: Likewise.
497 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
499 * config/s390/s390.c (s390_loadrelative_operand_p):
500 Remove TARGET_CPU_ZARCH usages.
501 (s390_rtx_costs): Likewise.
502 (s390_legitimate_constant_p): Likewise.
503 (s390_cannot_force_const_mem): Likewise.
504 (legitimate_reload_constant_p): Likewise.
505 (s390_preferred_reload_class): Likewise.
506 (legitimize_pic_address): Likewise.
507 (legitimize_tls_address): Likewise.
508 (s390_split_branches): Removed.
509 (s390_add_execute): Removed.
510 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
511 (s390_mainpool_start): Likewise.
512 (s390_mainpool_finish): Likewise.
513 (s390_mainpool_cancel): Removed.
514 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
515 (s390_chunkify_cancel): Likewise.
516 (s390_return_addr_rtx): Likewise.
517 (s390_register_info): Remove split_branches_pending_p uages.
518 (s390_optimize_register_info): Likewise.
519 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
520 split_branches_pending_p usages.
521 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
522 (s390_load_got): Likewise.
523 (s390_expand_split_stack_prologue): Likewise.
524 (output_asm_nops): Likewise.
525 (s390_function_profiler): Likewise.
526 (s390_emit_call): Likewise.
527 (s390_conditional_register_usage): Likewise.
528 (s390_optimize_prologue): Likewise.
529 (s390_reorg): Remove TARGET_CPU_ZARCH and
530 split_branches_pending_p usages.
531 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
533 (s390_output_indirect_thunk_function): Likewise.
534 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
535 (TARGET_CPU_ZARCH_P): Removed.
536 (struct machine_function): Remove split_branches_pending_p.
537 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
539 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
541 * common/config/s390/s390-common.c (processor_flags_table):
543 * config.gcc: Remove with_arch/with_tune support.
544 * config/s390/2064.md: Remove cpu attribute comparisons.
545 * config/s390/driver-native.c (s390_host_detect_local_cpu):
547 * config/s390/linux.h (ASM_SPEC):
548 Remove -march support.
549 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
550 Use a table to get an arch level.
551 * config/s390/s390-opts.h (enum processor_type):
554 (processor_table): Remove entries, add arch_level values.
555 (s390_issue_rate): Remove cases.
556 (s390_option_override): Adjust
557 s390_option_override_internal() call.
558 (s390_option_override_internal): Remove deprecation warning.
559 (s390_valid_target_attribute_tree): Adjust
560 s390_option_override_internal() call.
561 * config/s390/s390.h (struct s390_processor):
562 Share with s390-c.c, add arch_level field.
563 * config/s390/s390.md:
564 Remove occurrences in cpu attribute.
565 * config/s390/s390.opt: Remove -march/-mtune support.
566 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
567 * doc/invoke.texi: Remove deprecation warning.
569 2018-08-08 Luis Machado <luis.machado@linaro.org>
571 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
573 (qdf24xx_tunings): Set vector cost structure to
576 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
577 <register_sextend>: Set to 3.
579 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
582 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
583 * config/aarch64/aarch64-simd.md
584 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
585 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
586 (aarch64_frecpx<mode>): ...this new pattern.
587 * config/aarch64/aarch64-simd-builtins.def: Remove comment
588 about aarch64_frecp<FRECP:frecp_suffix><mode>.
590 2018-08-07 Martin Liska <mliska@suse.cz>
593 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
594 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
595 * predict.def (PRED_MALLOC_NONNULL): New predictor.
596 * doc/extend.texi: Document that malloc attribute adds
599 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
602 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
603 Define to speculation_safe_value_not_needed.
605 2018-08-06 Jeff Law <law@redhat.com>
607 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
608 the vr_values instance to cprop_into_stmt.
609 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
610 (cprop_operand): Also query EVRP to determine if OP is a constant.
612 2018-08-06 Nathan Sidwell <nathan@acm.org>
614 * diagnostic.c (diagnostic_report_current_module): Reroll
615 included-at loop. Translate text.
617 2018-08-06 David Malcolm <dmalcolm@redhat.com>
619 * function-tests.c (selftest::test_expansion_to_rtl): Call
620 free_after_compilation.
622 2018-08-06 Alan Hayward <alan.hayward@arm.com>
624 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
626 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
628 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
629 loops with memory block operations from getting unrolled.
631 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
634 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
635 Define to speculation_safe_value_not_needed.
637 2018-08-06 Jeff Law <law@redhat.com>
639 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
642 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
645 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
646 with all enabled __intN types.
648 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
650 2018-08-06 Alan Hayward <alan.hayward@arm.com>
652 * alias.c (record_set): Check for clobber high.
653 * cfgexpand.c (expand_gimple_stmt): Likewise.
654 * combine-stack-adj.c (single_set_for_csa): Likewise.
655 * combine.c (find_single_use_1): Likewise.
656 (set_nonzero_bits_and_sign_copies): Likewise.
657 (get_combine_src_dest): Likewise.
658 (is_parallel_of_n_reg_sets): Likewise.
659 (try_combine): Likewise.
660 (record_dead_and_set_regs_1): Likewise.
661 (reg_dead_at_p_1): Likewise.
662 (reg_dead_at_p): Likewise.
663 * dce.c (deletable_insn_p): Likewise.
664 (mark_nonreg_stores_1): Likewise.
665 (mark_nonreg_stores_2): Likewise.
666 * df-scan.c (df_find_hard_reg_defs): Likewise.
667 (df_uses_record): Likewise.
668 (df_get_call_refs): Likewise.
669 * dwarf2out.c (mem_loc_descriptor): Likewise.
670 * haifa-sched.c (haifa_classify_rtx): Likewise.
671 * ira-build.c (create_insn_allocnos): Likewise.
672 * ira-costs.c (scan_one_insn): Likewise.
673 * ira.c (equiv_init_movable_p): Likewise.
674 (rtx_moveable_p): Likewise.
675 (interesting_dest_for_shprep): Likewise.
676 * jump.c (mark_jump_label_1): Likewise.
677 * postreload-gcse.c (record_opr_changes): Likewise.
678 * postreload.c (reload_cse_simplify): Likewise.
679 (struct reg_use): Add source expr.
680 (reload_combine): Check for clobber high.
681 (reload_combine_note_use): Likewise.
682 (reload_cse_move2add): Likewise.
683 (move2add_note_store): Likewise.
684 * print-rtl.c (print_pattern): Likewise.
685 * recog.c (decode_asm_operands): Likewise.
686 (store_data_bypass_p): Likewise.
687 (if_test_bypass_p): Likewise.
688 * regcprop.c (kill_clobbered_value): Likewise.
689 (kill_set_value): Likewise.
690 * reginfo.c (reg_scan_mark_refs): Likewise.
691 * reload1.c (maybe_fix_stack_asms): Likewise.
692 (eliminate_regs_1): Likewise.
693 (elimination_effects): Likewise.
694 (mark_not_eliminable): Likewise.
695 (scan_paradoxical_subregs): Likewise.
696 (forget_old_reloads_1): Likewise.
697 * reorg.c (find_end_label): Likewise.
698 (try_merge_delay_insns): Likewise.
699 (redundant_insn): Likewise.
700 (own_thread_p): Likewise.
701 (fill_simple_delay_slots): Likewise.
702 (fill_slots_from_thread): Likewise.
703 (dbr_schedule): Likewise.
704 * resource.c (update_live_status): Likewise.
705 (mark_referenced_resources): Likewise.
706 (mark_set_resources): Likewise.
707 * rtl.c (copy_rtx): Likewise.
708 * rtlanal.c (reg_referenced_p): Likewise.
709 (single_set_2): Likewise.
710 (noop_move_p): Likewise.
711 (note_stores): Likewise.
712 * sched-deps.c (sched_analyze_reg): Likewise.
713 (sched_analyze_insn): Likewise.
715 2018-08-06 Alan Hayward <alan.hayward@arm.com>
717 * cse.c (invalidate_reg): New function extracted from...
718 (invalidate): ...here.
719 (canonicalize_insn): Check for clobber high.
720 (invalidate_from_clobbers): invalidate clobber highs.
721 (invalidate_from_sets_and_clobbers): Likewise.
722 (count_reg_usage): Check for clobber high.
723 (insn_live_p): Likewise.
724 * cselib.c (cselib_expand_value_rtx_1):Likewise.
725 (cselib_invalidate_regno): Check for clobber in setter.
726 (cselib_invalidate_rtx): Pass through setter.
727 (cselib_invalidate_rtx_note_stores):
728 (cselib_process_insn): Check for clobber high.
729 * cselib.h (cselib_invalidate_rtx): Add operand.
731 2018-08-06 Alan Hayward <alan.hayward@arm.com>
733 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
734 (mark_not_eliminable): Likewise.
735 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
736 * lra-lives.c (process_bb_lives): Check for clobber high.
737 * lra.c (new_insn_reg): Remember clobber highs.
738 (collect_non_operand_hard_regs): Check for clobber high.
739 (lra_set_insn_recog_data): Likewise.
740 (add_regs_to_insn_regno_info): Likewise.
741 (lra_update_insn_regno_info): Likewise.
743 2018-08-06 Alan Hayward <alan.hayward@arm.com>
745 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
746 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
748 2018-08-06 Alan Hayward <alan.hayward@arm.com>
750 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
751 (copy_insn_1): Likewise.
752 (gen_hard_reg_clobber_high): New gen function.
753 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
754 * genemit.c (gen_exp): Likewise.
755 (gen_emit_seq): Pass through info.
756 (gen_insn): Check for CLOBBER_HIGH.
757 (gen_expand): Pass through info.
758 (gen_split): Likewise.
759 (output_add_clobbers): Likewise.
760 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
761 (remove_clobbers): Likewise.
762 * rtl.h (gen_hard_reg_clobber_high): New declaration.
764 2018-08-06 Alan Hayward <alan.hayward@arm.com>
766 * doc/rtl.texi (clobber_high): Add.
767 (parallel): Add in clobber high
768 * rtl.c (rtl_check_failed_code3): Add function.
769 * rtl.def (CLOBBER_HIGH): Add expression.
770 * rtl.h (RTL_CHECKC3): Add macro.
771 (rtl_check_failed_code3): Add declaration.
774 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
777 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
778 cfun->machine->max_used_stack_alignment if needed.
780 2018-08-04 Martin Sebor <msebor@redhat.com>
782 PR tree-optimization/86571
783 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
786 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
789 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
792 2018-08-03 Jeff Law <law@redhat.com>
795 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
796 Define to speculation_safe_value_not_needed.
798 2018-08-03 David Malcolm <dmalcolm@redhat.com>
800 * doc/gcov.texi (-x): Remove duplicate "to".
801 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
802 (-Wif-not-aligned): Remove duplicate "is".
803 (-flto): Remove duplicate "the".
804 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
806 (MSP430 Options): Remove duplicate "and" from the description
807 of "-mgprel-sec=regexp".
808 (x86 Options): Remove duplicate copies of "vmldLog102" and
809 vmlsLog104 from description of "-mveclibabi=type".
811 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
813 * internal-fn.h (first_commutative_argument): Declare.
814 * internal-fn.c (first_commutative_argument): New function.
815 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
816 restrictions for pattern statements. Use first_commutative_argument
817 to look for commutative operands in calls to internal functions.
819 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
821 * Makefile.in (wide-int-range.o): New.
822 * tree-vrp.c: Move all the wide_int_* functions to...
823 * wide-int-range.cc: ...here.
824 * tree-vrp.h: Move all the wide_int_* prototypes to...
825 * wide-int-range.h: ...here.
827 2018-08-03 Tom de Vries <tdevries@suse.de>
829 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
831 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
832 * except.c (output_function_exception_table): Do early exit if
833 targetm_common.except_unwind_info (&global_options) == UI_NONE.
835 2018-08-03 Martin Liska <mliska@suse.cz>
837 * predict.c (dump_prediction): Change to 2 digits
840 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
842 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
844 (falkor_am_1_gtov_gtov): ... a new insn reservation.
846 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
848 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
849 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
850 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
851 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
852 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
854 2018-08-02 David Malcolm <dmalcolm@redhat.com>
856 * diagnostic-show-locus.c (diagnostic_show_locus): Use
857 pp_take_prefix when saving the existing prefix.
858 * diagnostic.c (diagnostic_append_note): Likewise.
859 * langhooks.c (lhd_print_error_function): Likewise.
860 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
861 param's type. Free the existing prefix.
862 (pp_take_prefix): New function.
863 (pretty_printer::pretty_printer): Drop the prefix parameter.
864 Rename the length parameter to match the comment.
865 (pretty_printer::~pretty_printer): Free the prefix.
866 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
868 (struct pretty_printer): Drop the "const" from "prefix" field's
869 type and clarify memory management.
870 (pp_set_prefix): Drop the "const" from the 2nd param.
871 (pp_take_prefix): New decl.
873 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
875 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
876 for word_mode_ok here instead of passing as argument.
877 (expand_block_compare): Change select_block_compare_mode() call.
878 (expand_strncmp_gpr_sequence): New function.
879 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
881 2018-08-02 Jeff Law <law@redhat.com>
884 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
885 Define to speculation_safe_value_not_needed.
888 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
889 Define to speculation_safe_value_not_needed.
891 2018-08-02 Tom de Vries <tdevries@suse.de>
894 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
895 function. Return UI_TARGET unconditionally.
896 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
897 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
899 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
901 * genemit.c (print_overload_test): Fix typo.
903 2018-08-02 Richard Biener <rguenther@suse.de>
905 PR tree-optimization/86816
906 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
907 which checks for value availability before querying it.
908 (gvn_uses_equal): Use it.
909 (same_succ_hash): Likewise.
910 (gimple_equal_p): Likewise.
912 2018-08-02 Nick Clifton <nickc@redhat.com>
915 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
916 Define to speculation_safe_value_not_needed.
919 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
920 Define to speculation_safe_value_not_needed.
923 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
924 Define to speculation_safe_value_not_needed.
927 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
928 Define to speculation_safe_value_not_needed.
931 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
932 Define to speculation_safe_value_not_needed.
935 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
936 Define to speculation_safe_value_not_needed.
939 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
940 Define to speculation_safe_value_not_needed.
943 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
944 Define to speculation_safe_value_not_needed.
947 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
948 speculation_safe_value_not_needed.
951 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
952 to speculation_safe_value_not_needed.
954 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
956 * doc/md.texi: Expand the documentation of instruction names
957 to mention port-local uses. Document '@' in pattern names.
958 * read-md.h (overloaded_instance, overloaded_name): New structs.
960 (md_reader::handle_overloaded_name): New member function.
961 (md_reader::get_overloads): Likewise.
962 (md_reader::m_first_overload): New member variable.
963 (md_reader::m_next_overload_ptr): Likewise.
964 (md_reader::m_overloads_htab): Likewise.
965 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
966 m_next_overload_ptr and m_overloads_htab.
967 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
968 (get_mode_token, get_code_token, get_int_token): New functions.
969 (map_attr_string): Add an optional argument that passes back
970 the associated iterator.
971 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
972 (md_reader::handle_overloaded_name, add_overload_instance): New
974 (apply_iterators): Handle '@' names. Report an error if '@'
975 is used without iterators.
976 (initialize_iterators): Initialize the new iterator_group fields.
977 * genopinit.c (handle_overloaded_code_for)
978 (handle_overloaded_gen): New functions.
979 (main): Use them to print declarations of maybe_code_for_* and
980 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
981 * genemit.c (print_overload_arguments, print_overload_test)
982 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
983 (main): Use it to print definitions of maybe_code_for_* and
984 maybe_gen_* functions.
985 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
986 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
987 instead of explicit mode checks.
988 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
989 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
990 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
991 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
992 (aarch64_expand_compare_and_swap): Likewise
993 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
994 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
995 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
996 (aarch64_constant_pool_reload_icode): Delete.
997 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
998 instead of aarch64_constant_pool_reload_icode. Use
999 code_for_aarch64_reload_mov instead of explicit mode checks.
1000 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1001 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1002 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1003 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1004 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1005 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1006 (aarch64_atomic_load_op_code): Delete.
1007 (aarch64_emit_atomic_load_op): Likewise.
1008 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1009 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
1010 instead of aarch64_emit_atomic_load_op.
1011 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1012 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1013 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1014 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1015 character before the pattern name.
1016 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1017 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1018 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1019 (aarch64_frecps<mode>): Likewise.
1020 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1021 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1022 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1023 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1024 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1026 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1028 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1029 Allow HFmode constants if TARGET_FP_F16INST.
1031 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
1034 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1035 No longer check last store for clobber of address register.
1037 2018-08-02 Martin Liska <mliska@suse.cz>
1039 PR gcov-profile/86817
1040 * gcov.c (process_all_functions): New function.
1042 (process_file): Move functions processing to
1043 process_all_functions.
1045 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1047 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1048 "const" to the "gimple *" and "rtx_insn *" parameters.
1049 * dumpfile.h (dump_user_location_t::dump_user_location_t):
1051 (dump_location_t::dump_location_t): Likewise.
1053 2018-08-01 Martin Sebor <msebor@redhat.com>
1055 PR tree-optimization/86650
1056 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1057 rather than a "gcall *". Directly pass the data of interest
1058 to percent_K_format, rather than building a temporary CALL_EXPR
1060 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1061 (gimple_fold_builtin_strncat): Adjust.
1062 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1063 gcall* argument with gimple*.
1064 * gimple-ssa-warn-restrict.c (check_call): Same.
1065 (wrestrict_dom_walker::before_dom_children): Same.
1066 (builtin_access::builtin_access): Same.
1067 (check_bounds_or_overlap): Same
1068 (maybe_diag_overlap): Same.
1069 (maybe_diag_offset_bounds): Same.
1070 * tree-diagnostic.c (default_tree_printer): Move usage of
1071 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1073 * tree-pretty-print.c (percent_K_format): Add argument.
1074 * tree-pretty-print.h: Add argument.
1075 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1076 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1077 (maybe_diag_stxncpy_trunc): Same.
1078 (handle_builtin_stxncpy): Same.
1079 (handle_builtin_strcat): Same.
1081 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1083 * match.pd: Optimise pointer range checks.
1085 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1087 PR tree-optimization/86758
1088 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1089 to remove pattern statements.
1091 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1093 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1094 result of dfs_enumerate_from when constructing stmt_vec_infos,
1095 instead of additionally calling get_loop_body.
1097 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1099 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1101 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1102 When creating an iv, assert that the step is not known to be zero.
1103 (vect_setup_realignment): Update call accordingly.
1104 * tree-vect-stmts.c (vectorizable_store): Likewise.
1105 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
1107 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1109 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1110 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1111 (vectorizable_reduction): Likewise.
1112 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1113 (vect_detect_hybrid_slp_stmts): Likewise.
1114 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1116 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
1118 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1119 (wide_int_set_zero_nonzero_bits): ...this.
1120 (zero_nonzero_bits_from_vr): Rename to...
1121 (vrp_set_zero_nonzero_bits): ...this.
1122 (extract_range_from_multiplicative_op_1): Abstract wide int
1124 (wide_int_range_multiplicative_op): ...here.
1125 (extract_range_from_binary_expr_1): Extract wide int binary
1126 operations into their own functions.
1127 (wide_int_range_lshift): New.
1128 (wide_int_range_can_optimize_bit_op): New.
1129 (wide_int_range_shift_undefined_p): New.
1130 (wide_int_range_bit_xor): New.
1131 (wide_int_range_bit_ior): New.
1132 (wide_int_range_bit_and): New.
1133 (wide_int_range_trunc_mod): New.
1134 (extract_range_into_wide_ints): New.
1135 (vrp_shift_undefined_p): New.
1136 (extract_range_from_multiplicative_op): New.
1137 (vrp_can_optimize_bit_op): New.
1138 * tree-vrp.h (value_range::dump): New.
1139 (wide_int_range_multiplicative_op): New.
1140 (wide_int_range_lshift):New.
1141 (wide_int_range_shift_undefined_p): New.
1142 (wide_int_range_bit_xor): New.
1143 (wide_int_range_bit_ior): New.
1144 (wide_int_range_bit_and): New.
1145 (wide_int_range_trunc_mod): New.
1146 (zero_nonzero_bits_from_bounds): Rename to...
1147 (wide_int_set_zero_nonzero_bits): ...this.
1148 (zero_nonzero_bits_from_vr): Rename to...
1149 (vrp_set_zero_nonzero_bits): ...this.
1150 (range_easy_mask_min_max): Rename to...
1151 (wide_int_range_can_optimize_bit_op): this.
1152 * vr-values.c (simplify_bit_ops_using_ranges): Rename
1153 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1155 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1157 * tree-vectorizer.h (vect_orig_stmt): New function.
1158 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1159 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1160 (vect_create_epilog_for_reduction): Likewise.
1161 (vectorizable_live_operation): Likewise.
1162 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1163 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1164 * tree-vect-stmts.c (vectorizable_call): Likewise.
1165 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1167 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1169 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1171 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1172 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1173 (vect_transform_loop): Likewise.
1174 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1176 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1178 * tree-vectorizer.h (vect_schedule_slp): Return void.
1179 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1180 (vect_schedule_slp): Likewise.
1182 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1184 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1186 (vect_transform_loop): Update calls accordingly. Schedule SLP
1187 instances before the main loop, if any exist.
1189 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1191 PR tree-optimization/86749
1192 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1193 If the lhs is used in a COND_EXPR, check that it is being used
1194 as the "then" or "else" value.
1196 2018-08-01 Tom de Vries <tdevries@suse.de>
1199 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1200 speculation_safe_value_not_needed.
1202 2018-08-01 Richard Biener <rguenther@suse.de>
1204 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1207 2018-08-01 Martin Liska <mliska@suse.cz>
1209 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1210 format how successful transformation is dumped.
1211 (gimple_mod_pow2_value_transform): Likewise.
1212 (gimple_mod_subtract_transform): Likewise.
1213 (gimple_stringops_transform): Likewise.
1215 2018-08-01 Martin Liska <mliska@suse.cz>
1218 * value-prof.c (interesting_stringop_to_profile_p):
1219 Simplify the code and add BUILT_IN_MEMMOVE.
1220 (gimple_stringops_transform): Likewise.
1222 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
1224 * config/aarch64/aarch64-simd.md
1225 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1226 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1227 use GPI iterator instead of SI mode.
1229 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
1231 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1232 rs6000_speculation_barrier.
1233 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1234 new barrier pattern name.
1236 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
1238 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1239 (speculation_barrier): New insn.
1241 2018-08-01 Richard Biener <rguenther@suse.de>
1244 * graphite.h: Include isl/id.h and isl/space.h to allow build
1247 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
1250 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1251 mode for COFF targets.
1252 * defaults.h (TARGET_COFF): Define.
1253 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1254 TARGET_COFF): Define.
1255 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1256 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1257 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1259 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1261 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1262 * gimple-streamer-out.c (output_bb): Save it.
1263 * lto-streamer-in.c (input_struct_function_base): Restore
1264 instance discriminator if available. Create map on demand.
1265 * lto-streamer-out.c (output_struct_function_base): Save it if
1267 * final.c (decl_to_instance_map): Document LTO strategy.
1269 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1270 Olivier Hainque <hainque@adacore.com>
1272 * debug.h (decl_to_instance_map_t): New type.
1273 (decl_to_instance_map): Declare.
1274 (maybe_create_decl_to_instance_map): New inline function.
1275 * final.c (bb_discriminator, last_bb_discriminator): New statics,
1276 to track basic block discriminators.
1277 (final_start_function_1): Initialize them.
1278 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1280 (decl_to_instance_map): New variable.
1281 (map_decl_to_instance, maybe_set_discriminator): New functions.
1282 (notice_source_line): Set discriminator.
1284 2018-07-31 Ian Lance Taylor <iant@golang.org>
1286 * targhooks.c (default_have_speculation_safe_value): Add
1289 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1291 * dump-context.h: Include "pretty-print.h".
1292 (dump_context::refresh_dumps_are_enabled): New decl.
1293 (dump_context::emit_item): New decl.
1294 (class dump_context): Add fields "m_test_pp" and
1296 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1297 (temp_dump_context::get_dumped_text): New decl.
1298 (class temp_dump_context): Add field "m_pp".
1299 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1300 (dump_context::refresh_dumps_are_enabled): ...and add a test for
1302 (set_dump_file): Update for above change.
1303 (set_alt_dump_file): Likewise.
1304 (dump_loc): New overload, taking a pretty_printer *.
1305 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
1306 to any test pretty-printer.
1307 (make_item_for_dump_gimple_stmt): New function, adapted from
1308 optinfo::add_gimple_stmt.
1309 (dump_context::dump_gimple_stmt): Call it, and use the result,
1310 eliminating the direct usage of dump_file and alt_dump_file in
1311 favor of indirectly using them via emit_item.
1312 (make_item_for_dump_gimple_expr): New function, adapted from
1313 optinfo::add_gimple_expr.
1314 (dump_context::dump_gimple_expr): Call it, and use the result,
1315 eliminating the direct usage of dump_file and alt_dump_file in
1316 favor of indirectly using them via emit_item.
1317 (make_item_for_dump_generic_expr): New function, adapted from
1319 (dump_context::dump_generic_expr): Call it, and use the result,
1320 eliminating the direct usage of dump_file and alt_dump_file in
1321 favor of indirectly using them via emit_item.
1322 (make_item_for_dump_printf_va): New function, adapted from
1323 optinfo::add_printf_va.
1324 (make_item_for_dump_printf): New function.
1325 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1326 and use the result, eliminating the direct usage of dump_file and
1327 alt_dump_file in favor of indirectly using them via emit_item.
1328 (make_item_for_dump_dec): New function.
1329 (dump_context::dump_dec): Call it, and use the result,
1330 eliminating the direct usage of dump_file and alt_dump_file in
1331 favor of indirectly using them via emit_item.
1332 (make_item_for_dump_symtab_node): New function, adapted from
1333 optinfo::add_symtab_node.
1334 (dump_context::dump_symtab_node): Call it, and use the result,
1335 eliminating the direct usage of dump_file and alt_dump_file in
1336 favor of indirectly using them via emit_item.
1337 (dump_context::begin_scope): Reimplement, avoiding direct usage
1338 of dump_file and alt_dump_file in favor of indirectly using them
1340 (dump_context::emit_item): New member function.
1341 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1342 Set up test pretty-printer on the underlying context. Call
1343 refresh_dumps_are_enabled.
1344 (temp_dump_context::~temp_dump_context): Call
1345 refresh_dumps_are_enabled.
1346 (temp_dump_context::get_dumped_text): New member function.
1347 (selftest::verify_dumped_text): New function.
1348 (ASSERT_DUMPED_TEXT_EQ): New macro.
1349 (selftest::test_capture_of_dump_calls): Run all tests twice, with
1350 and then without optinfo enabled. Add uses of
1351 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
1352 * dumpfile.h: Update comment for the dump_* API.
1353 * optinfo-emit-json.cc
1354 (selftest::test_building_json_from_dump_calls): Update for new
1355 param for temp_dump_context ctor.
1356 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1357 and "m_owned" field.
1358 (optinfo_item::~optinfo_item): Likewise.
1359 (optinfo::add_item): New member function.
1360 (optinfo::emit): Update comment.
1361 (optinfo::add_string): Delete.
1362 (optinfo::add_printf): Delete.
1363 (optinfo::add_printf_va): Delete.
1364 (optinfo::add_gimple_stmt): Delete.
1365 (optinfo::add_gimple_expr): Delete.
1366 (optinfo::add_tree): Delete.
1367 (optinfo::add_symtab_node): Delete.
1368 (optinfo::add_dec): Delete.
1369 * optinfo.h (class dump_context): New forward decl.
1370 (optinfo::add_item): New decl.
1371 (optinfo::add_string): Delete.
1372 (optinfo::add_printf): Delete.
1373 (optinfo::add_printf_va): Delete.
1374 (optinfo::add_gimple_stmt): Delete.
1375 (optinfo::add_gimple_expr): Delete.
1376 (optinfo::add_tree): Delete.
1377 (optinfo::add_symtab_node): Delete.
1378 (optinfo::add_dec): Delete.
1379 (optinfo::add_poly_int): Delete.
1380 (optinfo_item::optinfo_item): Remove "owned" param.
1381 (class optinfo_item): Remove field "m_owned".
1383 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1386 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1387 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1388 requested variable alignment.
1389 (expand_one_ssa_partition): Likewise.
1390 (expand_one_var): Likewise.
1392 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1394 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1395 to speculation_safe_value_not_needed.
1397 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1399 * targhooks.h (speculation_safe_value_not_needed): New prototype.
1400 * targhooks.c (speculation_safe_value_not_needed): New function.
1401 * target.def (have_speculation_safe_value): Update documentation.
1402 * doc/tm.texi: Regenerated.
1404 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1406 * config/aarch64/iterators.md (ALLI_TI): New iterator.
1407 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1409 (despeculate_copy<ALLI:mode>_insn): New insn.
1410 (despeculate_copyti_insn): New insn.
1411 (despeculate_simple<ALLI:mode>): New insn
1412 (despeculate_simpleti): New insn.
1413 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1415 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1416 aarch64_speculation_safe_value.
1417 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1419 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1421 * config/aarch64/aarch64-speculation.cc: New file.
1422 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1423 before pass_reorder_blocks.
1424 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1426 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1427 X14 and X15 when tracking speculation.
1428 * config/aarch64/aarch64.md (register name constants): Add
1429 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1430 (unspec): Add UNSPEC_SPECULATION_TRACKER.
1431 (speculation_barrier): New insn attribute.
1432 (cmp<mode>): Allow SP in comparisons.
1433 (speculation_tracker): New insn.
1434 (speculation_barrier): Add speculation_barrier attribute.
1435 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1436 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1437 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1439 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1441 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1442 aarch64_track_speculation is true.
1443 (tb<optab><mode>1): Likewise.
1444 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1445 generate CB[N]Z when tracking speculation.
1446 (aarch64_split_compare_and_swap): Likewise.
1447 (aarch64_split_atomic_op): Likewise.
1449 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1451 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1453 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1455 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1456 (speculation_barrier): New insn.
1458 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1460 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1461 * config/arm/arm.md (speculation_barrier): New expand.
1462 (speculation_barrier_insn): New pattern.
1464 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1466 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1467 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1468 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1469 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1471 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1472 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1473 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1474 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1475 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1476 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1477 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1478 * builtins.c (expand_speculation_safe_value): New function.
1479 (expand_builtin): Call it.
1480 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1481 * doc/extend.texi: Document __builtin_speculation_safe_value.
1482 * doc/md.texi: Document "speculation_barrier" pattern.
1483 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1484 TARGET_HAVE_SPECULATION_SAFE_VALUE.
1485 * doc/tm.texi: Regenerated.
1486 * target.def (have_speculation_safe_value, speculation_safe_value): New
1488 * targhooks.c (default_have_speculation_safe_value): New function.
1489 (default_speculation_safe_value): New function.
1490 * targhooks.h (default_have_speculation_safe_value): Add prototype.
1491 (default_speculation_safe_value): Add prototype.
1493 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1495 * dump-context.h (dump_context::dump_loc): New decl.
1496 * dumpfile.c (dump_context::dump_loc): New member function.
1497 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1498 and dump_gimple_stmt.
1499 (dump_context::dump_gimple_expr_loc): Likewise, using
1501 (dump_context::dump_generic_expr_loc): Likewise, using
1503 (dump_context::dump_printf_loc_va): Likewise, using
1505 (dump_context::begin_scope): Explicitly using the global function
1506 "dump_loc", rather than the member function.
1508 2018-07-31 Martin Sebor <msebor@redhat.com>
1510 PR tree-optimization/86741
1511 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1513 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
1515 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1516 depend on whether prefetch instructions will be emitted or not.
1517 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1518 will be emitted or not.
1519 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1520 (TARGET_SETMEM_PFD): New macros.
1522 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1524 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1525 (NULL_STMT_VEC_INFO): Delete.
1526 (stmt_vec_info::operator*): Likewise.
1527 (stmt_vec_info::operator gimple *): Likewise.
1528 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1529 of NULL_STMT_VEC_INFO.
1530 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1531 (vect_reassociating_reduction_p): Likewise.
1532 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1533 (vectorizable_store): Likewise.
1534 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1535 (vec_info::free_stmt_vec_infos): Likewise.
1537 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1539 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1540 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1542 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1544 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1545 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1546 (vec_info::free_stmt_vec_info): New private member functions.
1547 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1548 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1549 * tree-parloops.c (gather_scalar_reductions): Remove calls to
1550 set_stmt_vec_info_vec and free_stmt_vec_infos.
1551 * tree-vect-loop.c (_loop_vec_info): Remove call to
1552 set_stmt_vec_info_vec.
1553 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1554 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1555 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1556 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1557 (vec_info::free_stmt_vec_info): ...these new functions. Remove
1558 assignments in {vec_info::,}new_stmt_vec_info that are redundant
1559 with the clearing in the xcalloc.
1560 (stmt_vec_info_vec): Delete.
1561 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1562 (vectorize_loops): Likewise.
1563 (vec_info::~vec_info): Remove argument from call to
1564 free_stmt_vec_infos.
1565 (vec_info::add_stmt): Remove vinfo argument from call to
1568 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1570 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1571 rather than a gimple stmt.
1572 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
1573 information for pattern statements when passed the original
1574 statement; instead wait to be passed the pattern statement itself.
1575 Don't call set_vinfo_for_stmt here.
1576 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1577 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1578 stmt_vec_infos here.
1579 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1580 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1581 stmt_vec_infos entry.
1583 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1585 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1586 * tree-vectorizer.c (vec_info::replace_stmt): New function.
1587 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1588 * tree-vect-stmts.c (vectorizable_call): Likewise.
1589 (vectorizable_simd_clone_call): Likewise.
1591 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1593 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1594 * tree-vectorizer.c (vec_info::remove_stmt): New function.
1595 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1596 * tree-vect-loop.c (vect_transform_loop): Likewise.
1597 * tree-vect-slp.c (vect_schedule_slp): Likewise.
1598 * tree-vect-stmts.c (vect_remove_stores): Likewise.
1600 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1602 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1603 (vect_dr_stmt): Delete.
1604 * tree-vectorizer.c (vec_info::lookup_dr): New function.
1605 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1607 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1608 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1609 (vect_verify_datarefs_alignment, vect_peeling_supportable)
1610 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1611 (vect_analyze_data_refs): Likewise.
1612 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
1614 (vect_find_same_alignment_drs): Likewise.
1615 (vect_slp_analyze_node_dependences): Update calls accordingly.
1616 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
1617 instead of DR_VECT_AUX.
1618 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1619 of a vector data references. Use vec_info::lookup_dr instead of
1621 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1622 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
1623 instead of DR_VECT_AUX.
1625 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1627 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1629 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1631 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1632 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1633 (vect_gen_prolog_loop_niters): Likewise.
1635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1637 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1638 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1639 (vect_known_alignment_in_bytes, vect_dr_behavior)
1640 (vect_get_scalar_dr_size): Take references as dr_vec_infos
1641 instead of data_references. Update calls to other routines for
1642 which the same change has been made.
1643 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1644 dr_vec_infos instead of stmt_vec_infos.
1645 (vect_analyze_data_ref_dependence): Update call accordingly.
1646 (vect_slp_analyze_data_ref_dependence)
1647 (vect_record_base_alignments): Use DR_VECT_AUX.
1648 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1649 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1650 (vector_alignment_reachable_p, vect_get_data_access_cost)
1651 (vect_peeling_supportable, vect_analyze_group_access_1)
1652 (vect_analyze_group_access, vect_analyze_data_ref_access)
1653 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1654 (vect_compile_time_alias, vect_small_gap_p)
1655 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1656 (vect_supportable_dr_alignment): Take references as dr_vec_infos
1657 instead of data_references. Update calls to other routines for
1658 which the same change has been made.
1659 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1660 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1661 (vect_slp_analyze_and_verify_node_alignment)
1662 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1663 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1664 (vect_setup_realignment): Use dr_vec_infos. Update calls after
1666 (_vect_peel_info::dr): Replace with...
1667 (_vect_peel_info::dr_info): ...this new field.
1668 (vect_peeling_hash_get_most_frequent)
1669 (vect_peeling_hash_choose_best_peeling): Update accordingly.
1670 (vect_peeling_hash_get_lowest_cost):
1671 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
1672 routines for which the same change has been made.
1673 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
1675 * tree-vect-loop-manip.c (get_misalign_in_elems)
1676 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
1678 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1679 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1680 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1681 (get_group_load_store_type, get_negative_load_store_type)
1682 (vect_get_data_ptr_increment, vectorizable_store)
1683 (vectorizable_load): Likewise.
1684 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1685 Update calls to other routines for which the same change has been made.
1687 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1689 * tree-vectorizer.h (vec_info::move_dr): New member function.
1690 (dataref_aux): Rename to...
1691 (dr_vec_info): ...this and add "dr" and "stmt" fields.
1692 (_stmt_vec_info::dr_aux): Update accordingly.
1693 (_stmt_vec_info::data_ref_info): Delete.
1694 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1695 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1696 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1697 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1699 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
1700 (STMT_VINFO_DR_INFO): New macro.
1701 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1702 (set_dr_misalignment): Update after rename of dataref_aux.
1703 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
1704 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1705 initialization of STMT_VINFO_DATA_REF.
1706 * tree-vectorizer.c (vec_info::move_dr): New function.
1707 * tree-vect-patterns.c (vect_recog_bool_pattern)
1708 (vect_recog_mask_conversion_pattern)
1709 (vect_recog_gather_scatter_pattern): Use it.
1710 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1711 the "dr" and "stmt" fields of dr_vec_info instead of
1712 STMT_VINFO_DATA_REF.
1714 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1716 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1717 (is_pattern_stmt_p): Use it.
1718 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1719 on pattern statements.
1721 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1723 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1724 original stmt as a stmt_vec_info rather than a gimple stmt.
1725 (vect_pattern_recog_1): Take the statement directly as a
1726 stmt_vec_info, rather than via a gimple_stmt_iterator.
1727 Update call to vect_mark_pattern_stmts.
1728 (vect_pattern_recog): Update calls accordingly.
1730 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1732 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1733 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1734 a vect_def_type for the first argument.
1735 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1736 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
1737 operand if it isn't defined by a vectorized statement.
1738 (vect_build_gather_load_calls): Remove the mask_dt argument and
1739 update calls to vect_get_vec_def_for_stmt_copy.
1740 (vectorizable_bswap): Likewise the dt argument.
1741 (vectorizable_call): Update calls to vectorizable_bswap and
1742 vect_get_vec_def_for_stmt_copy.
1743 (vectorizable_simd_clone_call, vectorizable_assignment)
1744 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1745 (vectorizable_comparison): Update calls to
1746 vect_get_vec_def_for_stmt_copy.
1747 (vectorizable_store): Likewise. Remove now-unnecessary calls to
1749 (vect_get_loop_based_defs): Remove dt argument and update call
1750 to vect_get_vec_def_for_stmt_copy.
1751 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1752 and vect_get_vec_def_for_stmt_copy.
1753 (vectorizable_load): Update calls to vect_build_gather_load_calls
1754 and vect_get_vec_def_for_stmt_copy.
1755 * tree-vect-loop.c (vect_create_epilog_for_reduction)
1756 (vectorizable_reduction, vectorizable_live_operation): Update calls
1757 to vect_get_vec_def_for_stmt_copy.
1759 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1761 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1762 and gimple stmt arguments with a stmt_vec_info.
1763 (vect_record_base_alignments): Update calls accordingly.
1764 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1765 and gimple stmt arguments with a stmt_vec_info.
1766 (vect_build_slp_tree_1): Remove vinfo argument and update call
1767 to vect_record_max_nunits.
1768 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1769 and vect_record_max_nunits.
1771 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1773 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1774 file and take a stmt_vec_info instead of a gimple stmt.
1775 (supportable_widening_operation, vect_finish_replace_stmt)
1776 (vect_finish_stmt_generation, vect_get_store_rhs)
1777 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1778 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1779 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1780 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1781 (vect_create_data_ref_ptr, bump_vector_ptr)
1782 (vect_permute_store_chain, vect_setup_realignment)
1783 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1784 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1785 (vectorizable_reduction, vectorizable_induction)
1786 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1787 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1788 than gimple stmts as arguments.
1789 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1790 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1791 (can_group_stmts_p, vect_check_gather_scatter)
1792 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1793 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1794 (vect_permute_load_chain, vect_shift_permute_load_chain)
1795 (vect_transform_grouped_load)
1796 (vect_record_grouped_load_vectors): Likewise.
1797 * tree-vect-loop.c (vect_fixup_reduc_chain)
1798 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1799 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1800 (vectorizable_reduction, vectorizable_induction)
1801 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1802 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1803 (vect_get_load_store_mask): Likewise.
1804 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1805 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1806 * tree-vect-stmts.c (vect_mark_relevant)
1807 (is_simple_and_all_uses_invariant)
1808 (exist_non_indexing_operands_for_use_p, process_use)
1809 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1810 (vect_get_vec_def_for_operand, vect_get_vec_defs)
1811 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1812 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1813 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1814 (get_negative_load_store_type, get_load_store_type)
1815 (vect_check_load_store_mask, vect_check_store_rhs)
1816 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1817 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1818 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1819 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1820 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1821 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1822 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1823 (supportable_widening_operation): Likewise.
1825 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1827 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1828 a stmt_vec_info instead of a gcall.
1829 (vect_check_gather_scatter): Update call accordingly.
1830 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1832 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1833 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1834 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1835 instead of a gimple stmt.
1836 (vect_transform_loop): Update calls accordingly.
1837 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1838 stmt_vec_infos instead of gimple stmts.
1839 (vect_analyze_slp_instance): Update use accordingly.
1840 * tree-vect-stmts.c (read_vector_array, write_vector_array)
1841 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1842 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1843 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1844 (vect_gen_widened_results_half, vect_get_loop_based_defs)
1845 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1846 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1847 down to subroutines.
1849 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1851 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1852 of the worklist from a vector of gimple stmts to a vector of
1854 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1855 (vect_mark_stmts_to_be_vectorized): Likewise
1857 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1859 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1860 statement before passing it to vect_analyze_stmt.
1861 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1862 the chain of phi vector definitions. Track the exit phi via its
1864 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1865 STMT_VINFO_REDUC_DEF.
1866 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1867 stmt_vec_infos to handle the statement chains.
1868 (vect_get_slp_defs): Record the first statement in the node
1869 using a stmt_vec_info.
1870 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1871 statements here and pass their stmt_vec_info down to subroutines.
1872 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1873 down to vect_finish_stmt_generation.
1874 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1875 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1876 stmt_vec_infos to subroutines.
1877 (vect_remove_stores): Use stmt_vec_infos to handle the statement
1880 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1882 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1883 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1884 (vect_permute_store_chain, vect_setup_realignment)
1885 (vect_permute_load_chain, vect_shift_permute_load_chain)
1886 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1887 stmts internally, and when passing values to other vectorizer routines.
1888 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1889 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1890 (vect_analyze_loop_operations, get_initial_def_for_reduction)
1891 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1892 (vectorizable_reduction, vectorizable_induction)
1893 (vectorizable_live_operation, vect_transform_loop_stmt)
1894 (vect_transform_loop): Likewise.
1895 * tree-vect-patterns.c (vect_reassociating_reduction_p)
1896 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1897 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1898 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1899 (vect_slp_analyze_node_operations_1): Likewise.
1900 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1901 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1902 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1903 (vect_finish_stmt_generation_1, get_group_load_store_type)
1904 (get_load_store_type, vect_build_gather_load_calls)
1905 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1906 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1907 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1908 (vectorizable_store, vectorizable_load, vectorizable_condition)
1909 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1910 (supportable_widening_operation): Likewise.
1911 (vect_get_vector_types_for_stmt): Likewise.
1912 * tree-vectorizer.h (vect_dr_behavior): Likewise.
1914 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1916 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1917 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1918 (vect_permute_store_chain, vect_permute_load_chain)
1919 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1920 repeated stmt_vec_info lookups.
1921 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1922 (vect_update_ivs_after_vectorizer): Likewise.
1923 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1924 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1925 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1926 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1927 (vect_bb_slp_scalar_cost): Likewise.
1928 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1932 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1933 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1934 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1935 to get gassigns and gcalls, rather than operating on generc gimple
1937 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1938 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1939 (vectorizable_load, vect_analyze_stmt): Likewise.
1940 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1942 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1944 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1945 return stmt_vec_infos rather than gimple stmts. Do not accept
1947 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1949 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1950 Update use of get_later_stmt.
1951 (vect_get_constant_vectors): Update call accordingly.
1952 (vect_schedule_slp_instance): Likewise
1953 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1954 (vect_slp_analyze_instance_dependence): Likewise.
1955 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1957 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1959 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1960 (stmt_info_for_cost::stmt_info): ...this new field.
1961 (add_stmt_costs): Update accordingly.
1962 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1963 (vect_get_known_peeling_cost): Likewise.
1964 (vect_estimate_min_profitable_iters): Likewise.
1965 * tree-vect-stmts.c (record_stmt_cost): Likewise.
1967 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1969 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1970 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1971 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1973 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1975 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1977 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1978 a gimple stmt to a stmt_vec_info.
1979 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1981 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1983 * tree-vectorizer.h (vec_info::grouped_stores): Change from
1984 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1985 (_loop_vec_info::reduction_chains): Likewise.
1986 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1988 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1990 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1992 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1993 a gimple stmt to a stmt_vec_info.
1994 (_stmt_vec_info::next_element): Likewise.
1995 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1996 (vect_slp_analyze_and_verify_node_alignment)
1997 (vect_analyze_group_access_1, vect_analyze_group_access)
1998 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1999 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2000 (vect_supportable_dr_alignment): Update accordingly.
2001 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2002 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2003 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2004 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2005 * tree-vect-slp.c (vect_build_slp_tree_1)
2006 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2007 (vect_split_slp_store_group, vect_analyze_slp_instance)
2008 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2009 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2010 (get_group_load_store_type, get_load_store_type)
2011 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2012 (vect_transform_stmt, vect_remove_stores): Likewise.
2014 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2016 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2018 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2019 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2020 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2021 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2022 (vector_alignment_reachable_p, vect_get_data_access_cost)
2023 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2024 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2025 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2026 (vect_analyze_group_access_1, vect_analyze_group_access)
2027 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2028 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2029 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2030 result of vect_dr_stmt and use the stmt_vec_info instead of
2031 the associated gimple stmt.
2032 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2033 (vect_gen_prolog_loop_niters): Likewise.
2034 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2036 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2038 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2039 to a vec<stmt_vec_info>.
2040 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2041 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2043 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2044 to a vec<stmt_vec_info>.
2045 (bst_traits::value_type, bst_traits::value_type): Likewise.
2046 (bst_traits::hash): Update accordingly.
2047 (vect_get_and_check_slp_defs): Change the stmts parameter from
2048 a vec<gimple *> to a vec<stmt_vec_info>.
2049 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2050 (vect_build_slp_tree): Likewise.
2051 (vect_build_slp_tree_2): Likewise. Update uses of
2052 SLP_TREE_SCALAR_STMTS.
2053 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2054 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2055 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2056 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2057 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2058 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2059 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2060 (vect_get_constant_vectors, vect_get_slp_defs)
2061 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2062 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2063 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2064 instead of gimple stmts.
2065 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2066 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2067 (vect_slp_analyze_instance_dependence): Update uses of
2068 SLP_TREE_SCALAR_STMTS.
2069 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2070 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2071 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2072 (get_initial_defs_for_reduction): Likewise.
2073 (vect_create_epilog_for_reduction): Likewise.
2074 (vectorize_fold_left_reduction): Likewise.
2075 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2076 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2077 (can_vectorize_live_stmts): Likewise.
2079 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2081 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2082 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2083 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2085 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2087 (gather_scalar_reductions): Update after above interface changes.
2088 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2089 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2091 (vect_force_simple_reduction): Likewise.
2092 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2093 LOOP_VINFO_REDUCTIONS.
2094 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2096 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2098 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2099 a gimple stmt to a stmt_vec_info.
2100 * tree-vect-loop.c (vect_active_double_reduction_p)
2101 (vect_force_simple_reduction, vectorizable_reduction): Update
2104 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2106 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2107 vec<gimple *> to a vec<stmt_vec_info>.
2108 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2109 the reduction_phis argument from a vec<gimple *> to a
2111 (vectorizable_reduction): Likewise the phis local variable that
2112 is passed to vect_create_epilog_for_reduction. Update for new type
2113 of SLP_TREE_VEC_STMTS.
2114 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2115 (vectorizable_live_operation): Likewise.
2116 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2117 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2119 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2121 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2122 a gimple stmt to a stmt_vec_info.
2123 (vectorizable_condition, vectorizable_live_operation)
2124 (vectorizable_reduction, vectorizable_induction): Pass back the
2125 vectorized statement as a stmt_vec_info.
2126 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2127 use of STMT_VINFO_VEC_STMT.
2128 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2129 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2130 as stmt_vec_infos rather than gimple stmts.
2131 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2133 (vectorizable_live_operation): Likewise.
2134 (vectorizable_reduction, vectorizable_induction): Likewise,
2135 updating use of STMT_VINFO_VEC_STMT.
2136 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2137 of STMT_VINFO_VEC_STMT.
2138 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2139 (vectorizable_simd_clone_call, vectorizable_conversion)
2140 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2141 (vectorizable_store, vectorizable_load, vectorizable_condition)
2142 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2143 from a gimple stmt to a stmt_vec_info.
2144 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
2145 pointer to a stmt_vec_info to the vectorizable_* routines.
2147 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2149 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2150 a gimple stmt to a stmt_vec_info.
2151 (is_pattern_stmt_p): Update accordingly.
2152 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2153 (vect_record_grouped_load_vectors): Likewise.
2154 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2155 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2156 (vect_model_reduction_cost): Likewise.
2157 (vect_create_epilog_for_reduction): Likewise.
2158 (vectorizable_reduction, vectorizable_induction): Likewise.
2159 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2160 Return the stmt_vec_info for the pattern statement.
2161 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2162 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2163 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2164 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2165 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2166 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2167 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2168 (free_stmt_vec_info, vect_is_simple_use): Likewise.
2170 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2172 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2173 (vect_finish_stmt_generation): Likewise.
2174 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2175 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2176 (vect_build_gather_load_calls): Use the return value of the above
2177 functions instead of a separate call to vinfo_for_stmt. Use narrow
2178 scopes for the input gimple stmt and wider scopes for the associated
2179 stmt_vec_info. Use vec_info::lookup_def when setting these
2180 stmt_vec_infos from an SSA_NAME definition.
2181 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2182 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2183 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2184 (vectorizable_store, vectorizable_load, vectorizable_condition)
2185 (vectorizable_comparison): Likewise.
2186 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2187 (vectorizable_reduction): Likewise.
2189 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2191 * tree-vectorizer.h (vect_is_simple_use): Add an optional
2192 stmt_vec_info * parameter before the optional gimple **.
2193 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2194 (process_use, vect_get_vec_def_for_operand_1): Update callers.
2195 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2196 * tree-vect-loop.c (vectorizable_reduction): Likewise.
2197 (vectorizable_live_operation): Likewise.
2198 * tree-vect-patterns.c (type_conversion_p): Likewise.
2199 (vect_look_through_possible_promotion): Likewise.
2200 (vect_recog_rotate_pattern): Likewise.
2201 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2203 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2205 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2206 a typedef to a wrapper class.
2207 (NULL_STMT_VEC_INFO): New macro.
2208 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2209 (stmt_vec_info::operator*): New function.
2210 (stmt_vec_info::operator gimple *): Likewise.
2211 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2212 (add_stmt_costs): Likewise.
2213 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2214 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2215 (vect_get_known_peeling_cost): Likewise.
2216 (vect_estimate_min_profitable_iters): Likewise.
2217 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2218 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2219 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2220 (vectorizable_store, free_stmt_vec_infos): Likewise.
2221 (new_stmt_vec_info): Change return type of xcalloc to
2224 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2226 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2227 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2228 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2229 a single_imm_use-based sequence.
2230 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2232 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2234 * tree-vectorizer.h (vec_info::lookup_def): Declare.
2235 * tree-vectorizer.c (vec_info::lookup_def): New function.
2236 * tree-vect-patterns.c (vect_get_internal_def): Use it.
2237 (vect_widened_op_tree): Likewise.
2238 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2239 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2240 (vectorizable_reduction): Likewise.
2241 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2243 (vect_is_slp_reduction): Update calls accordingly. Use
2244 vec_info::lookup_def.
2245 (vect_is_simple_reduction): Likewise
2246 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2248 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2250 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2251 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2252 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2254 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2255 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2256 (vect_update_vf_for_slp, vect_analyze_loop_operations)
2257 (vect_is_slp_reduction, vectorizable_induction)
2258 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2259 * tree-vect-patterns.c (vect_init_pattern_stmt):
2260 (vect_determine_min_output_precision_1, vect_determine_precisions)
2261 (vect_pattern_recog): Likewise.
2262 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2263 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2264 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2265 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2266 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2267 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
2268 info field from a loop to a loop_vec_info.
2270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2272 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2273 (vec_info::add_stmt): Declare.
2274 * tree-vectorizer.c (vec_info::add_stmt): New function.
2275 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2276 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2277 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2278 (vectorizable_induction): Likewise.
2279 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2280 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2281 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2282 (vectorizable_load): Likewise.
2283 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2284 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2285 (vect_recog_gather_scatter_pattern): Likewise.
2286 (append_pattern_def_seq): Likewise. Remove a check that is
2287 performed by add_stmt itself.
2289 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2291 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2292 which make_ssa_name was called with new_stmt before new_stmt
2295 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2297 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2299 (vect_is_slp_reduction): ...here...
2300 (vect_is_simple_reduction): ...and here. Remove repetition of tests
2301 that are already known to be false.
2303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2305 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2306 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
2307 STMT_VINFO_NUM_SLP_USES when it's true.
2308 (vect_free_slp_instance): Add a final_p parameter and pass it to
2310 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2311 (vect_analyze_slp_instance): Likewise.
2312 (vect_slp_analyze_operations): Likewise.
2313 (vect_slp_analyze_bb_1): Likewise.
2314 * tree-vectorizer.c (vec_info): Likewise.
2315 * tree-vect-loop.c (vect_transform_loop): Likewise.
2317 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2319 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2320 function is not called for second and subsequent members of
2323 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2325 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2326 cases for nested loops from here to ...
2327 (vect_create_epilog_for_reduction): ...here. Only call
2328 vect_is_simple_use for inner-loop reductions.
2330 2018-07-31 Martin Liska <mliska@suse.cz>
2332 PR gcov-profile/85338
2333 PR gcov-profile/85350
2334 PR gcov-profile/85372
2335 * profile.c (struct location_triplet): New.
2336 (struct location_triplet_hash): Likewise.
2337 (output_location): Do not output a BB that
2338 is already recorded for a line.
2339 (branch_prob): Use streamed_locations.
2341 2018-07-31 Martin Liska <mliska@suse.cz>
2343 PR gcov-profile/85370
2344 * coverage.c (coverage_begin_function): Do not mark target
2345 clones as artificial functions.
2347 2018-07-31 Martin Liska <mliska@suse.cz>
2349 PR gcov-profile/83813
2350 PR gcov-profile/84758
2351 PR gcov-profile/85217
2352 PR gcov-profile/85332
2353 * profile.c (branch_prob): Do not record GOTO expressions
2354 for GIMPLE statements which locations are already streamed.
2356 2018-07-31 Olivier Hainque <hainque@adacore.com>
2358 * gcc.c (handle_spec_function): Accept a soft_matched_part
2359 argument, as do_spec_1. Pass it down to ...
2360 (eval_spec_function): Accept a soft_matched_part argument,
2361 and pass it down to ...
2362 (do_spec_2): Accept a soft_matched_part argument, and pass
2363 it down to do_spec_1.
2364 (do_spec_1): Pass soft_matched_part to handle_spec_function.
2365 (handle_braces): Update call to handle_spec_function.
2366 (driver::set_up_specs): Update calls to do_spec_2.
2367 (compare_debug_dump_opt_spec_function): Likewise.
2368 (compare_debug_self_opt_spec_function): Likewise.
2370 2018-07-31 Olivier Hainque <hainque@adacore.com>
2372 * common.opt (nolibc): New option.
2373 * doc/invoke.texi (Link Options): Document it.
2374 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2375 * config/alpha/linux.h: Likewise.
2376 * config/arc/elf.h: Likewise.
2377 * config/arm/uclinux-elf.h: Likewise.
2378 * config/arm/unknown-elf.h: Likewise.
2379 * config/avr/avrlibc.h: Likewise.
2380 * config/bfin/bfin.h: Likewise.
2381 * config/bfin/linux.h: Likewise.
2382 * config/bfin/uclinux.h: Likewise.
2383 * config/darwin.h: Likewise.
2384 * config/darwin10.h: Likewise.
2385 * config/darwin12.h: Likewise.
2386 * config/gnu-user.h: Likewise.
2387 * config/lm32/uclinux-elf.h: Likewise.
2388 * config/pa/pa-hpux11.h: Likewise.
2389 * config/pa/pa64-hpux.h: Likewise.
2390 * config/sparc/sparc.h: Likewise.
2392 2018-07-31 Olivier Hainque <hainque@adacore.com>
2394 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2395 undefined variables.
2397 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
2400 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2403 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2405 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2406 terminated string literal.
2408 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
2410 PR rtl-optimization/85160
2411 * combine.c (is_just_move): New function.
2412 (try_combine): Allow combining two instructions into two if neither of
2413 the original instructions was a move.
2415 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
2418 * doc/extend.texi (Global Register Variables): Discourage use of type
2420 (Local Register Variables): Likewise.
2422 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
2424 PR tree-optimization/86506
2425 * hwint.h (ceil_log2): Resync with hwint.c implementation.
2427 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
2430 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2431 hard_regno, make sure no insn between `from` and `to` clobbers it.
2433 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
2434 Tom de Vries <tdevries@suse.de>
2436 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2437 (PTX_DEFAULT_RUNTIME_DIM): ... this.
2438 (nvptx_goacc_validate_dims): Set default worker and gang dims to
2439 PTX_DEFAULT_RUNTIME_DIM.
2440 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2442 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
2444 * config/pa/pa.c (pa_output_addr_vec): Align address table.
2445 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2446 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2448 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
2450 * config/rs6000/constraints.md (wG constraint): Delete, no longer
2452 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2453 predicate to reflect toc fusion has been deleted.
2454 (toc_fusion_mem_raw): Delete, no longer used.
2455 (toc_fusion_mem_wrapped): Likewise.
2456 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2458 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2459 Delete, no longer used.
2460 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2461 meant to be used for toc fusion.
2462 (rs6000_debug_print_mode): Delete toc fusion debugging.
2463 (rs6000_debug_reg_global): Likewise.
2464 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2465 fusion and secondary reload support that were never used.
2466 (rs6000_option_override_internal): Delete TOC fusion, that was only
2467 partially defined, and it did not work unless you also used the
2469 (rs6000_legitimate_address_p): Delete TOC fusion support.
2470 (rs6000_opt_masks): Likewise.
2471 (fusion_wrap_memory_address): Delete function, no longer used.
2472 (fusion_split_address); Delete TOC fusion support.
2473 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2474 longer used with toc fusion being deleted.
2475 (TARGET_TOC_FUSION_FP): Likewise.
2476 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2478 (toc fusion spliter): Delete TOC fusion support.
2479 (toc_fusionload_<mode>): Likewise.
2480 (toc_fusionload_di): Likewise.
2481 (fusion_gpr_load_<mode>): Delete generator function, this insn no
2482 longer needs to be named. Rename predicate to delete TOC fusion.
2483 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2484 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2485 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2486 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2487 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2489 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
2491 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2492 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
2493 __int128 in built-in function prototypes.
2494 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2495 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2497 2018-07-27 Martin Sebor <msebor@redhat.com>
2499 PR tree-optimization/86696
2500 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2501 types, including enums.
2502 (handle_char_store): Be prepared for the above function to fail.
2504 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
2506 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2507 when optimization level is lower than 2 or optimize for size.
2509 2018-07-26 Martin Sebor <msebor@redhat.com>
2511 PR tree-optimization/86043
2512 PR tree-optimization/86042
2513 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2514 (get_string_cst_length): Rename...
2515 (get_min_string_length): ...to this. Add argument.
2516 (handle_char_store): Extend to handle multi-character stores by
2518 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
2519 * tree.h (initializer_zerop): Add argument.
2521 2018-07-26 Jakub Jelinek <jakub@redhat.com>
2524 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2525 declare target to variables if they have always,{to,from,tofrom} map
2528 2018-07-26 Martin Liska <mliska@suse.cz>
2531 * lto-wrapper.c: Add linker_output as prefix
2532 for ltrans_output_file.
2534 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
2536 PR rtl-optimization/85805
2537 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2538 value for hard registers if that was written in the same mode.
2540 2018-07-26 Martin Liska <mliska@suse.cz>
2542 PR gcov-profile/86536
2543 * gcov.c (format_gcov): Use printf format %.*f directly
2544 and do not handle special values.
2546 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2548 * common/config/arc/arc-common.c (arc_option_optimization_table):
2549 Update default optimizations for size.
2551 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2553 * config/arc/arc.md (movsf_insn): Add short instruction selection.
2554 * config/arc/constraints.md (CfZ): New constraint.
2555 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2556 (subsf3_fpu): Likewise.
2557 (cmpsf_fpu): Likewise.
2558 (cmpsf_fpu_uneq): Likewise.
2560 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2562 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2564 (arc_is_uncached_mem_p): uncached applies to both the variable and
2567 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
2569 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2572 2018-07-25 David Malcolm <dmalcolm@redhat.com>
2574 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2575 field "m_scopes" from vec to auto_vec.
2577 2018-07-25 Martin Liska <mliska@suse.cz>
2579 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2582 2018-07-25 Richard Biener <rguenther@suse.de>
2585 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2586 special wrt context_die late.
2587 (gen_subprogram_die): Re-use DIEs in local scope.
2589 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
2591 PR tree-optimization/86644
2592 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
2594 2018-07-25 Martin Liska <mliska@suse.cz>
2597 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2598 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2600 2018-07-25 Martin Liska <mliska@suse.cz>
2603 * params.def: Explain ASan abbreviation and provide
2604 a documentation link.
2606 2018-07-24 Martin Sebor <msebor@redhat.com>
2608 PR tree-optimization/86622
2609 PR tree-optimization/86532
2610 * builtins.h (string_length): Declare.
2611 * builtins.c (c_strlen): Correct handling of non-constant offsets.
2612 (check_access): Be prepared for non-constant length ranges.
2613 (string_length): Make extern.
2614 * expr.c (string_constant): Only handle the minor non-constant
2615 array index. Use string_constant to compute the length of
2616 a generic string constant.
2618 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
2620 PR tree-optimization/86618
2621 * tree-vect-stmts.c (vectorizable_call): Don't take the address
2622 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2624 2018-07-24 David Malcolm <dmalcolm@redhat.com>
2626 PR tree-optimization/86636
2627 * json.cc (json::object::set): Fix comment. Add assertions.
2628 (json::array::append): Move here from json.h. Add comment and an
2630 (json::string::string): Likewise.
2631 * json.h (json::array::append): Move to json.cc.
2632 (json::string::string): Likewise.
2633 * optinfo-emit-json.cc
2634 (optrecord_json_writer::impl_location_to_json): Assert that we
2635 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2636 wrapper around it. Expand the location once, rather than three
2638 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2639 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2641 (optrecord_json_writer::optinfo_to_json): Likewise, in four
2642 places. Fix some overlong lines.
2644 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
2646 * config/aarch64/aarch64-simd.md
2647 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2648 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2649 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2650 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2651 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2652 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2653 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2654 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2655 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2657 2018-07-24 Jakub Jelinek <jakub@redhat.com>
2660 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2661 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
2662 and abs_d == d, do the power of two handling if profitable.
2664 2018-07-24 Richard Biener <rguenther@suse.de>
2666 * match.pd: Add BIT_FIELD_REF canonicalizations.
2668 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2671 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2673 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2675 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2676 terminated STRING_CST object.
2678 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
2680 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2682 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
2684 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2685 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2686 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2687 the elements into a register.
2688 (rs6000_split_v4si_init_di_reg): Delete.
2689 (rs6000_split_v4si_init): Delete.
2690 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2691 (vsx_init_v4si): Rewrite as a define_expand.
2693 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
2695 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2696 zero_extend argument from memory): New.
2698 2018-07-22 Martin Sebor <msebor@redhat.com>
2701 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2702 diagnosing calls with unknown arguments unless -Walloca-larger-than
2703 is restricted to less than PTRDIFF_MAX bytes.
2705 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
2707 * doc/gcov.texi (Invoking Gcov): Editorial changes.
2709 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2711 * pretty-print.c (text_info::set_location): Remove redundant
2712 "line_table" parameter from call to rich_location::set_range.
2714 2018-07-20 Martin Sebor <msebor@redhat.com>
2717 * builtins.c (expand_builtin_alloca): Adjust.
2718 * calls.c (alloc_max_size): Simplify.
2719 * cgraphunit.c (cgraph_node::expand): Adjust.
2720 * common.opt (larger_than_size, warn_frame_larger_than): Remove
2722 (frame_larger_than_size): Same.
2723 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2724 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2726 * doc/invoke.texi (GCC Command Options): Document option arguments.
2727 Explain byte-size arguments and suffixes.
2728 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2729 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2730 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2731 * doc/options.texi (UInteger): Expand.
2732 (Host_Wide_Int, ByteSize): Document new properties.
2733 * final.c (final_start_function_1): Include sizes in an error message.
2734 * function.c (frame_offset_overflow): Same.
2735 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2736 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2737 Diagnose unbounded alloca calls only for limits of less than
2739 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
2740 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
2742 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
2743 only for limits of less than PTRDIFF_MAX.
2744 * langhooks-def.h (lhd_handle_option): Change function argument
2746 * langhooks.c (lhd_handle_option): Same.
2747 * langhooks.h (handle_option): Same.
2748 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2750 (var_type, var_type_struct): Same.
2751 (var_set): Handle ByteSize flag.
2752 * optc-gen.awk: Add comments to output to ease debugging. Make
2753 use of HOST_WIDE_INT where appropriate.
2754 * opts-gen-save.awk: Use %lx to format unsigned long.
2755 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2756 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2757 arguments. Parse bytes-size suffixes.
2758 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2759 (enum_value_to_arg): Same.
2760 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
2761 (handle_option): Adjust.
2762 (generate_option): Change function argument to HOST_WIDE_INT.
2763 (cmdline_handle_error): Adjust.
2764 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2765 (set_option): Change function argument to HOST_WIDE_INT.
2766 (option_enabled): Handle cl_host_wide_int.
2767 (get_option_state): Handle CLVC_SIZE.
2768 (control_warning_option): Same.
2769 * opts.c (common_handle_option): Change function argument to
2770 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
2771 OPT_Wvla_larger_than_.
2772 * opts.h (enum cl_var_type): Add an enumerator.
2773 * stor-layout.c (layout_decl): Print a more meaningful warning.
2774 * toplev.c (output_stack_usage): Adjust.
2776 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
2778 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2779 call to inline_expand_builtin_string_cmp.
2780 (expand_builtin_strcmp): Likewise.
2781 (expand_builtin_strncmp): Likewise.
2782 (inline_string_cmp): Delete the last parameter, change char_type_node
2783 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2785 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2786 the inlining expansion on target where the type of the call has same or
2787 narrower precision than unsigned char.
2789 2018-07-20 David Malcolm <dmalcolm@redhat.com>
2791 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2792 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2793 * common.opt (fsave-optimization-record): New option.
2794 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2795 * doc/invoke.texi (-fsave-optimization-record): New option.
2796 * dumpfile.c: Include "optinfo-emit-json.h".
2797 (struct kv_pair): Move to coretypes.h.
2798 (optgroup_options): Make non-static.
2799 (dump_context::end_scope): Call
2800 optimization_records_maybe_pop_dump_scope.
2801 * dumpfile.h (optgroup_options): New decl.
2802 * json.cc: New file.
2804 * optinfo-emit-json.cc: New file.
2805 * optinfo-emit-json.h: New file.
2806 * optinfo.cc: Include "optinfo-emit-json.h".
2807 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2808 (optinfo_enabled_p): Check optimization_records_enabled_p.
2809 (optinfo_wants_inlining_info_p): Likewise.
2810 * optinfo.h: Update comment.
2811 * profile-count.c (profile_quality_as_string): New function.
2812 * profile-count.h (profile_quality_as_string): New decl.
2813 (profile_count::quality): New accessor.
2814 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2815 and optinfo_emit_json_cc_tests.
2816 * selftest.h (selftest::json_cc_tests): New decl.
2817 (selftest::optinfo_emit_json_cc_tests): New decl.
2818 * toplev.c: Include "optinfo-emit-json.h".
2819 (compile_file): Call optimization_records_finish.
2820 (do_compile): Call optimization_records_start.
2821 * tree-ssa-live.c: Include optinfo.h.
2822 (remove_unused_scope_block_p): Retain inlining information if
2823 optinfo_wants_inlining_info_p returns true.
2825 2018-07-20 Richard Biener <rguenther@suse.de>
2828 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2829 to cover -flto-partition=none.
2831 2018-07-20 Martin Liska <mliska@suse.cz>
2833 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2834 (get_decl_source_range): Remove unused function.
2836 2018-07-20 Richard Biener <rguenther@suse.de>
2838 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2839 (struct vn_phi_s): Likewise.
2840 (struct vn_reference_s): Likewise.
2841 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2842 for searching the slot of an entry known to be in the hash itself.
2843 (vn_phi_hasher::equal): Likewise.
2844 (vn_reference_hasher::equal): Likewise.
2845 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2847 (optimistic_info, current_info): Remove, keeping only valid_info.
2848 (vn_reference_lookup_1): Remove fallback lookup.
2849 (vn_reference_lookup_2): Likewise.
2850 (vn_nary_op_lookup_1): Likewise.
2851 (vn_phi_lookup): Likewise.
2852 (vn_nary_build_or_lookup_1): Make sure to not chain the built
2854 (vn_reference_insert): Adjust, chain the inserted hash element
2855 at last_inserted_ref.
2856 (vn_reference_insert_pieces): Likewise.
2857 (visit_reference_op_call): Likewise.
2858 (vn_nary_op_insert_into): Chain the inserted hash element at
2860 (vn_nary_op_insert_pieces): Adjust.
2861 (vn_nary_op_insert): Likewise.
2862 (vn_nary_op_insert_stmt): Likewise.
2863 (vn_phi_insert): Adjust, chain the inserted hash element at
2865 (process_scc): Remove clearing and copying the optimistic
2866 table. Instead remove elements inserted during an optimistic
2867 iteration from the single table we maintain.
2868 (init_scc_vn): Adjust.
2869 (free_scc_vn): Likewise.
2870 (sccvn_dom_walker::record_cond): Likewise.
2871 (sccvn_dom_walker::after_dom_children): Likewise.
2873 2018-07-19 Martin Sebor <msebor@redhat.com>
2875 PR tree-optimization/84047
2876 PR tree-optimization/83776
2877 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2878 (check_array_bounds): Call it.
2880 2018-07-19 Martin Sebor <msebor@redhat.com>
2882 * align.h (align_flags): Use member initialization.
2884 2018-07-19 David Malcolm <dmalcolm@redhat.com>
2886 * Makefile.in (OBJS): Add optinfo.o.
2887 * coretypes.h (class symtab_node): New forward decl.
2888 (struct cgraph_node): New forward decl.
2889 (class varpool_node): New forward decl.
2890 * dump-context.h: New file.
2891 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2893 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2894 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2895 (set_alt_dump_file): Likewise.
2896 (dump_context::~dump_context): New dtor.
2897 (dump_gimple_stmt): Move implementation to...
2898 (dump_context::dump_gimple_stmt): ...this new member function.
2899 Add the stmt to any pending optinfo, creating one if need be.
2900 (dump_gimple_stmt_loc): Move implementation to...
2901 (dump_context::dump_gimple_stmt_loc): ...this new member function.
2902 Start a new optinfo and add the stmt to it.
2903 (dump_gimple_expr): Move implementation to...
2904 (dump_context::dump_gimple_expr): ...this new member function.
2905 Add the stmt to any pending optinfo, creating one if need be.
2906 (dump_gimple_expr_loc): Move implementation to...
2907 (dump_context::dump_gimple_expr_loc): ...this new member function.
2908 Start a new optinfo and add the stmt to it.
2909 (dump_generic_expr): Move implementation to...
2910 (dump_context::dump_generic_expr): ...this new member function.
2911 Add the tree to any pending optinfo, creating one if need be.
2912 (dump_generic_expr_loc): Move implementation to...
2913 (dump_context::dump_generic_expr_loc): ...this new member
2914 function. Add the tree to any pending optinfo, creating one if
2916 (dump_printf): Move implementation to...
2917 (dump_context::dump_printf_va): ...this new member function. Add
2918 the text to any pending optinfo, creating one if need be.
2919 (dump_printf_loc): Move implementation to...
2920 (dump_context::dump_printf_loc_va): ...this new member function.
2921 Start a new optinfo and add the stmt to it.
2922 (dump_dec): Move implementation to...
2923 (dump_context::dump_dec): ...this new member function. Add the
2924 value to any pending optinfo, creating one if need be.
2925 (dump_context::dump_symtab_node): New member function.
2926 (dump_context::get_scope_depth): New member function.
2927 (dump_context::begin_scope): New member function.
2928 (dump_context::end_scope): New member function.
2929 (dump_context::ensure_pending_optinfo): New member function.
2930 (dump_context::begin_next_optinfo): New member function.
2931 (dump_context::end_any_optinfo): New member function.
2932 (dump_context::s_current): New global.
2933 (dump_context::s_default): New global.
2934 (dump_scope_depth): Delete global.
2935 (dumpfile_ensure_any_optinfo_are_flushed): New function.
2936 (dump_symtab_node): New function.
2937 (get_dump_scope_depth): Reimplement in terms of dump_context.
2938 (dump_begin_scope): Likewise.
2939 (dump_end_scope): Likewise.
2940 (selftest::temp_dump_context::temp_dump_context): New ctor.
2941 (selftest::temp_dump_context::~temp_dump_context): New dtor.
2942 (selftest::verify_item): New function.
2943 (ASSERT_IS_TEXT): New macro.
2944 (ASSERT_IS_TREE): New macro.
2945 (ASSERT_IS_GIMPLE): New macro.
2946 (selftest::test_capture_of_dump_calls): New test.
2947 (selftest::dumpfile_c_tests): Call it.
2948 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2949 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2950 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2951 descriptive comment.
2952 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2953 (dump_node, dump_bb): Move these unrelated decls.
2954 (class dump_manager): Add leading comment.
2955 * optinfo.cc: New file.
2956 * optinfo.h: New file.
2958 2018-07-19 Michael Collison <michael.collison@arm.com>
2959 Richard Henderson <rth@redhat.com>
2961 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2962 (subti): Handle op1 zero.
2963 (subvti4, usub4ti4): New.
2964 (*sub<GPI>3_compare1_imm): New.
2965 (sub<GPI>3_carryinCV): New.
2966 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2967 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2969 2018-07-19 Michael Collison <michael.collison@arm.com>
2970 Richard Henderson <rth@redhat.com>
2972 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2973 (addti3): Create simpler code if low part is already known to be 0.
2974 (addvti4, uaddvti4): New.
2975 (*add<GPI>3_compareC_cconly_imm): New.
2976 (*add<GPI>3_compareC_cconly): New.
2977 (*add<GPI>3_compareC_imm): New.
2978 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2979 handle constants within this pattern..
2980 (*add<GPI>3_compareV_cconly_imm): New.
2981 (*add<GPI>3_compareV_cconly): New.
2982 (*add<GPI>3_compareV_imm): New.
2983 (add<GPI>3_compareV): New.
2984 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2985 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2986 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2987 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2988 with 'comparison' operator.
2989 (*add<GPI>3_compareV_cconly_imm): Ditto.
2990 (*add<GPI>3_compareV_cconly): Ditto.
2991 (*add<GPI>3_compareV_imm): Ditto.
2992 (add<GPI>3_compareV): Ditto.
2993 (add<mode>3_carryinC): Ditto.
2994 (*add<mode>3_carryinC_zero): Ditto.
2995 (*add<mode>3_carryinC): Ditto.
2996 (add<mode>3_carryinV): Ditto.
2997 (*add<mode>3_carryinV_zero): Ditto.
2998 (*add<mode>3_carryinV): Ditto.
3000 2018-07-19 Michael Collison <michael.collison@arm.com>
3001 Richard Henderson <rth@redhat.com>
3003 * config/aarch64/aarch64-modes.def (CC_V): New.
3004 * config/aarch64/aarch64-protos.h
3005 (aarch64_addti_scratch_regs): Declare
3006 (aarch64_subvti_scratch_regs): Declare.
3007 (aarch64_expand_subvti): Declare.
3008 (aarch64_gen_unlikely_cbranch): Declare
3009 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3010 for signed overflow using CC_Vmode.
3011 (aarch64_get_condition_code_1): Handle CC_Vmode.
3012 (aarch64_gen_unlikely_cbranch): New function.
3013 (aarch64_addti_scratch_regs): New function.
3014 (aarch64_subvti_scratch_regs): New function.
3015 (aarch64_expand_subvti): New function.
3017 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3019 * config/aarch64/aarch64-option-extensions.def: New entry for profile
3021 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3022 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3025 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3028 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3029 address check not strict.
3031 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3033 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3035 (store_pair_lanes<mode>): Likewise.
3036 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3037 enum value 'ADDR_QUERY_LDP_STP_N'.
3038 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3039 (aarch64_print_address_internal): Add declaration.
3040 (aarch64_print_ldpstp_address): Remove.
3041 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3042 (aarch64_print_operand): Change printing of 'y'.
3043 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3044 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3045 'true' rather than '1'.
3046 * config/aarch64/constraints.md (Uml): Likewise.
3047 (Uml): Rename to Umn.
3050 2018-07-19 Richard Biener <rguenther@suse.de>
3052 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3054 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3055 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3056 (vn_reference_hasher): Likewise.
3057 (struct vn_tables_s): Remove obstack and alloc-pool members.
3058 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3059 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3060 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3061 (vn_reference_insert_pieces): Likewise.
3062 (alloc_vn_nary_op_noinit): Adjust.
3063 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3064 (vn_phi_eq): Adjust.
3065 (shared_lookup_phiargs): Remove.
3066 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3067 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3068 (visit_reference_op_call): Likewise.
3069 (copy_nary, copy_phi, copy_reference): Remove.
3070 (process_scc): Rewind the obstack when iterating. Do not
3071 copy the elements to valid_info but just move them from one
3072 hashtable to the other.
3073 (allocate_vn_table): Adjust.
3074 (free_vn_table): Likewise.
3075 (init_scc_vn): Likewise.
3076 (free_scc_vn): Likewise.
3078 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
3081 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3082 indirect_return as function type attribute.
3083 (ix86_attribute_table): Change indirect_return to function
3085 * doc/extend.texi: Update indirect_return attribute.
3087 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
3089 * wide-int.h (widest2_int): New.
3090 * gimple-fold.c (arith_overflowed_p): Use it.
3091 * tree.h (widest2_int_cst): New.
3092 * tree-vrp.c (wide_int_binop_overflow): Rename from
3093 vrp_int_const_binop.
3094 Rewrite to work on trees.
3095 (extract_range_from_multiplicative_op_1): Abstract code to...
3096 (wide_int_range_min_max): ...here.
3097 (wide_int_range_cross_product): ...and here.
3098 (extract_range_from_binary_expr_1): Abstract overflow code to...
3099 (wide_int_range_mult_wrapping): ...here.
3100 * tree-vrp.h (wide_int_range_cross_product): New.
3101 (wide_int_range_mult_wrapping): New.
3103 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
3104 Julia Koval <julia.koval@intel.com>
3106 * config/i386/x86-tune-costs.h (skylake_memcpy,
3107 skylake_memset): Replace rep_prefix with unrolling for size 512.
3109 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
3112 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3113 comparision with EQ_EXPR in last stmt.
3115 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
3117 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3118 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3119 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3120 previously known as "PowerPC AltiVec Built-in Functions". Move
3121 some material to new subsubsections "PowerPC AltiVec Built-in
3122 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3124 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3125 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3126 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3127 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3129 2018-07-18 Richard Biener <rguenther@suse.de>
3131 PR tree-optimization/86557
3132 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3135 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
3137 * config/s390/s390.c (s390_function_profiler): Generate CFI.
3139 2018-07-17 Jeff Law <law@redhat.com>
3141 * config/arm/arm.c (get_label_padding): Update for recent
3142 changes to label_to_alignment.
3144 PR tree-optimization/86010
3145 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3147 * config/mips/mips.c (vr4130_align_insns): Update for recent
3148 changes to label_to_alignment.
3150 * config/frv/frv.c (frv_label_align): Update for recent changes
3151 to label_to_alignment.
3153 * config/nios2/nios2.c (nios2_label_align): Update for recent
3154 changes which dropped ALIGN_LABELS_LOG.
3156 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
3158 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3159 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3161 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
3163 * config/arc/arc.c (arc_label_align): Use align_labels instead of
3164 deprecated align_labels_log.
3166 2018-07-17 Richard Biener <rguenther@suse.de>
3169 * dwarf2out.c (init_sections_and_labels): Always generate
3170 a debug_line_str_section for early LTO debug.
3171 (dwarf2out_finish): Reset debug_line_str_hash output early.
3172 Bump counter for extra dwarf5 .debug_loc labels to not conflict
3174 (dwarf2out_early_finish): Output debug_line_str.
3176 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3178 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3179 index register on z196 or later.
3181 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3183 * config/s390/s390.c (s390_default_align): Set default function
3185 (s390_override_options_after_change): Call s390_default align.
3186 (s390_option_override_internal): Call s390_default_align.
3187 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3189 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3192 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3193 to _looptemp_ clauses, other than the first two.
3195 2018-07-17 Martin Liska <mliska@suse.cz>
3197 * opts.c: Do not enable OPT_falign_* for -Os.
3199 2018-07-17 Martin Liska <mliska@suse.cz>
3201 * align.h (MAX_CODE_ALIGN): New.
3202 (MAX_CODE_ALIGN_VALUE): New.
3203 * common/config/i386/i386-common.c (ix86_handle_option):
3204 (MAX_CODE_ALIGN): Moved to align.h.
3205 * final.c (MAX_CODE_ALIGN): Likewise.
3206 * opts.c (parse_and_check_align_values):
3207 (MAX_CODE_ALIGN): Likewise.
3208 (MAX_CODE_ALIGN_VALUE): Likewise.
3210 2018-07-17 Martin Liska <mliska@suse.cz>
3212 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3213 in order to fulfil coding style.
3214 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3215 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3216 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3217 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3218 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3219 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3220 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3221 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3222 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3224 2018-07-17 Martin Liska <mliska@suse.cz>
3226 * align.h: New file.
3227 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3229 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3230 align_flags of label_to_alignment.
3231 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3233 * config/m68k/m68k.c: Do not use removed align_labels_value and
3235 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3236 (LOOP_ALIGN): Likewise.
3237 (LABEL_ALIGN): Likewise.
3238 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3239 Remove not used macro.
3240 (rs6000_loop_align): Change return type to align_flags.
3241 (rs6000_loop_align_max_skip): Remove.
3242 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3243 Change return type to align_flags.
3244 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3245 Remove not used macro.
3246 (rs6000_loop_align): Change return type to align_flags.
3247 (rs6000_loop_align_max_skip): Remove.
3248 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3249 * config/rx/rx-protos.h (rx_align_for_label): Make it
3251 * config/rx/rx.c (rx_align_for_label): Change return type
3253 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3255 into align_flags class.
3256 (LABEL_ALIGN): Likewise.
3257 (LOOP_ALIGN): Likewise.
3258 * config/s390/s390.c (s390_label_align): Use align_flags
3260 (s390_asm_output_function_label): Likewise.
3261 * config/sh/sh.c (sh_override_options_after_change):
3262 Use align_flags class directly without macros.
3263 (find_barrier): Likewise.
3264 (barrier_align): Likewise.
3265 (sh_loop_align): Likewise.
3266 * config/spu/spu.c (spu_option_override):
3267 Use align_flags_tuple::get_value instead of removed macros.
3268 (spu_sched_init): Likewise.
3269 * config/spu/spu.h (GTY): Likewise.
3270 * config/visium/visium.c (visium_option_override):
3271 Set "8" as default secondary alignment.
3272 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3273 in order to guarantee secondary alignment of 8.
3274 * coretypes.h: Include align.h header file.
3275 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3276 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3277 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3278 * doc/tm.texi.in: Likewise.
3279 * final.c (struct label_alignment): Remove not used structure.
3280 (LABEL_ALIGN): Change type to align_flags.
3281 (LOOP_ALIGN): Likewise.
3282 (JUMP_ALIGN): Likewise.
3283 (default_loop_align_max_skip): Remove.
3284 (default_label_align_max_skip): Likewise.
3285 (default_jump_align_max_skip): Likewise.
3286 (default_label_align_after_barrier_max_skip):
3287 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3288 (LABEL_TO_MAX_SKIP): Remove.
3289 (label_to_alignment): Return align_flags type instead of integer.
3290 (label_to_max_skip): Remove.
3291 (align_fuzz): Use align_flags type.
3292 (compute_alignments): Use align_flags type and use align_flags::max
3293 to combine multiple alignments.
3294 (grow_label_align): Grow vec instead of C array.
3295 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3296 (shorten_branches): Use align_flags type and use align_flags::max
3297 to combine multiple alignments.
3298 (final_scan_insn_1): Remove usage of secondary alignment that comes
3299 from label alignment, but instead use proper secondary alignment
3300 which is computed in grow_label_align.
3301 * flags.h (struct align_flags_tuple): Move to align.h.
3302 (struct align_flags): Likewise.
3303 (state_align_loops): Rename to align_loops.
3304 (state_align_jumps): Rename to align_jumps.
3305 (state_align_labels): Rename to align_labels.
3306 (state_align_functions): Rename to align_functions.
3307 (align_loops_log): Remove.
3308 (align_jumps_log): Remove.
3309 (align_labels_log): Remove.
3310 (align_functions_log): Remove.
3311 (align_loops_max_skip): Remove.
3312 (align_jumps_max_skip): Remove.
3313 (align_labels_max_skip): Remove.
3314 (align_functions_max_skip): Remove.
3315 (align_loops_value): Remove.
3316 (align_jumps_value): Remove.
3317 (align_labels_value): Remove.
3318 (align_functions_value): Remove.
3319 * output.h (label_to_alignment): Change return type to align_flags.
3320 (label_to_max_skip): Remove.
3321 * target.def: Remove loop_align_max_skip, label_align_max_skip,
3322 jump_align_max_skip macros.
3323 * targhooks.h (default_loop_align_max_skip): Remove.
3324 (default_label_align_max_skip): Likewise.
3325 (default_jump_align_max_skip): Likewise.
3326 (default_label_align_after_barrier_max_skip): Remove.
3327 * toplev.c (read_log_maxskip): Use ::normalize function.
3328 (parse_N_M): Remove not used argument and also call ::normalize.
3329 (parse_alignment_opts): Do not pass unused arguments.
3330 * varasm.c (assemble_start_function): Use directly align_functions
3331 instead of removed macros.
3332 * system.h: Do not poison removed macros.
3334 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3337 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3338 and cond temporaries don't have reference type if iterator has
3339 pointer type. For init use &for_pre_body instead of pre_p if
3340 for_pre_body is non-empty.
3342 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3344 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3345 double-double modes to SFmode directly directly.
3346 (trunc<mode>sf2_fprs): Delete.
3348 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3350 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3351 for conversions between IFmode and the decimal floating point modes.
3352 (init_float128_ieee): Use the correct names for conversions between
3353 KFmode and the decimal floating point modes.
3355 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3357 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3358 for the conversions between TDmode and IFmode.
3359 (init_float128_ieee): Use more correct names for the conversions
3360 between TDmode and KFmode.
3362 2018-07-16 Jakub Jelinek <jakub@redhat.com>
3364 PR tree-optimization/86526
3365 * builtins.c (expand_builtin_memcmp): Formatting fixes.
3366 (inline_expand_builtin_string_cmp): Likewise.
3367 (inline_string_cmp): Likewise. Use c_readstr instead of
3368 builtin_memcpy_read_str. Add unit_mode temporary.
3370 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3373 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3374 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3376 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
3378 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3379 Alphabetize prototypes of built-in functions, separating out
3380 built-in functions that are listed in this section but should be
3381 described elsewhere.
3383 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
3386 * expmed.c (emit_store_flag): Do not emit setcc followed by a
3387 conditional move when trapping comparison was split to a
3388 non-trapping one (and vice versa).
3390 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
3392 * config/s390/s390.c (s390_function_profiler): Generate nops
3393 instead of profiler call sequences.
3394 * config/s390/s390.opt: Add the new option.
3396 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
3398 * config/s390/s390.c (s390_function_profiler): Generate
3399 __mcount_loc section.
3400 * config/s390/s390.opt: Add the new option.
3402 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
3404 * common.opt: Add the new warning.
3405 * config/s390/s390.c (s390_function_profiler): Emit "brasl
3406 %r0,__fentry__" when -mfentry is specified.
3407 (s390_option_override_internal): Disallow -mfentry for 31-bit
3409 * config/s390/s390.opt: Add the new option.
3411 2018-07-16 Richard Biener <rguenther@suse.de>
3414 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3415 for function-local FUNCTION_DECL and RESULT_DECL immediately.
3417 2018-07-16 Martin Liska <mliska@suse.cz>
3420 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3423 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3425 * config/arc/arcHS.md: Update ARCHS scheduling rules.
3427 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3429 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3431 * config/arc/arc-cpus.def (hs4x): New cpu.
3433 * config/arc/arc-tables.opt: Regenerate.
3434 * config/arc/arc.c (arc_sched_issue_rate): New function.
3435 (TARGET_SCHED_ISSUE_RATE): Define.
3436 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3437 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3439 (attr tune): Add ARCHS4x tune values.
3440 (attr tune_dspmpy): Define.
3441 (*tst): Correct instruction type.
3442 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3443 * config/arc/arcHS4x.md: New file.
3444 * config/arc/fpu.md: Update instruction type attributes.
3445 * config/arc/t-multilib: Regenerate.
3447 2018-07-16 Tom de Vries <tdevries@suse.de>
3450 * var-tracking.c (vt_initialize): Fix pre_dec handling.
3452 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3454 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3457 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
3459 PR tree-optimization/86514
3460 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3461 conversion to a boolean type from a type with greater precision.
3463 2018-07-16 Tom de Vries <tdevries@suse.de>
3465 * var-tracking.c (vt_initialize): Print adjusted insn slim if
3466 dump_flags request TDF_SLIM.
3468 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
3470 * fold-const.c (int_const_binop_1): Abstract...
3471 (wide_int_binop): ...wide int code here.
3472 (poly_int_binop): ...poly int code here.
3473 Abstract the rest of int_const_binop_1 into int_const_binop.
3474 * fold-const.h (wide_int_binop): New.
3475 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3476 Remove useless PLUS/MINUS_EXPR case.
3477 (zero_nonzero_bits_from_vr): Move wide int code...
3478 (zero_nonzero_bits_from_bounds): ...here.
3479 (extract_range_from_binary_expr_1): Move mask optimization code...
3480 (range_easy_mask_min_max): ...here.
3481 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3482 (range_easy_mask_min_max): New.
3484 2018-07-15 Jeff Law <law@redhat.com>
3487 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3490 2018-07-14 Jim Wilson <jimw@sifive.com>
3492 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3494 2018-07-14 Paul Koning <ni1d@arrl.net>
3496 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3498 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
3500 * lto-streamer-out.c (copy_function_or_variable): Dump info about
3503 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
3504 Steve Munroe <munroesj52@gmail.com>
3506 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3507 (_mm_andnot_si128): Likewise.
3508 (_mm_or_si128): Likewise.
3509 (_mm_xor_si128): Likewise.
3511 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
3514 * builtins.c (expand_builtin_memcmp): Inline the calls first
3515 when result_eq is false.
3516 (expand_builtin_strcmp): Inline the calls first.
3517 (expand_builtin_strncmp): Likewise.
3518 (inline_string_cmp): New routine. Expand a string compare
3519 call by using a sequence of char comparison.
3520 (inline_expand_builtin_string_cmp): New routine. Inline expansion
3521 a call to str(n)cmp/memcmp.
3522 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3524 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3526 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
3528 * config/arm/driver-arm.c: Include arm-native.h.
3529 (host_detect_local_cpu): Use auto-generated data tables.
3530 (vendors, arm_cpu_table): Delete. Move part information to ...
3531 * config/arm/arm-cpus.in: ... here.
3532 * config/arm/parsecpu.awk (gen_native): New function.
3533 (vendor, part): New CPU fields.
3534 (END): Add support for building the native CPU detection tables.
3535 * config/arm/t-arm (arm-native.h): Add build rule.
3536 (driver-arm.o): Add dependency on arm-native.h.
3538 2018-07-13 Richard Biener <rguenther@suse.de>
3541 * match.pd (addr1 - addr2): Allow either of the operand to
3544 2018-07-13 Tom de Vries <tdevries@suse.de>
3546 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3549 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
3551 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3552 arrays instead of numbered variables.
3554 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
3556 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3557 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3559 2018-07-13 Richard Biener <rguenther@suse.de>
3562 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3563 instead of get_context_die.
3565 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
3566 Richard Biener <rguenther@suse.de>
3569 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3570 that the loop latch destination where phi is defined.
3572 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
3574 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3575 (riscv_expand_epilogue): Add assertion to check interrupt mode.
3576 (riscv_set_current_function): Extract getting interrupt type to new
3578 (riscv_get_interrupt_type): New function.
3579 (riscv_merge_decl_attributes): New function, checking interrupt type is
3581 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3583 2018-07-12 Paul Koning <ni1d@arrl.net>
3585 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3588 2018-07-12 Paul Koning <ni1d@arrl.net>
3590 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3591 zero reference, add doloop_end instead.
3592 * doc/md.texi (decrement_and_branch_until_zero): Remove.
3593 (Looping patterns): Remove decrement_and_branch_until_zero. Add
3594 detail for doloop_end.
3596 2018-07-12 Martin Sebor <msebor@redhat.com>
3599 * attribs.c (decl_attributes): Reject conflicting attributes before
3600 calling attribute handlers.
3602 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
3604 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3606 (gcc::dump_manager::get_dump_file_name): likewise.
3607 (dump_begin): Likewise.
3608 * dumpfile.h (dump_begin): Update prototype.
3609 (gcc::dump_manager::get_dump_file_name,
3610 gcc::dump_manager::get_dump_file_name): Update prototype.
3612 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3614 * internal-fn.h (vectorizable_internal_fn_p): New function.
3615 * tree-vect-slp.c (compatible_calls_p): Likewise.
3616 (vect_build_slp_tree_1): Remove nops argument. Handle calls
3617 to internal functions.
3618 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3620 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3622 * fold-const.h (inverse_conditions_p): Declare.
3623 * fold-const.c (inverse_conditions_p): New function.
3624 * match.pd: Use inverse_conditions_p. Add folds of view_converts
3625 that test the inverse condition of a conditional internal function.
3626 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3627 * internal-fn.c (internal_fn_mask_index): Handle conditional
3629 (vectorized_internal_fn_supported_p): New function.
3630 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3631 (any_pred_load_store): Replace with...
3632 (need_to_predicate): ...this new variable.
3633 (redundant_ssa_names): New variable.
3634 (ifcvt_can_use_mask_load_store): Move initial checks to...
3635 (ifcvt_can_predicate): ...this new function. Handle tree codes
3636 for which a conditional internal function exists.
3637 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3638 instead of ifcvt_can_use_mask_load_store. Update after variable
3640 (predicate_load_or_store): New function, split out from
3641 predicate_mem_writes.
3642 (check_redundant_cond_expr): New function.
3643 (value_available_p): Likewise.
3644 (predicate_rhs_code): Likewise.
3645 (predicate_mem_writes): Rename to...
3646 (predicate_statements): ...this. Use predicate_load_or_store
3647 and predicate_rhs_code.
3648 (combine_blocks, tree_if_conversion): Update after above name changes.
3649 (ifcvt_local_dce): Handle redundant_ssa_names.
3650 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3651 general conditional functions.
3652 * tree-vect-stmts.c (vectorizable_call): Likewise.
3654 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3655 Alan Hayward <alan.hayward@arm.com>
3656 David Sherwood <david.sherwood@arm.com>
3658 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3659 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3660 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3661 plus and minus and convert them into IFN_COND_FMA-based sequences.
3662 (convert_mult_to_fma): Handle conditional plus and minus.
3664 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3666 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3667 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3668 (cond_fnms_optab): New optabs.
3669 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3671 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3672 * internal-fn.h (get_conditional_internal_fn): Declare.
3673 (get_unconditional_internal_fn): Likewise.
3674 * internal-fn.c (cond_ternary_direct): New macro.
3675 (expand_cond_ternary_optab_fn): Likewise.
3676 (direct_cond_ternary_optab_supported_p): Likewise.
3677 (FOR_EACH_COND_FN_PAIR): Likewise.
3678 (get_conditional_internal_fn): New function.
3679 (get_unconditional_internal_fn): Likewise.
3680 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3681 (gimple_match_op::gimple_match_op): Add a new overload for 5
3683 (gimple_match_op::set_op): Likewise.
3684 (gimple_resimplify5): Declare.
3685 * genmatch.c (decision_tree::gen): Generate simplifications for
3687 * gimple-match-head.c (gimple_simplify): Define an overload for
3688 5 operands. Handle calls with 5 arguments in the top-level overload.
3689 (convert_conditional_op): Handle conversions from unconditional
3690 internal functions to conditional ones.
3691 (gimple_resimplify5): New function.
3692 (build_call_internal): Pass a fifth operand.
3693 (maybe_push_res_to_seq): Likewise.
3694 (try_conditional_simplification): Try converting conditional
3695 internal functions to unconditional internal functions.
3696 Handle 3-operand unconditional forms.
3697 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3698 Define ternary equivalents of the current rules for binary conditional
3700 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3702 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3703 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3704 (optab): Handle them.
3705 (SVE_COND_FP_TERNARY): New int iterator.
3706 (sve_fmla_op, sve_fmad_op): New int attributes.
3707 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3708 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3709 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3711 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
3713 * target.def (preferred_else_value): New target hook.
3714 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3715 * doc/tm.texi: Regenerate.
3716 * targhooks.h (default_preferred_else_value): Declare.
3717 * targhooks.c (default_preferred_else_value): New function.
3718 * internal-fn.h (conditional_internal_fn_code): Declare.
3719 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3720 (get_conditional_internal_fn): Use it.
3721 (conditional_internal_fn_code): New function.
3722 * gimple-match.h (gimple_match_cond): New struct.
3723 (gimple_match_op): Add a cond member function.
3724 (gimple_match_op::gimple_match_op): Update all forms to take a
3726 * genmatch.c (expr::gen_transform): Use the same condition as res_op
3727 for the suboperation, but don't specify a particular else_value.
3728 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3729 (visit_nary_op, visit_reference_op_load): Pass
3730 gimple_match_cond::UNCOND to the gimple_match_op constructor.
3731 * gimple-match-head.c: Include tree-eh.h
3732 (convert_conditional_op): New function.
3733 (maybe_resimplify_conditional_op): Likewise.
3734 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3735 (gimple_resimplify2): Likewise.
3736 (gimple_resimplify3): Likewise.
3737 (gimple_resimplify4): Likewise.
3738 (maybe_push_res_to_seq): Return null for conditional operations.
3739 (try_conditional_simplification): New function.
3740 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
3742 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3744 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3746 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3748 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
3750 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3752 (hash_tree): Do not hash DECL_FCONTEXT
3753 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3754 Do not stream DECL_FCONTEXT.
3755 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3756 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3758 2018-07-12 Richard Biener <rguenther@suse.de>
3761 * dwarf2out.c (gen_block_die): Only output blocks when they have
3762 at least one !DECL_IGNORED_P variable.
3764 2018-07-12 Richard Biener <rguenther@suse.de>
3767 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3768 Remove -mieee-fp handling.
3770 2018-07-12 Richard Biener <rguenther@suse.de>
3772 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3773 left-over from last patch.
3775 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3777 PR tree-optimization/86492
3778 * gimple-ssa-store-merging.c
3779 (imm_store_chain_info::coalesce_immediate_stores): Call
3780 check_no_overlap even for the merge_overlapping case. Formatting fix.
3782 2018-07-12 Richard Biener <rguenther@suse.de>
3785 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3786 move possibly trapping operations into the conditional.
3788 2018-07-12 Richard Biener <rguenther@suse.de>
3790 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3791 (vn_lookup_simplify_result): Remove recursion limit applied
3793 (vn_nary_build_or_lookup_1): Adjust.
3794 (try_to_simplify): Likewise.
3795 * gimple-match-head.c (gimple_resimplify1): Instead apply one
3797 (gimple_resimplify2): Likewise.
3798 (gimple_resimplify3): Likewise.
3799 (gimple_resimplify4): Likewise.
3801 2018-07-11 Jakub Jelinek <jakub@redhat.com>
3803 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3804 Use __mmask64 type instead of __mmask8 for __M argument.
3805 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3806 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3808 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3809 __mmask16 for __M argument.
3810 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3811 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3812 to __mmask16 instead of __mmask8.
3813 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3814 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3815 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3816 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3817 instead of __mmask16 for __U argument.
3818 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3819 __mmask16 instead of __mmask8 for __U argument.
3820 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3822 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3824 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3826 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3828 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3830 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3832 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3834 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3836 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3838 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3840 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3841 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3842 return type as well as __M argument type and all casts from __mmask8
3844 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3845 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3846 return type as well as __M argument type and all casts from __mmask8
3848 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3849 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3850 return type as well as __M argument type and all casts from __mmask8
3852 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3853 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3854 return type as well as __M argument type and all casts from __mmask8
3856 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3857 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3860 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3862 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3863 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3866 2018-07-11 Paul Koning <ni1d@arrl.net>
3868 * doc/md.texi (define_subst): Document how multiple occurrences of
3869 the same argument in the replacement pattern are handled.
3871 2018-07-11 Paul Koning <ni1d@arrl.net>
3873 * doc/extend.texi (Common Variable Attributes): Move "mode" into
3875 (Common Type Attributes): Add "mode" attribute.
3877 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
3879 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3880 stream DECL_ORIGINAL_TYPE.
3881 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3882 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3883 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3884 Do not walk original type.
3885 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3887 (write_ts_decl_non_common_tree_pointers): Do not stream
3889 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3890 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3892 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3894 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3895 thread twice from the same starting edge.
3897 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3899 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3900 * gimple.c (gimple_call_nonnull_result_p): ...here...
3901 (gimple_call_nonnull_arg): ...and here.
3902 * gimple.h (gimple_call_nonnull_result_p): New.
3903 (gimple_call_nonnull_arg): New.
3905 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
3907 * config/arm/arm-cpus.in: Move information from fpu field of each
3908 cpu definition to the isa field.
3909 * config/arm/parsecpu.awk (fpu): Delete match rule.
3910 (gen_comm_data): Don't add bits from the CPU's FPU entry.
3912 2018-07-11 Richard Biener <rguenther@suse.de>
3915 * dwarf2out.c (init_sections_and_labels): Use
3916 output_asm_line_debug_info consistently.
3917 (dwarf2out_early_finish): Likewise.
3918 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3921 2018-07-11 Richard Biener <rguenther@suse.de>
3923 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3924 Rework father_bb setting in a way to avoid propagating constants
3925 multiple times on a loop body.
3927 2018-07-10 Mark Wielaard <mark@klomp.org>
3930 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3932 2018-07-10 Richard Biener <rguenther@suse.de>
3934 * hash-map.h (hash_map::iterator::operator*): Return
3935 references to key and value.
3937 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3940 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3941 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3942 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3943 (gimplify_omp_for): For composite loops, move outer
3944 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3945 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
3946 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
3947 TREE_LIST for both the original class iterator and the "last" helper
3948 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
3949 loop, remember has_decl_expr from outer composite loops for the
3950 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3952 2018-07-09 Martin Sebor <msebor@redhat.com>
3956 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3957 accessing implicitly initialized array elements.
3958 * expr.c (string_constant): Handle string initializers of
3959 character arrays within aggregates.
3960 * gimple-fold.c (fold_array_ctor_reference): Add argument.
3961 Store element offset. As a special case, handle zero size.
3962 (fold_nonarray_ctor_reference): Same.
3963 (fold_ctor_reference): Add argument. Store subobject offset.
3964 * gimple-fold.h (fold_ctor_reference): Add argument.
3966 2018-07-09 Paul Koning <ni1d@arrl.net>
3968 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3969 (pdp11_insn_cost): New function.
3970 (pdp11_md_asm_adjust): New function.
3971 (TARGET_INVALID_WITHIN_DOLOOP): Define.
3972 (pdp11_rtx_costs): Update to match machine better.
3973 (output_addr_const_pdp11): Correct format mismatch warnings.
3974 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3975 * config/pdp11/pdp11.md: General change to add base_cost and/or
3976 length attributes for use by new pdp11_insn_cost function.
3977 (MIN_BRANCH): Correct definition.
3979 (doloop_end): Use standard pattern name for looping pattern.
3980 (doloop_end_nocc): New.
3981 (movsf): Add another constraint alternative.
3982 (zero_extendqihi2): Add constraint alternatives for not in place
3984 (zero_extendhisi2): Remove.
3985 (shift patterns): Add CC handling variants.
3989 (define_peephole2): New peephole to recognize mov that sets CC for
3992 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3994 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3995 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3998 2018-07-09 Jakub Jelinek <jakub@redhat.com>
4001 * real.c (real_nextafter): Return true if result is denormal.
4003 2018-07-09 Martin Liska <mliska@suse.cz>
4005 * common.opt: Add back wrongly removed attribute.
4007 2018-07-09 Richard Biener <rguenther@suse.de>
4010 * dwarf2out.c (gen_block_die): For an early generated DIE
4011 always output high/low PC attributes.
4013 2018-07-09 Tom de Vries <tdevries@suse.de>
4015 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4016 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4017 onto VAR_DECL with abstract origin.
4019 2018-07-07 Jim Wilson <jimw@sifive.com>
4021 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4023 2018-07-07 Tom de Vries <tdevries@suse.de>
4025 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4027 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
4029 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4031 (combine_bound): Use wide-int overflow calculation instead of
4033 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4035 * fold-const.c (int_const_binop_2): Same.
4036 (extract_muldiv_1): Same.
4037 (fold_div_compare): Same.
4038 (fold_abs_const): Same.
4040 * poly-int.h (add): Same.
4044 * predict.c (predict_iv_comparison): Same.
4045 * profile-count.c (slow_safe_scale_64bit): Same.
4046 * simplify-rtx.c (simplify_const_binary_operation): Same.
4047 * tree-chrec.c (tree_fold_binomial): Same.
4048 * tree-data-ref.c (split_constant_offset_1): Same.
4049 * tree-if-conv.c (idx_within_array_bound): Same.
4050 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4051 * tree-ssa-phiopt.c (minmax_replacement): Same.
4052 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4053 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4054 * vr-values.c (vr_values::adjust_range_with_scev): Same.
4055 * wide-int.cc (wi::add_large): Same.
4056 (wi::mul_internal): Same.
4057 (wi::sub_large): Same.
4058 (wi::divmod_internal): Same.
4059 * wide-int.h: Change overflow type to overflow_type for neg, add,
4060 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4061 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4062 mul_internal, divmod_internal.
4063 (overflow_type): New enum.
4064 (accumulate_overflow): New.
4066 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4068 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4069 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4071 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4073 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4074 argument is checked for zero before entering loop, avoid checking again.
4076 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4078 * gimplify.h (generic_expr_could_trap_p): Set as global function.
4079 * gimplify.h (generic_expr_could_trap_p): Likwise.
4080 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4082 2018-07-06 Jakub Jelinek <jakub@redhat.com>
4084 PR tree-optimization/86401
4085 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4086 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4087 (fold_bit_and_mask): ... here. New helper function for match.pd.
4088 * fold-const.h (fold_bit_and_mask): Declare.
4089 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4091 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4094 * target.def (translate_mode_attribute): New hook.
4095 * targhooks.h (default_translate_mode_attribute): Declare.
4096 * targhooks.c (default_translate_mode_attribute): New function.
4097 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4098 * doc/tm.texi: Regenerate.
4099 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4100 (rs6000_translate_mode_attribute): New function.
4102 2018-07-06 Paul Koning <ni1d@arrl.net>
4104 * doc/md.texi (define_split): Document DONE and FAIL.
4105 (define_peephole2): Ditto.
4107 2018-07-05 Jeff Law <law@redhat.com>
4109 PR tree-optimization/86010
4110 * tree-ssa-dse.c (compute_trims): More aggressively trim at
4111 both the head and tail of mem* and str* calls.
4113 2018-07-05 Jim Wilson <jimw@sifive.com>
4115 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4117 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
4119 * config/aarch64/aarch64-simd.md: correct flags text for
4120 MIN_EXPR replacement.
4122 2018-07-05 James Clarke <jrtc27@jrtc27.com>
4124 * configure: Regenerated.
4126 2018-07-05 Carl Love <cel@us.ibm.com>
4128 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4129 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4130 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4131 VSX_BUILTIN_DOUBLEL_V4SF.
4133 2018-07-05 Martin Sebor <msebor@redhat.com>
4136 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4137 than its domain to compute its the upper bound of a char array.
4139 2018-07-05 Nathan Sidwell <nathan@acm.org>
4141 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4142 * doc/cpp.texi: Update comment.
4143 * doc/tm.texi: Rebuilt.
4144 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4145 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4146 * doc/extend.texi (Backwards Compatibility): Clarify it is system
4147 headers affected by extern "C".
4148 * system.h: Poison NO_IMPLICIT_EXTERN_C.
4149 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4150 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4151 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4152 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4153 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4154 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4155 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4156 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4157 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4158 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4159 config/sparc/sp64-elf.h, config/spu/spu.h,
4160 config/stormy16/stormy16.h, config/v850/v850.h,
4161 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4162 define NO_IMPLICIT_EXTERN_C.
4163 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4165 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4168 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4169 instead of GET_MODE_SIZE when comparing Units.
4171 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4174 * rtlanal.c (set_noop_p): Constrain on mode change,
4175 include hard-reg-set.h
4177 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4179 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4181 2018-07-05 Jakub Jelinek <jakub@redhat.com>
4184 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4187 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4189 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4191 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4194 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4196 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4198 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
4201 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4203 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
4205 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4206 neg_*_op* variables.
4208 2018-07-04 Martin Liska <mliska@suse.cz>
4210 * tree-switch-conversion.c: Define
4211 max_ratio_for_speed and max_ratio_for_size constants.
4213 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
4214 Martin Liska <mliska@suse.cz>
4219 * common.opt: Rename align options with 'str_' prefix.
4220 * common/config/i386/i386-common.c (set_malign_value): New
4222 (ix86_handle_option): Use it to set -falign-* options/
4223 * config/aarch64/aarch64-protos.h (struct tune_params): Change
4224 type from int to string.
4225 * config/aarch64/aarch64.c: Update default values from int
4227 * config/alpha/alpha.c (alpha_override_options_after_change):
4229 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4230 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4231 max skip conditionally.
4232 * config/i386/freebsd.h (SUBALIGN_LOG): New.
4233 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4234 max skip conditionally.
4235 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4236 max skip conditionally.
4237 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4238 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4239 max skip conditionally.
4240 * config/i386/i386.c (struct ptt): Change type from int to
4242 (ix86_default_align): Set default values.
4243 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4244 max skip conditionally.
4245 * config/i386/iamcu.h (SUBALIGN_LOG): New.
4246 (ASM_OUTPUT_MAX_SKIP_ALIGN):
4247 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4248 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4249 max skip conditionally.
4250 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4251 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4252 * config/i386/x86-64.h (SUBALIGN_LOG): New.
4253 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4254 max skip conditionally.
4255 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4256 * config/ia64/ia64.c (ia64_option_override): Set default values
4257 for alignment options.
4258 * config/m68k/m68k.c: Handle new str_align_* options.
4259 * config/mips/mips.c (mips_set_compression_mode): Change
4261 (mips_option_override): Set default values for options.
4262 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4264 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4266 * config/rx/rx.c (rx_option_override): Likewise.
4267 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4268 (LABEL_ALIGN): Use align_labels_log.
4269 (LOOP_ALIGN): Use align_loops_align.
4270 * config/s390/s390.c (s390_asm_output_function_label): Use new
4272 * config/sh/sh.c (sh_override_options_after_change):
4273 Change type of constants.
4274 * config/spu/spu.c (spu_sched_init): Likewise.
4275 * config/sparc/sparc.c (sparc_option_override): Set default
4277 * config/visium/visium.c (visium_option_override): Likewise.
4278 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4279 emit p2align format with last argument if it's not needed.
4280 * doc/invoke.texi: Document extended format of -falign-*.
4281 * final.c: Use align_labels alignment.
4282 * flags.h (struct target_flag_state): Change type to use
4284 (struct align_flags_tuple): New.
4285 (struct align_flags): Likewise.
4286 (align_loops_log): Redefine macro to use new types.
4287 (align_loops_max_skip): Redefine macro to use new types.
4288 (align_jumps_log): Redefine macro to use new types.
4289 (align_jumps_max_skip): Redefine macro to use new types.
4290 (align_labels_log): Redefine macro to use new types.
4291 (align_labels_max_skip): Redefine macro to use new types.
4292 (align_functions_log): Redefine macro to use new types.
4293 (align_loops): Redefine macro to use new types.
4294 (align_jumps): Redefine macro to use new types.
4295 (align_labels): Redefine macro to use new types.
4296 (align_functions): Redefine macro to use new types.
4297 (align_functions_max_skip): Redefine macro to use new types.
4298 (align_loops_value): New macro.
4299 (align_jumps_value): New macro.
4300 (align_labels_value): New macro.
4301 (align_functions_value): New macro.
4302 * function.c (invoke_set_current_function_hook): Propagate
4303 alignment values from flags to global variables default in
4305 * ipa-icf.c (sem_function::equals_wpa): Use
4306 cl_optimization_option_eq instead of memcmp.
4307 * lto-streamer.h (cl_optimization_stream_out): Support streaming
4309 (cl_optimization_stream_in): Likewise.
4310 * optc-save-gen.awk: Support strings in cl_optimization.
4311 * opth-gen.awk: Likewise.
4312 * opts.c (finish_options): Remove error checking of invalid
4314 (MAX_CODE_ALIGN): Remove.
4315 (MAX_CODE_ALIGN_VALUE): Likewise.
4316 (parse_and_check_align_values): New function.
4317 (check_alignment_argument): Likewise.
4318 (common_handle_option): Use check_alignment_argument.
4319 * opts.h (parse_and_check_align_values): Declare.
4320 * toplev.c (init_alignments): Remove.
4321 (read_log_maxskip): New.
4322 (parse_N_M): Likewise.
4323 (parse_alignment_opts): Likewise.
4324 (backend_init_target): Remove usage of init_alignments.
4325 * toplev.h (parse_alignment_opts): Declare.
4326 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4328 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4329 * tree.c (cl_option_hasher::equal): New.
4330 * varasm.c: Use new global macros.
4332 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
4334 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4335 Use a simpler align directive also if MAXSKIP = ALIGN-1.
4336 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4337 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4338 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4339 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4340 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4341 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4342 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4343 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4344 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4345 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4346 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4348 2018-07-04 Martin Liska <mliska@suse.cz>
4349 Jonathan Wakely <jwakely@redhat.com>
4351 * coverage.c: Use correct type.
4352 * doc/invoke.texi: Language correction.
4354 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
4357 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4358 ENDBRANCH for non-tail call which may return via indirect branch.
4359 * doc/extend.texi: Document indirect_return attribute.
4361 2018-07-03 Martin Sebor <msebor@redhat.com>
4363 PR tree-optimization/86274
4364 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4366 (format_floating): Correct handling of infinities and NaNs.
4368 2018-07-03 Martin Sebor <msebor@redhat.com>
4370 * print-tree.c (print_real_cst): New function.
4371 (print_node_brief): Call it.
4372 (print_node): Ditto.
4374 2018-07-03 Jeff Law <law@redhat.com>
4376 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4377 into a single pattern.
4379 * config/h8300/h8300.md (ors code_iterator): New.
4380 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4381 a single pattern and single splitter.
4382 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4383 (iorqi3_1, xorqi3_1): Likewise.
4384 (iorqi3, xorqi3 expanders): Similarly.
4386 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4387 (movmd_internal) into a single pattern using the P mode iterator.
4388 (movmd splitters): Similarly.
4389 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4390 (movsd splitters): Similarly.
4392 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4393 ADDB, ADDW and ADDL into a single ADD attribute which selects the
4394 right table based on the size of the operand.
4395 * config/h8300/h8300.md (length_table): Corresponding changes. All
4396 references to "addb", "addw" and "addl" changed to "add".
4397 (btst patterns): Merge two variants into a single pattern.
4398 (tstqi, tsthi): Likewise.
4399 (addhi3_incdec, addsi3_incdec): Likewise.
4400 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4401 (mulhi3, mulsi3): Likewise.
4402 (udivhi3, udivsi3): Likewise.
4403 (divhi3, divsi3): Likewise.
4404 (andorqi3, andorhi3, andorsi3): Likewise.
4406 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
4409 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4410 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4412 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4414 PR tree-optimization/85694
4415 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4416 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4418 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4419 (<u>avg<mode>3_ceil): New patterns.
4421 2018-07-03 David Malcolm <dmalcolm@redhat.com>
4423 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4424 scan-tree-dump directive.
4425 * gcc.dg/vect/slp-perm-2.c: Likewise.
4426 * gcc.dg/vect/slp-perm-3.c: Likewise.
4427 * gcc.dg/vect/slp-perm-5.c: Likewise.
4428 * gcc.dg/vect/slp-perm-6.c: Likewise.
4429 * gcc.dg/vect/slp-perm-7.c: Likewise.
4430 * gcc.dg/vect/slp-perm-8.c: Likewise.
4432 2018-07-03 Marek Polacek <polacek@redhat.com>
4435 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4437 2018-07-03 Richard Biener <rguenther@suse.de>
4440 * tree-ssa-structalias.c (find_func_clobbers): Properly
4441 handle indirect calls.
4443 2018-07-03 Jeff Law <law@redhat.com>
4445 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4446 (shifts): New code iterator.
4447 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4448 expander. Fix HImode handling on H8/SX.
4449 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4450 (subqi3, subhi3, subsi3 expanders): Likewise.
4451 (andqi3, andhi3, andsi3 expanders): Likewise.
4452 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4453 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4454 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4455 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4456 (zero_extendqihi2, zero_extendqisi2): Likewise.
4457 (extendqihi2, extendqisi2): Likewise.
4458 (rotlqi3, rotlhi3, rotlsi3): Likewise.
4459 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4460 (rotlqi3_1, rotlhi3_1): Likewise.
4461 (logicalhi3_sn, logicalsi3_sn): Likewise.
4462 (logicalhi3, logicalsi3): Likewise.
4464 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4466 * tree-vect-patterns.c (vect_recog_rotate_pattern)
4467 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4468 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4469 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4470 type to append_pattern_def_seq instead of creating a stmt_vec_info
4472 (build_mask_conversion): Likewise. Remove vinfo argument.
4473 (vect_add_conversion_to_patterm): Likewise, renaming to...
4474 (vect_add_conversion_to_pattern): ...this.
4475 (vect_recog_mask_conversion_pattern): Update call to
4476 build_mask_conversion. Pass the vector type to
4477 append_pattern_def_seq here too.
4478 (vect_recog_gather_scatter_pattern): Update call to
4479 vect_add_conversion_to_pattern.
4481 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4483 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4484 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4485 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4486 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4487 STMT_VINFO_PATTERN_DEF_SEQ to null here.
4488 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4489 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4490 append_pattern_def_seq instead of new_pattern_def_seq.
4491 (vect_recog_divmod_pattern): Do both of the above.
4492 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4495 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4497 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4498 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4499 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4500 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4501 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4502 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4503 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4504 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4505 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4506 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4507 parameter with a single stmt_vec_info.
4508 (vect_recog_func_ptr): Likewise.
4509 (vect_recog_gather_scatter_pattern): Likewise, folding in...
4510 (vect_try_gather_scatter_pattern): ...this.
4511 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4512 the stmt_vec_info of the statement to be matched. Don't clear
4513 STMT_VINFO_RELATED_STMT.
4514 (vect_pattern_recog): Update call accordingly.
4516 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4518 PR tree-optimization/85694
4519 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4520 (uavgM3_ceil): Document new optabs.
4521 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4522 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4524 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4525 (savg_ceil_optab): New optabs.
4526 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4527 (vect_vect_recog_func_ptrs): Add it.
4528 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4529 constant directly from the associated lhs.
4531 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4533 * tree-vect-patterns.c (vect_split_statement): New function.
4534 (vect_convert_input): Use it to try to split an existing cast.
4536 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4538 * poly-int.h (print_hex): New function.
4539 * dumpfile.h (dump_dec, dump_hex): Declare.
4540 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4541 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4542 min_input_precision, operation_precision and operation_sign.
4543 * tree-vect-patterns.c (vect_get_range_info): New function.
4544 (vect_same_loop_or_bb_p, vect_single_imm_use)
4545 (vect_operation_fits_smaller_type): Delete.
4546 (vect_look_through_possible_promotion): Add an optional
4547 single_use_p parameter.
4548 (vect_recog_over_widening_pattern): Rewrite to use new
4549 stmt_vec_info infomration. Handle one operation at a time.
4550 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4551 (vect_truncatable_operation_p, vect_set_operation_type)
4552 (vect_set_min_input_precision): New functions.
4553 (vect_determine_min_output_precision_1): Likewise.
4554 (vect_determine_min_output_precision): Likewise.
4555 (vect_determine_precisions_from_range): Likewise.
4556 (vect_determine_precisions_from_users): Likewise.
4557 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4558 (vect_vect_recog_func_ptrs): Put over_widening first.
4560 (vect_pattern_recog): Call vect_determine_precisions.
4562 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
4564 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4565 statements that have been replaced by further pattern statements.
4566 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4568 2018-07-03 Richard Biener <rguenther@suse.de>
4570 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4571 always set *dt. Dump vectype in vectype overload.
4572 * dumpfile.h (dump_gimple_expr): New function.
4573 (dump_gimple_expr_loc): Likewise.
4574 * dumpfile.c (dump_gimple_expr): New function.
4575 (dump_gimple_expr_loc): Likewise.
4577 2018-07-02 Jeff Law <law@redhat.com>
4579 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4580 the H8/300, H8/300H and H8/S variants into a single pattern.
4581 (movhi_h8300, movqi_h8300hs): Similarly.
4582 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4583 (QHI mode iterator): New.
4585 * config/h8300/h8300.md: Remove trailing whitespace.
4587 2018-07-02 Jim Wilson <jimw@sifive.com>
4589 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4590 instead of emit_insn for interrupt returns.
4591 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4592 (riscv_sret, riscv_uret): Likewise.
4594 2018-07-02 David Malcolm <dmalcolm@redhat.com>
4596 * pretty-print.c (selftest::test_pp_format): Move save and restore
4597 of quotes to class auto_fix_quotes, and add an instance.
4598 * selftest.c: Include "intl.h".
4599 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4600 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4601 * selftest.h (selftest::auto_fix_quotes): New class.
4603 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
4605 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4606 (aarch64_sve_prepare_conditional_op): Remove.
4607 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4608 Allow aarch64_simd_reg_or_zero as select operand; remove
4609 the aarch64_sve_prepare_conditional_op call.
4610 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4611 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4612 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4613 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4614 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4615 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4616 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4617 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4618 and a splitters to match all of the *_any patterns.
4619 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4621 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4622 (SVE_COND_FP_BINARY_REV): Remove.
4623 (sve_int_op_rev, sve_fp_op_rev): New.
4624 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4625 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4626 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4627 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4628 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4629 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4630 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4631 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4632 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4634 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4635 Remove match_dup 1 from the inner unspec.
4636 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4638 * config/aarch64/aarch64.md (movprfx): New attr.
4639 (length): Default movprfx to 8.
4640 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4641 (*madd<SVE_I>, *msub<SVE_I): Likewise.
4642 (*<su>mul<SVE_I>3_highpart): Likewise.
4643 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4644 (*v<ASHIFT><SVE_I>3): Likewise.
4645 (*<su><MAXMIN><SVE_I>3): Likewise.
4646 (*<su><MAXMIN><SVE_F>3): Likewise.
4647 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4648 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4649 (*div<SVE_F>4): Likewise.
4651 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
4653 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4656 2018-07-02 Richard Biener <rguenther@suse.de>
4658 PR tree-optimization/86363
4659 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4660 memset argument refers to a non-variable address.
4662 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
4664 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4665 {PLUS,MINUS}_EXPR code to...
4666 (adjust_symbolic_bound): ...here,
4667 (combine_bound): ...here,
4668 (set_value_range_with_overflow): ...and here.
4670 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
4672 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4674 (extract_range_from_abs_expr): ...here.
4676 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
4678 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4679 -fno-omit-frame-pointer when not optimizing.
4681 2018-07-02 Martin Liska <mliska@suse.cz>
4684 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4685 (propagate_nothrow): Likewise.
4687 2018-07-02 Martin Liska <mliska@suse.cz>
4690 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4692 2018-07-02 David Malcolm <dmalcolm@redhat.com>
4694 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4695 function in r262149, changing "loc" param from source_location to
4696 const dump_location_t &.
4697 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4698 declaration, as above.
4700 2018-07-01 Paul Koning <ni1d@arrl.net>
4702 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4703 -munit-asm, -mgnu-asm, -mdec-asm.
4704 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4705 (pdp11_output_labelref): New.
4706 (pdp11_output_def): New.
4707 (pdp11_output_addr_vec_elt): New.
4708 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
4709 %# and %@ format codes.
4710 (pdp11_option_override): New.
4711 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4712 (pdp11_output_ident): New.
4713 (pdp11_asm_named_section): New.
4714 (pdp11_asm_init_sections): New.
4715 (pdp11_file_start): New.
4716 (pdp11_file_end): New.
4717 (output_ascii): Use .ascii/.asciz for -mdec-asm.
4718 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
4719 %o, like %c but octal.
4720 (pdp11_option_override): New.
4721 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4723 (DATA_SECTION_ASM_OP): Ditto.
4724 (READONLY_DATA_SECTION_ASM_OP): New.
4725 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4726 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4727 (ASM_OUTPUT_LABELREF): Ditto.
4728 (ASM_OUTPUT_DEF): Ditto.
4729 (ASM_OUTPUT_EXTERNAL): New.
4730 (ASM_OUTPUT_SOURCE_FILENAME): New.
4731 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4732 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4733 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
4734 %# and %@ format codes.
4735 * config/pdp11/pdp11.opt (mgnu-asm): New.
4736 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4737 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4738 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4740 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
4742 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4743 dereferencing path[] beyond its length.
4745 (debug_all_paths): New.
4746 (rewire_first_differing_edge): New.
4747 (adjust_paths_after_duplication): New.
4748 (duplicate_thread_path): Call adjust_paths_after_duplication.
4750 (thread_through_all_blocks): Add new argument to
4751 duplicate_thread_path.
4753 2018-06-30 Jim Wilson <jimw@sifive.com>
4755 * config/riscv/predicates.md (p2m1_shift_operand): New.
4756 (high_mask_shift_operand): New.
4757 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4758 pattern using p2m1_shift_operand.
4759 (lshsi3_zero_extend_3+2): New combiner pattern using
4760 high_mask_shift_operand.
4762 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4764 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4766 (vect_recog_rotate_pattern): ...here.
4767 (vect_convert_input): Try to insert casts of invariants in the
4769 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4770 preheader to be empty.
4772 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4774 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4775 vector type. If given, install it in the new statement's
4777 (vect_element_precision): New function.
4778 (vect_unpromoted_value): New struct.
4779 (vect_unpromoted_value::vect_unpromoted_value): New function.
4780 (vect_unpromoted_value::set_op): Likewise.
4781 (vect_look_through_possible_promotion): Likewise.
4782 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4783 (vect_widened_op_tree, vect_convert_input): Likewise.
4784 (vect_convert_inputs, vect_convert_output): Likewise.
4785 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4786 to handle the optional cast of the multiplication result and
4787 vect_widened_op_tree to detect the widened multiplication itself.
4788 Do not require the input and output of promotion casts to have
4789 the same sign, but base the signedness of the operation on the
4790 input rather than the result. If the pattern includes two
4791 promotions, check that those promotions have the same sign.
4792 Do not restrict the MULT_EXPR handling to a double-width result;
4793 handle quadruple-width results and wider. Use vect_convert_inputs
4794 to convert the inputs to the common type.
4795 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
4796 to handle the optional cast of the ABS result. Also allow a sign
4797 change or a sign extension between the ABS and MINUS.
4798 Use vect_widened_op_tree to detect the widened subtraction and use
4799 vect_convert_inputs to convert the inputs to the common type.
4800 (vect_handle_widen_op_by_const): Delete.
4801 (vect_recog_widen_op_pattern): New function.
4802 (vect_recog_widen_mult_pattern): Use it.
4803 (vect_recog_widen_shift_pattern): Likewise.
4804 (vect_recog_widen_sum_pattern): Use
4805 vect_look_through_possible_promotion to handle the promoted
4808 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4810 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4811 the containing gimple_seq *.
4812 * gimple-iterator.h (gsi_for_stmt): Declare it.
4813 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4814 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4815 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4816 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4817 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4819 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4821 (vect_mark_pattern_stmts): ...here. Handle cases in which the
4822 statement being replaced is part of an existing pattern
4823 definition sequence, inserting the new pattern statements before
4825 (vect_pattern_recog_1): Don't return a bool. If the statement
4826 is already part of a pattern, instead apply pattern matching
4827 to the pattern definition statements. Don't clear the
4828 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4829 (vect_pattern_recog): Don't break after the first match;
4830 continue processing the pattern definition statements instead.
4831 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4833 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4835 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4836 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4837 (vect_recog_widen_sum_pattern): Use it.
4839 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4841 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4842 phi is not a pattern statement and has not been replaced by
4843 a pattern statement.
4844 * tree-vect-patterns.c (type_conversion_p): Don't check
4845 STMT_VINFO_IN_PATTERN_P.
4846 (vect_recog_vector_vector_shift_pattern): Likewise.
4847 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4848 the pattern statement rather than the original statement; check
4849 directly for a WIDEN_MULT_EXPR here.
4850 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4851 vect_is_simple_use to return the pattern statement rather
4852 than the original statement; use is_pattern_stmt_p to check
4853 for such a pattern statement.
4854 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4855 to return the pattern statement rather than the original statement;
4856 don't do the same transformation here.
4857 (vect_is_simple_use): If the defining statement has been replaced
4858 by a pattern statement, return the pattern statement instead.
4859 Remove the corresponding (local) transformation from the vectype
4862 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4864 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4865 end and default to null.
4866 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4867 (vectorizable_reduction): Update calls accordingly, dropping the
4868 gimple ** argument if the passed-back statement isn't needed.
4869 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4870 (vect_recog_rotate_pattern): Likewise.
4871 (vect_recog_mask_conversion_pattern): Likewise.
4872 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4873 (vect_mask_constant_operand_p): Likewise.
4874 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4875 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4876 (get_group_load_store_type, get_load_store_type): Likewise.
4877 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4878 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4879 (vectorizable_conversion, vectorizable_assignment): Likewise.
4880 (vectorizable_shift, vectorizable_operation): Likewise.
4881 (vectorizable_store, vect_is_simple_cond): Likewise.
4882 (vectorizable_condition, vectorizable_comparison): Likewise.
4883 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4884 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4885 and move it to the end. Cope with null def_stmt_outs.
4887 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4889 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4891 2018-06-29 Jeff Law <law@redhat.com>
4893 * config/v850/v850.c (v850_legitimate_address_p): Handle large
4894 displacements for TARGET_V850E2V3 and newer.
4895 (TARGET_LRA_P): Remove. Defaults to LRA now.
4896 * config/v850/v850.md (sign23byte_load): Remove.
4897 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4898 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4900 2018-06-29 Martin Liska <mliska@suse.cz>
4903 * coverage.c (coverage_init): Mangle full path name.
4904 * doc/invoke.texi: Document the change.
4905 * gcov-io.c (mangle_path): New.
4906 * gcov-io.h (mangle_path): Likewise.
4907 * gcov.c (mangle_name): Use mangle_path for path mangling.
4909 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4911 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4912 if starting source register is not even.
4914 2018-06-29 Martin Liska <mliska@suse.cz>
4916 PR tree-optimization/86263
4917 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4918 Make edge redirection.
4920 2018-06-29 David Malcolm <dmalcolm@redhat.com>
4922 * dumpfile.c (dump_loc): Add indentation based on scope depth.
4923 (dump_scope_depth): New variable.
4924 (get_dump_scope_depth): New function.
4925 (dump_begin_scope): New function.
4926 (dump_end_scope): New function.
4927 * dumpfile.h (get_dump_scope_depth): New declaration.
4928 (dump_begin_scope): New declaration.
4929 (dump_end_scope): New declaration.
4930 (class auto_dump_scope): New class.
4931 (AUTO_DUMP_SCOPE): New macro.
4932 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4935 2018-06-29 Richard Biener <rguenther@suse.de>
4937 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4938 compute_all_dependences succeeds.
4939 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4940 exceed --param loop-max-datarefs-for-datadeps.
4942 2018-06-29 Jakub Jelinek <jakub@redhat.com>
4944 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4946 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
4949 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4950 alternative 0 in preferred_for_speed attribute.
4952 2018-06-28 Paul Koning <ni1d@arrl.net>
4954 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4955 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4956 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4957 * config/pdp11/pdp11.md: Correct "length" attribute calculation
4958 for shift insn patterns.
4960 2018-06-28 David Malcolm <dmalcolm@redhat.com>
4962 * cgraph.c (cgraph_node::get_body): Replace assignments to
4963 "dump_file" with calls to set_dump_file.
4964 * dumpfile.c (alt_dump_file): Make static, and group with...
4965 (alt_flags): ...this definition.
4966 (dumps_are_enabled): New variable.
4967 (refresh_dumps_are_enabled): New function.
4968 (set_dump_file): New function.
4969 (set_alt_dump_file): New function.
4970 (gcc::dump_manager::dump_start): Replace assignments to
4971 "dump_file" and "alt_dump_file" with calls to set_dump_file and
4973 (gcc::dump_manager::dump_finish): Likewise.
4974 * dumpfile.h (alt_dump_file): Delete decl.
4975 (dumps_are_enabled): New variable decl.
4976 (set_dump_file): New function decl.
4977 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4979 * tree-nested.c (lower_nested_functions): Replace assignments to
4980 "dump_file" with calls to set_dump_file.
4982 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4984 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4985 goto_locus of each outgoing edge of each basic block.
4987 2018-06-28 Richard Biener <rguenther@suse.de>
4989 * dwarf2out.c (decl_scope_table): Remove.
4990 (push_decl_scope): Likewise.
4991 (pop_decl_scope): Likewise.
4992 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4993 (gen_struct_or_union_type_die): Likewise.
4994 (gen_tagged_type_die): Likewise.
4995 (dwarf2out_init): Do not initialize decl_scope_table.
4996 (dwarf2out_c_finalize): Do not free it.
4998 2018-06-28 Richard Biener <rguenther@suse.de>
5000 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5001 deciding whether to not re-use a DIE.
5003 2018-06-28 Richard Biener <rguenther@suse.de>
5005 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5006 DW_AT_abstract_origin attribute.
5008 2018-06-28 Martin Liska <mliska@suse.cz>
5010 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5011 Use newly introduced constants.
5012 * tree-switch-conversion.h (struct jump_table_cluster):
5013 Define max_ratio_for_size and max_ratio_for_speed.
5015 2018-06-28 Martin Liska <mliska@suse.cz>
5017 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5018 Add new checking assert to catch invalid state.
5019 (jump_table_cluster::can_be_handled): Handle single case
5021 (jump_table_cluster::is_beneficial): Bail out for such case.
5022 (bit_test_cluster::find_bit_tests):
5023 Add new checking assert to catch invalid state.
5024 (bit_test_cluster::can_be_handled): Handle single case
5026 (bit_test_cluster::is_beneficial): Bail out for such case.
5027 (switch_decision_tree::analyze_switch_statement):
5030 2018-06-28 Martin Liska <mliska@suse.cz>
5032 * common.opt: Introduce -completion option.
5033 * gcc.c (driver_handle_option): Handle it.
5034 (driver::main): Print completions if completion
5036 * opt-suggestions.c (option_proposer::get_completions):
5038 (option_proposer::suggest_completion): Likewise.
5039 (option_proposer::find_param_completions): Likewise.
5040 (verify_autocompletions): Likewise.
5041 (test_completion_valid_options): Likewise.
5042 (test_completion_valid_params): Likewise.
5043 (in_completion_p): Likewise.
5044 (empty_completion_p): Likewise.
5045 (test_completion_partial_match): Likewise.
5046 (test_completion_garbage): Likewise.
5047 (opt_proposer_c_tests): Likewise.
5048 * opt-suggestions.h: Declare new functions.
5049 * opts.c (common_handle_option): Handle OPT__completion_.
5050 * selftest-run-tests.c (selftest::run_tests): Add
5051 opt_proposer_c_tests.
5052 * selftest.c (assert_str_startswith): New.
5053 * selftest.h (assert_str_startswith): Likewise.
5054 (opt_proposer_c_tests): New.
5055 (ASSERT_STR_STARTSWITH): Likewise.
5057 2018-06-28 Martin Liska <mliska@suse.cz>
5059 * Makefile.in: Add opt-suggestions.o.
5060 * gcc-main.c: Include opt-suggestions.h.
5061 * gcc.c (driver::driver): Likewise.
5062 (driver::~driver): Remove m_option_suggestions.
5063 (driver::build_option_suggestions): Moved to option_proposer.
5064 (driver::suggest_option): Likewise.
5065 (driver::handle_unrecognized_options): Use option_proposer.
5066 * gcc.h (class driver): Add new memver m_option_proposer.
5067 * opt-suggestions.c: New file.
5068 * opt-suggestions.h: New file.
5070 2018-06-28 Martin Liska <mliska@suse.cz>
5072 * vec.h (class auto_string_vec): New (moved from auto_argvec).
5073 (auto_string_vec::~auto_string_vec): Likewise.
5075 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5077 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5078 prevent_decl_creation_for_types fields up and add reset_location field.
5079 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5080 statement if id->reset_location is true.
5081 (copy_edges_for_bb): Do not set goto_locus on the new edges if
5082 id->reset_location is true.
5083 (copy_phis_for_bb): Force input_location on the arguments if
5084 id->reset_location is true.
5085 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5086 is set on the function to be inlined.
5088 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
5090 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5092 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
5094 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5095 registers for Pmode.
5096 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5097 hard registers for the clobbered pseudo.
5099 2018-06-27 Paul Koning <ni1d@arrl.net>
5101 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5102 mutually exclusive options.
5103 * config/pdp11/constraints.md (h): New constraint.
5104 (O): Update definition to match shift code generation.
5105 (D): New constraint.
5106 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5108 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5110 (output_jump): Change arguments.
5111 (pdp11_fixed_cc_regs): New function.
5112 (pdp11_cc_mode): Ditto.
5113 (pdp11_expand_shift): Ditto.
5114 (pdp11_assemble_shift): Ditto.
5115 (pdp11_small_shift): Ditto.
5116 (pdp11_branch_cost): Remove.
5117 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5119 (pdp11_register_move_cost): Update for CC registers.
5120 (pdp11_rtx_costs): Add case for LSHIFTRT.
5121 (pdp11_output_jump): Add CCNZ mode conditional branches.
5122 (notice_update_cc_on_set): Remove.
5123 (pdp11_cc_mode): New function.
5124 (simple_memory_operand): Correct pre/post decrement case.
5125 (no_side_effect_operand): New function.
5126 (pdp11_regno_reg_class): Add CC_REGS class.
5127 (pdp11_fixed_cc_regs): New function.
5128 (pdp11_small_shift): New function.
5129 (pdp11_expand_shift): New function to expand shift insns.
5130 (pdp11_assemble_shift): New function to output shifts.
5131 (pdp11_branch_cost): Remove.
5132 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5133 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5134 (WCHAR_TYPE): Ditto.
5135 (PTRDIFF_TYPE): Ditto.
5136 (ADJUST_INSN_LENGTH): New macro.
5137 (FIXED_REGISTERS): Add CC registers.
5138 (CALL_USED_REGISTERS): Ditto.
5140 (REG_CLASS_NAMES): Ditto.
5141 (REG_CLASS_CONTENTS): Ditto.
5142 (SELECT_CC_MODE): Use new function.
5143 (TARGET_FLAGS_REGNUM): New macro.
5144 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5145 (cc0_reg_rtx): Remove.
5146 (CC_STATUS_MDEP): Remove.
5147 (CC_STATUS_MDEFP_INIT): Remove.
5148 (CC_IN_FPU): Remove.
5149 (NOTICE_UPDATE_CC): Remove.
5150 (REGISTER_NAMES): Add CC registers.
5151 (BRANCH_COST): Change to constant 1.
5152 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5154 * config/pdp11/pdp11.opt (mbcopy): Remove.
5155 (mbcopy-builtin): Remove.
5156 (mbranch-cheap): Remove.
5157 (mbranch-expensive): Remove.
5158 * config/pdp11/predicates.md (expand_shift_operand): Update to
5159 match shift code generation.
5160 (ccnz_operator): New predicate.
5161 * doc/invoke.texi (PDP-11 Options): Remove deleted options
5162 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5163 Remove non-existent option -mabshi, -mno-abshi. Document mutually
5165 * doc/md.texi (PDP-11): Document new D and h constraints. Update
5166 description of O constraint.
5168 2018-06-27 Jeff Law <law@redhat.com>
5169 Austin Law <austinklaw@gmail.com>
5171 * config/v850/v850.md (addsi3_set_flags): New pattern.
5172 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5173 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5174 (zero_extendhisi2_v850_set_flags): Likewise.
5175 (zero_extendqisi2_v850_set_flags): Likewise.
5176 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5177 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5178 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5180 * config/v850/v850-protos.h (notice_update_cc): Remove.
5181 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5182 (v850_print_operand): Handle 'D' and "d".
5183 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5184 Add handling of arithmetic/logical operations compared against zero.
5185 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5186 Do not look at v850_compare_op, instead get mode from last argument.
5187 (v850_gen_compare): Remove
5188 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5189 after reload for prologue insns.
5190 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5192 (construct_save_jarl): Likewise.
5193 (TARGET_FLAGS_REGNUM): Define.
5194 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5195 (NOTICE_UPDATE_CC): Remove.
5196 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5197 than cc0. Conditionalize on reload_completed.
5198 (cmpsi_insn, setfcc_insn): Likewise.
5199 (tst1 splitter): Turn into define_and_split which sets the flags
5201 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5202 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5203 (cstoresf4, cstoredf4): Clobber the flags.
5204 (cmpsi, cmpsf, cmpdf): Remove expanders.
5205 (setf_insn): Remove pattern.
5206 (addsi3): Turn into define_and_split which clobbers the flags after
5207 reload and a suitable pattern (addsi3_clobber_flags) for use after
5209 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5210 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5211 (ashrsi3, ashrsi3_v850e2): Likewise.
5212 (bins): Clobber the flags.
5213 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5214 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5215 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5216 (call_value_internal_short, call_value_internal_long): Likewise.
5217 (callt_save_interrupt, callt_return_interrupt): Likewise.
5218 (save_interrupt, return_interrupt): Likewise.
5219 (callt_save_all_interrupt, save_all_interrupt): Likewise.
5220 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5221 (restore_all_interrupt, _restore_all_interrupt): Likewise.
5222 (All FP comparisons): Only allow after reload has completed.
5224 (divh, divhu): Tweak output template.
5225 (branch_z_normal, branch_z_invert): Remove
5226 (branch_nz_normal, branch_nz_invert): Likewise.
5227 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5229 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5230 * config/v850/v850.c (notice_update_cc): Remove.
5231 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
5232 (CC_NO_CARRY): Likewise.
5233 (NOTICE_UPDATE_CC): Define to nothing.
5234 * config/v850/v850.md: Remove block comment on cc0 handling
5235 Remove "cc" attribute from all patterns. Remove cc_status handling
5236 from all patterns. Minor formatting fixes.
5238 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5240 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5241 (cortex-a76.cortex-a55): Likewise.
5242 * config/aarch64/aarch64-tune.md: Regenerate.
5243 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5244 cortex-a76.cortex-a55.
5246 2018-06-27 Jeff Law <law@redhat.com>
5248 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5249 (MULTILIB_DIRNAMES): Similarly.
5251 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
5253 * gimple.h (gimple_return_retbnd): Delete.
5254 (gimple_return_set_retbnd): Likewise.
5255 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5256 gimple_return_set_retbnd.
5257 * gimple-pretty-print.c (dump_gimple_return): Remove call to
5258 gimple_return_retbnd and adjust.
5259 * tree-inline.h (struct copy_body_data): Remove retbnd field.
5260 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5261 Explicitly return NULL in a couple more cases. Move assertion
5262 on debug statements and remove unreachable code.
5263 (reset_debug_binding): Do not test id->retbnd.
5264 (expand_call_inline): Do not set it.
5266 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5268 * configure.ac: Add --disable-gcov option.
5269 * configure: Regenerate.
5270 * Makefile.in: Honour @enable_gcov@.
5271 * doc/install.texi: Document --disable-gcov.
5273 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5275 * config/arm/arm-cpus.in (cortex-a76): New entry.
5276 (cortex-a76.cortex-a55): Likewise.
5277 * config/arm/arm-tables.opt: Regenerate.
5278 * config/arm/arm-tune.md: Likewise.
5279 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5280 * doc/invoke.texi (ARM Options): Document cortex-a76 and
5281 cortex-a76.cortex-a55.
5283 2018-06-27 Tamar Christina <tamar.christina@arm.com>
5286 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5288 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
5290 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5292 (EPILOGUE_USES): Likewise.
5294 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
5296 * tree-inline.c (remap_location): New function extracted from...
5297 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
5298 (copy_phis_for_bb): ...here. Call remap_location.
5299 (copy_cfg_body): Adjust call to copy_edges_for_bb.
5301 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
5303 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5304 unaligned vsx for 16B memset.
5306 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
5309 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5310 ieee128_float_type_node to long_double_type_node unless
5311 TARGET_LONG_DOUBLE_128 is set.
5313 2018-06-26 David Malcolm <dmalcolm@redhat.com>
5315 * cfgloop.c (get_loop_location): Convert return type from
5316 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5317 by implicit construction from rtx_insn *, and using
5318 dump_user_location_t::from_function_decl for the fallback case.
5319 * cfgloop.h (get_loop_location): Convert return type from
5320 location_t to dump_user_location_t.
5321 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5322 dump_printf_loc to pass in a dump_location_t rather than a
5323 location_t, via the gimple stmt.
5324 * coverage.c (get_coverage_counts): Update calls to
5325 dump_printf_loc to pass in dump_location_t rather than a
5327 * doc/optinfo.texi (Dump types): Convert example of
5328 dump_printf_loc from taking "locus" to taking "insn". Update
5329 description of the "_loc" calls to cover dump_location_t.
5330 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5332 (dump_user_location_t::dump_user_location_t): New constructors,
5333 from gimple *stmt and rtx_insn *.
5334 (dump_user_location_t::from_function_decl): New function.
5335 (dump_loc): Make static.
5336 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5337 const dump_location_t &.
5338 (dump_generic_expr_loc): Delete.
5339 (dump_printf_loc): Convert param "loc" from location_t to
5340 const dump_location_t &.
5341 (selftest::test_impl_location): New function.
5342 (selftest::dumpfile_c_tests): New function.
5343 * dumpfile.h: Include "profile-count.h".
5344 (class dump_user_location_t): New class.
5345 (struct dump_impl_location_t): New struct.
5346 (class dump_location_t): New class.
5347 (dump_printf_loc): Convert 2nd param from source_location to
5348 const dump_location_t &.
5349 (dump_generic_expr_loc): Delete.
5350 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5351 const dump_location_t &.
5352 * gimple-fold.c (fold_gimple_assign): Update call to
5353 dump_printf_loc to pass in a dump_location_t rather than a
5354 location_t, via the gimple stmt.
5355 (gimple_fold_call): Likewise.
5356 * gimple-loop-interchange.cc
5357 (loop_cand::analyze_iloop_reduction_var): Update for change to
5358 check_reduction_path.
5359 (tree_loop_interchange::interchange): Update for change to
5361 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5362 change in return-type of find_loop_location.
5363 (graphite_regenerate_ast_isl): Likewise.
5364 * graphite-optimize-isl.c (optimize_isl): Likewise.
5365 * graphite.c (graphite_transform_loops): Likewise.
5366 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5367 pass in a dump_location_t rather than a location_t, via the
5369 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5370 * ipa.c (walk_polymorphic_call_targets): Likewise.
5371 * loop-unroll.c (report_unroll): Convert "locus" param from
5372 location_t to dump_location_t.
5373 (decide_unrolling): Update for change to get_loop_location's
5375 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5376 location_t to dump_user_location_t.
5377 (grid_find_single_omp_among_assignments_1): Updates calls to
5378 dump_printf_loc to pass in a dump_location_t rather than a
5379 location_t, via the gimple stmt.
5380 (grid_parallel_clauses_gridifiable): Convert "tloc" from
5381 location_t to dump_location_t. Updates calls to dump_printf_loc
5382 to pass in a dump_location_t rather than a location_t, via the
5384 (grid_inner_loop_gridifiable_p): Likewise.
5385 (grid_dist_follows_simple_pattern): Likewise.
5386 (grid_gfor_follows_tiling_pattern): Likewise.
5387 (grid_target_follows_gridifiable_pattern): Likewise.
5388 (grid_attempt_target_gridification): Convert initialization
5389 of local "grid" from memset to zero-initialization; FIXME: does
5390 this require C++11? Update call to dump_printf_loc to pass in a
5391 optinfo_location rather than a location_t, via the gimple stmt.
5392 * profile.c (read_profile_edge_counts): Updates call to
5393 dump_printf_loc to pass in a dump_location_t rather than a
5395 (compute_branch_probabilities): Likewise.
5396 * selftest-run-tests.c (selftest::run_tests): Call
5398 * selftest.h (dumpfile_c_tests): New decl.
5399 * tree-loop-distribution.c (pass_loop_distribution::execute):
5400 Update for change in return type of find_loop_location.
5401 * tree-parloops.c (parallelize_loops): Likewise.
5402 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5403 "locus" from location_t to dump_user_location_t.
5404 (canonicalize_loop_induction_variables): Likewise.
5405 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5406 for change in return type of find_loop_location.
5407 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5408 to dump_printf_loc to pass in a dump_location_t rather than a
5409 location_t, via the stmt.
5410 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5412 * tree-vect-loop-manip.c (find_loop_location): Convert return
5413 type from source_location to dump_user_location_t.
5414 (vect_do_peeling): Update for above change.
5415 (vect_loop_versioning): Update for change in type of
5417 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5418 from location_t to dump_user_location_t.
5419 (vect_estimate_min_profitable_iters): Update for change in type
5421 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5422 location_t to dump_location_t.
5423 (vect_slp_bb): Update for change in type of vect_location.
5424 * tree-vectorizer.c (vect_location): Convert from source_location
5425 to dump_user_location_t.
5426 (try_vectorize_loop_1): Update for change in vect_location's type.
5427 (vectorize_loops): Likewise.
5428 (increase_alignment): Likewise.
5429 * tree-vectorizer.h (vect_location): Convert from source_location
5430 to dump_user_location_t.
5431 (find_loop_location): Convert return type from source_location to
5432 dump_user_location_t.
5433 (check_reduction_path): Convert 1st param from location_t to
5434 dump_user_location_t.
5435 * value-prof.c (check_counter): Update call to dump_printf_loc to
5436 pass in a dump_user_location_t rather than a location_t; update
5437 call to error_at for change in type of "locus".
5438 (check_ic_target): Update call to dump_printf_loc to
5439 pass in a dump_user_location_t rather than a location_t, via the
5442 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
5444 * config/s390/s390.h (enum processor_flags): Do not use
5445 default tune parameter when -march was specified.
5447 2018-06-26 Jakub Jelinek <jakub@redhat.com>
5450 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5451 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5454 2018-06-26 Richard Biener <rguenther@suse.de>
5456 PR tree-optimization/86287
5458 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5459 (vect_analyze_loop): Initialize n_stmts.
5461 2018-06-26 Richard Biener <rguenther@suse.de>
5464 * fold-const.c (fold_convertible_p): Pointer extension
5467 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
5470 * dwarf2out.c (loc_list_has_views): Adjust comments.
5471 (dw_loc_list): Split single cross-partition range with
5474 2018-06-25 Jeff Law <law@redhat.com>
5476 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5477 on -mbig-switch by default.
5479 * config/v850/predicates.md (const_float_1_operand): Fix match_code
5481 (const_float_0_operand): Remove unused predicate.
5482 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5483 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5484 (recipsf2): New expander. Original pattern now called
5486 (recipdf2, recipdf2_insn): Similarly.
5487 (rsqrtsf2, rsqrtsf2_insn): Similarly
5488 (rsqrtdf2, rsqrtdf2_insn): Similarly
5490 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
5492 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5493 Simplify logic for FreeBSD (twice).
5495 2018-06-25 Martin Sebor <msebor@redhat.com>
5497 PR tree-optimization/86204
5498 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5499 a strnlen result if it's less than the length of the string.
5501 2018-06-25 Martin Sebor <msebor@redhat.com>
5503 PR tree-optimization/85700
5504 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5505 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5506 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5508 2018-06-25 Martin Sebor <msebor@redhat.com>
5510 * doc/extend.texi (Zero-length arrays): Update and clarify.
5512 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
5514 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5515 added IEEE/IBM long double multilib support on PowerPC little
5516 endian Linux systems.
5517 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5518 (MULTILIB_DEFAULTS): Likewise.
5519 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5521 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5522 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5523 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5525 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
5528 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5529 (REORDER_45): Likewise.
5531 2018-06-25 Jeff Law <law@redhat.com>
5533 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5534 dividend to 32 bits. Adjust length.
5535 (udivmodhi4): Cleanup output template. Fix length.
5537 2018-06-25 Carl Love <cel@us.ibm.com>
5539 * config/rs6000/vsx.md: Change word selector to prefered location.
5541 2018-06-25 Richard Biener <rguenther@suse.de>
5543 PR tree-optimization/86304
5544 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5545 epilogue-if-converted loops as well.
5547 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
5549 * lto-section-out.c (lto_begin_section): Do not print section
5550 name for noaddr and unnumbered dumps.
5552 2018-06-25 Richard Biener <rguenther@suse.de>
5554 * tree-vectorizer.h (struct vec_info_shared): New structure
5555 with parts split out from struct vec_info and loop_nest from
5556 struct _loop_vec_info.
5557 (struct vec_info): Adjust accordingly.
5558 (struct _loop_vec_info): Likewise.
5559 (LOOP_VINFO_LOOP_NEST): Adjust.
5560 (LOOP_VINFO_DATAREFS): Likewise.
5561 (LOOP_VINFO_DDRS): Likewise.
5562 (struct _bb_vec_info): Likewise.
5563 (BB_VINFO_DATAREFS): Likewise.
5564 (BB_VINFO_DDRS): Likewise.
5565 (struct _stmt_vec_info): Add dr_aux member.
5566 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5567 (DR_MISALIGNMENT_UNINITIALIZED): New.
5568 (set_dr_misalignment): Adjust.
5569 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5570 (vect_analyze_loop): Adjust prototype.
5571 (vect_analyze_loop_form): Likewise.
5572 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5573 Compute dependences lazily.
5574 (vect_record_base_alignments): Use shared datarefs/ddrs.
5575 (vect_verify_datarefs_alignment): Likewise.
5576 (vect_analyze_data_refs_alignment): Likewise.
5577 (vect_analyze_data_ref_accesses): Likewise.
5578 (vect_analyze_data_refs): Likewise.
5579 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5580 constructor parameter for shared part.
5581 (vect_analyze_loop_form): Pass in shared part and adjust.
5582 (vect_analyze_loop_2): Pass in storage for the number of
5583 stmts. Move loop nest finding to the caller. Compute
5585 (vect_analyze_loop): Pass in shared part.
5586 (vect_transform_loop): Verify shared datarefs are unchanged.
5587 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5588 constructor parameter for shared part.
5589 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5590 (vect_slp_bb): Verify shared datarefs are unchanged before
5592 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5594 (new_stmt_vec_info): Initialize DR_AUX misalignment to
5595 DR_MISALIGNMENT_UNINITIALIZED.
5596 * tree-vectorizer.c (vec_info::vec_info): Add constructor
5597 parameter for shared part.
5598 (vec_info::~vec_info): Adjust.
5599 (vec_info_shared::vec_info_shared): New.
5600 (vec_info_shared::~vec_info_shared): Likewise.
5601 (vec_info_shared::save_datarefs): Likewise.
5602 (vec_info_shared::check_datarefs): Likewise.
5603 (try_vectorize_loop_1): Construct shared part live for analyses
5604 of a single loop for multiple vector sizes.
5605 * tree-parloops.c (gather_scalar_reductions): Adjust.
5607 2018-06-25 Richard Biener <rguenther@suse.de>
5609 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5610 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5611 (vect_analyze_data_refs): Remove similar code from here and
5612 simplify accordingly.
5614 2018-06-25 Richard Biener <rguenther@suse.de>
5616 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5617 for reverse storage order accesses rather than asserting
5618 they cannot happen here.
5620 2018-06-25 Tom de Vries <tdevries@suse.de>
5623 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5624 Use data16 instead of .byte for insn prefix.
5626 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
5629 * parser.c (make_char_string_pack): Pass this literal chars
5630 through cpp_interpret_string.
5631 (cp_parser_userdef_numeric_literal): Check the result of
5632 make_char_string_pack.
5634 2018-06-24 Maya Rashish <coypu@sdf.org>
5636 * ginclude/stddef.h: Simplify conditions around avoiding
5637 re-definition of __size_t.
5639 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5641 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5642 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5644 2018-06-22 Maya Rashish <coypu@sdf.org>
5646 * doc/invoke.texi (mno-fancy-math-387): Update for changes
5647 made to OpenBSD and NetBSD through the years.
5649 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
5651 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5652 behavior of vec_pack (vector double, vector double) to match
5653 behavior of vec_float2 (vector double, vector double).
5655 2018-06-22 Olivier Hainque <hainque@adacore.com>
5657 * gimplify.c (gimplify_function_tree): Prevent creation
5658 of a trampoline for the address of the current function
5659 passed to entry/exit instrumentation hooks.
5661 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
5664 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5667 2018-06-22 Martin Liska <mliska@suse.cz>
5669 PR tree-optimization/86263
5670 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5671 Bail out if is_enabled is false.
5672 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5674 (jump_table_cluster::is_enabled): New function.
5676 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5678 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5679 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5680 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5681 (lto_input_ts_binfo_tree_pointers): Likewise.
5682 * tree-streamer-out.c (streamer_write_tree_bitfields,
5683 write_ts_binfo_tree_pointers): Likewise.
5684 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5686 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
5688 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5690 2018-06-22 Martin Liska <mliska@suse.cz>
5692 * symbol-summary.h (get): Make it pure and inline move
5693 functionality from ::get function.
5694 (get): Remove and inline into ::get and ::get_create.
5695 (get_create): Move code from ::get function.
5697 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5700 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5701 -x assembler-with-cpp.
5703 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5705 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5706 _FILE_OFFSET_BITS=64 for C++.
5708 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
5710 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5711 conversion insn that shows up when pr85657-3.c is compiled using
5712 IEEE 128-bit long double.
5713 (neg<mode>2_internal): Use the correct mode to check whether the
5714 mode is IBM extended.
5715 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5716 multiply and divide external functions from being created more
5719 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5721 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5723 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
5724 the edge can be forwarded.
5725 (cfg_layout_merge_blocks): Likewise.
5727 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5729 * except.c (finish_eh_generation): Commit edge insertions only after
5730 the EH edges have been redirected from post-landing to landing pads.
5732 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5734 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5735 create_tmp_var_for to create the FRAME decl.
5736 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5738 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
5740 * tree-inline.c (copy_edges_for_bb): Minor tweak.
5741 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5742 debug statement when resetting its value.
5743 (expand_call_inline): Copy the locus of the call onto the assignment
5744 of the return value, if any. Use local variable in more cases.
5746 2018-06-21 Martin Liska <mliska@suse.cz>
5748 * ipa-pure-const.c (propagate_nothrow): Use
5749 funct_state_summaries->get.
5750 (dump_malloc_lattice): Likewise.
5751 (propagate_malloc): Likewise.
5753 2018-06-21 Richard Biener <rguenther@suse.de>
5755 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5756 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5757 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5759 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5760 BLOCK_ABSTRACT_ORIGIN unconditionally.
5762 2018-06-21 David Malcolm <dmalcolm@redhat.com>
5764 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5766 * ipa-reference.c (ipa_reference_c_finalize): Delete
5767 ipa_ref_opt_sum_summaries and set it to NULL.
5769 2018-06-21 Tom de Vries <tdevries@suse.de>
5771 PR tree-optimization/85859
5772 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5773 test with comment from bb_no_side_effects_p.
5775 2018-06-21 Richard Biener <rguenther@suse.de>
5777 PR tree-optimization/86232
5778 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5779 max for constant niter.
5781 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5783 * config/aarch64/aarch64-simd.md
5784 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5786 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
5788 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5789 Make opernads of the unspec commutative.
5791 2018-06-21 Richard Biener <rguenther@suse.de>
5793 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5794 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5795 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5796 (vect_analyze_data_ref_dependence): Re-order checks to deal with
5798 (vect_record_base_alignments): Do not record base alignment
5799 for gathers or scatters.
5800 (vect_compute_data_ref_alignment): Drop return value that is always
5801 true. Bail out early for gathers or scatters.
5802 (vect_enhance_data_refs_alignment): Bail out early for gathers
5804 (vect_find_same_alignment_drs): Likewise.
5805 (vect_analyze_data_refs_alignment): Remove dead code.
5806 (vect_slp_analyze_and_verify_node_alignment): Likewise.
5807 (vect_analyze_data_refs): For possible gathers or scatters do
5808 not create an alternate DR, just check their possible validity
5809 and mark them. Adjust DECL_NONALIASED handling to not rely
5811 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5812 update inits of gathers or scatters.
5813 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5814 Also copy gather/scatter flag to pattern vinfo.
5816 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
5818 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5819 behavior of vec_packsu (vector unsigned long long, vector unsigned
5820 long long) to match behavior of vec_packs with same signature.
5822 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5823 Thomas Schwinge <thomas@codesourcery.com>
5824 Cesar Philippidis <cesar@codesourcery.com>
5826 * gimplify.c (gimplify_scan_omp_clauses): Add support for
5827 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5828 (gimplify_adjust_omp_clauses): Likewise.
5829 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5830 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5831 (gimplify_omp_target_update): Update handling of acc update and
5833 * omp-low.c (install_var_field): Remove unused parameter
5834 base_pointers_restrict.
5835 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5836 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5838 (omp_target_base_pointers_restrict_p): Delete.
5839 (scan_omp_target): Update call to scan_sharing_clauses.
5840 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5842 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5843 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5844 (convert_local_omp_clauses): Likewise.
5845 * tree-pretty-print.c (dump_omp_clause): Likewise.
5846 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
5848 (omp_clause_code_name): Likewise.
5850 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5853 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5856 PR tree-optimization/86231
5857 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
5858 anti-range don't overwrite *vr0min before using it to compute *vr0max.
5860 2018-06-20 Tom de Vries <tdevries@suse.de>
5862 PR tree-optimization/86097
5863 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5864 iv type if signedness of iv type is not the same as that of *nit.
5866 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5868 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
5869 EDGE_EH edges, verify they are all EDGE_EH.
5871 2018-06-20 Maya Rashish <coypu@sdf.org>
5873 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5875 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5877 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5878 * config/aarch64/aarch64.c (xgene1_tunings): Add
5879 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5880 (aarch64_mode_valid_for_sched_fusion_p):
5881 Allow 16-byte modes.
5882 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5883 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5885 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5887 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5888 * config/aarch64/iterators.md (VQ2): New mode iterator.
5890 2018-06-20 Martin Liska <mliska@suse.cz>
5892 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5893 Change default ratio from 10 to 8.
5895 2018-06-20 Martin Liska <mliska@suse.cz>
5897 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5899 (bit_test_cluster::find_bit_tests): Likewise.
5900 (switch_decision_tree::analyze_switch_statement): Find clusters.
5901 * tree-switch-conversion.h (struct jump_table_cluster): Document
5904 2018-06-20 Martin Liska <mliska@suse.cz>
5906 * tree-switch-conversion.c (switch_conversion::collect):
5907 Record m_uniq property.
5908 (switch_conversion::expand): Bail out for special conditions.
5909 (group_cluster::~group_cluster): New.
5910 (group_cluster::group_cluster): Likewise.
5911 (group_cluster::dump): Likewise.
5912 (jump_table_cluster::emit): New.
5913 (switch_decision_tree::fix_phi_operands_for_edges): New.
5914 (struct case_node): Remove struct.
5915 (jump_table_cluster::can_be_handled): New.
5916 (case_values_threshold): Moved to header.
5917 (reset_out_edges_aux): Likewise.
5918 (jump_table_cluster::is_beneficial): New.
5919 (bit_test_cluster::can_be_handled): Likewise.
5920 (add_case_node): Remove.
5921 (bit_test_cluster::is_beneficial): New.
5922 (case_bit_test::cmp): New.
5923 (bit_test_cluster::emit): New.
5924 (expand_switch_as_decision_tree_p): Remove.
5925 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5926 (fix_phi_operands_for_edge): Likewise.
5927 (switch_decision_tree::analyze_switch_statement): New.
5928 (compute_cases_per_edge): Move ...
5929 (switch_decision_tree::compute_cases_per_edge): ... here.
5930 (try_switch_expansion): Likewise.
5931 (switch_decision_tree::try_switch_expansion): Likewise.
5932 (record_phi_operand_mapping): Likewise.
5933 (switch_decision_tree::record_phi_operand_mapping): Likewise.
5934 (emit_case_decision_tree): Likewise.
5935 (switch_decision_tree::emit): Likewise.
5936 (balance_case_nodes): Likewise.
5937 (switch_decision_tree::balance_case_nodes): Likewise.
5938 (dump_case_nodes): Likewise.
5939 (switch_decision_tree::dump_case_nodes): Likewise.
5940 (emit_jump): Likewise.
5941 (switch_decision_tree::emit_jump): Likewise.
5942 (emit_cmp_and_jump_insns): Likewise.
5943 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5944 (emit_case_nodes): Likewise.
5945 (switch_decision_tree::emit_case_nodes): Likewise.
5946 (conditional_probability): Remove.
5947 * tree-switch-conversion.h (enum cluster_type): New.
5949 (struct cluster): Likewise.
5950 (cluster::cluster): Likewise.
5951 (struct simple_cluster): Likewise.
5952 (simple_cluster::simple_cluster): Likewise.
5953 (struct group_cluster): Likewise.
5954 (struct jump_table_cluster): Likewise.
5955 (struct bit_test_cluster): Likewise.
5956 (struct min_cluster_item): Likewise.
5957 (struct case_tree_node): Likewise.
5958 (case_tree_node::case_tree_node): Likewise.
5959 (jump_table_cluster::case_values_threshold): Likewise.
5960 (struct case_bit_test): Likewise.
5961 (struct switch_decision_tree): Likewise.
5962 (struct switch_conversion): Likewise.
5963 (switch_decision_tree::reset_out_edges_aux): Likewise.
5965 2018-06-20 Martin Liska <mliska@suse.cz>
5967 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5968 (hoist_edge_and_branch_if_true): Likewise.
5969 (expand_switch_using_bit_tests_p): Likewise.
5970 (struct case_bit_test): Likewise.
5971 (case_bit_test_cmp): Likewise.
5972 (emit_case_bit_tests): Likewise.
5973 (switch_conversion::switch_conversion): New class.
5974 (struct switch_conv_info): Remove old struct.
5975 (collect_switch_conv_info): More to ...
5976 (switch_conversion::collect): ... this.
5977 (check_range): Likewise.
5978 (switch_conversion::check_range): Likewise.
5979 (check_all_empty_except_final): Likewise.
5980 (switch_conversion::check_all_empty_except_final): Likewise.
5981 (check_final_bb): Likewise.
5982 (switch_conversion::check_final_bb): Likewise.
5983 (create_temp_arrays): Likewise.
5984 (switch_conversion::create_temp_arrays): Likewise.
5985 (free_temp_arrays): Likewise.
5986 (gather_default_values): Likewise.
5987 (switch_conversion::gather_default_values): Likewise.
5988 (build_constructors): Likewise.
5989 (switch_conversion::build_constructors): Likewise.
5990 (constructor_contains_same_values_p): Likewise.
5991 (switch_conversion::contains_same_values_p): Likewise.
5992 (array_value_type): Likewise.
5993 (switch_conversion::array_value_type): Likewise.
5994 (build_one_array): Likewise.
5995 (switch_conversion::build_one_array): Likewise.
5996 (build_arrays): Likewise.
5997 (switch_conversion::build_arrays): Likewise.
5998 (gen_def_assigns): Likewise.
5999 (switch_conversion::gen_def_assigns): Likewise.
6000 (prune_bbs): Likewise.
6001 (switch_conversion::prune_bbs): Likewise.
6002 (fix_phi_nodes): Likewise.
6003 (switch_conversion::fix_phi_nodes): Likewise.
6004 (gen_inbound_check): Likewise.
6005 (switch_conversion::gen_inbound_check): Likewise.
6006 (process_switch): Use the newly created class.
6007 (switch_conversion::expand): New.
6008 (switch_conversion::~switch_conversion): New.
6009 * tree-switch-conversion.h: New file.
6011 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6013 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6014 tree-vect-patterns.c.
6015 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6016 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
6017 (vect_recog_sad_pattern): Likewise.
6018 (vect_recog_widen_sum_pattern): Likewise.
6019 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
6020 (vect_recog_widen_shift_pattern): Remove the type_in argument.
6021 (vect_recog_rotate_pattern): Likewise.
6022 (vect_recog_mult_pattern): Likewise.
6023 (vect_recog_vector_vector_shift_pattern): Likewise.
6024 (vect_recog_divmod_pattern): Likewise.
6025 (vect_recog_mixed_size_cond_pattern): Likewise.
6026 (vect_recog_bool_pattern): Likewise.
6027 (vect_recog_mask_conversion_pattern): Likewise.
6028 (vect_try_gather_scatter_pattern): Likewise.
6029 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
6030 (vect_recog_over_widening_pattern): Likewise.
6031 (vect_recog_gather_scatter_pattern): Likewise.
6032 (vect_recog_func_ptr): Move from tree-vectorizer.h
6033 (vect_vect_recog_func_ptrs): Move further down the file.
6034 (vect_recog_func): Likewise. Remove the third argument.
6035 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6036 (vect_pattern_recog_1): Expect the pattern function to do any
6037 necessary target tests. Also expect it to provide a vector type.
6038 Remove the type_in handling.
6040 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6042 * tree-vect-patterns.c (vect_pattern_detected): New function.
6043 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6044 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6045 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6046 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6047 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6048 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6049 (vect_recog_mask_conversion_pattern)
6050 (vect_try_gather_scatter_pattern): Likewise.
6052 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6054 * tree-vect-patterns.c (vect_get_internal_def): New function.
6055 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6056 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6057 (search_type_for_mask_1): Use it.
6059 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6061 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6062 redundant WIDEN_SUM_EXPR handling.
6063 (vect_recog_sad_pattern): Likewise.
6065 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6067 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6068 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6069 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6070 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6071 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6073 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6075 * tree-vect-stmts.c (vectorizable_call): Make sure that we
6076 use the stmt_vec_info of the original bb statement for the
6077 new zero assignment, even if the call is part of a pattern.
6079 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6081 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6082 that the sequence is attached to the original statement rather
6083 than the pattern statement.
6084 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6085 PATTERN_DEF_SEQ from the original statement rather than
6086 the main pattern statement.
6087 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6088 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6089 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6091 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6093 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6094 definition statements before the early exit for statements that aren't
6096 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6098 (vect_transform_loop): ...here. Process pattern definition
6099 statements without first checking whether the main pattern
6100 statement is live or relevant.
6102 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6104 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6105 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6107 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
6109 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6110 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6111 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6112 (expand_block_compare): Change select_block_compare_mode call.
6113 (expand_strncmp_align_check): Use new functions, fix comment.
6114 (emit_final_str_compare_gpr): New function.
6115 (expand_strn_compare): Refactor and clean up code.
6116 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6118 2018-06-19 Tony Reix <tony.reix@atos.com>
6119 Damien Bergamini <damien.bergamini@atos.com>
6120 David Edelsohn <dje.gcc@gmail.com>
6122 * collect2.c (static_obj): New variable.
6123 (static_libs): New variable.
6124 (is_in_list): Uncomment declaration.
6125 (main): Track AIX libraries linked statically.
6126 (is_in_list): Uncomment definition.
6127 (scan_prog_file): Don't add AIX shared libraries initializer
6128 to constructor list if linking statically.
6130 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
6132 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6134 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6136 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
6138 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6141 2018-06-19 Martin Liska <mliska@suse.cz>
6143 * config/i386/i386.c (ix86_can_inline_p): Do not use
6144 ipa_fn_summaries::get_create.
6145 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6147 (devirtualization_time_bonus): Likewise.
6148 (ipcp_propagate_stage): Likewise.
6149 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6150 (edge_set_predicate): Likewise.
6151 (evaluate_conditions_for_known_args): Likewise.
6152 (evaluate_properties_for_edge): Likewise.
6153 (ipa_call_summary::reset): Tranform to ...
6154 (ipa_call_summary::~ipa_call_summary): ... this.
6155 (ipa_fn_summary::reset): Transform to ...
6156 (ipa_fn_summary::~ipa_fn_summary): ... this.
6157 (ipa_fn_summary_t::remove): Rename to ...
6158 (ipa_fn_summary_t::remove_callees): ... this.
6159 (ipa_fn_summary_t::duplicate): Use placement new
6160 instead of memory copy.
6161 (ipa_call_summary_t::duplicate): Likewise.
6162 (ipa_call_summary_t::remove): Remove.
6163 (dump_ipa_call_summary): Change get_create to get.
6164 (ipa_dump_fn_summary): Dump only when summary exists.
6165 (analyze_function_body): Use symbol_summary::get instead
6167 (compute_fn_summary): Likewise.
6168 (estimate_edge_devirt_benefit): Likewise.
6169 (estimate_edge_size_and_time): Likewise.
6170 (inline_update_callee_summaries): Likewise.
6171 (remap_edge_change_prob): Likewise.
6172 (remap_edge_summaries): Likewise.
6173 (ipa_merge_fn_summary_after_inlining): Likewise.
6174 (write_ipa_call_summary): Likewise.
6175 (ipa_fn_summary_write): Likewise.
6176 (ipa_free_fn_summary): Likewise.
6177 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6178 (struct ipa_call_summary): Likewise.
6179 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6181 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6182 (estimate_size_after_inlining): Likewise.
6183 (estimate_growth): Likewise.
6184 (growth_likely_positive): Likewise.
6185 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6186 (inline_call): Likewise.
6187 * ipa-inline.c (caller_growth_limits): Likewise.
6188 (can_inline_edge_p): Likewise.
6189 (can_inline_edge_by_limits_p): Likewise.
6190 (compute_uninlined_call_time): Likewise.
6191 (compute_inlined_call_time): Likewise.
6192 (want_inline_small_function_p): Likewise.
6193 (edge_badness): Likewise.
6194 (update_caller_keys): Likewise.
6195 (update_callee_keys): Likewise.
6196 (inline_small_functions): Likewise.
6197 (inline_to_all_callers_1): Likewise.
6198 (dump_overall_stats): Likewise.
6199 (early_inline_small_functions): Likewise.
6200 (early_inliner): Likewise.
6201 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6202 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6203 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6204 * ipa-split.c (execute_split_functions): Likewise.
6205 * symbol-summary.h: Likewise.
6206 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6208 2018-06-19 Richard Biener <rguenther@suse.de>
6210 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6211 (vectorize_loops): ... here. Fix dbgcnt handling.
6212 (try_vectorize_loop): Wrap try_vectorize_loop_1.
6214 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
6217 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6218 ieee128 argument takes up only one (vector) register, not two (floating
6221 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6223 * gimplify.c (gimplify_init_constructor): Really never clear for an
6224 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6226 2018-06-19 Richard Biener <rguenther@suse.de>
6228 PR tree-optimization/86179
6229 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6230 after failed recognition.
6232 2018-06-18 Martin Sebor <msebor@redhat.com>
6235 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6236 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6237 Handle integer subtraction.
6238 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6239 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6241 2018-06-18 David Malcolm <dmalcolm@redhat.com>
6243 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6244 param from rtx to rtx_insn *.
6245 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6247 (frv_ifcvt_modify_insn): Likwise.
6248 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6249 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
6250 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6251 as_a <rtx_insn *> cast to local "unprotected_region" once
6252 it's been established that it's not NULL or pc_rtx.
6253 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6254 param "sethi" from rtx to rtx_insn *.
6255 (nds32_group_float_insns): Likewise for param "insn".
6256 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6258 (vax_output_int_subtract): Likewise.
6259 * config/vax/vax.c (vax_output_int_add): Likewise for param
6261 (vax_output_int_subtract): Likewise.
6262 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6263 (emit_pattern_after): Likewise for param "after".
6264 (emit_insn_after): Likewise.
6265 (emit_jump_insn_after): Likewise.
6266 (emit_call_insn_after): Likewise.
6267 (emit_debug_insn_after): Likewise.
6268 (emit_pattern_before): Likewise for param "before".
6269 (emit_insn_before): Likewise.
6270 (emit_jump_insn_before): Likewise.
6271 * final.c (get_insn_template): Likewise for param "insn", removing
6273 * output.h (get_insn_template): Likewise for 2nd param.
6274 * rtl.h (emit_insn_before): Likewise.
6275 (emit_jump_insn_before): Likewise.
6276 (emit_debug_insn_before_noloc): Likewise.
6277 (emit_insn_after): Likewise.
6278 (emit_jump_insn_after): Likewise.
6279 (emit_call_insn_after): Likewise.
6280 (emit_debug_insn_after): Likewise.
6281 (set_insn_deleted): Likewise for param.
6283 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
6286 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6287 floating point modes, so that IFmode is numerically greater than
6288 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6289 to declare the ordering. This prevents IFmode from being
6290 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6291 machine. Include rs6000-modes.h to share the fractional values
6292 between genmodes* and the rest of the compiler.
6296 * config/rs6000/rs6000-modes.h: New file.
6297 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6298 meaning of rs6000_long_double_size so that 126..128 selects an
6299 appropriate 128-bit floating point type.
6300 (rs6000_option_override_internal): Likewise.
6301 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6302 (TARGET_LONG_DOUBLE_128): Change the meaning of
6303 rs6000_long_double_size so that 126..128 selects an appropriate
6304 128-bit floating point type.
6305 (LONG_DOUBLE_TYPE_SIZE): Update comment.
6306 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6307 source and destination to match the standard usage.
6308 (truncifkf2): Likewise.
6309 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6310 ISA 2.07 to use an explicit clobber, instead of passing in a
6312 (copysign<mode>3_soft): Likewise.
6314 2018-06-18 David Malcolm <dmalcolm@redhat.com>
6316 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6317 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6318 (vect_slp_analyze_instance_dependence): Likewise.
6319 (vect_enhance_data_refs_alignment): Likewise.
6320 (vect_analyze_data_refs_alignment): Likewise.
6321 (vect_slp_analyze_and_verify_instance_alignment
6322 (vect_analyze_data_ref_accesses): Likewise.
6323 (vect_prune_runtime_alias_test_list): Likewise.
6324 (vect_analyze_data_refs): Likewise.
6325 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6326 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6327 (vect_analyze_scalar_cycles_1): Likewise.
6328 (vect_get_loop_niters): Likewise.
6329 (vect_analyze_loop_form_1): Likewise.
6330 (vect_update_vf_for_slp): Likewise.
6331 (vect_analyze_loop_operations): Likewise.
6332 (vect_analyze_loop): Likewise.
6333 (vectorizable_induction): Likewise.
6334 (vect_transform_loop): Likewise.
6335 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6336 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6337 (vect_make_slp_decision): Likewise.
6338 (vect_detect_hybrid_slp): Likewise.
6339 (vect_slp_analyze_operations): Likewise.
6340 (vect_slp_bb): Likewise.
6341 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6342 (vectorizable_bswap): Likewise.
6343 (vectorizable_call): Likewise.
6344 (vectorizable_simd_clone_call): Likewise.
6345 (vectorizable_conversion): Likewise.
6346 (vectorizable_assignment): Likewise.
6347 (vectorizable_shift): Likewise.
6348 (vectorizable_operation): Likewise.
6349 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6351 2018-06-18 Martin Sebor <msebor@redhat.com>
6353 PR tree-optimization/81384
6354 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6355 * builtins.c (expand_builtin_strnlen): New function.
6356 (expand_builtin): Call it.
6357 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6358 * builtins.def (BUILT_IN_STRNLEN): New.
6359 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6360 Warn for bounds in excess of maximum object size.
6361 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6362 single-value ranges. Handle strnlen.
6363 (handle_builtin_strlen): Handle strnlen.
6364 (strlen_check_and_optimize_stmt): Same.
6365 * doc/extend.texi (Other Builtins): Document strnlen.
6367 2018-06-18 Maya Rashish <coypu@sdf.org>
6369 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6370 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6371 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6373 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6375 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6377 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6379 * tree.c (escaped_string::escape): Replace cast to char * by
6380 const_cast<char *> (unescaped).
6382 2018-06-18 Nick Clifton <nickc@redhat.com>
6385 * tree.c (escaped_string): New class. Converts an unescaped
6386 string into its escaped equivalent.
6387 (warn_deprecated_use): Use the new class to convert the
6388 deprecation message, if present.
6389 (test_escaped_strings): New self test.
6390 (test_c_tests): Add test_escaped_strings.
6391 * doc/extend.texi (deprecated): Add a note that the
6392 deprecation message is affected by the -fmessage-length
6393 option, and that control characters will be escaped.
6394 (#pragma GCC error): Document this pragma.
6395 (#pragma GCC warning): Likewise.
6396 * doc/invoke.texi (-fmessage-length): Document this option's
6397 effect on the #warning and #error preprocessor directives and
6398 the deprecated attribute.
6400 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
6402 * tree.c (decl_value_expr_lookup): Revert latest change.
6403 (decl_value_expr_insert): Likewise.
6405 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
6407 * gimplify.c (nonlocal_vlas): Delete.
6408 (nonlocal_vla_vars): Likewise.
6409 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6411 (gimplify_body): Do not create and destroy nonlocal_vlas.
6412 * tree-nested.c: Include diagnostic.h.
6413 (use_pointer_in_frame): Tweak.
6414 (lookup_field_for_decl): Add assertion and declare the transformation.
6415 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6416 internal error when the reference is in a wrong context. Do not
6417 create a debug decl by default.
6418 (note_nonlocal_block_vlas): Delete.
6419 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6420 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
6421 create a debug decl by default.
6422 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6423 call is in a wrong context.
6424 (fixup_vla_decls): New function.
6425 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
6426 debug variables were created.
6427 * tree.c (decl_value_expr_lookup): Add checking assertion.
6428 (decl_value_expr_insert): Likewise.
6430 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
6433 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6434 * tree-scalar-evolution.c (interpret_expr): Likewise.
6435 (expression_expensive_p): Likewise.
6436 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6437 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6438 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6439 (ssa_defined_by_minus_one_stmt_p): New.
6441 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
6444 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6445 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6446 * dojump.c (do_jump): Likewise.
6447 * expr.c (expand_expr_real_2): Check operand type's sign.
6448 * fold-const.c (const_unop): Handle ABSU_EXPR.
6449 (fold_abs_const): Likewise.
6450 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6451 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6452 (strip_sign_op_1): Likesise.
6453 * match.pd: Add new pattern to generate ABSU_EXPR.
6454 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6455 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6456 * tree-eh.c (operation_could_trap_helper_p): Likewise.
6457 * tree-inline.c (estimate_operator_cost): Likewise.
6458 * tree-pretty-print.c (dump_generic_node): Likewise.
6459 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6460 * tree.def (ABSU_EXPR): New.
6462 2018-06-16 Jakub Jelinek <jakub@redhat.com>
6465 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6466 documented as preserved for backward compatibility only.
6467 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6469 PR rtl-optimization/86108
6470 * bb-reorder.c (create_forwarder_block): Renamed to ...
6471 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
6472 jump from new landing pad to the second part.
6473 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6476 2018-06-15 Jakub Jelinek <jakub@redhat.com>
6479 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6480 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6481 Only call store_expr for halves if the mode is the same.
6484 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6485 Fix up comment formatting.
6487 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
6489 * typed-splay-tree.h (typed_splay_tree::remove): New function.
6490 (typed_splay_tree::closure,
6491 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6492 (typed_splay_tree::typed_splay_tree,
6493 typed_splay_tree::operator =): Declared private.
6494 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6495 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6496 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6497 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6498 typed_splay_tree::splay_tree_splay,
6499 typed_splay_tree::splay_tree_foreach_helper,
6500 typed_splay_tree::splay_tree_insert,
6501 typed_splay_tree::splay_tree_remove,
6502 typed_splay_tree::splay_tree_lookup,
6503 typed_splay_tree::splay_tree_predecessor,
6504 typed_splay_tree::splay_tree_successor,
6505 typed_splay_tree::splay_tree_min,
6506 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6507 (typed_splay_tree::root, typed_splay_tree::comp,
6508 typed_splay_tree::delete_key,
6509 typed_splay_tree::delete_value): New data members.
6510 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6511 typed_splay_tree::remove.
6513 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
6515 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6516 -mginv and -mno-ginv to the assembler.
6517 * config/mips/mips.opt (-mcrc): New option.
6519 * doc/invoke.text (-mcrc): Document.
6522 2018-06-15 Nick Clifton <nickc@redhat.com>
6525 * tree.c (escaped_string): New class. Converts an unescaped
6526 string into its escaped equivalent.
6527 (warn_deprecated_use): Use the new class to convert the
6528 deprecation message, if present.
6529 (test_escaped_strings): New self test.
6530 (test_c_tests): Add test_escaped_strings.
6531 * doc/extend.texi (deprecated): Add a note that the
6532 deprecation message is affected by the -fmessage-length
6533 option, and that control characters will be escaped.
6534 (#pragma GCC error): Document this pragma.
6535 (#pragma GCC warning): Likewise.
6536 * doc/invoke.texi (-fmessage-length): Document this option's
6537 effect on the #warning and #error preprocessor directives and
6538 the deprecated attribute.
6540 2018-06-15 Richard Biener <rguenther@suse.de>
6542 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6543 here, also noting vector size used.
6544 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
6545 size used in MSG_OPTIMIZED_LOCATIONS dump.
6546 (pass_slp_vectorize::execute): Adjust.
6548 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
6551 * config/arc/arc.c (arc_return_address_register): Fix
6554 2018-06-15 Richard Biener <rguenther@suse.de>
6557 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6558 leave useless conversion stripping to force_gimple_operand_gsi.
6559 (gimplify_build2): Likewise.
6560 (gimplify_build1): Likewise.
6562 2018-06-15 Richard Biener <rguenther@suse.de>
6565 * tree-cfg.c (move_stmt_op): unshare invariant addresses
6566 before adjusting their block.
6568 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
6570 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6571 multilibs for *-*-rtems*.
6572 * config/riscv/t-rtems: New file.
6574 2018-06-14 Jakub Jelinek <jakub@redhat.com>
6577 * match.pd ((A +- CST1) +- CST2): Punt if last resort
6578 unsigned_type_for returns NULL.
6581 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6582 subregs of multi-word pseudos unless the float mode has word size.
6584 2018-06-14 Richard Biener <rguenther@suse.de>
6587 * tree-vect-generic.c (build_word_mode_vector_type): Remove
6588 duplicate and harmful type_hash_canon.
6589 * tree.c (type_hash_canon): Assert we didn't find ourselves.
6591 2018-06-14 Richard Biener <rguenther@suse.de>
6594 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6597 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
6599 * config/rtems.h (STDINT_LONG32): Define.
6601 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
6602 Prachi Godbole <prachi.godbole@imgtec.com>
6604 * config/mips/mips-cpus.def: Define P6600.
6605 * config/mips/mips-tables.opt: Regenerate.
6606 * config/mips/mips.c (mips_ucbranch_type): New enum.
6607 (mips_rtx_cost_data): Add support for P6600.
6608 (mips_issue_rate): Likewise.
6609 (mips_multipass_dfa_lookahead): Likewise.
6610 (mips_avoid_hazard): Likewise.
6611 (mips_reorg_process_insns): Likewise.
6612 (mips_classify_branch_p6600): New function.
6613 * config/mips/mips.h (TUNE_P6600): New define.
6614 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6615 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6616 * config/mips/mips.md: Include p6600.md.
6617 (processor): Add p6600.
6618 * config/mips/p6600.md: New file.
6619 * doc/invoke.texi: Add p6600 to supported architectures.
6621 2018-06-13 Martin Sebor <msebor@redhat.com>
6623 PR tree-optimization/86114
6624 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6626 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6628 2018-06-13 Richard Biener <rguenther@suse.de>
6630 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6631 Properly set vector type of the intermediate stmt.
6632 * tree-vect-stmts.c (vectorizable_operation): The destination
6633 var always has vectype_out type.
6635 2018-06-13 Jeff Law <law@redhat.com>
6637 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6638 integer 0 for argument to print_rtl_with_bb.
6639 (rl78_reorg): Likewise.
6641 2018-06-13 David Malcolm <dmalcolm@redhat.com>
6643 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6644 from rtx to rtx_insn *.
6645 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6647 (add_sched_insns_for_speculation): Likewise for local "target",
6648 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6649 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6650 from rtx_insn ** to rtx_code_label **.
6651 (reorg_emit_nops): Likewise.
6652 (c6x_reorg): Likewise for local "call_labels".
6653 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6655 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6656 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6657 the loops over LABEL_REFS.
6658 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6660 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6661 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6662 (split_branches): Strengthen local "olabel" from rtx to
6663 rtx_insn *, adding a safe_as_a cast.
6664 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6666 (add_insn_after): Likewise for first two params.
6667 (add_insn_before): Likewise.
6668 (remove_insn): Likewise for param.
6669 (emit_pattern_before_noloc): Likewise for second and third params.
6670 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6671 (emit_call_insn_before_noloc): Likewise.
6672 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6674 (emit_barrier_before): Likewise.
6675 (emit_label_before): Strengthen "label" param from "rtx" to
6676 "rtx_code_label *". Strengthen "before" param from "rtx" to
6678 (emit_insn_after_1): Strengthen "after" param from "rtx" to
6680 (emit_pattern_after_noloc): Likewise.
6681 (emit_insn_after_noloc): Likewise.
6682 (emit_jump_insn_after_noloc): Likewise.
6683 (emit_call_insn_after_noloc): Likewise.
6684 (emit_debug_insn_after_noloc): Likewise.
6685 (emit_barrier_after): Likewise.
6686 (emit_label_after): Likewise for both params.
6687 (emit_pattern_after_setloc): Likewise for "after" param. Convert
6688 "loc" param from "int" to "location_t".
6689 (emit_insn_after_setloc): Likewise.
6690 (emit_jump_insn_after_setloc): Likewise.
6691 (emit_call_insn_after_setloc): Likewise.
6692 (emit_debug_insn_after_setloc): Likewise.
6693 (emit_pattern_before_setloc): Likewise for "before" param. Convert
6694 "loc" param from "int" to "location_t".
6695 (emit_pattern_before): Convert NULL_RTX to NULL.
6696 (emit_insn_before_setloc): Convert "loc" param from "int" to
6698 (emit_jump_insn_before_setloc): Likewise.
6699 (emit_call_insn_before_setloc): Likewise.
6700 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6701 rtx_insn *. Convert "loc" param from "int" to "location_t".
6702 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6703 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6704 Convert 3rd param from "int" to "location_t".
6705 (emit_barrier_before, emit_barrier_after, next_real_insn):
6706 Strengthen param from rtx to rtx_insn *.
6707 (emit_label_before): Strengthen 1st param from "rtx" to
6708 "rtx_code_label *". Strengthen 2nd param from "rtx" to
6710 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6711 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6712 Strengthen 2nd param from "rtx" to "rtx_insn *".
6713 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6714 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6715 Likewise. Convert 3rd param from "int" to "location_t".
6716 (emit_label_after): Strengthen 1st param from "rtx" to
6718 (next_real_insn, remove_insn): Strengthen param from "rtx" to
6720 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6721 from "rtx" to "rtx_insn *".
6723 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
6725 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6726 bodies streamed in with -Q.
6727 * dumpfile.c (dump_files): Add lto-stream-out dump file.
6728 * dumpfile.h (tree_dump_index): Add lto_stream_out.
6729 * gimple-streamer-out.c: Include gimple-pretty-print.h
6730 (output_bb): Dump stmts streamed.
6731 * lto-section-out.c: Include print-tree.h
6732 (lto_begin_section): Dump sections created.
6733 (lto_output_decl_index): Dump decl encoded.
6734 * lto-streamer-out.c: Include print-tree.h
6735 (create_output_block): Dump output block created.
6736 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6737 (output_function): Dump function output.
6738 (output_constructor): Dump constructor streamed.
6739 (write_global_stream): Output indexes encoded.
6740 (produce_asm_for_decls): Dump streams encoded.
6741 * lto-streamer.c (streamer_dump_file): New global var.
6742 * lto-streamer.h (streamer_dump_file): Declare.
6743 * passes.c (ipa_write_summaries): Initialize streamer dump.
6744 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6747 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
6750 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6751 offsets for register save directives. Emit a second batch of save
6752 directives, if need be, when the function accesses prior frames.
6754 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6756 * config/arc/fpu.md (fmasf4): Force operand to register.
6757 (fnmasf4): Likewise.
6759 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6761 * config/arc/arc-protos.h (arc_pad_return): Remove.
6762 * config/arc/arc.c (machine_function): Remove force_short_suffix
6764 (arc_print_operand): Adjust printing of '&'.
6765 (arc_verify_short): Remove conditional printing of short suffix.
6766 (arc_final_prescan_insn): Remove reference to size_reason.
6767 (pad_return): New function.
6768 (arc_reorg): Call pad_return.
6769 (arc_pad_return): Remove.
6770 (arc_init_machine_status): Remove reference to force_short_suffix.
6771 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6772 (attr length): When attribute iscompact is true force to 2
6773 regardless; in the case of maybe check if we want to force the
6774 instruction to have 4 bytes length.
6775 (nopv): Change it to generate 4 byte long nop as well.
6776 (blockage): New pattern.
6777 (simple_return): Remove call to arc_pad_return.
6778 (p_return_i): Likewise.
6780 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6782 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6784 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6786 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6789 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6791 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6792 for ARC700 and ARCv2.
6794 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
6797 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6798 operands[2] instead of operands[1].
6801 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6803 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6804 case, check whether the outer register overlaps an unallocatable
6805 register, not just whether it fits the required class.
6807 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
6809 * poly-int.h (can_div_trunc_p): Add new overload in which all values
6811 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6812 (memrefs_conflict_p): Likewise.
6813 (init_alias_analysis): Likewise.
6814 * cfgexpand.c (expand_debug_expr): Likewise.
6815 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6816 * cse.c (fold_rtx): Likewise.
6817 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6818 * expr.c (emit_block_move_hints): Likewise.
6819 (clear_storage_hints, push_block, emit_push_insn): Likewise.
6820 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6821 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6822 (emit_group_store): Likewise.
6823 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
6824 to read the PRE/POST_MODIFY increment.
6825 * calls.c (store_one_arg): Use strip_offset.
6826 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6828 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6830 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6831 (simplify_binary_operation_1): Extend CONST_INT handling to
6833 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6834 than a HOST_WIDE_INT.
6835 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6837 (adjust_mems, add_stores): Update accodingly.
6838 (vt_canonicalize_addr): Track polynomial offsets.
6839 (emit_note_insn_var_location): Likewise.
6840 (vt_add_function_parameter): Likewise.
6841 (vt_initialize): Likewise.
6843 2018-06-12 Jeff Law <law@redhat.com>
6845 * config.gcc (alpha*-*-freebsd*): Remove.
6846 * config/alpha/freebsd.h: Remove.
6848 2018-06-12 David Malcolm <dmalcolm@redhat.com>
6851 * spellcheck-tree.c (levenshtein_distance): Rename to...
6852 (get_edit_distance): ...this, and update for underlying renaming.
6853 * spellcheck-tree.h (levenshtein_distance): Rename to...
6854 (get_edit_distance): ...this.
6855 * spellcheck.c (levenshtein_distance): Rename to...
6856 (get_edit_distance): ...this. Convert from Levenshtein distance
6857 to Damerau-Levenshtein distance by supporting transpositions of
6858 adjacent characters. Rename "v1" to "v_next" and "v0" to
6860 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6861 (selftest::test_edit_distance_unit_test_oneway): ...this, and
6862 update for underlying renaming.
6863 (selftest::levenshtein_distance_unit_test): Rename to...
6864 (selftest::test_get_edit_distance_unit): ...this, and update for
6865 underlying renaming.
6866 (selftest::test_find_closest_string): Add example from PR 69968
6867 where transposition helps
6868 (selftest::test_metric_conditions): Update for renaming.
6869 (selftest::test_metric_conditions): Likewise.
6870 (selftest::spellcheck_c_tests): Likewise.
6871 * spellcheck.h (levenshtein_distance): Rename both overloads to...
6872 (get_edit_distance): ...this.
6873 (best_match::consider): Update for renaming.
6875 2018-06-12 Martin Sebor <msebor@redhat.com>
6877 PR tree-optimization/85259
6878 * builtins.c (compute_objsize): Handle constant offsets.
6879 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6880 true iff a warning has been issued.
6881 * gimple.h (gimple_nonartificial_location): New function.
6882 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6883 gimple_nonartificial_location and handle -Wno-system-headers.
6884 (handle_builtin_stxncpy): Same.
6886 2018-06-12 Martin Sebor <msebor@redhat.com>
6889 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6891 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
6893 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6894 BUILTIN_VEC_XST entries for pointer to double and long long.
6896 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
6899 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6901 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6904 2018-06-12 Martin Liska <mliska@suse.cz>
6906 * doc/options.texi: Document IntegerRange.
6908 2018-06-12 Martin Liska <mliska@suse.cz>
6910 * config/i386/i386.opt: Make MPX-related options as Deprecated.
6911 * opt-functions.awk: Handle Deprecated flag.
6912 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6914 (read_cmdline_option): Report warning for a deprecated option.
6915 * opts.h (struct cl_option): Add new field cl_deprecated.
6916 (CL_ERR_DEPRECATED): New.
6918 2018-06-12 Martin Liska <mliska@suse.cz>
6920 * doc/options.texi: Document Deprecated option flag.
6922 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6924 * config/arc/arc-arch.h (arc_extras): New enum.
6925 (arc_cpu_t):Add field extra.
6926 (arc_cpu_types): Consider the extras.
6927 * config/arc/arc-cpus.def: Add extras info.
6928 * config/arc/arc-opts.h (processor_type): Consider extra field.
6929 * config/arc/arc.c (arc_override_options): Handle extra field.
6931 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6933 * config/arc/arc-arch.h: Update ARC_OPTX macro.
6934 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6936 * config/arc/arc.c (arc_init): Update pic warning.
6937 (irq_range): Update irq range parsing warnings.
6938 (arc_override_options): Update various warning messages.
6939 (arc_handle_aux_attribute): Likewise.
6941 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
6943 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6945 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6947 * doc/sourcebuild.texi: Document usage of line number 0 in verify
6948 compiler messages directives.
6950 2018-06-12 Matthew Fortune <mfortune@gmail.com>
6952 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6953 * config/mips/mips-tables.opt: Regenerate.
6954 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6956 * doc/invoke.texi: Document -march=i6500.
6958 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
6960 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6961 (i6400_gpmul): Add cpu_unit.
6962 (i6400_gpdiv): Likewise.
6963 (i6400_msa_add_d): Update reservations.
6964 (i6400_msa_int_add) Likewise.
6965 (i6400_msa_short_logic3) Likewise.
6966 (i6400_msa_short_logic2) Likewise.
6967 (i6400_msa_short_logic) Likewise.
6968 (i6400_msa_move) Likewise.
6969 (i6400_msa_cmp) Likewise.
6970 (i6400_msa_short_float2) Likewise.
6971 (i6400_msa_div_d) Likewise.
6972 (i6400_msa_long_logic1) Likewise.
6973 (i6400_msa_long_logic2) Likewise.
6974 (i6400_msa_mult) Likewise.
6975 (i6400_msa_long_float2) Likewise.
6976 (i6400_msa_long_float4) Likewise.
6977 (i6400_msa_long_float5) Likewise.
6978 (i6400_msa_long_float8) Likewise.
6979 (i6400_fpu_fadd): Include frint type.
6980 (i6400_fpu_store): New define_insn_reservation.
6981 (i6400_fpu_load): Likewise.
6982 (i6400_fpu_move): Likewise.
6983 (i6400_fpu_fcmp): Likewise.
6984 (i6400_fpu_fmadd): Likewise.
6985 (i6400_int_mult): Include imul3nc type and update reservation.
6986 (i6400_int_div): Include idiv3 type and update reservation.
6987 (i6400_int_load): Update to check type not move_type.
6988 (i6400_int_store): Likewise.
6989 (i6400_int_prefetch): Set zero latency.
6991 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6993 * gcc.c: Document new %@{...} sequence.
6994 (LINK_COMMAND_SPEC): Use it for the -L switches.
6995 (cpp_unique_options): Use it for the -I switches.
6996 (at_file_argbuf): New global variable.
6997 (in_at_file): Likewise.
6998 (alloc_args): Create at_file_argbuf.
6999 (clear_args): Truncate at_file_argbuf.
7000 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7001 (open_at_file): New function.
7002 (close_at_file): Likewise.
7003 (create_at_file): Delete.
7004 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7007 (validate_switches_from_spec): Deal with %@{...} sequence.
7008 (validate_switches): Likewise.
7009 (driver::finalize): Call clear_args.
7011 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
7013 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7015 2018-06-11 Martin Sebor <msebor@redhat.com>
7017 * doc/invoke.texi (-Wall): List -Wc++17-compat.
7018 (Wno-class-memaccess): Add @opindex.
7019 (Wno-templates, Wno-multiple-inheritance): Same.
7020 (Wno-virtual-inheritance, Wno-namespaces): Same.
7021 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7022 (Wno-format-overflow, Wno-format-truncation): Same.
7023 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7024 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7025 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7026 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7027 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7028 (Wno-misspelled-isr): Same.
7030 2018-06-11 Martin Sebor <msebor@redhat.com>
7032 * PR tree-optimization/86083
7033 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7035 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
7037 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7039 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
7042 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7043 on the correct operand.
7044 (*movdi_internal64): Ditto.
7046 2018-06-11 Martin Liska <mliska@suse.cz>
7048 PR tree-optimization/86089
7049 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7051 2018-06-11 Julia Koval <julia.koval@intel.com>
7053 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7054 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7055 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7057 2018-06-11 Olivier Hainque <hainque@adacore.com>
7059 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7060 for Ada with strict dwarf2.
7062 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
7065 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7068 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
7070 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7072 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
7074 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7077 2018-06-08 Martin Liska <mliska@suse.cz>
7079 * tree-cfg.h (debug_function): Fix argument type to match
7082 2018-06-08 Martin Liska <mliska@suse.cz>
7084 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7085 Remove usage of MPX-related (and removed) fields.
7086 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7088 2018-06-08 David Malcolm <dmalcolm@redhat.com>
7090 * cfg.c (debug): Use TDF_NONE rather than 0.
7091 * cfghooks.c (debug): Likewise.
7092 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7093 (struct dump_option_value_info): Convert to...
7094 (struct kv_pair): ...this template type.
7095 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7097 (optinfo_verbosity_options): Likewise.
7098 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7100 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7101 than int for "optgroup_flags" param.
7102 (dump_generic_expr_loc): Use dump_flags_t rather than int for
7104 (dump_dec): Likewise.
7105 (dump_finish): Use TDF_NONE rather than 0.
7106 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7107 rather than int for "optgroup_flags" param. Use TDF_NONE rather
7108 than 0. Update for change to option_ptr.
7109 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7110 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
7111 0. Update for changes to optinfo_verbosity_options and
7113 (opt_info_switch_p): Convert optgroup_flags from int to
7115 (dump_basic_block): Use dump_flags_t rather than int
7116 for "dump_kind" param.
7117 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7118 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7119 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7120 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7121 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7122 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7123 TDF_NONE): Convert from macros to...
7124 (enum dump_flag): ...this new enum.
7125 (dump_flags_t): Update to use enum.
7126 (operator|, operator&, operator~, operator|=, operator&=):
7127 Implement for dump_flags_t.
7128 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7129 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7130 Convert from macros to...
7131 (enum optgroup_flag): ...this new enum.
7132 (optgroup_flags_t): New typedef.
7133 (operator|, operator|=): Implement for optgroup_flags_t.
7134 (struct dump_file_info): Convert field "alt_flags" to
7135 dump_flags_t. Convert field "optgroup_flags" to
7137 (dump_basic_block): Use dump_flags_t rather than int for param.
7138 (dump_generic_expr_loc): Likewise.
7139 (dump_dec): Likewise.
7140 (dump_register): Convert param "optgroup_flags" to
7142 (opt_info_enable_passes): Likewise.
7143 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7145 * gimple-pretty-print.c (debug): Likewise.
7146 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7147 (merged_store_group::apply_stores): Likewise.
7148 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7149 * gimple.c (verify_gimple_pp): Likewise.
7150 * graphite-poly.c (print_pbb_body): Likewise.
7151 * passes.c (pass_manager::register_one_dump_file): Convert
7152 local "optgroup_flags" to optgroup_flags_t.
7153 * print-tree.c (print_node): Use TDF_NONE rather than 0.
7155 (debug_body): Likewise.
7156 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7157 to optgroup_flags_t.
7158 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7160 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7161 (convert_mult_to_fma): Likewise.
7162 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7163 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7164 * tree-vect-data-refs.c (dump_lower_bound): Convert param
7165 "dump_kind" to dump_flags_t.
7167 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7169 * config/rs6000/rs6000.c (min, max): Delete.
7171 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7173 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7174 -mabi=spe and -mabi=no-spe.
7176 2018-06-08 Martin Liska <mliska@suse.cz>
7178 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7179 where we expect an existing summary.
7181 2018-06-08 Martin Liska <mliska@suse.cz>
7183 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7184 * ipa-inline.h (estimate_edge_growth): Likewise.
7186 2018-06-08 Martin Liska <mliska@suse.cz>
7188 * cgraph.c (function_version_hasher::hash): Use
7189 cgraph_node::get_uid ().
7190 (function_version_hasher::equal):
7191 * cgraph.h (cgraph_node::get_uid): New method.
7192 * ipa-inline.c (update_caller_keys): Use
7193 cgraph_node::get_uid ().
7194 (update_callee_keys): Likewise.
7195 * ipa-utils.c (searchc): Likewise.
7196 (ipa_reduced_postorder): Likewise.
7197 * lto-cgraph.c (input_node): Likewise.
7198 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7199 * symbol-summary.h (symtab_insertion): Likewise.
7200 (symtab_removal): Likewise.
7201 (symtab_duplication): Likewise.
7202 * tree-pretty-print.c (dump_function_header): Likewise.
7203 * tree-sra.c (convert_callers_for_node): Likewise.
7205 2018-06-08 Martin Liska <mliska@suse.cz>
7207 * cgraph.c (symbol_table::create_edge): Always assign a new
7209 (symbol_table::free_edge): Do not recycle numbers.
7210 * cgraph.h (cgraph_edge::get): New method.
7211 * symbol-summary.h (symtab_removal): Use it.
7212 (symtab_duplication): Likewise.
7213 (call_summary::hashable_uid): Remove.
7215 2018-06-08 Martin Liska <mliska@suse.cz>
7217 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7218 (initialize_growth_caches): Remove.
7219 (free_growth_caches): Likewise.
7220 (do_estimate_edge_time): Use edge_growth_cache.
7221 (do_estimate_edge_size): Likewise.
7222 (do_estimate_edge_hints): Likewise.
7223 * ipa-inline.c (reset_edge_caches): Likewise.
7224 (recursive_inlining): Likewise.
7225 (inline_small_functions): Likewise.
7226 * ipa-inline.h (initialize_growth_caches): Remove.
7227 (estimate_edge_size): Likewise.
7228 (estimate_edge_time): Likewise.
7229 (estimate_edge_hints): Likewise.
7230 (reset_edge_growth_cache): Likewise.
7231 * symbol-summary.h (call_summary::remove): New method.
7233 2018-06-08 Martin Liska <mliska@suse.cz>
7235 * ipa-cp.c (class edge_clone_summary): New summary.
7236 (grow_edge_clone_vectors): Remove.
7237 (ipcp_edge_duplication_hook): Remove.
7238 (class edge_clone_summary_t): New call_summary class.
7239 (ipcp_edge_removal_hook): Remove.
7240 (edge_clone_summary_t::duplicate): New function.
7241 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7242 (create_specialized_node): Likewise.
7243 (ipcp_driver): Initialize edge_clone_summaries and do not
7246 2018-06-08 Martin Liska <mliska@suse.cz>
7248 * symbol-summary.h (get): New function.
7249 (call_summary::m_initialize_when_cloning): New class member.
7251 2018-06-08 Martin Liska <mliska@suse.cz>
7253 * cgraph.c (cgraph_node::remove): Do not recycle uid.
7254 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7255 (symbol_table::allocate_cgraph_symbol): Do not set uid.
7256 * passes.c (uid_hash_t): Record removed_nodes by their uids.
7257 (remove_cgraph_node_from_order): Use the removed_nodes set.
7258 (do_per_function_toporder): Likwise.
7259 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7260 instead of summary_uid.
7261 (symtab_removal): Likewise.
7262 (symtab_duplication): Likewise.
7264 2018-06-08 Martin Liska <mliska@suse.cz>
7266 * ipa-cp.c (ipcp_store_bits_results): Use
7267 ipcp_transformation_sum.
7268 (ipcp_store_vr_results): Likewise.
7269 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7271 (ipcp_transformation_initialize): ... this.
7272 (ipa_set_node_agg_value_chain):
7273 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7274 (write_ipcp_transformation_info): Likewise.
7275 (read_ipcp_transformation_info): Likewise.
7276 (ipcp_update_bits): Likewise.
7277 (ipcp_update_vr): Likewise.
7278 (ipcp_transform_function): Likewise.
7279 * ipa-prop.h: Rename ipcp_transformation_summary to
7280 ipcp_transformation.
7281 (class ipcp_transformation_t): New function summary.
7282 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7283 (ipa_get_agg_replacements_for_node): Likewise.
7285 2018-06-08 Martin Liska <mliska@suse.cz>
7287 * ipa-pure-const.c (struct funct_state_d): Do it class instead
7289 (class funct_state_summary_t): New function_summary class.
7290 (has_function_state): Remove.
7291 (get_function_state): Likewise.
7292 (set_function_state): Likewise.
7293 (add_new_function): Likewise.
7294 (funct_state_summary_t::insert): New function.
7295 (duplicate_node_data): Remove.
7296 (remove_node_data): Remove.
7297 (funct_state_summary_t::duplicate): New function.
7298 (register_hooks): Create new funct_state_summaries.
7299 (pure_const_generate_summary): Use it.
7300 (pure_const_write_summary): Likewise.
7301 (pure_const_read_summary): Likewise.
7302 (propagate_pure_const): Likewise.
7303 (propagate_nothrow): Likewise.
7304 (dump_malloc_lattice): Likewise.
7305 (propagate_malloc): Likewise.
7306 (execute): Do not register hooks, just remove summary
7308 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7311 2018-06-08 Martin Liska <mliska@suse.cz>
7313 * ipa-reference.c (remove_node_data): Remove.
7314 (duplicate_node_data): Likewise.
7315 (class ipa_ref_var_info_summary_t): New class.
7316 (class ipa_ref_opt_summary_t): Likewise.
7317 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7318 (get_reference_optimization_summary): Use
7319 ipa_ref_opt_sum_summaries.
7320 (set_reference_vars_info): Remove.
7321 (set_reference_optimization_summary): Likewise.
7322 (ipa_init): Create summaries.
7323 (init_function_info): Use function summary.
7324 (ipa_ref_opt_summary_t::duplicate): New function.
7325 (ipa_ref_opt_summary_t::remove): New function.
7326 (get_read_write_all_from_node): Fix GNU coding style.
7327 (propagate): Use function summary.
7328 (write_node_summary_p): Fix GNU coding style.
7329 (stream_out_bitmap): Likewise.
7330 (ipa_reference_read_optimization_summary): Use function summary.
7331 (ipa_reference_c_finalize): Do not release hooks.
7333 2018-06-08 Martin Liska <mliska@suse.cz>
7335 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7336 (analyze_function_body): Extract multiple calls of get_create.
7337 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7338 * ipa-inline.c (recursive_inlining): Use ::get method.
7339 * ipa-inline.h (estimate_edge_growth): Likewise.
7341 2018-06-08 Martin Liska <mliska@suse.cz>
7343 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7345 (hsa_function_summary::hsa_function_summary): Use the new enum
7347 (hsa_gpu_implementation_p): Use hsa_summaries::get.
7348 * hsa-gen.c (hsa_get_host_function): Likewise.
7349 (get_brig_function_name): Likewise.
7350 * ipa-hsa.c (process_hsa_functions): Likewise.
7351 (ipa_hsa_write_summary): Likewise.
7352 * symbol-summary.h (symtab_duplication): Use ::get function/
7353 (get): New function.
7355 2018-06-08 Martin Liska <mliska@suse.cz>
7357 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7359 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7360 (hsa_register_kernel): Likewise.
7361 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7362 * hsa-gen.c (hsa_get_host_function): Likewise.
7363 (get_brig_function_name): Likewise.
7364 (generate_hsa): Likewise.
7365 (pass_gen_hsail::execute): Likewise.
7366 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7367 (devirtualization_time_bonus): Likewise.
7368 (ipcp_propagate_stage): Likewise.
7369 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7370 (edge_set_predicate): Likewise.
7371 (evaluate_conditions_for_known_args): Likewise.
7372 (evaluate_properties_for_edge): Likewise.
7373 (ipa_fn_summary::reset): Likewise.
7374 (ipa_fn_summary_t::duplicate): Likewise.
7375 (dump_ipa_call_summary): Likewise.
7376 (ipa_dump_fn_summary): Likewise.
7377 (analyze_function_body): Likewise.
7378 (compute_fn_summary): Likewise.
7379 (estimate_edge_devirt_benefit): Likewise.
7380 (estimate_edge_size_and_time): Likewise.
7381 (estimate_calls_size_and_time): Likewise.
7382 (estimate_node_size_and_time): Likewise.
7383 (inline_update_callee_summaries): Likewise.
7384 (remap_edge_change_prob): Likewise.
7385 (remap_edge_summaries): Likewise.
7386 (ipa_merge_fn_summary_after_inlining): Likewise.
7387 (ipa_update_overall_fn_summary): Likewise.
7388 (read_ipa_call_summary): Likewise.
7389 (inline_read_section): Likewise.
7390 (write_ipa_call_summary): Likewise.
7391 (ipa_fn_summary_write): Likewise.
7392 (ipa_free_fn_summary): Likewise.
7393 * ipa-hsa.c (process_hsa_functions): Likewise.
7394 (ipa_hsa_write_summary): Likewise.
7395 (ipa_hsa_read_section): Likewise.
7396 * ipa-icf.c (sem_function::merge): Likewise.
7397 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7398 (do_estimate_edge_time): Likewise.
7399 (estimate_size_after_inlining): Likewise.
7400 (estimate_growth): Likewise.
7401 (growth_likely_positive): Likewise.
7402 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7403 (inline_call): Likewise.
7404 * ipa-inline.c (caller_growth_limits): Likewise.
7405 (can_inline_edge_p): Likewise.
7406 (can_inline_edge_by_limits_p): Likewise.
7407 (compute_uninlined_call_time): Likewise.
7408 (compute_inlined_call_time): Likewise.
7409 (want_inline_small_function_p): Likewise.
7410 (edge_badness): Likewise.
7411 (update_caller_keys): Likewise.
7412 (update_callee_keys): Likewise.
7413 (recursive_inlining): Likewise.
7414 (inline_small_functions): Likewise.
7415 (inline_to_all_callers_1): Likewise.
7416 (dump_overall_stats): Likewise.
7417 (early_inline_small_functions): Likewise.
7418 (early_inliner): Likewise.
7419 * ipa-inline.h (estimate_edge_growth): Likewise.
7420 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7421 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7422 * ipa-prop.h (IPA_NODE_REF): Likewise.
7423 (IPA_EDGE_REF): Likewise.
7424 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7425 (propagate_malloc): Likewise.
7426 * ipa-split.c (execute_split_functions): Likewise.
7427 * symbol-summary.h: Rename get to get_create.
7429 (get_create): Likewise.
7430 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7432 2018-06-08 Martin Liska <mliska@suse.cz>
7434 * symbol-summary.h (release): Move definition out of class
7436 (symtab_removal): Likewise.
7437 (symtab_duplication): Likewise.
7439 2018-06-08 Martin Liska <mliska@suse.cz>
7441 * symbol-summary.h (function_summary): Move constructor
7442 implementation out of class declaration.
7443 (release): Likewise.
7444 (symtab_insertion): Likewise.
7445 (symtab_removal): Likewise.
7446 (symtab_duplication): Likewise.
7449 2018-06-08 Martin Liska <mliska@suse.cz>
7451 * Makefile.in: Remove support for MPX (macros, related functions,
7452 fields in cgraph_node, ...).
7453 * builtin-types.def (BT_BND): Likewise.
7454 (BT_FN_BND_CONST_PTR): Likewise.
7455 (BT_FN_CONST_PTR_BND): Likewise.
7456 (BT_FN_VOID_PTR_BND): Likewise.
7457 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7458 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7459 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7460 (expand_builtin_mempcpy_with_bounds): Likewise.
7461 (expand_builtin_memset_with_bounds): Likewise.
7462 (expand_builtin_memset_args): Likewise.
7463 (std_expand_builtin_va_start): Likewise.
7464 (expand_builtin): Likewise.
7465 (expand_builtin_with_bounds): Likewise.
7466 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7467 (DEF_LIB_BUILTIN_CHKP): Likewise.
7468 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7469 (DEF_CHKP_BUILTIN): Likewise.
7470 (BUILT_IN_MEMCPY): Likewise.
7471 (BUILT_IN_MEMMOVE): Likewise.
7472 (BUILT_IN_MEMPCPY): Likewise.
7473 (BUILT_IN_MEMSET): Likewise.
7474 (BUILT_IN_STPCPY): Likewise.
7475 (BUILT_IN_STRCAT): Likewise.
7476 (BUILT_IN_STRCHR): Likewise.
7477 (BUILT_IN_STRCPY): Likewise.
7478 (BUILT_IN_STRLEN): Likewise.
7479 (BUILT_IN_MEMCPY_CHK): Likewise.
7480 (BUILT_IN_MEMMOVE_CHK): Likewise.
7481 (BUILT_IN_MEMPCPY_CHK): Likewise.
7482 (BUILT_IN_MEMSET_CHK): Likewise.
7483 (BUILT_IN_STPCPY_CHK): Likewise.
7484 (BUILT_IN_STRCAT_CHK): Likewise.
7485 (BUILT_IN_STRCPY_CHK): Likewise.
7486 * calls.c (store_bounds): Likewise.
7487 (emit_call_1): Likewise.
7488 (special_function_p): Likewise.
7489 (maybe_warn_nonstring_arg): Likewise.
7490 (initialize_argument_information): Likewise.
7491 (finalize_must_preallocate): Likewise.
7492 (compute_argument_addresses): Likewise.
7493 (expand_call): Likewise.
7494 * cfgexpand.c (expand_call_stmt): Likewise.
7495 (expand_return): Likewise.
7496 (expand_gimple_stmt_1): Likewise.
7497 (pass_expand::execute): Likewise.
7498 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7499 (cgraph_node::remove): Likewise.
7500 (cgraph_node::dump): Likewise.
7501 (cgraph_node::verify_node): Likewise.
7502 * cgraph.h (chkp_function_instrumented_p): Likewise.
7503 (symtab_node::get_alias_target): Likewise.
7504 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7505 (cgraph_local_p): Likewise.
7506 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7507 (cgraph_edge::rebuild_references): Likewise.
7508 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7509 (walk_polymorphic_call_targets): Likewise.
7510 (cgraph_node::expand_thunk): Likewise.
7511 (symbol_table::output_weakrefs): Likewise.
7512 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7513 (ix86_handle_option): Likewise.
7514 * config/i386/constraints.md: Likewise.
7515 * config/i386/i386-builtin-types.def (BND): Likewise.
7519 * config/i386/i386-builtin.def (BDESC_END): Likewise.
7520 (BDESC_FIRST): Likewise.
7522 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7523 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7524 * config/i386/i386.c (enum reg_class): Likewise.
7525 (ix86_target_string): Likewise.
7526 (ix86_option_override_internal): Likewise.
7527 (ix86_conditional_register_usage): Likewise.
7528 (ix86_valid_target_attribute_inner_p): Likewise.
7529 (ix86_set_indirect_branch_type): Likewise.
7530 (ix86_set_current_function): Likewise.
7531 (ix86_function_arg_regno_p): Likewise.
7532 (init_cumulative_args): Likewise.
7533 (ix86_function_arg_advance): Likewise.
7534 (ix86_function_arg): Likewise.
7535 (ix86_pass_by_reference): Likewise.
7536 (ix86_function_value_regno_p): Likewise.
7537 (ix86_function_value_1): Likewise.
7538 (ix86_function_value_bounds): Likewise.
7539 (ix86_return_in_memory): Likewise.
7540 (ix86_setup_incoming_vararg_bounds): Likewise.
7541 (ix86_va_start): Likewise.
7542 (indirect_thunk_need_prefix): Likewise.
7543 (print_reg): Likewise.
7544 (ix86_print_operand): Likewise.
7545 (ix86_expand_call): Likewise.
7546 (ix86_output_function_return): Likewise.
7547 (reg_encoded_number): Likewise.
7548 (BDESC_VERIFYS): Likewise.
7549 (ix86_init_mpx_builtins): Likewise.
7550 (ix86_init_builtins): Likewise.
7551 (ix86_emit_cmove): Likewise.
7552 (ix86_emit_move_max): Likewise.
7553 (ix86_expand_builtin): Likewise.
7554 (ix86_builtin_mpx_function): Likewise.
7555 (ix86_get_arg_address_for_bt): Likewise.
7556 (ix86_load_bounds): Likewise.
7557 (ix86_store_bounds): Likewise.
7558 (ix86_load_returned_bounds): Likewise.
7559 (ix86_store_returned_bounds): Likewise.
7560 (ix86_class_likely_spilled_p): Likewise.
7561 (ix86_hard_regno_mode_ok): Likewise.
7562 (x86_order_regs_for_local_alloc): Likewise.
7563 (ix86_mitigate_rop): Likewise.
7564 (ix86_bnd_prefixed_insn_p): Likewise.
7565 (ix86_mpx_bound_mode): Likewise.
7566 (ix86_make_bounds_constant): Likewise.
7567 (ix86_initialize_bounds): Likewise.
7568 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7569 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7570 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7571 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7572 (TARGET_CHKP_BOUND_MODE): Likewise.
7573 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7574 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7575 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7576 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7577 * config/i386/i386.h (TARGET_MPX): Likewise.
7578 (TARGET_MPX_P): Likewise.
7579 (VALID_BND_REG_MODE): Likewise.
7580 (FIRST_BND_REG): Likewise.
7581 (LAST_BND_REG): Likewise.
7582 (enum reg_class): Likewise.
7583 (BND_REG_P): Likewise.
7584 (BND_REGNO_P): Likewise.
7585 (BNDmode): Likewise.
7586 (ADJUST_INSN_LENGTH): Likewise.
7587 * config/i386/i386.md: Likewise.
7588 * config/i386/i386.opt: Likewise.
7589 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7590 (defined): Likewise.
7591 (LINK_MPX): Likewise.
7592 (MPX_SPEC): Likewise.
7593 (LIBMPX_SPEC): Likewise.
7594 (LIBMPXWRAPPERS_SPEC): Likewise.
7595 (CHKP_SPEC): Likewise.
7596 * config/i386/predicates.md: Likewise.
7597 * dbxout.c (dbxout_type): Likewise.
7598 * doc/extend.texi: Likewise.
7599 * doc/invoke.texi: Likewise.
7600 * doc/md.texi: Likewise.
7601 * doc/tm.texi: Likewise.
7602 * doc/tm.texi.in: Likewise.
7603 * dwarf2out.c (is_base_type): Likewise.
7604 (gen_formal_types_die): Likewise.
7605 (gen_subprogram_die): Likewise.
7606 (gen_type_die_with_usage): Likewise.
7607 (gen_decl_die): Likewise.
7608 (dwarf2out_late_global_decl): Likewise.
7609 * expr.c (expand_assignment): Likewise.
7610 (emit_storent_insn): Likewise.
7611 (store_expr_with_bounds): Likewise.
7612 (store_expr): Likewise.
7613 (expand_expr_real_1): Likewise.
7614 * expr.h (store_expr_with_bounds): Likewise.
7615 * function.c (use_register_for_decl): Likewise.
7616 (struct bounds_parm_data): Likewise.
7617 (assign_parms_augmented_arg_list): Likewise.
7618 (assign_parm_find_entry_rtl): Likewise.
7619 (assign_parm_is_stack_parm): Likewise.
7620 (assign_parm_load_bounds): Likewise.
7621 (assign_bounds): Likewise.
7622 (assign_parms): Likewise.
7623 (expand_function_start): Likewise.
7624 * gcc.c (CHKP_SPEC): Likewise.
7625 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7626 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7627 (wrestrict_dom_walker::check_call): Likewise.
7628 * gimple.c (gimple_build_call_from_tree): Likewise.
7629 * gimple.h (enum gf_mask): Likewise.
7630 (gimple_call_with_bounds_p): Likewise.
7631 (gimple_call_set_with_bounds): Likewise.
7632 * gimplify.c (gimplify_init_constructor): Likewise.
7633 * ipa-cp.c (initialize_node_lattices): Likewise.
7634 (propagate_constants_across_call): Likewise.
7635 (find_more_scalar_values_for_callers_subset): Likewise.
7636 * ipa-hsa.c (process_hsa_functions): Likewise.
7637 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7638 * ipa-icf.c (sem_function::merge): Likewise.
7639 * ipa-inline.c (early_inliner): Likewise.
7640 * ipa-pure-const.c (warn_function_noreturn): Likewise.
7641 (warn_function_cold): Likewise.
7642 (propagate_pure_const): Likewise.
7643 * ipa-ref.h (enum GTY): Likewise.
7644 * ipa-split.c (find_retbnd): Likewise.
7645 (consider_split): Likewise.
7646 (split_function): Likewise.
7647 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7648 * ipa.c (walk_polymorphic_call_targets): Likewise.
7649 (symbol_table::remove_unreachable_nodes): Likewise.
7650 (process_references): Likewise.
7651 (cgraph_build_static_cdtor_1): Likewise.
7652 * lto-cgraph.c (lto_output_node): Likewise.
7653 (output_refs): Likewise.
7654 (compute_ltrans_boundary): Likewise.
7655 (input_overwrite_node): Likewise.
7656 (input_node): Likewise.
7657 (input_cgraph_1): Likewise.
7658 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7659 * passes.c (pass_manager::execute_early_local_passes): Likewise.
7660 (class pass_chkp_instrumentation_passes): Likewise.
7661 (make_pass_chkp_instrumentation_passes): Likewise.
7662 * passes.def: Likewise.
7663 * rtl.h (struct GTY): Likewise.
7664 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7665 * stor-layout.c (layout_type): Likewise.
7666 * symtab.c: Likewise.
7667 * target.def: Likewise.
7668 * targhooks.c (default_chkp_bound_type): Likewise.
7669 (default_chkp_bound_mode): Likewise.
7670 (default_builtin_chkp_function): Likewise.
7671 (default_chkp_function_value_bounds): Likewise.
7672 (default_chkp_make_bounds_constant): Likewise.
7673 (default_chkp_initialize_bounds): Likewise.
7674 * targhooks.h (default_chkp_bound_type): Likewise.
7675 (default_chkp_bound_mode): Likewise.
7676 (default_builtin_chkp_function): Likewise.
7677 (default_chkp_function_value_bounds): Likewise.
7678 (default_chkp_make_bounds_constant): Likewise.
7679 (default_chkp_initialize_bounds): Likewise.
7680 * toplev.c (compile_file): Likewise.
7681 (process_options): Likewise.
7682 * tree-core.h (DEF_BUILTIN): Likewise.
7683 (DEF_BUILTIN_CHKP): Likewise.
7684 * tree-inline.c (declare_return_variable): Likewise.
7685 (remap_gimple_stmt): Likewise.
7686 (copy_bb): Likewise.
7687 (initialize_inlined_parameters): Likewise.
7688 (expand_call_inline): Likewise.
7689 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7690 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7691 (make_pass_ipa_chkp_produce_thunks): Likewise.
7692 (make_pass_chkp): Likewise.
7693 (make_pass_chkp_opt): Likewise.
7694 (make_pass_chkp_instrumentation_passes): Likewise.
7695 * tree-pretty-print.c (dump_generic_node): Likewise.
7696 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7697 * tree-ssa-dce.c (propagate_necessity): Likewise.
7698 (eliminate_unnecessary_stmts): Likewise.
7699 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7700 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7701 * tree-ssa-sccvn.h: Likewise.
7702 * tree-ssa-strlen.c (get_string_length): Likewise.
7703 (valid_builtin_call): Likewise.
7704 (adjust_last_stmt): Likewise.
7705 (handle_builtin_strchr): Likewise.
7706 (handle_builtin_strcpy): Likewise.
7707 (handle_builtin_stxncpy): Likewise.
7708 (handle_builtin_memcpy): Likewise.
7709 (handle_builtin_strcat): Likewise.
7710 (strlen_check_and_optimize_stmt): Likewise.
7711 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7712 * tree-streamer-in.c: Likewise.
7713 * tree-streamer.c (record_common_node): Likewise.
7714 * tree.c (tree_code_size): Likewise.
7715 (wide_int_to_tree_1): Likewise.
7716 (type_contains_placeholder_1): Likewise.
7717 (build_common_tree_nodes): Likewise.
7718 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7719 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7720 (POINTER_BOUNDS_P): Likewise.
7721 (BOUNDED_TYPE_P): Likewise.
7722 (BOUNDED_P): Likewise.
7723 (CALL_WITH_BOUNDS_P): Likewise.
7724 (pointer_bounds_type_node): Likewise.
7725 * value-prof.c (gimple_ic): Likewise.
7726 * var-tracking.c (vt_add_function_parameters): Likewise.
7727 * varasm.c (make_decl_rtl): Likewise.
7728 (assemble_start_function): Likewise.
7729 (output_constant): Likewise.
7730 (maybe_assemble_visibility): Likewise.
7731 * varpool.c (ctor_for_folding): Likewise.
7732 * chkp-builtins.def: Remove.
7733 * ipa-chkp.c: Remove.
7734 * ipa-chkp.h: Remove.
7735 * rtl-chkp.c: Remove.
7736 * rtl-chkp.h: Remove.
7737 * tree-chkp-opt.c: Remove.
7738 * tree-chkp.c: Remove.
7739 * tree-chkp.h: Remove.
7741 2018-06-07 Carl Love <cel@us.ibm.com>
7743 * config/rs6000/vsx.md (vextract_fp_from_shorth,
7744 vextract_fp_from_shortl): Add BE support.
7746 2018-06-07 Paul Koning <ni1d@arrl.net>
7748 * compare-elim.c (try_merge_compare): Don't merge compare if
7749 address contains a side effect.
7750 (try_eliminate_compare): Likewise.
7752 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
7754 * config.gcc: Support "tremont".
7755 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7756 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7758 * config/i386/i386.c (m_TREMONT): Define.
7759 (processor_target_table): Add "tremont".
7760 (PTA_TREMONT): Define.
7761 (ix86_lea_outperforms): Add TARGET_TREMONT.
7762 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7763 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7764 and M_INTEL_GOLDMONT_PLUS.
7765 (fold_builtin_cpu): Add "tremont".
7766 (ix86_add_stmt_cost): Add TARGET_TREMONT.
7767 (ix86_option_override_internal): Add "tremont".
7768 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7769 (processor_type): Add PROCESSOR_TREMONT.
7770 * config/i386/x86-tune.def: Add m_TREMONT.
7771 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7773 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7775 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7776 symbol defined for msp430i* devices to be lower case.
7778 2018-06-07 Richard Biener <rguenther@suse.de>
7780 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7781 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
7782 Properly wrap signed arithmetic if overflow wraps.
7784 2018-06-07 Jakub Jelinek <jakub@redhat.com>
7786 PR tree-optimization/69615
7787 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7788 of a cast from a same precision integral SSA_NAME in a bb dominated
7789 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
7790 cast to utype if rhs2 has already a compatible type.
7792 2018-06-07 Richard Biener <rguenther@suse.de>
7794 PR tree-optimization/85935
7795 * graphite-scop-detection.c (find_params_in_bb): Analyze
7796 condition operands with respect to the correct loop. Assert
7797 the analysis doesn't fail.
7799 2018-06-04 Carl Love <cel@us.ibm.com>
7801 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7802 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
7803 as it is slightly cheaper.
7804 (first_match_or_eos_index_<mode>):
7805 Calculate index using natural element order.
7806 (first_match_index_<mode>):
7807 Calculate index using natural element order.
7808 (first_match_or_eos_index_<mode>):
7809 Calculate index using natural order.
7810 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7811 for BE and LE modes.
7812 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7813 P9V_BUILTIN_VCLZLSBB_V16QI.
7814 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7817 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7819 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7820 indentation and line wrap for many prototypes. Add missing
7821 @smallexample directives around block of prototypes for vec_xl and
7824 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
7826 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7827 track if we pass or return IEEE 128-bit floating point.
7828 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7829 C++ mangling that is compatible with GCC 8.1.
7830 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7831 (init_cumulative_args): Note if we pass or return IEEE 128-bit
7832 floating point types.
7833 (rs6000_function_arg_advance_1): Likewise.
7834 (rs6000_mangle_type): Optionally generate mangled names that match
7835 what GCC 8.1 generated for IEEE 128-bit floating point types.
7836 (rs6000_globalize_decl_name): If we have an external function that
7837 passes or returns IEEE 128-bit types, generate a weak reference
7838 from the mangled name used in GCC 8.1 to the current mangled
7840 (rs6000_init_builtins): Make __ibm128 use the long double type if
7841 long double is IBM extended double. Make __float128 use the long
7842 double type if long double is IEEE 128-bit.
7845 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7846 macro for __ibm128 built-in functions.
7847 (PACK_IF): Add __ibm128 pack/unpack functions.
7848 (UNPACK_IF): Likewise.
7849 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7850 enable long double built-in functions if long double is IEEE
7851 128-bit floating point.
7852 (rs6000_invalid_builtin): Update long double built-in function
7854 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7855 functions, adjust the built-in function to use the long double
7856 built-in function if __ibm128 and long double are the same type.
7857 * doc/extend.texi (PowerPC builtins): Update documention for
7858 __builtin_{,un}pack_longdouble. Add documentation for
7859 __builtin_{,un}pack_ibm128.
7861 2018-06-06 Jim Wilson <jimw@sifive.com>
7863 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7864 (struct machine_function): New field interrupt_mode.
7865 (riscv_handle_type_attribute): New function. Add forward declaration.
7866 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7867 (riscv_expand_epilogue): Check interrupt_mode field.
7868 (riscv_set_current_function): Check interrupt attribute args and
7869 set interrupt_mode field.
7870 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7871 (riscv_sret, riscv_uret): New.
7872 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7873 new arguments to interrupt attribute.
7875 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
7878 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7879 Don't handle -mcpu=power8 if -mpower9-vector is also used.
7881 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7883 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7884 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7885 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7886 several redundant entries.
7888 2018-06-06 David Malcolm <dmalcolm@redhat.com>
7890 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7891 type from "rtx" to "rtx_insn *".
7892 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7893 for local "call_insn", removing cast.
7894 (ix86_expand_call): Likewise, introducing a "call_insn" local.
7896 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
7898 PR tree-optimization/86066
7899 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7900 for BIT_INSERT_EXPR stores.
7902 2018-06-06 Richard Biener <rguenther@suse.de>
7904 PR tree-optimization/86062
7905 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7906 component refs ontop
7907 of to be offsetted base.
7909 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7911 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7912 to be static and remove check on interrupt attribute name.
7914 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
7916 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7917 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7919 2018-06-05 Steve Ellcey <sellcey@cavium.com>
7922 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7924 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7925 Remove second argument, change how error is called.
7926 (aarch64_layout_arg): Remove second argument from
7927 aarch64_err_no_fpadvsimd call.
7928 (aarch64_init_cumulative_args): Ditto.
7929 (aarch64_gimplify_va_arg_expr): Ditto.
7930 * config/aarch64/aarch64.md (mov<mode>): Ditto.
7932 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
7934 * config/i386/i386.md (simple_return_indirect_internal): New expander.
7935 (*simple_return_indirect_internal<mode>): Rename from
7936 simple_return_indirect_internal. Use W mode iterator.
7937 (rstorssp): New expander.
7938 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
7939 (clrssbsy): New expander.
7940 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
7942 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
7944 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7946 (cmse_check_pointed_object): Likewise.
7948 2018-06-05 Martin Liska <mliska@suse.cz>
7950 PR gcov-profile/47618
7951 * doc/invoke.texi: Document how -fprofile-dir format
7954 2018-06-05 Richard Biener <rguenther@suse.de>
7956 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7957 removal pretend DOM info isn't available so we do not update
7958 it and only remove edges, not dominated blocks. Actually free
7959 DOM info in case we removed something. Remove unreachable blocks.
7960 (mfb_keep_latches): Work with either DOM info or marked backedges.
7961 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7962 first. Mark backedges if DOM info isn't available.
7963 (Re-)compute DOM info after cleanup_control_flow_pre.
7965 2018-06-05 Richard Biener <rguenther@suse.de>
7967 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7968 (locus_discrim_hasher::hash): Adjust.
7969 (locus_discrim_hasher::equal): Likewise.
7970 (next_discriminator_for_locus): Work on line directly.
7971 (same_line_p): Pass in expanded locus1 as well.
7972 (assign_discriminators): Avoid redundant location expansions.
7974 2018-06-05 Richard Biener <rguenther@suse.de>
7976 PR tree-optimization/86046
7977 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7978 if required after clearing TREE_ADDRESSABLE.
7980 2018-06-05 Richard Biener <rguenther@suse.de>
7982 PR tree-optimization/86047
7983 * tree-ssa-loop.c (for_each_index): Glob handling of all
7984 decls and constants and really handle all of them.
7986 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7989 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7990 qualifier_void_pointer and qualifier_const_void_pointer.
7991 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7992 (arm_init_builtins): Handle the above.
7993 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7994 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7995 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7998 2018-06-05 Martin Liska <mliska@suse.cz>
8000 * auto-profile.c (read_autofdo_file): Do not use
8001 gcov_ctr_summary struct.
8002 (afdo_callsite_hot_enough_for_early_inline): Likewise.
8003 * coverage.c (struct counts_entry): Likewise.
8004 (read_counts_file): Read just single summary entry.
8005 (get_coverage_counts): Use gcov_summary struct.
8006 * coverage.h (get_coverage_counts): Likewise.
8007 * gcov-dump.c (dump_working_sets): Likewise.
8008 (tag_summary): Dump just single summary.
8009 * gcov-io.c (gcov_write_summary): Write just histogram
8011 (gcov_read_summary): Read just single summary.
8012 (compute_working_sets): Use gcov_summary struct.
8013 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8014 of GCOV_COUNTERS_SUMMABLE.
8015 (GCOV_COUNTERS_SUMMABLE): Remove.
8016 (GCOV_FIRST_VALUE_COUNTER): Replace with
8017 GCOV_COUNTER_V_INTERVAL.
8018 (struct gcov_ctr_summary): Remove.
8019 (struct gcov_summary): Directly use fields of former
8021 (compute_working_sets): Use gcov_summary struct.
8022 * gcov.c (read_count_file): Do not use ctrs fields.
8023 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8025 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8027 * profile.c: Likewise.
8028 * profile.h: Likewise.
8030 2018-06-05 Martin Liska <mliska@suse.cz>
8032 PR gcov-profile/84846
8033 * gcov.c (output_lines): Print working directory only
8034 in intermediate format.
8036 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
8038 * config/s390/s390-builtin-types.def: Add void function type.
8039 * config/s390/s390-builtins.def: Use the function type for the
8042 2018-06-04 Jim Wilson <jimw@sifive.com>
8044 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8046 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8047 and maybe_eh_return. Change regno to unsigned int. Use new args to
8048 handle EH_RETURN_DATA_REGNO registers properly.
8049 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8050 (riscv_expand_epilogue): Update comment. Change argument name and
8051 type. Update code to use new name and type. Pass new args to
8052 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
8054 * config/riscv/riscv.md (NORMAL_RETURN): New.
8055 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8056 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8057 (eh_return): Call gen_eh_return_internal and emit barrier.
8058 (eh_return_internal): Call riscv_expand_epilogue.
8060 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
8062 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8063 bit_insertion field and declare can_be_merged_into method.
8064 (merged_store_group::can_be_merged_into): New method.
8065 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8066 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
8067 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8069 2018-06-04 Richard Biener <rguenther@suse.de>
8071 PR tree-optimization/85955
8072 * builtins.c (fold_builtin_sincos): Convert pointers to
8073 destination to appropriate type before dereferencing.
8075 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
8077 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8079 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
8081 * expr.c (expand_expr_real_1): Force the operand into memory if
8082 its TYPE_MODE is BLKmode and if there is no integer mode for
8083 the number of bits being extracted.
8085 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8089 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8090 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8092 2018-06-04 Richard Biener <rguenther@suse.de>
8094 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8095 (cleanup_tree_cfg_noloop): ... single caller. Do
8096 start_recording_case_labels later.
8098 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
8100 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8101 to _IMMINTRIN_H_INCLUDED.
8102 * config/i386/pconfigintrin.h: Ditto.
8103 * config/i386/waitpkgintrin.h: Ditto.
8104 * config/i386/immintrin.h: Add includes for sgxintrin.h,
8105 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8106 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8107 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8108 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8109 waitpkgintrin.h and cldemoteintrin.h.
8111 2018-06-04 Richard Biener <rguenther@suse.de>
8113 PR tree-optimization/86038
8114 * tracer.c (find_best_successor): Check probability for
8115 being initialized, bail out if not.
8117 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
8120 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8121 of bits to ignore when comparing architectures.
8123 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8125 PR tree-optimization/69615
8126 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8127 maximum or minimum of the type, try to merge it also as if
8128 range1 is + [-, x - 1] or + [x + 1, -].
8131 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8133 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
8135 PR tree-optimization/86034
8136 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8137 the unsigned bitfield type in a bit insertion sequence if it does not
8138 have a larger precision than the bitfield size.
8139 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8141 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
8143 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8145 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8147 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8148 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8149 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8150 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8152 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8154 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8155 Disable -fdelete-null-pointer-checks for ELF toolchain.
8157 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8158 Kito Cheng <kito.cheng@gmail.com>
8160 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8161 (nds32le-*-*, nds32be-*-*): Integrate checking process.
8162 (nds32*-*-*): Add glibc and uclibc conditions.
8163 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8164 (TARGET_EXCEPT_UNWIND_INFO): Define.
8165 * config/nds32/elf.h: New file.
8166 * config/nds32/linux.h: New file.
8167 * config/nds32/nds32-elf.opt: New file.
8168 * config/nds32/nds32-linux.opt: New file.
8169 * config/nds32/nds32-fp-as-gp.c
8170 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8171 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8173 (nds32_asm_file_end): Ditto.
8174 (nds32_print_operand): Ditto.
8175 (nds32_insert_attributes): Ditto.
8176 (nds32_init_libfuncs): New function.
8177 (TARGET_HAVE_TLS): Define.
8178 (TARGET_INIT_LIBFUNCS): Define.
8179 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8181 (TARGET_ELF): Apply different mcmodel setting.
8182 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8183 been migrated into elf.h and linux.h files.
8184 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8185 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8186 (mcmodel): The content has been migrated into nds32-elf.opt and
8187 nds32-linux.opt files.
8188 * config/nds32/t-elf: New file.
8189 * config/nds32/t-linux: New file.
8191 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8192 Shiva Chen <shiva0217@gmail.com>
8194 * config/nds32/constants.md (unspec_volatile_element): Add
8195 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8196 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8198 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8199 (make_pass_nds32_fp_as_gp): Declare.
8200 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8202 (nds32_asm_function_end_prologue): Remove unused asm output.
8203 (nds32_asm_function_begin_epilogue): Remove unused asm output.
8204 (nds32_asm_file_start): Output necessary fp_as_gp information.
8205 (nds32_option_override): Adjust register usage.
8206 (nds32_expand_prologue): Consider fp_as_gp situation.
8207 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8208 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8211 (simple_return): Ditto.
8212 (omit_fp_begin): Output special directive for fp_as_gp.
8213 (omit_fp_end): Output special directive for fp_as_gp.
8214 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8215 mforbid-fp-as-gp): New options.
8217 2018-06-01 Mark Wielaard <mark@klomp.org>
8219 * dwarf2out.c (dwarf2out_finish): Remove generation of
8220 DW_AT_loclists_base.
8222 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
8224 * gimple-ssa-store-merging.c: Include gimple-fold.h.
8225 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8226 (struct merged_store_group): Add bit_insertion field.
8227 (dump_char_array): Use standard hexadecimal format.
8228 (merged_store_group::merged_store_group): Set bit_insertion to false.
8229 (merged_store_group::apply_stores): Use optimal buffer size. Deal
8230 with BIT_INSERT_EXPR stores. Move up code updating the mask and
8231 also print the mask in the dump file.
8232 (pass_store_merging::gate): Minor tweak.
8233 (imm_store_chain_info::coalesce_immediate): Fix wrong association
8234 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
8235 stores with INTEGER_CST stores.
8236 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8237 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8238 and use it throughout. Generate bit insertion sequences if need be.
8239 (pass_store_merging::process_store): Remove redundant condition.
8240 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8242 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
8244 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8245 the 128-bit floating point types. Fix function comment.
8247 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8249 * config/aarch64/aarch64-simd.md
8250 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8252 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8255 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
8257 PR tree-optimization/85989
8258 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8260 (backprop::intersect_uses): Check it when deciding whether this
8261 is a backedge reference.
8262 (backprop::process_block): Add each phi to m_visited_phis
8263 after visiting it, then clear it at the end.
8265 2018-06-01 Richard Biener <rguenther@suse.de>
8267 * tree-vectorizer.h (vect_dr_stmt): New function.
8268 (vect_get_load_cost): Adjust.
8269 (vect_get_store_cost): Likewise.
8270 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8271 Use vect_dr_stmt instead of DR_SMTT.
8272 (vect_record_base_alignments): Likewise.
8273 (vect_calculate_target_alignment): Likewise.
8274 (vect_compute_data_ref_alignment): Likewise and make static.
8275 (vect_update_misalignment_for_peel): Likewise.
8276 (vect_verify_datarefs_alignment): Likewise.
8277 (vector_alignment_reachable_p): Likewise.
8278 (vect_get_data_access_cost): Likewise. Pass down
8279 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8280 (vect_get_peeling_costs_all_drs): Likewise.
8281 (vect_peeling_hash_get_lowest_cost): Likewise.
8282 (vect_enhance_data_refs_alignment): Likewise.
8283 (vect_find_same_alignment_drs): Likewise.
8284 (vect_analyze_data_refs_alignment): Likewise.
8285 (vect_analyze_group_access_1): Likewise.
8286 (vect_analyze_group_access): Likewise.
8287 (vect_analyze_data_ref_access): Likewise.
8288 (vect_analyze_data_ref_accesses): Likewise.
8289 (vect_vfa_segment_size): Likewise.
8290 (vect_small_gap_p): Likewise.
8291 (vectorizable_with_step_bound_p): Likewise.
8292 (vect_prune_runtime_alias_test_list): Likewise.
8293 (vect_analyze_data_refs): Likewise.
8294 (vect_supportable_dr_alignment): Likewise.
8295 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8296 (vect_gen_prolog_loop_niters): Likewise.
8297 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8298 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8300 (vect_recog_mask_conversion_pattern): Likewise.
8301 (vect_try_gather_scatter_pattern): Likewise.
8302 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8303 to vect_get_store_cost.
8304 (vect_get_store_cost): Get stmt_info instead of DR.
8305 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8306 (vect_get_load_cost): Get stmt_info instead of DR.
8308 2018-06-01 Richard Biener <rguenther@suse.de>
8311 * gimple-fold.c (var_decl_component_p): Also allow offsetted
8312 vars wrapped in MEM_REFs.
8314 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
8316 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8317 Fix subreg tests so that we only return a choice between
8318 GENERAL_REGS and FP_REGS if the original classes included both.
8320 2018-06-01 Richard Biener <rguenther@suse.de>
8323 * tree-ssa-structalias.c (get_function_part_constraint):
8324 Handle NULL fi->decl.
8325 (find_func_aliases_for_call): Properly handle indirect
8326 fi from direct call.
8327 (find_func_clobbers): Likewise.
8328 (ipa_pta_execute): Likewise.
8329 (create_variable_info_for): For functions that are ifunc_resolver
8330 resolve to a varinfo that contains the result of the resolver call.
8331 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8334 2018-05-31 Michael Collison <michael.collison@arm.com>
8336 * config/aarch64/aarch64.md:
8337 (*fix_to_zero_extenddfdi2): New pattern.
8338 * gcc.target/aarch64/fix_extend1.c: New testcase.
8340 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
8344 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8345 and BUILT_IN_STRNCMP_EQ.
8346 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8347 BUILT_IN_STRNCMP_EQ.
8348 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8349 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8350 (gimple_fold_builtin): Likewise.
8351 * tree-ssa-strlen.c (compute_string_length): New function.
8352 (determine_min_obsize): New function.
8353 (handle_builtin_string_cmp): New function to handle calls to
8354 string compare functions.
8355 (strlen_optimize_stmt): Add handling to builtin string compare
8357 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8358 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8359 * tree.c (build_common_builtin_nodes): Add new defines of
8360 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8362 2018-05-31 Jakub Jelinek <jakub@redhat.com>
8365 * bb-reorder.c (pass_partition_blocks::gate): Return false for
8366 functions with naked attribute.
8368 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8370 * config/i386/sse.md (avx_vec_concat<mode>):
8371 Substitute concat_tg_mode mode attribute with xtg_mode.
8372 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8373 (concat_tg_mode): Remove mode attribute.
8375 2018-05-31 Martin Sebor <msebor@redhat.com>
8378 * calls.c (alloc_max_size): Correct a logic error/typo.
8379 Treat excessive arguments as infinite. Warn for invalid arguments.
8380 * doc/invoke.texi (-Walloc-size-larger-than): Update.
8382 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
8385 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8386 and movx for Haswell.
8388 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
8389 Cesar Philippidis <cesar@codesourcery.com>
8392 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8393 when emitting error on private/firstprivate reductions.
8394 * omp-low.c (lower_omp_target): Avoid reference-type processing
8395 on pointers for firstprivate clause.
8397 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8399 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8402 * config/aarch64/aarch64-simd.md
8403 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8404 (aarch64_ld1_x3_<mode>): Likewise
8405 (aarch64_st1x2<VALLDIF:mode>): Likewise
8406 (aarch64_st1_x2_<mode>): Likewise
8407 (aarch64_st1x3<VALLDIF:mode>): Likewise
8408 (aarch64_st1_x3_<mode>): Likewise
8409 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8410 (vld1_s8_x3): Likewise.
8411 (vld1_u16_x3): Likewise.
8412 (vld1_s16_x3): Likewise.
8413 (vld1_u32_x3): Likewise.
8414 (vld1_s32_x3): Likewise.
8415 (vld1_u64_x3): Likewise.
8416 (vld1_s64_x3): Likewise.
8417 (vld1_f16_x3): Likewise.
8418 (vld1_f32_x3): Likewise.
8419 (vld1_f64_x3): Likewise.
8420 (vld1_p8_x3): Likewise.
8421 (vld1_p16_x3): Likewise.
8422 (vld1_p64_x3): Likewise.
8423 (vld1q_u8_x3): Likewise.
8424 (vld1q_s8_x3): Likewise.
8425 (vld1q_u16_x3): Likewise.
8426 (vld1q_s16_x3): Likewise.
8427 (vld1q_u32_x3): Likewise.
8428 (vld1q_s32_x3): Likewise.
8429 (vld1q_u64_x3): Likewise.
8430 (vld1q_s64_x3): Likewise.
8431 (vld1q_f16_x3): Likewise.
8432 (vld1q_f32_x3): Likewise.
8433 (vld1q_f64_x3): Likewise.
8434 (vld1q_p8_x3): Likewise.
8435 (vld1q_p16_x3): Likewise.
8436 (vld1q_p64_x3): Likewise.
8437 (vst1_s64_x2): Likewise.
8438 (vst1_u64_x2): Likewise.
8439 (vst1_f64_x2): Likewise.
8440 (vst1_s8_x2): Likewise.
8441 (vst1_p8_x2): Likewise.
8442 (vst1_s16_x2): Likewise.
8443 (vst1_p16_x2): Likewise.
8444 (vst1_s32_x2): Likewise.
8445 (vst1_u8_x2): Likewise.
8446 (vst1_u16_x2): Likewise.
8447 (vst1_u32_x2): Likewise.
8448 (vst1_f16_x2): Likewise.
8449 (vst1_f32_x2): Likewise.
8450 (vst1_p64_x2): Likewise.
8451 (vst1q_s8_x2): Likewise.
8452 (vst1q_p8_x2): Likewise.
8453 (vst1q_s16_x2): Likewise.
8454 (vst1q_p16_x2): Likewise.
8455 (vst1q_s32_x2): Likewise.
8456 (vst1q_s64_x2): Likewise.
8457 (vst1q_u8_x2): Likewise.
8458 (vst1q_u16_x2): Likewise.
8459 (vst1q_u32_x2): Likewise.
8460 (vst1q_u64_x2): Likewise.
8461 (vst1q_f16_x2): Likewise.
8462 (vst1q_f32_x2): Likewise.
8463 (vst1q_f64_x2): Likewise.
8464 (vst1q_p64_x2): Likewise.
8465 (vst1_s64_x3): Likewise.
8466 (vst1_u64_x3): Likewise.
8467 (vst1_f64_x3): Likewise.
8468 (vst1_s8_x3): Likewise.
8469 (vst1_p8_x3): Likewise.
8470 (vst1_s16_x3): Likewise.
8471 (vst1_p16_x3): Likewise.
8472 (vst1_s32_x3): Likewise.
8473 (vst1_u8_x3): Likewise.
8474 (vst1_u16_x3): Likewise.
8475 (vst1_u32_x3): Likewise.
8476 (vst1_f16_x3): Likewise.
8477 (vst1_f32_x3): Likewise.
8478 (vst1_p64_x3): Likewise.
8479 (vst1q_s8_x3): Likewise.
8480 (vst1q_p8_x3): Likewise.
8481 (vst1q_s16_x3): Likewise.
8482 (vst1q_p16_x3): Likewise.
8483 (vst1q_s32_x3): Likewise.
8484 (vst1q_s64_x3): Likewise.
8485 (vst1q_u8_x3): Likewise.
8486 (vst1q_u16_x3): Likewise.
8487 (vst1q_u32_x3): Likewise.
8488 (vst1q_u64_x3): Likewise.
8489 (vst1q_f16_x3): Likewise.
8490 (vst1q_f32_x3): Likewise.
8491 (vst1q_f64_x3): Likewise.
8492 (vst1q_p64_x3): Likewise.
8494 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8496 * config/msp430/msp430.c (msp430_output_labelref): Prepend
8497 user_label_prefix to name.
8499 * tree-core.h: Update comment about the format of NAME string
8500 passed to handler in attribute_spec.
8502 * config/msp430/msp430.md: Remove erroneous subreg expression from
8503 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8504 zero_extend{q,h}isi2.
8506 2018-05-30 Borislav Petkov <bp@suse.de>
8508 * doc/extend.texi: Document some architecture specific
8509 constraints and sort entries.
8511 2018-05-30 Martin Sebor <msebor@redhat.com>
8514 * builtins.c (expand_builtin_stpcpy_1): New function.
8515 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8516 only if the former succeeds.
8518 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8520 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8523 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8525 * doc/invoke.texi (-flinker-output): Document
8527 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8529 * passes.c (ipa_write_summaries): Only modify statements if body
8531 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8532 incrementally linking.
8533 (ipa_passes): Likewise.
8534 * lto-cgraph.c (lto_output_node): When incrementally linking do not
8535 pass down resolution info.
8536 * common.opt (flag_incremental_link): Update info.
8537 * gcc.c (plugin specs): Turn flinker-output=* to
8538 -plugin-opt=-linker-output-known
8539 * toplev.c (compile_file): Also cut compilation when doing incremental
8541 * flag-types. (enum lto_partition_model): Add
8542 LTO_LINKER_OUTPUT_NOLTOREL.
8543 (invoke.texi): Add -flinker-output docs.
8544 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8545 link same way as WPA; do not stream in dead initializers.
8547 * dwarf2out.c (dwarf2out_die_ref_for_decl,
8548 darf2out_register_external_decl): Support incremental link.
8550 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8552 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8554 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
8556 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8557 it down to simple_object_copy_lto_debug_sections.
8558 (run_gcc): Determine incremental LTO link time and configure
8559 lto1 into non-wpa mode, disable renaming of debug sections.
8561 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
8563 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8564 descriptions of various incorrectly documented functions.
8566 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
8569 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8570 address check not strict.
8572 2018-05-30 Richard Biener <rguenther@suse.de>
8574 PR tree-optimization/85964
8575 * tracer.c (better_p): Drop initialized count check, we only
8576 call the function with initialized counts now.
8577 (find_best_successor): Do find a best edge if one
8578 has uninitialized count.
8579 (find_best_predecessor): Likewise. Do BB frequency check only
8580 if count is initialized.
8582 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
8584 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8585 (aarch64_ldrstr_offset_compare): New.
8586 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8587 load/store orderings.
8588 (aarch64_gen_adjusted_ldpstp): Likewise.
8590 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
8592 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8593 Check for subset of GENERAL_REGS and FP_REGS.
8594 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8597 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
8599 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8600 and wi::to_poly_offset. Add the current offset and then check
8601 whether the sum fits, rather than using an unchecked addition of
8602 a checked term. Check for a shwi rather than a uhwi.
8603 * expr.c (get_bit_range): Use tree_to_poly_uint64.
8604 (store_constructor): Use poly_int_tree_p.
8605 (expand_expr_real_1): Likewise.
8606 * function.c (assign_temp): Likewise.
8607 * fold-const.c (const_binop): Use poly_int_tree_p and
8609 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
8611 * ipa-icf-gimple.c (func_checker::compare_operand): Use
8612 to_poly_offset for MEM offsets.
8613 * ipa-icf.c (sem_variable::equals): Likewise.
8614 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8615 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8616 wi::to_poly_offset for BIT_FIELD_REF offsets.
8617 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8619 * var-tracking.c (emit_note_insn_var_location): Use
8620 tree_to_poly_uint64.
8622 2018-05-29 Jim Wilson <jimw@sifive.com>
8624 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8626 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
8629 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8630 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8632 (sse4_1_round<mode>2): Use nonimmediate_operand
8633 for operand 1 predicate.
8635 2018-05-29 Martin Sebor <msebor@redhat.com>
8636 Richard Biener <rguenther@suse.de>
8639 * calls.c (get_size_range): Call determine_value_range instead
8640 of get_value_range..
8641 * tree-vrp.h (determine_value_range): Declared new function.
8642 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8644 2018-05-29 Richard Biener <rguenther@suse.de>
8646 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8647 sure to use non-pattern stmts for get_earlier_stmt arguments.
8648 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8649 called on pattern stmts.
8650 (get_later_stmt): Likewise.
8652 2018-05-29 Martin Liska <mliska@suse.cz>
8654 PR gcov-profile/85759
8655 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8658 2018-05-29 Jakub Jelinek <jakub@redhat.com>
8660 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8662 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8666 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8667 VEC_PACK_FLOAT_EXPR): New tree codes.
8668 * tree-pretty-print.c (op_code_prio): Handle
8669 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8670 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8671 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8672 * tree-inline.c (estimate_operator_cost): Likewise.
8673 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8674 * fold-const.c (const_binop): Likewise.
8675 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8676 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8677 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8678 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8679 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8680 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8681 * expr.c (expand_expr_real_2): Likewise.
8682 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8683 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8684 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8686 * optabs.c (expand_widen_pattern_expr): For
8687 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8688 sign from result type rather than operand's type.
8689 (expand_binop_directly): For vec_packu_float_optab and
8690 vec_packs_float_optab allow result type to be different from operand's
8692 * optabs-tree.c (optab_for_tree_code): Handle
8693 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8694 VEC_PACK_FLOAT_EXPR. Formatting fixes.
8695 * tree-vect-generic.c (expand_vector_operations_1): Handle
8696 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8697 VEC_PACK_FLOAT_EXPR.
8698 * tree-vect-stmts.c (supportable_widening_operation): Handle
8700 (supportable_narrowing_operation): Handle FLOAT_EXPR.
8701 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8702 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8703 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
8704 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8706 (vec_pack<floatprefix>_float_<mode>): New expander.
8707 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8709 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8710 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8711 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8712 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8713 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8715 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8716 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8717 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8718 VEC_PACK_FLOAT_EXPR): Document.
8720 2018-05-29 Richard Biener <rguenther@suse.de>
8722 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8724 (stmt_vec_info_vec): Make pointer.
8725 (init_stmt_vec_info_vec): Remove.
8726 (free_stmt_vec_info_vec): Likewise.
8727 (set_stmt_vec_info_vec): New function.
8728 (free_stmt_vec_infos): Likewise.
8729 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8730 (set_vinfo_for_stmt): Likewise.
8731 (get_earlier_stmt): Likewise.
8732 (get_later_stmt): Likewise.
8733 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8734 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8735 (vec_info::~vec_info): Free stmt_vec_infos.
8736 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8737 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8738 (pass_slp_vectorize::execute): Likewise.
8739 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8740 (free_stmt_vec_info_vec): Likewise.
8741 (set_stmt_vec_info_vec): New function.
8742 (free_stmt_vec_infos): Likewise.
8743 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8744 the global stmt_vec_info_vec.
8745 * tree-parloops.c (gather_scalar_reductions): Use
8746 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8749 2018-05-29 Richard Biener <rguenther@suse.de>
8751 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8753 2018-05-29 Martin Liska <mliska@suse.cz>
8754 David Malcolm <dmalcolm@redhat.com>
8756 * vec.c (test_reverse): New.
8757 (vec_c_tests): Add new test.
8758 * vec.h (vl_ptr>::reverse): New function.
8760 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
8762 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8764 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8767 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
8769 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8771 2018-05-28 Richard Biener <rguenther@suse.de>
8773 PR tree-optimization/85933
8774 * tree-vect-data-refs.c (vect_record_base_alignments): Only
8775 look at stmts marked as vectorizable.
8777 2018-05-28 Richard Biener <rguenther@suse.de>
8779 PR tree-optimization/85934
8780 * tree-vect-generic.c (expand_vector_operations_1): Hoist
8781 vector boolean check before scalar optimization.
8783 2018-05-28 Jakub Jelinek <jakub@redhat.com>
8785 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8788 2018-05-28 Mark Wielaard <mark@klomp.org>
8790 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8791 if it is an expression containing a minus sign.
8793 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
8795 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8797 2018-05-27 Paul Koning <ni1d@arrl.net>
8799 * config/pdp11/pdp11.md (truncsihi2): Remove.
8801 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
8802 Chung-Ju Wu <jasonwucj@gmail.com>
8804 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8806 (unaligned_store_dw): Ditto.
8807 * config/nds32/nds32-memory-manipulation.c
8808 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8809 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8810 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8811 (emit_setmem_word_loop): Rename to ...
8812 (emit_setmem_doubleword_loop): ... this.
8813 (nds32_gen_dup_4_byte_to_word_value): New function.
8814 (nds32_gen_dup_8_byte_to_double_word_value): New function.
8815 (nds32_expand_setmem_loop): Refine implementation.
8816 (nds32_expand_setmem_loop_v3m): Ditto.
8817 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8820 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8822 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8824 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8826 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8827 (nds32_init_machine_status): Initialize machine->attr_naked_p and
8828 machine->attr_no_prologue_p.
8829 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8830 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8831 (nds32_expand_epilogue): Consider attr_naked_p.
8832 (nds32_expand_epilogue_v3pop): Likewise.
8833 (nds32_can_use_return_insn): Likewise.
8834 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8835 attr_no_prologue_p fields.
8836 * config/nds32/nds32.opt (mret-in-naked-func): New option.
8838 2018-05-27 Jakub Jelinek <jakub@redhat.com>
8841 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8843 * config/i386/sse.md
8844 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8846 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8848 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8850 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8852 (*<floatsuffix>floatv2div2sf2): Rename to ...
8853 (*float<floatunssuffix>v2div2sf2): ... this.
8854 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8855 (float<floatunssuffix>v2div2sf2_mask): ... this.
8856 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8857 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8858 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8860 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8862 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8864 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8866 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8868 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8870 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8871 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8872 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8873 gen_ufix_truncv8dfv8si2.
8874 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8875 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8876 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8877 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8878 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8879 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8880 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8881 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8883 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8887 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8889 2018-05-25 Jim Wilson <jimw@sifive.com>
8891 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8892 * config/riscv/riscv.c (struct machine_function): Add
8893 interrupt_handler_p and attribute_checked_p fields.
8894 (riscv_attribute_table): Add interrupt.
8895 (riscv_interrupt_type_p): New.
8896 (riscv_save_reg_p): Save extra regs for interrupt handler.
8897 (riscv_use_save_libcall): Return false for interrupt handler.
8898 (riscv_first_stack_step): Add forward declaration.
8899 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
8900 for interrupt handler with large frame. Use it for saved reg list.
8901 (riscv_expand_prologue): Move flag_stack_usage_info support to
8902 eliminate duplication.
8903 (riscv_expand_epilogue): Generate mret for interrupt handler.
8904 (riscv_epilogue_uses): New.
8905 (riscv_can_use_return_insn): Return false for interrupt handler.
8906 (riscv_function_ok_for_sibcall): Likewise.
8907 (riscv_set_current_function): Add interrupt handler support.
8908 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8909 * config/riscv/riscv.md (UNSPECV_MRET): New.
8911 (riscv_frflags, riscv_fsflags): Use tab after opcode.
8913 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8915 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
8917 PR tree-optimization/85712
8918 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8919 this candidate has already been replaced in-situ by a copy.
8921 2018-05-25 Jason Merrill <jason@redhat.com>
8923 PR c++/80485 - inline function non-zero address.
8924 * symtab.c (nonzero_address): Check DECL_COMDAT.
8926 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
8929 * config/alpha/alpha.md (ashlsi3): New insn pattern.
8930 (*ashlsi_se): Rename from *ashldi_se. Define as sign
8931 extension of SImode operation. Use const123_operand predicate.
8932 (*saddsi_1): Remove.
8933 (*saddl_se_1): Ditto.
8935 (*ssubl_se_1): Ditto.
8936 * config/alpha/predicates.md (const123_operand): New predicate.
8937 * config/alpha/constraints.md (P): Use IN_RANGE.
8939 2018-05-25 Richard Biener <rguenther@suse.de>
8941 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8943 (ref_maybe_used_by_stmt_p): Likewise.
8944 (stmt_may_clobber_ref_p): Likewise.
8945 (stmt_may_clobber_ref_p_1): Likewise.
8946 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8948 (ref_maybe_used_by_stmt_p): Likewise.
8949 (stmt_may_clobber_ref_p): Likewise.
8950 (stmt_may_clobber_ref_p_1): Likewise.
8951 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8952 the alias oracle to disambiguate DRs with stmts DR analysis
8954 (vect_analyze_data_refs): Do not give up on not analyzable
8955 DRs for BB vectorization. Remove code truncating the dataref
8958 2018-05-25 Jakub Jelinek <jakub@redhat.com>
8961 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8962 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
8963 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8965 2018-05-25 Richard Biener <rguenther@suse.de>
8967 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8968 function, combining stmt data ref gathering and fatal analysis
8970 (vect_analyze_data_refs): Remove now redudnant code and simplify.
8971 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8972 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8973 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8974 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8976 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8978 PR tree-optimization/85720
8979 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8980 SCC if all partitions are builtins.
8981 (version_loop_by_alias_check): New parameter. Generate cancelable
8982 runtime alias check if all partitions are builtins.
8983 (distribute_loop): Update call to above function.
8985 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8987 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8988 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8989 (parm_default_def_partition_arg): Ditto.
8990 (set_parm_default_def_partition): Ditto.
8991 (get_parm_default_def_partitions): Ditto and make it static.
8992 (get_undefined_value_partitions): Ditto and make it static.
8993 (remove_ssa_form): Refactor call to init_var_map here.
8994 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8995 computation for loop region.
8996 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8997 (register_default_def): Delete.
8998 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8999 (parm_default_def_partition_arg): Ditto.
9000 (set_parm_default_def_partition): Ditto.
9001 (get_parm_default_def_partitions): Ditto and make it static.
9002 (get_undefined_value_partitions): Ditto and make it static.
9003 (coalesce_with_default, coalesce_with_default): Update comment.
9004 (create_coalesce_list_for_region): New func factored out from
9005 create_outofssa_var_map.
9006 (populate_coalesce_list_for_outofssa): New func factored out from
9007 create_outofssa_var_map and coalesce_ssa_name.
9008 (create_outofssa_var_map): Delete.
9009 (coalesce_ssa_name): Refactor to support live range computation.
9010 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9011 (get_parm_default_def_partitions): Delete.
9012 (get_undefined_value_partitions): Ditto.
9013 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9014 computation for loop region.
9015 (new_tree_live_info, loe_visit_block): Ditto.
9016 (live_worklist, set_var_live_on_entry): Ditto.
9017 (calculate_live_on_exit, verify_live_on_entry): Ditto.
9018 * tree-ssa-live.h (struct _var_map): New fields.
9019 (init_var_map): Change decl.
9020 (region_contains_p): New.
9022 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9024 * tree-ssa-live.h (live_merge_and_clear): Delete.
9026 2018-05-25 Richard Biener <rguenther@suse.de>
9029 * tree-dump.c (dequeue_and_dump): Remove access to removed
9030 operand 2 of a SWITCH_EXPR.
9032 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9034 * doc/sourcebuild.texi (vect_double_cond_arith): Include
9035 multiplication and division.
9036 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9037 (cond_udiv@var{m}, cond_umod@var{m}): Document.
9038 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9039 (cond_udiv_optab, cond_umod_optab): New optabs.
9040 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9041 (IFN_COND_RDIV): New internal functions.
9042 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9043 TRUNC_MOD_EXPR and RDIV_EXPR.
9044 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9045 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9047 (SVE_INT_BINARY): Include mult.
9048 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9049 (optab, sve_int_op): Handle mult.
9050 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9052 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9053 for SVE_INT_BINARY_SD.
9055 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9057 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9058 (optab, sve_int_op): Handle div and udiv.
9059 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9060 for SVE_INT_BINARY_SD.
9061 (*<optab><mode>3): New insn for the same.
9063 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9065 * tree-vect-patterns.c: Include predict.h.
9066 (vect_recog_divmod_pattern): Restrict check for division support
9067 to when optimizing for size.
9069 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9071 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9072 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9073 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9074 (gimple_match_op::set_op): Likewise.
9075 (gimple_resimplify4): Declare.
9076 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9077 (expr::gen_transform): Likewise.
9078 (decision_tree::gen): Generate a simplification routine for 4 operands.
9079 * gimple-match-head.c (gimple_simplify): Add an overload for
9080 4 operands. In the top-level function, handle up to 4 call
9081 arguments and call gimple_resimplify4.
9082 (gimple_resimplify4): New function.
9083 (build_call_internal): Pass a fourth operand.
9084 (maybe_push_to_seq): Likewise.
9085 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9086 Fold VEC_COND_EXPRs of an operation and a default value into
9087 an IFN_COND_* function if possible.
9088 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9090 (SVE_COND_FP_BINARY): Include them.
9091 (optab, sve_fp_op): Handle them.
9092 (SVE_INT_BINARY_REV): New code iterator.
9093 (SVE_COND_FP_BINARY_REV): New int iterator.
9094 (commutative): New int attribute.
9095 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9097 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9099 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9100 (*cond_<optab><mode>): New patterns for reversed operands.
9102 2018-05-25 Richard Biener <rguenther@suse.de>
9104 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9105 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9106 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9107 (STMT_VINFO_GROUPED_ACCESS): Adjust.
9108 * tree-vect-data-refs.c (everywhere): Adjust users.
9109 * tree-vect-loop.c (everywhere): Likewise.
9110 * tree-vect-slp.c (everywhere): Likewise.
9111 * tree-vect-stmts.c (everywhere): Likewise.
9112 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9114 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9116 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9118 (gcc_cv_as_section_exclude): ... this.
9119 Try Solaris as #exclude syntax.
9120 * configure: Regenerate.
9121 * config.in: Regenerate.
9122 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9124 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9125 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9127 * varasm.c (default_elf_asm_named_section): Don't check if
9128 HAVE_GAS_SECTION_EXCLUDE is defined.
9130 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9132 * doc/md.texi: Update the documentation of the cond_* optabs
9133 to mention the new final operand. Fix GET_MODE_NUNITS call.
9134 Describe the scalar case too.
9135 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9136 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9138 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9139 (get_conditional_internal_fn): Update comment.
9140 * tree-vect-loop.c (vectorizable_reduction): Pass the original
9141 accumulator value as a final argument to conditional functions.
9142 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9143 a define_expand and add an "else" operand. Assert for now that
9144 the else operand is equal to operand 2. Use SVE_INT_BINARY and
9145 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9146 (*cond_<optab><mode>): New patterns.
9147 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9148 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9149 (UNSPEC_COND_EOR): Delete.
9150 (optab): Remove associated mappings.
9151 (SVE_INT_BINARY): New code iterator.
9152 (sve_int_op): Remove int attribute and add "minus" to the code
9154 (SVE_COND_INT_OP): Delete.
9155 (SVE_COND_FP_OP): Rename to...
9156 (SVE_COND_FP_BINARY): ...this.
9158 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9160 * optabs.c (can_reuse_operands_p): New function.
9161 (maybe_legitimize_operands): Try to reuse the results for
9164 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9166 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9167 Add {q} suffix to insn mnemonic.
9169 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9171 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9172 (msp430_warn_func_return): New.
9174 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
9176 * fold-const.c (tree_nonzero_bits): New function.
9177 * fold-const.h (tree_nonzero_bits): Likewise.
9178 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9179 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9181 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9185 * varasm.c (assemble_alias): Check ifunc_resolver only on
9188 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9191 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9192 when memory input operand is handled.
9194 2018-05-24 Luis Machado <luis.machado@linaro.org>
9196 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9198 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9200 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9202 * match.pd: Delay FMA folds until after vectorization.
9204 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
9207 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9208 address check not strict.
9210 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9212 * gimple-match.h (gimple_match_op): New class.
9213 (mprts_hook): Replace parameters with a gimple_match_op *.
9214 (maybe_build_generic_op): Likewise.
9215 (gimple_simplified_result_is_gimple_val): Replace parameters with
9216 a const gimple_match_op *.
9217 (gimple_simplify): Replace code_helper * and tree * parameters with
9218 a gimple_match_op * parameter.
9219 (gimple_resimplify1): Replace code_helper *, tree and tree *
9220 parameters with a gimple_match_op * parameter.
9221 (gimple_resimplify2): Likewise.
9222 (gimple_resimplify3): Likewise.
9223 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9224 parameters with a gimple_match_op * parameter.
9225 * gimple-match-head.c (gimple_simplify): Change prototypes of
9226 auto-generated functions to take a gimple_match_op * instead of
9227 separate code_helper * and tree * parameters. Make the same
9228 change in the top-level overload and update calls to the
9229 gimple_resimplify routines. Update calls to the auto-generated
9230 functions and to maybe_push_res_to_seq in the publicly-facing
9231 operation-specific gimple_simplify overloads.
9232 (gimple_match_op::MAX_NUM_OPS): Define.
9233 (gimple_resimplify1): Replace rcode and ops with a single res_op
9234 parameter. Update call to gimple_simplify.
9235 (gimple_resimplify2): Likewise.
9236 (gimple_resimplify3): Likewise.
9237 (mprts_hook): Replace parameters with a gimple_match_op *.
9238 (maybe_build_generic_op): Likewise.
9239 (build_call_internal): Replace type, nargs and ops with
9240 a gimple_match_op *.
9241 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9242 with a single gimple_match_op *. Update calls to mprts_hook,
9243 build_call_internal and gimple_simplified_result_is_gimple_val.
9244 Factor out code that is common to the tree_code and combined_fn cases.
9245 * genmatch.c (expr::gen_transform): Replace tem_code and
9246 tem_ops with a gimple_match_op called tem_op. Update calls
9247 to the gimple_resimplify functions and maybe_push_res_to_seq.
9248 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9249 res_ops. Update call to the gimple_resimplify functions.
9250 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9251 (decision_tree::gen): Make the functions take a gimple_match_op *
9252 called res_op instead of separate res_code and res_ops parameters.
9253 Update call accordingly.
9254 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9255 and ops with a single res_op parameter. Update calls to
9256 maybe_build_generic_op and maybe_push_res_to_seq.
9257 (fold_stmt_1): Update calls to gimple_simplify and
9258 replace_stmt_with_simplification.
9259 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9260 and gimple_simplified_result_is_gimple_val.
9261 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9263 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9264 with a gimple_match_op *.
9265 (vn_nary_build_or_lookup): Likewise. Update call to
9266 vn_nary_build_or_lookup_1.
9267 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9268 gimple_match_op *. Update calls to the gimple_resimplify routines
9269 and to gimple_simplified_result_is_gimple_val.
9270 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9271 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9272 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9273 (visit_nary_op): Likewise.
9274 (visit_reference_op_load): Likewise.
9276 2018-05-23 Luis Machado <luis.machado@linaro.org>
9278 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9279 modifier for printing the step amount.
9281 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
9284 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9287 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
9289 * doc/sourcebuild.texi (Endianness): New subsubsection.
9291 2018-05-23 Luis Machado <luis.machado@linaro.org>
9293 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9294 <prefetch_dynamic_strides>: New const bool field.
9295 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9296 prefetch_dynamic_strides.
9297 (exynosm1_prefetch_tune): Likewise.
9298 (thunderxt88_prefetch_tune): Likewise.
9299 (thunderx_prefetch_tune): Likewise.
9300 (thunderx2t99_prefetch_tune): Likewise.
9301 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9303 (aarch64_override_options_internal): Update to set
9304 PARAM_PREFETCH_DYNAMIC_STRIDES.
9305 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9306 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9307 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9308 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9309 prefetch-dynamic-strides setting.
9311 2018-05-23 Luis Machado <luis.machado@linaro.org>
9313 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9314 <minimum_stride>: New const int field.
9315 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9316 minimum_stride field defaulting to -1.
9317 (exynosm1_prefetch_tune): Likewise.
9318 (thunderxt88_prefetch_tune): Likewise.
9319 (thunderx_prefetch_tune): Likewise.
9320 (thunderx2t99_prefetch_tune): Likewise.
9321 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9322 <default_opt_level>: Set to 3.
9323 (aarch64_override_options_internal): Update to set
9324 PARAM_PREFETCH_MINIMUM_STRIDE.
9325 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9326 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9327 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9328 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9329 stride is constant and is below the minimum stride threshold.
9331 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9333 * config/arm/arm-cpus.in (mode26): Delete.
9334 (armv4): Delete mode26 reference.
9335 * config/arm/arm.c (arm_configure_build_target): Delete use of
9338 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
9340 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9342 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9343 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
9345 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
9346 (floatunsdidf2): Ditto.
9348 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
9350 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9351 (fixuns_trunc<mode>si2_avx512f): Ditto.
9352 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9353 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9354 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9356 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
9358 PR rtl-optimization/79985
9359 * df-scan.c (df_insn_refs_collect): Remove special case for
9360 global registers and asm statements.
9362 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
9364 * extend.texi (Global Register Variables): Rewrite the bullet list.
9365 Note that the register is available for allocation. Note that access
9366 via inline asm must use constraints. Add note about async-signal
9367 handlers. Remove paragraph about automagic register selection.
9369 2018-05-23 Richard Biener <rguenther@suse.de>
9371 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9372 of fixed offset from memset VN.
9374 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
9376 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9378 (alloc_cand_and_find_basis): Initialize first_interp field.
9379 (slsr_process_mul): Modify first_interp field.
9380 (slsr_process_add): Likewise.
9381 (slsr_process_cast): Modify first_interp field for each new
9383 (slsr_process_copy): Likewise.
9384 (dump_candidate): Dump first_interp field.
9385 (replace_mult_candidate): Process all interpretations, not just
9387 (replace_rhs_if_not_dup): Likewise.
9388 (replace_one_candidate): Likewise.
9390 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
9392 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9394 (aarch64_needs_frame_chain): New function.
9395 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9397 2018-05-23 Sudakshina Das <sudi.das@arm.com>
9400 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9401 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9402 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9403 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9404 as true for strict-align.
9405 (aarch64_can_inline_p): Perform checks even when callee has no
9406 attributes to check for strict alignment.
9407 * doc/extend.texi (AArch64 Function Attributes): Document
9409 * doc/invoke.texi: (AArch64 Options): Likewise.
9411 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
9413 PR tree-optimization/85853
9414 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9415 the handling of the root of the node to...
9416 (vect_slp_analyze_node_operations_1): ...this new function,
9417 and run the whole thing with the child nodes' def types
9418 set according to their SLP node's def type.
9420 2018-05-23 Richard Biener <rguenther@suse.de>
9423 * tree-data-ref.c (create_runtime_alias_checks): Defer
9424 and ignore overflow warnings.
9426 2018-05-23 Yury Gribov <tetra2005@gmail.com>
9428 PR tree-optimization/85822
9429 * tree-vrp.c (is_masked_range_test): Fix handling of negative
9432 2018-05-23 Richard Biener <rguenther@suse.de>
9434 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9435 memset constants via native_interpret_expr.
9437 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
9440 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9442 (cgraph_node::create_alias): Likewise.
9443 (cgraph_node::get_availability): Check ifunc_resolver instead
9444 of looking up ifunc attribute.
9445 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9446 * varasm.c (do_assemble_alias): Likewise.
9447 (assemble_alias): Likewise.
9448 (default_binds_local_p_3): Likewise.
9449 * cgraph.h (cgraph_node): Add ifunc_resolver.
9450 (cgraph_node::only_called_directly_or_aliased_p): Return false
9452 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9454 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9455 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9456 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9457 instead of looking up ifunc attribute.
9459 2018-05-22 Luis Machado <luis.machado@linaro.org>
9461 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9463 2018-05-22 Martin Sebor <msebor@redhat.com>
9466 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9467 only when expasion succeeds.
9468 (expand_builtin_strcmp): Same.
9469 (expand_builtin_strncmp): Same.
9471 2018-05-22 Martin Sebor <msebor@redhat.com>
9473 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9475 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
9476 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9478 * config/aarch64/aarch64-ldpstp.md: Replace uses of
9479 aarch64_mem_pair_operand with memory_operand and delete operand swapping
9481 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9482 Add check for legitimate_address.
9483 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9484 (aarch64_swap_ldrstr_operands): New.
9485 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9488 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
9489 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9491 * config/aarch64/aarch64.md: New patterns to generate stp
9493 (store_pair_sw, store_pair_dw): New patterns to generate stp for
9494 single words and double words.
9495 (load_pair_sw, load_pair_dw): Likewise.
9496 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9498 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9500 * config/aarch64/aarch64-ldpstp.md: Modify peephole
9501 for different mode ldpstp and add peephole for merged zero stores.
9503 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9505 (aarch64_gen_store_pair): Rename calls to match new patterns.
9506 (aarch64_gen_load_pair): Rename calls to match new patterns.
9507 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9508 (load_pair<DREG:mode><DREG2:mode>): ... This.
9509 (store_pair<mode>): Rename to...
9510 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9511 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9513 (V_INT_EQUIV): Handle SImode.
9514 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9517 2018-05-22 Martin Sebor <msebor@redhat.com>
9520 * calls.c (maybe_warn_nonstring_arg): Use string length to set
9521 or ajust the presumed bound on an operation to avoid unnecessary
9524 2018-05-22 Martin Sebor <msebor@redhat.com>
9526 PR tree-optimization/85826
9527 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9528 assuming that a DECL necesarily has a constant size.
9530 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
9533 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9535 2018-05-22 Richard Biener <rguenther@suse.de>
9537 PR tree-optimization/85834
9538 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9539 non-constant and non-zero memset arguments.
9541 2018-05-22 Martin Liska <mliska@suse.cz>
9544 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9546 2018-05-22 Richard Biener <rguenther@suse.de>
9548 PR tree-optimization/85863
9549 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9550 comparisons when vectype is specified.
9551 (vectorizable_condition): Do not specify vectype for
9552 vect_is_simple_cond when SLP vectorizing.
9554 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
9557 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9558 define __ibm128 as long double.
9559 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9560 as a distinct type when IEEE 128-bit support is enabled.
9561 (init_float128_ieee): Fix up conversions between IFmode and IEEE
9562 128-bit types to use the correct functions.
9563 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9564 convert between 128-bit floating point types that have different
9565 modes but the same representation, instead of using gen_lowpart to
9567 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9569 (IFKF_reg): New attributes to give the register constraints for
9571 (extend<mode>tf2_internal): New insns to mark an explicit
9572 conversion between 128-bit floating point types that have a
9573 different mode but share the same representation.
9575 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
9577 PR tree-optimization/85814
9578 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9579 a null return from get_strinfo when unsharing the next
9580 strinfo in the chain.
9582 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9585 * varasm.c (weak_finish): Clean up weak_decls.
9587 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9589 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9590 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9591 UNSPEC_UADALP values.
9592 * config/aarch64/iterators.md (ABAL): New int iterator.
9595 (sur): Add mappings for the above.
9596 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9598 (aarch64_<sur>abal<mode>_4): Likewise.
9599 (aarch64_<sur>adalp<mode>_3): Likewise.
9600 (<sur>sadv16qi): New define_expand.
9602 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
9604 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9605 (*movdf_internal): Ditto.
9606 (*rcpsf2_sse): Ditto.
9607 (*rsqrtsf2_sse): Ditto.
9608 (*sqrt<mode>2_sse): Ditto.
9610 2018-05-21 Tamar Christina <tamar.christina@arm.com>
9612 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9614 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9615 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9616 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9617 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9619 * config/aarch64/arm_neon.h: Likewise.
9620 * config/aarch64/iterators.md (VQ_I): New.
9622 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
9624 * config.gcc: Add arc/t-multilib-linux to tmake_file for
9626 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9629 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
9631 * config/nds32/constraints.md (S): New constraint.
9632 * config/nds32/nds32.md (call_internal): Use constraint S.
9633 (call_value_internal): Likewise.
9634 (sibcall_internal): Likewise.
9635 (sibcall_value_internal): Likewise.
9637 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
9638 Chung-Ju Wu <jasonwucj@gmail.com>
9640 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9643 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
9644 Chung-Ju Wu <jasonwucj@gmail.com>
9646 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9647 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9648 (nds32_rtx_costs_impl): Simplify.
9649 (nds32_address_cost_impl): Simplify.
9650 (nds32_init_rtx_costs): New function.
9651 (nds32_rtx_costs_speed_prefer): Likewise.
9652 (nds32_rtx_costs_size_prefer): Likewise.
9653 (nds32_address_cost_speed_prefer): Likewise.
9654 (nds32_address_cost_speed_fwprop): Likewise.
9655 (nds32_address_cost_size_prefer): Likewise.
9656 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9657 * config/nds32/nds32.c (nds32_option_override): Use
9658 nds32_init_rtx_costs function.
9660 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
9662 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9663 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9664 (TARGET_PIPELINE_N8): Likewise.
9665 (TARGET_PIPELINE_N10): Likewise.
9666 (TARGET_PIPELINE_N13): Likewise.
9667 (TARGET_PIPELINE_GRAYWOLF): Likewise.
9669 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
9671 * config/nds32/nds32-fpu.md: Update copyright year.
9673 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9675 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9677 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9679 * config/nds32/nds32.c
9680 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9681 * config/nds32/nds32.opt (minline-asm-r15): New option.
9683 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9685 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9687 * config/nds32/nds32.md (abssi2): New pattern.
9689 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
9691 * config/i386/i386.md (rex64namesuffix): New mode attribute.
9692 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9693 Merge insn pattern from sse_cvtsi2ss<round_name> and
9694 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9695 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9696 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9697 using SWI48 mode iterator.
9698 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9699 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9700 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9701 pattern from sse_cvttss2si<round_saeonly_name>
9702 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9703 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9704 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9705 using SWI48 mode iterator.
9706 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9707 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9708 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9709 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9710 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9711 using SWI48 mode iterator.
9712 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9713 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9714 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9715 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9716 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9717 SWI48 mode iterator.
9718 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9719 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9720 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9721 pattern from sse_cvttsd2si<round_saeonly_name>
9722 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9724 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9726 * config/nds32/nds32-md-auxiliary.c
9727 (nds32_valid_smw_lwm_base_p): Refine.
9728 (nds32_output_smw_single_word): Refine.
9729 (nds32_output_smw_double_word): New.
9730 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9732 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9734 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9735 (nds32_output_stack_pop): Refine.
9736 (nds32_expand_unaligned_load): Refine.
9737 (nds32_expand_unaligned_store): Refine.
9739 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9740 Chung-Ju Wu <jasonwucj@gmail.com>
9742 * config/nds32/constants.md: Add TP_REGNUM constant.
9743 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9744 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9746 * config/nds32/nds32-doubleword.md: Consider flag_pic.
9747 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9748 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9749 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9750 and PIC code generation.
9751 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9753 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9755 * config/nds32/nds32.md: Support TLS and PIC.
9756 * config/nds32/nds32.c: Support TLS and PIC.
9757 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9758 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9761 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
9763 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9764 mode with E_ prefix.
9766 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9767 Chung-Ju Wu <jasonwucj@gmail.com>
9769 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9770 * config/nds32/nds32-md-auxiliary.c
9771 (symbolic_reference_mentioned_p): New.
9772 (nds32_legitimize_ict_address): New.
9773 (nds32_expand_ict_move): New.
9774 (nds32_indirect_call_referenced_p): New.
9775 (nds32_symbol_binds_local_p): Delete.
9776 (nds32_long_call_p): Modify.
9777 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9778 * config/nds32/nds32-protos.h
9779 (symbolic_reference_mentioned_p): Declare.
9780 (nds32_legitimize_ict_address): Declare.
9781 (nds32_expand_ict_move): Declare.
9782 (nds32_indirect_call_referenced_p): Declare.
9783 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9784 (nds32_relax_group): Use nds32_ict_const_p as condition.
9785 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9786 (nds32_asm_file_start): Output ict_model directive in asm code.
9787 (nds32_legitimate_address_p): Consider indirect call.
9788 (nds32_print_operand): Consider indirect call.
9789 (nds32_print_operand_address): Consider indirect call.
9790 (nds32_insert_attributes): Handle "indirect_call" attribute.
9791 (TARGET_LEGITIMATE_ADDRESS_P): Define.
9792 (TARGET_LEGITIMATE_CONSTANT_P): Define.
9793 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9794 (TARGET_DELEGITIMIZE_ADDRESS): Define.
9795 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9796 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9797 (TARGET_ICT_MODEL_SMALL): Define.
9798 (TARGET_ICT_MODEL_LARGE): Define.
9799 * config/nds32/nds32.md (movsi): Consider ict model.
9800 (call, call_value): Consider ict model.
9801 (sibcall, sibcall_value): Consider ict model.
9802 * config/nds32/nds32.opt (mict-model): New option.
9803 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9806 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
9807 Monk Chiang <sh.chiang04@gmail.com>
9808 Jim Wilson <jimw@sifive.com>
9810 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9811 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
9812 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9813 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9814 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
9815 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9816 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9817 compute save_libcall_adjustment properly.
9818 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9819 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9820 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9821 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9822 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9823 (ABI_SPEC): Handle mabi=ilp32e.
9824 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9825 (RVE): Add RVE mask.
9826 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9827 <-march>: Add rv32e as an example.
9829 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
9832 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9833 (intra_create_variable_infos): Handle C++ constructors.
9835 2018-05-18 Martin Liska <mliska@suse.cz>
9837 * passes.def: Remove a redundant pass.
9839 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
9842 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9844 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9846 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9848 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9850 (armv2, armv2a, armv3, armv3m): Delete architectures.
9851 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9852 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9853 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9855 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9856 (*mulsidi3adddi): Likewise.
9857 (mulsidi3): Likewise.
9858 (*mulsidi3_nov6): Likewise.
9859 (umulsidi3): Likewise.
9860 (umulsidi3_nov6): Likewise.
9861 (umaddsidi4): Likewise.
9862 (*umulsidi3adddi): Likewise.
9863 (smulsi3_highpart): Likewise.
9864 (*smulsi3_highpart_nov6): Likewise.
9865 (umulsi3_highpart): Likewise.
9866 (*umulsi3_highpart_nov6): Likewise.
9867 * config/arm/arm.h (arm_arch3m): Delete.
9868 * config/arm/arm.c (arm_arch3m): Delete.
9869 (arm_option_override_internal): Update armv3-related comment.
9870 (arm_configure_build_target): Delete use of isa_bit_mode32.
9871 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9872 (arm_rtx_costs_internal): Delete check of arm_arch3m.
9873 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9875 (mulusa3): Likewise.
9876 * config/arm/arm-protos.h (arm_arch3m): Delete.
9877 * config/arm/arm-tables.opt: Regenerate.
9878 * config/arm/arm-tune.md: Likewise.
9879 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9880 deleted architectures.
9882 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9884 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9885 (armv5t, armv5te): New features.
9886 (ARMv5, ARMv5e): Delete fgroups.
9887 (ARMv5t, ARMv5te): Adjust for above changes.
9889 (armv5, armv5e): Delete arches.
9890 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9892 (*call_reg_arm): Likewise.
9893 (*call_value_reg_armv5): Likewise.
9894 (*call_value_reg_arm): Likewise.
9895 (*call_symbol): Likewise.
9896 (*call_value_symbol): Likewise.
9897 (*sibcall_insn): Likewise.
9898 (*sibcall_value_insn): Likewise.
9900 (prefetch): Likewise.
9901 (define_split and define_peephole2 dependent on arm_arch5):
9903 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9905 (TARGET_ARM_QBIT): Likewise.
9906 (TARGET_DSP_MULTIPLY): Likewise.
9907 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9908 (arm_arch5, arm_arch5e): Delete.
9909 (arm_arch5t, arm_arch5te): Declare.
9910 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9911 (arm_arch5t): Declare.
9912 (arm_option_reconfigure_globals): Update for the above.
9913 (arm_options_perform_arch_sanity_checks): Update comment, replace
9914 use of arm_arch5 with arm_arch5t.
9915 (use_return_insn): Likewise.
9916 (arm_emit_call_insn): Likewise.
9917 (output_return_instruction): Likewise.
9918 (arm_final_prescan_insn): Likewise.
9919 (arm_coproc_builtin_available): Likewise.
9920 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9921 arm_arch5e with arm_arch5t and arm_arch5te.
9922 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9923 (arm_arch5t, arm_arch5te): Declare.
9924 * config/arm/arm-tables.opt: Regenerate.
9925 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9926 * config/arm/t-multilib: Likewise.
9927 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9928 instead of arm_arch5.
9929 (*call_reg_thumb1): Likewise.
9930 (*call_value_reg_thumb1_v5): Likewise.
9931 (*call_value_reg_thumb1): Likewise.
9932 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9934 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9936 2018-05-18 Martin Liska <mliska@suse.cz>
9938 PR gcov-profile/84846
9939 * doc/gcov.texi: Document -t option of gcov tool.
9941 2018-05-18 Martin Liska <mliska@suse.cz>
9943 PR gcov-profile/84846
9944 * gcov.c (print_usage): Add new -t option.
9945 (process_args): Handle the option.
9946 (generate_results): Use stdout as output when requested by
9949 2018-05-18 Martin Liska <mliska@suse.cz>
9951 PR gcov-profile/84846
9952 * coverage.c (coverage_init): Write PWD to .gcno file.
9953 * doc/gcov.texi: Document how working directory is printed.
9954 * gcov-dump.c (dump_gcov_file): Print PWD.
9955 * gcov.c (output_intermediate_file): Likewise.
9956 (read_graph_file): Read PWD string.
9957 (output_lines): Print PWD.
9959 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9962 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9963 for retval and return false if all args to phi are zero.
9965 2018-05-18 Richard Biener <rguenther@suse.de>
9967 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9969 (evrp_dom_walker::before_dom_children): Call it.
9971 2018-05-18 Richard Biener <rguenther@suse.de>
9973 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9974 results when processing array refs with variable index.
9976 2018-05-18 Toon Moene <toon@moene.org>
9978 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9979 directly after that of -floop-interchange. Indicate that both
9980 options are enabled by default when specifying -O3.
9982 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9984 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9985 iterator. Delete separate integer-mode vec_set<mode> expander.
9986 (aarch64_simd_vec_setv2di): Delete.
9987 (vec_setv2di): Delete.
9988 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9989 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9990 the "w, r" alternative.
9992 2018-05-18 Martin Liska <mliska@suse.cz>
9994 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9995 * tree-pass.h (make_pass_lower_switch_O0): New function.
9996 * tree-switch-conversion.c (node_has_low_bound): Remove.
9997 (node_has_high_bound): Likewise.
9998 (node_is_bounded): Likewise.
9999 (class pass_lower_switch): Make it a template type and create
10001 (pass_lower_switch::execute): Add template argument.
10002 (make_pass_lower_switch): New function.
10003 (make_pass_lower_switch_O0): New function.
10004 (do_jump_if_equal): Remove.
10005 (emit_case_nodes): Simplify to just handle all 3 cases and leave
10006 all the hard work to tree optimization passes.
10008 2018-05-18 Martin Liska <mliska@suse.cz>
10010 * dbgcnt.c (limit_low): Renamed from limit.
10011 (limit_high): New variable.
10012 (dbg_cnt_is_enabled): Check for upper limit.
10013 (dbg_cnt): Adjust dumping.
10014 (dbg_cnt_set_limit_by_index): Add new argument for high
10016 (dbg_cnt_set_limit_by_name): Likewise.
10017 (dbg_cnt_process_single_pair): Parse new format.
10018 (dbg_cnt_process_opt): Use strtok.
10019 (dbg_cnt_list_all_counters): Remove 'value' and add
10021 * doc/invoke.texi: Document changes.
10023 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
10025 * doc/sourcebuild.texi (scalar_all_fma): Document.
10026 * tree.def (FMA_EXPR): Delete.
10027 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10028 * internal-fn.c (ternary_direct): New macro.
10029 (expand_ternary_optab_fn): Likewise.
10030 (direct_ternary_optab_supported_p): Likewise.
10031 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10032 * builtins.c (fold_builtin_fma): Delete.
10033 (fold_builtin_3): Don't call it.
10034 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10035 * expr.c (expand_expr_real_2): Likewise.
10036 * fold-const.c (operand_equal_p): Likewise.
10037 (fold_ternary_loc): Likewise.
10038 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10039 * gimple.c (DEFTREECODE): Likewise.
10040 * gimplify.c (gimplify_expr): Likewise.
10041 * optabs-tree.c (optab_for_tree_code): Likewise.
10042 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10043 * tree-eh.c (operation_could_trap_p): Likewise.
10044 (stmt_could_throw_1_p): Likewise.
10045 * tree-inline.c (estimate_operator_cost): Likewise.
10046 * tree-pretty-print.c (dump_generic_node): Likewise.
10047 (op_code_prio): Likewise.
10048 * tree-ssa-loop-im.c (stmt_cost): Likewise.
10049 * tree-ssa-operands.c (get_expr_operands): Likewise.
10050 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10051 * fold-const-call.h (fold_fma): Delete.
10052 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10053 CFN_FNMA and CFN_FNMS.
10054 (fold_fma): Delete.
10055 * genmatch.c (combined_fn): New enum.
10056 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10057 (commutative_op): New function.
10058 (commutate): Use it. Handle more than 2 operands.
10059 (dt_operand::gen_gimple_expr): Use commutative_op.
10060 (parser::parse_expr): Allow :c to be used with non-binary
10061 operators if the commutative operand is known.
10062 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10063 CFN_FMS, CFN_FNMA and CFN_FNMS.
10064 (backprop::process_assign_use): Remove FMA_EXPR handling.
10065 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10066 (gen_hsa_fma): New function.
10067 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10068 IFN_FNMA and IFN_FNMS.
10069 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10070 * gimple-fold.h (follow_all_ssa_edges): Declare.
10071 * gimple-fold.c (follow_all_ssa_edges): New function.
10072 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10073 gimple_build interface and use follow_all_ssa_edges to fold the result.
10074 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10075 instead of checking for optabs directly.
10076 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10077 rather than FMA_EXPRs.
10078 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10079 call to IFN_FMA instead of an FMA_EXPR.
10081 2018-05-17 Jim Wilson <jimw@sifive.com>
10083 * expr.c (do_tablejump): When converting index to Pmode, if we have a
10084 sign extended promoted subreg, and the range does not have the sign bit
10085 set, then do a sign extend.
10087 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10088 test, check for sign extended subreg and/or constant operands, and
10089 do a sign extend in that case.
10091 2018-05-17 Steve Ellcey <sellcey@cavium.com>
10093 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10094 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10096 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10097 Change logics_shift_reg to logics_shift_imm.
10098 (thunderx2t99_fp_loadpair_basic): Delete.
10099 (thunderx2t99_fp_storepair_basic): Delete.
10100 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10101 (thunderx2t99_asimd_polynomial): Delete.
10102 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10103 and neon_fp_mul_d_scalar_q.
10104 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10105 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10106 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10107 (thunderx2t99_asimd_lut): Add missing tbl types.
10108 (thunderx2t99_asimd_ext): Delete.
10109 (thunderx2t99_asimd_load1_1_mult): Delete.
10110 (thunderx2t99_asimd_load1_2_mult): Delete.
10111 (thunderx2t99_asimd_load1_ldp): New.
10112 (thunderx2t99_asimd_load1): New.
10113 (thunderx2t99_asimd_load2): Add missing *load2* types.
10114 (thunderx2t99_asimd_load3): New.
10115 (thunderx2t99_asimd_load4): New.
10116 (thunderx2t99_asimd_store1_1_mult): Delete.
10117 (thunderx2t99_asimd_store1_2_mult): Delete.
10118 (thunderx2t99_asimd_store2_mult): Delete.
10119 (thunderx2t99_asimd_store2_onelane): Delete.
10120 (thunderx2t99_asimd_store_stp): New.
10121 (thunderx2t99_asimd_store1): New.
10122 (thunderx2t99_asimd_store2): New.
10123 (thunderx2t99_asimd_store3): New.
10124 (thunderx2t99_asimd_store4): New.
10126 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
10128 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10129 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
10131 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
10132 Segher Boessenkool <segher@kernel.crashing.org>
10135 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10138 2018-05-17 Richard Biener <rguenther@suse.de>
10140 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10141 for pruning loop and prune defs feeding only already visited PHIs.
10143 2018-05-17 Richard Biener <rguenther@suse.de>
10145 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10147 2018-05-17 Bin Cheng <bin.cheng@arm.com>
10148 Richard Biener <rguenther@suse.de>
10150 PR tree-optimization/85793
10151 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10152 for VMAT_ELEMENTWISE.
10154 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10156 * internal-fn.h (lookup_internal_fn): Declare
10157 * internal-fn.c (lookup_internal_fn): New function.
10158 * gimple.c (gimple_build_call_from_tree): Handle calls to
10159 internal functions.
10160 * gimple-pretty-print.c (dump_gimple_call): Print "." before
10161 internal function names.
10162 * tree-pretty-print.c (dump_generic_node): Likewise.
10163 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10165 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10167 * gimple-fold.h (gimple_build): Make the function forms take
10168 combined_fn rather than built_in_function.
10169 (gimple_simplify): Likewise.
10170 * gimple-match-head.c (gimple_simplify): Likewise.
10171 * gimple-fold.c (gimple_build): Likewise.
10172 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10173 rather than gimple_build_call_internal.
10174 (get_initial_defs_for_reduction): Likewise.
10175 (vect_create_epilog_for_reduction): Likewise.
10176 (vectorizable_live_operation): Likewise.
10178 2018-05-17 Martin Liska <mliska@suse.cz>
10180 * gimple-ssa-sprintf.c (format_directive): Do not use
10181 space in between 'G_' and '('.
10183 2018-05-17 Jakub Jelinek <jakub@redhat.com>
10186 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10187 even if the mask is not all ones.
10190 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10192 (ix86_gimple_fold_builtin): Likewise.
10195 * config/i386/i386.c: Include tree-vector-builder.h.
10196 (ix86_vector_shift_count): New function.
10197 (ix86_fold_builtin): Fold shift builtins by scalar count.
10198 (ix86_gimple_fold_builtin): Likewise.
10200 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10201 _mm512_setzero): New intrinsics.
10203 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
10204 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10206 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10207 code generation for cases where splatting a value is not useful.
10208 * simplify-rtx.c (simplify_ternary_operation): Simplify
10209 vec_merge across a vec_duplicate and a paradoxical subreg forming
10210 a vector mode to a vec_concat.
10212 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
10214 * config.gcc: Support "goldmont-plus".
10215 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10217 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10218 PROCESSOR_GOLDMONT_PLUS.
10219 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10220 (processor_target_table): Add "goldmont-plus".
10221 (PTA_GOLDMONT_PLUS): Define.
10222 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10223 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10224 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10225 (fold_builtin_cpu): Add "goldmont-plus".
10226 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10227 (ix86_option_override_internal): Add "goldmont-plus".
10228 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10229 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10230 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10231 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10233 2018-05-17 Richard Biener <rguenther@suse.de>
10235 PR tree-optimization/85757
10236 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10237 remove defs that only feed that PHI from further processing.
10239 2018-05-16 Jim Wilson <jimw@sifive.com>
10241 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10243 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10245 2018-05-16 Mark Wielaard <mark@klomp.org>
10247 * dwarf2out.c (count_index_strings): New function.
10248 (output_indirect_strings): Call count_index_strings and generate
10249 header for dwarf_version >= 5.
10251 2018-05-16 Mark Wielaard <mark@klomp.org>
10253 * dwarf2out.c (dwarf_FORM): New function.
10254 (set_indirect_string): Use dwarf_FORM.
10255 (reset_indirect_string): Likewise.
10256 (size_of_die): Likewise.
10257 (value_format): Likewise.
10258 (output_die): Likewise.
10259 (add_skeleton_AT_string): Likewise.
10260 (output_macinfo_op): Likewise.
10261 (index_string): Likewise.
10262 (output_index_string_offset): Likewise.
10263 (output_index_string): Likewise.
10264 (count_index_strings): Likewise.
10266 2018-05-16 Carl Love <cel@us.ibm.com>
10268 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10269 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10271 2018-05-16 Martin Jambor <mjambor@suse.cz>
10273 * ipa-prop.c (ipa_free_all_edge_args): Remove.
10274 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10276 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
10278 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10279 (fnma<mode>4): Likewise.
10280 (fms<mode>4): Likewise.
10281 (fnms<mode>4): Likewise.
10282 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10283 (aarch64_fnma<mode>4): Likewise.
10284 (aarch64_fms<mode>4): Likewise.
10285 (aarch64_fnms<mode>4): Likewise.
10286 (aarch64_fnmadd<mode>4): Likewise.
10288 2018-05-16 Jason Merrill <jason@redhat.com>
10290 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
10292 2018-05-16 Richard Biener <rguenther@suse.de>
10294 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10295 (dump_stmt_cost): Declare.
10296 (add_stmt_cost): Dump cost we add.
10297 (add_stmt_costs): New function.
10298 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10299 No longer exported.
10300 (vect_analyze_stmt): Adjust prototype.
10301 (vectorizable_condition): Likewise.
10302 (vectorizable_live_operation): Likewise.
10303 (vectorizable_reduction): Likewise.
10304 (vectorizable_induction): Likewise.
10305 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10306 cost vector to pass to vectorizable_ and record afterwards.
10307 (vect_model_reduction_cost): Take cost vector argument and adjust.
10308 (vect_model_induction_cost): Likewise.
10309 (vectorizable_reduction): Likewise.
10310 (vectorizable_induction): Likewise.
10311 (vectorizable_live_operation): Likewise.
10312 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10313 SLP_TREE_NUMBER_OF_VEC_STMTS.
10314 (vect_analyze_slp_cost_1): Remove.
10315 (vect_analyze_slp_cost): Likewise.
10316 (vect_slp_analyze_node_operations): Take visited args and
10317 a target cost vector. Avoid processing already visited stmt sets.
10318 (vect_slp_analyze_operations): Use a local cost vector to gather
10319 costs and register those of non-discarded instances.
10320 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10321 (vect_schedule_slp_instance): Remove copying of
10322 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
10324 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10325 adding cost. Record cost entry location.
10326 (vect_prologue_cost_for_slp_op): Function to compute cost of
10327 a constant or invariant generated for SLP vect in the prologue,
10328 split out from vect_analyze_slp_cost_1.
10329 (vect_model_simple_cost): Make static. Adjust for SLP costing.
10330 (vect_model_promotion_demotion_cost): Likewise.
10331 (vect_model_store_cost): Likewise, make static.
10332 (vect_model_load_cost): Likewise.
10333 (vectorizable_bswap): Add cost vector arg and adjust.
10334 (vectorizable_call): Likewise.
10335 (vectorizable_simd_clone_call): Likewise.
10336 (vectorizable_conversion): Likewise.
10337 (vectorizable_assignment): Likewise.
10338 (vectorizable_shift): Likewise.
10339 (vectorizable_operation): Likewise.
10340 (vectorizable_store): Likewise.
10341 (vectorizable_load): Likewise.
10342 (vectorizable_condition): Likewise.
10343 (vectorizable_comparison): Likewise.
10344 (can_vectorize_live_stmts): Likewise.
10345 (vect_analyze_stmt): Likewise.
10346 (vect_transform_stmt): Adjust calls to vectorizable_*.
10347 * tree-vectorizer.c: Include gimple-pretty-print.h.
10348 (dump_stmt_cost): New function.
10350 2018-05-16 Richard Biener <rguenther@suse.de>
10352 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10353 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10354 * tree-ssa-dse.c: Include tree-ssa-loop.h.
10355 (check_name): New callback.
10356 (dse_classify_store): Track cycles via a visited bitmap of PHI
10357 defs and simplify handling of in-loop and across loop dead stores
10358 and properly fail for loop-variant refs. Handle byte-tracking with
10359 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10362 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
10364 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10365 (vect_get_mask_type_for_stmt): Likewise.
10366 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10368 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
10369 to determine the statement's vector type and the vector type that
10370 should be used for calculating nunits. Deal with cases in which
10371 the type has to be deferred.
10372 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10373 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10374 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10375 (vect_determine_vf_for_stmt): New functions, split out from...
10376 (vect_determine_vectorization_factor): ...here.
10377 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10378 (vect_get_mask_type_for_stmt): New functions, split out from
10379 vect_determine_vectorization_factor.
10381 2018-05-16 Richard Biener <rguenther@suse.de>
10383 * tree-cfg.c (verify_gimple_assign_ternary): Properly
10384 verify the [VEC_]COND_EXPR embedded comparison.
10386 2018-05-15 Martin Sebor <msebor@redhat.com>
10388 PR tree-optimization/85753
10389 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10390 RECORD_TYPE in addition to ARRAY_TYPE.
10392 2018-05-15 Martin Sebor <msebor@redhat.com>
10394 PR middle-end/85643
10395 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10397 2018-05-15 Richard Biener <rguenther@suse.de>
10399 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10400 add by_clobber_p one. Change algorithm to collect all defs
10401 representing uses we need to walk and try reducing them to
10402 a single one before failing.
10403 (dse_dom_walker::dse_optimize_stmt): Adjust.
10405 2018-05-13 Mark Wielaard <mark@klomp.org>
10407 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10408 (size_of_loc_descr): Likewise.
10409 (output_loc_operands): Likewise.
10410 (output_loc_operands_raw): Likewise.
10411 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10412 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10413 (hash_loc_operands): Likewise.
10414 (compare_loc_operands): Likewise.
10416 2018-05-14 Mark Wielaard <mark@klomp.org>
10418 * dwarf2out.c (count_index_addrs): New function.
10419 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10421 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10423 PR tree-optimization/83648
10424 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10425 return value as malloc candidate.
10427 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10430 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10431 param as true in call to suggest_attribute.
10433 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
10435 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10436 -mreadonly-in-sdata.
10438 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10440 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10442 (aarch64_crypto_aesd_fused): Likewise.
10444 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
10446 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10447 (movsi_aarch64): Likewise.
10448 (load_pairsi): Likewise.
10449 (load_pairdi): Likewise.
10450 (store_pairsi): Likewise.
10451 (store_pairdi): Likewise.
10452 (load_pairsf): Likewise.
10453 (load_pairdf): Likewise.
10454 (store_pairsf): Likewise.
10455 (store_pairdf): Likewise.
10456 (zero_extend): Likewise.
10457 (trunc): Swap alternatives.
10458 (fcvt_target): Add '?' to prefer w over r.
10460 2018-05-14 Jakub Jelinek <jakub@redhat.com>
10463 * config/i386/i386.md: Disallow non-commutative arithmetics in
10464 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10465 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
10466 in the peephole2 before it.
10468 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
10470 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10471 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10472 (ix86_handle_option): Handle -mcldemote.
10473 * config.gcc: New header.
10474 * config/i386/cldemoteintrin.h: New file.
10475 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10476 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10478 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10479 OPTION_MASK_ISA_CLDEMOTE.
10480 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10481 (ix86_valid_target_attribute_inner_p): Ditto.
10482 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10483 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10484 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10485 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10486 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10488 * config/i386/i386.opt: Add -mcldemote.
10489 * config/i386/x86intrin.h: New header.
10490 * doc/invoke.texi: Add -mcldemote.
10492 2018-05-14 Richard Biener <rguenther@suse.de>
10494 * doc/match-and-simplify.texi: Adjust :s documentation.
10496 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
10498 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10499 intended memcpy size.
10500 (REORDER_45): Likewise.
10502 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
10504 * sort.cc: New file.
10505 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10506 * vec.c (qsort_chk): Use gcc_qsort.
10507 * Makefile.in (OBJS-libcommon): Add sort.o.
10508 (build/sort.o): New target. Use it...
10509 (BUILD_RTL): ... here, and...
10510 (build/gencfn-macros): ... here, and...
10511 (build/genmatch): ... here.
10513 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10514 Chung-Ju Wu <jasonwucj@gmail.com>
10516 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10517 * config/nds32/nds32-graywolf.md: New file.
10518 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10519 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10521 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10522 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10523 * config/nds32/nds32.md (pipeline_model): Add graywolf.
10524 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10525 * config/nds32/pipelines.md: Include n15 settings.
10527 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10528 Chung-Ju Wu <jasonwucj@gmail.com>
10530 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10531 * config/nds32/nds32-n13.md: New file.
10532 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10533 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10535 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10536 * config/nds32/nds32.md (pipeline_model): Add n13.
10537 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10538 * config/nds32/pipelines.md: Include n13 settings.
10540 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
10541 Chung-Ju Wu <jasonwucj@gmail.com>
10543 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10544 * config/nds32/nds32-n10.md: New file.
10545 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10546 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10548 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10549 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10550 * config/nds32/nds32.md (pipeline_model): Add n10.
10551 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10552 * config/nds32/pipelines.md: Include n10 settings.
10554 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
10555 Kito Cheng <kito.cheng@gmail.com>
10556 Chung-Ju Wu <jasonwucj@gmail.com>
10558 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10559 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10560 Add enum values for DSP extension instructions.
10561 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10563 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10564 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10565 New code iterators.
10566 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10567 * config/nds32/nds32-dspext.md: New file for DSP implementation.
10568 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10569 * config/nds32/nds32-intrinsic.md: Likewise.
10570 * config/nds32/nds32_intrinsic.h: Likewise.
10571 * config/nds32/nds32-md-auxiliary.c: Likewise.
10572 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10573 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10574 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10575 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10576 * config/nds32/nds32-protos.h: New declarations for DSP extension.
10577 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10578 TYPE_DMAC in switch statement.
10579 * config/nds32/nds32.c: New checking and implementation for DSP
10580 extension instructions.
10581 * config/nds32/nds32.h: Likewise.
10582 * config/nds32/nds32.md: Likewise.
10583 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10584 * config/nds32/predicates.md: Implement new predicates for DSP
10587 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10589 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10590 Reformat alternatives and attributes so it is easier to identify
10591 which constraints/attributes go with which instruction.
10592 (mov<mode>_hardfloat32, FMOVE64): Likewise.
10593 (mov<mode>_softfloat32, FMOVE64): Likewise.
10594 (mov<mode>_hardfloat64, FMOVE64): Likewise.
10595 (mov<mode>_softfloat64, FMOVE64): Likewise.
10597 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
10599 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10601 (Basic PowerPC Built-in Functions): The new name of the
10602 subsection previously known as "PowerPC Built-in Functions".
10603 (Basic PowerPC Built-in Functions Available on all Configurations):
10605 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10606 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10607 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10608 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10610 2018-05-11 Martin Jambor <mjambor@suse.cz>
10613 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10616 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
10619 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10621 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
10623 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10624 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10625 (ix86_handle_option): Handle -mwaitpkg.
10626 * config.gcc: New header.
10627 * config/i386/cpuid.h (bit_WAITPKG): New bit.
10628 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10629 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10631 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10632 OPTION_MASK_ISA_WAITPKG.
10633 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10634 (ix86_option_override_internal): Add PTA_WAITPKG.
10635 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10636 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10637 IX86_BUILTIN_TPAUSE.
10638 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10639 __builtin_ia32_umwait and __builtin_ia32_tpause.
10640 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10641 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10642 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10643 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10644 UNSPECV_TPAUSE): New.
10645 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10646 * config/i386/i386.opt: Add -mwaitpkg.
10647 * config/i386/waitpkgintrin.h: New file.
10648 * config/i386/x86intrin.h: New header.
10649 * doc/invoke.texi: Add -mwaitpkg.
10651 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
10654 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10656 (cortex-m0): Use armv6s-m isa.
10657 (cortex-m0plus): Likewise.
10658 (cortex-m1): Likewise.
10659 (cortex-m0.small-multiply): Likewise.
10660 (cortex-m0plus.small-multiply): Likewise.
10661 (cortex-m1.small-multiply): Likewise.
10663 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
10664 Jakub Jelinek <jakub@redhat.com>
10666 PR tree-optimization/85692
10667 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10668 source permute as well.
10670 2018-05-11 Martin Liska <mliska@suse.cz>
10673 * doc/extend.texi: Document LLVM style format for no_sanitize
10676 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
10678 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10679 mode_supports_vsx_dform_quad to mode_supports_dq_form.
10680 (mode_supports_vsx_dform_quad): Likewise.
10681 (mode_supports_vmx_dform): Move these functions to be next to the
10682 other mode_supports functions.
10683 (mode_supports_dq_form): Likewise.
10684 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10685 mode_supports_dq_form.
10686 (reg_offset_addressing_ok_p): Likewise.
10687 (offsettable_ok_by_alignment): Likewise.
10688 (rs6000_legitimate_offset_address_p): Likewise.
10689 (legitimate_lo_sum_address_p): Likewise.
10690 (rs6000_legitimize_address): Likewise.
10691 (rs6000_legitimize_reload_address): Likewise.
10692 (rs6000_secondary_reload_inner): Likewise.
10693 (rs6000_preferred_reload_class): Likewise.
10694 (rs6000_output_move_128bit): Likewise.
10696 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
10698 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10699 Generate SImode target register for null target.
10700 <case IX86_BUILTIN_XGETBV>: Ditto.
10701 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10702 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10704 2018-05-10 Carl Love <cel@us.ibm.com>
10706 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10707 dcbtt and dcbtstt if operands[2] is 0.
10709 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
10712 * config/i386/sse.md (usadv64qi): New expander.
10714 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
10716 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10717 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10718 -maltivec=be support.
10719 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10720 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10721 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10722 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10723 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10724 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10725 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10726 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10727 altivec_vsumsws): Adjust.
10728 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10729 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10730 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10732 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10733 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10734 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10735 (altivec_lve<VI_char>x): Delete expand.
10736 (*altivec_lve<VI_char>x_internal): Rename to...
10737 (altivec_lve<VI_char>x): ... this.
10738 (altivec_lvxl_<mode>): Delete expand.
10739 (*altivec_lvxl_<mode>_internal): Rename to ...
10740 (altivec_lvxl_<mode>): ... this.
10741 (altivec_stvxl_<mode>): Delete expand.
10742 (*altivec_stvxl_<mode>_internal): Rename to ...
10743 (altivec_stvxl_<mode>): ... this.
10744 (altivec_stve<VI_char>x): Delete expand.
10745 (*altivec_stve<VI_char>x_internal): Rename to ...
10746 (altivec_stve<VI_char>x): ... this.
10747 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10748 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10749 reduc_plus_scal_<mode>): Adjust.
10750 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10752 (rs6000_cpu_cpp_builtins): Adjust.
10753 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10754 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10755 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10756 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10757 -maltivec=be support.
10758 (rs6000_split_vec_extract_var): Adjust.
10759 (rs6000_split_v4si_init): Adjust.
10760 (swap_selector_for_mode): Delete.
10761 (altivec_expand_lvx_be, altivec_expand_stvx_be,
10762 altivec_expand_stvex_be): Delete.
10763 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10764 -maltivec=be support.
10765 (rs6000_gimple_fold_builtin): Ditto.
10766 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10768 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10769 (TARGET_DIRECT_MOVE_64BIT): Adjust.
10770 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10771 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10772 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10773 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10774 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10775 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10776 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10777 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10778 anonymous split): Adjust.
10779 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10780 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10782 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
10784 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10785 when --with-gxx-include-dir is also specified.
10786 * configure: Regenerate.
10788 2018-05-09 Jim Wilson <jimw@sifive.com>
10791 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10792 * config/riscv/t-withmultilib: New.
10793 * config/riscv/withmultilib.h: New.
10794 * doc/install.texi: Document RISC-V --with-multilib-list support.
10796 2018-05-09 Richard Biener <rguenther@suse.de>
10798 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10800 (vect_bb_vectorization_profitable_p): Adjust. Compute
10801 actual scalar cost using the cost vector and the add_stmt_cost
10804 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10806 PR rtl-optimization/85645
10807 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10808 in the REG_CFA_REGISTER note for LR, don't leave it empty.
10810 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10812 PR rtl-optimization/85645
10813 * shrink-wrap.c (spread_components): Return a boolean saying if
10814 anything was changed.
10815 (try_shrink_wrapping_separate): Iterate spread_components until
10816 nothing changes anymore.
10818 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10820 PR rtl-optimization/85645
10821 * regrename.c (build_def_use): Also kill the chains that include the
10822 destination of a REG_CFA_REGISTER note.
10824 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10826 PR rtl-optimization/85645
10827 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10828 insn that has a REG_CFA_REGISTER note.
10830 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
10832 * cfgexpand.c (expand_clobber): New function.
10833 (expand_gimple_stmt_1): Use it.
10834 * tree-vect-stmts.c (vect_clobber_variable): New function,
10836 (vectorizable_simd_clone_call): ...here.
10837 (vectorizable_store): Emit a clobber either side of an
10838 IFN_STORE_LANES sequence.
10839 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10841 2018-05-09 Tom de Vries <tom@codesourcery.com>
10844 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10845 (define_insn "trap_if_false"): Add exit after trap.
10847 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
10849 PR rtl-optimization/85638
10850 * bb-reorder.c: Include common/common-target.h.
10851 (create_forwarder_block): New function extracted from...
10852 (fix_up_crossing_landing_pad): ...here. Rename into...
10853 (dw2_fix_up_crossing_landing_pad): ...this.
10854 (sjlj_fix_up_crossing_landing_pad): New function.
10855 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10856 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10857 from both partitions and exit the loop after one iteration.
10859 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10862 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10864 (Basic PowerPC Built-in Functions): The new name of the
10865 subsection previously known as "PowerPC Built-in Functions".
10866 (Basic PowerPC Built-in Functions Available on all Configurations):
10868 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10870 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10872 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10874 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10877 2018-05-08 Jim Wilson <jimw@sifive.com>
10879 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10880 (LD_EMUL_SUFFIX): New.
10881 (LINK_SPEC): Use it.
10883 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10885 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10887 (Basic PowerPC Built-in Functions): The new name of the
10888 subsection previously known as "PowerPC Built-in Functions".
10889 (Basic PowerPC Built-in Functions Available on all Configurations):
10891 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10893 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10895 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10897 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10900 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10903 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10904 after cmpelim optimization.
10906 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
10908 * config.gcc: Support "goldmont".
10909 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10910 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10911 PROCESSOR_GOLDMONT.
10912 * config/i386/i386.c (m_GOLDMONT): Define.
10913 (processor_target_table): Add "goldmont".
10914 (PTA_GOLDMONT): Define.
10915 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10916 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10917 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10918 (fold_builtin_cpu): Add "goldmont".
10919 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10920 (ix86_option_override_internal): Add "goldmont".
10921 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10922 (processor_type): Add PROCESSOR_GOLDMONT.
10923 * config/i386/i386.md: Add CPU "glm".
10924 * config/i386/glm.md: New file.
10925 * config/i386/x86-tune.def: Add m_GOLDMONT.
10926 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10928 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10931 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10933 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10934 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
10935 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
10938 * config/i386/i386.c (ix86_fold_builtin): Handle
10939 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10942 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10943 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10945 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
10948 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10949 (check_arch): Likewise.
10950 (check_fpu): Return the result rather than printing it.
10951 (end arch): Fix operator precedence.
10952 (end cpu): Likewise.
10953 (END): Print the result from check_fpu.
10955 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10956 Alan Hayward <alan.hayward@arm.com>
10957 David Sherwood <david.sherwood@arm.com>
10959 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10960 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10961 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10962 (*fcmuo<mode>_and): New patterns.
10964 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10966 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10967 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10968 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10969 (cmp_op, sve_imm_con): New code attributes.
10970 (SVE_COND_INT_CMP, imm_con): Delete.
10971 (cmp_op): Remove above unspecs from int attribute.
10972 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10974 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
10975 comparison-specific unspecs.
10976 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10977 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10978 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10979 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10980 (*vec_fcm<cmp_op><mode>): Rename to...
10981 (*fcm<cmp_op><mode>): ...this and adjust likewise.
10982 (*vec_fcmuo<mode>): Rename to...
10983 (*fcmuo<mode>): ...this and adjust likewise.
10984 (*pred_fcm<cmp_op><mode>): New pattern.
10985 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10986 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10988 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10990 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10991 (aarch64_emit_sve_predicated_cond): New function.
10992 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10993 (aarch64_emit_unspec_cond_or): Replace with...
10994 (aarch64_emit_sve_or_conds): ...this new function. Use
10995 aarch64_emit_sve_ptrue_op for the individual comparisons and
10996 aarch64_emit_binop to OR them together.
10997 (aarch64_emit_inverted_unspec_cond): Replace with...
10998 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10999 aarch64_emit_sve_ptrue_op for the comparison and
11000 aarch64_emit_unop to invert the result.
11001 (aarch64_expand_sve_vec_cmp_float): Update after the above
11002 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
11004 2018-05-07 Nathan Sidwell <nathan@acm.org>
11006 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11007 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11008 (Backwards Compatibility): Likewise.
11010 2018-05-07 Luis Machado <luis.machado@linaro.org>
11014 2018-05-07 Luis Machado <luis.machado@linaro.org>
11016 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11017 <prefetch_dynamic_strides>: New const bool field.
11018 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11019 prefetch_dynamic_strides.
11020 (exynosm1_prefetch_tune): Likewise.
11021 (thunderxt88_prefetch_tune): Likewise.
11022 (thunderx_prefetch_tune): Likewise.
11023 (thunderx2t99_prefetch_tune): Likewise.
11024 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11026 (aarch64_override_options_internal): Update to set
11027 PARAM_PREFETCH_DYNAMIC_STRIDES.
11028 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11029 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11030 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11031 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11032 prefetch-dynamic-strides setting.
11034 2018-05-07 Luis Machado <luis.machado@linaro.org>
11036 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11037 <minimum_stride>: New const int field.
11038 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11039 minimum_stride field.
11040 (exynosm1_prefetch_tune): Likewise.
11041 (thunderxt88_prefetch_tune): Likewise.
11042 (thunderx_prefetch_tune): Likewise.
11043 (thunderx2t99_prefetch_tune): Likewise.
11044 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11045 (aarch64_override_options_internal): Update to set
11046 PARAM_PREFETCH_MINIMUM_STRIDE.
11047 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11048 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11049 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11050 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11051 stride is constant and is below the minimum stride threshold.
11053 2018-05-07 Luis Machado <luis.machado@linaro.org>
11055 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11058 2018-05-07 Luis Machado <luis.machado@linaro.org>
11060 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11061 <prefetch_dynamic_strides>: New const bool field.
11062 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11063 prefetch_dynamic_strides.
11064 (exynosm1_prefetch_tune): Likewise.
11065 (thunderxt88_prefetch_tune): Likewise.
11066 (thunderx_prefetch_tune): Likewise.
11067 (thunderx2t99_prefetch_tune): Likewise.
11068 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11070 (aarch64_override_options_internal): Update to set
11071 PARAM_PREFETCH_DYNAMIC_STRIDES.
11072 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11073 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11074 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11075 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11076 prefetch-dynamic-strides setting.
11078 2018-05-07 Luis Machado <luis.machado@linaro.org>
11080 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11081 <minimum_stride>: New const int field.
11082 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11083 minimum_stride field.
11084 (exynosm1_prefetch_tune): Likewise.
11085 (thunderxt88_prefetch_tune): Likewise.
11086 (thunderx_prefetch_tune): Likewise.
11087 (thunderx2t99_prefetch_tune): Likewise.
11088 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11089 (aarch64_override_options_internal): Update to set
11090 PARAM_PREFETCH_MINIMUM_STRIDE.
11091 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11092 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11093 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11094 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11095 stride is constant and is below the minimum stride threshold.
11097 2018-05-06 Jakub Jelinek <jakub@redhat.com>
11100 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11101 the type is addressable. Don't force op into register if it has
11104 2018-05-05 Roland McGrath <mcgrathr@google.com>
11107 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11108 any section for which we don't know a specific type it should have,
11109 regardless of name. Previously this was done only for the exact
11110 names ".init_array", ".fini_array", and ".preinit_array".
11111 (default_elf_asm_named_section): Add comment about
11112 relationship with default_section_type_flags and SECTION_NOTYPE.
11113 (get_section): Don't consider it a type conflict if one side has
11114 SECTION_NOTYPE and the other doesn't, as long as neither has the
11115 SECTION_BSS et al used in the default_section_type_flags logic.
11117 2018-05-05 Tom de Vries <tom@codesourcery.com>
11120 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11121 (workaround_barsyncs): New function.
11122 (nvptx_reorg): Use workaround_barsyncs.
11123 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11124 (define_expand "nvptx_membar_cta"): New define_expand.
11125 (define_insn "*nvptx_membar_cta"): New insn.
11127 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
11129 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11130 To improve optimization opportunities.
11131 * builtin-types.def: The new needed builtin types for the above.
11133 2018-05-04 Richard Biener <rguenther@suse.de>
11135 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11136 * gimple-ssa-store-merging.c
11137 (imm_store_chain_info::output_merged_store): Remove redundant create,
11138 release split_store vector contents on failure.
11139 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11140 scalar stmt vector on cache hit.
11142 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
11144 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11146 * config.gcc (powerpc-xilinx-eabi*): Remove.
11147 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11149 (fusion_addis_mem_combo_load): Ditto.
11150 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11152 (rs6000_cpu_cpp_builtins): Ditto.
11153 * config/rs6000/rs6000-linux.c
11154 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11155 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11156 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11158 (rs6000_setup_reg_addr_masks): Ditto.
11159 (rs6000_init_hard_regno_mode_ok): Ditto.
11160 (rs6000_option_override_internal): Ditto.
11161 (legitimate_lo_sum_address_p): Ditto.
11162 (rs6000_legitimize_address): Ditto.
11163 (rs6000_legitimize_reload_address): Ditto.
11164 (rs6000_legitimate_address_p): Ditto.
11165 (abi_v4_pass_in_fpr): Ditto.
11166 (setup_incoming_varargs): Ditto.
11167 (rs6000_gimplify_va_arg): Ditto.
11168 (rs6000_split_multireg_move): Ditto.
11169 (rs6000_savres_strategy): Ditto.
11170 (rs6000_emit_prologue_components): Ditto.
11171 (rs6000_emit_epilogue_components): Ditto.
11172 (rs6000_emit_prologue): Ditto.
11173 (rs6000_emit_epilogue): Ditto.
11174 (rs6000_elf_file_end): Ditto.
11175 (rs6000_function_value): Ditto.
11176 (rs6000_libcall_value): Ditto.
11177 * config/rs6000/rs6000.h: Ditto.
11178 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11179 (TARGET_MINMAX): ... this. New.
11180 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11181 * config/rs6000/rs6000.md: Remove Xilinx FP support.
11182 (*movsi_internal1_single): Delete.
11183 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11184 mfpu=, mxilinx-fpu): Delete.
11185 * config/rs6000/singlefp.h: Delete.
11186 * config/rs6000/sysv4.h: Remove Xilinx FP support.
11187 * config/rs6000/t-rs6000: Ditto.
11188 * config/rs6000/t-xilinx: Delete.
11189 * config/rs6000/titan.md: Adjust for fp_type removal.
11190 * config/rs6000/vsx.md: Remove Xilinx FP support.
11191 (VStype_simple): Delete.
11192 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11193 * config/rs6000/xfpu.h: Delete.
11194 * config/rs6000/xfpu.md: Delete.
11195 * config/rs6000/xilinx.h: Delete.
11196 * config/rs6000/xilinx.opt: Delete.
11197 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11198 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11200 2018-05-04 Tom de Vries <tom@codesourcery.com>
11203 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11206 2018-05-04 Richard Biener <rguenther@suse.de>
11208 PR middle-end/85627
11209 * tree-complex.c (update_complex_assignment): We are always in SSA form.
11210 (expand_complex_div_wide): Likewise.
11211 (expand_complex_operations_1): Likewise.
11212 (expand_complex_libcall): Preserve EH info of the original stmt.
11213 (tree_lower_complex): Handle removed blocks.
11214 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11215 on complex multiplication and division libcall builtins.
11217 2018-05-04 Richard Biener <rguenther@suse.de>
11219 PR middle-end/85574
11220 * fold-const.c (negate_expr_p): Restrict negation of operand
11221 zero of a division to when we know that can happen without
11223 (fold_negate_expr_1): Likewise.
11225 2018-05-04 Jakub Jelinek <jakub@redhat.com>
11228 * real.h (real_nextafter): Declare.
11229 * real.c (real_nextafter): New function.
11230 * fold-const-call.c (fold_const_nextafter): New function.
11231 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11232 CASE_CFN_NEXTTOWARD.
11233 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11234 even when arg1_mode is different from arg0_mode.
11236 2018-05-03 Nathan Sidwell <nathan@acm.org>
11238 * doc/extend.texi (Deprecated Features): Remove
11239 -ffriend-injection.
11240 (Backwards Compatibility): Likewise.
11241 * doc/invoke.texi (C++ Language Options): Likewise.
11242 (C++ Dialect Options): Likewise.
11244 2018-05-03 Jakub Jelinek <jakub@redhat.com>
11247 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11248 _mm512_mask_mullox_epi64): New intrinsics.
11250 2018-05-03 Tom de Vries <tom@codesourcery.com>
11253 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11254 dump files): Add offload-tree.
11256 2018-05-03 Richard Biener <rguenther@suse.de>
11258 PR tree-optimization/85615
11259 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11260 to loops not nested in BBs loop father to avoid creating multi-entry
11263 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11265 PR tree-optimization/70291
11266 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11267 arguments. Change return type to tree. Emit libcall as a new
11268 statement rather than replacing existing one when inplace_p is true.
11269 (expand_complex_multiplication_components): New function.
11270 (expand_complex_multiplication): Expand floating-point complex
11271 multiplication using the above.
11272 (expand_complex_division): Rename inner_type parameter to type.
11273 Update expand_complex_libcall call-site.
11274 (expand_complex_operations_1): Update expand_complex_multiplication
11275 and expand_complex_division call-sites.
11277 2018-05-02 Jakub Jelinek <jakub@redhat.com>
11280 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11281 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11282 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11283 the highest significant bit of the shift count mask is clear. In
11284 check whether and[sq]i3 is needed verify that all significant bits
11285 of the shift count other than the highest are set.
11287 2018-05-02 Tom de Vries <tom@codesourcery.com>
11290 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11291 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11292 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11293 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11294 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11295 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11296 __builtin_goacc_parlevel_size.
11298 2018-05-02 Richard Biener <rguenther@suse.de>
11300 PR tree-optimization/85597
11301 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11302 do not use split vect_get_vec_defs call but call vect_get_slp_defs
11305 2018-05-02 Tom de Vries <tom@codesourcery.com>
11308 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11309 dump files): Add ltrans-tree.
11311 2018-05-02 Tom de Vries <tom@codesourcery.com>
11314 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11315 dump files): Add wpa-ipa.
11317 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
11319 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
11320 powerpc*-*-linux*paired* target.
11321 * config/rs6000/750cl.h: Delete.
11322 * config/rs6000/paired.h: Delete.
11323 * config/rs6000/paired.md: Delete.
11324 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11326 * config/rs6000/rs6000-builtin.def: Remove paired float support.
11327 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11328 comment. Remove paired float support.
11329 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11330 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11332 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11333 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11335 * config/rs6000/rs6000.c: Remove paired float support.
11336 (paired_expand_vector_init, paired_expand_vector_move,
11337 paired_emit_vector_compare, paired_emit_vector_cond_expr,
11338 (paired_expand_lv_builtin, paired_expand_stv_builtin,
11339 paired_expand_builtin, paired_expand_predicate_builtin,
11340 paired_init_builtins): Delete.
11341 * config/rs6000/rs6000.h: Remove paired float support.
11342 * config/rs6000/rs6000.md: Remove paired float support.
11343 (move_from_CR_ov_bit): Delete.
11344 * config/rs6000/rs6000.opt (mpaired): Delete.
11345 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11346 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11348 2018-05-02 Richard Biener <rguenther@suse.de>
11350 PR middle-end/85567
11351 * gimplify.c (gimplify_save_expr): When in SSA form allow
11352 SAVE_EXPRs to compute to SSA vars.
11354 2018-05-02 Jakub Jelinek <jakub@redhat.com>
11357 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11358 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11359 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11360 clobber operands[2], instead use a new pseudo. Formatting fixes.
11362 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
11364 PR tree-optimization/85586
11365 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11366 exit early for statements in the same group if the accesses are
11369 2018-05-02 Tom de Vries <tom@codesourcery.com>
11372 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11375 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
11377 PR tree-optimization/85143
11378 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11380 2018-05-01 Tom de Vries <tom@codesourcery.com>
11383 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11384 not found" error message.
11386 2018-05-01 Tom de Vries <tom@codesourcery.com>
11389 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11390 * vec.c (test_ordered_remove_if): New function.
11391 (vec_c_tests): Call test_ordered_remove_if.
11392 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11393 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11394 * tree-vect-patterns.c (vect_pattern_recog_1): Use
11395 VEC_ORDERED_REMOVE_IF.
11397 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11399 PR tree-optimization/82665
11400 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11401 pointer subtraction where arguments come from a memchr call.
11403 2018-05-01 Jakub Jelinek <jakub@redhat.com>
11405 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11406 --push-state --as-needed and --pop-state instead of --as-needed and
11407 --no-as-needed if ld supports it.
11408 * configure: Regenerated.
11411 * doc/install.texi2html: Replace _002d with - and _002a with * in
11412 generated html files using sed.
11414 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11417 * gcc-rich-location.c (blank_line_before_p): New function.
11418 (use_new_line): New function.
11419 (gcc_rich_location::add_fixit_insert_formatted): New function.
11420 * gcc-rich-location.h
11421 (gcc_rich_location::add_fixit_insert_formatted): New function.
11423 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11425 * selftest.c (assert_streq): Rename "expected" and "actual" to
11426 "val1" and "val2". Extend NULL-handling to cover both inputs
11427 symmetrically, while still requiring both to be non-NULL for a pass.
11428 * selftest.h (assert_streq): Rename "expected" and "actual" to
11430 (ASSERT_EQ): Likewise.
11431 (ASSERT_EQ_AT): Likewise.
11432 (ASSERT_KNOWN_EQ): Likewise.
11433 (ASSERT_KNOWN_EQ_AT): Likewise.
11434 (ASSERT_NE): Likewise.
11435 (ASSERT_MAYBE_NE): Likewise.
11436 (ASSERT_MAYBE_NE_AT): Likewise.
11437 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
11438 the assertion to pass.
11439 (ASSERT_STREQ_AT): Likewise.
11441 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
11443 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11444 interaction with -pie.
11446 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11448 * selftest.h: Fix alphabetization of per-source-file selftest
11451 2018-04-30 Jason Merrill <jason@redhat.com>
11453 PR c++/61982 - dead stores to destroyed objects.
11454 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11457 2018-04-30 Jason Merrill <jason@redhat.com>
11459 * tree.c (build_clobber): New.
11460 * tree.h: Declare it.
11461 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11463 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11465 * diagnostic-show-locus.c (layout::layout): Update for
11466 location_get_source_line returning a char_span.
11467 (struct char_span): Move to input.h.
11468 (struct correction): Update for fields in char_span becoming
11470 (struct source_line): Update for location_get_source_line
11471 returning a char_span.
11472 (layout::print_line): Likewise.
11473 * edit-context.c (edited_file::print_content): Likewise.
11474 (edited_file::print_diff_hunk): Likewise.
11475 (edited_file::print_run_of_changed_lines): Likewise.
11476 (edited_file::get_num_lines): Likewise.
11477 (edited_line::edited_line): Likewise.
11478 * final.c (asm_show_source): Likewise.
11479 * input.c (location_get_source_line): Convert return type
11480 from const char * to char_span, losing the final "line_len"
11482 (dump_location_info): Update for the above.
11483 (get_substring_ranges_for_loc): Likewise. Use a char_span
11484 when handling the literal within the line.
11485 (test_reading_source_line): Update for location_get_source_line
11486 returning a char_span.
11487 * input.h (class char_span): Move here from
11488 diagnostic-show-locus.c, converting from a struct to a class.
11489 Make data members private.
11490 (char_span::operator bool): New.
11491 (char_span::length): New.
11492 (char_span::get_buffer): New.
11493 (char_span::operator[]): New.
11494 (char_span::subspan): Make const.
11495 (char_span::xstrdup): New.
11496 (location_get_source_line): Convert return type from const char *
11497 to char_span, losing the final "line_size" param.
11499 2018-04-30 Jan Hubicka <jh@suse.cz>
11501 * lto-wrapper.c (ltrans_priorities): New static var.
11502 (cmp_priority): New.
11503 (run_gcc): Read priorities and if doing parallel build order
11504 the Makefile by them.
11506 2018-04-30 David Malcolm <dmalcolm@redhat.com>
11508 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11510 2018-04-30 Richard Biener <rguenther@suse.de>
11512 * tree-cfg.c (verify_address): Remove base argument, add
11513 flag whether to check TREE_ADDRESSABLE and do that.
11514 (verify_expr): Remove.
11515 (verify_types_in_gimple_reference): Add pieces from verify_expr.
11516 (verify_gimple_assign_single): Likewise.
11517 (verify_gimple_switch): Likewise.
11518 (verify_expr_location_1): Dereference tp once. Add (disabled)
11519 piece from verify_expr.
11520 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11522 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11524 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11526 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11528 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11529 (small_data_pattern): Likewise.
11530 (arc_rewrite_small_data): Likewise.
11531 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11532 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11533 (get_symbol_alignment): New function.
11534 (legitimate_small_data_address_p): Likewise.
11535 (legitimate_scaled_address): Update, call
11536 legitimate_small_data_address_p.
11537 (output_sdata): New static variable.
11538 (arc_print_operand): Update how we handle small data operands.
11539 (arc_print_operand_address): Likewise.
11540 (arc_legitimate_address_p): Update, use
11541 legitimate_small_data_address_p.
11542 (arc_rewrite_small_data_p): Remove.
11543 (arc_rewrite_small_data_1): Likewise.
11544 (arc_rewrite_small_data): Likewise.
11545 (small_data_pattern): Likewise.
11546 (compact_sda_memory_operand): Update to use
11547 legitimate_small_data_address_p and get_symbol_alignment.
11548 (prepare_move_operands): Don't rewite sdata pattern.
11549 (prepare_extend_operands): Remove.
11550 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11552 (zero_extendqisi2): Likewise.
11553 (zero_extendhisi2): Likewise.
11554 (extendqihi2): Likewise.
11555 (extendqisi2): Likewise.
11556 (extendhisi2): Likewise.
11557 (addsi3): Likewise.
11558 (subsi3): Likewise.
11559 (andsi3): Likewise.
11560 * config/arc/constraints.md (Usd): Change it to memory constraint.
11562 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
11564 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11565 as source of std instructions.
11566 * config/arc/arc.md (movsi_insn): Update pattern predicate to
11567 allow 6-bit constants as source for store instructions.
11568 (movdi_insn): Update instruction pattern to allow 6-bit constants
11569 as source for store instructions.
11571 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
11573 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11575 2018-04-30 Nathan Sidwell <nathan@acm.org>
11576 Sandra Loosemore <sandra@codesourcery.com>
11578 * dumpfile.c (dump_open): Allow '-' for stdout.
11579 * doc/invoke.texi (Developer Options): Document dump filename
11580 determination early. Document stdin/stdout selection.
11582 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
11584 Microblaze Target: PIC data text relative
11586 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11587 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11589 * config/microblaze/microblaze.h (microblaze_constant_address_p):
11590 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11591 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11592 New addressing mode for data-text relative position indepenedent code.
11593 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11594 'ADDRESS_SYMBOLIC_TXT_REL'.
11595 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11596 (microblaze_legitimate_pic_operand): Exclude function calls from
11597 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11598 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11600 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11601 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11602 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11603 for 'address + offset'.
11604 (microblaze_expand_prologue): Add new function prologue call for
11606 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11607 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11608 table in case of TARGET_PIC_DATA_TEXT_REL.
11609 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11610 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11611 Add new macros 'UNSPEC_TEXT',
11612 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11613 + exclude function calls from 'UNSPEC_PLT' in case of data text
11615 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11616 new target hook for generating address diff vector tables in case of
11618 * doc/tm.texi : Regenerate.
11619 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11620 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11621 of addr diff vector generation.
11622 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11623 target hook definition.
11624 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11625 Add default function for generate_pic_addr_diff_vec -> flag_pic.
11626 * doc/invoke.texi (Add new pic option): Add new microblaze pic
11627 option for data text relative.
11629 2018-04-30 Richard Biener <rguenther@suse.de>
11631 * tree-chrec.h (evolution_function_is_constant_p): Remove
11633 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11635 2018-04-30 Richard Biener <rguenther@suse.de>
11638 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11640 2018-04-30 Richard Biener <rguenther@suse.de>
11642 PR tree-optimization/28364
11643 PR tree-optimization/85275
11644 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11645 copying first exit test.
11647 2018-04-28 Mark Wielaard <mark@klomp.org>
11649 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11650 dwarf_version >= 5.
11651 (dwarf_AT): Handle DW_AT_addr_base.
11652 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11654 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
11657 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11658 (*ashl<dwi>3_doubleword_mask_1): Ditto.
11659 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11660 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11662 2018-04-28 Richard Biener <rguenther@suse.de>
11664 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11665 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11666 to reflect use. Only add interesting stmts.
11668 2018-04-27 Martin Jambor <mjambor@suse.cz>
11671 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11672 the jump function allows for passing through aggregate values.
11674 2018-04-27 David Malcolm <dmalcolm@redhat.com>
11676 * input.h (in_system_header_at): Convert from macro to inline
11678 (from_macro_expansion_at): Likewise.
11679 (from_macro_definition_at): Likewise.
11681 2018-04-27 Jeff Law <law@redhat.com>
11683 * config.gcc: Mark tile* targets as deprecated/obsolete.
11685 2018-04-27 Richard Biener <rguenther@suse.de>
11687 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11690 2018-04-27 Richard Biener <rguenther@suse.de>
11692 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11694 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
11696 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11697 with Yd constraint. Set "preferred_for_speed" attribute from
11698 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11699 with Yd constraint.
11700 (*movdi_internal): Ditto.
11701 (movti_interunit splitters): Remove
11702 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11703 (movdi_interunit splitters): Ditto.
11704 * config/i386/constraints.md (Ye): Remove.
11705 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11707 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11710 * config/aarch64/constraints.md (Usg): Limit to 31.
11711 (Usj): Limit to 63.
11713 2018-04-27 Jakub Jelinek <jakub@redhat.com>
11715 PR tree-optimization/85529
11716 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11717 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11718 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11719 zero extension or masking of the MSB bit.
11720 (optimize_range_tests): Add FIRST_BB argument, pass it through
11721 to optimize_range_tests_var_bound.
11722 (maybe_optimize_range_tests, reassociate_bb): Adjust
11723 optimize_range_tests callers.
11725 2018-04-26 Richard Biener <rguenther@suse.de>
11726 Jakub Jelinek <jakub@redhat.com>
11728 * cgraph.h (symbol_table): Just declare debug method here.
11729 * symtab.c (symbol_table::debug): Define.
11731 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
11733 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11735 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
11737 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11738 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11739 (*movdi_internal): Substitute Yi and Yj constraint with x
11740 and Ym and Yn constraint with y constraint. Update "isa"
11741 attribute and set "preferred_for_speed" attribute from
11742 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11743 (*movsi_internal): Ditto.
11744 (*movdf_internal): Ditto.
11745 (*movsf_internal): Ditto.
11746 (*zero_extendsidi2): Ditto.
11747 * config/i386/sse.md (vec_set<mode>_0): Ditto.
11748 (sse2_loadld): Ditto.
11749 (*vec_extract<ssevecmodelower>_0): Ditto.
11750 (*vec_extractv4si_0_zext_sse4): Ditto.
11751 (vec_concatv2di): Ditto.
11752 (*vec_dup<mode>): Ditto.
11753 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11754 * config/i386/constraints.md (Yi): Remove.
11759 2018-04-26 Nathan Sidwell <nathan@acm.org>
11761 * dumpfile.c (dump_open): New.
11762 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11763 (dump_finish): Detect stdio/stderr by value not name.
11765 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
11767 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11769 2018-04-26 Tom de Vries <tom@codesourcery.com>
11772 * config/nvptx/nvptx.c (verify_neutering_jumps)
11773 (verify_neutering_labels): New function
11774 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11776 2018-04-26 Tom de Vries <tom@codesourcery.com>
11779 * config/nvptx/nvptx.c (needs_neutering_p): New function.
11780 (nvptx_single): Use needs_neutering_p to skip over insns that do not
11783 2018-04-26 Richard Biener <rguenther@suse.de>
11784 Tom de Vries <tom@codesourcery.com>
11787 * lto-streamer-out.c (output_function): Fixup loops if required to match
11788 discovery done in the reader.
11790 2018-04-26 Richard Biener <rguenther@suse.de>
11792 PR tree-optimization/85116
11793 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11794 have a loop exit from the single latch predecessor. Remove
11795 case of header with just condition.
11796 (ch_base::copy_headers): Exclude infinite loops from any
11798 (pass_ch::execute): Record exits.
11800 2018-04-26 Richard Biener <rguenther@suse.de>
11802 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11803 prologue cost vector and pass it to vect_get_load_cost.
11804 (vect_get_peeling_costs_all_drs): Likewise.
11805 (vect_peeling_hash_get_lowest_cost): Likewise.
11806 (vect_enhance_data_refs_alignment): Likewise.
11808 2018-04-26 Richard Biener <rguenther@suse.de>
11810 PR middle-end/85450
11811 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11812 checking of integer<->pointer conversions.
11813 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11814 sign-/zero-extending pointer types.
11815 (expand_omp_for_static_chunk): Likewise.
11817 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
11818 Jean Lee <xiaoyur347@gmail.com>
11820 * config/mips/mips.c (mips_asan_shadow_offset): New function.
11821 (TARGET_ASAN_SHADOW_OFFSET): Define.
11822 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11823 true for -fsanitize=address.
11825 2018-04-25 Mark Wielaard <mark@klomp.org>
11827 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11830 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11832 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11833 than "alu", remove explicit "memory" and "imm_disp" attributes.
11834 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11836 PR middle-end/85414
11837 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11838 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11839 gen_lowpart_no_emit.
11841 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
11844 * config/i386/i386.c (ix86_expand_builtin): Change memory
11845 operand to XI, extend p0 to Pmode.
11846 * config/i386/i386.md: Change unspec volatile and operand
11847 1 mode to XI, change operand 0 mode to P.
11849 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11851 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11852 GET_MODE_MASK before any checking.
11853 (nds32_can_use_bset_p): Likewise.
11854 (nds32_can_use_btgl_p): Likewise.
11856 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11858 * config/nds32/nds32-doubleword.md: New define_split pattern for
11859 illegal register number.
11861 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11863 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11865 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11867 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11869 2018-04-25 Richard Biener <rguenther@suse.de>
11871 * lto-streamer.h (LTO_major_version): Bump to 8.
11873 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11875 * BASE-VER: Set to 9.0.0.
11877 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
11879 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11880 in __abskf2 and __powikf2.
11882 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11885 * config/aarch64/constraints.md (Usg, Usj): New constraints.
11886 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11887 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11888 Use the above on operand 2. Reindent.
11889 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11891 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11894 * common/config/i386/i386-common.c (ix86_handle_option): Don't
11896 * config/i386/i386.opt (mcet): Removed.
11897 * doc/install.texi: Remove -mcet documentation.
11898 * doc/invoke.texi: Likewise.
11900 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11903 * doc/install.texi: Remove -mcet from bootstrap-cet.
11905 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11908 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11909 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11913 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11914 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11915 containing a CONST_VECTOR.
11917 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
11919 * doc/install.texi: Update newlib dependency for nvptx.
11921 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11924 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11925 instead of INTVAL when shifting x left.
11927 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
11929 PR tree-optimization/85478
11930 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11931 vect_grouped_store_supported for single element vectors.
11933 2018-04-24 Richard Biener <rguenther@suse.de>
11936 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11937 load cost increase to the case of non-constant step.
11939 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11942 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11943 destination if any_malformed_asm.
11945 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
11947 PR middle-end/85496
11948 * expr.c (store_field): In the bitfield case, if the value comes from
11949 a function call and is returned in registers by means of a PARALLEL,
11950 do not change the mode of the temporary unless BLKmode and VOIDmode.
11952 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
11954 PR rtl-optimization/85423
11955 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11956 dependencies to debug insns when the previous insn is non-debug.
11958 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11960 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11961 enums into a single definition.
11962 (fls): Fix predicates and printing.
11965 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11967 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11968 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11969 and short u6 immediate.
11970 (check_if_valid_sleep_operand): Remove.
11971 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11973 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11975 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11976 flag_always_save_lp condition.
11977 * config/nds32/nds32.opt (malways-save-lp): New option.
11979 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11981 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11982 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11983 * config/nds32/nds32.h
11984 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11985 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11987 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11989 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11990 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11992 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11993 Chung-Ju Wu <jasonwucj@gmail.com>
11995 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11997 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11998 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12000 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12002 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12004 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12006 * config/nds32/nds32-protos.h (nds32_data_alignment,
12007 nds32_local_alignment): Declare.
12008 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12009 nds32_local_alignment): New functions.
12010 (TARGET_CONSTANT_ALIGNMENT): Define.
12011 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12013 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12015 * config/nds32/nds32.c
12016 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12017 (TARGET_MODES_TIEABLE_P): Likewise.
12019 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12021 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12022 level Ofast and Og.
12024 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
12025 Chung-Ju Wu <jasonwucj@gmail.com>
12027 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12028 for unaligned access.
12029 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12031 * config/nds32/nds32-intrinsic.md: Likewise.
12032 * config/nds32/nds32_intrinsic.h: Likewise.
12033 * config/nds32/nds32.h (nds32_builtins): Likewise.
12034 * config/nds32/nds32.opt (munaligned-access): New option.
12035 * config/nds32/nds32.c (nds32_asm_file_start): Display
12036 flag_unaligned_access status.
12038 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12040 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12041 -mno-relax is present.
12042 * config/riscv/linux.h (LINK_SPEC): Ditto.
12044 2018-04-20 Martin Sebor <msebor@redhat.com>
12047 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12049 (gimple_fold_builtin_stxcpy_chk): Same.
12050 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12052 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
12055 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12056 __powikf2 when long double is IEEE 128-bit.
12058 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12060 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12061 step to make sure stack always aligned.
12063 2018-04-20 Carl Love <cel@us.ibm.com>
12066 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12067 size check for arg0.
12069 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
12070 Tom de Vries <tom@codesourcery.com>
12073 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12074 Emit insns for calls too.
12075 (nvptx_find_par): Always look for worker-level predecessor insn.
12076 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
12078 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12079 (nvptx_process_pars): Propagate frames for calls.
12081 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
12084 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12086 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12087 (ix86_handle_option): Don't handle OPT_mibt.
12088 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12090 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12092 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12093 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12094 (ix86_target_macros): Define __CET__ with flag_cf_protection
12095 for -fcf-protection.
12096 * config/i386/i386.c (isa2_opts): Remove -mibt.
12097 * config/i386/i386.h (TARGET_IBT): Removed.
12098 (TARGET_IBT_P): Likewise.
12099 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12100 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12101 * config/i386/i386.opt (mcet): Update help message.
12102 (mshstk): Likewise.
12104 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
12105 -mcet as an alias for -mshstk.
12107 2018-04-20 Richard Biener <rguenther@suse.de>
12109 PR middle-end/85475
12110 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12111 complexity by forcing a single use of the multiply operand.
12113 2018-04-20 Martin Jambor <mjambor@suse.cz>
12116 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12117 recursion dependency to only apply to non-clones.
12119 2018-04-20 Martin Jambor <mjambor@suse.cz>
12122 * ipa-cp.c (create_specialized_node): Check that clones of
12123 self-recursive edges exist during IPA-CP.
12125 2018-04-19 Toon Moene <toon@moene.org>
12127 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12130 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12132 PR tree-optimization/85467
12133 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12134 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
12135 VECTOR_CST element to type.
12137 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12140 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12141 * config/i386/i386.md (builtin_setjmp_setup): Removed.
12142 (builtin_longjmp): Likewise.
12143 (save_stack_nonlocal): New pattern.
12144 (restore_stack_nonlocal): Likewise.
12146 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12149 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12150 Replace ASM_OUTPUT_LABEL with fprintf.
12152 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12155 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12156 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12157 * config/i386/i386-c.c (ix86_target_macros_internal): Also
12158 define __IBT__ and __SHSTK__ for -fcf-protection.
12159 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12161 (ix86_trampoline_init): Likewise.
12162 (x86_output_mi_thunk): Likewise.
12163 (ix86_notrack_prefixed_insn_p): Likewise.
12164 (ix86_option_override_internal): Don't disallow -fcf-protection.
12165 * config/i386/i386.md (rdssp<mode>): Also enable for
12167 (incssp<mode>): Likewise.
12168 (nop_endbr): Likewise.
12169 * config/i386/i386.opt (mcet): Change help message to built-in
12172 (mshstk): Likewise.
12173 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12174 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
12175 enable CET built-in functions.
12177 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
12179 * common/config/i386/i386-common.c
12180 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12181 OPTION_MASK_ISA_MOVDIRI_UNSET,
12182 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12183 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12184 * config.gcc (movdirintrin.h): New header.
12185 * config/i386/cpuid.h (bit_MOVDIRI,
12186 bit_MOVDIR64B): New bits.
12187 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12189 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12190 (VOID, PVOID, PCVOID)): New function types.
12191 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12192 __builtin_ia32_directstoreu_u64,
12193 __builtin_ia32_movdir64b): New builtins.
12194 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12195 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12197 (ix86_valid_target_attribute_inner_p): Ditto.
12198 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12199 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12200 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12201 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12202 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12203 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12204 (movdiri<mode>, movdir64b_<mode>): New.
12205 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12206 * config/i386/immintrin.h: Include movdirintrin.h.
12207 * config/i386/movdirintrin.h: New file.
12208 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12210 2018-04-19 Richard Biener <rguenther@suse.de>
12212 PR middle-end/85455
12213 * cfg.c (clear_bb_flags): When loop state says we have
12214 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12216 2018-04-19 Richard Biener <rguenther@suse.de>
12218 PR tree-optimization/84737
12219 * tree-vect-data-refs.c (vect_copy_ref_info): New function
12220 copying restrict info.
12221 (vect_setup_realignment): Use it.
12222 * tree-vectorizer.h (vect_copy_ref_info): Declare.
12223 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12224 the first DR to all generated stores.
12225 (vectorizable_load): Likewise for loads.
12227 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12229 PR tree-optimization/85446
12230 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12231 the integral and pointer types to have the same precision.
12233 * doc/install.texi: Document --disable-cet being the default and
12236 2018-04-18 Martin Liska <mliska@suse.cz>
12238 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12241 2018-04-18 Martin Liska <mliska@suse.cz>
12244 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12247 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12248 arguments if they are comparable.
12250 2018-04-18 Martin Liska <mliska@suse.cz>
12253 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12256 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12259 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
12262 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12263 ENDBR after calling __morestack.
12265 2018-04-18 David Malcolm <dmalcolm@redhat.com>
12268 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12269 by using gcc_base_ver to generate a gcc_driver_version, and use
12270 it when generating GCC_DRIVER_NAME.
12271 * configure: Regenerate.
12273 2018-04-18 Jakub Jelinek <jakub@redhat.com>
12276 * config.gcc: Obsolete powerpc*-*-*spe*.
12278 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12281 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12282 (stabstr_D): Change type of unum from unsigned int to
12283 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
12286 2018-04-17 Jim Wilson <jimw@sifive.com>
12289 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12290 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12291 Set arg_pointer_offset after using pretend_args_size.
12293 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12295 PR rtl-optimization/85431
12296 * dse.c (record_store): Ignore zero width stores.
12299 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
12300 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12301 __builtin_stack_restore rather than after it.
12302 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12303 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12304 argument instead of virtual_dynamic_stack_rtx.
12306 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
12308 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12310 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12311 Add note to error message to explain internal mapping of overloaded
12312 built-in function name to non-overloaded built-in function name.
12313 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12316 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
12319 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12320 where the inputs overlap with the output.
12322 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12324 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12325 (=v, v) alternative and explicit "memory" attribute.
12326 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
12327 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12329 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12330 "sselog1" type instead of "sselog".
12331 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12332 "sselog". Remove explicit "memory" attribute.
12333 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12334 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12336 (vec_extract_hi_v32hi): Merge all alternatives into one, use
12337 "sselog1" type instead of "sselog". Remove explicit "memory"
12339 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12340 use "sselog1" type instead of "sselog". Remove explicit "memory"
12342 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12343 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12345 (vec_extract_hi_v64qi): Merge all alternatives into one, use
12346 "sselog1" type instead of "sselog". Remove explicit "memory"
12348 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12349 use "sselog1" type instead of "sselog". Remove explicit "memory"
12353 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12355 PR middle-end/85414
12356 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12359 2018-04-17 Martin Jambor <mjambor@suse.cz>
12362 * ipa-cp.c (create_specialized_node): Call
12363 expand_all_artificial_thunks if necessary.
12365 2018-04-17 Martin Liska <mliska@suse.cz>
12368 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12369 in message, remote space in between '_G' and '('.
12371 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12374 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12375 avx512f_vmcmp<mode>3<round_saeonly_name>,
12376 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12377 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12378 avx512f_rndscale<mode><round_saeonly_name>,
12379 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12380 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12381 Use %<iptr>2 instead of %2 for -masm=intel.
12382 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12383 avx512f_vcvttss2usi<round_saeonly_name>,
12384 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12386 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12387 avx512f_vcvttsd2usi<round_saeonly_name>,
12388 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12389 Use %q1 instead of %1 for -masm=intel.
12390 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12391 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12392 of %3 for -masm=intel.
12393 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12395 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12397 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12399 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12400 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12402 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12404 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12405 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12406 %g1 and one with %0 and %1.
12407 (avx512er_vmrcp28<mode><round_saeonly_name>,
12408 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12409 %1 for -masm=intel.
12410 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12411 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12412 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12413 of %0 and %{%4%} for -masm=intel.
12414 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12415 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12416 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12417 order of %0 and %{%5%}%{z%} for -masm=intel.
12419 2018-04-17 Jan Hubicka <jh@suse.cz>
12422 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12424 2018-04-17 Martin Liska <mliska@suse.cz>
12427 * multiple_target.c (create_dispatcher_calls): Set apostrophes
12428 for target_clone error message. Make default implementation
12429 clone to be a local declaration.
12430 (separate_attrs): Add new argument and check for an empty
12432 (expand_target_clones): Handle it.
12433 (ipa_target_clone): Make redirection just for target_clones
12436 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
12437 Tom de Vries <tom@codesourcery.com>
12439 PR middle-end/84955
12440 * omp-expand.c (expand_oacc_for): Add dummy false branch for
12441 tiled basic blocks without omp continue statements.
12443 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
12446 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12447 vec_extract expression as having side effects to make sure it gets
12450 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
12453 * config/i386/i386.c (get_builtin_code_for_version): Check
12456 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
12459 * config.gcc: Support "skylake".
12460 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12462 * config/i386/i386.c (m_SKYLAKE): Define.
12463 (processor_target_table): Add "skylake".
12464 (ix86_option_override_internal): Add "skylake".
12465 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12466 PROCESSOR_CANNONLAKE.
12467 (get_builtin_code_for_version): Fix priority for
12468 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12469 PROCESSOR_SKYLAKE-AVX512.
12470 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12471 (processor_type): Add PROCESSOR_SKYLAKE.
12473 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
12474 Jason Merrill <jason@redhat.com>
12477 * convert.c (convert_to_integer_1): Use direct recursion for
12478 enumeral types and types with a precision less than the number
12479 of bits in their mode.
12481 2018-04-16 Julia Koval <julia.koval@intel.com>
12484 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12485 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12487 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
12490 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12491 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12492 and -mno-direct-move.
12494 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
12497 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12498 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12499 Ensure negative shifts result in {0}.
12501 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
12503 PR rtl-optimization/79916
12504 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12505 regs (if any) to define how to gnerate SD moves when LRA is in
12508 2018-04-13 Jakub Jelinek <jakub@redhat.com>
12510 PR rtl-optimization/85393
12511 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12512 * except.c (expand_dw2_landing_pad_for_region): Make static.
12513 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12514 a label and unconditional jump to old_bb, rather than
12515 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12518 PR rtl-optimization/85376
12519 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12520 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12521 instead of a specific value.
12523 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
12524 Bin Cheng <bin.cheng@arm.com>
12526 PR tree-optimization/82965
12527 PR tree-optimization/83991
12528 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12529 by_profile_only parameter.
12530 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12531 information if the loop was predicted to iterate too many times.
12532 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12534 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
12537 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12540 2018-04-13 Martin Liska <mliska@suse.cz>
12541 Jakub Jelinek <jakub@redhat.com>
12543 PR middle-end/81657
12544 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12545 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12546 * builtins.c (expand_builtin_memory_copy_args): Use
12547 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12548 handle dest_addr == pc_rtx.
12550 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
12553 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12554 asked to not generate direct moves.
12555 (fix_trunc<mode>si2_stfiwx): Similar.
12556 (fix_trunc<mode>si2_internal): Similar.
12558 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12561 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12562 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12563 lookup if dest in some wider mode is known to be const0_rtx and
12564 if so, record permanent equivalence for it to be ZERO_EXTEND of
12565 the narrower mode destination.
12567 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
12569 * lto-streamer-out.c (output_function): Revert 259346.
12570 * omp-expand.c (expand_oacc_for): Likewise.
12572 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
12574 PR rtl-optimization/85354
12575 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12576 * sel-sched.c (sel_global_init): ... here.
12578 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
12581 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12582 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12583 mode for PE-COFF targets.
12584 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12585 (i386_pe_asm_lto_end): Likewise.
12586 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12587 (TARGET_ASM_LTO_END): Likewise.
12588 * config/i386/winnt.c (saved_debug_info_level): New static variable.
12589 (i386_pe_asm_lto_start): New function.
12590 (i386_pe_asm_lto_end): Likewise.
12592 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
12593 Richard Biener <rguenther@suse.de>
12595 PR middle-end/84955
12596 * lto-streamer-out.c (output_function): Fix CFG loop state before
12598 * omp-expand.c (expand_oacc_for): Handle calls to internal
12599 functions like regular functions.
12601 2018-04-12 Richard Biener <rguenther@suse.de>
12604 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12605 for the early LTO debug to properly generate references to it
12606 during DIE emission. Do not re-use that for the skeleton for
12608 (dwarf2out_early_finish): Likewise.
12610 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12613 * config/i386/sse.md
12614 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12615 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12616 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12617 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12618 and output is a reg, avoid creating invalid lowpart subreg, but
12619 instead split into a 512-bit move. Don't split if not AVX512VL,
12620 input is xmm16+ reg and output is a mem.
12621 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12622 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12623 xmm16+ reg and output is a mem.
12625 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12627 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12628 also for flag_dwarf2_cfi_asm.
12630 2018-04-12 Jakub Jelinek <jakub@redhat.com>
12632 PR rtl-optimization/85342
12633 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12634 a bool scalar var inside of the loop instead. Don't try to update
12635 recog_data.operand after failed apply_change_group.
12637 2018-04-12 Tom de Vries <tom@codesourcery.com>
12640 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12641 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
12642 array with flexible array member as array without given dimension.
12643 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12644 argument for undefined param to true.
12646 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
12649 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12650 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12651 from PowerPC section.
12652 * config/rs6000/sysv4.opt (mcall-): Improve help text.
12653 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12654 help text that is too long.
12655 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12656 help text that is too long.
12657 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12658 help text that is too long.
12660 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
12662 * config/alpha/alpha.md (stack_probe_internal): Rename
12663 from "probe_stack". Update all callers.
12665 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12667 PR rtl-optimization/84566
12668 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12669 sched_macro_fuse_insns.
12671 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12674 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12675 (compute_block_dependences): ... from here.
12677 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12679 PR tree-optimization/85331
12680 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12681 from int to HOST_WIDE_INT.
12683 2018-04-11 Martin Jambor <mjambor@suse.cz>
12686 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12687 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12688 not the same as the source val.
12689 (cgraph_edge_brings_value_p): New parameter.
12690 (gather_edges_for_value): Pass destination value to
12691 cgraph_edge_brings_value_p.
12692 (perhaps_add_new_callers): Likewise.
12693 (get_info_about_necessary_edges): Likewise and exclude values brought
12694 only by self-recursive edges.
12695 (create_specialized_node): Redirect only clones of self-calling edges.
12696 (+self_recursive_pass_through_p): New function.
12697 (find_more_scalar_values_for_callers_subset): Use it.
12698 (find_aggregate_values_for_callers_subset): Likewise.
12699 (known_aggs_to_agg_replacement_list): Removed.
12700 (decide_whether_version_node): Re-calculate known constants for all
12701 remaining context clones.
12703 2018-04-11 Richard Biener <rguenther@suse.de>
12706 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12707 from early DWARF output.
12708 (dwarf2out_early_finish): Output line info unconditionally into
12709 early DWARF and add reference to it.
12711 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12714 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12715 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12716 other than V2DFmode using iptr mode attribute.
12717 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12719 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
12721 PR rtl-optimization/84659
12722 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12724 2018-04-11 Jakub Jelinek <jakub@redhat.com>
12727 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12729 (output_loc_list): Pass address of a dummy size variable even in the
12730 locview handling loop.
12731 (index_location_lists): Add comment on why skip_loc_list_entry can't
12734 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
12737 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12740 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
12743 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12744 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12745 and -mstring-compare-inline-limit.
12747 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12750 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12751 for stack clash protection in a register whenever we need it to be in
12754 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12756 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12757 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12759 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
12762 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12764 (mlong-double-): Ditto.
12765 * config/rs6000/sysv4.opt (msdata=): Ditto.
12766 (mtls-size=): Ditto.
12768 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
12770 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12771 erroneous entries for
12772 "vector int vec_ldl (int, long int *)", and
12773 "vector unsigned int vec_ldl (int, unsigned long int *)".
12774 Add comments and entries for
12775 "vector bool char vec_ldl (int, bool char *)",
12776 "vector bool short vec_ldl (int, bool short *)",
12777 "vector bool int vec_ldl (int, bool int *)",
12778 "vector bool long long vec_ldl (int, bool long long *)",
12779 "vector pixel vec_ldl (int, pixel *)",
12780 "vector long long vec_ldl (int, long long *)",
12781 "vector unsigned long long vec_ldl (int, unsigned long long *)".
12782 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12783 type tree bool_long_long_type_node and correct definition of
12784 bool_V2DI_type_node to make reference to this new type tree.
12785 (rs6000_mangle_type): Replace erroneous reference to
12786 bool_long_type_node with bool_long_long_type_node.
12787 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12788 comments to emphasize sign distinctions for char and int types and
12789 replace RS6000_BTI_bool_long constant with
12790 RS6000_BTI_bool_long_long constant. Also add comment to restrict
12791 use of RS6000_BTI_pixel.
12792 (bool_long_type_node): Remove this macro definition.
12793 (bool_long_long_type_node): New macro definition
12795 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12797 PR rtl-optimization/85300
12798 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12799 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12800 simplify_unary_operation fails.
12802 2018-04-10 Martin Liska <mliska@suse.cz>
12804 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12805 cgraph_edge and ipa_ref.
12807 2018-04-10 Jakub Jelinek <jakub@redhat.com>
12811 * config/i386/sse.md
12812 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12813 computation of the VEC_MERGE selector from mask.
12814 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12815 Fix decoding of the VEC_MERGE selector into mask.
12817 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12819 PR tree-optimization/85286
12820 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12822 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12824 * final.c (final_1): Set insn_last_address as well as
12825 insn_current_address.
12827 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12830 * explow.c (emit_stack_probe): Call validize_mem on memory location
12831 before passing it to gen_probe_stack. Create address operand and
12832 legitimize it for the probe_stack_address case.
12834 2018-04-09 Jan Hubicka <jh@suse.cz>
12837 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12838 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12839 * tree.c (free_lang_data_in_type): Fix handling of binfos;
12841 (free_lang_data): Rebuild type inheritance graph.
12843 2018-04-09 Martin Sebor <msebor@redhat.com>
12845 * invoke.texi (-finline-small-functions): Mention other optimization
12847 (-findirect-inlining, -fpartial-inlining): Same.
12848 (-finline-functions-called-once): Same.
12849 (-freorder-blocks-and-partition): Same.
12851 2018-04-09 Jan Hubicka <jh@suse.cz>
12854 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12855 jumps; choose last target that matches the criteria (i.e.
12856 no partition changes for non-crossing jumps).
12857 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12858 support for redirecting crossing jumps to non-crossing.
12860 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
12862 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12863 also for naked functions.
12865 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
12867 * config/arc/arc.md (add_shift): New pattern.
12868 (add_shift2): Likewise.
12869 (sub_shift): Likewise.
12870 (sub_shift_cmp0_noout): Likewise.
12871 (compare_si_ashiftsi): Likewise.
12872 (xbfu_cmp0_noout): New combine pattern.
12873 (xbfu_cmp0"): Likewise.
12874 (movsi_set_cc_insn): Place the predicable variant first.
12875 (commutative_binary_cmp0_noout): Remove clobber.
12876 (commutative_binary_cmp0): New pattern.
12877 (noncommutative_binary_cmp0): Likewise.
12878 (noncommutative_binary_cmp0_noout): Likewise.
12879 (noncommutative_binary_comparison_result_used): Removed.
12880 (rsub_cmp0): New pattern.
12881 (rsub_cmp0_noout): Likewise.
12882 (extzvsi): Changed, keep only meaningful variants.
12883 (SQH, SEZ): New iterators.
12884 (SQH_postfix): New mode attribute.
12885 (SEZ_prefix): New code attribute.
12886 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12887 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12888 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12889 of numerical value.
12890 (noncommutative_operator): Check the availability of barrel
12893 2018-04-09 Richard Biener <rguenther@suse.de>
12895 PR tree-optimization/85284
12896 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12897 Only use the niter constraining form of simple_iv when the exit
12898 is always executed.
12900 2018-04-09 Tom de Vries <tom@codesourcery.com>
12903 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12904 (define_expand "*memory_barrier"): New define_expand.
12905 (define_insn "memory_barrier"): New insn.
12907 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12909 PR rtl-optimization/80463
12910 PR rtl-optimization/83972
12911 PR rtl-optimization/83480
12913 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12914 correct producer for the insn.
12915 (tidy_control_flow): Fixup seqnos in case of debug insns.
12917 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12919 PR rtl-optimization/83913
12921 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12922 different sched-times when merging exprs.
12924 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12926 PR rtl-optimization/83962
12928 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12929 tidy_fallthru_edge and tidy_control_flow.
12931 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12933 PR rtl-optimization/83530
12935 * sel-sched.c (force_next_insn): New global variable.
12936 (remove_insn_for_debug): When force_next_insn is true, also leave only
12937 next insn in the ready list.
12938 (sel_sched_region): When the region wasn't scheduled, make another pass
12939 over it with force_next_insn set to 1.
12941 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12943 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12945 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12946 for interrupt control.
12947 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12948 functions for interrupt control.
12949 * config/nds32/nds32-intrinsic.md: Likewise.
12950 * config/nds32/nds32_intrinsic.h: Likewise.
12951 * config/nds32/nds32.h (nds32_builtins): Likewise.
12953 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12955 * config/nds32/nds32.c (nds32_init_machine_status,
12956 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12957 strict_aligned_p field.
12958 (nds32_expand_to_rtl_hook): New function.
12959 (TARGET_EXPAND_TO_RTL_HOOK): Define.
12960 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12962 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12963 Chung-Ju Wu <jasonwucj@gmail.com>
12965 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12966 * config/nds32/nds32-n7.md: New file.
12967 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12968 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12970 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12971 * config/nds32/nds32.md (pipeline_model): Add n7.
12972 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12973 * config/nds32/pipelines.md: Include n7 settings.
12975 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12976 Chung-Ju Wu <jasonwucj@gmail.com>
12978 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12979 * config/nds32/nds32-e8.md: New file.
12980 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12981 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12983 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12984 * config/nds32/nds32.md (pipeline_model): Add e8.
12985 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12986 * config/nds32/pipelines.md: Include e8 settings.
12988 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12989 Chung-Ju Wu <jasonwucj@gmail.com>
12991 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12992 * config/nds32/nds32-n8.md: New file.
12993 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12994 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12996 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12997 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12998 * config/nds32/nds32.md (pipeline_model): Add n8.
12999 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13000 * config/nds32/pipelines.md: Include n8 settings.
13002 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13003 Chung-Ju Wu <jasonwucj@gmail.com>
13005 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13006 * config/nds32/nds32-n9-2r1w.md: New file.
13007 * config/nds32/nds32-n9-3r2w.md: New file.
13008 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13009 nds32_register_ports): New or modify for cpu n9.
13010 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13012 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13013 * config/nds32/nds32-utils.c: New file.
13014 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13015 TARGET_MUL_SLOW): Define.
13016 * config/nds32/nds32.md (pipeline_model): New attribute.
13017 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13018 New options that support cpu n9.
13019 * config/nds32/pipelines.md: Include n9 settings.
13020 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13022 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13024 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13025 information if necessary.
13026 (output_cond_branch_compare_zero): Likewise.
13027 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13028 (nds32_target_alignment): Refine for alignment.
13029 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13030 (FUNCTION_BOUNDARY): Modify.
13031 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13033 * config/nds32/nds32.opt (malways-align, malign-functions): New.
13035 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13037 * config/nds32/constants.md (unspec_volatile_element): Add values for
13038 TLB operation and data prefetch.
13039 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13040 functions for TLB operation and data prefetch.
13041 * config/nds32/nds32-intrinsic.md: Likewise.
13042 * config/nds32/nds32_intrinsic.h: Likewise.
13043 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13044 (nds32_print_operand): Likewise.
13045 * config/nds32/nds32.h (nds32_builtins): Likewise.
13047 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
13048 Andrew Pinski <pinsika@gcc.gnu.org>
13050 PR middle-end/82976
13051 * match.pd: Use constant_boolean_node of correct type instead of
13052 boolean_true_node or boolean_false_node for simplifying
13053 pointer comparisons to zero.
13055 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13057 PR tree-optimization/80021
13058 * tree.c (verify_type_variant): Make error call in verify_variant_match
13059 translatable and remove final full stop.
13061 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13063 * config/nds32/constants.md (unspec_volatile_element): Add
13064 UNSPEC_VOLATILE_EH_RETURN.
13065 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13066 nds32_output_stack_pop): Support dwarf exception handling process.
13067 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13068 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13069 exception handling process.
13070 (nds32_compute_stack_frame): Likewise.
13071 (nds32_return_addr_rtx): Likewise.
13072 (nds32_initial_elimination_offset): Likewise.
13073 (nds32_expand_prologue): Likewise.
13074 (nds32_expand_epilogue): Likewise.
13075 (nds32_dynamic_chain_address): New function.
13076 * config/nds32/nds32.h (machine_function): Add fields for dwarf
13077 exception handling.
13078 (DYNAMIC_CHAIN_ADDRESS): Define.
13079 (EH_RETURN_DATA_REGNO): Define.
13080 (EH_RETURN_STACKADJ_RTX): Define.
13081 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13082 patterns for dwarf exception handling.
13084 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13086 * config/nds32/nds32.h: Clean up obsolete macros.
13088 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13090 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13091 Add enum values for particular instructions.
13092 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13093 particular intrinsic functions.
13094 * config/nds32/nds32-intrinsic.md: Likewise.
13095 * config/nds32/nds32_intrinsic.h: Likewise.
13096 * config/nds32/nds32.h (nds32_builtins): Likewise.
13097 * config/nds32/nds32.md (type): Add pbsad and pbsada.
13098 (btst, ave): New patterns for particular instructions.
13100 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13102 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13103 Add enum values for atomic load/store and memory sync.
13104 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13106 * config/nds32/nds32-intrinsic.md: Likewise.
13107 * config/nds32/nds32_intrinsic.h: Likewise.
13108 * config/nds32/nds32.h (nds32_builtins): Likewise.
13110 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13112 PR tree-optimization/85257
13113 * fold-const.c (native_encode_vector): If not all elts could fit
13114 and off is -1, return 0 rather than offset.
13115 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13116 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13117 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
13118 adjust buffer in native_interpret_expr call.
13120 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13122 * config/nds32/constants.md (unspec_volatile_element): Add cache
13123 control enum values.
13124 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13125 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13126 * config/nds32/nds32.c (nds32_cctl_names): New.
13127 (nds32_print_operand): Handle cache control register names.
13128 * config/nds32/nds32.h (nds32_builtins): New enum values.
13129 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13131 * config/nds32/nds32.md (type): Add mmu.
13132 * config/nds32/pipelines.md (simple_insn): Add mmu.
13134 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13136 * config/nds32/nds32.md (type): Remove call.
13137 * config/nds32/pipelines.md (simple_insn): Likewise.
13139 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13141 * config/nds32/constants.md (unspec_volatile_element): Add
13142 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13143 UNSPEC_VOLATILE_FMFCFG.
13144 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13145 description for fmfcfg and fmfcsr.
13146 (bdesc_1arg): Add fmtcsr.
13147 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13148 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13149 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13150 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13151 unspec_fmfcfg): New patterns.
13152 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13153 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13154 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13155 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13156 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13157 __nds32__fmfcfg): Define.
13159 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13161 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13162 intrinsic register names.
13163 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13164 intrinsic register enum values and macros.
13166 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13168 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13169 for load/store addressing form.
13170 (nds32_print_operand_address): Likewise.
13172 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
13175 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13176 based on LABEL_REF. Remove useless assertion.
13177 (pic_address_needs_scratch): Fix formatting.
13178 (sparc_legitimize_pic_address): Minor tweaks.
13179 (sparc_delegitimize_address): Adjust assertion accordingly.
13180 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13181 into symbolic_operand.
13182 (movsi_high_pic_label_ref): Likewise.
13183 (movsi_lo_sum_pic_label_ref): Likewise.
13184 (movdi_pic_label_ref): Likewise.
13185 (movdi_high_pic_label_ref): Likewise.
13186 (movdi_lo_sum_pic_label_ref): Likewise.
13188 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
13190 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13191 custom LIB_SPEC setup.
13193 2018-04-06 Ruslan Bukin <br@bsdpad.com>
13194 Kito Cheng <kito.cheng@gmail.com>
13196 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13197 * config/riscv/freebsd.h: New.
13199 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13201 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13202 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13205 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13206 Kito Cheng <kito.cheng@gmail.com>
13208 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13209 nds32_output_call, nds32_symbol_binds_local_p): New functions.
13210 * config/nds32/nds32-protos.h (nds32_output_call,
13211 nds32_output_return): Declare.
13212 * config/nds32/nds32.md: Refine all the call and return patterns.
13214 2018-04-06 Jakub Jelinek <jakub@redhat.com>
13217 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13218 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13220 PR rtl-optimization/84872
13221 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13222 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13223 EDGE_CROSSING edge.
13225 2018-04-06 Tamar Christina <tamar.christina@arm.com>
13227 * expr.c (copy_blkmode_to_reg): Revert 254862.
13228 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13230 2018-04-06 Richard Biener <rguenther@suse.de>
13232 PR middle-end/85244
13233 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13234 after seeing a component reference with an adjacent field. Treat
13235 refs to arrays at struct end of external decls similar to
13236 refs to unconstrained commons.
13238 2018-04-06 Jakub Jelinek <jakub@redhat.com>
13241 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13242 look through SAVE_EXPRs with non-side-effects argument. Adjust
13244 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13247 2018-04-06 Richard Biener <rguenther@suse.de>
13249 PR middle-end/85180
13250 * alias.c (find_base_term): New wrapper around find_base_term
13251 unwinding CSELIB_VAL_PTR changes.
13252 (find_base_term): Do not restore CSELIB_VAL_PTR during the
13255 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13257 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13259 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13260 constant definitions.
13261 ("nop"): lr 0,0 -> nopr r0
13262 ("nop_lr0", "nop_lr1"): New insn definitions.
13264 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13266 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13267 NDS32_V3PUSH_AVAILABLE_P macro.
13269 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
13270 Chung-Ju Wu <jasonwucj@gmail.com>
13272 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13273 (nds32*-*-*): Add float and fpu_config into supported_defaults.
13274 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13275 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13276 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13277 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13278 * config/nds32/constraints.md: New constraints and checking for hard
13279 float configuration.
13280 * config/nds32/iterators.md: New mode iterator and attribute for hard
13281 float configuration.
13282 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13284 * config/nds32/nds32-fpu.md: New file.
13285 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13286 deal with hard float code generation.
13287 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13289 (abi_type, float_reg_number): New enum type.
13290 * config/nds32/nds32-predicates.c: New predicates for hard float.
13291 * config/nds32/nds32-protos.h: Declare functions for hard float.
13292 * config/nds32/nds32.c: Implementation for hard float configuration.
13293 * config/nds32/nds32.h: Definitions for hard float configuration.
13294 * config/nds32/nds32.md: Include hard float machine description and
13295 modify patterns for hard float configuration.
13296 * config/nds32/nds32.opt: New options for hard float configuration.
13297 * config/nds32/predicates.md: New predicates for hard float
13300 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13302 * common/config/nds32/nds32-common.c
13303 (nds32_option_optimization_table): Enable -mreleax-hint by default.
13305 2018-04-05 Jakub Jelinek <jakub@redhat.com>
13307 PR middle-end/85195
13308 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13309 CONSTRUCTOR_ELT (ctor, ...)->value.
13311 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
13314 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13316 2018-04-05 Tom de Vries <tom@codesourcery.com>
13319 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13322 2018-04-05 Shiva Chen <shiva0217@gmail.com>
13323 Kito Cheng <kito.cheng@gmail.com>
13325 * config/nds32/constraints.md (U33): Fine-tune checking condition.
13326 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13327 * config/nds32/nds32.h (nds32_16bit_address_type): Add
13328 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13330 2018-04-05 Shiva Chen <shiva0217@gmail.com>
13331 Kito Cheng <kito.cheng@gmail.com>
13333 * config/nds32/constraints.md (Ufe): New memory constraint.
13334 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13335 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13336 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13338 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13339 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13341 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13343 * config/nds32/nds32.md: Use optimize_size in the condition for
13344 alu-shift instructions.
13346 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13348 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13350 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13352 * config/nds32/nds32.md (negsi2): Refine pattern.
13354 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
13355 Chung-Ju Wu <jasonwucj@gmail.com>
13357 * config/nds32/iterators.md (shift_rotate): New code iterator.
13358 (shift): New code attribute.
13359 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13360 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13361 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13362 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13363 bit-wise operations.
13364 (andsi3, *andsi3): Ditto.
13365 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13366 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13367 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13368 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13369 nds32_ior_operand, nds32_xor_operand): New predicates.
13371 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13373 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13374 (addsi3, subsi3): ... this.
13376 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13378 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13380 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13382 * config/nds32/nds32.md: Adjust indention.
13384 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
13386 * config/nds32/nds32.md (feature): New attribute.
13388 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13390 * config/nds32/nds32.md (subtype): New attribute.
13392 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
13395 * config/arm/arm-builtins.c (arm_expand_builtin): Change
13396 expansion to perform a bitwise AND of the argument followed by a
13397 boolean negation of the result.
13399 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
13401 PR rtl-optimization/84878
13402 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13403 the basic block. Assert the use reference is not artificial and that
13404 it has an associated insn.
13406 2018-04-04 Michael Matz <matz@suse.de>
13408 * builtins.c (compute_objsize): Pass correct operand
13409 to array_at_struct_end_p.
13411 2018-04-04 Richard Biener <rguenther@suse.de>
13414 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13415 from contexts for DINFO_LEVEL_TERSE and below.
13417 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13419 * config/nds32/nds32-doubleword.md (move_<mode>): Require
13420 resiter_operand condition.
13421 * config/nds32/nds32.md (*move<mode>): Ditto.
13423 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13424 Monk Chiang <sh.chiang04@gmail.com>
13426 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13428 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13430 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13432 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13433 Kito Cheng <kito.cheng@gmail.com>
13435 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13436 nds32_cond_code_str, output_cond_branch,
13437 output_cond_branch_compare_zero, nds32_expand_cbranch,
13438 nds32_expand_cstore, nds32_expand_movcc,
13439 nds32_output_cbranchsi4_equality_zero,
13440 nds32_output_cbranchsi4_equality_reg,
13441 nds32_output_cbranchsi4_equality_reg_or_const_int,
13442 nds32_output_cbranchsi4_greater_less_zero: New functions.
13443 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13444 nds32_expand_cstore, nds32_expand_movcc,
13445 nds32_output_cbranchsi4_equality_zero,
13446 nds32_output_cbranchsi4_equality_reg,
13447 nds32_output_cbranchsi4_equality_reg_or_const_int,
13448 nds32_output_cbranchsi4_greater_less_zero): Declare.
13449 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13450 nds32_rimm11s_operand): New predicates.
13451 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13452 * config/nds32/nds32.md: Rewrite all the branch and conditional move
13455 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
13457 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13458 * config/nds32/nds32.md: Ditto.
13459 * config/nds32/pipelines.md: Ditto.
13461 2018-04-04 Richard Biener <rguenther@suse.de>
13463 PR tree-optimization/85168
13464 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13465 propagating abnormals.
13467 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13469 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13471 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
13472 Kito Cheng <kito.cheng@gmail.com>
13474 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13475 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13476 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13477 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13478 * config/nds32/nds32.md (sibcall_internal): New.
13479 (sibcall_register): Remove.
13480 (sibcall_immediate): Remove.
13481 (sibcall_value_internal): New.
13482 (sibcall_value_register): Remove.
13483 (sibcall_value_immediate): Remove.
13484 * config/nds32/predicates.md (nds32_general_register_operand): New.
13485 (nds32_call_address_operand): New.
13487 2018-04-03 Jakub Jelinek <jakub@redhat.com>
13489 PR rtl-optimization/85167
13490 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13491 bb_defs if *split_p, instead preinitialize it to NULL.
13493 PR tree-optimization/85156
13494 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13495 evaluating the argument multiple times.
13497 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
13499 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13501 (_mm_cvtpd_ps): Likewise.
13502 (_mm_cvttpd_epi32): Likewise.
13503 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13504 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13505 vector, pixel, and bool following altivec.h include.
13507 2018-04-03 Martin Sebor <msebor@redhat.com>
13509 * doc/extend.texi (Common Function Attributes): Clarify.
13510 (const attribute): Likewise.
13511 (pure attribute): Likewise.
13513 2018-04-03 Jakub Jelinek <jakub@redhat.com>
13516 * config/i386/i386.c (ix86_expand_vector_set): Use
13517 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
13519 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
13521 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13522 instructions when changing rounding bits to preserve precision bits
13523 in the x87 control word.
13525 2018-04-03 Martin Liska <mliska@suse.cz>
13527 PR tree-optimization/82491
13528 * rtl.h (strip_offset_and_add): Replace += suboffset with
13529 poly_uint64 () + suboffset.
13531 2018-03-29 Martin Liska <mliska@suse.cz>
13532 Martin Jambor <mjambor@suse.cz>
13535 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13536 param_type is not an integral or pointer type.
13538 2018-04-03 Richard Biener <rguenther@suse.de>
13540 * sese.h (recompute_all_dominators): Remove.
13542 2018-04-02 Martin Sebor <msebor@redhat.com>
13544 * doc/invoke.texi (-Wrestrict): Fix typos.
13546 2018-04-02 Jim Wilson <jimw@sifive.com>
13548 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13549 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13550 (<optab>di3, <optab>si3_extend): Likewise.
13551 (<optab>si3_mask, <optab>si3_mask_1): New.
13552 (<optab>di3_mask, <optab>di3_mask_1): New.
13553 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13554 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13555 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13557 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
13559 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13562 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
13564 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13565 (nds32_canonicalize_comparison): New function.
13567 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13568 Kito Cheng <kito.cheng@gmail.com>
13569 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13571 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13572 * config/nds32/constants.md (unspec_volatile_element): Add
13573 UNSPEC_VOLATILE_RELAX_GROUP.
13574 * config/nds32/nds32-relax-opt.c: New file.
13575 * config/nds32/nds32-predicates.c
13576 (nds32_symbol_load_store_p): New function.
13577 * config/nds32/nds32-protos.h
13578 (nds32_symbol_load_store_p): Declare function.
13579 (make_pass_nds32_relax_opt): Declare new rtl pass function.
13580 * config/nds32/nds32.c
13581 (nds32_register_pass): New function to register pass.
13582 (nds32_register_passes): New function to register passes.
13583 * config/nds32/nds32.md (relax_group): New pattern.
13584 * config/nds32/nds32.opt (mrelax-hint): New option.
13585 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13587 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
13589 * config/nds32/t-nds32: Modify files dependency.
13591 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13593 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13594 (PROFILE_HOOK): Define its implementation.
13596 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
13598 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13599 type and 32-bit size.
13601 2018-04-01 Jakub Jelinek <jakub@redhat.com>
13603 PR middle-end/85090
13604 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13605 (V_128_256): New mode iterator.
13606 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13607 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13608 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13610 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13611 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13613 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
13616 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13617 NaN inputs correctly.
13619 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
13622 * config/rs6000/vsx.md (??r): New mode attribute.
13623 (*vsx_mov<mode>_64bit): Use it.
13624 (*vsx_mov<mode>_32bit): Likewise.
13626 2018-03-30 Martin Sebor <msebor@redhat.com>
13628 PR tree-optimization/84818
13629 * builtins.c (check_access): Use warning_n.
13631 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13634 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13636 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13639 2018-03-30 Julia Koval <julia.koval@intel.com>
13642 * x86-tune.def (movx, partial_reg_dependency): Enable for
13645 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
13647 PR inline-asm/84985
13648 * lra-constraints.c (process_alt_operands): Move setting
13649 this_alternative_matches below.
13651 2018-03-29 Martin Liska <mliska@suse.cz>
13654 * doc/invoke.texi: Document how LTO works with debug info.
13655 Describe auto-load support of binutils. Mention 'x86-64'
13656 as valid option value of -march option.
13658 2018-03-29 Jakub Jelinek <jakub@redhat.com>
13660 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13663 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13664 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13665 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13668 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
13671 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13672 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13673 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13674 for RS6000_BTM_POWERPC64.
13675 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13676 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13677 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13680 (DIVDEU): Likewise.
13682 2018-03-28 Carl Love <cel@us.ibm.com>
13685 2017-09-27 Carl Love <cel@us.ibm.com>
13687 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13688 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13689 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13692 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13694 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13695 instead of __vector bool.
13696 (_mm_max_pu8): Likewise.
13697 (_mm_min_pi16): Likewise.
13699 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
13702 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13703 (DIVWEUO): Likewise.
13704 (DIVDEO): Likewise.
13705 (DIVDEUO): Likewise.
13706 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13707 DIVWEUO and DIVDEUO.
13708 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13709 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13710 (div_extend): Likewise.
13711 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13713 (__builtin_divweuo): Likewise.
13714 (__builtin_divdeo): Likewise.
13715 (__builtin_divdeuo): Likewise.
13717 2018-03-28 Jakub Jelinek <jakub@redhat.com>
13720 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13721 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13723 PR tree-optimization/82004
13724 * gimple-match-head.c (optimize_pow_to_exp): New function.
13725 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13726 Don't fold to exp if optimize_pow_to_exp is false.
13728 2018-03-28 Martin Liska <mliska@suse.cz>
13731 * calls.c (initialize_argument_information): Fix trailing space.
13732 * common.opt: Fix typo and provide better explanation for
13733 -fsanitize-coverage option.
13734 * config/i386/i386.opt: Fix typo.
13736 2018-03-28 Jakub Jelinek <jakub@redhat.com>
13737 Martin Liska <mliska@suse.cz>
13740 * gimplify.c (asan_poison_variable): Don't do the check for
13741 gimplify_omp_ctxp here.
13742 (gimplify_decl_expr): Do it here.
13743 (gimplify_target_expr): Likewise.
13745 2018-03-28 Martin Liska <mliska@suse.cz>
13748 * config/i386/i386.c (ix86_function_arg_advance): Do not call
13749 chkp_type_bounds_count if MPX is not enabled.
13751 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
13753 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13755 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
13758 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13759 function to create the function decl for complex long double
13760 multiply and divide for -mabi=ieeelongdouble.
13761 (init_float128_ieee): Call it.
13763 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
13766 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13767 -fcf-protection=branch -mibt.
13768 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13770 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13773 * config/arm/arm.c (arm_valid_symbolic_address): Handle
13774 arm_word_relocations.
13776 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
13779 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13780 extern array declarations.
13782 2018-03-27 Richard Biener <rguenther@suse.de>
13784 PR middle-end/84067
13785 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13786 explicit single_use checks.
13788 2018-03-27 Richard Biener <rguenther@suse.de>
13790 PR tree-optimization/85082
13791 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13794 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13796 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13797 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13798 Turn on fasynchronous-unwind-tables and funwind-tables.
13800 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
13803 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13804 (*bmi_blsr_<mode>_ccz): Ditto.
13806 2018-03-26 Tom de Vries <tom@codesourcery.com>
13808 PR tree-optimization/85063
13809 * omp-general.c (offloading_function_p): New function. Factor out
13811 * omp-offload.c (pass_omp_target_link::gate): ... here.
13812 * omp-general.h (offloading_function_p): Declare.
13813 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13814 with attribute omp declare target for offloading functions.
13816 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
13818 PR tree-optimization/84005
13819 * tree-data-ref.h (get_base_for_alignment): Declare.
13820 * tree-data-ref.c (get_base_for_alignment_1): New function.
13821 (get_base_for_alignment): Likewise.
13822 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13823 get_base_for_alignment to find a suitable base object, instead
13824 of always using drb->base_address.
13826 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13828 PR inline-asm/85022
13829 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13830 known size by default.
13832 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
13834 PR inline-asm/85030
13835 * lra-constraints.c (process_alt_operands): Don't match BLKmode
13836 and non BLKmode operands.
13838 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13841 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13842 Clean up attributes.
13844 2018-03-23 Richard Biener <rguenther@suse.de>
13847 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13848 we are going to emit early debug for LTO.
13850 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13852 PR inline-asm/85034
13853 * function.c (match_asm_constraints_1): Don't optimize if input
13854 doesn't satisfy general_operand predicate for output's mode.
13856 PR inline-asm/85022
13857 * alias.c (write_dependence_p): Don't require for x_canonicalized
13858 non-VOIDmode if x has VOIDmode.
13861 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13862 just don't try to optimize it rather than assert it never happens.
13864 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13866 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13867 macro expansions for definition of ST_INTERNAL_<mode> and
13868 LD_INTERNAL_<mode> builtins.
13869 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13871 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13873 (altivec_expand_st_builtin): Likewise.
13874 (altivec_expand_builtin): Remove calls to deleted functions.
13875 (rs6000_address_for_altivec): Delete this function.
13876 * config/rs6000/vector.md: Remove expands for
13877 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13879 2018-03-22 Sudakshina Das <sudi.das@arm.com>
13882 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13883 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13884 re-computing once computed.
13885 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13886 (arm_init_machine_status): Initialize
13887 machine->static_chain_stack_bytes.
13889 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13892 * doc/extend.texi: Add four new prototypes for vec_ld.
13893 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13894 definitions for more logical presentation.
13895 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13896 entries for V1TI variants of __builtin_altivec_ld builtin.
13897 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13898 handling of V1TI variant of LVX icode pattern.
13899 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13900 (rs6000_gimple_fold_builtin): Likewise.
13901 (altivec_init_builtins): Add code to define
13902 __builtin_altivec_lvx_v1ti function.
13904 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13906 PR inline-asm/84941
13907 * function.c (match_asm_constraints_1): Don't do the optimization
13908 if input isn't a REG, SUBREG, MEM or constant.
13910 2018-03-22 Tom de Vries <tom@codesourcery.com>
13912 PR tree-optimization/84956
13913 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13914 bb_has_abnormal_pred.
13916 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13919 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13920 DECL_INITIAL (decl) to decl at the end.
13921 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13922 adjust the comment.
13924 2018-03-21 Joseph Myers <joseph@codesourcery.com>
13926 * doc/extend.texi (__builtin_tgmath): Document when complex
13927 integer types are treated as _Complex _Float64.
13929 2018-03-21 Tom de Vries <tom@codesourcery.com>
13931 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13933 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13935 PR tree-optimization/84960
13936 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13937 if it is ENTRY block, move them into single succ of ENTRY in that case.
13939 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
13941 PR tree-optimization/84811
13942 * poly-int.h (poly_span_traits): Remove the T3 parameter and
13943 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13944 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13945 (known_subrange_p): Update accordingly. Cast each value involved
13946 in the size comparison, rather than casting the result of the
13949 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13951 PR tree-optimization/84982
13952 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13953 by flipping the least significant bit rather than all bits from
13954 bitpos to bitpos + bitsize - 1.
13956 2018-03-21 Nathan Sidwell <nathan@acm.org>
13958 * doc/extend.texi (Deprecated Features): Remove mention of
13959 long-deleted deprecations.
13961 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13964 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13965 * configure: Regenerate.
13967 2018-03-21 Tom de Vries <tom@codesourcery.com>
13969 PR tree-optimization/83126
13970 * tree-parloops.c (num_phis): New function.
13971 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13973 2018-03-21 Nathan Sidwell <nathan@acm.org>
13975 * doc/extend.texi (Deprecated Features): Update deprecated flags,
13976 mention anon-struct/union members and trailing attributes.
13978 2018-03-21 Bin Cheng <bin.cheng@arm.com>
13980 PR tree-optimization/84969
13981 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13982 builtin memset partitions if they set different rhs values.
13984 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13986 PR rtl-optimization/84989
13987 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13988 VEC_DUPLICATE with scalar result mode.
13990 2018-03-21 Martin Liska <mliska@suse.cz>
13993 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13994 not intended return statement.
13996 2018-03-21 Martin Liska <mliska@suse.cz>
13999 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14000 (chkp_find_bound_slots_1): Limit number of iterations.
14002 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
14005 * Minor grammar fixes for x86 options.
14007 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14010 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14011 holding REG_CFA_RESTORE notes, instead turn them into a USE.
14013 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
14016 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14017 (altivec_lvx_<mode>_1op): Likewise.
14018 (altivec_stvx_<mode>_2op): Likewise.
14019 (altivec_stvx_<mode>_1op): Likewise.
14020 (altivec_lvx_<VM2:mode>): New define_expand.
14021 (altivec_stvx_<VM2:mode>): Likewise.
14022 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14023 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14024 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14025 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14026 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14027 (rs6000_gen_lvx): Likewise.
14028 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14029 (altivec_expand_stv_builtin): Likewise.
14030 (altivec_expand_builtin): Likewise.
14031 * config/rs6000/vector.md: Likewise.
14033 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14036 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14039 2018-03-20 Richard Biener <rguenther@suse.de>
14042 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14043 sign-conversions as zero, fall back to standard scalar_stmt
14046 2018-03-20 Martin Liska <mliska@suse.cz>
14049 * predict.c (rebuild_frequencies): Handle case when we have
14050 PROFILE_ABSENT, but flag_guess_branch_prob is false.
14052 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14055 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14056 flag_section_anchors.
14057 * varasm.c (use_blocks_for_decl_p): Remove hack for
14058 dw2_force_const_mem.
14061 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14063 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
14064 be created, use lowpart_subreg of operands[0] rather than operands[0]
14066 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14067 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14068 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14069 and n constraint instead of aarch64_shift_imm_di and Usd.
14070 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14071 (*aarch64_<optab>_reg_minus<mode>3): ... this.
14073 2018-03-20 Sudakshina Das <sudi.das@arm.com>
14076 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14077 to favor GPR over NEON registers.
14078 (<shift>di3_neon): Likewise.
14080 2018-03-20 Tom de Vries <tom@codesourcery.com>
14083 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14084 (nvptx_process_pars): Emit bar.sync asap and alap.
14086 2018-03-20 Tom de Vries <tom@codesourcery.com>
14089 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14090 seen_label if seen_label is already set.
14092 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14095 * config/i386/i386.c (fold_builtin_cpu): For features above 31
14096 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14097 Use 1U instead of 1. Formatting fixes.
14100 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14101 instead of TREE_TYPE (s1) for the return value.
14103 2018-03-19 Jakub Jelinek <jakub@redhat.com>
14105 PR tree-optimization/84946
14106 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14107 bitsize + bitsize in poly_uint64 rather than poly_int64.
14110 * dwarf2asm.c: Include fold-const.c.
14111 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14112 of decl rather than decl itself.
14114 PR rtl-optimization/84643
14115 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14117 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
14120 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14121 calling assemble_variable.
14123 2018-03-19 Sudakshina Das <sudi.das@arm.com>
14126 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14127 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14129 2018-03-19 Jim Wilson <jimw@sifive.com>
14132 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14133 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14134 (riscv_first_stack_step): Likewise.
14135 (riscv_option_override): Use STACK_BOUNDARY instead of
14136 MIN_STACK_BOUNDARY.
14137 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14138 MIN_STACK_BOUNDARY.
14139 (BIGGEST_ALIGNMENT): Set to 128.
14140 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14141 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14144 2018-03-19 Richard Biener <rguenther@suse.de>
14146 PR tree-optimization/84933
14147 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14148 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14150 2018-03-19 Richard Biener <rguenther@suse.de>
14152 PR tree-optimization/84859
14153 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14154 (cond_if_else_store_replacement): Perform sinking operation on
14155 single-store BBs regardless of MAX_STORES_TO_SINK setting.
14156 Generalize what a BB with a single eligible store is.
14158 2018-03-19 Richard Biener <rguenther@suse.de>
14160 PR tree-optimization/84929
14161 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14162 chrec_is_positive against non-chrec arg.
14164 2018-03-19 Tamar Christina <tamar.christina@arm.com>
14167 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14169 2018-03-18 Martin Liska <mliska@suse.cz>
14171 PR rtl-optimization/84635
14172 * regrename.c (build_def_use): Use matches_mode only when
14175 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
14177 PR tree-optimization/84913
14178 * tree-vect-loop.c (vectorizable_reduction): Don't try to
14179 vectorize chains of COND_EXPRs.
14181 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14183 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14185 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14187 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14189 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14191 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14193 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14194 Kito Cheng <kito.cheng@gmail.com>
14196 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14197 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14198 (nds32_adjust_reg_alloc_order): New function.
14199 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14201 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
14203 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14204 nds32_print_operand, nds32_print_operand_address): Use
14205 HOST_WIDE_INT_PRINT_DEC instead.
14207 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14209 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14211 2018-03-17 Jakub Jelinek <jakub@redhat.com>
14214 * config/i386/i386.c (initial_ix86_tune_features,
14215 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14216 unsigned long long.
14217 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14218 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14219 rather than 1u << ix86_tune. Formatting fix.
14220 (ix86_option_override_internal): Change ix86_arch_mask from
14221 unsigned int to unsigned HOST_WIDE_INT, initialize to
14222 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14223 (ix86_function_specific_restore): Likewise.
14225 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14228 * postreload.c (reload_combine_recognize_pattern): Perform
14229 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14230 truncate_int_for_mode the result for the destination's mode.
14233 * hsa-gen.c (mem_type_for_type): Fix comment typo.
14234 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14236 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14239 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
14242 * lra-assigns.c (lra_split_hard_reg_for): Don't use
14243 regno_allocno_class_array and sorted_pseudos.
14244 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14245 insns where regno is used.
14247 2018-03-16 Martin Liska <mliska@suse.cz>
14250 * multiple_target.c (create_dispatcher_calls): Redirect
14251 reference in the symbol table.
14253 2018-03-16 Martin Liska <mliska@suse.cz>
14256 * multiple_target.c (create_dispatcher_calls): Redirect also
14259 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14263 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14264 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14265 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14267 2018-03-16 Julia Koval <julia.koval@intel.com>
14269 * doc/invoke.texi (Skylake Server): Add CLWB.
14270 Cannonlake): Remove CLWB.
14272 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14274 PR tree-optimization/84841
14275 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14277 (FLOAT_ONE_CONST_TYPE): Define.
14278 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14279 (sort_by_operand_rank): Put entries with higher constant_type last
14280 rather than first to match comments.
14282 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
14284 * config/nios2/nios2.md (movsi_internal): Fix thinko in
14287 2018-03-15 Jakub Jelinek <jakub@redhat.com>
14290 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14291 check and use address of target always.
14293 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
14296 * config/i386/i386.c (indirect_thunk_needed): Update comments.
14297 (indirect_thunk_bnd_needed): Likewise.
14298 (indirect_thunks_used): Likewise.
14299 (indirect_thunks_bnd_used): Likewise.
14300 (indirect_return_needed): New.
14301 (indirect_return_bnd_needed): Likewise.
14302 (output_indirect_thunk_function): Add a bool argument for
14304 (output_indirect_thunk_function): Don't generate alias for
14305 function return thunk.
14306 (ix86_code_end): Call output_indirect_thunk_function to generate
14307 function return thunks.
14308 (ix86_output_function_return): Set indirect_return_bnd_needed
14309 and indirect_return_needed instead of indirect_thunk_bnd_needed
14310 and indirect_thunk_needed.
14312 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
14314 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14315 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14316 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14318 2018-03-15 David Malcolm <dmalcolm@redhat.com>
14319 Paul Hua <paul.hua.gm@gmail.com>
14322 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14324 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
14326 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14327 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14328 resp. SFmode cases.
14330 2018-03-15 Tamar Christina <tamar.christina@arm.com>
14333 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14334 instead of GET_MODE_SIZE when comparing Units.
14336 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14339 * varasm.c (hash_section): Return an unchangeble hash value
14340 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14341 Return !aarch64_can_use_per_function_literal_pools_p ().
14343 2018-03-15 Jakub Jelinek <jakub@redhat.com>
14346 * optabs.c (emit_conditional_move): Pass address of cmode's copy
14347 rather than address of cmode as last argument to prepare_cmp_insn.
14349 2018-03-15 Julia Koval <julia.koval@intel.com>
14351 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14352 F_AVX512VNNI, F_AVX512BITALG): New.
14354 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
14357 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
14358 insn for floating-point loads and stores.
14360 2018-03-14 Carl Love <cel@us.ibm.com>
14362 * config/rs6000/rs6000-c.c: Add macro definitions for
14363 ALTIVEC_BUILTIN_VEC_PERMXOR.
14364 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14365 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14366 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14367 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14369 * config/doc/extend.texi: Add prototypes for vec_permxor.
14371 2018-03-14 David Malcolm <dmalcolm@redhat.com>
14374 * diagnostic-show-locus.c (class layout_point): Convert m_line
14375 from int to linenum_type.
14376 (line_span::comparator): Use linenum "compare" function when
14377 comparing line numbers.
14378 (test_line_span): New function.
14379 (layout_range::contains_point): Convert param "row" from int to
14381 (layout_range::intersects_line_p): Likewise.
14382 (layout::will_show_line_p): Likewise.
14383 (layout::print_source_line): Likewise.
14384 (layout::should_print_annotation_line_p): Likewise.
14385 (layout::print_annotation_line): Likewise.
14386 (layout::print_leading_fixits): Likewise.
14387 (layout::annotation_line_showed_range_p): Likewise.
14388 (struct line_corrections): Likewise for field m_row.
14389 (line_corrections::line_corrections): Likewise for param "row".
14390 (layout::print_trailing_fixits): Likewise.
14391 (layout::get_state_at_point): Likewise.
14392 (layout::get_x_bound_for_row): Likewise.
14393 (layout::print_line): Likewise.
14394 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14395 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14396 * input.c (selftest::test_linenum_comparisons): New function.
14397 (selftest::input_c_tests): Call it.
14398 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14399 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14400 * selftest.h (ASSERT_GT): New macro.
14401 (ASSERT_GT_AT): New macro.
14402 (ASSERT_LT): New macro.
14403 (ASSERT_LT_AT): New macro.
14405 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
14407 PR rtl-optimization/84780
14408 * combine.c (distribute_links): Don't make a link based on pc_rtx.
14410 2018-03-14 Martin Liska <mliska@suse.cz>
14412 * tree.c (record_node_allocation_statistics): Use
14413 get_stats_node_kind.
14414 (get_stats_node_kind): New function extracted from
14415 record_node_allocation_statistics.
14416 (free_node): Use get_stats_node_kind.
14418 2018-03-14 Richard Biener <rguenther@suse.de>
14420 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14421 that the value-set of ANTIC_IN doesn't grow.
14424 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14426 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14427 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14429 2018-03-14 Julia Koval <julia.koval@intel.com>
14431 * config.gcc (icelake-client, icelake-server): New.
14433 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14434 (initial_ix86_arch_features): Ditto.
14435 (PTA_SKYLAKE): Add SGX.
14436 (PTA_ICELAKE): Remove.
14437 (PTA_ICELAKE_CLIENT): New.
14438 (PTA_ICELAKE_SERVER): New.
14439 (ix86_option_override_internal): Split up icelake on icelake client and
14441 (get_builtin_code_for_version): Ditto.
14442 (fold_builtin_cpu): Ditto.
14443 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14444 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14445 * config/i386/i386.h (processor_type): Ditto.
14446 * doc/invoke.texi: Ditto.
14448 2018-03-14 Jakub Jelinek <jakub@redhat.com>
14451 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14452 INTEGER_CST offset, add it together with bitpos / 8 and
14453 sign extend based on POINTER_SIZE.
14457 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
14460 * config/i386/constraints.md (Yc): New register constraint.
14461 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14462 Use Yc constraint for alternative 2 of operand 0. Remove
14463 preferred_for_speed attribute.
14465 2018-03-14 Richard Biener <rguenther@suse.de>
14467 PR tree-optimization/84830
14468 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14469 with the old one to avoid oscillations.
14471 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
14474 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14476 (assign_by_spills): Return a flag of reload assignment failure.
14477 Do not process the reload assignment failures. Do not spill other
14478 reload pseudos if they has the same reg class. Update n if
14480 (lra_assign): Add a return arg. Set up from the result of
14481 assign_by_spills call.
14482 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14483 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14484 usage_insns if it is not NULL.
14485 (spill_hard_reg_in_range): New function.
14486 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14487 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14488 function prototypes.
14489 (lra_assign): Change prototype.
14490 * lra.c (lra): Add code to deal with fails by splitting hard reg
14493 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
14495 * config/riscv/riscv.opt (mrelax): New option.
14496 * config/riscv/riscv.c (riscv_file_start): Emit ".option
14497 "norelax" when riscv_mrelax is disabled.
14498 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14500 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14503 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14504 reassociation for int modes.
14506 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14508 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14509 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14511 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14512 * config/aarch64/aarch64-sve.md
14513 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14514 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14515 (*extend<mode><Vwide>2): Rename to...
14516 (aarch64_sve_extend<mode><Vwide>2): ...this.
14517 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14518 renaming the old pattern to...
14519 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
14521 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14522 define_expand, renaming the old pattern to...
14523 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14524 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14525 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14526 account when deciding which SVE instruction the optab should use.
14527 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14529 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14531 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14532 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14533 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14534 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14535 (tlsdesc_small_<mode>): Turn a define_expand and use
14536 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
14537 (tlsdesc_small_advsimd_<mode>): ...this.
14538 (tlsdesc_small_sve_<mode>): New pattern.
14540 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
14542 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14543 (UNSPEC_UMUL_HIGHPART): New constants.
14544 (MUL_HIGHPART): New int iteraor.
14545 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14546 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14548 (*<su>mul<mode>3_highpart): New define_insn.
14550 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14553 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14556 2018-03-13 Martin Liska <mliska@suse.cz>
14559 * (sem_item_optimizer::sem_item_optimizer): Initialize new
14561 (sem_item_optimizer::~sem_item_optimizer): Release it.
14562 (sem_item_optimizer::merge_classes): Register variable aliases.
14563 (sem_item_optimizer::fixup_pt_set): New function.
14564 (sem_item_optimizer::fixup_points_to_sets): Likewise.
14565 * ipa-icf.h: Declare new variables and functions.
14567 2018-03-13 Jakub Jelinek <jakub@redhat.com>
14569 PR middle-end/84834
14570 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14571 integer_pow2p@2 and test integer_pow2p in condition.
14572 (A < 0 ? C : 0): Similarly for @1.
14574 PR middle-end/84831
14575 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14576 characters starting at p contain '\0' character, don't look beyond
14580 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14581 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14584 * reg-stack.c (change_stack): Change update_end var from int to
14585 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14586 also call set_block_for_insn on the newly added insns and rescan.
14589 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14590 on the last operand.
14593 * tree.c (stabilize_reference_1): Return save_expr (e) for
14594 STATEMENT_LIST even if it doesn't have side-effects.
14596 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
14598 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14600 2018-03-12 Renlin Li <renlin.li@arm.com>
14602 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14603 aarch64_output_scalar_simd_mov_immediate.
14605 2018-03-12 Martin Sebor <msebor@redhat.com>
14607 PR tree-optimization/83456
14608 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14609 for perfectly overlapping calls to memcpy.
14610 (gimple_fold_builtin_memory_chk): Same.
14611 (gimple_fold_builtin_strcpy): Handle no-warning.
14612 (gimple_fold_builtin_stxcpy_chk): Same.
14613 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14615 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
14617 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14618 parameter. Use it for SFmode.
14619 (rs6000_function_arg_advance_1): Adjust.
14620 (rs6000_function_arg): Adjust.
14621 (rs6000_gimplify_va_arg): Pass false for that new parameter.
14623 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
14625 PR rtl-optimization/84169
14626 PR rtl-optimization/84780
14627 * combine.c (can_combine_p): Check for a 2-insn combination whether
14628 the destination register is used between the two insns, too.
14630 2018-03-12 Richard Biener <rguenther@suse.de>
14632 PR tree-optimization/84803
14633 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14634 for refs DR analysis didn't process.
14636 2018-03-12 Richard Biener <rguenther@suse.de>
14638 PR tree-optimization/84777
14639 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14640 force-vectorize loops ignore whether we are optimizing for size.
14642 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
14644 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14645 (TARGET_MD_ASM_ADJUST): Define.
14647 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
14648 Kito Cheng <kito.cheng@gmail.com>
14649 Chung-Ju Wu <jasonwucj@gmail.com>
14651 * config/nds32/nds32.c (nds32_compute_stack_frame,
14652 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14653 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14654 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14655 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14656 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14657 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14658 * config/nds32/nds32.md (prologue, epilogue): Use macro
14659 NDS32_V3PUSH_AVAILABLE_P to do checking.
14661 2018-03-11 Jakub Jelinek <jakub@redhat.com>
14664 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14665 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14666 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
14667 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
14668 addition of most attributes on !orig_type_die or the attribute not
14669 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14671 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14672 Chung-Ju Wu <jasonwucj@gmail.com>
14674 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14675 __NDS32_VH__ macro.
14676 * config/nds32/nds32.opt (mvh): New option.
14678 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14679 Chung-Ju Wu <jasonwucj@gmail.com>
14681 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14683 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14684 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14687 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
14688 Chung-Ju Wu <jasonwucj@gmail.com>
14690 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14692 * config/nds32/nds32-multiple.md (strlensi): New pattern.
14693 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14695 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
14696 Kito Cheng <kito.cheng@gmail.com>
14697 Chung-Ju Wu <jasonwucj@gmail.com>
14699 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14700 UNSPEC_FFMISM and UNSPEC_FLMISM.
14701 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14702 for ffb, ffmism and flmism.
14703 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14704 (unspec_ffmism): Ditto.
14705 (unspec_flmism): Ditto.
14706 (nds32_expand_builtin_impl): Check if string extension is available.
14707 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14708 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14710 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
14713 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
14716 * lra-assigns.c (assign_by_spills): Return a flag of reload
14717 assignment failure. Do not process the reload assignment
14718 failures. Do not spill other reload pseudos if they has the same
14720 (lra_assign): Add a return arg. Set up from the result of
14721 assign_by_spills call.
14722 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14723 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14724 usage_insns if it is not NULL.
14725 (spill_hard_reg_in_range): New function.
14726 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14727 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14728 function prototypes.
14729 (lra_assign): Change prototype.
14730 * lra.c (lra): Add code to deal with fails by splitting hard reg
14733 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
14736 * config/i386/i386.opt: Replace Enforcment with Enforcement.
14738 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
14741 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14742 (dw_val_node): Add val_symbolic_view.
14743 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14744 (symview_upper_bound): New.
14745 (new_line_info_table): Initialize symviews_since_reset.
14746 (dwarf2out_source_line): Count symviews_since_reset and set
14747 symview_upper_bound.
14748 (dw_val_equal_p): Handle symview.
14749 (add_AT_symview): New.
14750 (print_dw_val): Handle symview.
14751 (attr_checksum, attr_checksum_ordered): Likewise.
14752 (same_dw_val_p, size_of_die): Likewise.
14753 (value_format, output_die): Likewise.
14754 (add_high_low_attributes): Use add_AT_symview for entry_view.
14755 (dwarf2out_finish): Reset symview_upper_bound, clear
14758 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
14761 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14762 Add strict argument and use it.
14763 (rs6000_split_multireg_move): Update for new strict argument.
14764 (mem_operand_gpr): Disallow all non-offsettable addresses.
14765 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14767 2018-03-09 Jakub Jelinek <jakub@redhat.com>
14770 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14771 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14772 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14775 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14776 decl, use remap_type if we want to use the type.
14778 2018-03-09 Martin Sebor <msebor@redhat.com>
14780 PR tree-optimization/84526
14781 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14783 (builtin_access::generic_overlap): Be prepared to handle non-array
14786 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
14788 PR rtl-optimization/84682
14789 * lra-constraints.c (process_address_1): Check is_address flag
14790 for address constraints.
14791 (process_alt_operands): Likewise.
14792 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14793 preprocess_constraints.
14794 * recog.h (preprocess_constraints): Add oploc parameter.
14796 * recog.c (preprocess_constraints): Test address_operand for
14797 CT_ADDRESS constraints.
14799 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
14802 * lra-assigns.c (assign_by_spills): Return a flag of reload
14803 assignment failure. Do not process the reload assignment
14804 failures. Do not spill other reload pseudos if they has the same
14806 (lra_assign): Add a return arg. Set up from the result of
14807 assign_by_spills call.
14808 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14809 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
14810 usage_insns if it is not NULL.
14811 (spill_hard_reg_in_range): New function.
14812 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14813 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14814 function prototypes.
14815 (lra_assign): Change prototype.
14816 * lra.c (lra): Add code to deal with fails by splitting hard reg
14819 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14822 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14823 Accept complain bool parameter. Only emit errors if it is true.
14824 (arm_parse_cpu_option_name): Likewise.
14825 (arm_target_thumb_only): Adjust callers of the above.
14826 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14827 prototype to take a default true bool parameter.
14828 (arm_parse_arch_option_name): Likewise.
14830 2018-03-09 David Malcolm <dmalcolm@redhat.com>
14831 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14835 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14836 * configure: Regenerate.
14837 * configure.ac ("linker --version-script option"): New.
14838 ("linker soname option"): New.
14840 2018-03-09 Richard Biener <rguenther@suse.de>
14842 PR tree-optimization/84775
14843 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14844 immediate uses of predicate stmts and mark them modified.
14847 PR tree-optimization/84178
14848 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14850 (version_loop_for_if_conversion): Delay update_ssa call.
14851 (tree_if_conversion): Delay update_ssa until after predicate
14854 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
14857 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14858 when the function accesses prior frames.
14860 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14863 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14864 gen_llsym, otherwise call maybe_gen_llsym.
14866 PR inline-asm/84742
14867 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14868 has ',' character inside of it.
14870 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14873 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14874 as clobbering CC_REGNUM.
14876 2018-03-08 Richard Biener <rguenther@suse.de>
14878 PR middle-end/84552
14879 * tree-scalar-evolution.c: Include tree-into-ssa.h.
14880 (follow_copies_to_constant): Do not follow SSA names registered
14883 2018-03-08 Richard Biener <rguenther@suse.de>
14885 PR tree-optimization/84178
14886 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14888 (version_loop_for_if_conversion): Delay update_ssa call.
14889 (tree_if_conversion): Delay update_ssa until after predicate
14892 2018-03-08 David Malcolm <dmalcolm@redhat.com>
14894 PR tree-optimization/84178
14895 * tree-if-conv.c (release_bb_predicate): Remove the
14896 the assertion that the stmts have NULL use_ops.
14897 Discard the statements, asserting that they haven't
14898 yet been added to a BB.
14900 2018-03-08 Richard Biener <rguenther@suse.de>
14902 PR tree-optimization/84746
14903 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14904 (phi_translate): Pass in destination ANTIC_OUT set.
14905 (phi_translate_1): Likewise. For a simplified result lookup
14906 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14907 (phi_translate_set): Adjust.
14908 (do_pre_regular_insertion): Likewise.
14909 (do_pre_partial_partial_insertion): Likewise.
14911 2018-03-08 Martin Liska <mliska@suse.cz>
14913 PR gcov-profile/84735
14914 * doc/gcov.texi: Document usage of profile files.
14915 * gcov-io.h: Document changes in the format.
14917 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
14921 * dwarf2out.c (struct dw_line_info_table): Update comments for
14923 (FORCE_RESET_NEXT_VIEW): New.
14924 (FORCE_RESETTING_VIEW_P): New.
14925 (RESETTING_VIEW_P): Check for -1 too.
14926 (ZERO_VIEW_P): Likewise.
14927 (new_line_info_table): Force-reset next view.
14928 (dwarf2out_begin_function): Likewise.
14929 (dwarf2out_source_line): Simplify zero_view_p initialization.
14930 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14931 view directly. Omit view when omitting .loc at line 0.
14933 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14935 PR tree-optimization/84740
14936 * tree-switch-conversion.c (process_switch): Call build_constructors
14937 only if info.phi_count is non-zero.
14939 PR tree-optimization/84739
14940 * tree-tailcall.c (find_tail_calls): Check call arguments against
14941 DECL_ARGUMENTS (current_function_decl) rather than
14942 DECL_ARGUMENTS (func) when checking for tail recursion.
14944 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14946 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14947 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14948 Volker Reichelt's entry and add entries for people that perform
14949 GCC fuzzy testing and report numerous bugs.
14951 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
14954 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14955 readonly data in sdata, if that is disabled.
14956 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14957 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14958 -mreadonly-in-sdata option.
14960 2018-03-07 Martin Sebor <msebor@redhat.com>
14962 PR tree-optimization/84468
14963 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14964 basic block when looking for nul assignment.
14966 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
14969 * except.h (output_function_exception_table): Adjust prototype.
14970 * except.c (output_function_exception_table): Remove FNNAME parameter
14971 and add SECTION parameter. Ouput one part of the table at a time.
14972 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14973 the first part of the exception table and emit unwind directives.
14974 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14975 (i386_pe_seh_cold_init): Likewise.
14976 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14977 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14978 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14979 (ix86_output_call_insn): Emit a nop in one more case for SEH.
14980 * config/i386/winnt.c: Include except.h.
14981 (struct seh_frame_state): Add reg_offset, after_prologue and
14982 in_cold_section fields.
14983 (i386_pe_seh_end_prologue): Set seh->after_prologue.
14984 (i386_pe_seh_cold_init): New function.
14985 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14986 to seh->in_cold_section.
14987 (seh_emit_push): Record the offset of the push.
14988 (seh_emit_save): Record the offet of the save.
14989 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14990 Test seh->after_prologue to disregard the epilogue.
14991 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14992 (i386_pe_end_cold_function): New function.
14994 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14997 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14998 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15001 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15003 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15004 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15006 PR middle-end/84723
15007 * multiple_target.c: Include tree-inline.h and intl.h.
15008 (expand_target_clones): Diagnose and fail if node->definition and
15009 !tree_versionable_function_p (node->decl).
15011 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
15013 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15015 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15016 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15017 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15019 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15022 * combine.c (try_combine): Use reg_or_subregno instead of handling
15023 just paradoxical SUBREGs and REGs.
15025 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
15027 * config/arc/arc.c (arc_finalize_pic): Remove function.
15028 (arc_must_save_register): We use single base PIC register, remove
15029 checks to save/restore the PIC register.
15030 (arc_expand_prologue): Likewise.
15031 * config/arc/arc-protos.h (arc_set_default_type_attributes):
15033 (arc_verify_short): Likewise.
15034 (arc_attr_type): Likewise.
15035 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15036 (walk_stores): Likewise.
15037 (arc_address_cost): Make it static.
15038 (arc_verify_short): Likewise.
15039 (branch_dest): Likewise.
15040 (arc_attr_type): Likewise.
15041 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15042 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15043 (arc_final_prescan_insn): Remove inserting the nops due to
15044 hardware hazards. It is done in reorg step.
15045 (insn_length_variant_t): Remove.
15046 (insn_length_parameters_t): Likewise.
15047 (arc_insn_length_parameters): Likewise.
15048 (arc_get_insn_variants): Likewise.
15049 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15051 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15053 PR inline-asm/84683
15054 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15057 PR tree-optimization/84687
15058 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15060 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15062 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15064 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15065 Rename to ppc_speculation_barrier.
15066 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15067 __builtin_ppc_speculation_barrier.
15069 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15072 * combine.c (combine_simplify_rtx): Don't try to simplify if
15073 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15076 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
15078 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15079 to 32 bytes when compiling for POWER9.
15081 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15084 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15085 regparm >= 3 with no arg reg available also for calls with
15086 flag_force_indirect_call. Pass decl to ix86_function_regparm.
15089 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15091 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
15093 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
15096 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15098 2018-03-05 Richard Biener <rguenther@suse.de>
15100 PR tree-optimization/84486
15101 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15102 When inserting a __builtin_assume_aligned call set the LHS
15103 SSA name alignment info accordingly.
15105 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
15107 PR tree-optimization/84114
15108 * config/aarch64/aarch64.c (aarch64_reassociation_width)
15109 Avoid reassociation of FLOAT_MODE addition.
15111 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
15113 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15114 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15115 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15116 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15117 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15118 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15119 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15121 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15122 __builtin_ia32_wbinvd): New builtins.
15123 (SPECIAL_ARGS2): New.
15124 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15125 (SPECIAL_ARGS2): New.
15126 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15127 (ix86_valid_target_attribute_inner_p): Ditto.
15128 (ix86_init_mmx_sse_builtins): Add special_args2.
15129 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15130 TARGET_WBNOINVD_P): New.
15131 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15132 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15133 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15134 * config/i386/immintrin.h (_wbinvd): New intrinsic.
15135 * config/i386/pconfigintrin.h: New file.
15136 * config/i386/wbnoinvdintrin.h: Ditto.
15137 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15139 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15141 2018-03-05 Richard Biener <rguenther@suse.de>
15143 PR tree-optimization/84670
15144 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15146 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15147 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15148 (compute_antic_aux): Only assert the number of values in ANTIC_IN
15149 doesn't grow if all successors (recursively) were visited at least
15152 2018-03-05 Richard Biener <rguenther@suse.de>
15154 PR tree-optimization/84650
15155 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15156 if executed in the loop pipeline.
15158 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
15160 * doc/configfiles.texi (Configuration Files): Move info about
15161 conditionalizing $target-protos.h to...
15162 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
15163 differs from $target-protos.h.
15165 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
15166 Chung-Ju Wu <jasonwucj@gmail.com>
15168 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15169 * config/nds32/nds32-multiple.md (setmemsi): Define.
15170 * config/nds32/nds32-memory-manipulation.c
15171 (nds32_gen_dup_4_byte_to_word_value): New.
15172 (emit_setmem_word_loop): New.
15173 (emit_setmem_byte_loop): New.
15174 (nds32_expand_setmem_loop): New.
15175 (nds32_expand_setmem_loop_v3m): New.
15176 (nds32_expand_setmem_unroll): New.
15177 (nds32_expand_setmem): New.
15179 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15180 Chung-Ju Wu <jasonwucj@gmail.com>
15182 * config/nds32/nds32-memory-manipulation.c
15183 (nds32_emit_load_store): New.
15184 (nds32_emit_post_inc_load_store): New.
15185 (nds32_emit_mem_move): New.
15186 (nds32_emit_mem_move_block): New.
15187 (nds32_expand_movmemsi_loop_unknown_size): New.
15188 (nds32_expand_movmemsi_loop_known_size): New.
15189 (nds32_expand_movmemsi_loop): New.
15190 (nds32_expand_movmemsi_unroll): New.
15191 (nds32_expand_movmemqi): Rename ...
15192 (nds32_expand_movmemsi): ... to this.
15193 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15194 (movmemsi): ... to this.
15195 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15196 (nds32_expand_movmemsi): ... to this.
15198 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15199 Monk Chiang <sh.chiang04@gmail.com>
15200 Chung-Ju Wu <jasonwucj@gmail.com>
15202 * config/nds32/nds32-protos.h
15203 (nds32_expand_load_multiple): New arguments.
15204 (nds32_expand_store_multiple): Ditto.
15205 (nds32_valid_multiple_load_store): Rename ...
15206 (nds32_valid_multiple_load_store_p): ... to this.
15207 * config/nds32/nds32-memory-manipulation.c
15208 (nds32_expand_load_multiple): Refine implementation.
15209 (nds32_expand_store_multiple): Ditto.
15210 * config/nds32/nds32-multiple.md
15211 (load_multiple): Update nds32_expand_load_multiple interface.
15212 (store_multiple): Update nds32_expand_store_multiple interface.
15213 * config/nds32/nds32-predicates.c
15214 (nds32_valid_multiple_load_store): Rename ...
15215 (nds32_valid_multiple_load_store_p): ... to this and refine
15217 * config/nds32/predicates.md
15218 (nds32_load_multiple_and_update_address_operation): New predicate.
15219 (nds32_store_multiple_and_update_address_operation): New predicate.
15221 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15222 Chung-Ju Wu <jasonwucj@gmail.com>
15224 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15225 (combo): New attribute.
15226 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15228 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
15230 * config/nds32/nds32.opt: Change -mcmodel= default value.
15232 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
15233 Monk Chiang <sh.chiang04@gmail.com>
15234 Chung-Ju Wu <jasonwucj@gmail.com>
15236 * config/nds32/constants.md (unspec_element): New enum.
15237 * config/nds32/constraints.md (Umw): New constraint.
15238 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15239 * config/nds32/nds32-intrinsic.md: Likewise.
15240 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15241 (nds32_valid_smw_lwm_base_p): New.
15242 (nds32_output_smw_single_word): New.
15243 (nds32_output_lmw_single_word): New.
15244 (nds32_expand_unaligned_load): New.
15245 (nds32_expand_unaligned_store): New.
15246 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15247 (nds32_output_smw_single_word): Declare.
15248 (nds32_output_lmw_single_word): Declare.
15249 (nds32_expand_unaligned_load): Declare.
15250 (nds32_expand_unaligned_store): Declare.
15251 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15252 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15253 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15254 NDS32_BUILTIN_UASTORE_DW.
15255 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15258 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
15259 Kito Cheng <kito.cheng@gmail.com>
15260 Chung-Ju Wu <jasonwucj@gmail.com>
15262 * config/nds32/nds32-intrinsic.c
15263 (nds32_expand_builtin_null_ftype_reg): Delete.
15264 (nds32_expand_builtin_reg_ftype_imm): Ditto.
15265 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15266 (nds32_read_argument): New.
15267 (nds32_legitimize_target): Ditto.
15268 (nds32_legitimize_argument): Ditto.
15269 (nds32_check_constant_argument): Ditto.
15270 (nds32_expand_unop_builtin): Ditto.
15271 (nds32_expand_unopimm_builtin): Ditto.
15272 (nds32_expand_binop_builtin): Ditto.
15273 (nds32_builtin_decl_impl): Ditto.
15274 (builtin_description): Ditto.
15275 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15276 (nds32_init_builtins_impl): Ditto.
15277 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15278 (nds32_builtin_decl): New.
15279 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15280 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15282 2018-03-02 Jeff Law <law@redhat.com>
15284 * reorg.c (stop_search_p): Handle DEBUG_INSN.
15285 (redundant_insn, fill_simple_delay_slots): Likewise.
15286 (fill_slots_from_thread): Likewise.
15287 * resource.c (mark_referenced_resources): Likewise.
15288 (mark_set_resources, find_dead_or_set_registers): Likewise.
15290 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15292 * substring-locations.h (format_warning_va): Formatting fix for
15293 ATTRIBUTE_GCC_DIAG.
15294 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15296 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15297 * substring-locations.c: Include intl.h.
15298 (format_warning_va): Turned into small wrapper around
15299 format_warning_n_va, renamed to ...
15300 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15301 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15303 (format_warning_at_substring_n): New function.
15304 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15305 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
15306 format_warning_at_substring with just a shorter name instead of
15307 const function pointer.
15308 (fmtwarn_n): New function.
15309 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15310 appropriate, get rid of all the fmtstr temporaries, move conditionals
15311 with G_() wrapped string literals directly into fmtwarn arguments,
15312 cast dir.len to (int), formatting fixes.
15314 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
15316 * doc/invoke.texi: Remove "Cilk Plus" references.
15318 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15319 Richard Biener <rguenther@suse.de>
15322 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15323 for error or warning attributes if CALL_FROM_THUNK_P is set.
15326 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15329 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15330 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15333 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15334 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15336 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15337 instead of -1U in last predictors element's probability member.
15339 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15342 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15343 arguments if they are comparable.
15345 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
15347 PR tree-optimization/84634
15348 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15349 masks and masked_loop_p with a single loop_masks, making sure it's
15350 null for bb vectorization.
15352 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
15354 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15355 (vect_analyze_data_ref_access): Use loop->safe_len rather than
15356 loop->force_vectorize to check whether there is no alias.
15358 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15361 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15363 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15365 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15366 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15367 instead of a loop around prev_real_insn.
15368 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15371 PR inline-asm/84625
15372 * config/i386/i386.c (ix86_print_operand): Use conditional
15373 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15376 2018-03-02 Richard Biener <rguenther@suse.de>
15378 PR tree-optimization/84427
15379 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15380 (bitmap_set_subtract_values): Rewrite to handle multiple
15383 (prune_clobbered_mems): Likewise.
15384 (phi_translate): Take edge instead of pred/phiblock.
15385 (phi_translate_1): Likewise.
15386 (phi_translate_set): Likewise. Insert all translated
15387 exprs for a value into the set, keeping possibly multiple
15388 expressions per value.
15389 (compute_antic_aux): Adjust for phi_translate changes.
15390 When intersecting union the expressions and prune those
15391 not in the final value set, keeping possibly multiple
15392 expressions per value. Do not use value-insertion
15393 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15394 all expressions. Add verification that the value-sets
15395 only shrink during iteration.
15396 (compute_partial_antic_aux): Adjust for the phi_translate changes.
15397 (do_pre_regular_insertion): Likewise.
15398 (do_pre_partial_partial_insertion): Likewise.
15400 2018-03-02 Richard Biener <rguenther@suse.de>
15403 * config/darwin.c (saved_debug_info_level): New static global.
15404 (darwin_asm_lto_start): Disable debug info generation for LTO out.
15405 (darwin_asm_lto_end): Restore debug info generation settings.
15407 2018-03-01 Martin Liska <mliska@suse.cz>
15410 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15411 volatile arguments.
15413 2018-03-01 Richard Biener <rguenther@suse.de>
15416 * dwarf2out.c (gen_variable_die): Properly handle late VLA
15417 type annotation with LTO when debug was disabled at compile-time.
15419 2018-03-01 Matthew Fortune <mfortune@gmail.com>
15421 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15423 (mips_final_postscan_insn): Likewise.
15425 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
15427 PR rtl-optimization/84528
15428 * alias.c (init_alias_target): Add commentary.
15429 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15430 a unique base value if the frame pointer is not eliminated
15431 to the stack pointer.
15433 2018-03-01 Tom de Vries <tom@codesourcery.com>
15435 PR rtl-optimization/83327
15436 * lra-int.h (hard_regs_spilled_into): Declare.
15437 * lra.c (hard_regs_spilled_into): Define.
15438 (init_reg_info): Init hard_regs_spilled_into.
15439 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15440 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15441 (process_bb_lives): Handle hard_regs_spilled_into.
15442 (lra_create_live_ranges_1): Before doing liveness propagation, clear
15443 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15445 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
15447 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15448 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15449 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15450 * config/rs6000/aix72.h: New file.
15452 2018-02-28 Jakub Jelinek <jakub@redhat.com>
15454 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15455 instead of warning_at with conditional singular and plural messages
15459 * stor-layout.c (update_alignment_for_field): For
15460 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15461 && !DECL_PACKED (field), do the alignment update, just use
15462 only desired_align instead of MAX (type_align, desired_align)
15464 (place_field): Don't do known_align < desired_align handling
15465 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15466 is non-NULL, instead do it after rli->prev_field handling and
15467 only if not within a bitfield word. For DECL_PACKED (field)
15468 use type_align of BITS_PER_UNIT.
15470 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
15472 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15473 superfluous parentheses and trailing spaces.
15475 2018-02-28 Richard Biener <rguenther@suse.de>
15477 PR tree-optimization/84584
15478 * graphite-scop-detection.c (scop_detection::add_scop): Discard
15479 SCoPs with fake exit edge.
15481 2018-02-28 Martin Liska <mliska@suse.cz>
15484 * timevar.c (timer::print): Fix format to properly print 100%
15487 2018-02-28 Richard Biener <rguenther@suse.de>
15489 PR middle-end/84607
15490 * genmatch.c (capture_info::walk_match): Do not mark
15491 captured expressions without operands as expr_p given
15492 they act more like predicates and should be subject to
15493 "lost tail" side-effect preserving.
15495 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
15497 PR rtl-optimization/81611
15498 * auto-inc-dec.c (attempt_change): Move dead note from
15499 mem_insn if it's the next use of regno
15500 (find_address): Take address use of reg holding
15501 non-incremented value. Add parm to limit search to the named
15503 (merge_in_block): Attempt to use a mem insn that is the next
15504 use of the original regno.
15506 2018-02-27 Martin Sebor <msebor@redhat.com>
15509 * doc/invoke.texi (-Wmissing-attributes): New option.
15510 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15512 2018-02-27 Martin Sebor <msebor@redhat.com>
15514 PR translation/84207
15515 * diagnostic-core.h (warning_n, error_n, inform_n): Change
15516 n argument to unsigned HOST_WIDE_INT.
15517 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15518 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
15519 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15520 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15522 2018-02-27 Richard Biener <rguenther@suse.de>
15524 PR tree-optimization/84512
15525 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15526 Do not use the estimate returned from record_stmt_cost for
15527 the scalar iteration cost but sum properly using add_stmt_cost.
15529 2018-02-27 Richard Biener <rguenther@suse.de>
15531 PR tree-optimization/84466
15532 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15533 Adjust last change to less strictly validate use operands.
15535 2018-02-27 Martin Liska <mliska@suse.cz>
15537 PR gcov-profile/84548
15538 * gcov.c (process_file): Allow partial overlap and consider it
15539 also as group functions.
15540 (output_lines): Properly calculate range of lines for a group.
15542 2018-02-27 Martin Liska <mliska@suse.cz>
15544 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15545 'ggc' suffixes. Change first column width.
15546 (timer::print): Fix formatting of the column.
15548 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
15550 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15551 preserve inline entry blocks for the sake of debug inline
15552 entry point markers alone.
15553 (remove_unused_locals): Suggest in comments a better place to
15554 force the preservation of inline entry blocks that are
15555 otherwise unused, but do not preserve them.
15557 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15559 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15561 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15564 * config/i386/constraints.md (Bs): Replace
15565 ix86_indirect_branch_register with
15566 TARGET_INDIRECT_BRANCH_REGISTER.
15568 * config/i386/i386.md (indirect_jump): Likewise.
15569 (tablejump): Likewise.
15570 (*sibcall_memory): Likewise.
15571 (*sibcall_value_memory): Likewise.
15572 Peepholes of indirect call and jump via memory: Likewise.
15573 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15574 (*sibcall_value_GOT_32): Likewise.
15575 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15576 (GOT_memory_operand): Likewise.
15577 (call_insn_operand): Likewise.
15578 (sibcall_insn_operand): Likewise.
15579 (GOT32_symbol_operand): Likewise.
15580 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15582 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
15584 PR rtl-optimization/83496
15585 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15586 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
15587 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15588 redundant insn, if any.
15589 (relax_delay_slots): Likewise.
15590 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15592 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
15594 PR tree-optimization/83965
15595 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15596 that grouped statements are part of a reduction chain. Return
15597 true if the statement is not marked as a reduction itself but
15598 is part of a group.
15599 (vect_recog_dot_prod_pattern): Don't check whether the statement
15600 is part of a group here.
15601 (vect_recog_sad_pattern): Likewise.
15602 (vect_recog_widen_sum_pattern): Likewise.
15604 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
15607 * final.c (rest_of_clean_state): Also look for calls inside sequences.
15609 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
15612 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15614 (ix86_output_indirect_function_return): New prototype.
15615 (ix86_split_simple_return_pop_internal): Likewise.
15616 * config/i386/i386.c (indirect_return_via_cx): New.
15617 (indirect_return_via_cx_bnd): Likewise.
15618 (indirect_thunk_name): Handle return va CX_REG.
15619 (output_indirect_thunk_function): Create alias for
15620 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15621 (ix86_output_indirect_jmp): Remove the bool argument.
15622 (ix86_output_indirect_function_return): New function.
15623 (ix86_split_simple_return_pop_internal): Likewise.
15624 * config/i386/i386.md (*indirect_jump): Don't pass false
15625 to ix86_output_indirect_jmp.
15626 (*tablejump_1): Likewise.
15627 (simple_return_pop_internal): Change it to define_insn_and_split.
15628 Call ix86_split_simple_return_pop_internal to split it for
15629 -mfunction-return=.
15630 (simple_return_indirect_internal): Call
15631 ix86_output_indirect_function_return instead of
15632 ix86_output_indirect_jmp.
15634 2018-02-26 Jakub Jelinek <jakub@redhat.com>
15637 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15638 memset and value initialization afterwards.
15640 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
15642 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15644 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15647 * common/config/aarch64/aarch64-common.c
15648 (aarch_option_optimization_table[]): Switch
15649 off fomit-frame-pointer
15651 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
15652 Chung-Ju Wu <jasonwucj@gmail.com>
15654 * config/nds32/nds32-multiple.md (load_multiple): Disallow
15656 (store_multiple): Ditto.
15658 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
15660 * config.gcc: Add --with-cpu support for nds32 target.
15661 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15662 * config/nds32/nds32.opt: Add -mcpu= option.
15664 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
15666 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15667 isel=yes): Warn for these deprecated options.
15669 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
15671 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15672 ISA_2_5_MASKS_EMBEDDED.
15674 2018-02-23 Jakub Jelinek <jakub@redhat.com>
15676 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15677 p->max as pointers rather than using iterative_hash_expr.
15679 2018-02-23 Carl Love <cel@us.ibm.com>
15681 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15682 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15684 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15685 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15686 P8V_BUILTIN_VEC_VUNSIGNED2.
15688 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
15691 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15692 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15694 * lra-constraints.c (curr_insn_transform): Set up
15695 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
15697 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15698 * lra-eliminations.c (spill_pseudos): Ditto.
15699 (process_insn_for_elimination): Ditto.
15700 * lra-lives.c (reg_early_clobber_p): Use the new macros.
15701 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15702 LRA_NON_CLOBBERED_ALT.
15704 2018-02-22 Martin Sebor <msebor@redhat.com>
15706 PR tree-optimization/84480
15707 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15708 to maybe_diag_stxncpy_trunc. Call it.
15709 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15710 from gimple_fold_builtin_strcpy. Print inlining stack.
15711 (handle_builtin_stxncpy): Print inlining stack.
15712 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15714 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
15717 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15718 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15719 and -fcheck-pointer-bounds are used together.
15720 (indirect_thunk_prefix): New enum.
15721 (indirect_thunk_need_prefix): New function.
15722 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
15723 "_nt" instead of "_bnd" for NOTRACK prefix.
15724 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15725 (output_indirect_thunk_function): Likewise.
15727 (ix86_code_end): Update output_indirect_thunk_function calls.
15728 (ix86_output_indirect_branch_via_reg): Replace
15729 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15730 (ix86_output_indirect_branch_via_push): Likewise.
15731 (ix86_output_function_return): Likewise.
15732 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15733 incompatible with -fcf-protection=branch and
15734 -fcheck-pointer-bounds.
15736 2018-02-22 Steve Ellcey <sellcey@cavium.com>
15739 * config/aarch64/aarch64.c (aarch64_print_address_internal):
15740 Change gcc_assert call to output_operand_lossage.
15742 2018-02-22 Steve Ellcey <sellcey@cavium.com>
15744 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15746 2018-02-22 DJ Delorie <dj@redhat.com>
15747 Sebastian Perta <sebastian.perta@renesas.com>
15748 Oleg Endo <olegendo@gcc.gnu.org>
15750 * config/rx/rx.c (rx_rtx_costs): New function.
15751 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15753 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
15755 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15757 2018-02-22 Martin Liska <mliska@suse.cz>
15760 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15761 Add "native" as a possible value.
15763 2018-02-22 Martin Liska <mliska@suse.cz>
15766 * config/i386/i386.c (ix86_option_override_internal):
15767 Add "native" as a possible value for -march and -mtune.
15769 2018-02-22 Jakub Jelinek <jakub@redhat.com>
15772 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15773 to all type variants.
15775 PR tree-optimization/84503
15776 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15777 width as info->bitpos + info->bitsize - start.
15778 (merged_store_group::merge_overlapping): Simplify width computation.
15779 (check_no_overlap): New function.
15780 (imm_store_chain_info::try_coalesce_bswap): Compute expected
15781 start + width and last_order of the group, fail if check_no_overlap
15783 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15784 to group if check_no_overlap fails.
15786 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15788 * config/rs6000/altivec.md: Delete contraint arguments to
15789 define_expand, define_split, and define_peephole2, and in
15790 define_insn_and_split if always unused.
15791 * config/rs6000/darwin.md: Ditto.
15792 * config/rs6000/dfp.md: Ditto.
15793 * config/rs6000/rs6000.md: Ditto.
15794 * config/rs6000/sync.md: Ditto.
15795 * config/rs6000/vector.md: Ditto.
15796 * config/rs6000/vsx.md: Ditto.
15798 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
15800 * config/rs6000/altivec.md: Write output control strings as braced
15801 blocks instead of double-quoted strings.
15802 * config/rs6000/darwin.md: Ditto.
15803 * config/rs6000/rs6000.md: Ditto.
15804 * config/rs6000/vector.md: Ditto.
15805 * config/rs6000/vsx.md: Ditto.
15807 2018-02-21 Jason Merrill <jason@redhat.com>
15809 PR c++/84314 - ICE with templates and fastcall attribute.
15810 * attribs.c (build_type_attribute_qual_variant): Remove assert.
15812 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15814 * ipa-cp.c (determine_versionability): Fix comment typos.
15816 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
15819 * ipa-cp.c (determine_versionability): Do not version functions caling
15822 2018-02-21 Martin Liska <mliska@suse.cz>
15825 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15826 Add "native" as a possible value.
15827 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
15828 the macro when native cpu detection is available.
15830 2018-02-21 Martin Liska <mliska@suse.cz>
15833 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15834 Add "native" as a possible value.
15835 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15836 when native cpu detection is available.
15838 2018-02-21 Jakub Jelinek <jakub@redhat.com>
15839 Martin Sebor <msebor@redhat.com>
15841 PR tree-optimization/84478
15842 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15844 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15845 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15846 support which is conservatively correct, for 2 only stay conservative
15847 for maxlen. Formatting and comment capitalization fixes. Add STRICT
15848 argument to the 2 argument get_range_strlen, adjust 6 arg
15849 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15851 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15852 (gimple_fold_builtin_strlen): Pass true as last argument to
15855 2018-02-20 Martin Sebor <msebor@redhat.com>
15857 PR middle-end/84095
15858 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15859 (builtin_memref::set_base_and_offset): Same. Handle inner references.
15860 (builtin_memref::builtin_memref): Factor out parts into
15861 set_base_and_offset and call it.
15863 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15865 PR middle-end/84406
15866 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15867 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15868 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
15869 search at the associated MODE_INT.
15871 2018-02-20 Jeff Law <law@redhat.com>
15873 PR middle-end/82123
15874 PR tree-optimization/81592
15875 PR middle-end/79257
15876 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15877 for range data rather than using global data.
15878 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15879 range data rather than using global data.
15880 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15881 pass it to children as needed.
15882 (struct directive::fmtresult): Similarly.
15883 (struct directive::set_width): Similarly.
15884 (struct directive::set_precision): Similarly.
15885 (format_integer, format_directive, parse_directive): Similarly.
15886 (format_none): Accept unnamed vr_values parameter.
15887 (format_percent, format_floating, format_character): Similarly.
15888 (format_string, format_plain): Similarly.
15889 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15890 the EVRP range analyzer for range data rather than using global data.
15891 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15892 gimple-ssa-evrp-analyze.h
15893 (class sprintf_dom_walker): Add after_dom_children member function.
15894 Add evrp_range_analyzer member.
15895 (sprintf_dom_walker::before_dom_children): Call into the EVRP
15896 range analyzer as needed.
15897 (sprintf_dom_walker::after_dom_children): New member function.
15898 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15900 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15901 (evrp_range_analyzer::pop_to_marker): Likewise.
15903 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15905 PR tree-optimization/84419
15906 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15907 with the required type if its current type is compatible but
15910 2018-02-20 Jakub Jelinek <jakub@redhat.com>
15912 PR middle-end/82004
15913 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15914 after vectorization.
15916 2018-02-20 Martin Liska <mliska@suse.cz>
15919 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15920 possible values if we don't have a hint.
15922 2018-02-20 Martin Liska <mliska@suse.cz>
15926 * final.c (shorten_branches): Build align_tab array with one
15928 * opts.c (finish_options): Add alignment option limit check.
15929 (MAX_CODE_ALIGN): Likewise.
15930 (MAX_CODE_ALIGN_VALUE): Likewise.
15931 * doc/invoke.texi: Document maximum allowed option value for
15932 all -falign-* options.
15934 2018-02-19 Jakub Jelinek <jakub@redhat.com>
15937 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15938 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15939 * var-tracking.c (emit_note_insn_var_location): Remove all references
15940 to NOTE_INSN_CALL_ARG_LOCATION.
15941 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15942 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15943 Use copy_rtx_if_shared.
15944 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15945 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15946 (dwarf2out_var_location): Remove handling of
15947 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15949 * final.c (final_scan_insn): Remove all references to
15950 NOTE_INSN_CALL_ARG_LOCATION.
15951 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
15952 before dumping final insns.
15953 * except.c (emit_note_eh_region_end): Remove all references to
15954 NOTE_INSN_CALL_ARG_LOCATION.
15955 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15956 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15957 * config/arc/arc.c (hwloop_optimize): Likewise.
15958 * config/arm/arm.c (create_fix_barrier): Likewise.
15959 * config/s390/s390.c (s390_chunkify_start): Likewise.
15960 * config/sh/sh.c (find_barrier): Likewise.
15961 * config/i386/i386.c (rest_of_insert_endbranch,
15962 ix86_seh_fixup_eh_fallthru): Likewise.
15963 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15964 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15965 * config/frv/frv.c (frv_function_prologue): Likewise.
15966 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
15968 (note_outside_basic_block_p): Remove all references to
15969 NOTE_INSN_CALL_ARG_LOCATION.
15970 * gengtype.c (adjust_field_rtx_def): Likewise.
15971 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15973 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15974 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15977 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15980 PR tree-optimization/84452
15981 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15982 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15985 2018-02-19 Martin Liska <mliska@suse.cz>
15988 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15990 2018-02-19 Martin Liska <mliska@suse.cz>
15991 Richard Sandiford <richard.sandiford@linaro.org>
15993 PR tree-optimization/82491
15994 * gimple-fold.c (get_base_constructor): Make earlier bail out
15997 2018-02-19 Carl Love <cel@us.ibm.com>
15999 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16000 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16002 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16003 P8V_BUILTIN_VEC_NEG.
16005 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
16007 * config/rl78/rl78.md (movdf): New define expand.
16009 2018-02-19 Martin Liska <mliska@suse.cz>
16012 * doc/invoke.texi: Fix typo.
16013 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16015 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
16017 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16018 handle rs6000_single_float and rs6000_double_float specially for
16021 2018-02-16 Jeff Law <law@redhat.com>
16023 * config/rx/rx.c (add_pop_cfi_notes): New function.;
16024 (pop_regs): Use it.
16026 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16029 * ipa-inline.c (inline_small_functions): Fix a typo.
16031 2018-02-16 Nathan Sidwell <nathan@acm.org>
16033 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16035 2018-02-16 Carl Love <cel@us.ibm.com>
16037 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16038 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16039 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16040 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16041 expansion to P8V_BUILTIN_VEC_FLOAT2.
16043 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
16045 PR rtl-optimization/70023
16046 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16047 src_regno into account.
16049 2018-02-16 Carl Love <cel@us.ibm.com>
16051 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16052 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16053 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16054 * config/rs6000/rs6000.c: Remove case statements for
16055 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16056 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16057 and P9V_BUILTIN_VEC_VINSERT4B.
16058 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16059 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16060 * config/rs6000/vsx.md:
16061 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16064 2018-02-16 Carl Love <cel@us.ibm.com>
16066 * config/rs6000/altivec.h: Add builtin names vec_extract4b
16068 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16070 * config/rs6000/rs6000-c.c: Add the definitions for
16071 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16072 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16073 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16074 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
16075 definition for insert4b and define insn *insert3b_internal.
16076 * doc/extend.texi: Add documentation for vec_extract4b.
16078 2018-02-16 Nathan Sidwell <nathan@acm.org>
16080 * doc/extend.texi (Backwards Compatibility): Mention friend
16081 injection. Note for-scope is deprecated.
16082 * doc/invoke.texi (-ffriend-injection): Deprecate.
16084 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
16086 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16087 that moved to I2, also allow destinations that are a paradoxical
16088 subreg (instead of a normal reg).
16090 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
16093 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16096 2018-02-16 Richard Biener <rguenther@suse.de>
16098 PR tree-optimization/84037
16099 PR tree-optimization/84016
16101 * config/i386/i386.c (ix86_builtin_vectorization_cost):
16102 Adjust vec_construct for the fact we need additional higher latency
16103 128bit inserts for AVX256 and AVX512 vector builds.
16104 (ix86_add_stmt_cost): Scale vector construction cost for
16107 2018-02-16 Richard Biener <rguenther@suse.de>
16109 PR tree-optimization/84417
16110 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16111 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16112 (non_rewritable_lvalue_p): Likewise, use poly-ints.
16114 2018-02-16 Martin Liska <mliska@suse.cz>
16117 * internal-fn.def (ASAN_CHECK): Set proper flags.
16118 (ASAN_MARK): Likewise.
16120 2018-02-16 Julia Koval <julia.koval@intel.com>
16122 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16123 from PTA_CANNONLAKE.
16125 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16128 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16129 Use ++iter rather than iter++ for std::list iterators.
16130 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
16131 defer deleting them until all nodes in the forest are processed. Do
16132 free even leaf nodes. Change to_process into auto_vec.
16135 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16136 * vec.h (vec_default_construct): Use memset instead of placement new
16137 if BROKEN_VALUE_INITIALIZATION is defined.
16138 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16139 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16142 PR rtl-optimization/83723
16143 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16144 * lra.c (lra_substitute_pseudo): Likewise. If true, use
16145 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
16147 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16149 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16151 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
16153 PR rtl-optimization/81443
16154 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16155 from inner REGs to paradoxical SUBREGs.
16157 2018-02-16 Richard Biener <rguenther@suse.de>
16159 PR tree-optimization/84399
16160 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16161 For operands we can analyze at their definition make sure we can
16162 analyze them at each use as well.
16164 2018-02-16 Richard Biener <rguenther@suse.de>
16166 PR tree-optimization/84190
16167 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16168 volatile accesses if the decl isn't volatile.
16170 2018-02-15 Jason Merrill <jason@redhat.com>
16172 PR c++/84314 - ICE with templates and fastcall attribute.
16173 * attribs.c (build_type_attribute_qual_variant): Don't clobber
16174 TYPE_CANONICAL on an existing type.
16176 2018-02-15 Jakub Jelinek <jakub@redhat.com>
16178 PR tree-optimization/84383
16179 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16180 dstoff nor call operand_equal_p if dstbase is NULL.
16182 PR tree-optimization/84334
16183 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16184 also a CONSTANT_CLASS_P, punt.
16186 2018-02-14 Jim Wilson <jimw@sifive.com>
16188 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16189 first SMALL_OPERAND check. New local min_second_step. Move assert
16190 to where locals are set. Add TARGET_RVC support.
16191 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16193 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
16195 * doc/invoke.texi: Correct -Wformat-overflow code sample.
16197 2018-02-14 Martin Sebor <msebor@redhat.com>
16199 PR tree-optimization/83698
16200 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16201 arrays constrain the offset range to their bounds.
16202 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16203 (builtin_access::overlap): Avoid setting the size of overlap if it's
16205 (maybe_diag_overlap): Also consider arrays when deciding what values
16206 of offsets to include in diagnostics.
16208 2018-02-14 Martin Sebor <msebor@redhat.com>
16211 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16212 that correspond to the kind of a declaration.
16214 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
16217 * config/pa/pa.md: Load address of PIC label using the linkage table
16218 if the label is nonlocal.
16220 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
16222 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16223 warning message if user requests -maltivec=be.
16224 * doc/invoke.texi: Document deprecation of -maltivec=be.
16226 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
16229 * config/rs6000/rs6000-c.c: Update definitions for
16230 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16231 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16233 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16236 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16237 add _get_ssp intrinsics. Remove argument from
16238 __builtin_ia32_rdssp[d|q].
16239 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16240 * config/i386/i386-builtin.def: Remove argument from
16241 __builtin_ia32_rdssp[d|q].
16242 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16243 ix86_expand_special_args_builtin for _rdssp[d|q].
16244 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16245 Clear register before usage.
16246 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16247 Add documentation for new _get_ssp and _inc_ssp intrinsics.
16249 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
16251 PR tree-optimization/84357
16252 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16253 operand 1 of an ARRAY_REF too.
16255 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
16258 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16259 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16261 (set_of_reg): New struct.
16262 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16263 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16264 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16266 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16267 Split into bitclr, bitset, bitinvert patterns if appropriate.
16268 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16269 use rx_fuse_in_memory_bitop.
16270 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16271 to named insn, correct maximum insn length.
16273 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
16276 * machmode.def: Define a complex mode for PARTIAL_INT.
16277 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16279 * doc/rtl.texi: Document CSPImode.
16280 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16282 (msp430_hard_regno_nregs_with_padding): Likewise.
16284 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
16287 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16289 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
16291 PR rtl-optimization/84169
16292 * combine.c (try_combine): New variable split_i2i3. Set it to true if
16293 we generated a parallel as new i3 and we split that to new i2 and i3
16294 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
16295 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
16296 those to i2, not i1. Partially rewrite this scan code.
16298 2018-02-13 Jakub Jelinek <jakub@redhat.com>
16301 * stor-layout.c (place_field): For variable length fields, adjust
16302 offset_align afterwards not just based on the field's alignment,
16303 but also on the size.
16305 PR middle-end/84309
16306 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16307 of exps and logs in the use_exp2 case.
16309 2018-02-13 Jeff Law <law@redhat.com>
16311 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16312 entry for "vector".
16314 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16317 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
16321 * common.opt (gas-loc-support, gas-locview-support): New.
16322 (ginline-points, ginternal-reset-location-views): New.
16323 * doc/invoke.texi: Document them. Use @itemx where intended.
16324 (gvariable-location-views): Adjust.
16325 * target.def (reset_location_view): New.
16326 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16327 (TARGET_RESET_LOCATION_VIEW): New.
16328 * doc/tm.texi: Rebuilt.
16329 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16330 (dwarf2out_default_as_locview_support): New.
16331 (output_asm_line_debug_info): Use option variables.
16332 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16333 (output_loc_list): Likewise.
16334 (add_high_low_attributes): Check option variables.
16335 Don't output entry view attribute in strict mode.
16336 (gen_inlined_subroutine_die): Check option variables.
16337 (dwarf2out_inline_entry): Likewise.
16338 (init_sections_and_labels): Likewise.
16339 (dwarf2out_early_finish): Likewise.
16340 (maybe_reset_location_view): New, from...
16341 (dwarf2out_var_location): ... here. Call it.
16342 * debug.h (dwarf2out_default_as_loc_support): Declare.
16343 (dwarf2out_default_as_locview_support): Declare.
16344 * hooks.c (hook_int_rtx_insn_0): New.
16345 * hooks.h (hook_int_rtx_insn_0): Declare.
16346 * toplev.c (process_options): Take -gas-loc-support and
16347 -gas-locview-support from dwarf2out. Enable
16348 -gvariable-location-views by default only with locview
16349 assembler support. Enable -ginternal-reset-location-views by
16350 default only if the target defines the corresponding hook.
16351 Enable -ginline-points by default if location views are
16352 enabled; force it disabled if statement frontiers are
16354 * tree-inline.c (expand_call_inline): Check option variables.
16355 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16357 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
16359 PR tree-optimization/84321
16360 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16361 handling. Also check whether the anti-range contains any values
16362 that satisfy the mask; switch to a VR_RANGE if not.
16364 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
16367 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16369 2018-02-13 Martin Jambor <mjambor@suse.cz>
16372 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16373 of call statements, also set location of a load to a temporary.
16375 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
16377 * config/rl78/rl78.c (add_vector_labels): New function.
16378 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16379 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16380 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16381 which checks that no arguments are passed.
16382 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16383 * doc/extend.texi: Documentation for the new attribute.
16385 2018-02-13 Andreas Schwab <schwab@suse.de>
16387 * config/riscv/linux.h (CPP_SPEC): Define.
16389 2018-02-13 Jakub Jelinek <jakub@redhat.com>
16392 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16393 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16394 OPTION_MASK_ISA_AES as first argument to def_builtin_const
16395 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16396 instead of OPTION_MASK_ISA_PCLMUL as first argument to
16397 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16398 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16399 temporarily for AES and PCLMUL builtins.
16401 PR tree-optimization/84339
16402 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16403 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16406 PR middle-end/84309
16407 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16408 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16409 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16411 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16413 * omp-simd-clone.h: New file.
16414 * omp-simd-clone.c: Include omp-simd-clone.h.
16415 (expand_simd_clones): No longer static.
16416 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16417 cgraph.h and omp-simd-clone.h.
16418 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16419 (vect_recog_widen_shift_pattern): Formatting fix.
16420 (vect_pattern_recog_1): Don't check optab for calls.
16423 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16424 operands[2] into a REG before using gen_lowpart on it.
16426 2018-02-12 Jeff Law <law@redhat.com>
16429 * config/sh/sh.c (find_barrier): Consider a sibling call
16432 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16433 successfully back substituting a reg.
16435 2018-02-12 Richard Biener <rguenther@suse.de>
16437 PR tree-optimization/84037
16438 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16439 parameter, move visited init to caller.
16440 (vect_slp_analyze_operations): Separate cost from validity
16441 check, initialize visited once for all instances.
16442 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16444 * tree-vect-stmts.c (vect_model_simple_cost): Make early
16446 (vect_model_promotion_demotion_cost): Likewise.
16447 (vectorizable_bswap): Guard cost modeling with !slp_node
16448 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16450 (vectorizable_call): Likewise.
16451 (vectorizable_conversion): Likewise.
16452 (vectorizable_assignment): Likewise.
16453 (vectorizable_shift): Likewise.
16454 (vectorizable_operation): Likewise.
16455 (vectorizable_store): Likewise.
16456 (vectorizable_load): Likewise.
16457 (vectorizable_condition): Likewise.
16458 (vectorizable_comparison): Likewise.
16460 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
16463 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16464 (ASAN_MARK): Fix fnspec to account for return value, change pointer
16465 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16467 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16469 PR middle-end/83665
16470 * params.def (inline-min-speedup): Increase from 8 to 15.
16471 (max-inline-insns-auto): Decrease from 40 to 30.
16472 * ipa-split.c (consider_split): Add some buffer for function to
16473 be considered inlining candidate.
16474 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16477 2018-02-12 Richard Biener <rguenther@suse.de>
16479 PR tree-optimization/84037
16480 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16481 matched stmts if we cannot swap the non-matched ones.
16483 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
16485 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16486 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16487 _mm_maskz_scalef_round_ss): New intrinsics.
16488 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16489 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16490 __builtin_ia32_scalefss_round): Remove.
16491 (__builtin_ia32_scalefsd_mask_round,
16492 __builtin_ia32_scalefss_mask_round): New intrinsics.
16493 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16494 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16495 ((match_operand:VF_128 2 "<round_nimm_predicate>"
16496 "<round_constraint>")): Changed to ...
16497 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16498 "<round_scalar_constraint>")): ... this.
16499 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16500 %0, %1, %2<round_op3>}"): Changed to ...
16501 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16502 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16503 %2<round_scalar_mask_op3>}"): ... this.
16504 * config/i386/subst.md (round_scalar_nimm_predicate): New.
16506 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
16508 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16509 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16510 (_mm_maskz_sqrt_round_ss): New intrinsics.
16511 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16512 (__builtin_ia32_sqrtsd_mask_round)
16513 (__builtin_ia32_sqrtss_mask_round): New builtins.
16514 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16515 (__builtin_ia32_sqrtss_round): Remove.
16516 (__builtin_ia32_sqrtsd_mask_round)
16517 (__builtin_ia32_sqrtss_mask_round): New builtins.
16518 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16519 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16520 ((match_operand:VF_128 1 "vector_operand"
16521 "xBm,<round_constraint>")): Changed to ...
16522 ((match_operand:VF_128 1 "vector_operand"
16523 "xBm,<round_scalar_constraint>")): ... this.
16524 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16525 %0, %2, %<iptr>1<round_op3>}): Changed to ...
16526 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16527 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16528 %<iptr>1<round_scalar_mask_op3>}): ... this.
16529 ((set_attr "prefix" "<round_prefix>")): Changed to ...
16530 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16532 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
16535 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16536 Cast vec_cmpeq result to correct type.
16537 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16538 Cast vec_cmpgt result to correct type.
16540 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
16542 * final.c (final_scan_insn_1): Renamed from...
16543 (final_scan_insn): ... this. New wrapper, to recover
16544 seen from the outermost call in recursive ones.
16545 * config/sparc/sparc.c (output_return): Drop seen from call.
16546 (output_sibcall): Likewise.
16547 * config/visium/visium.c (output_branch): Likewise.
16549 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
16551 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16554 2018-02-10 Alan Modra <amodra@gmail.com>
16557 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16558 Specify LR as an input.
16560 2018-02-10 Jakub Jelinek <jakub@redhat.com>
16563 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16564 remove_member_access_dummy_vars): New functions.
16565 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16566 lower_omp_1, execute_lower_omp): Use them.
16568 PR rtl-optimization/84308
16569 * shrink-wrap.c (spread_components): Release todo vector.
16571 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
16573 PR rtl-optimization/57193
16574 * ira-color.c (struct allocno_color_data): Add member
16575 conflict_allocno_hard_prefs.
16576 (update_conflict_allocno_hard_prefs): New.
16577 (bucket_allocno_compare_func): Add a preference based on
16578 conflict_allocno_hard_prefs.
16579 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16580 (color_allocnos): Remove a dead code. Initiate
16581 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
16583 2018-02-09 Jakub Jelinek <jakub@redhat.com>
16586 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16587 constraint from =wa to wa. Avoid a subreg on the output operand,
16588 instead use a pseudo and subreg it in a move.
16589 (p9_xxbrd_<mode>): Changed to ...
16590 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16591 (p9_xxbrd_v2df): New expander.
16592 (p9_xxbrw_<mode>): Changed to ...
16593 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16594 (p9_xxbrw_v4sf): New expander.
16596 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
16598 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16600 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
16603 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16604 multiply in 32-bit mode.
16605 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16606 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16609 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
16611 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16612 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16613 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16614 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16616 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
16619 * dwarf2out.c (is_trivial_indirect_ref): New function.
16620 (dwarf2out_late_global_decl): Do not generate a location
16621 attribute for variables that have a non-trivial DECL_VALUE_EXPR
16622 and that are not defined in the current unit.
16624 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
16626 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16627 instead of a libcall for UNORDERED.
16629 2018-02-09 Tamar Christina <tamar.christina@arm.com>
16632 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16633 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16635 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16638 * config/s390/s390.c (s390_set_current_function): Invoke
16639 s390_indirect_branch_settings also if fndecl didn't change.
16641 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
16643 * config/rs6000/rs6000.md (blockage): Set length to zero.
16645 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
16647 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16649 2018-02-09 Jakub Jelinek <jakub@redhat.com>
16652 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16653 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16657 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16658 PARALLEL incoming that failed vt_get_decl_and_offset check.
16660 PR middle-end/84237
16661 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16662 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16664 (get_variable_section): For decls in named .bss* sections pass true as
16665 second argument to bss_initializer_p.
16667 2018-02-09 Marek Polacek <polacek@redhat.com>
16668 Jakub Jelinek <jakub@redhat.com>
16671 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16672 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
16673 Sync some changes from cxx_fold_indirect_ref.
16675 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
16677 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16679 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16680 (BLOCK_INLINE_ENTRY_LABEL): New.
16681 (dwarf2out_var_location): Disregard inline entry markers.
16682 (inline_entry_data): New struct.
16683 (inline_entry_data_hasher): New hashtable type.
16684 (inline_entry_data_hasher::hash): New.
16685 (inline_entry_data_hasher::equal): New.
16686 (inline_entry_data_table): New variable.
16687 (add_high_low_attributes): Add DW_AT_entry_pc and
16688 DW_AT_GNU_entry_view attributes if a pending entry is found
16689 in inline_entry_data_table. Add old entry_pc attribute only
16690 if debug nonbinding markers are disabled.
16691 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16692 markers are enabled.
16693 (block_within_block_p, dwarf2out_inline_entry): New.
16694 (dwarf2out_finish): Check that no entries remained in
16695 inline_entry_data_table.
16696 * final.c (reemit_insn_block_notes): Handle inline entry notes.
16697 (final_scan_insn, notice_source_line): Likewise.
16698 (rest_of_clean_state): Skip inline entry markers.
16699 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16701 * gimple.c (gimple_build_debug_inline_entry): New.
16702 * gimple.h (enum gimple_debug_subcode): Add
16703 GIMPLE_DEBUG_INLINE_ENTRY.
16704 (gimple_build_debug_inline_entry): Declare.
16705 (gimple_debug_inline_entry_p): New.
16706 (gimple_debug_nonbind_marker_p): Adjust.
16707 * insn-notes.def (INLINE_ENTRY): New.
16708 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16709 inline entry marker notes.
16710 (print_insn): Likewise.
16711 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16712 (INSN_DEBUG_MARKER_KIND): Likewise.
16713 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16714 * tree-inline.c (expand_call_inline): Build and insert
16715 debug_inline_entry stmt.
16716 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16717 inline entry blocks early, if nonbind markers are enabled.
16718 (dump_scope_block): Dump fragment info.
16719 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16720 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16721 (gimple_build_debug_inline_entry): New.
16722 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16723 Enable/disable inline entry points too.
16724 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16725 (DEBUG_INSN): Describe inline entry markers.
16727 * common.opt (gvariable-location-views): New.
16728 (gvariable-location-views=incompat5): New.
16729 * config.in: Rebuilt.
16730 * configure: Rebuilt.
16731 * configure.ac: Test assembler for view support.
16732 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16733 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16734 * dwarf2out.c (var_loc_view): New typedef.
16735 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16736 (dwarf2out_locviews_in_attribute): New.
16737 (dwarf2out_locviews_in_loclist): New.
16738 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16739 (enum dw_line_info_opcode): Add LI_adv_address.
16740 (struct dw_line_info_table): Add view.
16741 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16742 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16743 (zero_view_p): New variable.
16744 (ZERO_VIEW_P): New macro.
16745 (output_asm_line_debug_info): New.
16746 (struct var_loc_node): Add view.
16747 (add_AT_view_list, AT_loc_list): New.
16748 (add_var_loc_to_decl): Add view param. Test it against last.
16749 (new_loc_list): Add view params. Record them.
16750 (AT_loc_list_ptr): Handle loc and view lists.
16751 (view_list_to_loc_list_val_node): New.
16752 (print_dw_val): Handle dw_val_class_view_list.
16753 (size_of_die): Likewise.
16754 (value_format): Likewise.
16755 (loc_list_has_views): New.
16756 (gen_llsym): Set vl_symbol too.
16757 (maybe_gen_llsym, skip_loc_list_entry): New.
16758 (dwarf2out_maybe_output_loclist_view_pair): New.
16759 (output_loc_list): Output view list or entries too.
16760 (output_view_list_offset): New.
16761 (output_die): Handle dw_val_class_view_list.
16762 (output_dwarf_version): New.
16763 (output_compilation_unit_header): Use it.
16764 (output_skeleton_debug_sections): Likewise.
16765 (output_rnglists, output_line_info): Likewise.
16766 (output_pubnames, output_aranges): Update version comments.
16767 (output_one_line_info_table): Output view numbers in asm comments.
16768 (dw_loc_list): Determine current endview, pass it to new_loc_list.
16769 Call maybe_gen_llsym.
16770 (loc_list_from_tree_1): Adjust.
16771 (add_AT_location_description): Create view list attribute if
16772 needed, check it's absent otherwise.
16773 (convert_cfa_to_fb_loc_list): Adjust.
16774 (maybe_emit_file): Call output_asm_line_debug_info for test.
16775 (dwarf2out_var_location): Reset views as needed. Precompute
16776 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
16777 attribute. Set view.
16778 (new_line_info_table): Reset next view.
16779 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16780 (dwarf2out_source_line): Likewise. Output view resets and labels to
16781 the assembler, or select appropriate line info opcodes.
16782 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16783 (optimize_string_length): Catch it. Adjust.
16784 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
16785 dw_val_class_view_list, and remove it if no longer needed.
16786 (hash_loc_list): Hash view numbers.
16787 (loc_list_hasher::equal): Compare them.
16788 (optimize_location_lists): Check whether a view list symbol is
16789 needed, and whether the locview attribute is present, and
16790 whether they match. Remove the locview attribute if no longer
16792 (index_location_lists): Call skip_loc_list_entry for test.
16793 (dwarf2out_finish): Call output_asm_line_debug_info for test.
16794 Use output_dwarf_version.
16795 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16796 (struct dw_val_node): Add val_view_list.
16797 * final.c (SEEN_NEXT_VIEW): New.
16798 (set_next_view_needed): New.
16799 (clear_next_view_needed): New.
16800 (maybe_output_next_view): New.
16801 (final_start_function): Rename to...
16802 (final_start_function_1): ... this. Take pointer to FIRST,
16803 add SEEN parameter. Emit param bindings in the initial view.
16804 (final_start_function): Reintroduce SEEN-less interface.
16805 (final): Rename to...
16806 (final_1): ... this. Take SEEN parameter. Output final pending
16807 next view at the end.
16808 (final): Reintroduce seen-less interface.
16809 (final_scan_insn): Output pending next view before switching
16810 sections or ending a block. Mark the next view as needed when
16811 outputting variable locations. Notify debug backend of section
16812 changes, and of location view changes.
16813 (rest_of_handle_final): Adjust.
16814 * toplev.c (process_options): Autodetect value for debug variable
16815 location views option. Warn on incompat5 without -gdwarf-5.
16816 * doc/invoke.texi (gvariable-location-views): New.
16817 (gvariable-location-views=incompat5): New.
16818 (gno-variable-location-views): New.
16820 2018-02-08 David Malcolm <dmalcolm@redhat.com>
16822 PR tree-optimization/84136
16823 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16824 that the result of find_edge is non-NULL.
16826 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16829 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16830 storing integer register in SImode. Fix cost of 256 and 512
16831 byte aligned SSE register store.
16833 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16835 * config/i386/i386.c (ix86_multiplication_cost): Fix
16836 multiplication cost for TARGET_AVX512DQ.
16838 2018-02-08 Marek Polacek <polacek@redhat.com>
16840 PR tree-optimization/84238
16841 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16844 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16846 PR tree-optimization/84265
16847 * tree-vect-stmts.c (vectorizable_store): Don't treat
16848 VMAT_CONTIGUOUS accesses as grouped.
16849 (vectorizable_load): Likewise.
16851 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16853 PR tree-optimization/81635
16854 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16855 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16856 (test_round_for_mask): New functions.
16857 (wide_int_cc_tests): Call test_round_for_mask.
16858 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16859 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16860 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16861 range returned by get_range_info.
16863 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16866 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16867 * symtab.c: Include builtins.h
16868 (symtab_node::output_to_lto_symbol_table_p): Move here
16869 from lto-streamer-out.c:output_symbol_p.
16870 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16871 (output_symbol_p): Move all logic to symtab.c
16872 (produce_symtab): Update.
16874 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16876 * config/s390/s390-opts.h (enum indirect_branch): Define.
16877 * config/s390/s390-protos.h (s390_return_addr_from_memory)
16878 (s390_indirect_branch_via_thunk)
16879 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16880 (enum s390_indirect_branch_type): Define.
16881 * config/s390/s390.c (struct s390_frame_layout, struct
16882 machine_function): Remove.
16883 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16884 (indirect_branch_table_label_no, indirect_branch_table_name):
16886 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16887 (enum s390_indirect_branch_option): Define.
16888 (s390_return_addr_from_memory): New function.
16889 (s390_handle_string_attribute): New function.
16890 (s390_attribute_table): Add new attribute handler.
16891 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16892 (s390_indirect_branch_via_thunk): New function.
16893 (s390_indirect_branch_via_inline_thunk): New function.
16894 (s390_function_ok_for_sibcall): When jumping via thunk disallow
16895 sibling call optimization for non z10 compiles.
16896 (s390_emit_call): Force indirect branch target to be a single
16897 register. Add r1 clobber for non-z10 compiles.
16898 (s390_emit_epilogue): Emit return jump via return_use expander.
16899 (s390_reorg): Handle JUMP_INSNs as execute targets.
16900 (s390_option_override_internal): Perform validity checks for the
16901 new command line options.
16902 (s390_indirect_branch_attrvalue): New function.
16903 (s390_indirect_branch_settings): New function.
16904 (s390_set_current_function): Invoke s390_indirect_branch_settings.
16905 (s390_output_indirect_thunk_function): New function.
16906 (s390_code_end): Implement target hook.
16907 (s390_case_values_threshold): Implement target hook.
16908 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16910 * config/s390/s390.h (struct s390_frame_layout)
16911 (struct machine_function): Move here from s390.c.
16912 (TARGET_INDIRECT_BRANCH_NOBP_RET)
16913 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16914 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16915 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16916 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16917 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16918 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16919 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16920 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16921 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16922 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16923 (mnemonic attribute): Add values which aren't recognized
16925 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16926 pattern for branch conversion. Fix mnemonic attribute.
16927 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16928 indirect branch via thunk if requested.
16929 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16930 ("*indirect_jump"): Disable for branch conversion using out of
16932 ("indirect_jump_via_thunk<mode>_z10")
16933 ("indirect_jump_via_thunk<mode>")
16934 ("indirect_jump_via_inlinethunk<mode>_z10")
16935 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16936 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16937 ("casesi_jump_via_inlinethunk<mode>_z10")
16938 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16939 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16940 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16941 ("*indirect2_jump"): Disable for branch conversion.
16942 ("casesi_jump"): Turn into expander and expand patterns for branch
16944 ("return_use"): New expander.
16945 ("*return"): Emit return via thunk and rename it to ...
16946 ("*return<mode>"): ... this one.
16947 * config/s390/s390.opt: Add new options and and enum for the
16950 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16952 * lra-constraints.c (match_reload): Unconditionally use
16953 gen_lowpart_SUBREG, rather than selecting between that
16954 and equivalent gen_rtx_SUBREG code.
16956 2018-02-08 Richard Biener <rguenther@suse.de>
16958 PR tree-optimization/84233
16959 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16960 changed flag instead of boguously re-using phi_inserted.
16962 2018-02-08 Martin Jambor <mjambor@suse.cz>
16964 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16965 static local variables.
16967 2018-02-08 Richard Biener <rguenther@suse.de>
16969 PR tree-optimization/84278
16970 * tree-vect-stmts.c (vectorizable_store): When looking for
16971 smaller vector types to perform grouped strided loads/stores
16972 make sure the mode is supported by the target.
16973 (vectorizable_load): Likewise.
16975 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16977 * config/aarch64/aarch64.c (aarch64_components_for_bb):
16978 Increase LDP/STP opportunities by adding adjacent callee-saves.
16980 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16982 PR rtl-optimization/84068
16983 PR rtl-optimization/83459
16984 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16986 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16988 PR tree-optimization/84224
16989 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16990 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16991 non-zero arguments.
16993 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16996 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16997 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16998 count, remove one USE.
17000 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
17002 * doc/install.texi (Configuration): Document the
17003 --with-long-double-format={ibm,ieee} PowerPC configuration
17007 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17008 Convert from define_expand to be define_insn_and_split. Rework
17009 float/double/_Float128 conversions to QI/HI/SImode to work with
17010 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
17011 conversions to QI/HImode types did a store and then a load to
17012 truncate the value. For conversions to VSX registers, don't split
17013 the insn, instead emit the code directly. Use the code iterator
17014 any_fix to combine signed and unsigned conversions.
17015 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17016 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17017 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17018 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17019 (fix_<mode>di2_hw): Likewise.
17020 (fixuns_<mode>di2_hw): Likewise.
17021 (fix_<mode>si2_hw): Likewise.
17022 (fixuns_<mode>si2_hw): Likewise.
17023 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17024 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17025 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17026 fix<uns>_trunc<SFDF:mode>si2_p8.
17027 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17028 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17029 (fix<uns>_<mode>_mem): Likewise.
17030 (fctiw<u>z_<mode>_mem): Likewise.
17031 (fix<uns>_<mode>_mem): Likewise.
17032 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17033 the register allocator from doing a direct move to the GPRs to do
17034 a store, and instead use the ISA 3.0 store byte/half-word from
17035 vector register instruction. For IEEE 128-bit floating point,
17036 also optimize stores of 32-bit ints.
17037 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17039 2018-02-07 Alan Hayward <alan.hayward@arm.com>
17041 * genextract.c (push_pathstr_operand): New function to support
17043 (walk_rtx): Call push_pathstr_operand.
17044 (print_path): Support [a-zA-Z].
17046 2018-02-07 Richard Biener <rguenther@suse.de>
17048 PR tree-optimization/84037
17049 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17050 (cse_and_gimplify_to_preheader): Declare.
17051 (vect_get_place_in_interleaving_chain): Likewise.
17052 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17054 (_loop_vec_info::~_loop_vec_info): Delete it.
17055 (cse_and_gimplify_to_preheader): New function.
17056 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17057 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17058 (vectorizable_load): Likewise. For grouped stores always base
17059 the IV on the first element.
17060 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17061 condition before gimplifying.
17063 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17065 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17066 *DIV_EXPR and *MOD_EXPR.
17068 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
17071 * config/i386/i386.c (ix86_option_override_internal): Mask out
17072 the CF_SET bit when checking -fcf-protection.
17074 2018-02-07 Tom de Vries <tom@codesourcery.com>
17077 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17080 2018-02-07 Richard Biener <rguenther@suse.de>
17082 PR tree-optimization/84204
17083 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17086 PR tree-optimization/84205
17087 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17088 special-case isl_ast_op_zdiv_r.
17090 PR tree-optimization/84223
17091 * graphite-scop-detection.c (gather_bbs::before_dom_children):
17092 Only add conditions from within the region.
17093 (gather_bbs::after_dom_children): Adjust.
17095 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
17098 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17099 * config/avr/avr.md: Only post-reload split REG-REG moves if
17100 either register is GENERAL_REG_P.
17102 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17104 PR tree-optimization/84235
17105 * tree-ssa-scopedtables.c
17106 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17107 if the subtraction is performed in floating point type where NaNs are
17108 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17109 build 1. Formatting fix.
17111 2018-02-06 Jakub Jelinek <jakub@redhat.com>
17114 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17115 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17116 and skip it regardless of bb boundaries. Use CALL_P macro,
17117 don't test INSN_P (insn) together with CALL_P or JUMP_P check
17118 unnecessarily, formatting fix.
17120 2018-02-06 Michael Collison <michael.collison@arm.com>
17122 * config/arm/thumb2.md:
17123 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17124 (*thumb_mov_notscc): Ditto.
17126 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
17129 * config/rs6000/rs6000.md (su code attribute): Use "u" for
17130 unsigned_fix, not "s".
17132 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17134 * configure.ac (gcc_fn_eh_frame_ro): New function.
17135 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17136 correct .eh_frame permissions.
17137 * configure: Regenerate.
17139 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
17141 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17142 irrelevant options.
17144 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17146 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17147 Display warning message for -mno-speculate-indirect-jumps.
17149 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
17151 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17153 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17155 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
17157 PR tree-optimization/84225
17158 * tree-eh.c (find_trapping_overflow): Only call
17159 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17161 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17164 * config/i386/i386.c: Reimplement the check of possible options
17165 -mibt/-mshstk conbination. Change error messages.
17166 * doc/invoke.texi: Fix a typo: remove extra '='.
17168 2018-02-06 Marek Polacek <polacek@redhat.com>
17170 PR tree-optimization/84228
17171 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17173 2018-02-06 Tamar Christina <tamar.christina@arm.com>
17176 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17177 emitted arch directives.
17178 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17179 __ARM_FEATURE_COPROC before changing architectures.
17181 2018-02-06 Richard Biener <rguenther@suse.de>
17183 * config/i386/i386.c (print_reg): Fix typo.
17184 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17186 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
17188 * configure: Regenerate.
17190 2018-02-05 Martin Sebor <msebor@redhat.com>
17192 PR tree-optimization/83369
17193 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17196 2018-02-05 Martin Liska <mliska@suse.cz>
17198 * doc/invoke.texi: Cherry-pick upstream r323995.
17200 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
17202 * ira.c (ira_init_register_move_cost): Adjust comment.
17204 2018-02-05 Martin Liska <mliska@suse.cz>
17206 PR gcov-profile/84137
17207 * doc/gcov.texi: Fix typo in documentation.
17209 2018-02-05 Martin Liska <mliska@suse.cz>
17211 PR gcov-profile/83879
17212 * doc/gcov.texi: Document necessity of --dynamic-list-data when
17213 using dlopen functionality.
17215 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
17217 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17218 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17219 _mm_maskz_range_ss, _mm_mask_range_round_ss,
17220 _mm_maskz_range_round_ss): New intrinsics.
17221 (__builtin_ia32_rangesd128_round)
17222 (__builtin_ia32_rangess128_round): Remove.
17223 (__builtin_ia32_rangesd128_mask_round,
17224 __builtin_ia32_rangess128_mask_round): New builtins.
17225 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17226 __builtin_ia32_rangess128_round): Remove.
17227 (__builtin_ia32_rangesd128_mask_round,
17228 __builtin_ia32_rangess128_mask_round): New builtins.
17229 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17230 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17231 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17232 "<round_saeonly_constraint>")): Changed to ...
17233 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17234 "<round_saeonly_scalar_constraint>")): ... this.
17235 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17236 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17237 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17238 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17239 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17241 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
17243 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17245 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17246 Remove all values except native, 8540 and 8548.
17248 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
17250 * config/i386/i386.c (ix86_output_function_return): Pass
17251 INVALID_REGNUM, instead of -1, as invalid register number to
17252 indirect_thunk_name and output_indirect_thunk.
17254 2018-02-02 Julia Koval <julia.koval@intel.com>
17256 * config.gcc: Add -march=icelake.
17257 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17258 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17259 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17260 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17261 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17262 (processor_target_table): Add icelake.
17263 (ix86_option_override_internal): Handle new PTAs.
17264 (get_builtin_code_for_version): Handle icelake.
17265 (M_INTEL_COREI7_ICELAKE): New.
17266 (fold_builtin_cpu): Handle icelake.
17267 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17268 * doc/invoke.texi: Add -march=icelake.
17270 2018-02-02 Julia Koval <julia.koval@intel.com>
17272 * config/i386/i386.c (ix86_option_override_internal): Change flags type
17273 to wide_int_bitmask.
17274 * wide-int-bitmask.h: New.
17276 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17279 * config/i386/i386.md: Replace Pmode with word_mode in
17280 builtin_setjmp_setup and builtin_longjmp to support x32.
17282 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
17286 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17288 (rs6000_supported_cpu_names): New static variable.
17289 (linux_cpu_translation_table): Likewise.
17290 (elf_platform) <cpu>: Define new static variable and use it.
17291 Translate kernel AT_PLATFORM name to canonical name if needed.
17292 Error if platform name is unknown.
17294 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
17297 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17299 2018-02-01 Jeff Law <law@redhat.com>
17302 * config/i386/i386.c (release_scratch_register_on_entry): Add new
17303 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
17304 the scratch if RELEASE_VIA_POP is false.
17305 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17306 If we have to save a temporary register, decrement SIZE appropriately.
17307 Pass new arguments to release_scratch_register_on_entry.
17308 (ix86_adjust_stack_and_probe): Likewise.
17309 (ix86_emit_probe_stack_range): Pass new arguments to
17310 release_scratch_register_on_entry.
17312 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
17314 PR rtl-optimization/84157
17315 * combine.c (change_zero_ext): Use REG_P predicate in
17316 front of HARD_REGISTER_P predicate.
17318 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
17320 * config/avr/avr.c (avr_option_override): Move disabling of
17321 -fdelete-null-pointer-checks to...
17322 * common/config/avr/avr-common.c (avr_option_optimization_table):
17325 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17327 PR tree-optimization/81635
17328 * tree-data-ref.c (split_constant_offset_1): For types that
17329 wrap on overflow, try to use range info to prove that wrapping
17332 2018-02-01 Renlin Li <renlin.li@arm.com>
17335 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17336 TAILCALL_ADDR_REGS.
17337 (aarch64_register_move_cost): Likewise.
17338 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17339 TAILCALL_ADDR_REGS.
17340 (REG_CLASS_NAMES): Likewise.
17341 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17342 TAILCALL_ADDR_REGS. Remove IP registers.
17343 * config/aarch64/aarch64.md (Ucs): Update register constraint.
17345 2018-02-01 Richard Biener <rguenther@suse.de>
17347 * domwalk.h (dom_walker::dom_walker): Add additional constructor
17348 for specifying RPO order and allow NULL for that.
17349 * domwalk.c (dom_walker::dom_walker): Likewise.
17350 (dom_walker::walk): Handle NULL RPO order.
17351 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17353 (rewrite_update_dom_walker): Likewise.
17354 (mark_def_dom_walker): Likewise.
17356 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17358 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17359 (aarch64_maybe_expand_sve_subreg_move): Declare.
17360 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17361 * config/aarch64/predicates.md (aarch64_any_register_operand): New
17363 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17364 that are semantically a reverse operation.
17365 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17366 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17367 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17369 (aarch64_can_change_mode_class): For big-endian, forbid changes
17370 between two SVE modes if they have different element sizes.
17372 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17374 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17375 the TImode handling for big-endian targets.
17377 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17379 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17380 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
17382 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17383 Remove BSWAP handing for big-endian targets and use the form of
17384 LD1RQ appropariate for the mode.
17386 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17388 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17389 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17390 duplicated element.
17392 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17395 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17396 check for operands that need to go through aarch64_sve_reload_be.
17398 2018-02-01 Jakub Jelinek <jakub@redhat.com>
17400 PR tree-optimization/81661
17401 PR tree-optimization/84117
17402 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17403 * tree-eh.c: Include gimplify.h.
17404 (find_trapping_overflow, replace_trapping_overflow,
17405 rewrite_to_non_trapping_overflow): New functions.
17406 * tree-vect-loop.c: Include tree-eh.h.
17407 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17408 * tree-data-ref.c: Include tree-eh.h.
17409 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17411 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
17413 PR rtl-optimization/84123
17414 * combine.c (change_zero_ext): Check if hard register satisfies
17415 can_change_dest_mode before calling gen_lowpart_SUBREG.
17417 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
17420 * ira.c (ira_init_register_move_cost): Remove assert.
17422 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17424 PR rtl-optimization/84071
17425 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17426 * doc/tm.texi: Regenerate.
17428 2018-01-31 Richard Biener <rguenther@suse.de>
17430 PR tree-optimization/84132
17431 * tree-data-ref.c (analyze_miv_subscript): Properly
17432 check whether evolution_function_is_affine_multivariate_p
17433 before calling gcd_of_steps_may_divide_p.
17435 2018-01-31 Julia Koval <julia.koval@intel.com>
17438 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17439 * config/i386/i386.md (rdpid_rex64) New.
17440 (rdpid): Make 32bit only.
17442 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
17445 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17446 an IDENTIFIER_NODE for FUNCTION_TYPE's.
17448 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17451 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17453 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17455 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
17457 PR rtl-optimization/84071
17458 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17459 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17461 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
17463 * config/arc/arc.c (arc_handle_aux_attribute): New function.
17464 (arc_attribute_table): Add 'aux' attribute.
17465 (arc_in_small_data_p): Consider aux like variables.
17466 (arc_is_aux_reg_p): New function.
17467 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17468 (arc_get_aux_arg): New function.
17469 (prepare_move_operands): Handle aux-register access.
17470 (arc_handle_aux_attribute): New function.
17471 * doc/extend.texi (ARC Variable attributes): Add subsection.
17473 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
17475 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17476 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17477 (arc_attribute_table): Add 'uncached' attribute.
17478 (arc_print_operand): Print '.di' flag for uncached memory
17480 (arc_in_small_data_p): Do not consider for small data the uncached
17482 (arc_is_uncached_mem_p): New function.
17483 * config/arc/predicates.md (compact_store_memory_operand): Check
17484 for uncached memory accesses.
17485 (nonvol_nonimm_operand): Likewise.
17486 * doc/extend.texi (ARC Type Attribute): New subsection.
17488 2018-01-31 Jakub Jelinek <jakub@redhat.com>
17491 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17492 falign-loops=): Add Optimization flag.
17494 2018-01-30 Jeff Law <law@redhat.com>
17497 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17498 INT_REGISTERS_SAVED. Check it prior to calling
17499 get_scratch_register_on_entry.
17500 (ix86_adjust_stack_and_probe): Similarly.
17501 (ix86_emit_probe_stack_range): Similarly.
17502 (ix86_expand_prologue): Corresponding changes.
17504 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17507 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17508 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17510 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
17513 * lra-constraints.c (curr_insn_transform): Process AND in the
17516 2018-01-30 Jakub Jelinek <jakub@redhat.com>
17518 PR rtl-optimization/83986
17519 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17520 dependence against last_pending_memory_flush in addition to
17521 pending_jump_insns.
17523 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
17525 PR tree-optimization/81611
17526 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17529 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17532 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17535 2018-01-30 Richard Biener <rguenther@suse.de>
17536 Jakub Jelinek <jakub@redhat.com>
17538 PR tree-optimization/84111
17539 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17540 inner loops added during recursion, as they don't have up-to-date
17543 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
17546 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17547 (can_inline_edge_by_limits_p): ... here.
17548 (can_early_inline_edge_p, check_callers,
17549 update_caller_keys, update_callee_keys, recursive_inlining,
17550 add_new_edges_to_heap, speculation_useful_p,
17551 inline_small_functions,
17552 inline_small_functions, flatten_function,
17553 inline_to_all_callers_1): Update.
17555 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
17557 * profile-count.c (profile_count::combine_with_ipa_count): Handle
17560 2018-01-30 Richard Biener <rguenther@suse.de>
17562 PR tree-optimization/83008
17563 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17564 invariant and constant vector uses in stmts when they need
17565 more than one stmt.
17567 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17570 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17571 * configure: Regenerate.
17573 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17575 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17577 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17578 Use gen_rtx_REG rather than gen_lowpart.
17580 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17582 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17583 rather than 0 when creating partial subregs.
17585 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
17587 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17590 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
17593 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17594 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17595 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17596 flags. This restores the settings used before the 2017-07-24.
17597 Turning off pre increment/decrement/modify allows IVOPTS to
17598 optimize DF/SF loops where the index is an int.
17600 2018-01-29 Richard Biener <rguenther@suse.de>
17601 Kelvin Nilsen <kelvin@gcc.gnu.org>
17604 * tree-vect-stmts.c (vectorizable_call): Don't call
17605 targetm.vectorize_builtin_md_vectorized_function if callee is
17608 2018-01-22 Carl Love <cel@us.ibm.com>
17610 * doc/extend.tex: Fix typo in second arg in
17611 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17613 2018-01-29 Richard Biener <rguenther@suse.de>
17615 PR tree-optimization/84086
17616 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17617 (flush_ssaname_freelist): When SSA names were released reset
17618 the SCEV hash table.
17620 2018-01-29 Richard Biener <rguenther@suse.de>
17622 PR tree-optimization/84057
17623 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17624 removed paths when removing edges.
17626 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
17628 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17629 -mfunction-return=@var{choice}.
17631 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
17633 PR diagnostic/84034
17634 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17635 Handle CR like TAB.
17636 (layout::print_source_line): Likewise.
17637 (test_get_line_width_without_trailing_whitespace): Add test cases.
17639 2018-01-27 Jakub Jelinek <jakub@redhat.com>
17641 PR middle-end/84040
17642 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17645 2018-01-26 Jim Wilson <jimw@sifive.com>
17647 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17649 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17652 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17654 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17655 and CMP + SUB-immediate -> SUBS.
17657 2018-01-26 Martin Sebor <msebor@redhat.com>
17659 PR tree-optimization/83896
17660 * tree-ssa-strlen.c (get_string_len): Rename...
17661 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
17662 Avoid assuming length is constant.
17663 (handle_char_store): Use HOST_WIDE_INT for string length.
17665 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
17668 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17669 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17671 2018-01-26 Richard Biener <rguenther@suse.de>
17673 PR rtl-optimization/84003
17674 * dse.c (record_store): Only record redundant stores when
17675 the earlier store aliases at least all accesses the later one does.
17677 2018-01-26 Jakub Jelinek <jakub@redhat.com>
17679 PR rtl-optimization/83985
17680 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17681 REG_CFA_RESTORE insns.
17682 (delete_unmarked_insns): Don't ignore separate shrink wrapping
17683 REG_CFA_RESTORE insns here.
17686 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17687 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17689 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17691 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17692 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17693 (arc_init): Likewise.
17694 (arc_override_options): Likewise.
17695 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17697 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17699 * config/arc/arc.h (TARGET_DBNZ): Define.
17700 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17701 properly set the tune attribute.
17702 (dbnz): Use TARGET_DBNZ guard.
17703 * config/arc/arc.opt (mtune): Add core3 option.
17705 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17707 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17708 recognize new pic like addresses.
17709 (arc_delegitimize_address): Clean up.
17711 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17713 * config/arc/arc-arches.def: Option mrf16 valid for all
17715 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17716 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17717 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17718 * config/arc/arc-tables.opt: Regenerate.
17719 * config/arc/arc.c (arc_conditional_register_usage): Handle
17720 reduced register file case.
17721 (arc_file_start): Set must have build attributes.
17722 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17723 mrf16 option value.
17724 * config/arc/arc.opt (mrf16): Add new option.
17725 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17726 * config/arc/genmultilib.awk: Handle new mrf16 option.
17727 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17728 * config/arc/t-multilib: Regenerate.
17729 * doc/invoke.texi (ARC Options): Document mrf16 option.
17731 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17733 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17734 * config/arc/arc.c (arc_handle_secure_attribute): New function.
17735 (arc_attribute_table): Add 'secure_call' attribute.
17736 (arc_print_operand): Print secure call operand.
17737 (arc_function_ok_for_sibcall): Don't optimize tail calls when
17739 (arc_is_secure_call_p): New function. * config/arc/arc.md
17740 (call_i): Add support for sjli instruction.
17741 (call_value_i): Likewise.
17742 * config/arc/constraints.md (Csc): New constraint.
17744 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
17745 John Eric Martin <John.Martin@emmicro-us.com>
17747 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17748 * config/arc/arc.c (_arc_jli_section): New struct.
17749 (arc_jli_section): New type.
17750 (rc_jli_sections): New static variable.
17751 (arc_handle_jli_attribute): New function.
17752 (arc_attribute_table): Add jli_always and jli_fixed attribute.
17753 (arc_file_end): New function.
17754 (TARGET_ASM_FILE_END): Define.
17755 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17756 (arc_add_jli_section): New function.
17757 (jli_call_scan): Likewise.
17758 (arc_reorg): Call jli_call_scan.
17759 (arc_output_addsi): Remove 'S' from printing asm operand.
17760 (arc_is_jli_call_p): New function.
17761 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17763 (movhi_insn): Likewise.
17764 (movsi_insn): Likewise.
17765 (movsi_set_cc_insn): Likewise.
17766 (loadqi_update): Likewise.
17767 (load_zeroextendqisi_update): Likewise.
17768 (load_signextendqisi_update): Likewise.
17769 (loadhi_update): Likewise.
17770 (load_zeroextendhisi_update): Likewise.
17771 (load_signextendhisi_update): Likewise.
17772 (loadsi_update): Likewise.
17773 (loadsf_update): Likewise.
17774 (movsicc_insn): Likewise.
17775 (bset_insn): Likewise.
17776 (bxor_insn): Likewise.
17777 (bclr_insn): Likewise.
17778 (bmsk_insn): Likewise.
17779 (bicsi3_insn): Likewise.
17780 (cmpsi_cc_c_insn): Likewise.
17781 (movsi_ne): Likewise.
17782 (movsi_cond_exec): Likewise.
17783 (clrsbsi2): Likewise.
17784 (norm_f): Likewise.
17794 (call_i): Remove 'S' asm letter, add jli instruction.
17795 (call_value_i): Likewise.
17796 * config/arc/arc.op (mjli-always): New option.
17797 * config/arc/constraints.md (Cji): New constraint.
17798 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17800 (subsf3_fpx): Likewise.
17801 (mulsf3_fpx): Likewise.
17802 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17804 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17805 function attrbutes.
17806 * doc/invoke.texi (ARC): Document mjli-always option.
17808 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
17810 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17811 avoid addition with 0 and use incw and decw where possible.
17813 2018-01-26 Richard Biener <rguenther@suse.de>
17815 PR tree-optimization/81082
17816 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17817 association if it requires casting to unsigned.
17818 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17819 from fold_plusminus_mult_expr to catch important cases late when
17820 range info is available.
17822 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17824 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17825 * configure.ac (hidden_linkonce): New test.
17826 * configure: Regenerate.
17827 * config.in: Regenerate.
17829 2018-01-26 Julia Koval <julia.koval@intel.com>
17831 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17832 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17833 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17834 _mm_mask_bitshuffle_epi64_mask): Fix type.
17835 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17836 USI_FTYPE_V4DI_V4DI_USI): Remove.
17837 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17838 __builtin_ia32_vpshufbitqmb256_mask,
17839 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17840 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17841 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17843 2018-01-26 Alan Modra <amodra@gmail.com>
17846 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17847 UNSPEC_VBPERMQ. Sort other unspecs.
17849 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
17851 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17853 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
17855 PR middle-end/83055
17856 * predict.c (drop_profile): Do not push/pop cfun; update also
17858 (handle_missing_profiles): Fix logic looking for zero profiles.
17860 2018-01-25 Jakub Jelinek <jakub@redhat.com>
17862 PR middle-end/83977
17863 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17864 on functions with #pragma omp declare simd or functions with simd
17866 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17867 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17868 Remove trailing \n from warning_at calls.
17870 2018-01-25 Tom de Vries <tom@codesourcery.com>
17873 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17874 for neutered workers.
17876 2018-01-24 Joseph Myers <joseph@codesourcery.com>
17879 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17880 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17882 2018-01-24 Jeff Law <law@redhat.com>
17885 * i386.c (get_probe_interval): Move to earlier point.
17886 (ix86_compute_frame_layout): If -fstack-clash-protection and
17887 the frame is larger than the probe interval, then use pushes
17888 to save registers rather than reg->mem moves.
17889 (ix86_expand_prologue): Remove conditional for int_registers_saved
17892 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
17895 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17896 min/max for never referenced object.
17898 2018-01-24 Jakub Jelinek <jakub@redhat.com>
17900 PR middle-end/83977
17901 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17903 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17904 attributes from DECL_ATTRIBUTES (decl) without affecting
17905 DECL_ATTRIBUTES (current_function_decl).
17906 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17907 functions with non-NULL DECL_ABSTRACT_ORIGIN.
17909 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
17911 PR tree-optimization/83979
17912 * fold-const.c (fold_comparison): Use constant_boolean_node
17913 instead of boolean_{true,false}_node.
17915 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
17917 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17920 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17922 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17923 Simplify the clause that sets the length attribute.
17924 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17925 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17926 clause that sets the length attribute.
17927 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17929 2018-01-24 Tom de Vries <tom@codesourcery.com>
17932 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17933 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17934 Add strict parameter.
17935 (prevent_branch_around_nothing): Insert dummy insn between branch to
17936 label and label with no ptx insn inbetween.
17937 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17939 2018-01-24 Tom de Vries <tom@codesourcery.com>
17942 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17943 for neutered threads in warp.
17944 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17946 2018-01-24 Richard Biener <rguenther@suse.de>
17948 PR tree-optimization/83176
17949 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17952 2018-01-24 Richard Biener <rguenther@suse.de>
17954 PR tree-optimization/82819
17955 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17956 code generating pluses that are no-ops in the target precision.
17958 2018-01-24 Richard Biener <rguenther@suse.de>
17960 PR middle-end/84000
17961 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17963 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17965 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17966 to merge probabilities.
17967 * predict.c (probably_never_executed): Also mark as cold functions
17968 with global 0 profile and guessed local profile.
17969 * profile-count.c (profile_probability::combine_with_count): New
17971 * profile-count.h (profile_probability::operator*,
17972 profile_probability::operator*=, profile_probability::operator/,
17973 profile_probability::operator/=): Reduce precision to adjusted
17974 and set value to guessed on contradictory divisions.
17975 (profile_probability::combine_with_freq): Remove.
17976 (profile_probability::combine_wiht_count): Declare.
17977 (profile_count::force_nonzero):: Set to adjusted.
17978 (profile_count::probability_in):: Set quality to adjusted.
17979 * tree-ssa-tail-merge.c (replace_block_by): Use
17980 combine_with_count.
17982 2018-01-23 Andrew Waterman <andrew@sifive.com>
17983 Jim Wilson <jimw@sifive.com>
17985 * config/riscv/riscv.c (riscv_stack_boundary): New.
17986 (riscv_option_override): Set riscv_stack_boundary. Handle
17987 riscv_preferred_stack_boundary_arg.
17988 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17989 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17990 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17991 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17992 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17993 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17995 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17998 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17999 of struct ix86_frame.
18000 (ix86_expand_epilogue): Likewise. Add a local variable for
18001 the reg_save_offset field in struct ix86_frame.
18003 2018-01-23 Bin Cheng <bin.cheng@arm.com>
18005 PR tree-optimization/82604
18006 * tree-loop-distribution.c (enum partition_kind): New enum item
18007 PKIND_PARTIAL_MEMSET.
18008 (partition_builtin_p): Support above new enum item.
18009 (generate_code_for_partition): Ditto.
18010 (compute_access_range): Differentiate cases that equality can be
18011 proven at all loops, the innermost loops or no loops.
18012 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18013 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
18014 (finalize_partitions, distribute_loop): Don't fuse partition of
18015 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18016 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18017 parloop is enabled.
18019 2018-01-23 Martin Liska <mliska@suse.cz>
18021 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18022 order to ignore the predictor.
18023 (PRED_POLYMORPHIC_CALL): Likewise.
18024 (PRED_RECURSIVE_CALL): Likewise.
18026 2018-01-23 Martin Liska <mliska@suse.cz>
18028 * tree-profile.c (tree_profiling): Print function header to
18029 aware reader which function we are working on.
18030 * value-prof.c (gimple_find_values_to_profile): Do not print
18031 not interesting value histograms.
18033 2018-01-23 Martin Liska <mliska@suse.cz>
18035 * profile-count.h (enum profile_quality): Add
18036 profile_uninitialized as the first value. Do not number values
18037 as they are zero based.
18038 (profile_count::verify): Update sanity check.
18039 (profile_probability::verify): Likewise.
18041 2018-01-23 Nathan Sidwell <nathan@acm.org>
18043 * doc/invoke.texi (ffor-scope): Deprecate.
18045 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18047 PR tree-optimization/83510
18048 * domwalk.c (set_all_edges_as_executable): New function.
18049 (dom_walker::dom_walker): Convert bool param
18050 "skip_unreachable_blocks" to enum reachability. Move setup of
18051 edge flags to set_all_edges_as_executable and only do it when
18052 reachability is REACHABLE_BLOCKS.
18053 * domwalk.h (enum dom_walker::reachability): New enum.
18054 (dom_walker::dom_walker): Convert bool param
18055 "skip_unreachable_blocks" to enum reachability.
18056 (set_all_edges_as_executable): New decl.
18057 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
18058 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18060 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18061 but converting true to REACHABLE_BLOCKS.
18062 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18064 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18065 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18066 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18068 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18069 if check_all_array_refs will be called.
18071 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18073 * tree.c (selftest::test_location_wrappers): Add more test
18076 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18078 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18079 (selftest::test_bit_in_range): Likewise.
18081 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18084 * doc/sourcebuild.texi (vect_float): Say that the selector
18085 only describes the situation when -funsafe-math-optimizations is on.
18086 (vect_float_strict): Document.
18088 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18090 PR tree-optimization/83965
18091 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18092 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18093 instead of checking only for a reduction.
18094 (vect_recog_widen_sum_pattern): Likewise.
18096 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18098 * predict.c (probably_never_executed): Only use precise profile info.
18099 (compute_function_frequency): Skip after inlining hack since we now
18100 have quality checking.
18102 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18104 * profile-count.h (profile_probability::very_unlikely,
18105 profile_probability::unlikely, profile_probability::even): Set
18106 precision to guessed.
18108 2018-01-23 Richard Biener <rguenther@suse.de>
18110 PR tree-optimization/83963
18111 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18112 Properly terminate dominator walk when crossing the exit edge not
18113 when visiting its source block.
18115 2018-01-23 Jakub Jelinek <jakub@redhat.com>
18118 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18119 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18121 2018-01-22 Jakub Jelinek <jakub@redhat.com>
18123 PR tree-optimization/83957
18124 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
18125 semicolon after for body surrounded by braces.
18127 PR tree-optimization/83081
18128 * profile-count.h (profile_probability::split): New method.
18129 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18130 Use profile_probability::split.
18131 (do_compare_rtx_and_jump): Fix adjustment of probabilities
18132 when splitting a single conditional jump into 2.
18134 2018-01-22 David Malcolm <dmalcolm@redhat.com>
18136 PR tree-optimization/69452
18137 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18140 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18142 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18143 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18144 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18146 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18148 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18150 * config/rl78/rl78.md (movdi): New define_expand.
18151 * config/rl78/rl78.c (rl78_split_movdi): New function.
18153 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
18156 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18158 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18159 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18160 128-bit to produce an UNSPEC move to get the double word with the
18161 signbit and then a shift directly to do signbit.
18162 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18163 implementation with a new version that just does either a direct
18164 move or a regular move. Move memory interface to separate insns.
18165 Move insns so they are next to the expander.
18166 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18167 with signbit move. Split big and little endian case.
18168 (signbit<mode>2_dm_mem_le): Likewise.
18169 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18170 (signbit<mode>2_dm2): Likewise.
18172 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18174 * config/rl78/rl78.md (anddi3): New define_expand.
18176 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18178 * config/rl78/rl78.md (umindi3): New define_expand.
18180 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18182 * config/rl78/rl78.md (smindi3): New define_expand.
18184 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18186 * config/rl78/rl78.md (smaxdi3): New define_expand.
18188 2018-01-22 Carl Love <cel@us.ibm.com>
18190 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18191 LVX_V1TI): Add macro expansion.
18192 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18193 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18194 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18195 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18196 Change check to determine if the instruction is a byte reversing
18197 entry. Fix typo in comment.
18198 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18199 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18200 Add def_builtin calls for new builtins.
18201 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18202 Add define_insn expansion.
18204 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18206 * config/rl78/rl78.md (umaxdi3): New define_expand.
18208 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18210 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18211 for non-QImode registers.
18213 2018-01-22 Richard Biener <rguenther@suse.de>
18215 PR tree-optimization/83963
18216 * graphite-scop-detection.c (scop_detection::get_sese): Delay
18217 including the loop exit block.
18218 (scop_detection::merge_sese): Likewise.
18219 (scop_detection::add_scop): Do it here instead.
18221 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18223 * doc/sourcebuild.texi (arm_softfloat): Document.
18225 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
18228 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18229 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18230 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18232 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18233 David Edelsohn <dje.gcc@gmail.com>
18236 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18237 Change "crset eq" to "crset 2".
18238 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18239 (*call_indirect_aix<mode>_nospec): Likewise.
18240 (*call_value_indirect_aix<mode>_nospec): Likewise.
18241 (*call_indirect_elfv2<mode>_nospec): Likewise.
18242 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18243 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18244 change assembly output from . to $.
18245 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18246 (indirect_jump<mode>_nospec): Change assembly output from . to $.
18247 (*tablejump<mode>_internal1_nospec): Likewise.
18249 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
18252 * config/sh/sh_optimize_sett_clrt.cc:
18253 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18255 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
18257 PR tree-optimization/83940
18258 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18259 offset_dt to vect_constant_def rather than vect_unknown_def_type.
18260 (vect_check_load_store_mask): Add a mask_dt_out parameter and
18261 use it to pass back the definition type.
18262 (vect_check_store_rhs): Likewise rhs_dt_out.
18263 (vect_build_gather_load_calls): Add a mask_dt argument and use
18264 it instead of a call to vect_is_simple_use.
18265 (vectorizable_store): Update calls to vect_check_load_store_mask
18266 and vect_check_store_rhs. Use the dt returned by the latter instead
18267 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
18268 instead of calls to vect_is_simple_use. Pass the scalar rather
18269 than the vector operand to vect_is_simple_use when handling
18270 second and subsequent copies of an rhs value.
18271 (vectorizable_load): Update calls to vect_check_load_store_mask
18272 and vect_build_gather_load_calls. Use the cached mask_dt and
18273 gs_info.offset_dt instead of calls to vect_is_simple_use.
18275 2018-01-20 Jakub Jelinek <jakub@redhat.com>
18277 PR middle-end/83945
18278 * tree-emutls.c: Include gimplify.h.
18279 (lower_emutls_2): New function.
18280 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18281 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18282 it before further processing.
18285 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18286 UINTVAL (trueop1) instead of INTVAL (op1).
18288 2018-01-19 Jakub Jelinek <jakub@redhat.com>
18292 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18293 INCOMING_FRAME_SP_OFFSET if not defined.
18294 (scan_trace): Add ENTRY argument. If true and
18295 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18296 emit a note to adjust the CFA offset.
18297 (create_cfi_notes): Adjust scan_trace callers.
18298 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18299 INCOMING_FRAME_SP_OFFSET in the CIE.
18300 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18301 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18303 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18304 * doc/tm.texi: Regenerated.
18306 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18308 PR rtl-optimization/83147
18309 * lra-constraints.c (remove_inheritance_pseudos): Use
18310 lra_substitute_pseudo_within_insn.
18312 2018-01-19 Tom de Vries <tom@codesourcery.com>
18313 Cesar Philippidis <cesar@codesourcery.com>
18316 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18318 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
18321 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18322 spaces for function labels.
18324 2018-01-19 Martin Liska <mliska@suse.cz>
18326 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18327 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18328 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18329 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18330 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18331 (PRED_CONST_RETURN): Change from 69 to 65.
18332 (PRED_NULL_RETURN): Change from 91 to 71.
18333 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18334 (PRED_LOOP_GUARD): Change from 66 to 73.
18336 2018-01-19 Martin Liska <mliska@suse.cz>
18338 * predict.c (predict_insn_def): Add new assert.
18339 (struct branch_predictor): Change type to signed integer.
18340 (test_prediction_value_range): Amend test to cover
18341 PROB_UNINITIALIZED.
18342 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18343 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18344 (PRED_LOOP_ITERATIONS_MAX): Likewise.
18345 (PRED_LOOP_IV_COMPARE): Likewise.
18346 * predict.h (PROB_UNINITIALIZED): Define new constant.
18348 2018-01-19 Martin Liska <mliska@suse.cz>
18350 * predict.c (dump_prediction): Add new format for
18351 analyze_brprob.py script which is enabled with -details
18353 * profile-count.h (precise_p): New function.
18355 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
18357 PR tree-optimization/83922
18358 * tree-vect-loop.c (vect_verify_full_masking): Return false if
18359 there are no statements that need masking.
18360 (vect_active_double_reduction_p): New function.
18361 (vect_analyze_loop_operations): Use it when handling phis that
18362 are not in the loop header.
18364 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
18366 PR tree-optimization/83914
18367 * tree-vect-loop.c (vectorizable_induction): Don't convert
18368 init_expr or apply the peeling adjustment for inductions
18369 that are nested within the vectorized loop.
18371 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18373 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18376 2018-01-18 Jakub Jelinek <jakub@redhat.com>
18380 * function.h (gimplify_parameters): Add gimple_seq * argument.
18381 * function.c: Include gimple.h and options.h.
18382 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18383 for the added local temporaries if needed.
18384 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18385 if there are any parameter cleanups, wrap whole body into a
18386 try/finally with the cleanups.
18388 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
18391 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18392 Use GET_MODE_CLASS for scalar floating point.
18394 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
18398 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18399 Fix call of call_cgraph_insertion_hooks.
18401 2018-01-18 Martin Sebor <msebor@redhat.com>
18403 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18405 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
18408 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18411 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
18414 * common.opt: (-ffile-prefix-map): New option.
18415 * opts.c (common_handle_option): Defer it.
18416 * opts-global.c (handle_common_deferred_options): Handle it.
18417 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18418 * file-prefix-map.h: New file.
18419 (remap_debug_filename, add_debug_prefix_map): ...here.
18420 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18421 * final.c (debug_prefix_map, add_debug_prefix_map
18422 remap_debug_filename): Move to...
18423 * file-prefix-map.c: New file.
18424 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18425 generalize, get rid of alloca(), use strrchr() instead of strchr().
18426 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18427 Implement in terms of add_prefix_map().
18428 (remap_macro_filename, remap_debug_filename): Implement in term of
18430 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18431 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18432 * dbxout.c: Include file-prefix-map.h.
18433 * varasm.c: Likewise.
18434 * vmsdbgout.c: Likewise.
18435 * xcoffout.c: Likewise.
18436 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18437 * doc/cppopts.texi (-fmacro-prefix-map): Document.
18438 * doc/invoke.texi (-ffile-prefix-map): Document.
18439 (-fdebug-prefix-map): Update description.
18441 2018-01-18 Martin Liska <mliska@suse.cz>
18443 * config/i386/i386.c (indirect_thunk_name): Document that also
18445 (output_indirect_thunk): Document why both instructions
18446 (pause and lfence) are generated.
18448 2018-01-18 Richard Biener <rguenther@suse.de>
18450 PR tree-optimization/83887
18451 * graphite-scop-detection.c
18452 (scop_detection::get_nearest_dom_with_single_entry): Remove.
18453 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18454 (scop_detection::merge_sese): Re-implement with a flood-fill
18455 algorithm that properly finds a SESE region if it exists.
18457 2018-01-18 Jakub Jelinek <jakub@redhat.com>
18460 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18461 pointer_diff optimizations use view_convert instead of convert.
18463 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18465 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18466 Generate different code for -mno-speculate-indirect-jumps.
18467 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18468 (*call_indirect_aix<mode>): Disable for
18469 -mno-speculate-indirect-jumps.
18470 (*call_indirect_aix<mode>_nospec): New define_insn.
18471 (*call_value_indirect_aix<mode>): Disable for
18472 -mno-speculate-indirect-jumps.
18473 (*call_value_indirect_aix<mode>_nospec): New define_insn.
18474 (*sibcall_nonlocal_sysv<mode>): Generate different code for
18475 -mno-speculate-indirect-jumps.
18476 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18478 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18480 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18481 long double type, set the flags for noting the default long double
18482 type, even if we don't pass or return a long double type.
18484 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
18487 * ipa-inline.c (flatten_function): Do not overwrite final inlining
18490 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
18492 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18493 support for merge[hl].
18494 (fold_mergehl_helper): New helper function.
18495 (tree-vector-builder.h): New #include for tree_vector_builder usage.
18496 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18497 (altivec_vmrglw_direct): Add xxmrglw insn.
18499 2018-01-17 Andrew Waterman <andrew@sifive.com>
18501 * config/riscv/riscv.c (riscv_conditional_register_usage): If
18502 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18504 2018-01-17 David Malcolm <dmalcolm@redhat.com>
18507 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18508 call the lto_location_cache before reading the
18509 DECL_SOURCE_LOCATION of the types.
18511 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
18512 Richard Sandiford <richard.sandiford@linaro.org>
18514 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18515 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18516 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18517 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18518 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18520 * config/aarch64/constraints.md (aarch64_movti_operand):
18522 * config/aarch64/predicates.md (Uti): Add new constraint.
18524 2018-01-17 Carl Love <cel@us.ibm.com>
18526 * config/rs6000/vsx.md (define_expand xl_len_r,
18527 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18528 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18530 (define_expand, define_insn): Move the shift left from the
18531 define_insn to the define_expand for lxvl and stxvl instructions.
18532 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18533 and XL_LEN_R definitions to PURE.
18535 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
18537 * config/i386/i386.c (indirect_thunk_name): Declare regno
18538 as unsigned int. Compare regno with INVALID_REGNUM.
18539 (output_indirect_thunk): Ditto.
18540 (output_indirect_thunk_function): Ditto.
18541 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
18542 in the call to output_indirect_thunk_function.
18544 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
18546 PR middle-end/83884
18547 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18548 rather than the size of inner_type to determine the stack slot size
18549 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18551 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
18554 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18557 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
18559 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18560 endian Linux systems to optionally enable multilibs for selecting
18561 the long double type if the user configured an explicit type.
18562 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18563 have no long double multilibs if not defined.
18564 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18565 warn if the user used -mabi={ieee,ibm}longdouble and we built
18566 multilibs for long double.
18567 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18568 appropriate multilib option.
18569 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18571 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18572 for building long double multilibs.
18573 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18575 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
18577 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18580 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18582 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18585 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18588 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18591 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
18593 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18594 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18596 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
18598 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18599 different rtl trees depending on TARGET_64BIT.
18600 (rs6000_gen_lvx): Likewise.
18602 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
18604 * config/visium/visium.md (nop): Tweak comment.
18605 (hazard_nop): Likewise.
18607 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18609 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18610 -mspeculate-indirect-jumps.
18611 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18612 for -mno-speculate-indirect-jumps.
18613 (*call_indirect_elfv2<mode>_nospec): New define_insn.
18614 (*call_value_indirect_elfv2<mode>): Disable for
18615 -mno-speculate-indirect-jumps.
18616 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18617 (indirect_jump): Emit different RTL for
18618 -mno-speculate-indirect-jumps.
18619 (*indirect_jump<mode>): Disable for
18620 -mno-speculate-indirect-jumps.
18621 (*indirect_jump<mode>_nospec): New define_insn.
18622 (tablejump): Emit different RTL for
18623 -mno-speculate-indirect-jumps.
18624 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18625 (tablejumpsi_nospec): New define_expand.
18626 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18627 (tablejumpdi_nospec): New define_expand.
18628 (*tablejump<mode>_internal1): Disable for
18629 -mno-speculate-indirect-jumps.
18630 (*tablejump<mode>_internal1_nospec): New define_insn.
18631 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18634 2018-01-16 Artyom Skrobov tyomitch@gmail.com
18636 * caller-save.c (insert_save): Drop unnecessary parameter. All
18639 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18640 Richard Biener <rguenth@suse.de>
18643 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18644 return early, inline manually is_gimple_sizepos. Make sure if we
18645 call gimplify_expr we don't end up with a gimple constant.
18646 * tree.c (variably_modified_type_p): Don't return true for
18647 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
18648 * gimplify.h (is_gimple_sizepos): Remove.
18650 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18652 PR tree-optimization/83857
18653 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18654 vectorizable_live_operation for pure SLP statements.
18655 (vectorizable_live_operation): Handle PHIs.
18657 2018-01-16 Richard Biener <rguenther@suse.de>
18659 PR tree-optimization/83867
18660 * tree-vect-stmts.c (vect_transform_stmt): Precompute
18661 nested_in_vect_loop_p since the scalar stmt may get invalidated.
18663 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18666 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18667 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18668 If off is not INTEGER_CST, issue a may not be aligned warning
18669 rather than isn't aligned. Use isn%'t rather than isn't.
18670 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18672 <case MULT_EXPR>: Improve the case when bottom and one of the
18673 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18674 operand, in that case check if the other operand is multiple of
18675 bottom divided by the INTEGER_CST operand.
18677 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18680 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18681 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18682 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18683 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18684 * config/pa/pa.c (pa_function_arg_advance): Likewise.
18685 (pa_function_arg, pa_arg_partial_bytes): Likewise.
18686 (pa_function_arg_size): New function.
18688 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18690 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18691 in a separate statement.
18693 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
18695 PR tree-optimization/83847
18696 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18697 group gathers and scatters.
18699 2018-01-16 Jakub Jelinek <jakub@redhat.com>
18701 PR rtl-optimization/86620
18702 * params.def (max-sched-ready-insns): Bump minimum value to 1.
18704 PR rtl-optimization/83213
18705 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18706 to last if both are JUMP_INSNs.
18708 PR tree-optimization/83843
18709 * gimple-ssa-store-merging.c
18710 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18711 store_immediate_info for bswap/nop orig_stores.
18713 2018-01-15 Andrew Waterman <andrew@sifive.com>
18715 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18717 <UDIV>: Increase cost if !TARGET_DIV.
18719 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
18721 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18722 (define_attr "cr_logical_3op"): New.
18723 (cceq_ior_compare): Adjust.
18724 (cceq_ior_compare_complement): Adjust.
18725 (*cceq_rev_compare): Adjust.
18726 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18727 (is_cracked_insn): Adjust.
18728 (insn_must_be_first_in_group): Adjust.
18729 * config/rs6000/40x.md: Adjust.
18730 * config/rs6000/440.md: Adjust.
18731 * config/rs6000/476.md: Adjust.
18732 * config/rs6000/601.md: Adjust.
18733 * config/rs6000/603.md: Adjust.
18734 * config/rs6000/6xx.md: Adjust.
18735 * config/rs6000/7450.md: Adjust.
18736 * config/rs6000/7xx.md: Adjust.
18737 * config/rs6000/8540.md: Adjust.
18738 * config/rs6000/cell.md: Adjust.
18739 * config/rs6000/e300c2c3.md: Adjust.
18740 * config/rs6000/e500mc.md: Adjust.
18741 * config/rs6000/e500mc64.md: Adjust.
18742 * config/rs6000/e5500.md: Adjust.
18743 * config/rs6000/e6500.md: Adjust.
18744 * config/rs6000/mpc.md: Adjust.
18745 * config/rs6000/power4.md: Adjust.
18746 * config/rs6000/power5.md: Adjust.
18747 * config/rs6000/power6.md: Adjust.
18748 * config/rs6000/power7.md: Adjust.
18749 * config/rs6000/power8.md: Adjust.
18750 * config/rs6000/power9.md: Adjust.
18751 * config/rs6000/rs64.md: Adjust.
18752 * config/rs6000/titan.md: Adjust.
18754 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18756 * config/i386/predicates.md (indirect_branch_operand): Rewrite
18757 ix86_indirect_branch_register logic.
18759 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18761 * config/i386/constraints.md (Bs): Update
18762 ix86_indirect_branch_register check. Don't check
18763 ix86_indirect_branch_register with GOT_memory_operand.
18765 * config/i386/predicates.md (GOT_memory_operand): Don't check
18766 ix86_indirect_branch_register here.
18767 (GOT32_symbol_operand): Likewise.
18769 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18771 * config/i386/predicates.md (constant_call_address_operand):
18772 Rewrite ix86_indirect_branch_register logic.
18773 (sibcall_insn_operand): Likewise.
18775 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18777 * config/i386/constraints.md (Bs): Replace
18778 ix86_indirect_branch_thunk_register with
18779 ix86_indirect_branch_register.
18781 * config/i386/i386.md (indirect_jump): Likewise.
18782 (tablejump): Likewise.
18783 (*sibcall_memory): Likewise.
18784 (*sibcall_value_memory): Likewise.
18785 Peepholes of indirect call and jump via memory: Likewise.
18786 * config/i386/i386.opt: Likewise.
18787 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18788 (GOT_memory_operand): Likewise.
18789 (call_insn_operand): Likewise.
18790 (sibcall_insn_operand): Likewise.
18791 (GOT32_symbol_operand): Likewise.
18793 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18795 PR middle-end/83837
18796 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18797 type rather than type addr's type points to.
18798 (expand_omp_atomic_mutex): Likewise.
18799 (expand_omp_atomic): Likewise.
18801 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
18804 * config/i386/i386.c (output_indirect_thunk_function): Use
18805 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18806 for __x86_return_thunk.
18808 2018-01-15 Richard Biener <rguenther@suse.de>
18810 PR middle-end/83850
18811 * expmed.c (extract_bit_field_1): Fix typo.
18813 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18816 * config/arm/iterators.md (VF): New mode iterator.
18817 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18818 Remove integer-related logic from pattern.
18819 (neon_vabd<mode>_3): Likewise.
18821 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18823 PR middle-end/82694
18824 * common.opt (fstrict-overflow): No longer an alias.
18825 (fwrapv-pointer): New option.
18826 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18827 also for pointer types based on flag_wrapv_pointer.
18828 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18829 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18830 opts->x_flag_wrapv got set.
18831 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18832 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18833 POINTER_TYPE_OVERFLOW_UNDEFINED.
18834 * match.pd: Likewise in address comparison pattern.
18835 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18837 2018-01-15 Richard Biener <rguenther@suse.de>
18840 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18841 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
18842 Reset type names to their identifier if their TYPE_DECL doesn't
18843 have linkage (and thus is used for ODR and devirt).
18844 (save_debug_info_for_decl): Remove.
18845 (save_debug_info_for_type): Likewise.
18846 (add_tree_to_fld_list): Adjust.
18847 * tree-pretty-print.c (dump_generic_node): Make dumping of
18848 type names more robust.
18850 2018-01-15 Richard Biener <rguenther@suse.de>
18852 * BASE-VER: Bump to 8.0.1.
18854 2018-01-14 Martin Sebor <msebor@redhat.com>
18857 * builtins.c (check_access): Avoid warning when the no-warning bit
18860 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
18862 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18863 * ira-color (allocno_hard_regs_compare): Likewise.
18865 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
18868 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18869 Use .pushsection/.popsection.
18871 2018-01-14 Martin Sebor <msebor@redhat.com>
18874 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18876 2018-01-14 Jakub Jelinek <jakub@redhat.com>
18878 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18879 entry from extra_headers.
18880 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18881 extra_headers, make the list bitwise identical to the i?86-*-* one.
18883 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18885 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18886 -mcmodel=large with -mindirect-branch=thunk,
18887 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18888 -mfunction-return=thunk-extern.
18889 * doc/invoke.texi: Document -mcmodel=large is incompatible with
18890 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18891 -mfunction-return=thunk and -mfunction-return=thunk-extern.
18893 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18895 * config/i386/i386.c (print_reg): Print the name of the full
18896 integer register without '%'.
18897 (ix86_print_operand): Handle 'V'.
18898 * doc/extend.texi: Document 'V' modifier.
18900 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18902 * config/i386/constraints.md (Bs): Disallow memory operand for
18903 -mindirect-branch-register.
18905 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18906 (GOT_memory_operand): Likewise.
18907 (call_insn_operand): Likewise.
18908 (sibcall_insn_operand): Likewise.
18909 (GOT32_symbol_operand): Likewise.
18910 * config/i386/i386.md (indirect_jump): Call convert_memory_address
18911 for -mindirect-branch-register.
18912 (tablejump): Likewise.
18913 (*sibcall_memory): Likewise.
18914 (*sibcall_value_memory): Likewise.
18915 Disallow peepholes of indirect call and jump via memory for
18916 -mindirect-branch-register.
18917 (*call_pop): Replace m with Bw.
18918 (*call_value_pop): Likewise.
18919 (*sibcall_pop_memory): Replace m with Bs.
18920 * config/i386/i386.opt (mindirect-branch-register): New option.
18921 * doc/invoke.texi: Document -mindirect-branch-register option.
18923 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18925 * config/i386/i386-protos.h (ix86_output_function_return): New.
18926 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18927 set function_return_type.
18928 (indirect_thunk_name): Add ret_p to indicate thunk for function
18930 (output_indirect_thunk_function): Pass false to
18931 indirect_thunk_name.
18932 (ix86_output_indirect_branch_via_reg): Likewise.
18933 (ix86_output_indirect_branch_via_push): Likewise.
18934 (output_indirect_thunk_function): Create alias for function
18935 return thunk if regno < 0.
18936 (ix86_output_function_return): New function.
18937 (ix86_handle_fndecl_attribute): Handle function_return.
18938 (ix86_attribute_table): Add function_return.
18939 * config/i386/i386.h (machine_function): Add
18940 function_return_type.
18941 * config/i386/i386.md (simple_return_internal): Use
18942 ix86_output_function_return.
18943 (simple_return_internal_long): Likewise.
18944 * config/i386/i386.opt (mfunction-return=): New option.
18945 (indirect_branch): Mention -mfunction-return=.
18946 * doc/extend.texi: Document function_return function attribute.
18947 * doc/invoke.texi: Document -mfunction-return= option.
18949 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18951 * config/i386/i386-opts.h (indirect_branch): New.
18952 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18953 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18954 with local indirect jump when converting indirect call and jump.
18955 (ix86_set_indirect_branch_type): New.
18956 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18957 (indirectlabelno): New.
18958 (indirect_thunk_needed): Likewise.
18959 (indirect_thunk_bnd_needed): Likewise.
18960 (indirect_thunks_used): Likewise.
18961 (indirect_thunks_bnd_used): Likewise.
18962 (INDIRECT_LABEL): Likewise.
18963 (indirect_thunk_name): Likewise.
18964 (output_indirect_thunk): Likewise.
18965 (output_indirect_thunk_function): Likewise.
18966 (ix86_output_indirect_branch_via_reg): Likewise.
18967 (ix86_output_indirect_branch_via_push): Likewise.
18968 (ix86_output_indirect_branch): Likewise.
18969 (ix86_output_indirect_jmp): Likewise.
18970 (ix86_code_end): Call output_indirect_thunk_function if needed.
18971 (ix86_output_call_insn): Call ix86_output_indirect_branch if
18973 (ix86_handle_fndecl_attribute): Handle indirect_branch.
18974 (ix86_attribute_table): Add indirect_branch.
18975 * config/i386/i386.h (machine_function): Add indirect_branch_type
18976 and has_local_indirect_jump.
18977 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18979 (tablejump): Likewise.
18980 (*indirect_jump): Use ix86_output_indirect_jmp.
18981 (*tablejump_1): Likewise.
18982 (simple_return_indirect_internal): Likewise.
18983 * config/i386/i386.opt (mindirect-branch=): New option.
18984 (indirect_branch): New.
18987 (thunk-inline): Likewise.
18988 (thunk-extern): Likewise.
18989 * doc/extend.texi: Document indirect_branch function attribute.
18990 * doc/invoke.texi: Document -mindirect-branch= option.
18992 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18995 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18997 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18999 * ipa-inline.c (want_inline_small_function_p): Return false if
19000 inlining has already failed with CIF_FINAL_ERROR.
19001 (update_caller_keys): Call want_inline_small_function_p before
19003 (update_callee_keys): Likewise.
19005 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19007 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19009 (rs6000_quadword_masked_address_p): Likewise.
19010 (quad_aligned_load_p): Likewise.
19011 (quad_aligned_store_p): Likewise.
19012 (const_load_sequence_p): Add comment to describe the outer-most loop.
19013 (mimic_memory_attributes_and_flags): New function.
19014 (rs6000_gen_stvx): Likewise.
19015 (replace_swapped_aligned_store): Likewise.
19016 (rs6000_gen_lvx): Likewise.
19017 (replace_swapped_aligned_load): Likewise.
19018 (replace_swapped_load_constant): Capitalize argument name in
19019 comment describing this function.
19020 (rs6000_analyze_swaps): Add a third pass to search for vector loads
19021 and stores that access quad-word aligned addresses and replace
19022 with stvx or lvx instructions when appropriate.
19023 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19024 New function prototype.
19025 (rs6000_quadword_masked_address_p): Likewise.
19026 (rs6000_gen_lvx): Likewise.
19027 (rs6000_gen_stvx): Likewise.
19028 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19029 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19030 when memory address is aligned.
19031 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19032 this split to select lvx instruction when memory address is aligned.
19033 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19034 instruction when memory address is aligned.
19035 (*vsx_le_perm_load_v16qi): Likewise.
19036 (four unnamed splitters): Modify to select the stvx instruction
19037 when memory is aligned.
19039 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
19041 * predict.c (determine_unlikely_bbs): Handle correctly BBs
19042 which appears in the queue multiple times.
19044 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19045 Alan Hayward <alan.hayward@arm.com>
19046 David Sherwood <david.sherwood@arm.com>
19048 * tree-vectorizer.h (vec_lower_bound): New structure.
19049 (_loop_vec_info): Add check_nonzero and lower_bounds.
19050 (LOOP_VINFO_CHECK_NONZERO): New macro.
19051 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19052 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19053 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19054 fields. Make seg_len the distance travelled, not including the
19056 (dr_direction_indicator): Declare.
19057 (dr_zero_step_indicator): Likewise.
19058 (dr_known_forward_stride_p): Likewise.
19059 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19061 (runtime_alias_check_p): Allow runtime alias checks with
19063 (operator ==): Compare access_size and align.
19064 (prune_runtime_alias_test_list): Rework for new distinction between
19065 the access_size and seg_len.
19066 (create_intersect_range_checks_index): Likewise. Cope with polynomial
19068 (get_segment_min_max): New function.
19069 (create_intersect_range_checks): Use it.
19070 (dr_step_indicator): New function.
19071 (dr_direction_indicator): Likewise.
19072 (dr_zero_step_indicator): Likewise.
19073 (dr_known_forward_stride_p): Likewise.
19074 * tree-loop-distribution.c (data_ref_segment_size): Return
19075 DR_STEP * (niters - 1).
19076 (compute_alias_check_pairs): Update call to the dr_with_seg_len
19078 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19079 (vect_preserves_scalar_order_p): New function, split out from...
19080 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
19081 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19082 (vect_vfa_access_size): New function.
19083 (vect_vfa_align): Likewise.
19084 (vect_compile_time_alias): Take access_size_a and access_b arguments.
19085 (dump_lower_bound): New function.
19086 (vect_check_lower_bound): Likewise.
19087 (vect_small_gap_p): Likewise.
19088 (vectorizable_with_step_bound_p): Likewise.
19089 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19090 depencies if the vectorization factor is 1. Convert the checks
19091 for nonzero steps into checks on the bounds of DR_STEP. Try using
19092 a bunds check for variable steps if the minimum required step is
19093 relatively small. Update calls to the dr_with_seg_len
19094 constructor and to vect_compile_time_alias.
19095 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19097 (vect_loop_versioning): Call it.
19098 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19100 (vect_estimate_min_profitable_iters): Account for any bounds checks.
19102 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19103 Alan Hayward <alan.hayward@arm.com>
19104 David Sherwood <david.sherwood@arm.com>
19106 * doc/sourcebuild.texi (vect_scatter_store): Document.
19107 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19109 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19111 * genopinit.c (main): Add supports_vec_scatter_store and
19112 supports_vec_scatter_store_cached to target_optabs.
19113 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19114 IFN_MASK_SCATTER_STORE.
19115 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19117 * internal-fn.h (internal_store_fn_p): Declare.
19118 (internal_fn_stored_value_index): Likewise.
19119 * internal-fn.c (scatter_store_direct): New macro.
19120 (expand_scatter_store_optab_fn): New function.
19121 (direct_scatter_store_optab_supported_p): New macro.
19122 (internal_store_fn_p): New function.
19123 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19124 IFN_MASK_SCATTER_STORE.
19125 (internal_fn_mask_index): Likewise.
19126 (internal_fn_stored_value_index): New function.
19127 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19128 for scatter stores.
19129 * optabs-query.h (supports_vec_scatter_store_p): Declare.
19130 * optabs-query.c (supports_vec_scatter_store_p): New function.
19131 * tree-vectorizer.h (vect_get_store_rhs): Declare.
19132 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19133 true for scatter stores.
19134 (vect_gather_scatter_fn_p): Handle scatter stores too.
19135 (vect_check_gather_scatter): Consider using scatter stores if
19136 supports_vec_scatter_store_p.
19137 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19138 scatter stores too.
19139 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19140 internal_fn_stored_value_index.
19141 (check_load_store_masking): Handle scatter stores too.
19142 (vect_get_store_rhs): Make public.
19143 (vectorizable_call): Use internal_store_fn_p.
19144 (vectorizable_store): Handle scatter store internal functions.
19145 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19146 when deciding whether the end of the group has been reached.
19147 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19148 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19149 (mask_scatter_store<mode>): New insns.
19151 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19152 Alan Hayward <alan.hayward@arm.com>
19153 David Sherwood <david.sherwood@arm.com>
19155 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19156 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19157 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19159 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19160 Use vect_truncate_gather_scatter_offset if we can't treat the
19161 operation as a normal gather load or scatter store.
19162 (get_group_load_store_type): Take the gather_scatter_info
19163 as argument. Try using a gather load or scatter store for
19164 single-element groups.
19165 (get_load_store_type): Update calls to get_group_load_store_type
19166 and vect_use_strided_gather_scatters_p.
19168 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19169 Alan Hayward <alan.hayward@arm.com>
19170 David Sherwood <david.sherwood@arm.com>
19172 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19173 optional tree argument.
19174 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19176 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19177 but continue to use the current value as a fallback.
19178 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19179 to compare the updates.
19180 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19181 (get_load_store_type): Use it when handling a strided access.
19182 (vect_get_strided_load_store_ops): New function.
19183 (vect_get_data_ptr_increment): Likewise.
19184 (vectorizable_load): Handle strided gather loads. Always pass
19185 a step to vect_create_data_ref_ptr and bump_vector_ptr.
19187 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19188 Alan Hayward <alan.hayward@arm.com>
19189 David Sherwood <david.sherwood@arm.com>
19191 * doc/md.texi (gather_load@var{m}): Document.
19192 (mask_gather_load@var{m}): Likewise.
19193 * genopinit.c (main): Add supports_vec_gather_load and
19194 supports_vec_gather_load_cached to target_optabs.
19195 * optabs-tree.c (init_tree_optimization_optabs): Use
19196 ggc_cleared_alloc to allocate target_optabs.
19197 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19198 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19200 * internal-fn.h (internal_load_fn_p): Declare.
19201 (internal_gather_scatter_fn_p): Likewise.
19202 (internal_fn_mask_index): Likewise.
19203 (internal_gather_scatter_fn_supported_p): Likewise.
19204 * internal-fn.c (gather_load_direct): New macro.
19205 (expand_gather_load_optab_fn): New function.
19206 (direct_gather_load_optab_supported_p): New macro.
19207 (direct_internal_fn_optab): New function.
19208 (internal_load_fn_p): Likewise.
19209 (internal_gather_scatter_fn_p): Likewise.
19210 (internal_fn_mask_index): Likewise.
19211 (internal_gather_scatter_fn_supported_p): Likewise.
19212 * optabs-query.c (supports_at_least_one_mode_p): New function.
19213 (supports_vec_gather_load_p): Likewise.
19214 * optabs-query.h (supports_vec_gather_load_p): Declare.
19215 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19216 and memory_type field.
19217 (NUM_PATTERNS): Bump to 15.
19218 * tree-vect-data-refs.c: Include internal-fn.h.
19219 (vect_gather_scatter_fn_p): New function.
19220 (vect_describe_gather_scatter_call): Likewise.
19221 (vect_check_gather_scatter): Try using internal functions for
19222 gather loads. Recognize existing calls to a gather load function.
19223 (vect_analyze_data_refs): Consider using gather loads if
19224 supports_vec_gather_load_p.
19225 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19226 (vect_get_gather_scatter_offset_type): Likewise.
19227 (vect_convert_mask_for_vectype): Likewise.
19228 (vect_add_conversion_to_patterm): Likewise.
19229 (vect_try_gather_scatter_pattern): Likewise.
19230 (vect_recog_gather_scatter_pattern): New pattern recognizer.
19231 (vect_vect_recog_func_ptrs): Add it.
19232 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19233 internal_fn_mask_index and internal_gather_scatter_fn_p.
19234 (check_load_store_masking): Take the gather_scatter_info as an
19235 argument and handle gather loads.
19236 (vect_get_gather_scatter_ops): New function.
19237 (vectorizable_call): Check internal_load_fn_p.
19238 (vectorizable_load): Likewise. Handle gather load internal
19240 (vectorizable_store): Update call to check_load_store_masking.
19241 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19242 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19243 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19244 (aarch64_gather_scale_operand_d): New predicates.
19245 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19246 (mask_gather_load<mode>): New insns.
19248 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19249 Alan Hayward <alan.hayward@arm.com>
19250 David Sherwood <david.sherwood@arm.com>
19252 * optabs.def (fold_left_plus_optab): New optab.
19253 * doc/md.texi (fold_left_plus_@var{m}): Document.
19254 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19255 * internal-fn.c (fold_left_direct): Define.
19256 (expand_fold_left_optab_fn): Likewise.
19257 (direct_fold_left_optab_supported_p): Likewise.
19258 * fold-const-call.c (fold_const_fold_left): New function.
19259 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19260 * tree-parloops.c (valid_reduction_p): New function.
19261 (gather_scalar_reductions): Use it.
19262 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19263 (vect_finish_replace_stmt): Declare.
19264 * tree-vect-loop.c (fold_left_reduction_fn): New function.
19265 (needs_fold_left_reduction_p): New function, split out from...
19266 (vect_is_simple_reduction): ...here. Accept reductions that
19267 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19268 (vect_force_simple_reduction): Also store the reduction type in
19269 the assignment's STMT_VINFO_REDUC_TYPE.
19270 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19271 (merge_with_identity): New function.
19272 (vect_expand_fold_left): Likewise.
19273 (vectorize_fold_left_reduction): Likewise.
19274 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
19275 scalar phi in place for it. Check for target support and reject
19276 cases that would reassociate the operation. Defer the transform
19277 phase to vectorize_fold_left_reduction.
19278 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19279 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19280 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19282 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19284 * tree-if-conv.c (predicate_mem_writes): Remove redundant
19285 call to ifc_temp_var.
19287 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19288 Alan Hayward <alan.hayward@arm.com>
19289 David Sherwood <david.sherwood@arm.com>
19291 * target.def (legitimize_address_displacement): Take the original
19292 offset as a poly_int.
19293 * targhooks.h (default_legitimize_address_displacement): Update
19295 * targhooks.c (default_legitimize_address_displacement): Likewise.
19296 * doc/tm.texi: Regenerate.
19297 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19298 as an argument, moving assert of ad->disp == ad->disp_term to...
19299 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
19300 Try calling targetm.legitimize_address_displacement before expanding
19301 the address rather than afterwards, and adjust for the new interface.
19302 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19303 Match the new hook interface. Handle SVE addresses.
19304 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19305 new hook interface.
19307 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19309 * Makefile.in (OBJS): Add early-remat.o.
19310 * target.def (select_early_remat_modes): New hook.
19311 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19312 * doc/tm.texi: Regenerate.
19313 * targhooks.h (default_select_early_remat_modes): Declare.
19314 * targhooks.c (default_select_early_remat_modes): New function.
19315 * timevar.def (TV_EARLY_REMAT): New timevar.
19316 * passes.def (pass_early_remat): New pass.
19317 * tree-pass.h (make_pass_early_remat): Declare.
19318 * early-remat.c: New file.
19319 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19321 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19323 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19324 Alan Hayward <alan.hayward@arm.com>
19325 David Sherwood <david.sherwood@arm.com>
19327 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19328 vfm1 with a bound_epilog parameter.
19329 (vect_do_peeling): Update calls accordingly, and move the prologue
19330 call earlier in the function. Treat the base bound_epilog as 0 for
19331 fully-masked loops and retain vf - 1 for other loops. Add 1 to
19332 this base when peeling for gaps.
19333 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19334 with fully-masked loops.
19335 (vect_estimate_min_profitable_iters): Handle the single peeled
19336 iteration in that case.
19338 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19339 Alan Hayward <alan.hayward@arm.com>
19340 David Sherwood <david.sherwood@arm.com>
19342 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19343 single-element interleaving even if the size is not a power of 2.
19344 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19345 accesses for single-element interleaving if the group size is
19348 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19349 Alan Hayward <alan.hayward@arm.com>
19350 David Sherwood <david.sherwood@arm.com>
19352 * doc/md.texi (fold_extract_last_@var{m}): Document.
19353 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19354 * optabs.def (fold_extract_last_optab): New optab.
19355 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19356 * internal-fn.c (fold_extract_direct): New macro.
19357 (expand_fold_extract_optab_fn): Likewise.
19358 (direct_fold_extract_optab_supported_p): Likewise.
19359 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19360 * tree-vect-loop.c (vect_model_reduction_cost): Handle
19361 EXTRACT_LAST_REDUCTION.
19362 (get_initial_def_for_reduction): Do not create an initial vector
19363 for EXTRACT_LAST_REDUCTION reductions.
19364 (vectorizable_reduction): Leave the scalar phi in place for
19365 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
19366 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
19367 epilogue code for EXTRACT_LAST_REDUCTION and defer the
19368 transform phase to vectorizable_condition.
19369 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19371 (vect_finish_stmt_generation): ...here.
19372 (vect_finish_replace_stmt): New function.
19373 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19374 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19376 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19378 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19379 Alan Hayward <alan.hayward@arm.com>
19380 David Sherwood <david.sherwood@arm.com>
19382 * doc/md.texi (extract_last_@var{m}): Document.
19383 * optabs.def (extract_last_optab): New optab.
19384 * internal-fn.def (EXTRACT_LAST): New internal function.
19385 * internal-fn.c (cond_unary_direct): New macro.
19386 (expand_cond_unary_optab_fn): Likewise.
19387 (direct_cond_unary_optab_supported_p): Likewise.
19388 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19389 loops using EXTRACT_LAST.
19390 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19391 (extract_last_<mode>): ...this optab.
19392 (vec_extract<mode><Vel>): Update accordingly.
19394 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19395 Alan Hayward <alan.hayward@arm.com>
19396 David Sherwood <david.sherwood@arm.com>
19398 * target.def (empty_mask_is_expensive): New hook.
19399 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19400 * doc/tm.texi: Regenerate.
19401 * targhooks.h (default_empty_mask_is_expensive): Declare.
19402 * targhooks.c (default_empty_mask_is_expensive): New function.
19403 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19404 if the target says that empty masks are expensive.
19405 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19407 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19409 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19410 Alan Hayward <alan.hayward@arm.com>
19411 David Sherwood <david.sherwood@arm.com>
19413 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19414 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19415 (vect_use_loop_mask_for_alignment_p): New function.
19416 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19417 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19418 niters_skip argument. Make sure that the first niters_skip elements
19419 of the first iteration are inactive.
19420 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19421 Update call to vect_set_loop_masks_directly.
19422 (get_misalign_in_elems): New function, split out from...
19423 (vect_gen_prolog_loop_niters): ...here.
19424 (vect_update_init_of_dr): Take a code argument that specifies whether
19425 the adjustment should be added or subtracted.
19426 (vect_update_init_of_drs): Likewise.
19427 (vect_prepare_for_masked_peels): New function.
19428 (vect_do_peeling): Skip prologue peeling if we're using a mask
19429 instead. Update call to vect_update_inits_of_drs.
19430 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19432 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19433 alignment. Do not include the number of peeled iterations in
19434 the minimum threshold in that case.
19435 (vectorizable_induction): Adjust the start value down by
19436 LOOP_VINFO_MASK_SKIP_NITERS iterations.
19437 (vect_transform_loop): Call vect_prepare_for_masked_peels.
19438 Take the number of skipped iterations into account when calculating
19440 * tree-vect-stmts.c (vect_gen_while_not): New function.
19442 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19443 Alan Hayward <alan.hayward@arm.com>
19444 David Sherwood <david.sherwood@arm.com>
19446 * doc/sourcebuild.texi (vect_fully_masked): Document.
19447 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19448 default value to 0.
19449 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19451 (vect_analyze_loop_2): ...here. Don't check the vectorization
19452 factor against the number of loop iterations if the loop is
19455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19456 Alan Hayward <alan.hayward@arm.com>
19457 David Sherwood <david.sherwood@arm.com>
19459 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19460 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19461 (dump_groups): Update accordingly.
19462 (iv_use::mem_type): New member variable.
19463 (address_p): New function.
19464 (record_use): Add a mem_type argument and initialize the new
19466 (record_group_use): Add a mem_type argument. Use address_p.
19467 Remove obsolete null checks of base_object. Update call to record_use.
19468 (find_interesting_uses_op): Update call to record_group_use.
19469 (find_interesting_uses_cond): Likewise.
19470 (find_interesting_uses_address): Likewise.
19471 (get_mem_type_for_internal_fn): New function.
19472 (find_address_like_use): Likewise.
19473 (find_interesting_uses_stmt): Try find_address_like_use before
19474 calling find_interesting_uses_op.
19475 (addr_offset_valid_p): Use the iv mem_type field as the type
19476 of the addressed memory.
19477 (add_autoinc_candidates): Likewise.
19478 (get_address_cost): Likewise.
19479 (split_small_address_groups_p): Use address_p.
19480 (split_address_groups): Likewise.
19481 (add_iv_candidate_for_use): Likewise.
19482 (autoinc_possible_for_pair): Likewise.
19483 (rewrite_groups): Likewise.
19484 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19485 (determine_group_iv_cost): Update after split of USE_ADDRESS.
19486 (get_alias_ptr_type_for_ptr_address): New function.
19487 (rewrite_use_address): Rewrite address uses in calls that were
19488 identified by find_address_like_use.
19490 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19491 Alan Hayward <alan.hayward@arm.com>
19492 David Sherwood <david.sherwood@arm.com>
19494 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19496 * gimple-expr.h (is_gimple_addressable: Likewise.
19497 * gimple-expr.c (is_gimple_address): Likewise.
19498 * internal-fn.c (expand_call_mem_ref): New function.
19499 (expand_mask_load_optab_fn): Use it.
19500 (expand_mask_store_optab_fn): Likewise.
19502 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19503 Alan Hayward <alan.hayward@arm.com>
19504 David Sherwood <david.sherwood@arm.com>
19506 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19507 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19508 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19509 (cond_umax@var{mode}): Document.
19510 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19511 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19512 (cond_umin_optab, cond_umax_optab): New optabs.
19513 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19514 (COND_IOR, COND_XOR): New internal functions.
19515 * internal-fn.h (get_conditional_internal_fn): Declare.
19516 * internal-fn.c (cond_binary_direct): New macro.
19517 (expand_cond_binary_optab_fn): Likewise.
19518 (direct_cond_binary_optab_supported_p): Likewise.
19519 (get_conditional_internal_fn): New function.
19520 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19521 Cope with reduction statements that are vectorized as calls rather
19523 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19524 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19525 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19526 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19527 (UNSPEC_COND_EOR): New unspecs.
19528 (optab): Add mappings for them.
19529 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19530 (sve_int_op, sve_fp_op): New int attributes.
19532 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19533 Alan Hayward <alan.hayward@arm.com>
19534 David Sherwood <david.sherwood@arm.com>
19536 * optabs.def (while_ult_optab): New optab.
19537 * doc/md.texi (while_ult@var{m}@var{n}): Document.
19538 * internal-fn.def (WHILE_ULT): New internal function.
19539 * internal-fn.h (direct_internal_fn_supported_p): New override
19540 that takes two types as argument.
19541 * internal-fn.c (while_direct): New macro.
19542 (expand_while_optab_fn): New function.
19543 (convert_optab_supported_p): Likewise.
19544 (direct_while_optab_supported_p): New macro.
19545 * wide-int.h (wi::udiv_ceil): New function.
19546 * tree-vectorizer.h (rgroup_masks): New structure.
19547 (vec_loop_masks): New typedef.
19548 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19549 and fully_masked_p.
19550 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19551 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19552 (vect_max_vf): New function.
19553 (slpeel_make_loop_iterate_ntimes): Delete.
19554 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19555 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19556 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19557 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19558 internal-fn.h, stor-layout.h and optabs-query.h.
19559 (vect_set_loop_mask): New function.
19560 (add_preheader_seq): Likewise.
19561 (add_header_seq): Likewise.
19562 (interleave_supported_p): Likewise.
19563 (vect_maybe_permute_loop_masks): Likewise.
19564 (vect_set_loop_masks_directly): Likewise.
19565 (vect_set_loop_condition_masked): Likewise.
19566 (vect_set_loop_condition_unmasked): New function, split out from
19567 slpeel_make_loop_iterate_ntimes.
19568 (slpeel_make_loop_iterate_ntimes): Rename to..
19569 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
19570 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19571 (vect_do_peeling): Update call accordingly.
19572 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19574 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19575 mask_compare_type, can_fully_mask_p and fully_masked_p.
19576 (release_vec_loop_masks): New function.
19577 (_loop_vec_info): Use it to free the loop masks.
19578 (can_produce_all_loop_masks_p): New function.
19579 (vect_get_max_nscalars_per_iter): Likewise.
19580 (vect_verify_full_masking): Likewise.
19581 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19582 retries, and free the mask rgroups before retrying. Check loop-wide
19583 reasons for disallowing fully-masked loops. Make the final decision
19584 about whether use a fully-masked loop or not.
19585 (vect_estimate_min_profitable_iters): Do not assume that peeling
19586 for the number of iterations will be needed for fully-masked loops.
19587 (vectorizable_reduction): Disable fully-masked loops.
19588 (vectorizable_live_operation): Likewise.
19589 (vect_halve_mask_nunits): New function.
19590 (vect_double_mask_nunits): Likewise.
19591 (vect_record_loop_mask): Likewise.
19592 (vect_get_loop_mask): Likewise.
19593 (vect_transform_loop): Handle the case in which the final loop
19594 iteration might handle a partial vector. Call vect_set_loop_condition
19595 instead of slpeel_make_loop_iterate_ntimes.
19596 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19597 (check_load_store_masking): New function.
19598 (prepare_load_store_mask): Likewise.
19599 (vectorizable_store): Handle fully-masked loops.
19600 (vectorizable_load): Likewise.
19601 (supportable_widening_operation): Use vect_halve_mask_nunits for
19603 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19604 (vect_gen_while): New function.
19605 * config/aarch64/aarch64.md (umax<mode>3): New expander.
19606 (aarch64_uqdec<mode>): New insn.
19608 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19609 Alan Hayward <alan.hayward@arm.com>
19610 David Sherwood <david.sherwood@arm.com>
19612 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19613 (reduc_xor_scal_optab): New optabs.
19614 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19615 (reduc_xor_scal_@var{m}): Document.
19616 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19617 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19618 internal functions.
19619 * fold-const-call.c (fold_const_call): Handle them.
19620 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19621 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19622 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19623 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19624 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19625 (UNSPEC_XORV): New unspecs.
19626 (optab): Add entries for them.
19627 (BITWISEV): New int iterator.
19628 (bit_reduc_op): New int attributes.
19630 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19631 Alan Hayward <alan.hayward@arm.com>
19632 David Sherwood <david.sherwood@arm.com>
19634 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19635 * internal-fn.def (VEC_SHL_INSERT): New internal function.
19636 * optabs.def (vec_shl_insert_optab): New optab.
19637 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19638 (duplicate_and_interleave): Likewise.
19639 * tree-vect-loop.c: Include internal-fn.h.
19640 (neutral_op_for_slp_reduction): New function, split out from
19641 get_initial_defs_for_reduction.
19642 (get_initial_def_for_reduction): Handle option 2 for variable-length
19643 vectors by loading the neutral value into a vector and then shifting
19644 the initial value into element 0.
19645 (get_initial_defs_for_reduction): Replace the code argument with
19646 the neutral value calculated by neutral_op_for_slp_reduction.
19647 Use gimple_build_vector for constant-length vectors.
19648 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19649 but the first group_size elements have a neutral value.
19650 Use duplicate_and_interleave otherwise.
19651 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19652 Update call to get_initial_defs_for_reduction. Handle SLP
19653 reductions for variable-length vectors by creating one vector
19654 result for each scalar result, with the elements associated
19655 with other scalar results stubbed out with the neutral value.
19656 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19657 Require IFN_VEC_SHL_INSERT for double reductions on
19658 variable-length vectors, or SLP reductions that have
19659 a neutral value. Require can_duplicate_and_interleave_p
19660 support for variable-length unchained SLP reductions if there
19661 is no neutral value, such as for MIN/MAX reductions. Also require
19662 the number of vector elements to be a multiple of the number of
19663 SLP statements when doing variable-length unchained SLP reductions.
19664 Update call to vect_create_epilog_for_reduction.
19665 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19666 and remove initial values.
19667 (duplicate_and_interleave): Make public.
19668 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19669 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19671 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19672 Alan Hayward <alan.hayward@arm.com>
19673 David Sherwood <david.sherwood@arm.com>
19675 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19676 (can_duplicate_and_interleave_p): New function.
19677 (vect_get_and_check_slp_defs): Take the vector of statements
19678 rather than just the current one. Remove excess parentheses.
19679 Restriction rejectinon of vect_constant_def and vect_external_def
19680 for variable-length vectors to boolean types, or types for which
19681 can_duplicate_and_interleave_p is false.
19682 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19683 (duplicate_and_interleave): New function.
19684 (vect_get_constant_vectors): Use gimple_build_vector for
19685 constant-length vectors and suitable variable-length constant
19686 vectors. Use duplicate_and_interleave for other variable-length
19687 vectors. Don't defer the update when inserting new statements.
19689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19690 Alan Hayward <alan.hayward@arm.com>
19691 David Sherwood <david.sherwood@arm.com>
19693 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19694 min_profitable_iters doesn't go negative.
19696 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19697 Alan Hayward <alan.hayward@arm.com>
19698 David Sherwood <david.sherwood@arm.com>
19700 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19701 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19702 * optabs.def (vec_mask_load_lanes_optab): New optab.
19703 (vec_mask_store_lanes_optab): Likewise.
19704 * internal-fn.def (MASK_LOAD_LANES): New internal function.
19705 (MASK_STORE_LANES): Likewise.
19706 * internal-fn.c (mask_load_lanes_direct): New macro.
19707 (mask_store_lanes_direct): Likewise.
19708 (expand_mask_load_optab_fn): Handle masked operations.
19709 (expand_mask_load_lanes_optab_fn): New macro.
19710 (expand_mask_store_optab_fn): Handle masked operations.
19711 (expand_mask_store_lanes_optab_fn): New macro.
19712 (direct_mask_load_lanes_optab_supported_p): Likewise.
19713 (direct_mask_store_lanes_optab_supported_p): Likewise.
19714 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19716 (vect_load_lanes_supported): Likewise.
19717 * tree-vect-data-refs.c (strip_conversion): New function.
19718 (can_group_stmts_p): Likewise.
19719 (vect_analyze_data_ref_accesses): Use it instead of checking
19720 for a pair of assignments.
19721 (vect_store_lanes_supported): Take a masked_p parameter.
19722 (vect_load_lanes_supported): Likewise.
19723 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19724 vect_store_lanes_supported and vect_load_lanes_supported.
19725 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19726 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19727 parameter. Don't allow gaps for masked accesses.
19728 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
19729 and vect_load_lanes_supported.
19730 (get_load_store_type): Take a masked_p parameter and update
19731 call to get_group_load_store_type.
19732 (vectorizable_store): Update call to get_load_store_type.
19733 Handle IFN_MASK_STORE_LANES.
19734 (vectorizable_load): Update call to get_load_store_type.
19735 Handle IFN_MASK_LOAD_LANES.
19737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19738 Alan Hayward <alan.hayward@arm.com>
19739 David Sherwood <david.sherwood@arm.com>
19741 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19743 * config/aarch64/aarch64-protos.h
19744 (aarch64_sve_struct_memory_operand_p): Declare.
19745 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19746 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19747 (VPRED, vpred): Handle SVE structure modes.
19748 * config/aarch64/constraints.md (Utx): New constraint.
19749 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19750 (aarch64_sve_struct_nonimmediate_operand): New predicates.
19751 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19752 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19753 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19754 structure modes. Split into pieces after RA.
19755 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19756 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19758 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19759 SVE structure modes.
19760 (aarch64_classify_address): Likewise.
19761 (sizetochar): Move earlier in file.
19762 (aarch64_print_operand): Handle SVE register lists.
19763 (aarch64_array_mode): New function.
19764 (aarch64_sve_struct_memory_operand_p): Likewise.
19765 (TARGET_ARRAY_MODE): Redefine.
19767 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19768 Alan Hayward <alan.hayward@arm.com>
19769 David Sherwood <david.sherwood@arm.com>
19771 * target.def (array_mode): New target hook.
19772 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19773 * doc/tm.texi: Regenerate.
19774 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19775 * hooks.c (hook_optmode_mode_uhwi_none): New function.
19776 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19777 targetm.array_mode.
19778 * stor-layout.c (mode_for_array): Likewise. Support polynomial
19781 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19782 Alan Hayward <alan.hayward@arm.com>
19783 David Sherwood <david.sherwood@arm.com>
19785 * fold-const.c (fold_binary_loc): Check the argument types
19786 rather than the result type when testing for a vector operation.
19788 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19790 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19791 * doc/tm.texi: Regenerate.
19793 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19794 Alan Hayward <alan.hayward@arm.com>
19795 David Sherwood <david.sherwood@arm.com>
19797 * doc/invoke.texi (-msve-vector-bits=): Document new option.
19798 (sve): Document new AArch64 extension.
19799 * doc/md.texi (w): Extend the description of the AArch64
19800 constraint to include SVE vectors.
19801 (Upl, Upa): Document new AArch64 predicate constraints.
19802 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19804 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19805 (msve-vector-bits=): New option.
19806 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19807 SVE when these are disabled.
19808 (sve): New extension.
19809 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19810 modes. Adjust their number of units based on aarch64_sve_vg.
19811 (MAX_BITSIZE_MODE_ANY_MODE): Define.
19812 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19813 aarch64_addr_query_type.
19814 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19815 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19816 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19817 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19818 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19819 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19820 (aarch64_simd_imm_zero_p): Delete.
19821 (aarch64_check_zero_based_sve_index_immediate): Declare.
19822 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19823 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19824 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19825 (aarch64_sve_float_mul_immediate_p): Likewise.
19826 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19827 rather than an rtx.
19828 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19829 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19830 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19831 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19832 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19833 (aarch64_regmode_natural_size): Likewise.
19834 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19835 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19837 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19838 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19839 for VG and the SVE predicate registers.
19840 (V_ALIASES): Add a "z"-prefixed alias.
19841 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19842 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19843 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19844 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19845 (REG_CLASS_NAMES): Add entries for them.
19846 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
19847 and the predicate registers.
19848 (aarch64_sve_vg): Declare.
19849 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19850 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19851 (REGMODE_NATURAL_SIZE): Define.
19852 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19854 * config/aarch64/aarch64.c: Include cfgrtl.h.
19855 (simd_immediate_info): Add a constructor for series vectors,
19856 and an associated step field.
19857 (aarch64_sve_vg): New variable.
19858 (aarch64_dbx_register_number): Handle VG and the predicate registers.
19859 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19860 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19861 (VEC_ANY_DATA, VEC_STRUCT): New constants.
19862 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19863 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19864 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19865 (aarch64_get_mask_mode): New functions.
19866 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19867 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19868 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
19869 predicate modes and predicate registers. Explicitly restrict
19870 GPRs to modes of 16 bytes or smaller. Only allow FP registers
19871 to store a vector mode if it is recognized by
19872 aarch64_classify_vector_mode.
19873 (aarch64_regmode_natural_size): New function.
19874 (aarch64_hard_regno_caller_save_mode): Return the original mode
19876 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19877 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19878 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19879 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19881 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
19882 does not overlap dest if the function is frame-related. Handle
19884 (aarch64_split_add_offset): New function.
19885 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19886 them aarch64_add_offset.
19887 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19888 and update call to aarch64_sub_sp.
19889 (aarch64_add_cfa_expression): New function.
19890 (aarch64_expand_prologue): Pass extra temporary registers to the
19891 functions above. Handle the case in which we need to emit new
19892 DW_CFA_expressions for registers that were originally saved
19893 relative to the stack pointer, but now have to be expressed
19894 relative to the frame pointer.
19895 (aarch64_output_mi_thunk): Pass extra temporary registers to the
19897 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
19898 IP0 and IP1 values for SVE frames.
19899 (aarch64_expand_vec_series): New function.
19900 (aarch64_expand_sve_widened_duplicate): Likewise.
19901 (aarch64_expand_sve_const_vector): Likewise.
19902 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19903 Handle SVE constants. Use emit_move_insn to move a force_const_mem
19904 into the register, rather than emitting a SET directly.
19905 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19906 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19907 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19908 (offset_9bit_signed_scaled_p): New functions.
19909 (aarch64_replicate_bitmask_imm): New function.
19910 (aarch64_bitmask_imm): Use it.
19911 (aarch64_cannot_force_const_mem): Reject expressions involving
19912 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
19913 (aarch64_classify_index): Handle SVE indices, by requiring
19914 a plain register index with a scale that matches the element size.
19915 (aarch64_classify_address): Handle SVE addresses. Assert that
19916 the mode of the address is VOIDmode or an integer mode.
19917 Update call to aarch64_classify_symbol.
19918 (aarch64_classify_symbolic_expression): Update call to
19919 aarch64_classify_symbol.
19920 (aarch64_const_vec_all_in_range_p): New function.
19921 (aarch64_print_vector_float_operand): Likewise.
19922 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
19923 "vN" for FP registers with SVE modes. Handle (const ...) vectors
19924 and the FP immediates 1.0 and 0.5.
19925 (aarch64_print_address_internal): Handle SVE addresses.
19926 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19927 (aarch64_regno_regclass): Handle predicate registers.
19928 (aarch64_secondary_reload): Handle big-endian reloads of SVE
19930 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19931 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19932 (aarch64_convert_sve_vector_bits): New function.
19933 (aarch64_override_options): Use it to handle -msve-vector-bits=.
19934 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19935 rather than an rtx.
19936 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19937 Handle SVE vector and predicate modes. Accept VL-based constants
19938 that need only one temporary register, and VL offsets that require
19939 no temporary registers.
19940 (aarch64_conditional_register_usage): Mark the predicate registers
19941 as fixed if SVE isn't available.
19942 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19943 Return true for SVE vector and predicate modes.
19944 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19945 rather than an unsigned int. Handle SVE modes.
19946 (aarch64_preferred_simd_mode): Update call accordingly. Handle
19948 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19950 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19951 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19952 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19953 (aarch64_sve_float_mul_immediate_p): New functions.
19954 (aarch64_sve_valid_immediate): New function.
19955 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19956 Explicitly reject structure modes. Check for INDEX constants.
19957 Handle PTRUE and PFALSE constants.
19958 (aarch64_check_zero_based_sve_index_immediate): New function.
19959 (aarch64_simd_imm_zero_p): Delete.
19960 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19961 vector modes. Accept constants in the range of CNT[BHWD].
19962 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19963 ask for an Advanced SIMD mode.
19964 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19965 (aarch64_simd_vector_alignment): Handle SVE predicates.
19966 (aarch64_vectorize_preferred_vector_alignment): New function.
19967 (aarch64_simd_vector_alignment_reachable): Use it instead of
19969 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19970 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19972 (MAX_VECT_LEN): Delete.
19973 (expand_vec_perm_d): Add a vec_flags field.
19974 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19975 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19976 (aarch64_evpc_ext): Don't apply a big-endian lane correction
19978 (aarch64_evpc_rev): Rename to...
19979 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
19980 (aarch64_evpc_rev_global): New function.
19981 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19982 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19984 (aarch64_evpc_sve_tbl): New function.
19985 (aarch64_expand_vec_perm_const_1): Update after rename of
19986 aarch64_evpc_rev. Handle SVE permutes too, trying
19987 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19988 than aarch64_evpc_tbl.
19989 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19990 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19991 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19992 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19993 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19994 (aarch64_expand_sve_vcond): New functions.
19995 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19996 of aarch64_vector_mode_p.
19997 (aarch64_dwarf_poly_indeterminate_value): New function.
19998 (aarch64_compute_pressure_classes): Likewise.
19999 (aarch64_can_change_mode_class): Likewise.
20000 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20001 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20002 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20003 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20004 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20005 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20006 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20007 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20009 (Dn, Dl, Dr): Accept const as well as const_vector.
20010 (Dz): Likewise. Compare against CONST0_RTX.
20011 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20012 of "vector" where appropriate.
20013 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20014 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20015 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20016 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20017 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20018 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20019 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20020 (v_int_equiv): Extend to SVE modes.
20021 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20023 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20024 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20025 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20026 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20027 (SVE_COND_FP_CMP): New int iterators.
20028 (perm_hilo): Handle the new unpack unspecs.
20029 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20031 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20032 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20033 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20034 (aarch64_equality_operator, aarch64_constant_vector_operand)
20035 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20036 (aarch64_sve_nonimmediate_operand): Likewise.
20037 (aarch64_sve_general_operand): Likewise.
20038 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20039 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20040 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20041 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20042 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20043 (aarch64_sve_float_arith_immediate): Likewise.
20044 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20045 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20046 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20047 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20048 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20049 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20050 (aarch64_sve_float_arith_operand): Likewise.
20051 (aarch64_sve_float_arith_with_sub_operand): Likewise.
20052 (aarch64_sve_float_mul_operand): Likewise.
20053 (aarch64_sve_vec_perm_operand): Likewise.
20054 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20055 (aarch64_mov_operand): Accept const_poly_int and const_vector.
20056 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20057 as well as const_vector.
20058 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20059 in file. Use CONST0_RTX and CONSTM1_RTX.
20060 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
20061 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20062 Use aarch64_simd_imm_zero.
20063 * config/aarch64/aarch64-sve.md: New file.
20064 * config/aarch64/aarch64.md: Include it.
20065 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20066 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20067 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20068 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20069 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20070 (sve): New attribute.
20071 (enabled): Disable instructions with the sve attribute unless
20073 (movqi, movhi): Pass CONST_POLY_INT operaneds through
20074 aarch64_expand_mov_immediate.
20075 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20076 CNT[BHSD] immediates.
20077 (movti): Split CONST_POLY_INT moves into two halves.
20078 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20079 Split additions that need a temporary here if the destination
20080 is the stack pointer.
20081 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20082 (*add<mode>3_poly_1): New instruction.
20083 (set_clobber_cc): New expander.
20085 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20087 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20088 parameter and use it instead of GET_MODE_SIZE (innermode). Use
20089 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20090 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20091 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
20092 Change innermode from fixed_mode_size to machine_mode.
20093 (simplify_subreg): Update call accordingly. Handle a constant-sized
20094 subreg of a variable-length CONST_VECTOR.
20096 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20097 Alan Hayward <alan.hayward@arm.com>
20098 David Sherwood <david.sherwood@arm.com>
20100 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20101 (add_offset_to_base): New function, split out from...
20102 (create_mem_ref): ...here. When handling a scale other than 1,
20103 check first whether the address is valid without the offset.
20104 Add it into the base if so, leaving the index and scale as-is.
20106 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20109 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20110 fold_for_warn before checking if arg2 is INTEGER_CST.
20112 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
20114 * config/rs6000/predicates.md (load_multiple_operation): Delete.
20115 (store_multiple_operation): Delete.
20116 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20117 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20118 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20119 guarded by TARGET_STRING.
20120 (rs6000_output_load_multiple): Delete.
20121 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20122 OPTION_MASK_STRING / TARGET_STRING handling.
20123 (print_operand) <'N', 'O'>: Add comment that these are unused now.
20124 (const rs6000_opt_masks) <"string">: Change mask to 0.
20125 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20126 (MASK_STRING): Delete.
20127 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20129 (load_multiple): Delete.
20136 (store_multiple): Delete.
20143 (movmemsi_8reg): Delete.
20144 (corresponding unnamed define_insn): Delete.
20145 (movmemsi_6reg): Delete.
20146 (corresponding unnamed define_insn): Delete.
20147 (movmemsi_4reg): Delete.
20148 (corresponding unnamed define_insn): Delete.
20149 (movmemsi_2reg): Delete.
20150 (corresponding unnamed define_insn): Delete.
20151 (movmemsi_1reg): Delete.
20152 (corresponding unnamed define_insn): Delete.
20153 * config/rs6000/rs6000.opt (mno-string): New.
20154 (mstring): Replace by deprecation warning stub.
20155 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20157 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20159 * regrename.c (regrename_do_replace): If replacing the same
20160 reg multiple times, try to reuse last created gen_raw_REG.
20163 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20164 main to workaround a bug in GDB.
20166 2018-01-12 Tom de Vries <tom@codesourcery.com>
20169 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20171 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
20173 PR rtl-optimization/80481
20174 * ira-color.c (get_cap_member): New function.
20175 (allocnos_conflict_by_live_ranges_p): Use it.
20176 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20177 (setup_slot_coalesced_allocno_live_ranges): Ditto.
20179 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
20182 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20183 (*saddl_se_1): Ditto.
20184 (*ssubsi_1): Ditto.
20185 (*ssubl_se_1): Ditto.
20187 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20189 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20190 rather than wi::to_widest for DR_INITs.
20191 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20192 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20193 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20195 (vect_analyze_group_access_1): Note that here.
20197 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20199 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20200 polynomial type sizes.
20202 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20204 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20205 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20206 (gimple_add_tmp_var): Likewise.
20208 2018-01-12 Martin Liska <mliska@suse.cz>
20210 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20211 (gimple_alloc_sizes): Likewise.
20212 (dump_gimple_statistics): Use PRIu64 in printf format.
20213 * gimple.h: Change uint64_t to int.
20215 2018-01-12 Martin Liska <mliska@suse.cz>
20217 * tree-core.h: Use uint64_t instead of int.
20218 * tree.c (tree_node_counts): Likewise.
20219 (tree_node_sizes): Likewise.
20220 (dump_tree_statistics): Use PRIu64 in printf format.
20222 2018-01-12 Martin Liska <mliska@suse.cz>
20224 * Makefile.in: As qsort_chk is implemented in vec.c, add
20225 vec.o to linkage of gencfn-macros.
20226 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20227 passing the info to record_node_allocation_statistics.
20228 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20230 * ggc-common.c (struct ggc_usage): Add operator== and use
20231 it in operator< and compare function.
20232 * mem-stats.h (struct mem_usage): Likewise.
20233 * vec.c (struct vec_usage): Remove operator< and compare
20234 function. Can be simply inherited.
20236 2018-01-12 Martin Jambor <mjambor@suse.cz>
20239 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20240 * tree-ssa-math-opts.c: Include domwalk.h.
20241 (convert_mult_to_fma_1): New function.
20242 (fma_transformation_info): New type.
20243 (fma_deferring_state): Likewise.
20244 (cancel_fma_deferring): New function.
20245 (result_of_phi): Likewise.
20246 (last_fma_candidate_feeds_initial_phi): Likewise.
20247 (convert_mult_to_fma): Added deferring logic, split actual
20248 transformation to convert_mult_to_fma_1.
20249 (math_opts_dom_walker): New type.
20250 (math_opts_dom_walker::after_dom_children): New method, body moved
20251 here from pass_optimize_widening_mul::execute, added deferring logic
20253 (pass_optimize_widening_mul::execute): Moved most of code to
20254 math_opts_dom_walker::after_dom_children.
20255 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20256 * config/i386/i386.c (ix86_option_override_internal): Added
20257 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20259 2018-01-12 Richard Biener <rguenther@suse.de>
20262 * dwarf2out.c (gen_variable_die): Do not reset old_die for
20263 inline instance vars.
20265 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
20268 * config/rx/rx.c (rx_is_restricted_memory_address):
20269 Handle SUBREG case.
20271 2018-01-12 Richard Biener <rguenther@suse.de>
20273 PR tree-optimization/80846
20274 * target.def (split_reduction): New target hook.
20275 * targhooks.c (default_split_reduction): New function.
20276 * targhooks.h (default_split_reduction): Declare.
20277 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20278 target requests first reduce vectors by combining low and high
20280 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20281 (get_vectype_for_scalar_type_and_size): Export.
20282 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20283 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20284 * doc/tm.texi: Regenerate.
20285 * config/i386/i386.c (ix86_split_reduction): Implement
20286 TARGET_VECTORIZE_SPLIT_REDUCTION.
20288 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20291 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20292 in PIC mode except for TARGET_VXWORKS_RTP.
20293 * config/sparc/sparc.c: Include cfgrtl.h.
20294 (TARGET_INIT_PIC_REG): Define.
20295 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20296 (sparc_pic_register_p): New predicate.
20297 (sparc_legitimate_address_p): Use it.
20298 (sparc_legitimize_pic_address): Likewise.
20299 (sparc_delegitimize_address): Likewise.
20300 (sparc_mode_dependent_address_p): Likewise.
20301 (gen_load_pcrel_sym): Remove 4th parameter.
20302 (load_got_register): Adjust call to above. Remove obsolete stuff.
20303 (sparc_expand_prologue): Do not call load_got_register here.
20304 (sparc_flat_expand_prologue): Likewise.
20305 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20306 (sparc_use_pseudo_pic_reg): New function.
20307 (sparc_init_pic_reg): Likewise.
20308 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20309 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20311 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
20313 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20314 Add item for branch_cost.
20316 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20318 PR rtl-optimization/83565
20319 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20320 not extend the result to a larger mode for rotate operations.
20321 (num_sign_bit_copies1): Likewise.
20323 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20326 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20328 Use values-Xc.o for -pedantic.
20329 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20331 2018-01-12 Martin Liska <mliska@suse.cz>
20334 * ipa-devirt.c (final_warning_record::grow_type_warnings):
20336 (possible_polymorphic_call_targets): Use it.
20337 (ipa_devirt): Likewise.
20339 2018-01-12 Martin Liska <mliska@suse.cz>
20341 * profile-count.h (enum profile_quality): Use 0 as invalid
20342 enum value of profile_quality.
20344 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
20346 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20347 -mext-string options.
20349 2018-01-12 Richard Biener <rguenther@suse.de>
20351 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20352 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20353 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20355 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20357 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
20359 * configure.ac (--with-long-double-format): Add support for the
20360 configuration option to change the default long double format on
20362 * config.gcc (powerpc*-linux*-*): Likewise.
20363 * configure: Regenerate.
20364 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20365 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20366 used without modification.
20368 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20370 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20371 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20372 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20373 MISC_BUILTIN_SPEC_BARRIER.
20374 (rs6000_init_builtins): Likewise.
20375 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20377 (speculation_barrier): New define_insn.
20378 * doc/extend.texi: Document __builtin_speculation_barrier.
20380 2018-01-11 Jakub Jelinek <jakub@redhat.com>
20383 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20384 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20385 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20387 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
20388 integral modes instead of "ss" and "sd".
20389 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20390 vectors with 32-bit and 64-bit elements.
20391 (vecdupssescalarmodesuffix): New mode attribute.
20392 (vec_dup<mode>): Use it.
20394 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
20397 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20398 frame if argument is passed on stack.
20400 2018-01-11 Jakub Jelinek <jakub@redhat.com>
20403 * ree.c (combine_reaching_defs): Optimize also
20404 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20405 reg2=any_extend(exp); reg1=reg2;, formatting fix.
20407 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
20409 PR middle-end/83189
20410 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20412 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
20414 PR middle-end/83718
20415 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20416 after they are computed.
20418 2018-01-11 Bin Cheng <bin.cheng@arm.com>
20420 PR tree-optimization/83695
20421 * gimple-loop-linterchange.cc
20422 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20423 reset cached scev information after interchange.
20424 (pass_linterchange::execute): Remove call to scev_reset_htab.
20426 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20428 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20429 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20430 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20431 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20432 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20433 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20434 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20435 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20436 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20437 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20438 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20439 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20440 (V_lane_reg): Likewise.
20441 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20443 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20444 (vfmal_lane_low<mode>_intrinsic,
20445 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20446 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20447 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20448 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20449 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20450 vfmsl_lane_high<mode>_intrinsic): New define_insns.
20452 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20454 * config/arm/arm-cpus.in (fp16fml): New feature.
20455 (ALL_SIMD): Add fp16fml.
20456 (armv8.2-a): Add fp16fml as an option.
20457 (armv8.3-a): Likewise.
20458 (armv8.4-a): Add fp16fml as part of fp16.
20459 * config/arm/arm.h (TARGET_FP16FML): Define.
20460 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20462 * config/arm/arm-modes.def (V2HF): Define.
20463 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20464 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20465 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20466 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20467 vfmsl_low, vfmsl_high): New set of builtins.
20468 * config/arm/iterators.md (PLUSMINUS): New code iterator.
20469 (vfml_op): New code attribute.
20470 (VFMLHALVES): New int iterator.
20471 (VFML, VFMLSEL): New mode attributes.
20472 (V_reg): Define mapping for V2HF.
20473 (V_hi, V_lo): New mode attributes.
20474 (VF_constraint): Likewise.
20475 (vfml_half, vfml_half_selector): New int attributes.
20476 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20478 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20479 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20481 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20482 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20483 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20484 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
20486 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20487 Document new effective target and option set.
20489 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20491 * config/arm/arm-cpus.in (armv8_4): New feature.
20492 (ARMv8_4a): New fgroup.
20493 (armv8.4-a): New arch.
20494 * config/arm/arm-tables.opt: Regenerate.
20495 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20496 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20497 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20498 Add matching rules for -march=armv8.4-a and extensions.
20499 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20501 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
20504 * config/rx/rx.md (BW): New mode attribute.
20505 (sync_lock_test_and_setsi): Add mode suffix to insn output.
20507 2018-01-11 Richard Biener <rguenther@suse.de>
20509 PR tree-optimization/83435
20510 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20511 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20512 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20514 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20515 Alan Hayward <alan.hayward@arm.com>
20516 David Sherwood <david.sherwood@arm.com>
20518 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20520 (aarch64_classify_address): Initialize it. Track polynomial offsets.
20521 (aarch64_print_address_internal): Use it to check for a zero offset.
20523 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20524 Alan Hayward <alan.hayward@arm.com>
20525 David Sherwood <david.sherwood@arm.com>
20527 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20528 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20529 Return a poly_int64 rather than a HOST_WIDE_INT.
20530 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20531 rather than a HOST_WIDE_INT.
20532 * config/aarch64/aarch64.h (aarch64_frame): Protect with
20533 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
20534 hard_fp_offset, frame_size, initial_adjust, callee_offset and
20535 final_offset from HOST_WIDE_INT to poly_int64.
20536 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20537 to_constant when getting the number of units in an Advanced SIMD
20539 (aarch64_builtin_vectorized_function): Check for a constant number
20541 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20543 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20544 attribute instead of GET_MODE_NUNITS.
20545 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20546 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20547 GET_MODE_SIZE for fixed-size registers.
20548 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20549 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20550 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20551 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20552 (aarch64_print_operand, aarch64_print_address_internal)
20553 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20554 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20555 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20556 Handle polynomial GET_MODE_SIZE.
20557 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
20558 wider than SImode without modification.
20559 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20560 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20561 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20562 passing and returning SVE modes.
20563 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20564 rather than GEN_INT.
20565 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20566 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20567 (aarch64_allocate_and_probe_stack_space): Likewise.
20568 (aarch64_layout_frame): Cope with polynomial offsets.
20569 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20570 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
20571 polynomial offsets.
20572 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20573 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20574 poly_int64 rather than a HOST_WIDE_INT.
20575 (aarch64_get_separate_components, aarch64_process_components)
20576 (aarch64_expand_prologue, aarch64_expand_epilogue)
20577 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20578 (aarch64_anchor_offset): New function, split out from...
20579 (aarch64_legitimize_address): ...here.
20580 (aarch64_builtin_vectorization_cost): Handle polynomial
20581 TYPE_VECTOR_SUBPARTS.
20582 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20584 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20585 number of elements from the PARALLEL rather than the mode.
20586 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20587 rather than GET_MODE_BITSIZE.
20588 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20589 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20590 (aarch64_expand_vec_perm_const_1): Handle polynomial
20591 d->perm.length () and d->perm elements.
20592 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
20593 Apply to_constant to d->perm elements.
20594 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20595 polynomial CONST_VECTOR_NUNITS.
20596 (aarch64_move_pointer): Take amount as a poly_int64 rather
20598 (aarch64_progress_pointer): Avoid temporary variable.
20599 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20600 the mode attribute instead of GET_MODE.
20602 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20603 Alan Hayward <alan.hayward@arm.com>
20604 David Sherwood <david.sherwood@arm.com>
20606 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20607 x exists before using it.
20608 (aarch64_add_constant_internal): Rename to...
20609 (aarch64_add_offset_1): ...this. Replace regnum with separate
20610 src and dest rtxes. Handle the case in which they're different,
20611 including when the offset is zero. Replace scratchreg with an rtx.
20612 Use 2 additions if there is no spare register into which we can
20613 move a 16-bit constant.
20614 (aarch64_add_constant): Delete.
20615 (aarch64_add_offset): Replace reg with separate src and dest
20616 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
20617 Use aarch64_add_offset_1.
20618 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20619 an rtx rather than an int. Take the delta as a poly_int64
20620 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
20621 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20622 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20623 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20624 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20625 and aarch64_add_sp.
20626 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20627 aarch64_add_constant.
20629 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20631 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20632 Use scalar_float_mode.
20634 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20636 * config/aarch64/aarch64-simd.md
20637 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20638 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20639 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20640 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20641 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20642 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20643 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20644 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20645 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20646 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20648 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20651 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20652 targ_options->x_arm_arch_string is non NULL.
20654 2018-01-11 Tamar Christina <tamar.christina@arm.com>
20656 * config/aarch64/aarch64.h
20657 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
20659 2018-01-11 Sudakshina Das <sudi.das@arm.com>
20662 * expmed.c (emit_store_flag_force): Swap if const op0
20663 and change VOIDmode to mode of op0.
20665 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
20667 PR rtl-optimization/83761
20668 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20669 than bytes to mode_for_size.
20671 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20673 PR middle-end/83189
20674 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20675 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20678 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20680 PR middle-end/83575
20681 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20682 when in layout mode.
20683 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20684 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20687 2018-01-10 Michael Collison <michael.collison@arm.com>
20689 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20690 * config/aarch64/aarch64-option-extension.def: Add
20691 AARCH64_OPT_EXTENSION of 'fp16fml'.
20692 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20693 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20694 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20695 * config/aarch64/constraints.md (Ui7): New constraint.
20696 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20697 (VFMLA_SEL_W): Ditto.
20700 (VFMLA16_LOW): New int iterator.
20701 (VFMLA16_HIGH): Ditto.
20702 (UNSPEC_FMLAL): New unspec.
20703 (UNSPEC_FMLSL): Ditto.
20704 (UNSPEC_FMLAL2): Ditto.
20705 (UNSPEC_FMLSL2): Ditto.
20706 (f16mac): New code attribute.
20707 * config/aarch64/aarch64-simd-builtins.def
20708 (aarch64_fmlal_lowv2sf): Ditto.
20709 (aarch64_fmlsl_lowv2sf): Ditto.
20710 (aarch64_fmlalq_lowv4sf): Ditto.
20711 (aarch64_fmlslq_lowv4sf): Ditto.
20712 (aarch64_fmlal_highv2sf): Ditto.
20713 (aarch64_fmlsl_highv2sf): Ditto.
20714 (aarch64_fmlalq_highv4sf): Ditto.
20715 (aarch64_fmlslq_highv4sf): Ditto.
20716 (aarch64_fmlal_lane_lowv2sf): Ditto.
20717 (aarch64_fmlsl_lane_lowv2sf): Ditto.
20718 (aarch64_fmlal_laneq_lowv2sf): Ditto.
20719 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20720 (aarch64_fmlalq_lane_lowv4sf): Ditto.
20721 (aarch64_fmlsl_lane_lowv4sf): Ditto.
20722 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20723 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20724 (aarch64_fmlal_lane_highv2sf): Ditto.
20725 (aarch64_fmlsl_lane_highv2sf): Ditto.
20726 (aarch64_fmlal_laneq_highv2sf): Ditto.
20727 (aarch64_fmlsl_laneq_highv2sf): Ditto.
20728 (aarch64_fmlalq_lane_highv4sf): Ditto.
20729 (aarch64_fmlsl_lane_highv4sf): Ditto.
20730 (aarch64_fmlalq_laneq_highv4sf): Ditto.
20731 (aarch64_fmlsl_laneq_highv4sf): Ditto.
20732 * config/aarch64/aarch64-simd.md:
20733 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20734 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20735 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20736 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20737 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20738 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20739 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20740 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20741 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20742 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20743 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20744 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20745 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20746 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20747 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20748 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20749 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20750 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20751 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20752 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20753 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20754 (vfmlsl_low_u32): Ditto.
20755 (vfmlalq_low_u32): Ditto.
20756 (vfmlslq_low_u32): Ditto.
20757 (vfmlal_high_u32): Ditto.
20758 (vfmlsl_high_u32): Ditto.
20759 (vfmlalq_high_u32): Ditto.
20760 (vfmlslq_high_u32): Ditto.
20761 (vfmlal_lane_low_u32): Ditto.
20762 (vfmlsl_lane_low_u32): Ditto.
20763 (vfmlal_laneq_low_u32): Ditto.
20764 (vfmlsl_laneq_low_u32): Ditto.
20765 (vfmlalq_lane_low_u32): Ditto.
20766 (vfmlslq_lane_low_u32): Ditto.
20767 (vfmlalq_laneq_low_u32): Ditto.
20768 (vfmlslq_laneq_low_u32): Ditto.
20769 (vfmlal_lane_high_u32): Ditto.
20770 (vfmlsl_lane_high_u32): Ditto.
20771 (vfmlal_laneq_high_u32): Ditto.
20772 (vfmlsl_laneq_high_u32): Ditto.
20773 (vfmlalq_lane_high_u32): Ditto.
20774 (vfmlslq_lane_high_u32): Ditto.
20775 (vfmlalq_laneq_high_u32): Ditto.
20776 (vfmlslq_laneq_high_u32): Ditto.
20777 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20778 (AARCH64_FL_FOR_ARCH8_4): New.
20779 (AARCH64_ISA_F16FML): New ISA flag.
20780 (TARGET_F16FML): New feature flag for fp16fml.
20781 (doc/invoke.texi): Document new fp16fml option.
20783 2018-01-10 Michael Collison <michael.collison@arm.com>
20785 * config/aarch64/aarch64-builtins.c:
20786 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20787 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20788 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20789 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20790 (AARCH64_ISA_SHA3): New ISA flag.
20791 (TARGET_SHA3): New feature flag for sha3.
20792 * config/aarch64/iterators.md (sha512_op): New int attribute.
20793 (CRYPTO_SHA512): New int iterator.
20794 (UNSPEC_SHA512H): New unspec.
20795 (UNSPEC_SHA512H2): Ditto.
20796 (UNSPEC_SHA512SU0): Ditto.
20797 (UNSPEC_SHA512SU1): Ditto.
20798 * config/aarch64/aarch64-simd-builtins.def
20799 (aarch64_crypto_sha512hqv2di): New builtin.
20800 (aarch64_crypto_sha512h2qv2di): Ditto.
20801 (aarch64_crypto_sha512su0qv2di): Ditto.
20802 (aarch64_crypto_sha512su1qv2di): Ditto.
20803 (aarch64_eor3qv8hi): Ditto.
20804 (aarch64_rax1qv2di): Ditto.
20805 (aarch64_xarqv2di): Ditto.
20806 (aarch64_bcaxqv8hi): Ditto.
20807 * config/aarch64/aarch64-simd.md:
20808 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20809 (aarch64_crypto_sha512su0qv2di): Ditto.
20810 (aarch64_crypto_sha512su1qv2di): Ditto.
20811 (aarch64_eor3qv8hi): Ditto.
20812 (aarch64_rax1qv2di): Ditto.
20813 (aarch64_xarqv2di): Ditto.
20814 (aarch64_bcaxqv8hi): Ditto.
20815 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20816 (vsha512h2q_u64): Ditto.
20817 (vsha512su0q_u64): Ditto.
20818 (vsha512su1q_u64): Ditto.
20819 (veor3q_u16): Ditto.
20820 (vrax1q_u64): Ditto.
20821 (vxarq_u64): Ditto.
20822 (vbcaxq_u16): Ditto.
20823 * config/arm/types.md (crypto_sha512): New type attribute.
20824 (crypto_sha3): Ditto.
20825 (doc/invoke.texi): Document new sha3 option.
20827 2018-01-10 Michael Collison <michael.collison@arm.com>
20829 * config/aarch64/aarch64-builtins.c:
20830 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20831 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20832 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20833 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20834 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20835 (AARCH64_ISA_SM4): New ISA flag.
20836 (TARGET_SM4): New feature flag for sm4.
20837 * config/aarch64/aarch64-simd-builtins.def
20838 (aarch64_sm3ss1qv4si): Ditto.
20839 (aarch64_sm3tt1aq4si): Ditto.
20840 (aarch64_sm3tt1bq4si): Ditto.
20841 (aarch64_sm3tt2aq4si): Ditto.
20842 (aarch64_sm3tt2bq4si): Ditto.
20843 (aarch64_sm3partw1qv4si): Ditto.
20844 (aarch64_sm3partw2qv4si): Ditto.
20845 (aarch64_sm4eqv4si): Ditto.
20846 (aarch64_sm4ekeyqv4si): Ditto.
20847 * config/aarch64/aarch64-simd.md:
20848 (aarch64_sm3ss1qv4si): Ditto.
20849 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20850 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20851 (aarch64_sm4eqv4si): Ditto.
20852 (aarch64_sm4ekeyqv4si): Ditto.
20853 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20854 (sm3part_op): Ditto.
20855 (CRYPTO_SM3TT): Ditto.
20856 (CRYPTO_SM3PART): Ditto.
20857 (UNSPEC_SM3SS1): New unspec.
20858 (UNSPEC_SM3TT1A): Ditto.
20859 (UNSPEC_SM3TT1B): Ditto.
20860 (UNSPEC_SM3TT2A): Ditto.
20861 (UNSPEC_SM3TT2B): Ditto.
20862 (UNSPEC_SM3PARTW1): Ditto.
20863 (UNSPEC_SM3PARTW2): Ditto.
20864 (UNSPEC_SM4E): Ditto.
20865 (UNSPEC_SM4EKEY): Ditto.
20866 * config/aarch64/constraints.md (Ui2): New constraint.
20867 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20868 * config/arm/types.md (crypto_sm3): New type attribute.
20869 (crypto_sm4): Ditto.
20870 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20871 (vsm3tt1aq_u32): Ditto.
20872 (vsm3tt1bq_u32): Ditto.
20873 (vsm3tt2aq_u32): Ditto.
20874 (vsm3tt2bq_u32): Ditto.
20875 (vsm3partw1q_u32): Ditto.
20876 (vsm3partw2q_u32): Ditto.
20877 (vsm4eq_u32): Ditto.
20878 (vsm4ekeyq_u32): Ditto.
20879 (doc/invoke.texi): Document new sm4 option.
20881 2018-01-10 Michael Collison <michael.collison@arm.com>
20883 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20884 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20885 (AARCH64_FL_FOR_ARCH8_4): New.
20886 (AARCH64_FL_V8_4): New flag.
20887 (doc/invoke.texi): Document new armv8.4-a option.
20889 2018-01-10 Michael Collison <michael.collison@arm.com>
20891 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20892 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20893 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20894 * config/aarch64/aarch64-option-extension.def: Add
20895 AARCH64_OPT_EXTENSION of 'sha2'.
20896 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20897 (crypto): Disable sha2 and aes if crypto disabled.
20898 (crypto): Enable aes and sha2 if enabled.
20899 (simd): Disable sha2 and aes if simd disabled.
20900 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20902 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20903 (TARGET_SHA2): New feature flag for sha2.
20904 (TARGET_AES): New feature flag for aes.
20905 * config/aarch64/aarch64-simd.md:
20906 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20907 conditional on TARGET_AES.
20908 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20909 (aarch64_crypto_sha1hsi): Make pattern conditional
20911 (aarch64_crypto_sha1hv4si): Ditto.
20912 (aarch64_be_crypto_sha1hv4si): Ditto.
20913 (aarch64_crypto_sha1su1v4si): Ditto.
20914 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20915 (aarch64_crypto_sha1su0v4si): Ditto.
20916 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20917 (aarch64_crypto_sha256su0v4si): Ditto.
20918 (aarch64_crypto_sha256su1v4si): Ditto.
20919 (doc/invoke.texi): Document new aes and sha2 options.
20921 2018-01-10 Martin Sebor <msebor@redhat.com>
20923 PR tree-optimization/83781
20924 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20927 2018-01-11 Martin Sebor <msebor@gmail.com>
20928 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20930 PR tree-optimization/83501
20931 PR tree-optimization/81703
20933 * tree-ssa-strlen.c (get_string_cst): Rename...
20934 (get_string_len): ...to this. Handle global constants.
20935 (handle_char_store): Adjust.
20937 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
20938 Jim Wilson <jimw@sifive.com>
20940 * config/riscv/riscv-protos.h (riscv_output_return): New.
20941 * config/riscv/riscv.c (struct machine_function): New naked_p field.
20942 (riscv_attribute_table, riscv_output_return),
20943 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20944 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20945 (riscv_compute_frame_info): Only compute frame->mask if not a naked
20947 (riscv_expand_prologue): Add early return for naked function.
20948 (riscv_expand_epilogue): Likewise.
20949 (riscv_function_ok_for_sibcall): Return false for naked function.
20950 (riscv_set_current_function): New.
20951 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20952 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20953 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20954 * doc/extend.texi (RISC-V Function Attributes): New.
20956 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20958 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20959 check for 128-bit long double before checking TCmode.
20960 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20961 128-bit long doubles before checking TFmode or TCmode.
20962 (FLOAT128_IBM_P): Likewise.
20964 2018-01-10 Martin Sebor <msebor@redhat.com>
20966 PR tree-optimization/83671
20967 * builtins.c (c_strlen): Unconditionally return zero for the empty
20969 Use -Warray-bounds for warnings.
20970 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20971 for non-constant array indices with COMPONENT_REF, arrays of
20972 arrays, and pointers to arrays.
20973 (gimple_fold_builtin_strlen): Determine and set length range for
20974 non-constant character arrays.
20976 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
20978 PR middle-end/81897
20979 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20982 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
20984 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20986 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20989 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20990 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20991 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20992 indexed_or_indirect_operand predicate.
20993 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20994 (*vsx_le_perm_load_v8hi): Likewise.
20995 (*vsx_le_perm_load_v16qi): Likewise.
20996 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20997 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20998 (*vsx_le_perm_store_v8hi): Likewise.
20999 (*vsx_le_perm_store_v16qi): Likewise.
21000 (eight unnamed splitters): Likewise.
21002 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21004 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21005 * config/rs6000/emmintrin.h: Likewise.
21006 * config/rs6000/mmintrin.h: Likewise.
21007 * config/rs6000/xmmintrin.h: Likewise.
21009 2018-01-10 David Malcolm <dmalcolm@redhat.com>
21012 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21014 * tree.c (tree_nop_conversion): Return true for location wrapper
21016 (maybe_wrap_with_location): New function.
21017 (selftest::check_strip_nops): New function.
21018 (selftest::test_location_wrappers): New function.
21019 (selftest::tree_c_tests): Call it.
21020 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21021 (maybe_wrap_with_location): New decl.
21022 (EXPR_LOCATION_WRAPPER_P): New macro.
21023 (location_wrapper_p): New inline function.
21024 (tree_strip_any_location_wrapper): New inline function.
21026 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
21029 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21030 stack_realign_offset for the largest alignment of stack slot
21032 (ix86_find_max_used_stack_alignment): New function.
21033 (ix86_finalize_stack_frame_flags): Use it. Set
21034 max_used_stack_alignment if we don't realign stack.
21035 * config/i386/i386.h (machine_function): Add
21036 max_used_stack_alignment.
21038 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
21040 * config/arm/arm.opt (-mbranch-cost): New option.
21041 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21044 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
21047 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21048 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21050 2018-01-10 Richard Biener <rguenther@suse.de>
21053 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21054 early out so it also covers the case where we have a non-NULL
21057 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21059 PR tree-optimization/83753
21060 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21061 for non-strided grouped accesses if the number of elements is 1.
21063 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21066 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21067 * i386.h (TARGET_USE_GATHER): Define.
21068 * x86-tune.def (X86_TUNE_USE_GATHER): New.
21070 2018-01-10 Martin Liska <mliska@suse.cz>
21073 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21074 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21076 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21077 CLEANUP_NO_PARTITIONING is not set.
21079 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21081 * doc/rtl.texi: Remove documentation of (const ...) wrappers
21082 for vectors, as a partial revert of r254296.
21083 * rtl.h (const_vec_p): Delete.
21084 (const_vec_duplicate_p): Don't test for vector CONSTs.
21085 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21086 * expmed.c (make_tree): Likewise.
21089 * common.md (E, F): Use CONSTANT_P instead of checking for
21091 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21092 checking for CONST_VECTOR.
21094 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21096 PR middle-end/83575
21097 * predict.c (force_edge_cold): Handle in more sane way edges
21098 with no prediction.
21100 2018-01-09 Carl Love <cel@us.ibm.com>
21102 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21104 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21105 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21106 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21107 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
21108 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21109 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
21110 * config/rs6000/rs6000-protos.h: Add extern defition for
21111 rs6000_generate_float2_double_code.
21112 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21114 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21115 (float2_v2df): Add define_expand.
21117 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
21120 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21121 op_mode in the force_to_mode call.
21123 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21125 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21126 instead of checking each element individually.
21127 (aarch64_evpc_uzp): Likewise.
21128 (aarch64_evpc_zip): Likewise.
21129 (aarch64_evpc_ext): Likewise.
21130 (aarch64_evpc_rev): Likewise.
21131 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21132 instead of checking each element individually. Return true without
21134 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21135 whether all selected elements come from the same input, instead of
21136 checking each element individually. Remove calls to gen_rtx_REG,
21137 start_sequence and end_sequence and instead assert that no rtl is
21140 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21142 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21143 order of HIGH and CONST checks.
21145 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21147 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21148 if the destination isn't an SSA_NAME.
21150 2018-01-09 Richard Biener <rguenther@suse.de>
21152 PR tree-optimization/83668
21153 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21155 (canonicalize_loop_form): ... here, renamed from ...
21156 (canonicalize_loop_closed_ssa_form): ... this and amended to
21157 swap successor edges for loop exit blocks to make us use
21158 the RPO order we need for initial schedule generation.
21160 2018-01-09 Joseph Myers <joseph@codesourcery.com>
21162 PR tree-optimization/64811
21163 * match.pd: When optimizing comparisons with Inf, avoid
21164 introducing or losing exceptions from comparisons with NaN.
21166 2018-01-09 Martin Liska <mliska@suse.cz>
21169 * asan.c (shadow_mem_size): Add gcc_assert.
21171 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
21173 Don't save registers in main().
21176 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21177 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21178 * config/avr/avr.c (avr_set_current_function): Don't error if
21179 naked, OS_task or OS_main are specified at the same time.
21180 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21182 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21184 * common/config/avr/avr-common.c (avr_option_optimization_table):
21185 Switch on -mmain-is-OS_task for optimizing compilations.
21187 2018-01-09 Richard Biener <rguenther@suse.de>
21189 PR tree-optimization/83572
21190 * graphite.c: Include cfganal.h.
21191 (graphite_transform_loops): Connect infinite loops to exit
21192 and remove fake edges at the end.
21194 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21196 * ipa-inline.c (edge_badness): Revert accidental checkin.
21198 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21201 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21202 symbols; not inline clones.
21204 2018-01-09 Jakub Jelinek <jakub@redhat.com>
21207 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21208 hard registers. Formatting fixes.
21210 PR preprocessor/83722
21211 * gcc.c (try_generate_repro): Pass
21212 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21213 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21216 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
21217 Kito Cheng <kito.cheng@gmail.com>
21219 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21220 (riscv_leaf_function_p): Delete.
21221 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21223 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21225 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21227 (do_ifelse): New function.
21228 (do_isel): New function.
21229 (do_sub3): New function.
21230 (do_add3): New function.
21231 (do_load_mask_compare): New function.
21232 (do_overlap_load_compare): New function.
21233 (expand_compare_loop): New function.
21234 (expand_block_compare): Call expand_compare_loop() when appropriate.
21235 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21236 option description.
21237 (-mblock-compare-inline-loop-limit): New option.
21239 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21242 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21243 Reverse order of second and third operands in first alternative.
21244 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21245 of first and second elements in UNSPEC_VPERMR vector.
21246 (altivec_expand_vec_perm_le): Likewise.
21248 2018-01-08 Jeff Law <law@redhat.com>
21250 PR rtl-optimizatin/81308
21251 * tree-switch-conversion.c (cfg_altered): New file scoped static.
21252 (process_switch): If group_case_labels makes a change, then set
21254 (pass_convert_switch::execute): If a switch is converted, then
21255 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
21257 PR rtl-optimization/81308
21258 * recog.c (split_all_insns): Conditionally cleanup the CFG after
21261 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
21263 PR target/83663 - Revert r255946
21264 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21265 generation for cases where splatting a value is not useful.
21266 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21267 across a vec_duplicate and a paradoxical subreg forming a vector
21268 mode to a vec_concat.
21270 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21272 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21273 -march=armv8.3-a variants.
21274 * config/arm/t-multilib: Likewise.
21275 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
21277 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21279 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21281 (cceq_ior_compare_complement): Give it a name so I can use it, and
21282 change boolean_or_operator predicate to boolean_operator so it can
21283 be used to generate a crand.
21284 (eqne): New code iterator.
21285 (bd/bd_neg): New code_attrs.
21286 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21287 a single define_insn.
21288 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21289 decrement (bdnzt/bdnzf/bdzt/bdzf).
21290 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21291 with the new names of the branch decrement patterns, and added the
21292 names of the branch decrement conditional patterns.
21294 2018-01-08 Richard Biener <rguenther@suse.de>
21296 PR tree-optimization/83563
21297 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21300 2018-01-08 Richard Biener <rguenther@suse.de>
21302 PR middle-end/83713
21303 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21305 2018-01-08 Richard Biener <rguenther@suse.de>
21307 PR tree-optimization/83685
21308 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21309 references to abnormals.
21311 2018-01-08 Richard Biener <rguenther@suse.de>
21314 * dwarf2out.c (output_indirect_strings): Handle empty
21315 skeleton_debug_str_hash.
21316 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21318 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
21320 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21321 (emit_store_direct): Likewise.
21322 (arc_trampoline_adjust_address): Likewise.
21323 (arc_asm_trampoline_template): New function.
21324 (arc_initialize_trampoline): Use asm_trampoline_template.
21325 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21326 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21327 * config/arc/arc.md (flush_icache): Delete pattern.
21329 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
21331 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21332 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21335 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
21338 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21339 by not USED_FOR_TARGET.
21340 (make_pass_resolve_sw_modes): Likewise.
21342 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
21344 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21347 2018-01-08 Richard Biener <rguenther@suse.de>
21349 PR middle-end/83580
21350 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21352 2018-01-08 Richard Biener <rguenther@suse.de>
21354 PR middle-end/83517
21355 * match.pd ((t * 2) / 2) -> t): Add missing :c.
21357 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
21359 PR middle-end/81897
21360 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21361 basic blocks with a small number of successors.
21362 (convert_control_dep_chain_into_preds): Improve handling of
21364 (dump_predicates): Split apart into...
21365 (dump_pred_chain): ...here...
21366 (dump_pred_info): ...and here.
21367 (can_one_predicate_be_invalidated_p): Add debugging printfs.
21368 (can_chain_union_be_invalidated_p): Improve check for invalidation
21370 (uninit_uses_cannot_happen): Avoid unnecessary if
21371 convert_control_dep_chain_into_preds yielded nothing.
21373 2018-01-06 Martin Sebor <msebor@redhat.com>
21375 PR tree-optimization/83640
21376 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21377 subtracting negative offset from size.
21378 (builtin_access::overlap): Adjust offset bounds of the access to fall
21379 within the size of the object if possible.
21381 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
21383 PR rtl-optimization/83699
21384 * expmed.c (extract_bit_field_1): Restrict the vector usage of
21385 extract_bit_field_as_subreg to cases in which the extracted
21386 value is also a vector.
21388 * lra-constraints.c (process_alt_operands): Test for the equivalence
21389 substitutions when detecting a possible reload cycle.
21391 2018-01-06 Jakub Jelinek <jakub@redhat.com>
21394 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21395 by default if flag_selective_schedling{,2}. Formatting fixes.
21397 PR rtl-optimization/83682
21398 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21399 if it has non-VECTOR_MODE element mode.
21400 (vec_duplicate_p): Likewise.
21402 PR middle-end/83694
21403 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21404 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21406 2018-01-05 Jakub Jelinek <jakub@redhat.com>
21409 * config/i386/i386-builtin.def
21410 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21411 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21412 Require also OPTION_MASK_ISA_AVX512F in addition to
21413 OPTION_MASK_ISA_GFNI.
21414 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21415 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21416 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21417 to OPTION_MASK_ISA_GFNI.
21418 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21419 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21420 OPTION_MASK_ISA_AVX512BW.
21421 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21422 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21423 addition to OPTION_MASK_ISA_GFNI.
21424 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21425 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21426 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21427 to OPTION_MASK_ISA_GFNI.
21428 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21429 a requirement for all ISAs rather than any of them with a few
21431 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21433 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21434 bitmasks to be enabled with 3 exceptions, instead of requiring any
21435 enabled ISA with lots of exceptions.
21436 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21437 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21438 Change avx512bw in isa attribute to avx512f.
21439 * config/i386/sgxintrin.h: Add license boilerplate.
21440 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
21441 to __AVX512F__ and __AVX512VL to __AVX512VL__.
21442 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21443 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21445 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21446 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21447 temporarily sse2 rather than sse if not enabled already.
21450 * config/i386/sse.md (VI248_VLBW): Rename to ...
21451 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
21452 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21453 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21454 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21455 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21456 mode iterator instead of VI248_VLBW.
21458 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
21460 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21461 (record_modified): Skip clobbers; add debug output.
21462 (param_change_prob): Use sreal frequencies.
21464 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
21466 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21467 punt for user-aligned variables.
21469 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
21471 * tree-chrec.c (chrec_contains_symbols): Return true for
21474 2018-01-05 Sudakshina Das <sudi.das@arm.com>
21477 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21478 of (x|y) == x for BICS pattern.
21480 2018-01-05 Jakub Jelinek <jakub@redhat.com>
21482 PR tree-optimization/83605
21483 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21484 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21487 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
21489 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21490 * config/epiphany/rtems.h: New file.
21492 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21493 Uros Bizjak <ubizjak@gmail.com>
21496 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21497 QIreg_operand instead of register_operand predicate.
21498 * config/i386/i386.c (ix86_rop_should_change_byte_p,
21499 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21500 comments instead of -fmitigate[-_]rop.
21502 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21505 * cgraphunit.c (symbol_table::compile): Switch to text_section
21506 before calling assembly_start debug hook.
21507 * run-rtl-passes.c (run_rtl_passes): Likewise.
21510 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21512 * tree-vrp.c (extract_range_from_binary_expr_1): Check
21513 range_int_cst_p rather than !symbolic_range_p before calling
21514 extract_range_from_multiplicative_op_1.
21516 2018-01-04 Jeff Law <law@redhat.com>
21518 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21519 redundant test in assertion.
21521 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21523 * doc/rtl.texi: Document machine_mode wrapper classes.
21525 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21527 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21528 using tree_to_uhwi.
21530 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21532 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21533 the VEC_PERM_EXPR fold to fail.
21535 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21538 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21539 to switched_sections.
21541 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21544 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21545 test for d.testing.
21547 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
21550 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21551 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21553 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21556 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21557 is BLKmode and bitpos not zero or mode change is needed.
21559 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
21562 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21565 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
21568 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21569 instead of MULT rtx. Update all corresponding splitters.
21570 (*saddl_se): Ditto.
21571 (*ssub<modesuffix>): Ditto.
21572 (*ssubl_se): Ditto.
21573 (*cmp_sadd_di): Update split patterns.
21574 (*cmp_sadd_si): Ditto.
21575 (*cmp_sadd_sidi): Ditto.
21576 (*cmp_ssub_di): Ditto.
21577 (*cmp_ssub_si): Ditto.
21578 (*cmp_ssub_sidi): Ditto.
21579 * config/alpha/predicates.md (const23_operand): New predicate.
21580 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21581 Look for ASHIFT, not MULT inner operand.
21582 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21584 2018-01-04 Martin Liska <mliska@suse.cz>
21586 PR gcov-profile/83669
21587 * gcov.c (output_intermediate_file): Add version to intermediate
21589 * doc/gcov.texi: Document new field 'version' in intermediate
21590 file format. Fix location of '-k' option of gcov command.
21592 2018-01-04 Martin Liska <mliska@suse.cz>
21595 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21597 2018-01-04 Jakub Jelinek <jakub@redhat.com>
21599 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21601 2018-01-03 Martin Sebor <msebor@redhat.com>
21603 PR tree-optimization/83655
21604 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21605 checking calls with invalid arguments.
21607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21609 * tree-vect-stmts.c (vect_get_store_rhs): New function.
21610 (vectorizable_mask_load_store): Delete.
21611 (vectorizable_call): Return false for masked loads and stores.
21612 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
21613 instead of gimple_assign_rhs1.
21614 (vectorizable_load): Handle IFN_MASK_LOAD.
21615 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21617 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21619 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21621 (vectorizable_mask_load_store): ...here.
21622 (vectorizable_load): ...and here.
21624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21626 * tree-vect-stmts.c (vect_build_all_ones_mask)
21627 (vect_build_zero_merge_argument): New functions, split out from...
21628 (vectorizable_load): ...here.
21630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21632 * tree-vect-stmts.c (vect_check_store_rhs): New function,
21634 (vectorizable_mask_load_store): ...here.
21635 (vectorizable_store): ...and here.
21637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21639 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21641 (vectorizable_mask_load_store): ...here.
21643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21645 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21646 (vect_model_store_cost): Take a vec_load_store_type instead of a
21648 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21649 (vect_model_store_cost): Take a vec_load_store_type instead of a
21651 (vectorizable_mask_load_store): Update accordingly.
21652 (vectorizable_store): Likewise.
21653 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21657 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21658 IFN_MASK_LOAD calls here rather than...
21659 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21661 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21662 Alan Hayward <alan.hayward@arm.com>
21663 David Sherwood <david.sherwood@arm.com>
21665 * expmed.c (extract_bit_field_1): For vector extracts,
21666 fall back to extract_bit_field_as_subreg if vec_extract
21669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21670 Alan Hayward <alan.hayward@arm.com>
21671 David Sherwood <david.sherwood@arm.com>
21673 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21674 they are variable or constant sized.
21675 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21676 slots for constant-sized data.
21678 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21679 Alan Hayward <alan.hayward@arm.com>
21680 David Sherwood <david.sherwood@arm.com>
21682 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21683 handling COND_EXPRs with boolean comparisons, try to find a better
21684 basis for the mask type than the boolean itself.
21686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21688 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21689 is calculated and how it can be overridden.
21690 * genmodes.c (max_bitsize_mode_any_mode): New variable.
21691 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21693 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21697 Alan Hayward <alan.hayward@arm.com>
21698 David Sherwood <david.sherwood@arm.com>
21700 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21701 Remove the mode argument.
21702 (aarch64_simd_valid_immediate): Remove the mode and inverse
21704 * config/aarch64/iterators.md (bitsize): New iterator.
21705 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21706 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21707 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21708 aarch64_simd_valid_immediate.
21709 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21710 (aarch64_reg_or_bic_imm): Likewise.
21711 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21712 with an insn_type enum and msl with a modifier_type enum.
21713 Replace element_width with a scalar_mode. Change the shift
21714 to unsigned int. Add constructors for scalar_float_mode and
21715 scalar_int_mode elements.
21716 (aarch64_vect_float_const_representable_p): Delete.
21717 (aarch64_can_const_movi_rtx_p)
21718 (aarch64_simd_scalar_immediate_valid_for_move)
21719 (aarch64_simd_make_constant): Update call to
21720 aarch64_simd_valid_immediate.
21721 (aarch64_advsimd_valid_immediate_hs): New function.
21722 (aarch64_advsimd_valid_immediate): Likewise.
21723 (aarch64_simd_valid_immediate): Remove mode and inverse
21724 arguments. Rewrite to use the above. Use const_vec_duplicate_p
21725 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21726 and aarch64_float_const_representable_p on the result.
21727 (aarch64_output_simd_mov_immediate): Remove mode argument.
21728 Update call to aarch64_simd_valid_immediate and use of
21729 simd_immediate_info.
21730 (aarch64_output_scalar_simd_mov_immediate): Update call
21733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21734 Alan Hayward <alan.hayward@arm.com>
21735 David Sherwood <david.sherwood@arm.com>
21737 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21738 (mode_nunits): Likewise CONST_MODE_NUNITS.
21739 * machmode.def (ADJUST_NUNITS): Document.
21740 * genmodes.c (mode_data::need_nunits_adj): New field.
21741 (blank_mode): Update accordingly.
21742 (adj_nunits): New variable.
21743 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21745 (emit_mode_size_inline): Set need_bytesize_adj for all modes
21746 listed in adj_nunits.
21747 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21748 listed in adj_nunits. Don't emit case statements for such modes.
21749 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21750 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
21751 nothing if adj_nunits is nonnull.
21752 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21753 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21754 (emit_mode_fbit): Update use of print_maybe_const_decl.
21755 (emit_move_size): Likewise. Treat the array as non-const
21757 (emit_mode_adjustments): Handle adj_nunits.
21759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21761 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21762 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21763 (VECTOR_MODES): Use it.
21764 (make_vector_modes): Take the prefix as an argument.
21766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21767 Alan Hayward <alan.hayward@arm.com>
21768 David Sherwood <david.sherwood@arm.com>
21770 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21771 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21772 for MODE_VECTOR_BOOL.
21773 * machmode.def (VECTOR_BOOL_MODE): Document.
21774 * genmodes.c (VECTOR_BOOL_MODE): New macro.
21775 (make_vector_bool_mode): New function.
21776 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21778 * lto-streamer-in.c (lto_input_mode_table): Likewise.
21779 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21781 * stor-layout.c (int_mode_for_mode): Likewise.
21782 * tree.c (build_vector_type_for_mode): Likewise.
21783 * varasm.c (output_constant_pool_2): Likewise.
21784 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21785 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
21786 for MODE_VECTOR_BOOL.
21787 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21788 of mode class checks.
21789 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21790 instead of a list of mode class checks.
21791 (expand_vector_scalar_condition): Likewise.
21792 (type_for_widest_vector_mode): Handle BImode as an inner mode.
21794 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21795 Alan Hayward <alan.hayward@arm.com>
21796 David Sherwood <david.sherwood@arm.com>
21798 * machmode.h (mode_size): Change from unsigned short to
21800 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21801 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21802 or if measurement_type is not polynomial.
21803 (fixed_size_mode::includes_p): Check for constant-sized modes.
21804 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21805 return a poly_uint16 rather than an unsigned short.
21806 (emit_mode_size): Change the type of mode_size from unsigned short
21807 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
21808 (emit_mode_adjustments): Cope with polynomial vector sizes.
21809 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21811 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21813 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21814 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21815 * caller-save.c (setup_save_areas): Likewise.
21816 (replace_reg_with_saved_mem): Likewise.
21817 * calls.c (emit_library_call_value_1): Likewise.
21818 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21819 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21820 (gen_lowpart_for_combine): Likewise.
21821 * convert.c (convert_to_integer_1): Likewise.
21822 * cse.c (equiv_constant, cse_insn): Likewise.
21823 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21824 (cselib_subst_to_values): Likewise.
21825 * dce.c (word_dce_process_block): Likewise.
21826 * df-problems.c (df_word_lr_mark_ref): Likewise.
21827 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21828 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21829 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21830 (rtl_for_decl_location): Likewise.
21831 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21832 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21833 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21834 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21835 (expand_expr_real_1): Likewise.
21836 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21837 (pad_below): Likewise.
21838 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21839 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21840 * ira.c (get_subreg_tracking_sizes): Likewise.
21841 * ira-build.c (ira_create_allocno_objects): Likewise.
21842 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21843 (ira_sort_regnos_for_alter_reg): Likewise.
21844 * ira-costs.c (record_operand_costs): Likewise.
21845 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21846 (resolve_simple_move): Likewise.
21847 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21848 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21849 (lra_constraints): Likewise.
21850 (CONST_POOL_OK_P): Reject variable-sized modes.
21851 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21852 (add_pseudo_to_slot, lra_spill): Likewise.
21853 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21854 * optabs-query.c (get_best_extraction_insn): Likewise.
21855 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21856 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21857 (expand_mult_highpart, valid_multiword_target_p): Likewise.
21858 * recog.c (offsettable_address_addr_space_p): Likewise.
21859 * regcprop.c (maybe_mode_change): Likewise.
21860 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21861 * regrename.c (build_def_use): Likewise.
21862 * regstat.c (dump_reg_info): Likewise.
21863 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21864 (find_reloads, find_reloads_subreg_address): Likewise.
21865 * reload1.c (eliminate_regs_1): Likewise.
21866 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21867 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21868 (simplify_binary_operation_1, simplify_subreg): Likewise.
21869 * targhooks.c (default_function_arg_padding): Likewise.
21870 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21871 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21872 (verify_gimple_assign_ternary): Likewise.
21873 * tree-inline.c (estimate_move_cost): Likewise.
21874 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21875 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21876 (get_address_cost_ainc): Likewise.
21877 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21878 (vect_supportable_dr_alignment): Likewise.
21879 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21880 (vectorizable_reduction): Likewise.
21881 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21882 (vectorizable_operation, vectorizable_load): Likewise.
21883 * tree.c (build_same_sized_truth_vector_type): Likewise.
21884 * valtrack.c (cleanup_auto_inc_dec): Likewise.
21885 * var-tracking.c (emit_note_insn_var_location): Likewise.
21886 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21887 (ADDR_VEC_ALIGN): Likewise.
21889 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21890 Alan Hayward <alan.hayward@arm.com>
21891 David Sherwood <david.sherwood@arm.com>
21893 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21895 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21896 or if measurement_type is polynomial.
21897 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21898 * combine.c (make_extraction): Likewise.
21899 * dse.c (find_shift_sequence): Likewise.
21900 * dwarf2out.c (mem_loc_descriptor): Likewise.
21901 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21902 (extract_bit_field, extract_low_bits): Likewise.
21903 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21904 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21905 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21906 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21907 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21908 * reload.c (find_reloads): Likewise.
21909 * reload1.c (alter_reg): Likewise.
21910 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21911 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21912 * tree-if-conv.c (predicate_mem_writes): Likewise.
21913 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21914 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21915 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21916 * valtrack.c (dead_debug_insert_temp): Likewise.
21917 * varasm.c (mergeable_constant_section): Likewise.
21918 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21920 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21921 Alan Hayward <alan.hayward@arm.com>
21922 David Sherwood <david.sherwood@arm.com>
21924 * expr.c (expand_assignment): Cope with polynomial mode sizes
21925 when assigning to a CONCAT.
21927 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21928 Alan Hayward <alan.hayward@arm.com>
21929 David Sherwood <david.sherwood@arm.com>
21931 * machmode.h (mode_precision): Change from unsigned short to
21933 (mode_to_precision): Return a poly_uint16 rather than an unsigned
21935 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21936 or if measurement_type is not polynomial.
21937 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
21938 in which the mode is already known to be a scalar_int_mode.
21939 * genmodes.c (emit_mode_precision): Change the type of mode_precision
21940 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
21942 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21943 for GET_MODE_PRECISION.
21944 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21945 for GET_MODE_PRECISION.
21946 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21948 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21949 (expand_field_assignment, make_extraction): Likewise.
21950 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21951 (get_last_value): Likewise.
21952 * convert.c (convert_to_integer_1): Likewise.
21953 * cse.c (cse_insn): Likewise.
21954 * expr.c (expand_expr_real_1): Likewise.
21955 * lra-constraints.c (simplify_operand_subreg): Likewise.
21956 * optabs-query.c (can_atomic_load_p): Likewise.
21957 * optabs.c (expand_atomic_load): Likewise.
21958 (expand_atomic_store): Likewise.
21959 * ree.c (combine_reaching_defs): Likewise.
21960 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21961 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21962 * tree.h (type_has_mode_precision_p): Likewise.
21963 * ubsan.c (instrument_si_overflow): Likewise.
21965 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21966 Alan Hayward <alan.hayward@arm.com>
21967 David Sherwood <david.sherwood@arm.com>
21969 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21970 polynomial numbers of units.
21971 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21972 (valid_vector_subparts_p): New function.
21973 (build_vector_type): Remove temporary shim and take the number
21974 of units as a poly_uint64 rather than an int.
21975 (build_opaque_vector_type): Take the number of units as a
21976 poly_uint64 rather than an int.
21977 * tree.c (build_vector_from_ctor): Handle polynomial
21978 TYPE_VECTOR_SUBPARTS.
21979 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21980 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21981 (build_vector_from_val): If the number of units is variable,
21982 use build_vec_duplicate_cst for constant operands and
21983 VEC_DUPLICATE_EXPR otherwise.
21984 (make_vector_type): Remove temporary is_constant ().
21985 (build_vector_type, build_opaque_vector_type): Take the number of
21986 units as a poly_uint64 rather than an int.
21987 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21989 * cfgexpand.c (expand_debug_expr): Likewise.
21990 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21991 (store_constructor, expand_expr_real_1): Likewise.
21992 (const_scalar_mask_from_tree): Likewise.
21993 * fold-const-call.c (fold_const_reduction): Likewise.
21994 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21995 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21996 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21997 (fold_relational_const): Likewise.
21998 (native_interpret_vector): Likewise. Change the size from an
21999 int to an unsigned int.
22000 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22001 TYPE_VECTOR_SUBPARTS.
22002 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22003 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22004 duplicating a non-constant operand into a variable-length vector.
22005 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22006 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22007 * ipa-icf.c (sem_variable::equals): Likewise.
22008 * match.pd: Likewise.
22009 * omp-simd-clone.c (simd_clone_subparts): Likewise.
22010 * print-tree.c (print_node): Likewise.
22011 * stor-layout.c (layout_type): Likewise.
22012 * targhooks.c (default_builtin_vectorization_cost): Likewise.
22013 * tree-cfg.c (verify_gimple_comparison): Likewise.
22014 (verify_gimple_assign_binary): Likewise.
22015 (verify_gimple_assign_ternary): Likewise.
22016 (verify_gimple_assign_single): Likewise.
22017 * tree-pretty-print.c (dump_generic_node): Likewise.
22018 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22019 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22020 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22021 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22022 (vect_shift_permute_load_chain): Likewise.
22023 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22024 (expand_vector_condition, optimize_vector_constructor): Likewise.
22025 (lower_vec_perm, get_compute_type): Likewise.
22026 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22027 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22028 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22029 (vect_recog_mask_conversion_pattern): Likewise.
22030 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22031 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22032 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22033 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22034 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22035 (vectorizable_shift, vectorizable_operation, vectorizable_store)
22036 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22037 (supportable_widening_operation): Likewise.
22038 (supportable_narrowing_operation): Likewise.
22039 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22041 * varasm.c (output_constant): Likewise.
22043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22044 Alan Hayward <alan.hayward@arm.com>
22045 David Sherwood <david.sherwood@arm.com>
22047 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22048 so that both the length == 3 and length != 3 cases set up their
22049 own permute vectors. Add comments explaining why we know the
22050 number of elements is constant.
22051 (vect_permute_load_chain): Likewise.
22053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22054 Alan Hayward <alan.hayward@arm.com>
22055 David Sherwood <david.sherwood@arm.com>
22057 * machmode.h (mode_nunits): Change from unsigned char to
22059 (ONLY_FIXED_SIZE_MODES): New macro.
22060 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22061 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22062 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22064 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22065 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22066 or if measurement_type is not polynomial.
22067 * genmodes.c (ZERO_COEFFS): New macro.
22068 (emit_mode_nunits_inline): Make mode_nunits_inline return a
22070 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22071 Use ZERO_COEFFS when emitting initializers.
22072 * data-streamer.h (bp_pack_poly_value): New function.
22073 (bp_unpack_poly_value): Likewise.
22074 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22075 for GET_MODE_NUNITS.
22076 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22077 for GET_MODE_NUNITS.
22078 * tree.c (make_vector_type): Remove temporary shim and make
22079 the real function take the number of units as a poly_uint64
22080 rather than an int.
22081 (build_vector_type_for_mode): Handle polynomial nunits.
22082 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22083 * emit-rtl.c (const_vec_series_p_1): Likewise.
22084 (gen_rtx_CONST_VECTOR): Likewise.
22085 * fold-const.c (test_vec_duplicate_folding): Likewise.
22086 * genrecog.c (validate_pattern): Likewise.
22087 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22088 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22089 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22090 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22091 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22092 * rtlanal.c (subreg_get_info): Likewise.
22093 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22094 (vect_grouped_load_supported): Likewise.
22095 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22096 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22097 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22098 (simplify_const_unary_operation, simplify_binary_operation_1)
22099 (simplify_const_binary_operation, simplify_ternary_operation)
22100 (test_vector_ops_duplicate, test_vector_ops): Likewise.
22101 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22102 instead of CONST_VECTOR_NUNITS.
22103 * varasm.c (output_constant_pool_2): Likewise.
22104 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22105 explicit-encoded elements in the XVEC for variable-length vectors.
22107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22109 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22112 Alan Hayward <alan.hayward@arm.com>
22113 David Sherwood <david.sherwood@arm.com>
22115 * coretypes.h (fixed_size_mode): Declare.
22116 (fixed_size_mode_pod): New typedef.
22117 * builtins.h (target_builtins::x_apply_args_mode)
22118 (target_builtins::x_apply_result_mode): Change type to
22119 fixed_size_mode_pod.
22120 * builtins.c (apply_args_size, apply_result_size, result_vector)
22121 (expand_builtin_apply_args_1, expand_builtin_apply)
22122 (expand_builtin_return): Update accordingly.
22124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22126 * cse.c (hash_rtx_cb): Hash only the encoded elements.
22127 * cselib.c (cselib_hash_rtx): Likewise.
22128 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22129 CONST_VECTOR encoding.
22131 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22132 Jeff Law <law@redhat.com>
22135 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22136 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22137 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22138 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22141 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22142 explicitly probe *sp in a noreturn function if there were any callee
22143 register saves or frame pointer is needed.
22145 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22148 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22149 BLKmode for ternary, binary or unary expressions.
22152 * var-tracking.c (delete_vta_debug_insn): New inline function.
22153 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22154 insns from get_insns () to NULL instead of each bb separately.
22155 Use delete_vta_debug_insn. No longer static.
22156 (vt_debug_insns_local, variable_tracking_main_1): Adjust
22157 delete_vta_debug_insns callers.
22158 * rtl.h (delete_vta_debug_insns): Declare.
22159 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22160 instead of variable_tracking_main.
22162 2018-01-03 Martin Sebor <msebor@redhat.com>
22164 PR tree-optimization/83603
22165 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22166 arguments past the endof the argument list in functions declared
22167 without a prototype.
22168 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22169 Avoid checking when arguments are null.
22171 2018-01-03 Martin Sebor <msebor@redhat.com>
22174 * doc/extend.texi (attribute const): Fix a typo.
22175 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22176 issuing -Wsuggest-attribute for void functions.
22178 2018-01-03 Martin Sebor <msebor@redhat.com>
22180 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22181 offset_int::from instead of wide_int::to_shwi.
22182 (maybe_diag_overlap): Remove assertion.
22183 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22184 * gimple-ssa-sprintf.c (format_directive): Same.
22185 (parse_directive): Same.
22186 (sprintf_dom_walker::compute_format_length): Same.
22187 (try_substitute_return_value): Same.
22189 2018-01-03 Jeff Law <law@redhat.com>
22191 PR middle-end/83654
22192 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22193 non-constant residual for zero at runtime and avoid probing in
22194 that case. Reorganize code for trailing problem to mirror handling
22197 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22199 PR tree-optimization/83501
22200 * tree-ssa-strlen.c (get_string_cst): New.
22201 (handle_char_store): Call get_string_cst.
22203 2018-01-03 Martin Liska <mliska@suse.cz>
22205 PR tree-optimization/83593
22206 * tree-ssa-strlen.c: Include tree-cfg.h.
22207 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22208 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22209 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22211 (strlen_dom_walker::before_dom_children): Call
22212 gimple_purge_dead_eh_edges. Dump tranformation with details
22214 (strlen_dom_walker::before_dom_children): Update call by adding
22215 new argument cleanup_eh.
22216 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22218 2018-01-03 Martin Liska <mliska@suse.cz>
22221 * cif-code.def (VARIADIC_THUNK): New enum value.
22222 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22225 2018-01-03 Jan Beulich <jbeulich@suse.com>
22227 * sse.md (mov<mode>_internal): Tighten condition for when to use
22228 vmovdqu<ssescalarsize> for TI and OI modes.
22230 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22232 Update copyright years.
22234 2018-01-03 Martin Liska <mliska@suse.cz>
22237 * ipa-visibility.c (function_and_variable_visibility): Skip
22238 functions with noipa attribure.
22240 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22242 * gcc.c (process_command): Update copyright notice dates.
22243 * gcov-dump.c (print_version): Ditto.
22244 * gcov.c (print_version): Ditto.
22245 * gcov-tool.c (print_version): Ditto.
22246 * gengtype.c (create_file): Ditto.
22247 * doc/cpp.texi: Bump @copying's copyright year.
22248 * doc/cppinternals.texi: Ditto.
22249 * doc/gcc.texi: Ditto.
22250 * doc/gccint.texi: Ditto.
22251 * doc/gcov.texi: Ditto.
22252 * doc/install.texi: Ditto.
22253 * doc/invoke.texi: Ditto.
22255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22257 * vector-builder.h (vector_builder::m_full_nelts): Change from
22258 unsigned int to poly_uint64.
22259 (vector_builder::full_nelts): Update prototype accordingly.
22260 (vector_builder::new_vector): Likewise.
22261 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22262 (vector_builder::operator ==): Likewise.
22263 (vector_builder::finalize): Likewise.
22264 * int-vector-builder.h (int_vector_builder::int_vector_builder):
22265 Take the number of elements as a poly_uint64 rather than an
22267 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22268 from unsigned int to poly_uint64.
22269 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22270 (vec_perm_indices::new_vector): Likewise.
22271 (vec_perm_indices::length): Likewise.
22272 (vec_perm_indices::nelts_per_input): Likewise.
22273 (vec_perm_indices::input_nelts): Likewise.
22274 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22275 number of elements per input as a poly_uint64 rather than an
22276 unsigned int. Use the original encoding for variable-length
22277 vectors, rather than clamping each individual element.
22278 For the second and subsequent elements in each pattern,
22279 clamp the step and base before clamping their sum.
22280 (vec_perm_indices::series_p): Handle polynomial element counts.
22281 (vec_perm_indices::all_in_range_p): Likewise.
22282 (vec_perm_indices_to_tree): Likewise.
22283 (vec_perm_indices_to_rtx): Likewise.
22284 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22285 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22286 (tree_vector_builder::new_binary_operation): Handle polynomial
22287 element counts. Return false if we need to know the number
22288 of elements at compile time.
22289 * fold-const.c (fold_vec_perm): Punt if the number of elements
22290 isn't known at compile time.
22292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22294 * vec-perm-indices.h (vec_perm_builder): Change element type
22295 from HOST_WIDE_INT to poly_int64.
22296 (vec_perm_indices::element_type): Update accordingly.
22297 (vec_perm_indices::clamp): Handle polynomial element_types.
22298 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22299 (vec_perm_indices::all_in_range_p): Likewise.
22300 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22302 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22303 polynomial vec_perm_indices element types.
22304 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22305 * fold-const.c (fold_vec_perm): Likewise.
22306 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22307 * tree-vect-generic.c (lower_vec_perm): Likewise.
22308 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22309 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22310 element type to HOST_WIDE_INT.
22312 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22313 Alan Hayward <alan.hayward@arm.com>
22314 David Sherwood <david.sherwood@arm.com>
22316 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22317 rather than an int. Use plus_constant.
22318 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22319 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22321 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22322 Alan Hayward <alan.hayward@arm.com>
22323 David Sherwood <david.sherwood@arm.com>
22325 * calls.c (emit_call_1, expand_call): Change struct_value_size from
22326 a HOST_WIDE_INT to a poly_int64.
22328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22329 Alan Hayward <alan.hayward@arm.com>
22330 David Sherwood <david.sherwood@arm.com>
22332 * calls.c (load_register_parameters): Cope with polynomial
22333 mode sizes. Require a constant size for BLKmode parameters
22334 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
22335 forces a parameter to be padded at the lsb end in order to
22336 fill a complete number of words, require the parameter size
22337 to be ordered wrt UNITS_PER_WORD.
22339 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22340 Alan Hayward <alan.hayward@arm.com>
22341 David Sherwood <david.sherwood@arm.com>
22343 * reload1.c (spill_stack_slot_width): Change element type
22344 from unsigned int to poly_uint64_pod.
22345 (alter_reg): Treat mode sizes as polynomial.
22347 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22348 Alan Hayward <alan.hayward@arm.com>
22349 David Sherwood <david.sherwood@arm.com>
22351 * reload.c (complex_word_subreg_p): New function.
22352 (reload_inner_reg_of_subreg, push_reload): Use it.
22354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22355 Alan Hayward <alan.hayward@arm.com>
22356 David Sherwood <david.sherwood@arm.com>
22358 * lra-constraints.c (process_alt_operands): Reject matched
22359 operands whose sizes aren't ordered.
22360 (match_reload): Refer to this check here.
22362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22363 Alan Hayward <alan.hayward@arm.com>
22364 David Sherwood <david.sherwood@arm.com>
22366 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22367 that the mode size is in the set {1, 2, 4, 8, 16}.
22369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22370 Alan Hayward <alan.hayward@arm.com>
22371 David Sherwood <david.sherwood@arm.com>
22373 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22374 Use plus_constant instead of gen_rtx_PLUS.
22376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22377 Alan Hayward <alan.hayward@arm.com>
22378 David Sherwood <david.sherwood@arm.com>
22380 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22381 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22382 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22383 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22384 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22385 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22386 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22387 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22388 * config/i386/i386.c (ix86_push_rounding): ...this new function.
22389 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22391 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22392 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22393 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22394 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22395 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22396 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22397 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22398 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22399 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22400 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22402 * expr.c (emit_move_resolve_push): Treat the input and result
22403 of PUSH_ROUNDING as a poly_int64.
22404 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22405 (emit_push_insn): Likewise.
22406 * lra-eliminations.c (mark_not_eliminable): Likewise.
22407 * recog.c (push_operand): Likewise.
22408 * reload1.c (elimination_effects): Likewise.
22409 * rtlanal.c (nonzero_bits1): Likewise.
22410 * calls.c (store_one_arg): Likewise. Require the padding to be
22411 known at compile time.
22413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22414 Alan Hayward <alan.hayward@arm.com>
22415 David Sherwood <david.sherwood@arm.com>
22417 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22418 Use plus_constant instead of gen_rtx_PLUS.
22420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22421 Alan Hayward <alan.hayward@arm.com>
22422 David Sherwood <david.sherwood@arm.com>
22424 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22425 rather than an int.
22427 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22428 Alan Hayward <alan.hayward@arm.com>
22429 David Sherwood <david.sherwood@arm.com>
22431 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22432 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22433 via stack temporaries. Treat the mode size as polynomial too.
22435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22436 Alan Hayward <alan.hayward@arm.com>
22437 David Sherwood <david.sherwood@arm.com>
22439 * expr.c (expand_expr_real_2): When handling conversions involving
22440 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22441 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
22442 as a poly_uint64 too.
22444 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22445 Alan Hayward <alan.hayward@arm.com>
22446 David Sherwood <david.sherwood@arm.com>
22448 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22450 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22451 Alan Hayward <alan.hayward@arm.com>
22452 David Sherwood <david.sherwood@arm.com>
22454 * combine.c (can_change_dest_mode): Handle polynomial
22455 REGMODE_NATURAL_SIZE.
22456 * expmed.c (store_bit_field_1): Likewise.
22457 * expr.c (store_constructor): Likewise.
22458 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22459 and polynomial REGMODE_NATURAL_SIZE.
22460 (gen_lowpart_common): Likewise.
22461 * reginfo.c (record_subregs_of_mode): Likewise.
22462 * rtlanal.c (read_modify_subreg_p): Likewise.
22464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22465 Alan Hayward <alan.hayward@arm.com>
22466 David Sherwood <david.sherwood@arm.com>
22468 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22469 numbers of elements.
22471 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22472 Alan Hayward <alan.hayward@arm.com>
22473 David Sherwood <david.sherwood@arm.com>
22475 * match.pd: Cope with polynomial numbers of vector elements.
22477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22478 Alan Hayward <alan.hayward@arm.com>
22479 David Sherwood <david.sherwood@arm.com>
22481 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22482 in a POINTER_PLUS_EXPR.
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 * omp-simd-clone.c (simd_clone_subparts): New function.
22489 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22490 (ipa_simd_modify_function_body): Likewise.
22492 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22493 Alan Hayward <alan.hayward@arm.com>
22494 David Sherwood <david.sherwood@arm.com>
22496 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22497 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22498 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22499 (expand_vector_condition, vector_element): Likewise.
22500 (subparts_gt): New function.
22501 (get_compute_type): Use subparts_gt.
22502 (count_type_subparts): Delete.
22503 (expand_vector_operations_1): Use subparts_gt instead of
22504 count_type_subparts.
22506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22507 Alan Hayward <alan.hayward@arm.com>
22508 David Sherwood <david.sherwood@arm.com>
22510 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22511 (vect_compile_time_alias): ...this new function. Do the calculation
22512 on poly_ints rather than trees.
22513 (vect_prune_runtime_alias_test_list): Update call accordingly.
22515 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22516 Alan Hayward <alan.hayward@arm.com>
22517 David Sherwood <david.sherwood@arm.com>
22519 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22521 (vect_schedule_slp_instance): Likewise.
22523 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22524 Alan Hayward <alan.hayward@arm.com>
22525 David Sherwood <david.sherwood@arm.com>
22527 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22528 constant and extern definitions for variable-length vectors.
22529 (vect_get_constant_vectors): Note that the number of units
22530 is known to be constant.
22532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22533 Alan Hayward <alan.hayward@arm.com>
22534 David Sherwood <david.sherwood@arm.com>
22536 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22537 of units as polynomial. Choose between WIDE and NARROW based
22540 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22541 Alan Hayward <alan.hayward@arm.com>
22542 David Sherwood <david.sherwood@arm.com>
22544 * tree-vect-stmts.c (simd_clone_subparts): New function.
22545 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22547 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22548 Alan Hayward <alan.hayward@arm.com>
22549 David Sherwood <david.sherwood@arm.com>
22551 * tree-vect-stmts.c (vectorizable_call): Treat the number of
22552 vectors as polynomial. Use build_index_vector for
22553 IFN_GOMP_SIMD_LANE.
22555 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22556 Alan Hayward <alan.hayward@arm.com>
22557 David Sherwood <david.sherwood@arm.com>
22559 * tree-vect-stmts.c (get_load_store_type): Treat the number of
22560 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22561 for variable-length vectors.
22562 (vectorizable_mask_load_store): Treat the number of units as
22563 polynomial, asserting that it is constant if the condition has
22564 already been enforced.
22565 (vectorizable_store, vectorizable_load): Likewise.
22567 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22568 Alan Hayward <alan.hayward@arm.com>
22569 David Sherwood <david.sherwood@arm.com>
22571 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22572 of units as polynomial. Punt if we can't tell at compile time
22573 which vector contains the final result.
22575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22576 Alan Hayward <alan.hayward@arm.com>
22577 David Sherwood <david.sherwood@arm.com>
22579 * tree-vect-loop.c (vectorizable_induction): Treat the number
22580 of units as polynomial. Punt on SLP inductions. Use an integer
22581 VEC_SERIES_EXPR for variable-length integer reductions. Use a
22582 cast of such a series for variable-length floating-point
22585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22586 Alan Hayward <alan.hayward@arm.com>
22587 David Sherwood <david.sherwood@arm.com>
22589 * tree.h (build_index_vector): Declare.
22590 * tree.c (build_index_vector): New function.
22591 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22592 of units as polynomial, forcibly converting it to a constant if
22593 vectorizable_reduction has already enforced the condition.
22594 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
22595 to create a {1,2,3,...} vector.
22596 (vectorizable_reduction): Treat the number of units as polynomial.
22597 Choose vectype_in based on the largest scalar element size rather
22598 than the smallest number of units. Enforce the restrictions
22601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22602 Alan Hayward <alan.hayward@arm.com>
22603 David Sherwood <david.sherwood@arm.com>
22605 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22606 number of units as polynomial.
22608 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22609 Alan Hayward <alan.hayward@arm.com>
22610 David Sherwood <david.sherwood@arm.com>
22612 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22613 * target.def (autovectorize_vector_sizes): Return the vector sizes
22614 by pointer, using vector_sizes rather than a bitmask.
22615 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22616 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22617 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22619 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22620 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22621 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22622 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22623 * omp-general.c (omp_max_vf): Likewise.
22624 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22625 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22626 * tree-vect-loop.c (vect_analyze_loop): Likewise.
22627 * tree-vect-slp.c (vect_slp_bb): Likewise.
22628 * doc/tm.texi: Regenerate.
22629 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22631 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22632 the vector size as a poly_uint64 rather than an unsigned int.
22633 (current_vector_size): Change from an unsigned int to a poly_uint64.
22634 (get_vectype_for_scalar_type): Update accordingly.
22635 * tree.h (build_truth_vector_type): Take the size and number of
22636 units as a poly_uint64 rather than an unsigned int.
22637 (build_vector_type): Add a temporary overload that takes
22638 the number of units as a poly_uint64 rather than an unsigned int.
22639 * tree.c (make_vector_type): Likewise.
22640 (build_truth_vector_type): Take the number of units as a poly_uint64
22641 rather than an unsigned int.
22643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22644 Alan Hayward <alan.hayward@arm.com>
22645 David Sherwood <david.sherwood@arm.com>
22647 * target.def (get_mask_mode): Take the number of units and length
22648 as poly_uint64s rather than unsigned ints.
22649 * targhooks.h (default_get_mask_mode): Update accordingly.
22650 * targhooks.c (default_get_mask_mode): Likewise.
22651 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22652 * doc/tm.texi: Regenerate.
22654 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22655 Alan Hayward <alan.hayward@arm.com>
22656 David Sherwood <david.sherwood@arm.com>
22658 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22659 * omp-general.c (omp_max_vf): Likewise.
22660 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22661 (expand_omp_simd): Handle polynomial safelen.
22662 * omp-low.c (omplow_simd_context): Add a default constructor.
22663 (omplow_simd_context::max_vf): Change from int to poly_uint64.
22664 (lower_rec_simd_input_clauses): Update accordingly.
22665 (lower_rec_input_clauses): Likewise.
22667 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22668 Alan Hayward <alan.hayward@arm.com>
22669 David Sherwood <david.sherwood@arm.com>
22671 * tree-vectorizer.h (vect_nunits_for_cost): New function.
22672 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22673 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22674 (vect_analyze_slp_cost): Likewise.
22675 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22676 (vect_model_load_cost): Likewise.
22678 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22679 Alan Hayward <alan.hayward@arm.com>
22680 David Sherwood <david.sherwood@arm.com>
22682 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22683 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22684 from an unsigned int * to a poly_uint64_pod *.
22685 (calculate_unrolling_factor): New function.
22686 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
22688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22689 Alan Hayward <alan.hayward@arm.com>
22690 David Sherwood <david.sherwood@arm.com>
22692 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22693 from an unsigned int to a poly_uint64.
22694 (_loop_vec_info::slp_unrolling_factor): Likewise.
22695 (_loop_vec_info::vectorization_factor): Change from an int
22697 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22698 (vect_get_num_vectors): New function.
22699 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22700 (vect_get_num_copies): Use vect_get_num_vectors.
22701 (vect_analyze_data_ref_dependences): Change max_vf from an int *
22702 to an unsigned int *.
22703 (vect_analyze_data_refs): Change min_vf from an int * to a
22705 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22706 than an unsigned HOST_WIDE_INT.
22707 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22708 (vect_analyze_data_ref_dependence): Change max_vf from an int *
22709 to an unsigned int *.
22710 (vect_analyze_data_ref_dependences): Likewise.
22711 (vect_compute_data_ref_alignment): Handle polynomial vf.
22712 (vect_enhance_data_refs_alignment): Likewise.
22713 (vect_prune_runtime_alias_test_list): Likewise.
22714 (vect_shift_permute_load_chain): Likewise.
22715 (vect_supportable_dr_alignment): Likewise.
22716 (dependence_distance_ge_vf): Take the vectorization factor as a
22717 poly_uint64 rather than an unsigned HOST_WIDE_INT.
22718 (vect_analyze_data_refs): Change min_vf from an int * to a
22720 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22721 vfm1 as a poly_uint64 rather than an int. Make the same change
22722 for the returned bound_scalar.
22723 (vect_gen_vector_loop_niters): Handle polynomial vf.
22724 (vect_do_peeling): Likewise. Update call to
22725 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22726 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22728 * tree-vect-loop.c (vect_determine_vectorization_factor)
22729 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22730 (vect_get_known_peeling_cost): Likewise.
22731 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22732 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22733 (vect_transform_loop): Likewise. Use the lowest possible VF when
22734 updating the upper bounds of the loop.
22735 (vect_min_worthwhile_factor): Make static. Return an unsigned int
22736 rather than an int.
22737 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22738 polynomial unroll factors.
22739 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22740 (vect_make_slp_decision): Likewise.
22741 (vect_supported_load_permutation_p): Likewise, and polynomial
22743 (vect_analyze_slp_cost): Handle polynomial vf.
22744 (vect_slp_analyze_node_operations): Likewise.
22745 (vect_slp_analyze_bb_1): Likewise.
22746 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22747 than an unsigned HOST_WIDE_INT.
22748 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22749 (vectorizable_load): Handle polynomial vf.
22750 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22752 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22755 Alan Hayward <alan.hayward@arm.com>
22756 David Sherwood <david.sherwood@arm.com>
22758 * match.pd: Handle bit operations involving three constants
22759 and try to fold one pair.
22761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22763 * tree-vect-loop-manip.c: Include gimple-fold.h.
22764 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22765 niters_maybe_zero parameters. Handle other cases besides a step of 1.
22766 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22767 Add a path that uses a step of VF instead of 1, but disable it
22769 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22770 and niters_no_overflow parameters. Update calls to
22771 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22772 Create a new SSA name if the latter choses to use a ste other
22773 than zero, and return it via niters_vector_mult_vf_var.
22774 * tree-vect-loop.c (vect_transform_loop): Update calls to
22775 vect_do_peeling, vect_gen_vector_loop_niters and
22776 slpeel_make_loop_iterate_ntimes.
22777 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22778 (vect_gen_vector_loop_niters): Update declarations after above changes.
22780 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
22782 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22783 128-bit round to integer instructions.
22784 (ceil<mode>2): Likewise.
22785 (btrunc<mode>2): Likewise.
22786 (round<mode>2): Likewise.
22788 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22790 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22791 unaligned VSX load/store on P8/P9.
22792 (expand_block_clear): Allow the use of unaligned VSX
22793 load/store on P8/P9.
22795 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22797 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22799 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22800 swap associated with both a load and a store.
22802 2018-01-02 Andrew Waterman <andrew@sifive.com>
22804 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22805 * config/riscv/riscv.md (clear_cache): Use it.
22807 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
22809 * web.c: Remove out-of-date comment.
22811 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22813 * expr.c (fixup_args_size_notes): Check that any existing
22814 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22815 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22816 (emit_single_push_insn): ...here.
22818 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22820 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22821 (const_vector_encoded_nelts): New function.
22822 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22823 (const_vector_int_elt, const_vector_elt): Declare.
22824 * emit-rtl.c (const_vector_int_elt_1): New function.
22825 (const_vector_elt): Likewise.
22826 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22827 of CONST_VECTOR_ELT.
22829 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22831 * expr.c: Include rtx-vector-builder.h.
22832 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22833 directly on the tree encoding.
22834 (const_vector_from_tree): Likewise.
22835 * optabs.c: Include rtx-vector-builder.h.
22836 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22837 sequence of "u" values.
22838 * vec-perm-indices.c: Include rtx-vector-builder.h.
22839 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22840 directly on the vec_perm_indices encoding.
22842 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22844 * doc/rtl.texi (const_vector): Describe new encoding scheme.
22845 * Makefile.in (OBJS): Add rtx-vector-builder.o.
22846 * rtx-vector-builder.h: New file.
22847 * rtx-vector-builder.c: Likewise.
22848 * rtl.h (rtx_def::u2): Add a const_vector field.
22849 (CONST_VECTOR_NPATTERNS): New macro.
22850 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22851 (CONST_VECTOR_DUPLICATE_P): Likewise.
22852 (CONST_VECTOR_STEPPED_P): Likewise.
22853 (CONST_VECTOR_ENCODED_ELT): Likewise.
22854 (const_vec_duplicate_p): Check for a duplicated vector encoding.
22855 (unwrap_const_vec_duplicate): Likewise.
22856 (const_vec_series_p): Check for a non-duplicated vector encoding.
22857 Say that the function only returns true for integer vectors.
22858 * emit-rtl.c: Include rtx-vector-builder.h.
22859 (gen_const_vec_duplicate_1): Delete.
22860 (gen_const_vector): Call gen_const_vec_duplicate instead of
22861 gen_const_vec_duplicate_1.
22862 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22863 (gen_const_vec_duplicate): Use rtx_vector_builder.
22864 (gen_const_vec_series): Likewise.
22865 (gen_rtx_CONST_VECTOR): Likewise.
22866 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22867 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22868 Build a new vector rather than modifying a CONST_VECTOR in-place.
22869 (handle_special_swappables): Update call accordingly.
22870 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22871 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22872 Build a new vector rather than modifying a CONST_VECTOR in-place.
22873 (handle_special_swappables): Update call accordingly.
22875 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22877 * simplify-rtx.c (simplify_const_binary_operation): Use
22878 CONST_VECTOR_ELT instead of XVECEXP.
22880 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22882 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22883 the selector elements to be different from the data elements
22884 if the selector is a VECTOR_CST.
22885 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22886 ssizetype for the selector.
22888 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22890 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22891 before testing each element individually.
22892 * tree-vect-generic.c (lower_vec_perm): Likewise.
22894 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22896 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22897 * selftest-run-tests.c (selftest::run_tests): Call it.
22898 * vector-builder.h (vector_builder::operator ==): New function.
22899 (vector_builder::operator !=): Likewise.
22900 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22901 (vec_perm_indices::all_from_input_p): New function.
22902 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22903 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22904 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22905 instead of reading the VECTOR_CST directly. Detect whether both
22906 vector inputs are the same before constructing the vec_perm_indices,
22907 and update the number of inputs argument accordingly. Use the
22908 utility functions added above. Only construct sel2 if we need to.
22910 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22912 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22913 the broadcast of the low byte.
22914 (expand_mult_highpart): Use an explicit encoding for the permutes.
22915 * optabs-query.c (can_mult_highpart_p): Likewise.
22916 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22917 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22918 (vectorizable_bswap): Likewise.
22919 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22920 explicit encoding for the power-of-2 permutes.
22921 (vect_permute_store_chain): Likewise.
22922 (vect_grouped_load_supported): Likewise.
22923 (vect_permute_load_chain): Likewise.
22925 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22927 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22928 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22929 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22930 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22931 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22932 (vect_gen_perm_mask_any): Likewise.
22934 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22936 * int-vector-builder.h: New file.
22937 * vec-perm-indices.h: Include int-vector-builder.h.
22938 (vec_perm_indices): Redefine as an int_vector_builder.
22939 (auto_vec_perm_indices): Delete.
22940 (vec_perm_builder): Redefine as a stand-alone class.
22941 (vec_perm_indices::vec_perm_indices): New function.
22942 (vec_perm_indices::clamp): Likewise.
22943 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22944 (vec_perm_indices::new_vector): New function.
22945 (vec_perm_indices::new_expanded_vector): Update for new
22946 vec_perm_indices class.
22947 (vec_perm_indices::rotate_inputs): New function.
22948 (vec_perm_indices::all_in_range_p): Operate directly on the
22949 encoded form, without computing elided elements.
22950 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22951 encoding. Update for new vec_perm_indices class.
22952 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22953 the given vec_perm_builder.
22954 (expand_vec_perm_var): Update vec_perm_builder constructor.
22955 (expand_mult_highpart): Use vec_perm_builder instead of
22956 auto_vec_perm_indices.
22957 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22958 vec_perm_indices instead of auto_vec_perm_indices. Use a single
22959 or double series encoding as appropriate.
22960 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22961 vec_perm_indices instead of auto_vec_perm_indices.
22962 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22963 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22964 (vect_permute_store_chain): Likewise.
22965 (vect_grouped_load_supported): Likewise.
22966 (vect_permute_load_chain): Likewise.
22967 (vect_shift_permute_load_chain): Likewise.
22968 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22969 (vect_transform_slp_perm_load): Likewise.
22970 (vect_schedule_slp_instance): Likewise.
22971 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22972 (vectorizable_mask_load_store): Likewise.
22973 (vectorizable_bswap): Likewise.
22974 (vectorizable_store): Likewise.
22975 (vectorizable_load): Likewise.
22976 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22977 vec_perm_indices instead of auto_vec_perm_indices. Use
22978 tree_to_vec_perm_builder to read the vector from a tree.
22979 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22980 vec_perm_builder instead of a vec_perm_indices.
22981 (have_whole_vector_shift): Use vec_perm_builder and
22982 vec_perm_indices instead of auto_vec_perm_indices. Leave the
22983 truncation to calc_vec_perm_mask_for_shift.
22984 (vect_create_epilog_for_reduction): Likewise.
22985 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22986 from auto_vec_perm_indices to vec_perm_indices.
22987 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22988 instead of changing individual elements.
22989 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22990 the vector in d.perm.
22991 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22992 from auto_vec_perm_indices to vec_perm_indices.
22993 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22994 instead of changing individual elements.
22995 (arm_vectorize_vec_perm_const): Use new_vector to install
22996 the vector in d.perm.
22997 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22998 Update vec_perm_builder constructor.
22999 (rs6000_expand_interleave): Likewise.
23000 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23001 (rs6000_expand_interleave): Likewise.
23003 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23005 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23006 to qimode could truncate the indices.
23007 * optabs.c (expand_vec_perm_var): Likewise.
23009 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23011 * Makefile.in (OBJS): Add vec-perm-indices.o.
23012 * vec-perm-indices.h: New file.
23013 * vec-perm-indices.c: Likewise.
23014 * target.h (vec_perm_indices): Replace with a forward class
23016 (auto_vec_perm_indices): Move to vec-perm-indices.h.
23017 * optabs.h: Include vec-perm-indices.h.
23018 (expand_vec_perm): Delete.
23019 (selector_fits_mode_p, expand_vec_perm_var): Declare.
23020 (expand_vec_perm_const): Declare.
23021 * target.def (vec_perm_const_ok): Replace with...
23022 (vec_perm_const): ...this new hook.
23023 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23024 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23025 * doc/tm.texi: Regenerate.
23026 * optabs.def (vec_perm_const): Delete.
23027 * doc/md.texi (vec_perm_const): Likewise.
23028 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23029 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23030 expand_vec_perm for constant permutation vectors. Assert that
23031 the mode of variable permutation vectors is the integer equivalent
23032 of the mode that is being permuted.
23033 * optabs-query.h (selector_fits_mode_p): Declare.
23034 * optabs-query.c: Include vec-perm-indices.h.
23035 (selector_fits_mode_p): New function.
23036 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23037 is defined, instead of checking whether the vec_perm_const_optab
23038 exists. Use targetm.vectorize.vec_perm_const instead of
23039 targetm.vectorize.vec_perm_const_ok. Check whether the indices
23040 fit in the vector mode before using a variable permute.
23041 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23042 vec_perm_indices instead of an rtx.
23043 (expand_vec_perm): Replace with...
23044 (expand_vec_perm_const): ...this new function. Take the selector
23045 as a vec_perm_indices rather than an rtx. Also take the mode of
23046 the selector. Update call to shift_amt_for_vec_perm_mask.
23047 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23048 Use vec_perm_indices::new_expanded_vector to expand the original
23049 selector into bytes. Check whether the indices fit in the vector
23050 mode before using a variable permute.
23051 (expand_vec_perm_var): Make global.
23052 (expand_mult_highpart): Use expand_vec_perm_const.
23053 * fold-const.c: Includes vec-perm-indices.h.
23054 * tree-ssa-forwprop.c: Likewise.
23055 * tree-vect-data-refs.c: Likewise.
23056 * tree-vect-generic.c: Likewise.
23057 * tree-vect-loop.c: Likewise.
23058 * tree-vect-slp.c: Likewise.
23059 * tree-vect-stmts.c: Likewise.
23060 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23062 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23063 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23064 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23065 (aarch64_vectorize_vec_perm_const): ...this new function.
23066 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23067 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23068 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23069 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23070 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23071 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23072 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23074 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
23075 check for NEON modes.
23076 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23077 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23078 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23079 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23081 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
23082 the old VEC_PERM_CONST conditions.
23083 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23084 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23085 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23086 (ia64_vectorize_vec_perm_const_ok): Merge into...
23087 (ia64_vectorize_vec_perm_const): ...this new function.
23088 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23089 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23090 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23091 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23092 * config/mips/mips.c (mips_expand_vec_perm_const)
23093 (mips_vectorize_vec_perm_const_ok): Merge into...
23094 (mips_vectorize_vec_perm_const): ...this new function.
23095 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23096 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23097 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23098 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23099 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23100 (rs6000_expand_vec_perm_const): Delete.
23101 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23103 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23104 (altivec_expand_vec_perm_const_le): Take each operand individually.
23105 Operate on constant selectors rather than rtxes.
23106 (altivec_expand_vec_perm_const): Likewise. Update call to
23107 altivec_expand_vec_perm_const_le.
23108 (rs6000_expand_vec_perm_const): Delete.
23109 (rs6000_vectorize_vec_perm_const_ok): Delete.
23110 (rs6000_vectorize_vec_perm_const): New function.
23111 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23112 an element count and rtx array.
23113 (rs6000_expand_extract_even): Update call accordingly.
23114 (rs6000_expand_interleave): Likewise.
23115 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23116 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23117 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23118 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23119 (rs6000_expand_vec_perm_const): Delete.
23120 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23121 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23122 (altivec_expand_vec_perm_const_le): Take each operand individually.
23123 Operate on constant selectors rather than rtxes.
23124 (altivec_expand_vec_perm_const): Likewise. Update call to
23125 altivec_expand_vec_perm_const_le.
23126 (rs6000_expand_vec_perm_const): Delete.
23127 (rs6000_vectorize_vec_perm_const_ok): Delete.
23128 (rs6000_vectorize_vec_perm_const): New function. Remove stray
23129 reference to the SPE evmerge intructions.
23130 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23131 an element count and rtx array.
23132 (rs6000_expand_extract_even): Update call accordingly.
23133 (rs6000_expand_interleave): Likewise.
23134 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23135 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23137 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23139 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23141 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23142 vector mode and that that mode matches the mode of the data
23144 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23145 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
23146 directly using expand_vec_perm_1 when forcing selectors into
23148 (expand_vec_perm_var): New function, split out from expand_vec_perm.
23150 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23152 * optabs-query.h (can_vec_perm_p): Delete.
23153 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23154 * optabs-query.c (can_vec_perm_p): Split into...
23155 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23156 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23157 particular selector is valid.
23158 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23159 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23160 (vect_grouped_load_supported): Likewise.
23161 (vect_shift_permute_load_chain): Likewise.
23162 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23163 (vect_transform_slp_perm_load): Likewise.
23164 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23165 (vectorizable_bswap): Likewise.
23166 (vect_gen_perm_mask_checked): Likewise.
23167 * fold-const.c (fold_ternary_loc): Likewise. Don't take
23168 implementations of variable permutation vectors into account
23169 when deciding which selector to use.
23170 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23171 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23172 with a false third argument.
23173 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23174 to test whether the constant selector is valid and can_vec_perm_var_p
23175 to test whether a variable selector is valid.
23177 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23179 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23180 * optabs-query.c (can_vec_perm_p): Likewise.
23181 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23182 instead of vec_perm_indices.
23183 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23184 (vect_gen_perm_mask_checked): Likewise,
23185 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23186 (vect_gen_perm_mask_checked): Likewise,
23188 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23190 * optabs-query.h (qimode_for_vec_perm): Declare.
23191 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23192 (qimode_for_vec_perm): ...this new function.
23193 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23195 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23197 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23198 does not have a conditional at the top.
23200 2018-01-02 Richard Biener <rguenther@suse.de>
23202 * ipa-inline.c (big_speedup_p): Fix expression.
23204 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23207 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23210 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23214 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23215 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23216 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23217 cond_taken_branch_cost 3->4.
23219 2018-01-01 Jakub Jelinek <jakub@redhat.com>
23221 PR tree-optimization/83581
23222 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23223 TODO_cleanup_cfg if any changes have been made.
23225 PR middle-end/83608
23226 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23227 convert_modes if target mode has the right side, but different mode
23230 PR middle-end/83609
23231 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23232 last argument when extracting from CONCAT. If either from_real or
23233 from_imag is NULL, use expansion through memory. If result is not
23234 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23235 the parts directly to inner mode, if even that fails, use expansion
23238 PR middle-end/83623
23239 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23240 check for bswap in mode rather than HImode and use that in expand_unop
23243 Copyright (C) 2018 Free Software Foundation, Inc.
23245 Copying and distribution of this file, with or without modification,
23246 are permitted in any medium without royalty provided the copyright
23247 notice and this notice are preserved.