[nvptx] Use CUDA driver API to select default runtime launch geometry
[official-gcc.git] / gcc / ChangeLog
blobe4cf0b693a1fcf0e2418ac958b227f818f739a90
1 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
3         * config/s390/s390.c (s390_decompose_constant_pool_ref):
4         New function.
5         (s390_decompose_address): Factor out constant pool ref
6         decomposition.
8 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
10         * config/nds32/nds32-predicates.c
11         (nds32_can_use_bclr_p): Change return type as bool.
12         (nds32_can_use_bset_p): Ditto.
13         (nds32_can_use_btgl_p): Ditto.
14         (nds32_can_use_bitci_p): Ditto.
15         * config/nds32/nds32-protos.h
16         (nds32_can_use_bclr_p): Change declaration.
17         (nds32_can_use_bset_p): Ditto.
18         (nds32_can_use_btgl_p): Ditto.
19         (nds32_can_use_bitci_p): Ditto.
21 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
23         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
24         Support -msched-prolog-epilog option.
25         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
27 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
29         * common/config/nds32/nds32-common.c
30         (nds32_option_optimization_table): Enalbe -malways-align.
32 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
34         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
35         extra_headers.
36         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
37         OPT_misr_secure_ case.
38         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
39         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
40         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
41         secure attribute.
42         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
43         (nds32_isr_info): New field security_level.
44         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
45         * config/nds32/nds32.md (return_internal): Consider critical attribute.
46         * config/nds32/nds32.opt (misr-secure): New option.
47         * config/nds32/nds32_init.inc: New file.
48         * config/nds32/nds32_isr.h: New file.
50 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
52         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
53         Update comment for atomic instructions.
54         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
55         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
56         Remove.
57         (atomic_loaddi): Revise fence expansion to only emit fence prior to
58         load for __ATOMIC_SEQ_CST model.
59         (atomic_loaddi_1): Remove float register target.
60         (atomic_storedi): Handle CONST_INT values.
61         (atomic_storedi_1): Remove float register source.  Add special case
62         for zero value.
63         (memory_barrier): New expander and insn.
65 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
67         PR tree-optimization/86835
68         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
69         new_stmt after def_gsi, make sure to insert new_square_stmt after
70         that stmt, not 2 stmts before it.
72 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
74         PR target/82418
75         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
76         instead of SWI48.
78 2018-08-10  Martin Liska  <mliska@suse.cz>
80         PR target/83610
81         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
82         function type.
83         * builtins.c (expand_builtin_expect_with_probability):
84         New function.
85         (expand_builtin_expect_with_probability): New function.
86         (build_builtin_expect_predicate): Add new argumnet probability
87         for BUILT_IN_EXPECT_WITH_PROBABILITY.
88         (fold_builtin_expect):
89         (fold_builtin_2):
90         (fold_builtin_3):
91         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
92         * builtins.h (fold_builtin_expect): Set new argument.
93         * doc/extend.texi: Document __builtin_expect_with_probability.
94         * doc/invoke.texi: Likewise.
95         * gimple-fold.c (gimple_fold_call): Pass new argument.
96         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
97         also BUILT_IN_EXPECT_WITH_PROBABILITY.
98         * predict.c (get_predictor_value): New function.
99         (expr_expected_value): Add new argument probability. Assume
100         that predictor and probability are always non-null.
101         (expr_expected_value_1): Likewise.  For __builtin_expect and
102         __builtin_expect_with_probability set probability.  Handle
103         combination in binary expressions.
104         (tree_predict_by_opcode): Simplify code by simply calling
105         get_predictor_value.
106         (pass_strip_predict_hints::execute): Add handling of
107         BUILT_IN_EXPECT_WITH_PROBABILITY.
108         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
109         new predictor.
110         * tree.h (DECL_BUILT_IN_P): New function.
112 2018-08-10  Martin Liska  <mliska@suse.cz>
114         PR tree-optimization/85799
115         * passes.def: Add argument for pass_strip_predict_hints.
116         * predict.c (class pass_strip_predict_hints): Add new argument
117         early_p.
118         (strip_predictor_early): New function.
119         (pass_strip_predict_hints::execute): Call the function to
120         strip predictors.
121         (strip_predict_hints): New function.
122         * predict.def: Fix comment.
124 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
126         * Makefile.in: Clarify which tm.texi to copy over to assert the
127         right to grant a GFDL license for all.
129 2018-08-09  Jeff Law  <law@redhat.com>
131         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
132         unused variable.
134 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
136         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
137         prototype.
139 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
141         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
142         reductions for variable-length vectors.
144 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
146         PR other/84889
147         * common.opt (fdiagnostics-show-line-numbers): New option.
148         * diagnostic-show-locus.c (class layout): Add fields
149         "m_show_line_numbers_p" and "m_linenum_width";
150         (num_digits): New function.
151         (test_num_digits): New function.
152         (layout::layout): Initialize new fields.  Update m_x_offset
153         logic to handle any left margin.
154         (layout::print_source_line): Print line number when requested.
155         (layout::start_annotation_line): New member function.
156         (layout::print_annotation_line): Call it.
157         (layout::print_leading_fixits): Likewise.
158         (layout::print_trailing_fixits): Likewise.  Update calls to
159         move_to_column for new parameter.
160         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
161         it to potentially call start_annotation_line.
162         (layout::show_ruler): Call start_annotation_line.
163         (selftest::test_line_numbers_multiline_range): New selftest.
164         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
165         and selftest::test_line_numbers_multiline_range.
166         * diagnostic.c (diagnostic_initialize): Initialize
167         show_line_numbers_p.
168         * diagnostic.h (struct diagnostic_context): Add field
169         "show_line_numbers_p".
170         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
171         -fno-diagnostics-show-line-numbers.
172         * dwarf2out.c (gen_producer_string): Add
173         OPT_fdiagnostics_show_line_numbers to the ignored options.
174         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
175         one setting" options.
176         (append_compiler_options): Likewise to the dropped options.
177         (append_diag_options): Likewise to the passed-on options.
178         * opts.c (common_handle_option): Handle the new option.
179         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
181 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
183         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
184         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
185         third argument of type "const signed char" to descriptions of
186         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
187         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
188         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
189         __builtin_bcdsub_ov functions.
191 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
193         PR tree-optimization/86858
194         * tree-vect-loop.c (vect_is_simple_reduction): Restore
195         flow_bb_inside_loop_p calls.
197 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
199         PR tree-optimization/86871
200         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
201         instead of gimple_assign_lhs.
203 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
205         PR target/86887
206         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
207         register constraint to operand 0.
208         (add<mode>3_carryinC): Likewise.
209         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
211 2018-08-09  Martin Liska  <mliska@suse.cz>
213         PR c/86895
214         * common.opt: Remove extra line.
216 2018-08-09  Martin Liska  <mliska@suse.cz>
218         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
219         at the end of a line, make first letter capital and end up
220         a sentence with a dot.
221         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
222         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
223         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
224         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
225         (PARAM_MAX_ISL_OPERATIONS): Likewise.
226         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
227         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
228         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
229         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
230         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
231         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
232         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
233         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
234         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
235         (PARAM_TREE_REASSOC_WIDTH): Likewise.
236         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
237         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
238         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
240 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
242         PR target/84332
243         * config/s390/s390.c (s390_option_override_internal): Reduce the
244         stack-clash-protection-probe-interval param if it would be too big
245         for z900.
247 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
249         PR target/46179
250         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
251         * config/m68k/m68k.c (handle_move_double): Don't call
252         m68k_final_prescan_insn.
253         (m68k_adjust_decorated_operand): Renamed from
254         m68k_final_prescan_insn, remove first and third operand and
255         simplify.
256         (print_operand): Call it.
257         (print_operand_address): Call it.
259 2018-08-08  Nathan Sidwell  <nathan@acm.org>
261         * diagnostic.c (diagnostic_report_current_module): Use
262         linemap_included_from & linemap_included_from_linemap.
264 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
266         * config/aarch64/aarch64-cores.def: Add phecda core.
267         * config/aarch64/aarch64-tune.md: Regenerate.
268         * doc/invoke.texi: Add phecda core.
270 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
272         PR target/85295
273         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
274         definitions.
275         * config/s390/s390.md ("movti"): Add more alternatives for
276         constant to GPR copies.
278 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
280         * config/s390/s390.c: Fix whitespace damage throughout the file.
281         * config/s390/s390.h: Likewise.
282         * config/s390/tpf.h: Likewise.
284 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
286         * config/s390/s390.c (s390_loadrelative_operand_p):
287         Remove TARGET_CPU_ZARCH usages.
288         (s390_rtx_costs): Likewise.
289         (s390_legitimate_constant_p): Likewise.
290         (s390_cannot_force_const_mem): Likewise.
291         (legitimate_reload_constant_p): Likewise.
292         (s390_preferred_reload_class): Likewise.
293         (legitimize_pic_address): Likewise.
294         (legitimize_tls_address): Likewise.
295         (s390_split_branches): Removed.
296         (s390_add_execute): Removed.
297         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
298         (s390_mainpool_start): Likewise.
299         (s390_mainpool_finish): Likewise.
300         (s390_mainpool_cancel): Removed.
301         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
302         (s390_chunkify_cancel): Likewise.
303         (s390_return_addr_rtx): Likewise.
304         (s390_register_info): Remove split_branches_pending_p uages.
305         (s390_optimize_register_info): Likewise.
306         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
307         split_branches_pending_p usages.
308         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
309         (s390_load_got): Likewise.
310         (s390_expand_split_stack_prologue): Likewise.
311         (output_asm_nops): Likewise.
312         (s390_function_profiler): Likewise.
313         (s390_emit_call): Likewise.
314         (s390_conditional_register_usage): Likewise.
315         (s390_optimize_prologue): Likewise.
316         (s390_reorg): Remove TARGET_CPU_ZARCH and
317         split_branches_pending_p usages.
318         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
319         usages.
320         (s390_output_indirect_thunk_function): Likewise.
321         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
322         (TARGET_CPU_ZARCH_P): Removed.
323         (struct machine_function): Remove split_branches_pending_p.
324         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
326 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
328         * common/config/s390/s390-common.c (processor_flags_table):
329         Remove flags.
330         * config.gcc: Remove with_arch/with_tune support.
331         * config/s390/2064.md: Remove cpu attribute comparisons.
332         * config/s390/driver-native.c (s390_host_detect_local_cpu):
333         Remove MTN.
334         * config/s390/linux.h (ASM_SPEC):
335         Remove -march support.
336         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
337         Use a table to get an arch level.
338         * config/s390/s390-opts.h (enum processor_type):
339         Remove enum values.
340         * config/s390/s390.c
341         (processor_table): Remove entries, add arch_level values.
342         (s390_issue_rate): Remove cases.
343         (s390_option_override): Adjust
344         s390_option_override_internal() call.
345         (s390_option_override_internal): Remove deprecation warning.
346         (s390_valid_target_attribute_tree): Adjust
347         s390_option_override_internal() call.
348         * config/s390/s390.h (struct s390_processor):
349         Share with s390-c.c, add arch_level field.
350         * config/s390/s390.md:
351         Remove occurrences in cpu attribute.
352         * config/s390/s390.opt: Remove -march/-mtune support.
353         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
354         * doc/invoke.texi: Remove deprecation warning.
356 2018-08-08  Luis Machado  <luis.machado@linaro.org>
358         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
359         global.
360         (qdf24xx_tunings): Set vector cost structure to
361         qdf24xx_vector_cost.
363         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
364         <register_sextend>: Set to 3.
366 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
368         PR target/86838
369         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
370         * config/aarch64/aarch64-simd.md
371         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
372         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
373         (aarch64_frecpx<mode>): ...this new pattern.
374         * config/aarch64/aarch64-simd-builtins.def: Remove comment
375         about aarch64_frecp<FRECP:frecp_suffix><mode>.
377 2018-08-07  Martin Liska  <mliska@suse.cz>
379         PR middle-end/83023
380         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
381         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
382         * predict.def (PRED_MALLOC_NONNULL): New predictor.
383         * doc/extend.texi: Document that malloc attribute adds
384         hit to compiler.
386 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
388         PR target/86785
389         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
390         Define to speculation_safe_value_not_needed.
392 2018-08-06  Jeff Law  <law@redhat.com>
394         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
395         the vr_values instance to cprop_into_stmt.
396         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
397         (cprop_operand): Also query EVRP to determine if OP is a constant.
398         
399 2018-08-06  Nathan Sidwell  <nathan@acm.org>
401         * diagnostic.c (diagnostic_report_current_module): Reroll
402         included-at loop.  Translate text.
404 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
406         * function-tests.c (selftest::test_expansion_to_rtl): Call
407         free_after_compilation.
409 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
411         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
413 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
415         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
416         loops with memory block operations from getting unrolled.
418 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
420         PR target/86807
421         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
422         Define to speculation_safe_value_not_needed.
424 2018-08-06  Jeff Law  <law@redhat.com>
426         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
427         assert.
429 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
431         PR target/86662
432         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
433         with all enabled __intN types.
435         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
437 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
439         * alias.c (record_set): Check for clobber high.
440         * cfgexpand.c (expand_gimple_stmt): Likewise.
441         * combine-stack-adj.c (single_set_for_csa): Likewise.
442         * combine.c (find_single_use_1): Likewise.
443         (set_nonzero_bits_and_sign_copies): Likewise.
444         (get_combine_src_dest): Likewise.
445         (is_parallel_of_n_reg_sets): Likewise.
446         (try_combine): Likewise.
447         (record_dead_and_set_regs_1): Likewise.
448         (reg_dead_at_p_1): Likewise.
449         (reg_dead_at_p): Likewise.
450         * dce.c (deletable_insn_p): Likewise.
451         (mark_nonreg_stores_1): Likewise.
452         (mark_nonreg_stores_2): Likewise.
453         * df-scan.c (df_find_hard_reg_defs): Likewise.
454         (df_uses_record): Likewise.
455         (df_get_call_refs): Likewise.
456         * dwarf2out.c (mem_loc_descriptor): Likewise.
457         * haifa-sched.c (haifa_classify_rtx): Likewise.
458         * ira-build.c (create_insn_allocnos): Likewise.
459         * ira-costs.c (scan_one_insn): Likewise.
460         * ira.c (equiv_init_movable_p): Likewise.
461         (rtx_moveable_p): Likewise.
462         (interesting_dest_for_shprep): Likewise.
463         * jump.c (mark_jump_label_1): Likewise.
464         * postreload-gcse.c (record_opr_changes): Likewise.
465         * postreload.c (reload_cse_simplify): Likewise.
466         (struct reg_use): Add source expr.
467         (reload_combine): Check for clobber high.
468         (reload_combine_note_use): Likewise.
469         (reload_cse_move2add): Likewise.
470         (move2add_note_store): Likewise.
471         * print-rtl.c (print_pattern): Likewise.
472         * recog.c (decode_asm_operands): Likewise.
473         (store_data_bypass_p): Likewise.
474         (if_test_bypass_p): Likewise.
475         * regcprop.c (kill_clobbered_value): Likewise.
476         (kill_set_value): Likewise.
477         * reginfo.c (reg_scan_mark_refs): Likewise.
478         * reload1.c (maybe_fix_stack_asms): Likewise.
479         (eliminate_regs_1): Likewise.
480         (elimination_effects): Likewise.
481         (mark_not_eliminable): Likewise.
482         (scan_paradoxical_subregs): Likewise.
483         (forget_old_reloads_1): Likewise.
484         * reorg.c (find_end_label): Likewise.
485         (try_merge_delay_insns): Likewise.
486         (redundant_insn): Likewise.
487         (own_thread_p): Likewise.
488         (fill_simple_delay_slots): Likewise.
489         (fill_slots_from_thread): Likewise.
490         (dbr_schedule): Likewise.
491         * resource.c (update_live_status): Likewise.
492         (mark_referenced_resources): Likewise.
493         (mark_set_resources): Likewise.
494         * rtl.c (copy_rtx): Likewise.
495         * rtlanal.c (reg_referenced_p): Likewise.
496         (single_set_2): Likewise.
497         (noop_move_p): Likewise.
498         (note_stores): Likewise.
499         * sched-deps.c (sched_analyze_reg): Likewise.
500         (sched_analyze_insn): Likewise.
502 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
504         * cse.c (invalidate_reg): New function extracted from...
505         (invalidate): ...here.
506         (canonicalize_insn): Check for clobber high.
507         (invalidate_from_clobbers): invalidate clobber highs.
508         (invalidate_from_sets_and_clobbers): Likewise.
509         (count_reg_usage): Check for clobber high.
510         (insn_live_p): Likewise.
511         * cselib.c (cselib_expand_value_rtx_1):Likewise.
512         (cselib_invalidate_regno): Check for clobber in setter.
513         (cselib_invalidate_rtx): Pass through setter.
514         (cselib_invalidate_rtx_note_stores):
515         (cselib_process_insn): Check for clobber high.
516         * cselib.h (cselib_invalidate_rtx): Add operand.
518 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
520         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
521         (mark_not_eliminable): Likewise.
522         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
523         * lra-lives.c (process_bb_lives): Check for clobber high.
524         * lra.c (new_insn_reg): Remember clobber highs.
525         (collect_non_operand_hard_regs): Check for clobber high.
526         (lra_set_insn_recog_data): Likewise.
527         (add_regs_to_insn_regno_info): Likewise.
528         (lra_update_insn_regno_info): Likewise.
530 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
532         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
533         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
535 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
537         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
538         (copy_insn_1): Likewise.
539         (gen_hard_reg_clobber_high): New gen function.
540         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
541         * genemit.c (gen_exp): Likewise.
542         (gen_emit_seq): Pass through info.
543         (gen_insn): Check for CLOBBER_HIGH.
544         (gen_expand): Pass through info.
545         (gen_split): Likewise.
546         (output_add_clobbers): Likewise.
547         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
548         (remove_clobbers): Likewise.
549         * rtl.h (gen_hard_reg_clobber_high): New declaration.
551 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
553         * doc/rtl.texi (clobber_high): Add.
554         (parallel): Add in clobber high
555         * rtl.c (rtl_check_failed_code3): Add function.
556         * rtl.def (CLOBBER_HIGH): Add expression.
557         * rtl.h (RTL_CHECKC3): Add macro.
558         (rtl_check_failed_code3): Add declaration.
559         (XC3EXP): Add macro.
561 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
563         PR target/86386
564         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
565         cfun->machine->max_used_stack_alignment if needed.
567 2018-08-04  Martin Sebor  <msebor@redhat.com>
569         PR tree-optimization/86571
570         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
571         NaN output to 4.
573 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
575         PR target/86799
576         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
577         Define.
579 2018-08-03  Jeff Law  <law@redhat.com>
581         PR target/86795
582         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
583         Define to speculation_safe_value_not_needed.
585 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
587         * doc/gcov.texi (-x): Remove duplicate "to".
588         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
589         (-Wif-not-aligned): Remove duplicate "is".
590         (-flto): Remove duplicate "the".
591         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
592         duplicate "v5.00.b".
593         (MSP430 Options): Remove duplicate "and" from the description
594         of "-mgprel-sec=regexp".
595         (x86 Options): Remove duplicate copies of "vmldLog102" and
596         vmlsLog104 from description of "-mveclibabi=type".
598 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
600         * internal-fn.h (first_commutative_argument): Declare.
601         * internal-fn.c (first_commutative_argument): New function.
602         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
603         restrictions for pattern statements.  Use first_commutative_argument
604         to look for commutative operands in calls to internal functions.
606 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
608         * Makefile.in (wide-int-range.o): New.
609         * tree-vrp.c: Move all the wide_int_* functions to...
610         * wide-int-range.cc: ...here.
611         * tree-vrp.h: Move all the wide_int_* prototypes to...
612         * wide-int-range.h: ...here.
614 2018-08-03  Tom de Vries  <tdevries@suse.de>
616         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
617         UI_NONE.
618         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
619         * except.c (output_function_exception_table): Do early exit if
620         targetm_common.except_unwind_info (&global_options) == UI_NONE.
622 2018-08-03  Martin Liska  <mliska@suse.cz>
624         * predict.c (dump_prediction): Change to 2 digits
625         in fraction part.
627 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
629         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
630         neon_dup_q to...
631         (falkor_am_1_gtov_gtov): ... a new insn reservation.
633 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
635         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
636         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
637         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
638         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
639         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
641 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
643         * diagnostic-show-locus.c (diagnostic_show_locus): Use
644         pp_take_prefix when saving the existing prefix.
645         * diagnostic.c (diagnostic_append_note): Likewise.
646         * langhooks.c (lhd_print_error_function): Likewise.
647         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
648         param's type.  Free the existing prefix.
649         (pp_take_prefix): New function.
650         (pretty_printer::pretty_printer): Drop the prefix parameter.
651         Rename the length parameter to match the comment.
652         (pretty_printer::~pretty_printer): Free the prefix.
653         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
654         parameter.
655         (struct pretty_printer): Drop the "const" from "prefix" field's
656         type and clarify memory management.
657         (pp_set_prefix): Drop the "const" from the 2nd param.
658         (pp_take_prefix): New decl.
660 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
662         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
663         for word_mode_ok here instead of passing as argument.
664         (expand_block_compare): Change select_block_compare_mode() call.
665         (expand_strncmp_gpr_sequence): New function.
666         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
668 2018-08-02  Jeff Law  <law@redhat.com>
670         PR target/86790
671         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
672         Define to speculation_safe_value_not_needed.
674         PR target/86784
675         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
676         Define to speculation_safe_value_not_needed.
678 2018-08-02  Tom de Vries  <tdevries@suse.de>
680         PR target/86660
681         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
682         function.  Return UI_TARGET unconditionally.
683         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
684         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
686 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
688         * genemit.c (print_overload_test): Fix typo.
690 2018-08-02  Richard Biener  <rguenther@suse.de>
692         PR tree-optimization/86816
693         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
694         which checks for value availability before querying it.
695         (gvn_uses_equal): Use it.
696         (same_succ_hash): Likewise.
697         (gimple_equal_p): Likewise.
699 2018-08-02  Nick Clifton  <nickc@redhat.com>
701         PR target/86813
702         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
703         Define to speculation_safe_value_not_needed.
705         PR target/86810
706         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
707         Define to speculation_safe_value_not_needed.
709         PR target/86810
710         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
711         Define to speculation_safe_value_not_needed.
713         PR target/86803
714         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
715         Define to speculation_safe_value_not_needed.
717         PR target/86797
718         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
719         Define to speculation_safe_value_not_needed.
721         PR target/86791
722         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
723         Define to speculation_safe_value_not_needed.
725         PR target/86789
726         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
727         Define to speculation_safe_value_not_needed.
729         PR target/86787
730         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
731         Define to speculation_safe_value_not_needed.
733         PR target/86782
734         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
735         speculation_safe_value_not_needed.
737         PR target/86781
738         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
739         to speculation_safe_value_not_needed.
741 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
743         * doc/md.texi: Expand the documentation of instruction names
744         to mention port-local uses.  Document '@' in pattern names.
745         * read-md.h (overloaded_instance, overloaded_name): New structs.
746         (mapping): Declare.
747         (md_reader::handle_overloaded_name): New member function.
748         (md_reader::get_overloads): Likewise.
749         (md_reader::m_first_overload): New member variable.
750         (md_reader::m_next_overload_ptr): Likewise.
751         (md_reader::m_overloads_htab): Likewise.
752         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
753         m_next_overload_ptr and m_overloads_htab.
754         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
755         (get_mode_token, get_code_token, get_int_token): New functions.
756         (map_attr_string): Add an optional argument that passes back
757         the associated iterator.
758         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
759         (md_reader::handle_overloaded_name, add_overload_instance): New
760         functions.
761         (apply_iterators): Handle '@' names.  Report an error if '@'
762         is used without iterators.
763         (initialize_iterators): Initialize the new iterator_group fields.
764         * genopinit.c (handle_overloaded_code_for)
765         (handle_overloaded_gen): New functions.
766         (main): Use them to print declarations of maybe_code_for_* and
767         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
768         * genemit.c (print_overload_arguments, print_overload_test)
769         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
770         (main): Use it to print definitions of maybe_code_for_* and
771         maybe_gen_* functions.
772         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
773         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
774         instead of explicit mode checks.
775         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
776         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
777         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
778         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
779         (aarch64_expand_compare_and_swap): Likewise
780         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
781         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
782         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
783         (aarch64_constant_pool_reload_icode): Delete.
784         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
785         instead of aarch64_constant_pool_reload_icode.  Use
786         code_for_aarch64_reload_mov instead of explicit mode checks.
787         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
788         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
789         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
790         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
791         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
792         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
793         (aarch64_atomic_load_op_code): Delete.
794         (aarch64_emit_atomic_load_op): Likewise.
795         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
796         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
797         instead of aarch64_emit_atomic_load_op.
798         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
799         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
800         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
801         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
802         character before the pattern name.
803         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
804         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
805         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
806         (aarch64_frecps<mode>): Likewise.
807         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
808         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
809         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
810         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
811         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
813 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
815         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
816         Allow HFmode constants if TARGET_FP_F16INST.
818 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
820         PR target/86014
821         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
822         No longer check last store for clobber of address register.
824 2018-08-02  Martin Liska  <mliska@suse.cz>
826         PR gcov-profile/86817
827         * gcov.c (process_all_functions): New function.
828         (main): Call it.
829         (process_file): Move functions processing to
830         process_all_functions.
832 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
834         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
835         "const" to the "gimple *" and "rtx_insn *" parameters.
836         * dumpfile.h (dump_user_location_t::dump_user_location_t):
837         Likewise.
838         (dump_location_t::dump_location_t): Likewise.
840 2018-08-01  Martin Sebor  <msebor@redhat.com>
842         PR tree-optimization/86650
843         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
844         rather than a "gcall *".  Directly pass the data of interest
845         to percent_K_format, rather than building a temporary CALL_EXPR
846         to hold it.
847         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
848         (gimple_fold_builtin_strncat): Adjust.
849         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
850         gcall* argument with gimple*.
851         * gimple-ssa-warn-restrict.c (check_call): Same.
852         (wrestrict_dom_walker::before_dom_children): Same.
853         (builtin_access::builtin_access): Same.
854         (check_bounds_or_overlap): Same
855         (maybe_diag_overlap): Same.
856         (maybe_diag_offset_bounds): Same.
857         * tree-diagnostic.c (default_tree_printer): Move usage of
858         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
859         to this callsite.
860         * tree-pretty-print.c (percent_K_format): Add argument.
861         * tree-pretty-print.h: Add argument.
862         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
863         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
864         (maybe_diag_stxncpy_trunc): Same.
865         (handle_builtin_stxncpy): Same.
866         (handle_builtin_strcat): Same.
868 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
870         * match.pd: Optimise pointer range checks.
872 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
874         PR tree-optimization/86758
875         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
876         to remove pattern statements.
878 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
880         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
881         result of dfs_enumerate_from when constructing stmt_vec_infos,
882         instead of additionally calling get_loop_body.
884 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
886         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
887         parameter.
888         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
889         When creating an iv, assert that the step is not known to be zero.
890         (vect_setup_realignment): Update call accordingly.
891         * tree-vect-stmts.c (vectorizable_store): Likewise.
892         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
894 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
896         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
897         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
898         (vectorizable_reduction): Likewise.
899         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
900         (vect_detect_hybrid_slp_stmts): Likewise.
901         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
903 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
905         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
906         (wide_int_set_zero_nonzero_bits): ...this.
907         (zero_nonzero_bits_from_vr): Rename to...
908         (vrp_set_zero_nonzero_bits): ...this.
909         (extract_range_from_multiplicative_op_1): Abstract wide int
910         code...
911         (wide_int_range_multiplicative_op): ...here.
912         (extract_range_from_binary_expr_1): Extract wide int binary
913         operations into their own functions.
914         (wide_int_range_lshift): New.
915         (wide_int_range_can_optimize_bit_op): New.
916         (wide_int_range_shift_undefined_p): New.
917         (wide_int_range_bit_xor): New.
918         (wide_int_range_bit_ior): New.
919         (wide_int_range_bit_and): New.
920         (wide_int_range_trunc_mod): New.
921         (extract_range_into_wide_ints): New.
922         (vrp_shift_undefined_p): New.
923         (extract_range_from_multiplicative_op): New.
924         (vrp_can_optimize_bit_op): New.
925         * tree-vrp.h (value_range::dump): New.
926         (wide_int_range_multiplicative_op): New.
927         (wide_int_range_lshift):New.
928         (wide_int_range_shift_undefined_p): New.
929         (wide_int_range_bit_xor): New.
930         (wide_int_range_bit_ior): New.
931         (wide_int_range_bit_and): New.
932         (wide_int_range_trunc_mod): New.
933         (zero_nonzero_bits_from_bounds): Rename to...
934         (wide_int_set_zero_nonzero_bits): ...this.
935         (zero_nonzero_bits_from_vr): Rename to...
936         (vrp_set_zero_nonzero_bits): ...this.
937         (range_easy_mask_min_max): Rename to...
938         (wide_int_range_can_optimize_bit_op): this.
939         * vr-values.c (simplify_bit_ops_using_ranges): Rename
940         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
942 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
944         * tree-vectorizer.h (vect_orig_stmt): New function.
945         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
946         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
947         (vect_create_epilog_for_reduction): Likewise.
948         (vectorizable_live_operation): Likewise.
949         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
950         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
951         * tree-vect-stmts.c (vectorizable_call): Likewise.
952         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
954 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
956         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
957         argument.
958         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
959         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
960         (vect_transform_loop): Likewise.
961         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
963 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
965         * tree-vectorizer.h (vect_schedule_slp): Return void.
966         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
967         (vect_schedule_slp): Likewise.
969 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
971         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
972         argument.
973         (vect_transform_loop): Update calls accordingly.  Schedule SLP
974         instances before the main loop, if any exist.
976 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
978         PR tree-optimization/86749
979         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
980         If the lhs is used in a COND_EXPR, check that it is being used
981         as the "then" or "else" value.
983 2018-08-01  Tom de Vries  <tdevries@suse.de>
985         PR target/86800
986         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
987         speculation_safe_value_not_needed.
989 2018-08-01  Richard Biener  <rguenther@suse.de>
991         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
992         as base and offset.
994 2018-08-01  Martin Liska  <mliska@suse.cz>
996         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
997         format how successful transformation is dumped.
998         (gimple_mod_pow2_value_transform): Likewise.
999         (gimple_mod_subtract_transform): Likewise.
1000         (gimple_stringops_transform): Likewise.
1002 2018-08-01  Martin Liska  <mliska@suse.cz>
1004         PR value-prof/35543
1005         * value-prof.c (interesting_stringop_to_profile_p):
1006         Simplify the code and add BUILT_IN_MEMMOVE.
1007         (gimple_stringops_transform): Likewise.
1009 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1011         * config/aarch64/aarch64-simd.md
1012         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1013         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1014         use GPI iterator instead of SI mode.
1016 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1018         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1019         rs6000_speculation_barrier.
1020         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1021         new barrier pattern name.
1023 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1025         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1026         (speculation_barrier): New insn.
1028 2018-08-01  Richard Biener  <rguenther@suse.de>
1030         PR bootstrap/86724
1031         * graphite.h: Include isl/id.h and isl/space.h to allow build
1032         with ISL 0.20.
1034 2018-08-01 Jan Willem Jagersma  <jwjagersma@gmail.com>
1036         PR target/86651
1037         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1038         mode for COFF targets.
1039         * defaults.h (TARGET_COFF): Define.
1040         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1041         TARGET_COFF): Define.
1042         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1043         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1044         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1046 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1048         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1049         * gimple-streamer-out.c (output_bb): Save it.
1050         * lto-streamer-in.c (input_struct_function_base): Restore
1051         instance discriminator if available.  Create map on demand.
1052         * lto-streamer-out.c (output_struct_function_base): Save it if
1053         available.
1054         * final.c (decl_to_instance_map): Document LTO strategy.
1056 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1057             Olivier Hainque  <hainque@adacore.com>
1059         * debug.h (decl_to_instance_map_t): New type.
1060         (decl_to_instance_map): Declare.
1061         (maybe_create_decl_to_instance_map): New inline function.
1062         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1063         to track basic block discriminators.
1064         (final_start_function_1): Initialize them.
1065         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1066         bb_discriminator.
1067         (decl_to_instance_map): New variable.
1068         (map_decl_to_instance, maybe_set_discriminator): New functions.
1069         (notice_source_line): Set discriminator.
1071 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1073         * targhooks.c (default_have_speculation_safe_value): Add
1074         ATTRIBUTE_UNUSED.
1076 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1078         * dump-context.h: Include "pretty-print.h".
1079         (dump_context::refresh_dumps_are_enabled): New decl.
1080         (dump_context::emit_item): New decl.
1081         (class dump_context): Add fields "m_test_pp" and
1082         "m_test_pp_flags".
1083         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1084         (temp_dump_context::get_dumped_text): New decl.
1085         (class temp_dump_context): Add field "m_pp".
1086         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1087         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1088         m_test_pp.
1089         (set_dump_file): Update for above change.
1090         (set_alt_dump_file): Likewise.
1091         (dump_loc): New overload, taking a pretty_printer *.
1092         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1093         to any test pretty-printer.
1094         (make_item_for_dump_gimple_stmt): New function, adapted from
1095         optinfo::add_gimple_stmt.
1096         (dump_context::dump_gimple_stmt): Call it, and use the result,
1097         eliminating the direct usage of dump_file and alt_dump_file in
1098         favor of indirectly using them via emit_item.
1099         (make_item_for_dump_gimple_expr): New function, adapted from
1100         optinfo::add_gimple_expr.
1101         (dump_context::dump_gimple_expr): Call it, and use the result,
1102         eliminating the direct usage of dump_file and alt_dump_file in
1103         favor of indirectly using them via emit_item.
1104         (make_item_for_dump_generic_expr): New function, adapted from
1105         optinfo::add_tree.
1106         (dump_context::dump_generic_expr): Call it, and use the result,
1107         eliminating the direct usage of dump_file and alt_dump_file in
1108         favor of indirectly using them via emit_item.
1109         (make_item_for_dump_printf_va): New function, adapted from
1110         optinfo::add_printf_va.
1111         (make_item_for_dump_printf): New function.
1112         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1113         and use the result, eliminating the direct usage of dump_file and
1114         alt_dump_file in favor of indirectly using them via emit_item.
1115         (make_item_for_dump_dec): New function.
1116         (dump_context::dump_dec): Call it, and use the result,
1117         eliminating the direct usage of dump_file and alt_dump_file in
1118         favor of indirectly using them via emit_item.
1119         (make_item_for_dump_symtab_node): New function, adapted from
1120         optinfo::add_symtab_node.
1121         (dump_context::dump_symtab_node): Call it, and use the result,
1122         eliminating the direct usage of dump_file and alt_dump_file in
1123         favor of indirectly using them via emit_item.
1124         (dump_context::begin_scope): Reimplement, avoiding direct usage
1125         of dump_file and alt_dump_file in favor of indirectly using them
1126         via emit_item.
1127         (dump_context::emit_item): New member function.
1128         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1129         Set up test pretty-printer on the underlying context.  Call
1130         refresh_dumps_are_enabled.
1131         (temp_dump_context::~temp_dump_context): Call
1132         refresh_dumps_are_enabled.
1133         (temp_dump_context::get_dumped_text): New member function.
1134         (selftest::verify_dumped_text): New function.
1135         (ASSERT_DUMPED_TEXT_EQ): New macro.
1136         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1137         and then without optinfo enabled.  Add uses of
1138         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1139         * dumpfile.h: Update comment for the dump_* API.
1140         * optinfo-emit-json.cc
1141         (selftest::test_building_json_from_dump_calls): Update for new
1142         param for temp_dump_context ctor.
1143         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1144         and "m_owned" field.
1145         (optinfo_item::~optinfo_item): Likewise.
1146         (optinfo::add_item): New member function.
1147         (optinfo::emit): Update comment.
1148         (optinfo::add_string): Delete.
1149         (optinfo::add_printf): Delete.
1150         (optinfo::add_printf_va): Delete.
1151         (optinfo::add_gimple_stmt): Delete.
1152         (optinfo::add_gimple_expr): Delete.
1153         (optinfo::add_tree): Delete.
1154         (optinfo::add_symtab_node): Delete.
1155         (optinfo::add_dec): Delete.
1156         * optinfo.h (class dump_context): New forward decl.
1157         (optinfo::add_item): New decl.
1158         (optinfo::add_string): Delete.
1159         (optinfo::add_printf): Delete.
1160         (optinfo::add_printf_va): Delete.
1161         (optinfo::add_gimple_stmt): Delete.
1162         (optinfo::add_gimple_expr): Delete.
1163         (optinfo::add_tree): Delete.
1164         (optinfo::add_symtab_node): Delete.
1165         (optinfo::add_dec): Delete.
1166         (optinfo::add_poly_int): Delete.
1167         (optinfo_item::optinfo_item): Remove "owned" param.
1168         (class optinfo_item): Remove field "m_owned".
1170 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1172         PR middle-end/86705
1173         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1174         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1175         requested variable alignment.
1176         (expand_one_ssa_partition): Likewise.
1177         (expand_one_var): Likewise.
1179 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1181         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1182         to speculation_safe_value_not_needed.
1184 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1186         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1187         * targhooks.c (speculation_safe_value_not_needed): New function.
1188         * target.def (have_speculation_safe_value): Update documentation.
1189         * doc/tm.texi: Regenerated.
1191 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1193         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1194         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1195         expand.
1196         (despeculate_copy<ALLI:mode>_insn): New insn.
1197         (despeculate_copyti_insn): New insn.
1198         (despeculate_simple<ALLI:mode>): New insn
1199         (despeculate_simpleti): New insn.
1200         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1201         function.
1202         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1203         aarch64_speculation_safe_value.
1204         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1206 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1208         * config/aarch64/aarch64-speculation.cc: New file.
1209         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1210         before pass_reorder_blocks.
1211         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1212         prototype.
1213         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1214         X14 and X15 when tracking speculation.
1215         * config/aarch64/aarch64.md (register name constants): Add
1216         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1217         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1218         (speculation_barrier): New insn attribute.
1219         (cmp<mode>): Allow SP in comparisons.
1220         (speculation_tracker): New insn.
1221         (speculation_barrier): Add speculation_barrier attribute.
1222         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1223         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1224         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1226 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1228         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1229         aarch64_track_speculation is true.
1230         (tb<optab><mode>1): Likewise.
1231         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1232         generate CB[N]Z when tracking speculation.
1233         (aarch64_split_compare_and_swap): Likewise.
1234         (aarch64_split_atomic_op): Likewise.
1236 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1238         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1240 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1242         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1243         (speculation_barrier): New insn.
1245 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1247         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1248         * config/arm/arm.md (speculation_barrier): New expand.
1249         (speculation_barrier_insn): New pattern.
1251 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1253         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1254         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1255         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1256         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1257         list.
1258         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1259         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1260         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1261         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1262         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1263         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1264         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1265         * builtins.c (expand_speculation_safe_value): New function.
1266         (expand_builtin): Call it.
1267         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1268         * doc/extend.texi: Document __builtin_speculation_safe_value.
1269         * doc/md.texi: Document "speculation_barrier" pattern.
1270         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1271         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1272         * doc/tm.texi: Regenerated.
1273         * target.def (have_speculation_safe_value, speculation_safe_value): New
1274         hooks.
1275         * targhooks.c (default_have_speculation_safe_value): New function.
1276         (default_speculation_safe_value): New function.
1277         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1278         (default_speculation_safe_value): Add prototype.
1280 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1282         * dump-context.h (dump_context::dump_loc): New decl.
1283         * dumpfile.c (dump_context::dump_loc): New member function.
1284         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1285         and dump_gimple_stmt.
1286         (dump_context::dump_gimple_expr_loc): Likewise, using
1287         dump_gimple_expr.
1288         (dump_context::dump_generic_expr_loc): Likewise, using
1289         dump_generic_expr.
1290         (dump_context::dump_printf_loc_va): Likewise, using
1291         dump_printf_va.
1292         (dump_context::begin_scope): Explicitly using the global function
1293         "dump_loc", rather than the member function.
1295 2018-07-31  Martin Sebor  <msebor@redhat.com>
1297         PR tree-optimization/86741
1298         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1300 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1302         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1303         depend on whether prefetch instructions will be emitted or not.
1304         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1305         will be emitted or not.
1306         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1307         (TARGET_SETMEM_PFD): New macros.
1309 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1311         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1312         (NULL_STMT_VEC_INFO): Delete.
1313         (stmt_vec_info::operator*): Likewise.
1314         (stmt_vec_info::operator gimple *): Likewise.
1315         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1316         of NULL_STMT_VEC_INFO.
1317         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1318         (vect_reassociating_reduction_p): Likewise.
1319         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1320         (vectorizable_store): Likewise.
1321         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1322         (vec_info::free_stmt_vec_infos): Likewise.
1324 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1326         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1327         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1329 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1331         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1332         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1333         (vec_info::free_stmt_vec_info): New private member functions.
1334         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1335         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1336         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1337         set_stmt_vec_info_vec and free_stmt_vec_infos.
1338         * tree-vect-loop.c (_loop_vec_info): Remove call to
1339         set_stmt_vec_info_vec.
1340         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1341         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1342         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1343         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1344         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1345         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1346         with the clearing in the xcalloc.
1347         (stmt_vec_info_vec): Delete.
1348         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1349         (vectorize_loops): Likewise.
1350         (vec_info::~vec_info): Remove argument from call to
1351         free_stmt_vec_infos.
1352         (vec_info::add_stmt): Remove vinfo argument from call to
1353         new_stmt_vec_info.
1355 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1357         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1358         rather than a gimple stmt.
1359         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1360         information for pattern statements when passed the original
1361         statement; instead wait to be passed the pattern statement itself.
1362         Don't call set_vinfo_for_stmt here.
1363         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1364         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1365         stmt_vec_infos here.
1366         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1367         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1368         stmt_vec_infos entry.
1370 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1372         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1373         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1374         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1375         * tree-vect-stmts.c (vectorizable_call): Likewise.
1376         (vectorizable_simd_clone_call): Likewise.
1378 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1380         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1381         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1382         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1383         * tree-vect-loop.c (vect_transform_loop): Likewise.
1384         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1385         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1387 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1389         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1390         (vect_dr_stmt): Delete.
1391         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1392         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1393         of DR_VECT_AUX.
1394         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1395         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1396         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1397         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1398         (vect_analyze_data_refs): Likewise.
1399         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1400         argument.
1401         (vect_find_same_alignment_drs): Likewise.
1402         (vect_slp_analyze_node_dependences): Update calls accordingly.
1403         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1404         instead of DR_VECT_AUX.
1405         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1406         of a vector data references.  Use vec_info::lookup_dr instead of
1407         DR_VECT_AUX.
1408         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1409         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1410         instead of DR_VECT_AUX.
1412 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1414         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1415         dr_vec_info.
1416         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1417         accordingly.
1418         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1419         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1420         (vect_gen_prolog_loop_niters): Likewise.
1422 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1424         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1425         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1426         (vect_known_alignment_in_bytes, vect_dr_behavior)
1427         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1428         instead of data_references.  Update calls to other routines for
1429         which the same change has been made.
1430         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1431         dr_vec_infos instead of stmt_vec_infos.
1432         (vect_analyze_data_ref_dependence): Update call accordingly.
1433         (vect_slp_analyze_data_ref_dependence)
1434         (vect_record_base_alignments): Use DR_VECT_AUX.
1435         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1436         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1437         (vector_alignment_reachable_p, vect_get_data_access_cost)
1438         (vect_peeling_supportable, vect_analyze_group_access_1)
1439         (vect_analyze_group_access, vect_analyze_data_ref_access)
1440         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1441         (vect_compile_time_alias, vect_small_gap_p)
1442         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1443         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1444         instead of data_references.  Update calls to other routines for
1445         which the same change has been made.
1446         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1447         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1448         (vect_slp_analyze_and_verify_node_alignment)
1449         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1450         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1451         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1452         above changes.
1453         (_vect_peel_info::dr): Replace with...
1454         (_vect_peel_info::dr_info): ...this new field.
1455         (vect_peeling_hash_get_most_frequent)
1456         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1457         (vect_peeling_hash_get_lowest_cost):
1458         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1459         routines for which the same change has been made.
1460         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1461         data_reference.
1462         * tree-vect-loop-manip.c (get_misalign_in_elems)
1463         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1464         above changes.
1465         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1466         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1467         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1468         (get_group_load_store_type, get_negative_load_store_type)
1469         (vect_get_data_ptr_increment, vectorizable_store)
1470         (vectorizable_load): Likewise.
1471         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1472         Update calls to other routines for which the same change has been made.
1474 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1476         * tree-vectorizer.h (vec_info::move_dr): New member function.
1477         (dataref_aux): Rename to...
1478         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1479         (_stmt_vec_info::dr_aux): Update accordingly.
1480         (_stmt_vec_info::data_ref_info): Delete.
1481         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1482         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1483         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1484         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1485         of data_ref.
1486         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1487         (STMT_VINFO_DR_INFO): New macro.
1488         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1489         (set_dr_misalignment): Update after rename of dataref_aux.
1490         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1491         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1492         initialization of STMT_VINFO_DATA_REF.
1493         * tree-vectorizer.c (vec_info::move_dr): New function.
1494         * tree-vect-patterns.c (vect_recog_bool_pattern)
1495         (vect_recog_mask_conversion_pattern)
1496         (vect_recog_gather_scatter_pattern): Use it.
1497         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1498         the "dr" and "stmt" fields of dr_vec_info instead of
1499         STMT_VINFO_DATA_REF.
1501 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1503         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1504         (is_pattern_stmt_p): Use it.
1505         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1506         on pattern statements.
1508 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1510         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1511         original stmt as a stmt_vec_info rather than a gimple stmt.
1512         (vect_pattern_recog_1): Take the statement directly as a
1513         stmt_vec_info, rather than via a gimple_stmt_iterator.
1514         Update call to vect_mark_pattern_stmts.
1515         (vect_pattern_recog): Update calls accordingly.
1517 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1519         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1520         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1521         a vect_def_type for the first argument.
1522         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1523         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1524         operand if it isn't defined by a vectorized statement.
1525         (vect_build_gather_load_calls): Remove the mask_dt argument and
1526         update calls to vect_get_vec_def_for_stmt_copy.
1527         (vectorizable_bswap): Likewise the dt argument.
1528         (vectorizable_call): Update calls to vectorizable_bswap and
1529         vect_get_vec_def_for_stmt_copy.
1530         (vectorizable_simd_clone_call, vectorizable_assignment)
1531         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1532         (vectorizable_comparison): Update calls to
1533         vect_get_vec_def_for_stmt_copy.
1534         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1535         vect_is_simple_use.
1536         (vect_get_loop_based_defs): Remove dt argument and update call
1537         to vect_get_vec_def_for_stmt_copy.
1538         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1539         and vect_get_vec_def_for_stmt_copy.
1540         (vectorizable_load): Update calls to vect_build_gather_load_calls
1541         and vect_get_vec_def_for_stmt_copy.
1542         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1543         (vectorizable_reduction, vectorizable_live_operation): Update calls
1544         to vect_get_vec_def_for_stmt_copy.
1546 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1548         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1549         and gimple stmt arguments with a stmt_vec_info.
1550         (vect_record_base_alignments): Update calls accordingly.
1551         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1552         and gimple stmt arguments with a stmt_vec_info.
1553         (vect_build_slp_tree_1): Remove vinfo argument and update call
1554         to vect_record_max_nunits.
1555         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1556         and vect_record_max_nunits.
1558 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1560         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1561         file and take a stmt_vec_info instead of a gimple stmt.
1562         (supportable_widening_operation, vect_finish_replace_stmt)
1563         (vect_finish_stmt_generation, vect_get_store_rhs)
1564         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1565         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1566         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1567         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1568         (vect_create_data_ref_ptr, bump_vector_ptr)
1569         (vect_permute_store_chain, vect_setup_realignment)
1570         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1571         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1572         (vectorizable_reduction, vectorizable_induction)
1573         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1574         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1575         than gimple stmts as arguments.
1576         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1577         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1578         (can_group_stmts_p, vect_check_gather_scatter)
1579         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1580         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1581         (vect_permute_load_chain, vect_shift_permute_load_chain)
1582         (vect_transform_grouped_load)
1583         (vect_record_grouped_load_vectors): Likewise.
1584         * tree-vect-loop.c (vect_fixup_reduc_chain)
1585         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1586         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1587         (vectorizable_reduction, vectorizable_induction)
1588         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1589         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1590         (vect_get_load_store_mask): Likewise.
1591         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1592         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1593         * tree-vect-stmts.c (vect_mark_relevant)
1594         (is_simple_and_all_uses_invariant)
1595         (exist_non_indexing_operands_for_use_p, process_use)
1596         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1597         (vect_get_vec_def_for_operand, vect_get_vec_defs)
1598         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1599         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1600         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1601         (get_negative_load_store_type, get_load_store_type)
1602         (vect_check_load_store_mask, vect_check_store_rhs)
1603         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1604         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1605         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1606         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1607         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1608         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1609         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1610         (supportable_widening_operation): Likewise.
1612 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1614         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1615         a stmt_vec_info instead of a gcall.
1616         (vect_check_gather_scatter): Update call accordingly.
1617         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1618         of a gphi.
1619         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1620         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1621         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1622         instead of a gimple stmt.
1623         (vect_transform_loop): Update calls accordingly.
1624         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1625         stmt_vec_infos instead of gimple stmts.
1626         (vect_analyze_slp_instance): Update use accordingly.
1627         * tree-vect-stmts.c (read_vector_array, write_vector_array)
1628         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1629         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1630         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1631         (vect_gen_widened_results_half, vect_get_loop_based_defs)
1632         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1633         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1634         down to subroutines.
1636 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1638         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1639         of the worklist from a vector of gimple stmts to a vector of
1640         stmt_vec_infos.
1641         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1642         (vect_mark_stmts_to_be_vectorized): Likewise
1644 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1646         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1647         statement before passing it to vect_analyze_stmt.
1648         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1649         the chain of phi vector definitions.  Track the exit phi via its
1650         stmt_vec_info.
1651         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1652         STMT_VINFO_REDUC_DEF.
1653         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1654         stmt_vec_infos to handle the statement chains.
1655         (vect_get_slp_defs): Record the first statement in the node
1656         using a stmt_vec_info.
1657         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1658         statements here and pass their stmt_vec_info down to subroutines.
1659         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1660         down to vect_finish_stmt_generation.
1661         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1662         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1663         stmt_vec_infos to subroutines.
1664         (vect_remove_stores): Use stmt_vec_infos to handle the statement
1665         chains.
1667 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1669         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1670         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1671         (vect_permute_store_chain, vect_setup_realignment)
1672         (vect_permute_load_chain, vect_shift_permute_load_chain)
1673         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1674         stmts internally, and when passing values to other vectorizer routines.
1675         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1676         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1677         (vect_analyze_loop_operations, get_initial_def_for_reduction)
1678         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1679         (vectorizable_reduction, vectorizable_induction)
1680         (vectorizable_live_operation, vect_transform_loop_stmt)
1681         (vect_transform_loop): Likewise.
1682         * tree-vect-patterns.c (vect_reassociating_reduction_p)
1683         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1684         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1685         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1686         (vect_slp_analyze_node_operations_1): Likewise.
1687         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1688         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1689         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1690         (vect_finish_stmt_generation_1, get_group_load_store_type)
1691         (get_load_store_type, vect_build_gather_load_calls)
1692         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1693         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1694         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1695         (vectorizable_store, vectorizable_load, vectorizable_condition)
1696         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1697         (supportable_widening_operation): Likewise.
1698         (vect_get_vector_types_for_stmt): Likewise.
1699         * tree-vectorizer.h (vect_dr_behavior): Likewise.
1701 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1703         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1704         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1705         (vect_permute_store_chain, vect_permute_load_chain)
1706         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1707         repeated stmt_vec_info lookups.
1708         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1709         (vect_update_ivs_after_vectorizer): Likewise.
1710         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1711         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1712         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1713         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1714         (vect_bb_slp_scalar_cost): Likewise.
1715         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1717 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1719         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1720         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1721         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1722         to get gassigns and gcalls, rather than operating on generc gimple
1723         stmts.
1724         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1725         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1726         (vectorizable_load, vect_analyze_stmt): Likewise.
1727         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1729 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1731         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1732         return stmt_vec_infos rather than gimple stmts.  Do not accept
1733         null arguments.
1734         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1735         of a gimple stmt.
1736         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1737         Update use of get_later_stmt.
1738         (vect_get_constant_vectors): Update call accordingly.
1739         (vect_schedule_slp_instance): Likewise
1740         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1741         (vect_slp_analyze_instance_dependence): Likewise.
1742         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1744 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1746         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1747         (stmt_info_for_cost::stmt_info): ...this new field.
1748         (add_stmt_costs): Update accordingly.
1749         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1750         (vect_get_known_peeling_cost): Likewise.
1751         (vect_estimate_min_profitable_iters): Likewise.
1752         * tree-vect-stmts.c (record_stmt_cost): Likewise.
1754 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1756         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1757         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1758         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1759         accordingly.
1760         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1762 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1764         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1765         a gimple stmt to a stmt_vec_info.
1766         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1768 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1770         * tree-vectorizer.h (vec_info::grouped_stores): Change from
1771         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1772         (_loop_vec_info::reduction_chains): Likewise.
1773         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1774         accordingly.
1775         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1777 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1779         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1780         a gimple stmt to a stmt_vec_info.
1781         (_stmt_vec_info::next_element): Likewise.
1782         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1783         (vect_slp_analyze_and_verify_node_alignment)
1784         (vect_analyze_group_access_1, vect_analyze_group_access)
1785         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1786         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1787         (vect_supportable_dr_alignment): Update accordingly.
1788         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1789         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1790         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1791         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1792         * tree-vect-slp.c (vect_build_slp_tree_1)
1793         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1794         (vect_split_slp_store_group, vect_analyze_slp_instance)
1795         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1796         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1797         (get_group_load_store_type, get_load_store_type)
1798         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1799         (vect_transform_stmt, vect_remove_stores): Likewise.
1801 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1803         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1804         than a gimple stmt.
1805         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1806         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1807         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1808         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1809         (vector_alignment_reachable_p, vect_get_data_access_cost)
1810         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1811         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1812         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1813         (vect_analyze_group_access_1, vect_analyze_group_access)
1814         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1815         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1816         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1817         result of vect_dr_stmt and use the stmt_vec_info instead of
1818         the associated gimple stmt.
1819         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1820         (vect_gen_prolog_loop_niters): Likewise.
1821         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1823 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1825         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1826         to a vec<stmt_vec_info>.
1827         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1828         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1829         vec<stmt_vec_info>.
1830         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1831         to a vec<stmt_vec_info>.
1832         (bst_traits::value_type, bst_traits::value_type): Likewise.
1833         (bst_traits::hash): Update accordingly.
1834         (vect_get_and_check_slp_defs): Change the stmts parameter from
1835         a vec<gimple *> to a vec<stmt_vec_info>.
1836         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1837         (vect_build_slp_tree): Likewise.
1838         (vect_build_slp_tree_2): Likewise.  Update uses of
1839         SLP_TREE_SCALAR_STMTS.
1840         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1841         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1842         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1843         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1844         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1845         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1846         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1847         (vect_get_constant_vectors, vect_get_slp_defs)
1848         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1849         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1850         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1851         instead of gimple stmts.
1852         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1853         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1854         (vect_slp_analyze_instance_dependence): Update uses of
1855         SLP_TREE_SCALAR_STMTS.
1856         (vect_slp_analyze_and_verify_node_alignment): Likewise.
1857         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1858         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1859         (get_initial_defs_for_reduction): Likewise.
1860         (vect_create_epilog_for_reduction): Likewise.
1861         (vectorize_fold_left_reduction): Likewise.
1862         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1863         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1864         (can_vectorize_live_stmts): Likewise.
1866 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1868         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1869         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1870         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1871         than gimple stmts.
1872         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1873         of a gimple stmt.
1874         (gather_scalar_reductions): Update after above interface changes.
1875         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1876         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1877         than gimple stmts.
1878         (vect_force_simple_reduction): Likewise.
1879         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1880         LOOP_VINFO_REDUCTIONS.
1881         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1883 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1885         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1886         a gimple stmt to a stmt_vec_info.
1887         * tree-vect-loop.c (vect_active_double_reduction_p)
1888         (vect_force_simple_reduction, vectorizable_reduction): Update
1889         accordingly.
1891 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1893         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1894         vec<gimple *> to a vec<stmt_vec_info>.
1895         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1896         the reduction_phis argument from a vec<gimple *> to a
1897         vec<stmt_vec_info>.
1898         (vectorizable_reduction): Likewise the phis local variable that
1899         is passed to vect_create_epilog_for_reduction.  Update for new type
1900         of SLP_TREE_VEC_STMTS.
1901         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1902         (vectorizable_live_operation): Likewise.
1903         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1904         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1906 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1908         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1909         a gimple stmt to a stmt_vec_info.
1910         (vectorizable_condition, vectorizable_live_operation)
1911         (vectorizable_reduction, vectorizable_induction): Pass back the
1912         vectorized statement as a stmt_vec_info.
1913         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1914         use of STMT_VINFO_VEC_STMT.
1915         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1916         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1917         as stmt_vec_infos rather than gimple stmts.
1918         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1919         to a stmt_vec_info.
1920         (vectorizable_live_operation): Likewise.
1921         (vectorizable_reduction, vectorizable_induction): Likewise,
1922         updating use of STMT_VINFO_VEC_STMT.
1923         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1924         of STMT_VINFO_VEC_STMT.
1925         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1926         (vectorizable_simd_clone_call, vectorizable_conversion)
1927         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1928         (vectorizable_store, vectorizable_load, vectorizable_condition)
1929         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1930         from a gimple stmt to a stmt_vec_info.
1931         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
1932         pointer to a stmt_vec_info to the vectorizable_* routines.
1934 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1936         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1937         a gimple stmt to a stmt_vec_info.
1938         (is_pattern_stmt_p): Update accordingly.
1939         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1940         (vect_record_grouped_load_vectors): Likewise.
1941         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1942         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1943         (vect_model_reduction_cost): Likewise.
1944         (vect_create_epilog_for_reduction): Likewise.
1945         (vectorizable_reduction, vectorizable_induction): Likewise.
1946         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1947         Return the stmt_vec_info for the pattern statement.
1948         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1949         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1950         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1951         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1952         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1953         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1954         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1955         (free_stmt_vec_info, vect_is_simple_use): Likewise.
1957 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1959         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1960         (vect_finish_stmt_generation): Likewise.
1961         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1962         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1963         (vect_build_gather_load_calls): Use the return value of the above
1964         functions instead of a separate call to vinfo_for_stmt.  Use narrow
1965         scopes for the input gimple stmt and wider scopes for the associated
1966         stmt_vec_info.  Use vec_info::lookup_def when setting these
1967         stmt_vec_infos from an SSA_NAME definition.
1968         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1969         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1970         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1971         (vectorizable_store, vectorizable_load, vectorizable_condition)
1972         (vectorizable_comparison): Likewise.
1973         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1974         (vectorizable_reduction): Likewise.
1976 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1978         * tree-vectorizer.h (vect_is_simple_use): Add an optional
1979         stmt_vec_info * parameter before the optional gimple **.
1980         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1981         (process_use, vect_get_vec_def_for_operand_1): Update callers.
1982         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1983         * tree-vect-loop.c (vectorizable_reduction): Likewise.
1984         (vectorizable_live_operation): Likewise.
1985         * tree-vect-patterns.c (type_conversion_p): Likewise.
1986         (vect_look_through_possible_promotion): Likewise.
1987         (vect_recog_rotate_pattern): Likewise.
1988         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1990 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1992         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1993         a typedef to a wrapper class.
1994         (NULL_STMT_VEC_INFO): New macro.
1995         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1996         (stmt_vec_info::operator*): New function.
1997         (stmt_vec_info::operator gimple *): Likewise.
1998         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1999         (add_stmt_costs): Likewise.
2000         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2001         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2002         (vect_get_known_peeling_cost): Likewise.
2003         (vect_estimate_min_profitable_iters): Likewise.
2004         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2005         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2006         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2007         (vectorizable_store, free_stmt_vec_infos): Likewise.
2008         (new_stmt_vec_info): Change return type of xcalloc to
2009         _stmt_vec_info *.
2011 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2013         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2014         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2015         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2016         a single_imm_use-based sequence.
2017         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2019 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2021         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2022         * tree-vectorizer.c (vec_info::lookup_def): New function.
2023         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2024         (vect_widened_op_tree): Likewise.
2025         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2026         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2027         (vectorizable_reduction): Likewise.
2028         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2029         of a gimple *.
2030         (vect_is_slp_reduction): Update calls accordingly.  Use
2031         vec_info::lookup_def.
2032         (vect_is_simple_reduction): Likewise
2033         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2035 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2037         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2038         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2039         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2040         of vinfo_for_stmt.
2041         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2042         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2043         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2044         (vect_is_slp_reduction, vectorizable_induction)
2045         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2046         * tree-vect-patterns.c (vect_init_pattern_stmt):
2047         (vect_determine_min_output_precision_1, vect_determine_precisions)
2048         (vect_pattern_recog): Likewise.
2049         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2050         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2051         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2052         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2053         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2054         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2055         info field from a loop to a loop_vec_info.
2057 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2059         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2060         (vec_info::add_stmt): Declare.
2061         * tree-vectorizer.c (vec_info::add_stmt): New function.
2062         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2063         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2064         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2065         (vectorizable_induction): Likewise.
2066         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2067         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2068         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2069         (vectorizable_load): Likewise.
2070         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2071         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2072         (vect_recog_gather_scatter_pattern): Likewise.
2073         (append_pattern_def_seq): Likewise.  Remove a check that is
2074         performed by add_stmt itself.
2076 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2078         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2079         which make_ssa_name was called with new_stmt before new_stmt
2080         had been created.
2082 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2084         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2085         split out from...
2086         (vect_is_slp_reduction): ...here...
2087         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2088         that are already known to be false.
2090 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2092         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2093         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2094         STMT_VINFO_NUM_SLP_USES when it's true.
2095         (vect_free_slp_instance): Add a final_p parameter and pass it to
2096         vect_free_slp_tree.
2097         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2098         (vect_analyze_slp_instance): Likewise.
2099         (vect_slp_analyze_operations): Likewise.
2100         (vect_slp_analyze_bb_1): Likewise.
2101         * tree-vectorizer.c (vec_info): Likewise.
2102         * tree-vect-loop.c (vect_transform_loop): Likewise.
2104 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2106         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2107         function is not called for second and subsequent members of
2108         a reduction group.
2110 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2112         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2113         cases for nested loops from here to ...
2114         (vect_create_epilog_for_reduction): ...here.  Only call
2115         vect_is_simple_use for inner-loop reductions.
2117 2018-07-31  Martin Liska  <mliska@suse.cz>
2119         PR gcov-profile/85338
2120         PR gcov-profile/85350
2121         PR gcov-profile/85372
2122         * profile.c (struct location_triplet): New.
2123         (struct location_triplet_hash): Likewise.
2124         (output_location): Do not output a BB that
2125         is already recorded for a line.
2126         (branch_prob): Use streamed_locations.
2128 2018-07-31  Martin Liska  <mliska@suse.cz>
2130         PR gcov-profile/85370
2131         * coverage.c (coverage_begin_function): Do not mark target
2132         clones as artificial functions.
2134 2018-07-31  Martin Liska  <mliska@suse.cz>
2136         PR gcov-profile/83813
2137         PR gcov-profile/84758
2138         PR gcov-profile/85217
2139         PR gcov-profile/85332
2140         * profile.c (branch_prob): Do not record GOTO expressions
2141         for GIMPLE statements which locations are already streamed.
2143 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2145         * gcc.c (handle_spec_function): Accept a soft_matched_part
2146         argument, as do_spec_1.  Pass it down to ...
2147         (eval_spec_function): Accept a soft_matched_part argument,
2148         and pass it down to ...
2149         (do_spec_2): Accept a soft_matched_part argument, and pass
2150         it down to do_spec_1.
2151         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2152         (handle_braces): Update call to handle_spec_function.
2153         (driver::set_up_specs): Update calls to do_spec_2.
2154         (compare_debug_dump_opt_spec_function): Likewise.
2155         (compare_debug_self_opt_spec_function): Likewise.
2157 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2159         * common.opt (nolibc): New option.
2160         * doc/invoke.texi (Link Options): Document it.
2161         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2162         * config/alpha/linux.h: Likewise.
2163         * config/arc/elf.h: Likewise.
2164         * config/arm/uclinux-elf.h: Likewise.
2165         * config/arm/unknown-elf.h: Likewise.
2166         * config/avr/avrlibc.h: Likewise.
2167         * config/bfin/bfin.h: Likewise.
2168         * config/bfin/linux.h: Likewise.
2169         * config/bfin/uclinux.h: Likewise.
2170         * config/darwin.h: Likewise.
2171         * config/darwin10.h: Likewise.
2172         * config/darwin12.h: Likewise.
2173         * config/gnu-user.h: Likewise.
2174         * config/lm32/uclinux-elf.h: Likewise.
2175         * config/pa/pa-hpux11.h: Likewise.
2176         * config/pa/pa64-hpux.h: Likewise.
2177         * config/sparc/sparc.h: Likewise.
2179 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2181         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2182         undefined variables.
2184 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2186         PR target/86640
2187         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2188         instead of GEN_INT.
2190 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2192         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2193         terminated string literal.
2195 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2197         PR rtl-optimization/85160
2198         * combine.c (is_just_move): New function.
2199         (try_combine): Allow combining two instructions into two if neither of
2200         the original instructions was a move.
2202 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2204         PR target/86673
2205         * doc/extend.texi (Global Register Variables): Discourage use of type
2206         qualifiers.
2207         (Local Register Variables): Likewise.
2209 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2211         PR tree-optimization/86506
2212         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2214 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2216         PR target/86547
2217         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2218         hard_regno, make sure no insn between `from` and `to` clobbers it.
2220 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2221             Tom de Vries  <tdevries@suse.de>
2223         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2224         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2225         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2226         PTX_DEFAULT_RUNTIME_DIM.
2227         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2229 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2231         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2232         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2233         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2235 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2237         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2238         used.
2239         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2240         predicate to reflect toc fusion has been deleted.
2241         (toc_fusion_mem_raw): Delete, no longer used.
2242         (toc_fusion_mem_wrapped): Likewise.
2243         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2244         fusion mask bit.
2245         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2246         Delete, no longer used.
2247         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2248         meant to be used for toc fusion.
2249         (rs6000_debug_print_mode): Delete toc fusion debugging.
2250         (rs6000_debug_reg_global): Likewise.
2251         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2252         fusion and secondary reload support that were never used.
2253         (rs6000_option_override_internal): Delete TOC fusion, that was only
2254         partially defined, and it did not work unless you also used the
2255         -mcmodel= switch.
2256         (rs6000_legitimate_address_p): Delete TOC fusion support.
2257         (rs6000_opt_masks): Likewise.
2258         (fusion_wrap_memory_address): Delete function, no longer used.
2259         (fusion_split_address); Delete TOC fusion support.
2260         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2261         longer used with toc fusion being deleted.
2262         (TARGET_TOC_FUSION_FP): Likewise.
2263         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2264         UNSPEC.
2265         (toc fusion spliter): Delete TOC fusion support.
2266         (toc_fusionload_<mode>): Likewise.
2267         (toc_fusionload_di): Likewise.
2268         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2269         longer needs to be named.  Rename predicate to delete TOC fusion.
2270         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2271         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2272         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2273         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2274         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2276 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2278         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2279         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2280         __int128 in built-in function prototypes.
2281         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2282         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2284 2018-07-27  Martin Sebor  <msebor@redhat.com>
2286         PR tree-optimization/86696
2287         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2288         types, including enums.
2289         (handle_char_store): Be prepared for the above function to fail.
2291 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2293         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2294         when optimization level is lower than 2 or optimize for size.
2296 2018-07-26  Martin Sebor  <msebor@redhat.com>
2298         PR tree-optimization/86043
2299         PR tree-optimization/86042
2300         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2301         (get_string_cst_length): Rename...
2302         (get_min_string_length): ...to this.  Add argument.
2303         (handle_char_store): Extend to handle multi-character stores by
2304         MEM_REF.
2305         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2306         * tree.h (initializer_zerop): Add argument.
2308 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2310         PR middle-end/86660
2311         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2312         declare target to variables if they have always,{to,from,tofrom} map
2313         kinds.
2315 2018-07-26  Martin Liska  <mliska@suse.cz>
2317         PR lto/86548
2318         * lto-wrapper.c: Add linker_output as prefix
2319         for ltrans_output_file.
2321 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2323         PR rtl-optimization/85805
2324         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2325         value for hard registers if that was written in the same mode.
2327 2018-07-26  Martin Liska  <mliska@suse.cz>
2329         PR gcov-profile/86536
2330         * gcov.c (format_gcov): Use printf format %.*f directly
2331         and do not handle special values.
2333 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2335         * common/config/arc/arc-common.c (arc_option_optimization_table):
2336         Update default optimizations for size.
2338 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2340         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2341         * config/arc/constraints.md (CfZ): New constraint.
2342         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2343         (subsf3_fpu): Likewise.
2344         (cmpsf_fpu): Likewise.
2345         (cmpsf_fpu_uneq): Likewise.
2347 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2349         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2350         accesses as well.
2351         (arc_is_uncached_mem_p): uncached applies to both the variable and
2352         the pointer.
2354 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2356         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2357         register names.
2359 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2361         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2362         field "m_scopes" from vec to auto_vec.
2364 2018-07-25  Martin Liska  <mliska@suse.cz>
2366         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2367         return type.
2369 2018-07-25  Richard Biener  <rguenther@suse.de>
2371         PR debug/86654
2372         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2373         special wrt context_die late.
2374         (gen_subprogram_die): Re-use DIEs in local scope.
2376 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2378         PR tree-optimization/86644
2379         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2381 2018-07-25  Martin Liska  <mliska@suse.cz>
2383         PR middle-end/86645
2384         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2385         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2387 2018-07-25  Martin Liska  <mliska@suse.cz>
2389         PR sanitizer/79635
2390         * params.def: Explain ASan abbreviation and provide
2391         a documentation link.
2393 2018-07-24  Martin Sebor  <msebor@redhat.com>
2395         PR tree-optimization/86622
2396         PR tree-optimization/86532
2397         * builtins.h (string_length): Declare.
2398         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
2399         (check_access): Be prepared for non-constant length ranges.
2400         (string_length): Make extern.
2401         * expr.c (string_constant): Only handle the minor non-constant
2402         array index.  Use string_constant to compute the length of
2403         a generic string constant.
2405 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2407         PR tree-optimization/86618
2408         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2409         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2411 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2413         PR tree-optimization/86636
2414         * json.cc (json::object::set): Fix comment.  Add assertions.
2415         (json::array::append): Move here from json.h.  Add comment and an
2416         assertion.
2417         (json::string::string): Likewise.
2418         * json.h (json::array::append): Move to json.cc.
2419         (json::string::string): Likewise.
2420         * optinfo-emit-json.cc
2421         (optrecord_json_writer::impl_location_to_json): Assert that we
2422         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2423         wrapper around it.  Expand the location once, rather than three
2424         times.
2425         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2426         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2427         wrappers.
2428         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2429         places.  Fix some overlong lines.
2431 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2433         * config/aarch64/aarch64-simd.md
2434         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2435         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2436         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2437         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2438         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2439         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2440         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2441         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2442         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2444 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2446         PR middle-end/86627
2447         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2448         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2449         and abs_d == d, do the power of two handling if profitable.
2451 2018-07-24  Richard Biener  <rguenther@suse.de>
2453         * match.pd: Add BIT_FIELD_REF canonicalizations.
2455 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2457         PR c/86617
2458         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2460 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2462         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2463         terminated STRING_CST object.
2465 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2467         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2469 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2471         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2472         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2473         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2474         the elements into a register.
2475         (rs6000_split_v4si_init_di_reg): Delete.
2476         (rs6000_split_v4si_init): Delete.
2477         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2478         (vsx_init_v4si): Rewrite as a define_expand.
2480 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2482         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2483         zero_extend argument from memory): New.
2485 2018-07-22  Martin Sebor  <msebor@redhat.com>
2487         PR bootstrap/86621
2488         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2489         diagnosing calls with unknown arguments unless -Walloca-larger-than
2490         is restricted to less than PTRDIFF_MAX bytes.
2492 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2494         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2496 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2498         * pretty-print.c (text_info::set_location): Remove redundant
2499         "line_table" parameter from call to rich_location::set_range.
2501 2018-07-20  Martin Sebor  <msebor@redhat.com>
2503         PR middle-end/82063
2504         * builtins.c (expand_builtin_alloca): Adjust.
2505         * calls.c (alloc_max_size): Simplify.
2506         * cgraphunit.c (cgraph_node::expand): Adjust.
2507         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2508         variables.
2509         (frame_larger_than_size): Same.
2510         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2511         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2512         Initialize.
2513         * doc/invoke.texi (GCC Command Options): Document option arguments.
2514         Explain byte-size arguments and suffixes.
2515         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2516         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2517         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2518         * doc/options.texi (UInteger): Expand.
2519         (Host_Wide_Int, ByteSize): Document new properties.
2520         * final.c (final_start_function_1): Include sizes in an error message.
2521         * function.c (frame_offset_overflow): Same.
2522         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2523         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2524         Diagnose unbounded alloca calls only for limits of less than
2525         PTRDIFF_MAX.
2526         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2527         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2528         for alloca(0).
2529         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2530         only for limits of less than PTRDIFF_MAX.
2531         * langhooks-def.h (lhd_handle_option): Change function argument
2532         to HOST_WIDE_INT.
2533         * langhooks.c (lhd_handle_option): Same.
2534         * langhooks.h (handle_option): Same.
2535         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2536         ByteSize flags.
2537         (var_type, var_type_struct): Same.
2538         (var_set): Handle ByteSize flag.
2539         * optc-gen.awk: Add comments to output to ease debugging.  Make
2540         use of HOST_WIDE_INT where appropriate.
2541         * opts-gen-save.awk:  Use %lx to format unsigned long.
2542         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2543         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2544         arguments.  Parse bytes-size suffixes.
2545         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2546         (enum_value_to_arg): Same.
2547         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2548         (handle_option): Adjust.
2549         (generate_option): Change function argument to HOST_WIDE_INT.
2550         (cmdline_handle_error): Adjust.
2551         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2552         (set_option): Change function argument to HOST_WIDE_INT.
2553         (option_enabled): Handle cl_host_wide_int.
2554         (get_option_state): Handle CLVC_SIZE.
2555         (control_warning_option): Same.
2556         * opts.c (common_handle_option): Change function argument to
2557         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2558         OPT_Wvla_larger_than_.
2559         * opts.h (enum cl_var_type): Add an enumerator.
2560         * stor-layout.c (layout_decl): Print a more meaningful warning.
2561         * toplev.c (output_stack_usage): Adjust.
2563 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
2565         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2566         call to inline_expand_builtin_string_cmp.
2567         (expand_builtin_strcmp): Likewise.
2568         (expand_builtin_strncmp): Likewise.
2569         (inline_string_cmp): Delete the last parameter, change char_type_node
2570         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2571         two operands.
2572         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2573         the inlining expansion on target where the type of the call has same or 
2574         narrower precision than unsigned char.
2576 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2578         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2579         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2580         * common.opt (fsave-optimization-record): New option.
2581         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2582         * doc/invoke.texi (-fsave-optimization-record): New option.
2583         * dumpfile.c: Include "optinfo-emit-json.h".
2584         (struct kv_pair): Move to coretypes.h.
2585         (optgroup_options): Make non-static.
2586         (dump_context::end_scope): Call
2587         optimization_records_maybe_pop_dump_scope.
2588         * dumpfile.h (optgroup_options): New decl.
2589         * json.cc: New file.
2590         * json.h: New file.
2591         * optinfo-emit-json.cc: New file.
2592         * optinfo-emit-json.h: New file.
2593         * optinfo.cc: Include "optinfo-emit-json.h".
2594         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2595         (optinfo_enabled_p): Check optimization_records_enabled_p.
2596         (optinfo_wants_inlining_info_p): Likewise.
2597         * optinfo.h: Update comment.
2598         * profile-count.c (profile_quality_as_string): New function.
2599         * profile-count.h (profile_quality_as_string): New decl.
2600         (profile_count::quality): New accessor.
2601         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2602         and optinfo_emit_json_cc_tests.
2603         * selftest.h (selftest::json_cc_tests): New decl.
2604         (selftest::optinfo_emit_json_cc_tests): New decl.
2605         * toplev.c: Include "optinfo-emit-json.h".
2606         (compile_file): Call optimization_records_finish.
2607         (do_compile): Call optimization_records_start.
2608         * tree-ssa-live.c: Include optinfo.h.
2609         (remove_unused_scope_block_p): Retain inlining information if
2610         optinfo_wants_inlining_info_p returns true.
2612 2018-07-20  Richard Biener  <rguenther@suse.de>
2614         PR debug/86585
2615         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2616         to cover -flto-partition=none.
2618 2018-07-20  Martin Liska  <mliska@suse.cz>
2620         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2621         (get_decl_source_range): Remove unused function.
2623 2018-07-20  Richard Biener  <rguenther@suse.de>
2625         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2626         (struct vn_phi_s): Likewise.
2627         (struct vn_reference_s): Likewise.
2628         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2629         for searching the slot of an entry known to be in the hash itself.
2630         (vn_phi_hasher::equal): Likewise.
2631         (vn_reference_hasher::equal): Likewise.
2632         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2633         globals.
2634         (optimistic_info, current_info): Remove, keeping only valid_info.
2635         (vn_reference_lookup_1): Remove fallback lookup.
2636         (vn_reference_lookup_2): Likewise.
2637         (vn_nary_op_lookup_1): Likewise.
2638         (vn_phi_lookup): Likewise.
2639         (vn_nary_build_or_lookup_1): Make sure to not chain the built
2640         hash element.
2641         (vn_reference_insert): Adjust, chain the inserted hash element
2642         at last_inserted_ref.
2643         (vn_reference_insert_pieces): Likewise.
2644         (visit_reference_op_call): Likewise.
2645         (vn_nary_op_insert_into): Chain the inserted hash element at
2646         last_inserted_nary.
2647         (vn_nary_op_insert_pieces): Adjust.
2648         (vn_nary_op_insert): Likewise.
2649         (vn_nary_op_insert_stmt): Likewise.
2650         (vn_phi_insert): Adjust, chain the inserted hash element at
2651         last_inserted_phi.
2652         (process_scc): Remove clearing and copying the optimistic
2653         table.  Instead remove elements inserted during an optimistic
2654         iteration from the single table we maintain.
2655         (init_scc_vn): Adjust.
2656         (free_scc_vn): Likewise.
2657         (sccvn_dom_walker::record_cond): Likewise.
2658         (sccvn_dom_walker::after_dom_children): Likewise.
2660 2018-07-19  Martin Sebor  <msebor@redhat.com>
2662         PR tree-optimization/84047
2663         PR tree-optimization/83776
2664         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2665         (check_array_bounds): Call it.
2667 2018-07-19  Martin Sebor  <msebor@redhat.com>
2669         * align.h (align_flags): Use member initialization.
2671 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
2673         * Makefile.in (OBJS): Add optinfo.o.
2674         * coretypes.h (class symtab_node): New forward decl.
2675         (struct cgraph_node): New forward decl.
2676         (class varpool_node): New forward decl.
2677         * dump-context.h: New file.
2678         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2679         "tree-pass.h".
2680         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2681         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2682         (set_alt_dump_file): Likewise.
2683         (dump_context::~dump_context): New dtor.
2684         (dump_gimple_stmt): Move implementation to...
2685         (dump_context::dump_gimple_stmt): ...this new member function.
2686         Add the stmt to any pending optinfo, creating one if need be.
2687         (dump_gimple_stmt_loc): Move implementation to...
2688         (dump_context::dump_gimple_stmt_loc): ...this new member function.
2689         Start a new optinfo and add the stmt to it.
2690         (dump_gimple_expr): Move implementation to...
2691         (dump_context::dump_gimple_expr): ...this new member function.
2692         Add the stmt to any pending optinfo, creating one if need be.
2693         (dump_gimple_expr_loc): Move implementation to...
2694         (dump_context::dump_gimple_expr_loc): ...this new member function.
2695         Start a new optinfo and add the stmt to it.
2696         (dump_generic_expr): Move implementation to...
2697         (dump_context::dump_generic_expr): ...this new member function.
2698         Add the tree to any pending optinfo, creating one if need be.
2699         (dump_generic_expr_loc): Move implementation to...
2700         (dump_context::dump_generic_expr_loc): ...this new member
2701         function.  Add the tree to any pending optinfo, creating one if
2702         need be.
2703         (dump_printf): Move implementation to...
2704         (dump_context::dump_printf_va): ...this new member function.  Add
2705         the text to any pending optinfo, creating one if need be.
2706         (dump_printf_loc): Move implementation to...
2707         (dump_context::dump_printf_loc_va): ...this new member function.
2708         Start a new optinfo and add the stmt to it.
2709         (dump_dec): Move implementation to...
2710         (dump_context::dump_dec): ...this new member function.  Add the
2711         value to any pending optinfo, creating one if need be.
2712         (dump_context::dump_symtab_node): New member function.
2713         (dump_context::get_scope_depth): New member function.
2714         (dump_context::begin_scope): New member function.
2715         (dump_context::end_scope): New member function.
2716         (dump_context::ensure_pending_optinfo): New member function.
2717         (dump_context::begin_next_optinfo): New member function.
2718         (dump_context::end_any_optinfo): New member function.
2719         (dump_context::s_current): New global.
2720         (dump_context::s_default): New global.
2721         (dump_scope_depth): Delete global.
2722         (dumpfile_ensure_any_optinfo_are_flushed): New function.
2723         (dump_symtab_node): New function.
2724         (get_dump_scope_depth): Reimplement in terms of dump_context.
2725         (dump_begin_scope): Likewise.
2726         (dump_end_scope): Likewise.
2727         (selftest::temp_dump_context::temp_dump_context): New ctor.
2728         (selftest::temp_dump_context::~temp_dump_context): New dtor.
2729         (selftest::verify_item): New function.
2730         (ASSERT_IS_TEXT): New macro.
2731         (ASSERT_IS_TREE): New macro.
2732         (ASSERT_IS_GIMPLE): New macro.
2733         (selftest::test_capture_of_dump_calls): New test.
2734         (selftest::dumpfile_c_tests): Call it.
2735         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2736         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2737         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2738         descriptive comment.
2739         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2740         (dump_node, dump_bb): Move these unrelated decls.
2741         (class dump_manager): Add leading comment.
2742         * optinfo.cc: New file.
2743         * optinfo.h: New file.
2745 2018-07-19  Michael Collison  <michael.collison@arm.com>
2746             Richard Henderson <rth@redhat.com>
2748         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2749         (subti): Handle op1 zero.
2750         (subvti4, usub4ti4): New.
2751         (*sub<GPI>3_compare1_imm): New.
2752         (sub<GPI>3_carryinCV): New.
2753         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2754         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2756 2018-07-19  Michael Collison  <michael.collison@arm.com>
2757             Richard Henderson <rth@redhat.com>
2759         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2760         (addti3): Create simpler code if low part is already known to be 0.
2761         (addvti4, uaddvti4): New.
2762         (*add<GPI>3_compareC_cconly_imm): New.
2763         (*add<GPI>3_compareC_cconly): New.
2764         (*add<GPI>3_compareC_imm): New.
2765         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2766         handle constants within this pattern..
2767         (*add<GPI>3_compareV_cconly_imm): New.
2768         (*add<GPI>3_compareV_cconly): New.
2769         (*add<GPI>3_compareV_imm): New.
2770         (add<GPI>3_compareV): New.
2771         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2772         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2773         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2774         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2775         with 'comparison' operator.
2776         (*add<GPI>3_compareV_cconly_imm): Ditto.
2777         (*add<GPI>3_compareV_cconly): Ditto.
2778         (*add<GPI>3_compareV_imm): Ditto.
2779         (add<GPI>3_compareV): Ditto.
2780         (add<mode>3_carryinC): Ditto.
2781         (*add<mode>3_carryinC_zero): Ditto.
2782         (*add<mode>3_carryinC): Ditto.
2783         (add<mode>3_carryinV): Ditto.
2784         (*add<mode>3_carryinV_zero): Ditto.
2785         (*add<mode>3_carryinV): Ditto.
2787 2018-07-19  Michael Collison  <michael.collison@arm.com>
2788             Richard Henderson <rth@redhat.com>
2790         * config/aarch64/aarch64-modes.def (CC_V): New.
2791         * config/aarch64/aarch64-protos.h
2792         (aarch64_addti_scratch_regs): Declare
2793         (aarch64_subvti_scratch_regs): Declare.
2794         (aarch64_expand_subvti): Declare.
2795         (aarch64_gen_unlikely_cbranch): Declare
2796         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2797         for signed overflow using CC_Vmode.
2798         (aarch64_get_condition_code_1): Handle CC_Vmode.
2799         (aarch64_gen_unlikely_cbranch): New function.
2800         (aarch64_addti_scratch_regs): New function.
2801         (aarch64_subvti_scratch_regs): New function.
2802         (aarch64_expand_subvti): New function.
2804 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2806         * config/aarch64/aarch64-option-extensions.def: New entry for profile
2807         extension.
2808         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2809         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2810         extension.
2812 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2814         PR target/83009
2815         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2816         address check not strict.
2818 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2820         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2821         Umq with Umn.
2822         (store_pair_lanes<mode>): Likewise.
2823         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2824         enum value 'ADDR_QUERY_LDP_STP_N'.
2825         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2826         (aarch64_print_address_internal): Add declaration.
2827         (aarch64_print_ldpstp_address): Remove.
2828         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2829         (aarch64_print_operand): Change printing of 'y'.
2830         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2831         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2832         'true' rather than '1'.
2833         * config/aarch64/constraints.md (Uml): Likewise.
2834         (Uml): Rename to Umn.
2835         (Umq): Remove.
2837 2018-07-19  Richard Biener  <rguenther@suse.de>
2839         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2840         a trailing array.
2841         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2842         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2843         (vn_reference_hasher): Likewise.
2844         (struct vn_tables_s): Remove obstack and alloc-pool members.
2845         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2846         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2847         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2848         (vn_reference_insert_pieces): Likewise.
2849         (alloc_vn_nary_op_noinit): Adjust.
2850         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2851         (vn_phi_eq): Adjust.
2852         (shared_lookup_phiargs): Remove.
2853         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2854         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2855         (visit_reference_op_call): Likewise.
2856         (copy_nary, copy_phi, copy_reference): Remove.
2857         (process_scc): Rewind the obstack when iterating.  Do not
2858         copy the elements to valid_info but just move them from one
2859         hashtable to the other.
2860         (allocate_vn_table): Adjust.
2861         (free_vn_table): Likewise.
2862         (init_scc_vn): Likewise.
2863         (free_scc_vn): Likewise.
2865 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
2867         PR target/86560
2868         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2869         indirect_return as function type attribute.
2870         (ix86_attribute_table): Change indirect_return to function
2871         type attribute.
2872         * doc/extend.texi: Update indirect_return attribute.
2874 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
2876         * wide-int.h (widest2_int): New.
2877         * gimple-fold.c (arith_overflowed_p): Use it.
2878         * tree.h (widest2_int_cst): New.
2879         * tree-vrp.c (wide_int_binop_overflow): Rename from
2880         vrp_int_const_binop.
2881         Rewrite to work on trees.
2882         (extract_range_from_multiplicative_op_1): Abstract code to...
2883         (wide_int_range_min_max): ...here.
2884         (wide_int_range_cross_product): ...and here.
2885         (extract_range_from_binary_expr_1): Abstract overflow code to...
2886         (wide_int_range_mult_wrapping): ...here.
2887         * tree-vrp.h (wide_int_range_cross_product): New.
2888         (wide_int_range_mult_wrapping): New.
2890 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
2891             Julia Koval  <julia.koval@intel.com>
2893         * config/i386/x86-tune-costs.h (skylake_memcpy,
2894         skylake_memset): Replace rep_prefix with unrolling for size 512.
2896 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
2898         PR middle-end/86544
2899         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2900         in last stmt.
2902 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2904         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2905         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2906         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2907         previously known as "PowerPC AltiVec Built-in Functions".  Move
2908         some material to new subsubsections "PowerPC AltiVec Built-in
2909         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2910         ISA 2.07".
2911         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2912         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2913         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2914         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2916 2018-07-18  Richard Biener  <rguenther@suse.de>
2918         PR tree-optimization/86557
2919         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2920         EXACT_DIV_EXPR.
2922 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
2924         * config/s390/s390.c (s390_function_profiler): Generate CFI.
2926 2018-07-17  Jeff Law  <law@redhat.com>
2928         * config/arm/arm.c (get_label_padding): Update for recent
2929         changes to label_to_alignment.
2931         PR tree-optimization/86010
2932         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2934         * config/mips/mips.c (vr4130_align_insns): Update for recent
2935         changes to label_to_alignment.
2937         * config/frv/frv.c (frv_label_align): Update for recent changes
2938         to label_to_alignment.
2940         * config/nios2/nios2.c (nios2_label_align): Update for recent
2941         changes which dropped ALIGN_LABELS_LOG.
2943 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
2945         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2946         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2948 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
2950         * config/arc/arc.c (arc_label_align): Use align_labels instead of
2951         deprecated align_labels_log.
2953 2018-07-17  Richard Biener  <rguenther@suse.de>
2955         PR lto/86456
2956         * dwarf2out.c (init_sections_and_labels): Always generate
2957         a debug_line_str_section for early LTO debug.
2958         (dwarf2out_finish): Reset debug_line_str_hash output early.
2959         Bump counter for extra dwarf5 .debug_loc labels to not conflict
2960         with fat LTO part.
2961         (dwarf2out_early_finish): Output debug_line_str.
2963 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2965         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2966         index register on z196 or later.
2968 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2970         * config/s390/s390.c (s390_default_align): Set default function
2971         alignment to 16.
2972         (s390_override_options_after_change): Call s390_default align.
2973         (s390_option_override_internal): Call s390_default_align.
2974         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2976 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2978         PR middle-end/86542
2979         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2980         to _looptemp_ clauses, other than the first two.
2982 2018-07-17  Martin Liska  <mliska@suse.cz>
2984         * opts.c: Do not enable OPT_falign_* for -Os.
2986 2018-07-17  Martin Liska  <mliska@suse.cz>
2988         * align.h (MAX_CODE_ALIGN): New.
2989         (MAX_CODE_ALIGN_VALUE): New.
2990         * common/config/i386/i386-common.c (ix86_handle_option):
2991         (MAX_CODE_ALIGN): Moved to align.h.
2992         * final.c (MAX_CODE_ALIGN): Likewise.
2993         * opts.c (parse_and_check_align_values):
2994         (MAX_CODE_ALIGN): Likewise.
2995         (MAX_CODE_ALIGN_VALUE): Likewise.
2997 2018-07-17  Martin Liska  <mliska@suse.cz>
2999         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3000         in order to fulfil coding style.
3001         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3002         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3003         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3004         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3005         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3006         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3007         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3008         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3009         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3011 2018-07-17  Martin Liska  <mliska@suse.cz>
3013         * align.h: New file.
3014         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
3015         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3016         align_flags of label_to_alignment.
3017         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
3018         class.
3019         * config/m68k/m68k.c: Do not use removed align_labels_value and
3020         align_loops_value.
3021         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3022         (LOOP_ALIGN): Likewise.
3023         (LABEL_ALIGN): Likewise.
3024         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3025         Remove not used macro.
3026         (rs6000_loop_align): Change return type to align_flags.
3027         (rs6000_loop_align_max_skip): Remove.
3028         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3029         Change return type to align_flags.
3030         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3031         Remove not used macro.
3032         (rs6000_loop_align):  Change return type to align_flags.
3033         (rs6000_loop_align_max_skip): Remove.
3034         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3035         * config/rx/rx-protos.h (rx_align_for_label): Make it
3036         static function.
3037         * config/rx/rx.c (rx_align_for_label): Change return type
3038         to align_flags.
3039         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3040         macro definitions.
3041         into align_flags class.
3042         (LABEL_ALIGN): Likewise.
3043         (LOOP_ALIGN): Likewise.
3044         * config/s390/s390.c (s390_label_align): Use align_flags
3045         class member.
3046         (s390_asm_output_function_label): Likewise.
3047         * config/sh/sh.c (sh_override_options_after_change):
3048         Use align_flags class directly without macros.
3049         (find_barrier): Likewise.
3050         (barrier_align): Likewise.
3051         (sh_loop_align): Likewise.
3052         * config/spu/spu.c (spu_option_override):
3053         Use align_flags_tuple::get_value instead of removed macros.
3054         (spu_sched_init): Likewise.
3055         * config/spu/spu.h (GTY): Likewise.
3056         * config/visium/visium.c (visium_option_override):
3057         Set "8" as default secondary alignment.
3058         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3059         in order to guarantee secondary alignment of 8.
3060         * coretypes.h: Include align.h header file.
3061         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3062         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3063         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3064         * doc/tm.texi.in: Likewise.
3065         * final.c (struct label_alignment): Remove not used structure.
3066         (LABEL_ALIGN): Change type to align_flags.
3067         (LOOP_ALIGN): Likewise.
3068         (JUMP_ALIGN): Likewise.
3069         (default_loop_align_max_skip): Remove.
3070         (default_label_align_max_skip): Likewise.
3071         (default_jump_align_max_skip): Likewise.
3072         (default_label_align_after_barrier_max_skip):
3073         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3074         (LABEL_TO_MAX_SKIP): Remove.
3075         (label_to_alignment): Return align_flags type instead of integer.
3076         (label_to_max_skip): Remove.
3077         (align_fuzz): Use align_flags type.
3078         (compute_alignments): Use align_flags type and use align_flags::max
3079         to combine multiple alignments.
3080         (grow_label_align): Grow vec instead of C array.
3081         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3082         (shorten_branches):  Use align_flags type and use align_flags::max
3083         to combine multiple alignments.
3084         (final_scan_insn_1): Remove usage of secondary alignment that comes
3085         from label alignment, but instead use proper secondary alignment
3086         which is computed in grow_label_align.
3087         * flags.h (struct align_flags_tuple): Move to align.h.
3088         (struct align_flags): Likewise.
3089         (state_align_loops): Rename to align_loops.
3090         (state_align_jumps): Rename to align_jumps.
3091         (state_align_labels): Rename to align_labels.
3092         (state_align_functions): Rename to align_functions.
3093         (align_loops_log): Remove.
3094         (align_jumps_log): Remove.
3095         (align_labels_log): Remove.
3096         (align_functions_log): Remove.
3097         (align_loops_max_skip): Remove.
3098         (align_jumps_max_skip): Remove.
3099         (align_labels_max_skip): Remove.
3100         (align_functions_max_skip): Remove.
3101         (align_loops_value): Remove.
3102         (align_jumps_value): Remove.
3103         (align_labels_value): Remove.
3104         (align_functions_value): Remove.
3105         * output.h (label_to_alignment): Change return type to align_flags.
3106         (label_to_max_skip): Remove.
3107         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3108         jump_align_max_skip macros.
3109         * targhooks.h (default_loop_align_max_skip): Remove.
3110         (default_label_align_max_skip): Likewise.
3111         (default_jump_align_max_skip): Likewise.
3112         (default_label_align_after_barrier_max_skip): Remove.
3113         * toplev.c (read_log_maxskip): Use ::normalize function.
3114         (parse_N_M): Remove not used argument and also call ::normalize.
3115         (parse_alignment_opts): Do not pass unused arguments.
3116         * varasm.c (assemble_start_function): Use directly align_functions
3117         instead of removed macros.
3118         * system.h: Do not poison removed macros.
3120 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3122         PR middle-end/86539
3123         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3124         and cond temporaries don't have reference type if iterator has
3125         pointer type.  For init use &for_pre_body instead of pre_p if
3126         for_pre_body is non-empty.
3128 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3130         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3131         double-double modes to SFmode directly directly.
3132         (trunc<mode>sf2_fprs): Delete.
3134 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3136         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3137         for conversions between IFmode and the decimal floating point modes.
3138         (init_float128_ieee): Use the correct names for conversions between
3139         KFmode and the decimal floating point modes.
3141 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3143         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3144         for the conversions between TDmode and IFmode.
3145         (init_float128_ieee): Use more correct names for the conversions
3146         between TDmode and KFmode.
3148 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3150         PR tree-optimization/86526
3151         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3152         (inline_expand_builtin_string_cmp): Likewise.
3153         (inline_string_cmp): Likewise.  Use c_readstr instead of
3154         builtin_memcpy_read_str.  Add unit_mode temporary.
3156 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3158         PR middle-end/86528
3159         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3160         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3162 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3164         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3165         Alphabetize prototypes of built-in functions, separating out
3166         built-in functions that are listed in this section but should be
3167         described elsewhere.
3169 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3171         PR target/86511
3172         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3173         conditional move when trapping comparison was split to a
3174         non-trapping one (and vice versa).
3176 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3178         * config/s390/s390.c (s390_function_profiler): Generate nops
3179         instead of profiler call sequences.
3180         * config/s390/s390.opt: Add the new option.
3182 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3184         * config/s390/s390.c (s390_function_profiler): Generate
3185         __mcount_loc section.
3186         * config/s390/s390.opt: Add the new option.
3188 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3190         * common.opt: Add the new warning.
3191         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3192         %r0,__fentry__" when -mfentry is specified.
3193         (s390_option_override_internal): Disallow -mfentry for 31-bit
3194         CPUs.
3195         * config/s390/s390.opt: Add the new option.
3197 2018-07-16  Richard Biener  <rguenther@suse.de>
3199         PR lto/86523
3200         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3201         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3203 2018-07-16  Martin Liska  <mliska@suse.cz>
3205         PR ipa/86529
3206         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3207         to ::get_create.
3209 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3211         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3213 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3215         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3216         for ARCHS4x.
3217         * config/arc/arc-cpus.def (hs4x): New cpu.
3218         (hs4xd): Likewise.
3219         * config/arc/arc-tables.opt: Regenerate.
3220         * config/arc/arc.c (arc_sched_issue_rate): New function.
3221         (TARGET_SCHED_ISSUE_RATE): Define.
3222         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3223         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3224         fpu_cvt.
3225         (attr tune): Add ARCHS4x tune values.
3226         (attr tune_dspmpy): Define.
3227         (*tst): Correct instruction type.
3228         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3229         * config/arc/arcHS4x.md: New file.
3230         * config/arc/fpu.md: Update instruction type attributes.
3231         * config/arc/t-multilib: Regenerate.
3233 2018-07-16  Tom de Vries  <tdevries@suse.de>
3235         PR debug/86455
3236         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3238 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3240         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3241         early clobber.
3243 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3245         PR tree-optimization/86514
3246         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3247         conversion to a boolean type from a type with greater precision.
3249 2018-07-16  Tom de Vries  <tdevries@suse.de>
3251         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3252         dump_flags request TDF_SLIM.
3254 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3256         * fold-const.c (int_const_binop_1): Abstract...
3257         (wide_int_binop): ...wide int code here.
3258         (poly_int_binop): ...poly int code here.
3259         Abstract the rest of int_const_binop_1 into int_const_binop.
3260         * fold-const.h (wide_int_binop): New.
3261         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3262         Remove useless PLUS/MINUS_EXPR case.
3263         (zero_nonzero_bits_from_vr): Move wide int code...
3264         (zero_nonzero_bits_from_bounds): ...here.
3265         (extract_range_from_binary_expr_1): Move mask optimization code...
3266         (range_easy_mask_min_max): ...here.
3267         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3268         (range_easy_mask_min_max): New.
3270 2018-07-15  Jeff Law  <law@redhat.com>
3272         PR target/85993
3273         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3274         block.
3276 2018-07-14  Jim Wilson  <jimw@sifive.com>
3278         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3280 2018-07-14  Paul Koning  <ni1d@arrl.net>
3282         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3284 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3286         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3287         copying section.
3289 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3290             Steve Munroe  <munroesj52@gmail.com>
3292         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3293         (_mm_andnot_si128): Likewise.
3294         (_mm_or_si128): Likewise.
3295         (_mm_xor_si128): Likewise.
3297 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3299         PR middle-end/78809
3300         * builtins.c (expand_builtin_memcmp): Inline the calls first
3301         when result_eq is false.
3302         (expand_builtin_strcmp): Inline the calls first.
3303         (expand_builtin_strncmp): Likewise.
3304         (inline_string_cmp): New routine. Expand a string compare
3305         call by using a sequence of char comparison.
3306         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3307         a call to str(n)cmp/memcmp.
3308         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3309         New option.
3310         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3312 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3314         * config/arm/driver-arm.c: Include arm-native.h.
3315         (host_detect_local_cpu): Use auto-generated data tables.
3316         (vendors, arm_cpu_table): Delete.  Move part information to ...
3317         * config/arm/arm-cpus.in: ... here.
3318         * config/arm/parsecpu.awk (gen_native): New function.
3319         (vendor, part): New CPU fields.
3320         (END): Add support for building the native CPU detection tables.
3321         * config/arm/t-arm (arm-native.h): Add build rule.
3322         (driver-arm.o): Add dependency on arm-native.h.
3324 2018-07-13  Richard Biener  <rguenther@suse.de>
3326         PR middle-end/85974
3327         * match.pd (addr1 - addr2): Allow either of the operand to
3328         have a conversion.
3330 2018-07-13  Tom de Vries  <tdevries@suse.de>
3332         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3333         in remap_ssa_name.
3335 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3337         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3338         arrays instead of numbered variables.
3340 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3342         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3343         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3345 2018-07-13  Richard Biener  <rguenther@suse.de>
3347         PR debug/86452
3348         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3349         instead of get_context_die.
3351 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3352             Richard Biener  <rguenther@suse.de>
3354         PR middle-end/86489
3355         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3356         that the loop latch destination where phi is defined.
3358 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3360         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3361         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3362         (riscv_set_current_function): Extract getting interrupt type to new
3363         function.
3364         (riscv_get_interrupt_type): New function.
3365         (riscv_merge_decl_attributes): New function, checking interrupt type is
3366         same.
3367         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3369 2018-07-12  Paul Koning  <ni1d@arrl.net>
3371         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3372         directive.
3374 2018-07-12  Paul Koning  <ni1d@arrl.net>
3376         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3377         zero reference, add doloop_end instead.
3378         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3379         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3380         detail for doloop_end.
3382 2018-07-12  Martin Sebor  <msebor@redhat.com>
3384         PR c/86453
3385         * attribs.c (decl_attributes): Reject conflicting attributes before
3386         calling attribute handlers.
3388 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3390         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3391          parameter.
3392         (gcc::dump_manager::get_dump_file_name): likewise.
3393         (dump_begin): Likewise.
3394         * dumpfile.h (dump_begin): Update prototype.
3395         (gcc::dump_manager::get_dump_file_name,
3396         gcc::dump_manager::get_dump_file_name): Update prototype.
3398 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3400         * internal-fn.h (vectorizable_internal_fn_p): New function.
3401         * tree-vect-slp.c (compatible_calls_p): Likewise.
3402         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3403         to internal functions.
3404         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3406 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3408         * fold-const.h (inverse_conditions_p): Declare.
3409         * fold-const.c (inverse_conditions_p): New function.
3410         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3411         that test the inverse condition of a conditional internal function.
3412         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3413         * internal-fn.c (internal_fn_mask_index): Handle conditional
3414         internal functions.
3415         (vectorized_internal_fn_supported_p): New function.
3416         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3417         (any_pred_load_store): Replace with...
3418         (need_to_predicate): ...this new variable.
3419         (redundant_ssa_names): New variable.
3420         (ifcvt_can_use_mask_load_store): Move initial checks to...
3421         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3422         for which a conditional internal function exists.
3423         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3424         instead of ifcvt_can_use_mask_load_store.  Update after variable
3425         name change.
3426         (predicate_load_or_store): New function, split out from
3427         predicate_mem_writes.
3428         (check_redundant_cond_expr): New function.
3429         (value_available_p): Likewise.
3430         (predicate_rhs_code): Likewise.
3431         (predicate_mem_writes): Rename to...
3432         (predicate_statements): ...this.  Use predicate_load_or_store
3433         and predicate_rhs_code.
3434         (combine_blocks, tree_if_conversion): Update after above name changes.
3435         (ifcvt_local_dce): Handle redundant_ssa_names.
3436         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3437         general conditional functions.
3438         * tree-vect-stmts.c (vectorizable_call): Likewise.
3440 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3441             Alan Hayward  <alan.hayward@arm.com>
3442             David Sherwood  <david.sherwood@arm.com>
3444         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3445         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3446         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3447         plus and minus and convert them into IFN_COND_FMA-based sequences.
3448         (convert_mult_to_fma): Handle conditional plus and minus.
3450 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3452         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3453         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3454         (cond_fnms_optab): New optabs.
3455         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3456         internal functions.
3457         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3458         * internal-fn.h (get_conditional_internal_fn): Declare.
3459         (get_unconditional_internal_fn): Likewise.
3460         * internal-fn.c (cond_ternary_direct): New macro.
3461         (expand_cond_ternary_optab_fn): Likewise.
3462         (direct_cond_ternary_optab_supported_p): Likewise.
3463         (FOR_EACH_COND_FN_PAIR): Likewise.
3464         (get_conditional_internal_fn): New function.
3465         (get_unconditional_internal_fn): Likewise.
3466         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3467         (gimple_match_op::gimple_match_op): Add a new overload for 5
3468         operands.
3469         (gimple_match_op::set_op): Likewise.
3470         (gimple_resimplify5): Declare.
3471         * genmatch.c (decision_tree::gen): Generate simplifications for
3472         5 operands.
3473         * gimple-match-head.c (gimple_simplify): Define an overload for
3474         5 operands.  Handle calls with 5 arguments in the top-level overload.
3475         (convert_conditional_op): Handle conversions from unconditional
3476         internal functions to conditional ones.
3477         (gimple_resimplify5): New function.
3478         (build_call_internal): Pass a fifth operand.
3479         (maybe_push_res_to_seq): Likewise.
3480         (try_conditional_simplification): Try converting conditional
3481         internal functions to unconditional internal functions.
3482         Handle 3-operand unconditional forms.
3483         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3484         Define ternary equivalents of the current rules for binary conditional
3485         internal functions.
3486         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3487         ternary operations.
3488         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3489         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3490         (optab): Handle them.
3491         (SVE_COND_FP_TERNARY): New int iterator.
3492         (sve_fmla_op, sve_fmad_op): New int attributes.
3493         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3494         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3495         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3497 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3499         * target.def (preferred_else_value): New target hook.
3500         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3501         * doc/tm.texi: Regenerate.
3502         * targhooks.h (default_preferred_else_value): Declare.
3503         * targhooks.c (default_preferred_else_value): New function.
3504         * internal-fn.h (conditional_internal_fn_code): Declare.
3505         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3506         (get_conditional_internal_fn): Use it.
3507         (conditional_internal_fn_code): New function.
3508         * gimple-match.h (gimple_match_cond): New struct.
3509         (gimple_match_op): Add a cond member function.
3510         (gimple_match_op::gimple_match_op): Update all forms to take a
3511         gimple_match_cond.
3512         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3513         for the suboperation, but don't specify a particular else_value.
3514         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3515         (visit_nary_op, visit_reference_op_load): Pass
3516         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3517         * gimple-match-head.c: Include tree-eh.h
3518         (convert_conditional_op): New function.
3519         (maybe_resimplify_conditional_op): Likewise.
3520         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3521         (gimple_resimplify2): Likewise.
3522         (gimple_resimplify3): Likewise.
3523         (gimple_resimplify4): Likewise.
3524         (maybe_push_res_to_seq): Return null for conditional operations.
3525         (try_conditional_simplification): New function.
3526         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3527         constructor.
3528         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3529         IFN_COND_* call.
3530         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3531         function.
3532         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3534 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3536         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3537         DECL_FCONTEXT
3538         (hash_tree): Do not hash DECL_FCONTEXT
3539         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3540         Do not stream DECL_FCONTEXT.
3541         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3542         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3544 2018-07-12  Richard Biener  <rguenther@suse.de>
3546         PR debug/86462
3547         * dwarf2out.c (gen_block_die): Only output blocks when they have
3548         at least one !DECL_IGNORED_P variable.
3550 2018-07-12  Richard Biener  <rguenther@suse.de>
3552         PR target/84829
3553         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3554         Remove -mieee-fp handling.
3556 2018-07-12  Richard Biener  <rguenther@suse.de>
3558         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3559         left-over from last patch.
3561 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3563         PR tree-optimization/86492
3564         * gimple-ssa-store-merging.c
3565         (imm_store_chain_info::coalesce_immediate_stores): Call
3566         check_no_overlap even for the merge_overlapping case.  Formatting fix.
3568 2018-07-12  Richard Biener  <rguenther@suse.de>
3570         PR middle-end/86479
3571         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3572         move possibly trapping operations into the conditional.
3574 2018-07-12  Richard Biener  <rguenther@suse.de>
3576         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3577         (vn_lookup_simplify_result): Remove recursion limit applied
3578         here.
3579         (vn_nary_build_or_lookup_1): Adjust.
3580         (try_to_simplify): Likewise.
3581         * gimple-match-head.c (gimple_resimplify1): Instead apply one
3582         here.
3583         (gimple_resimplify2): Likewise.
3584         (gimple_resimplify3): Likewise.
3585         (gimple_resimplify4): Likewise.
3587 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3589         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3590         Use __mmask64 type instead of __mmask8 for __M argument.
3591         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3592         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3593         __U argument.
3594         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3595         __mmask16 for __M argument.
3596         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3597         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3598         to __mmask16 instead of __mmask8.
3599         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3600         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3601         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3602         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3603         instead of __mmask16 for __U argument.
3604         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3605         __mmask16 instead of __mmask8 for __U argument.
3606         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3607         __U argument.
3608         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3609         __mmask16.
3610         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3611         argument.
3612         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3613         __U argument.
3614         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3615         __mmask16.
3616         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3617         of __mmask16.
3618         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3619         __U argument.
3620         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3621         __U argument.
3622         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3623         __U argument.
3624         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3625         __U argument.
3626         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3627         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3628         return type as well as __M argument type and all casts from __mmask8
3629         to __mmask32.
3630         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3631         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3632         return type as well as __M argument type and all casts from __mmask8
3633         to __mmask16.
3634         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3635         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3636         return type as well as __M argument type and all casts from __mmask8
3637         to __mmask32.
3638         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3639         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3640         return type as well as __M argument type and all casts from __mmask8
3641         to __mmask16.
3642         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3643         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3644         __mmask16.
3646 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
3648         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3649         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3650         for __U argument.
3652 2018-07-11  Paul Koning  <ni1d@arrl.net>
3654         * doc/md.texi (define_subst): Document how multiple occurrences of
3655         the same argument in the replacement pattern are handled.
3657 2018-07-11  Paul Koning  <ni1d@arrl.net>
3659         * doc/extend.texi (Common Variable Attributes): Move "mode" into
3660         alphabetical order.
3661         (Common Type Attributes): Add "mode" attribute.
3663 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
3665         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3666         stream DECL_ORIGINAL_TYPE.
3667         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3668         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3669         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3670         Do not walk original type.
3671         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3672         external decls.
3673         (write_ts_decl_non_common_tree_pointers): Do not stream
3674         DECL_ORIGINAL_TYPE
3675         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3676         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3678 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3680         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3681         thread twice from the same starting edge.
3683 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
3685         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3686         * gimple.c (gimple_call_nonnull_result_p): ...here...
3687         (gimple_call_nonnull_arg): ...and here.
3688         * gimple.h (gimple_call_nonnull_result_p): New.
3689         (gimple_call_nonnull_arg): New.
3691 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
3693         * config/arm/arm-cpus.in: Move information from fpu field of each
3694         cpu definition to the isa field.
3695         * config/arm/parsecpu.awk (fpu): Delete match rule.
3696         (gen_comm_data): Don't add bits from the CPU's FPU entry.
3698 2018-07-11  Richard Biener  <rguenther@suse.de>
3700         PR debug/86457
3701         * dwarf2out.c (init_sections_and_labels): Use
3702         output_asm_line_debug_info consistently.
3703         (dwarf2out_early_finish): Likewise.
3704         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3705         type units.
3707 2018-07-11  Richard Biener  <rguenther@suse.de>
3709         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3710         Rework father_bb setting in a way to avoid propagating constants
3711         multiple times on a loop body.
3713 2018-07-10  Mark Wielaard  <mark@klomp.org>
3715         PR debug/86459
3716         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3718 2018-07-10  Richard Biener  <rguenther@suse.de>
3720         * hash-map.h (hash_map::iterator::operator*): Return
3721         references to key and value.
3723 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3725         PR c++/86443
3726         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3727         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3728         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3729         (gimplify_omp_for): For composite loops, move outer
3730         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3731         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
3732         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
3733         TREE_LIST for both the original class iterator and the "last" helper
3734         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
3735         loop, remember has_decl_expr from outer composite loops for the
3736         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3738 2018-07-09  Martin Sebor  <msebor@redhat.com>
3740         PR middle-end/77357
3741         PR middle-end/86428
3742         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3743         accessing implicitly initialized array elements.
3744         * expr.c (string_constant): Handle string initializers of
3745         character arrays within aggregates.
3746         * gimple-fold.c (fold_array_ctor_reference): Add argument.
3747         Store element offset.  As a special case, handle zero size.
3748         (fold_nonarray_ctor_reference): Same.
3749         (fold_ctor_reference): Add argument.  Store subobject offset.
3750         * gimple-fold.h (fold_ctor_reference): Add argument.
3752 2018-07-09  Paul Koning  <ni1d@arrl.net>
3754         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3755         (pdp11_insn_cost): New function.
3756         (pdp11_md_asm_adjust): New function.
3757         (TARGET_INVALID_WITHIN_DOLOOP): Define.
3758         (pdp11_rtx_costs): Update to match machine better.
3759         (output_addr_const_pdp11): Correct format mismatch warnings.
3760         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3761         * config/pdp11/pdp11.md: General change to add base_cost and/or
3762         length attributes for use by new pdp11_insn_cost function.
3763         (MIN_BRANCH): Correct definition.
3764         (MIN_SOB): Ditto.
3765         (doloop_end): Use standard pattern name for looping pattern.
3766         (doloop_end_nocc): New.
3767         (movsf): Add another constraint alternative.
3768         (zero_extendqihi2): Add constraint alternatives for not in place
3769         extend.
3770         (zero_extendhisi2): Remove.
3771         (shift patterns): Add CC handling variants.
3772         (bswaphi2): New.
3773         (bswapsi2): New.
3774         (rothi3): New.
3775         (define_peephole2): New peephole to recognize mov that sets CC for
3776         subsequent test.
3778 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3780         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3781         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3782         wi::add.
3784 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
3786         PR c/86420
3787         * real.c (real_nextafter): Return true if result is denormal.
3789 2018-07-09  Martin Liska  <mliska@suse.cz>
3791         * common.opt: Add back wrongly removed attribute.
3793 2018-07-09  Richard Biener  <rguenther@suse.de>
3795         PR debug/86413
3796         * dwarf2out.c (gen_block_die): For an early generated DIE
3797         always output high/low PC attributes.
3799 2018-07-09  Tom de Vries  <tdevries@suse.de>
3801         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3802         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3803         onto VAR_DECL with abstract origin.
3805 2018-07-07  Jim Wilson  <jimw@sifive.com>
3807         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3809 2018-07-07  Tom de Vries  <tdevries@suse.de>
3811         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3813 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
3815         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3816         overflow_type.
3817         (combine_bound): Use wide-int overflow calculation instead of
3818         rolling our own.
3819         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3820         overflow_type.
3821         * fold-const.c (int_const_binop_2): Same.
3822         (extract_muldiv_1): Same.
3823         (fold_div_compare): Same.
3824         (fold_abs_const): Same.
3825         * match.pd: Same.
3826         * poly-int.h (add): Same.
3827         (sub): Same.
3828         (neg): Same.
3829         (mul): Same.
3830         * predict.c (predict_iv_comparison): Same.
3831         * profile-count.c (slow_safe_scale_64bit): Same.
3832         * simplify-rtx.c (simplify_const_binary_operation): Same.
3833         * tree-chrec.c (tree_fold_binomial): Same.
3834         * tree-data-ref.c (split_constant_offset_1): Same.
3835         * tree-if-conv.c (idx_within_array_bound): Same.
3836         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3837         * tree-ssa-phiopt.c (minmax_replacement): Same.
3838         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3839         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3840         * vr-values.c (vr_values::adjust_range_with_scev): Same.
3841         * wide-int.cc (wi::add_large): Same.
3842         (wi::mul_internal): Same.
3843         (wi::sub_large): Same.
3844         (wi::divmod_internal): Same.
3845         * wide-int.h: Change overflow type to overflow_type for neg, add,
3846         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3847         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3848         mul_internal, divmod_internal.
3849         (overflow_type): New enum.
3850         (accumulate_overflow): New.
3852 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3854         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3855         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3857 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3859         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3860         argument is checked for zero before entering loop, avoid checking again.
3862 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3864         * gimplify.h (generic_expr_could_trap_p): Set as global function.
3865         * gimplify.h (generic_expr_could_trap_p): Likwise.
3866         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3868 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
3870         PR tree-optimization/86401
3871         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3872         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3873         (fold_bit_and_mask): ... here.  New helper function for match.pd.
3874         * fold-const.h (fold_bit_and_mask): Declare.
3875         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3877 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
3879         PR target/86324
3880         * target.def (translate_mode_attribute): New hook.
3881         * targhooks.h (default_translate_mode_attribute): Declare.
3882         * targhooks.c (default_translate_mode_attribute): New function.
3883         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3884         * doc/tm.texi: Regenerate.
3885         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3886         (rs6000_translate_mode_attribute): New function.
3888 2018-07-06  Paul Koning  <ni1d@arrl.net>
3890         * doc/md.texi (define_split): Document DONE and FAIL.
3891         (define_peephole2): Ditto.
3893 2018-07-05  Jeff Law  <law@redhat.com>
3895         PR tree-optimization/86010
3896         * tree-ssa-dse.c (compute_trims): More aggressively trim at
3897         both the head and tail of mem* and str* calls.
3899 2018-07-05  Jim Wilson  <jimw@sifive.com>
3901         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3903 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
3905         * config/aarch64/aarch64-simd.md: correct flags text for
3906         MIN_EXPR replacement.
3908 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
3910         * configure: Regenerated.
3912 2018-07-05  Carl Love  <cel@us.ibm.com>
3914         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3915         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3916         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3917         VSX_BUILTIN_DOUBLEL_V4SF.
3919 2018-07-05  Martin Sebor  <msebor@redhat.com>
3921         PR c++/86400
3922         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3923         than its domain to compute its the upper bound of a char array.
3925 2018-07-05  Nathan Sidwell  <nathan@acm.org>
3927         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3928         * doc/cpp.texi: Update comment.
3929         * doc/tm.texi: Rebuilt.
3930         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3931         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3932         * doc/extend.texi (Backwards Compatibility): Clarify it is system
3933         headers affected by extern "C".
3934         * system.h: Poison NO_IMPLICIT_EXTERN_C.
3935         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3936         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3937         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3938         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3939         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3940         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3941         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3942         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3943         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3944         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3945         config/sparc/sp64-elf.h, config/spu/spu.h,
3946         config/stormy16/stormy16.h, config/v850/v850.h,
3947         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3948         define NO_IMPLICIT_EXTERN_C.
3949         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3951 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3953         PR target/84711
3954         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3955         instead of GET_MODE_SIZE when comparing Units.
3957 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3959         PR target/84711
3960         * rtlanal.c (set_noop_p): Constrain on mode change,
3961         include hard-reg-set.h
3963 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3965         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3967 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
3969         Revert
3970         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3972         PR sanitizer/84250
3973         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3974         libasan.
3975         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3977 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3979         PR sanitizer/84250
3980         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3981         libasan.
3982         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3984 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
3986         PR middle-end/86380
3987         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3989 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
3991         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3992         neg_*_op* variables.
3994 2018-07-04  Martin Liska  <mliska@suse.cz>
3996         * tree-switch-conversion.c: Define
3997         max_ratio_for_speed and max_ratio_for_size constants.
3999 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4000             Martin Liska  <mliska@suse.cz>
4002         PR middle-end/66240
4003         PR target/45996
4004         PR c/84100
4005         * common.opt: Rename align options with 'str_' prefix.
4006         * common/config/i386/i386-common.c (set_malign_value): New
4007         function.
4008         (ix86_handle_option): Use it to set -falign-* options/
4009         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4010         type from int to string.
4011         * config/aarch64/aarch64.c: Update default values from int
4012         to string.
4013         * config/alpha/alpha.c (alpha_override_options_after_change):
4014         Likewise.
4015         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4016         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4017         max skip conditionally.
4018         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4019         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4020         max skip conditionally.
4021         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4022         max skip conditionally.
4023         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4024         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4025         max skip conditionally.
4026         * config/i386/i386.c (struct ptt): Change type from int to
4027         string.
4028         (ix86_default_align): Set default values.
4029         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4030         max skip conditionally.
4031         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4032         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4033         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4034         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4035         max skip conditionally.
4036         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4037         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4038         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4039         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4040         max skip conditionally.
4041         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4042         * config/ia64/ia64.c (ia64_option_override): Set default values
4043         for alignment options.
4044         * config/m68k/m68k.c: Handle new str_align_* options.
4045         * config/mips/mips.c (mips_set_compression_mode): Change
4046         type of constants.
4047         (mips_option_override): Set default values for options.
4048         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4049         Likewise.
4050         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4051         Likewise.
4052         * config/rx/rx.c (rx_option_override): Likewise.
4053         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4054         (LABEL_ALIGN): Use align_labels_log.
4055         (LOOP_ALIGN): Use align_loops_align.
4056         * config/s390/s390.c (s390_asm_output_function_label): Use new
4057         macros.
4058         * config/sh/sh.c (sh_override_options_after_change):
4059         Change type of constants.
4060         * config/spu/spu.c (spu_sched_init): Likewise.
4061         * config/sparc/sparc.c (sparc_option_override): Set default
4062         values for options.
4063         * config/visium/visium.c (visium_option_override): Likewise.
4064         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4065         emit p2align format with last argument if it's not needed.
4066         * doc/invoke.texi: Document extended format of -falign-*.
4067         * final.c: Use align_labels alignment.
4068         * flags.h (struct target_flag_state): Change type to use
4069         align_flags.
4070         (struct align_flags_tuple): New.
4071         (struct align_flags): Likewise.
4072         (align_loops_log): Redefine macro to use new types.
4073         (align_loops_max_skip): Redefine macro to use new types.
4074         (align_jumps_log): Redefine macro to use new types.
4075         (align_jumps_max_skip): Redefine macro to use new types.
4076         (align_labels_log): Redefine macro to use new types.
4077         (align_labels_max_skip): Redefine macro to use new types.
4078         (align_functions_log): Redefine macro to use new types.
4079         (align_loops): Redefine macro to use new types.
4080         (align_jumps): Redefine macro to use new types.
4081         (align_labels): Redefine macro to use new types.
4082         (align_functions): Redefine macro to use new types.
4083         (align_functions_max_skip): Redefine macro to use new types.
4084         (align_loops_value): New macro.
4085         (align_jumps_value): New macro.
4086         (align_labels_value): New macro.
4087         (align_functions_value): New macro.
4088         * function.c (invoke_set_current_function_hook): Propagate
4089         alignment values from flags to global variables default in
4090         topleev.h.
4091         * ipa-icf.c (sem_function::equals_wpa): Use
4092         cl_optimization_option_eq instead of memcmp.
4093         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4094         of string types.
4095         (cl_optimization_stream_in): Likewise.
4096         * optc-save-gen.awk: Support strings in cl_optimization.
4097         * opth-gen.awk: Likewise.
4098         * opts.c (finish_options): Remove error checking of invalid
4099         value ranges.
4100         (MAX_CODE_ALIGN): Remove.
4101         (MAX_CODE_ALIGN_VALUE): Likewise.
4102         (parse_and_check_align_values): New function.
4103         (check_alignment_argument): Likewise.
4104         (common_handle_option): Use check_alignment_argument.
4105         * opts.h (parse_and_check_align_values): Declare.
4106         * toplev.c (init_alignments): Remove.
4107         (read_log_maxskip): New.
4108         (parse_N_M): Likewise.
4109         (parse_alignment_opts): Likewise.
4110         (backend_init_target): Remove usage of init_alignments.
4111         * toplev.h (parse_alignment_opts): Declare.
4112         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4113         argument.
4114         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4115         * tree.c (cl_option_hasher::equal): New.
4116         * varasm.c: Use new global macros.
4118 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4120         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4121         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4122         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4123         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4124         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4125         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4126         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4127         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4128         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4129         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4130         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4131         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4132         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4134 2018-07-04  Martin Liska  <mliska@suse.cz>
4135             Jonathan Wakely  <jwakely@redhat.com>
4137         * coverage.c: Use correct type.
4138         * doc/invoke.texi: Language correction.
4140 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4142         PR target/85620
4143         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4144         ENDBRANCH for non-tail call which may return via indirect branch.
4145         * doc/extend.texi: Document indirect_return attribute.
4147 2018-07-03  Martin Sebor  <msebor@redhat.com>
4149         PR tree-optimization/86274
4150         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4151         precondition.
4152         (format_floating): Correct handling of infinities and NaNs.
4154 2018-07-03  Martin Sebor  <msebor@redhat.com>
4156         * print-tree.c (print_real_cst): New function.
4157         (print_node_brief): Call it.
4158         (print_node): Ditto.
4160 2018-07-03  Jeff Law  <law@redhat.com>
4162         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4163         into a single pattern.
4165         * config/h8300/h8300.md (ors code_iterator): New.
4166         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4167         a single pattern and single splitter.
4168         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4169         (iorqi3_1, xorqi3_1): Likewise.
4170         (iorqi3, xorqi3 expanders): Similarly.
4172         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4173         (movmd_internal) into a single pattern using the P mode iterator.
4174         (movmd splitters): Similarly.
4175         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4176         (movsd splitters): Similarly.
4178         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4179         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4180         right table based on the size of the operand.
4181         * config/h8300/h8300.md (length_table): Corresponding changes. All
4182         references to "addb", "addw" and "addl" changed to "add".
4183         (btst patterns): Merge two variants into a single pattern.
4184         (tstqi, tsthi): Likewise.
4185         (addhi3_incdec, addsi3_incdec): Likewise.
4186         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4187         (mulhi3, mulsi3): Likewise.
4188         (udivhi3, udivsi3): Likewise.
4189         (divhi3, divsi3): Likewise.
4190         (andorqi3, andorhi3, andorsi3): Likewise.
4192 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4194         PR target/85694
4195         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4196         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4198 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4200         PR tree-optimization/85694
4201         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4202         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4203         UNSPEC_URHADD.
4204         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4205         (<u>avg<mode>3_ceil): New patterns.
4207 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4209         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4210         scan-tree-dump directive.
4211         * gcc.dg/vect/slp-perm-2.c: Likewise.
4212         * gcc.dg/vect/slp-perm-3.c: Likewise.
4213         * gcc.dg/vect/slp-perm-5.c: Likewise.
4214         * gcc.dg/vect/slp-perm-6.c: Likewise.
4215         * gcc.dg/vect/slp-perm-7.c: Likewise.
4216         * gcc.dg/vect/slp-perm-8.c: Likewise.
4218 2018-07-03  Marek Polacek  <polacek@redhat.com>
4220         PR middle-end/86202
4221         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4223 2018-07-03  Richard Biener  <rguenther@suse.de>
4225         PR ipa/86389
4226         * tree-ssa-structalias.c (find_func_clobbers): Properly
4227         handle indirect calls.
4229 2018-07-03  Jeff Law  <law@redhat.com>
4231         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4232         (shifts): New code iterator.
4233         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4234         expander.  Fix HImode handling on H8/SX.
4235         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4236         (subqi3, subhi3, subsi3 expanders): Likewise.
4237         (andqi3, andhi3, andsi3 expanders): Likewise.
4238         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4239         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4240         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4241         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4242         (zero_extendqihi2, zero_extendqisi2): Likewise.
4243         (extendqihi2, extendqisi2): Likewise.
4244         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4245         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4246         (rotlqi3_1, rotlhi3_1): Likewise.
4247         (logicalhi3_sn, logicalsi3_sn): Likewise.
4248         (logicalhi3, logicalsi3): Likewise.
4250 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4252         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4253         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4254         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4255         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4256         type to append_pattern_def_seq instead of creating a stmt_vec_info
4257         directly.
4258         (build_mask_conversion): Likewise.  Remove vinfo argument.
4259         (vect_add_conversion_to_patterm): Likewise, renaming to...
4260         (vect_add_conversion_to_pattern): ...this.
4261         (vect_recog_mask_conversion_pattern): Update call to
4262         build_mask_conversion.  Pass the vector type to
4263         append_pattern_def_seq here too.
4264         (vect_recog_gather_scatter_pattern): Update call to
4265         vect_add_conversion_to_pattern.
4267 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4269         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4270         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4271         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4272         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4273         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4274         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4275         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4276         append_pattern_def_seq instead of new_pattern_def_seq.
4277         (vect_recog_divmod_pattern): Do both of the above.
4278         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4279         is null.
4281 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4283         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4284         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4285         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4286         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4287         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4288         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4289         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4290         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4291         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4292         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4293         parameter with a single stmt_vec_info.
4294         (vect_recog_func_ptr): Likewise.
4295         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4296         (vect_try_gather_scatter_pattern): ...this.
4297         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4298         the stmt_vec_info of the statement to be matched.  Don't clear
4299         STMT_VINFO_RELATED_STMT.
4300         (vect_pattern_recog): Update call accordingly.
4302 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4304         PR tree-optimization/85694
4305         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4306         (uavgM3_ceil): Document new optabs.
4307         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4308         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4309         functions.
4310         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4311         (savg_ceil_optab): New optabs.
4312         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4313         (vect_vect_recog_func_ptrs): Add it.
4314         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4315         constant directly from the associated lhs.
4317 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4319         * tree-vect-patterns.c (vect_split_statement): New function.
4320         (vect_convert_input): Use it to try to split an existing cast.
4322 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4324         * poly-int.h (print_hex): New function.
4325         * dumpfile.h (dump_dec, dump_hex): Declare.
4326         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4327         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4328         min_input_precision, operation_precision and operation_sign.
4329         * tree-vect-patterns.c (vect_get_range_info): New function.
4330         (vect_same_loop_or_bb_p, vect_single_imm_use)
4331         (vect_operation_fits_smaller_type): Delete.
4332         (vect_look_through_possible_promotion): Add an optional
4333         single_use_p parameter.
4334         (vect_recog_over_widening_pattern): Rewrite to use new
4335         stmt_vec_info infomration.  Handle one operation at a time.
4336         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4337         (vect_truncatable_operation_p, vect_set_operation_type)
4338         (vect_set_min_input_precision): New functions.
4339         (vect_determine_min_output_precision_1): Likewise.
4340         (vect_determine_min_output_precision): Likewise.
4341         (vect_determine_precisions_from_range): Likewise.
4342         (vect_determine_precisions_from_users): Likewise.
4343         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4344         (vect_vect_recog_func_ptrs): Put over_widening first.
4345         Add cast_forwprop.
4346         (vect_pattern_recog): Call vect_determine_precisions.
4348 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4350         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4351         statements that have been replaced by further pattern statements.
4352         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4354 2018-07-03  Richard Biener  <rguenther@suse.de>
4356         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4357         always set *dt.  Dump vectype in vectype overload.
4358         * dumpfile.h (dump_gimple_expr): New function.
4359         (dump_gimple_expr_loc): Likewise.
4360         * dumpfile.c (dump_gimple_expr): New function.
4361         (dump_gimple_expr_loc): Likewise.
4363 2018-07-02  Jeff Law  <law@redhat.com>
4365         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4366         the H8/300, H8/300H and H8/S variants into a single pattern.
4367         (movhi_h8300, movqi_h8300hs): Similarly.
4368         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4369         (QHI mode iterator): New.
4371         * config/h8300/h8300.md: Remove trailing whitespace.
4373 2018-07-02  Jim Wilson  <jimw@sifive.com>
4375         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4376         instead of emit_insn for interrupt returns.
4377         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4378         (riscv_sret, riscv_uret): Likewise.
4380 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4382         * pretty-print.c (selftest::test_pp_format): Move save and restore
4383         of quotes to class auto_fix_quotes, and add an instance.
4384         * selftest.c: Include "intl.h".
4385         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4386         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4387         * selftest.h (selftest::auto_fix_quotes): New class.
4389 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4391         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4392         (aarch64_sve_prepare_conditional_op): Remove.
4393         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4394         Allow aarch64_simd_reg_or_zero as select operand; remove
4395         the aarch64_sve_prepare_conditional_op call.
4396         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4397         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4398         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4399         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4400         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4401         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4402         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4403         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4404         and a splitters to match all of the *_any patterns.
4405         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4407         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4408         (SVE_COND_FP_BINARY_REV): Remove.
4409         (sve_int_op_rev, sve_fp_op_rev): New.
4410         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4411         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4412         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4413         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4414         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4415         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4416         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4417         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4418         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4420         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4421         Remove match_dup 1 from the inner unspec.
4422         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4424         * config/aarch64/aarch64.md (movprfx): New attr.
4425         (length): Default movprfx to 8.
4426         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4427         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4428         (*<su>mul<SVE_I>3_highpart): Likewise.
4429         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4430         (*v<ASHIFT><SVE_I>3): Likewise.
4431         (*<su><MAXMIN><SVE_I>3): Likewise.
4432         (*<su><MAXMIN><SVE_F>3): Likewise.
4433         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4434         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4435         (*div<SVE_F>4): Likewise.
4437 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4439         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4440         in dump string.
4442 2018-07-02  Richard Biener  <rguenther@suse.de>
4444         PR tree-optimization/86363
4445         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4446         memset argument refers to a non-variable address.
4448 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4450         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4451         {PLUS,MINUS}_EXPR code to...
4452         (adjust_symbolic_bound): ...here,
4453         (combine_bound): ...here,
4454         (set_value_range_with_overflow): ...and here.
4456 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4458         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4459         code...
4460         (extract_range_from_abs_expr): ...here.
4462 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4464         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4465         -fno-omit-frame-pointer when not optimizing.
4467 2018-07-02  Martin Liska  <mliska@suse.cz>
4469         PR ipa/86279
4470         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4471         (propagate_nothrow): Likewise.
4473 2018-07-02  Martin Liska  <mliska@suse.cz>
4475         PR ipa/86323
4476         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4478 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4480         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4481         function in r262149, changing "loc" param from source_location to
4482         const dump_location_t &.
4483         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4484         declaration, as above.
4486 2018-07-01  Paul Koning  <ni1d@arrl.net>
4488         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4489         -munit-asm, -mgnu-asm, -mdec-asm.
4490         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4491         (pdp11_output_labelref): New.
4492         (pdp11_output_def): New.
4493         (pdp11_output_addr_vec_elt): New.
4494         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4495         %# and %@ format codes.
4496         (pdp11_option_override): New.
4497         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4498         (pdp11_output_ident): New.
4499         (pdp11_asm_named_section): New.
4500         (pdp11_asm_init_sections): New.
4501         (pdp11_file_start): New.
4502         (pdp11_file_end): New.
4503         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4504         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4505         %o, like %c but octal.
4506         (pdp11_option_override): New.
4507         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4508         -mdec-asm.
4509         (DATA_SECTION_ASM_OP): Ditto.
4510         (READONLY_DATA_SECTION_ASM_OP): New.
4511         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4512         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4513         (ASM_OUTPUT_LABELREF): Ditto.
4514         (ASM_OUTPUT_DEF): Ditto.
4515         (ASM_OUTPUT_EXTERNAL): New.
4516         (ASM_OUTPUT_SOURCE_FILENAME): New.
4517         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4518         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4519         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4520         %# and %@ format codes.
4521         * config/pdp11/pdp11.opt (mgnu-asm): New.
4522         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4523         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4524         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4526 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4528         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4529         dereferencing path[] beyond its length.
4530         (debug_path): New.
4531         (debug_all_paths): New.
4532         (rewire_first_differing_edge): New.
4533         (adjust_paths_after_duplication): New.
4534         (duplicate_thread_path): Call adjust_paths_after_duplication.
4535         Add new argument.
4536         (thread_through_all_blocks): Add new argument to
4537         duplicate_thread_path.
4539 2018-06-30  Jim Wilson  <jimw@sifive.com>
4541         * config/riscv/predicates.md (p2m1_shift_operand): New.
4542         (high_mask_shift_operand): New.
4543         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4544         pattern using p2m1_shift_operand.
4545         (lshsi3_zero_extend_3+2): New combiner pattern using
4546         high_mask_shift_operand.
4548 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4550         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4551         split out from...
4552         (vect_recog_rotate_pattern): ...here.
4553         (vect_convert_input): Try to insert casts of invariants in the
4554         preheader.
4555         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4556         preheader to be empty.
4558 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4560         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4561         vector type.  If given, install it in the new statement's
4562         STMT_VINFO_VECTYPE.
4563         (vect_element_precision): New function.
4564         (vect_unpromoted_value): New struct.
4565         (vect_unpromoted_value::vect_unpromoted_value): New function.
4566         (vect_unpromoted_value::set_op): Likewise.
4567         (vect_look_through_possible_promotion): Likewise.
4568         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4569         (vect_widened_op_tree, vect_convert_input): Likewise.
4570         (vect_convert_inputs, vect_convert_output): Likewise.
4571         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4572         to handle the optional cast of the multiplication result and
4573         vect_widened_op_tree to detect the widened multiplication itself.
4574         Do not require the input and output of promotion casts to have
4575         the same sign, but base the signedness of the operation on the
4576         input rather than the result.  If the pattern includes two
4577         promotions, check that those promotions have the same sign.
4578         Do not restrict the MULT_EXPR handling to a double-width result;
4579         handle quadruple-width results and wider.  Use vect_convert_inputs
4580         to convert the inputs to the common type.
4581         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
4582         to handle the optional cast of the ABS result.  Also allow a sign
4583         change or a sign extension between the ABS and MINUS.
4584         Use vect_widened_op_tree to detect the widened subtraction and use
4585         vect_convert_inputs to convert the inputs to the common type.
4586         (vect_handle_widen_op_by_const): Delete.
4587         (vect_recog_widen_op_pattern): New function.
4588         (vect_recog_widen_mult_pattern): Use it.
4589         (vect_recog_widen_shift_pattern): Likewise.
4590         (vect_recog_widen_sum_pattern): Use
4591         vect_look_through_possible_promotion to handle the promoted
4592         PLUS_EXPR operand.
4594 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4596         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4597         the containing gimple_seq *.
4598         * gimple-iterator.h (gsi_for_stmt): Declare it.
4599         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4600         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4601         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4602         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4603         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4604         checks.
4605         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4606         split out from...
4607         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
4608         statement being replaced is part of an existing pattern
4609         definition sequence, inserting the new pattern statements before
4610         the original one.
4611         (vect_pattern_recog_1): Don't return a bool.  If the statement
4612         is already part of a pattern, instead apply pattern matching
4613         to the pattern definition statements.  Don't clear the
4614         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4615         (vect_pattern_recog): Don't break after the first match;
4616         continue processing the pattern definition statements instead.
4617         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4619 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4621         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4622         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4623         (vect_recog_widen_sum_pattern): Use it.
4625 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4627         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4628         phi is not a pattern statement and has not been replaced by
4629         a pattern statement.
4630         * tree-vect-patterns.c (type_conversion_p): Don't check
4631         STMT_VINFO_IN_PATTERN_P.
4632         (vect_recog_vector_vector_shift_pattern): Likewise.
4633         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4634         the pattern statement rather than the original statement; check
4635         directly for a WIDEN_MULT_EXPR here.
4636         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4637         vect_is_simple_use to return the pattern statement rather
4638         than the original statement; use is_pattern_stmt_p to check
4639         for such a pattern statement.
4640         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4641         to return the pattern statement rather than the original statement;
4642         don't do the same transformation here.
4643         (vect_is_simple_use): If the defining statement has been replaced
4644         by a pattern statement, return the pattern statement instead.
4645         Remove the corresponding (local) transformation from the vectype
4646         overload.
4648 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4650         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4651         end and default to null.
4652         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4653         (vectorizable_reduction): Update calls accordingly, dropping the
4654         gimple ** argument if the passed-back statement isn't needed.
4655         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4656         (vect_recog_rotate_pattern): Likewise.
4657         (vect_recog_mask_conversion_pattern): Likewise.
4658         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4659         (vect_mask_constant_operand_p): Likewise.
4660         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4661         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4662         (get_group_load_store_type, get_load_store_type): Likewise.
4663         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4664         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4665         (vectorizable_conversion, vectorizable_assignment): Likewise.
4666         (vectorizable_shift, vectorizable_operation): Likewise.
4667         (vectorizable_store, vect_is_simple_cond): Likewise.
4668         (vectorizable_condition, vectorizable_comparison): Likewise.
4669         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4670         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4671         and move it to the end.  Cope with null def_stmt_outs.
4673 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4675         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4677 2018-06-29  Jeff Law  <law@redhat.com>
4679         * config/v850/v850.c (v850_legitimate_address_p): Handle large
4680         displacements for TARGET_V850E2V3 and newer.
4681         (TARGET_LRA_P): Remove.  Defaults to LRA now.
4682         * config/v850/v850.md (sign23byte_load): Remove.
4683         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4684         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4686 2018-06-29  Martin Liska  <mliska@suse.cz>
4688         PR lto/85759
4689         * coverage.c (coverage_init): Mangle full path name.
4690         * doc/invoke.texi: Document the change.
4691         * gcov-io.c (mangle_path): New.
4692         * gcov-io.h (mangle_path): Likewise.
4693         * gcov.c (mangle_name): Use mangle_path for path mangling.
4695 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4697         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4698         if starting source register is not even.
4700 2018-06-29  Martin Liska  <mliska@suse.cz>
4702         PR tree-optimization/86263
4703         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4704         Make edge redirection.
4706 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
4708         * dumpfile.c (dump_loc): Add indentation based on scope depth.
4709         (dump_scope_depth): New variable.
4710         (get_dump_scope_depth): New function.
4711         (dump_begin_scope): New function.
4712         (dump_end_scope): New function.
4713         * dumpfile.h (get_dump_scope_depth): New declaration.
4714         (dump_begin_scope): New declaration.
4715         (dump_end_scope): New declaration.
4716         (class auto_dump_scope): New class.
4717         (AUTO_DUMP_SCOPE): New macro.
4718         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4719         AUTO_DUMP_SCOPE.
4721 2018-06-29  Richard Biener  <rguenther@suse.de>
4723         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4724         compute_all_dependences succeeds.
4725         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4726         exceed --param loop-max-datarefs-for-datadeps.
4728 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
4730         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4732 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
4734         PR target/86348
4735         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4736         alternative 0 in preferred_for_speed attribute.
4738 2018-06-28  Paul Koning  <ni1d@arrl.net>
4740         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4741         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4742         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4743         * config/pdp11/pdp11.md: Correct "length" attribute calculation
4744         for shift insn patterns.
4746 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
4748         * cgraph.c (cgraph_node::get_body): Replace assignments to
4749         "dump_file" with calls to set_dump_file.
4750         * dumpfile.c (alt_dump_file): Make static, and group with...
4751         (alt_flags): ...this definition.
4752         (dumps_are_enabled): New variable.
4753         (refresh_dumps_are_enabled): New function.
4754         (set_dump_file): New function.
4755         (set_alt_dump_file): New function.
4756         (gcc::dump_manager::dump_start): Replace assignments to
4757         "dump_file" and "alt_dump_file" with calls to set_dump_file and
4758         set_alt_dump_file.
4759         (gcc::dump_manager::dump_finish): Likewise.
4760         * dumpfile.h (alt_dump_file): Delete decl.
4761         (dumps_are_enabled): New variable decl.
4762         (set_dump_file): New function decl.
4763         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4764         global.
4765         * tree-nested.c (lower_nested_functions): Replace assignments to
4766         "dump_file" with calls to set_dump_file.
4768 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4770         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4771         goto_locus of each outgoing edge of each basic block.
4773 2018-06-28  Richard Biener  <rguenther@suse.de>
4775         * dwarf2out.c (decl_scope_table): Remove.
4776         (push_decl_scope): Likewise.
4777         (pop_decl_scope): Likewise.
4778         (gen_type_die_for_member): Do not call push/pop_decl_scope.
4779         (gen_struct_or_union_type_die): Likewise.
4780         (gen_tagged_type_die): Likewise.
4781         (dwarf2out_init): Do not initialize decl_scope_table.
4782         (dwarf2out_c_finalize): Do not free it.
4784 2018-06-28  Richard Biener  <rguenther@suse.de>
4786         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4787         deciding whether to not re-use a DIE.
4789 2018-06-28  Richard Biener  <rguenther@suse.de>
4791         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4792         DW_AT_abstract_origin attribute.
4794 2018-06-28  Martin Liska  <mliska@suse.cz>
4796         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4797         Use newly introduced constants.
4798         * tree-switch-conversion.h (struct jump_table_cluster):
4799         Define max_ratio_for_size and max_ratio_for_speed.
4801 2018-06-28  Martin Liska  <mliska@suse.cz>
4803         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4804         Add new checking assert to catch invalid state.
4805         (jump_table_cluster::can_be_handled): Handle single case
4806         clusters.
4807         (jump_table_cluster::is_beneficial): Bail out for such case.
4808         (bit_test_cluster::find_bit_tests):
4809         Add new checking assert to catch invalid state.
4810         (bit_test_cluster::can_be_handled): Handle single case
4811         clusters.
4812         (bit_test_cluster::is_beneficial): Bail out for such case.
4813         (switch_decision_tree::analyze_switch_statement):
4814         Fix comment.
4816 2018-06-28  Martin Liska  <mliska@suse.cz>
4818         * common.opt: Introduce -completion option.
4819         * gcc.c (driver_handle_option): Handle it.
4820         (driver::main): Print completions if completion
4821         is set.
4822         * opt-suggestions.c (option_proposer::get_completions):
4823         New function.
4824         (option_proposer::suggest_completion): Likewise.
4825         (option_proposer::find_param_completions): Likewise.
4826         (verify_autocompletions): Likewise.
4827         (test_completion_valid_options): Likewise.
4828         (test_completion_valid_params): Likewise.
4829         (in_completion_p): Likewise.
4830         (empty_completion_p): Likewise.
4831         (test_completion_partial_match): Likewise.
4832         (test_completion_garbage): Likewise.
4833         (opt_proposer_c_tests): Likewise.
4834         * opt-suggestions.h: Declare new functions.
4835         * opts.c (common_handle_option): Handle OPT__completion_.
4836         * selftest-run-tests.c (selftest::run_tests): Add
4837         opt_proposer_c_tests.
4838         * selftest.c (assert_str_startswith): New.
4839         * selftest.h (assert_str_startswith): Likewise.
4840         (opt_proposer_c_tests): New.
4841         (ASSERT_STR_STARTSWITH): Likewise.
4843 2018-06-28  Martin Liska  <mliska@suse.cz>
4845         * Makefile.in: Add opt-suggestions.o.
4846         * gcc-main.c: Include opt-suggestions.h.
4847         * gcc.c (driver::driver): Likewise.
4848         (driver::~driver): Remove m_option_suggestions.
4849         (driver::build_option_suggestions): Moved to option_proposer.
4850         (driver::suggest_option): Likewise.
4851         (driver::handle_unrecognized_options): Use option_proposer.
4852         * gcc.h (class driver): Add new memver m_option_proposer.
4853         * opt-suggestions.c: New file.
4854         * opt-suggestions.h: New file.
4856 2018-06-28  Martin Liska  <mliska@suse.cz>
4858         * vec.h (class auto_string_vec): New (moved from auto_argvec).
4859         (auto_string_vec::~auto_string_vec): Likewise.
4861 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4863         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4864         prevent_decl_creation_for_types fields up and add reset_location field.
4865         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4866         statement if id->reset_location is true.
4867         (copy_edges_for_bb): Do not set goto_locus on the new edges if
4868         id->reset_location is true.
4869         (copy_phis_for_bb): Force input_location on the arguments if
4870         id->reset_location is true.
4871         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4872         is set on the function to be inlined.
4874 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
4876         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4878 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
4880         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4881         registers for Pmode.
4882         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4883         hard registers for the clobbered pseudo.
4885 2018-06-27  Paul Koning  <ni1d@arrl.net>
4887         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4888         mutually exclusive options.
4889         * config/pdp11/constraints.md (h): New constraint.
4890         (O): Update definition to match shift code generation.
4891         (D): New constraint.
4892         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4893         (CCFP): Remove.
4894         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4895         function.
4896         (output_jump): Change arguments.
4897         (pdp11_fixed_cc_regs): New function.
4898         (pdp11_cc_mode): Ditto.
4899         (pdp11_expand_shift): Ditto.
4900         (pdp11_assemble_shift): Ditto.
4901         (pdp11_small_shift): Ditto.
4902         (pdp11_branch_cost): Remove.
4903         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4904         from output.
4905         (pdp11_register_move_cost): Update for CC registers.
4906         (pdp11_rtx_costs): Add case for LSHIFTRT.
4907         (pdp11_output_jump): Add CCNZ mode conditional branches.
4908         (notice_update_cc_on_set): Remove.
4909         (pdp11_cc_mode): New function.
4910         (simple_memory_operand): Correct pre/post decrement case.
4911         (no_side_effect_operand): New function.
4912         (pdp11_regno_reg_class): Add CC_REGS class.
4913         (pdp11_fixed_cc_regs): New function.
4914         (pdp11_small_shift): New function.
4915         (pdp11_expand_shift): New function to expand shift insns.
4916         (pdp11_assemble_shift): New function to output shifts.
4917         (pdp11_branch_cost): Remove.
4918         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4919         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4920         (WCHAR_TYPE): Ditto.
4921         (PTRDIFF_TYPE): Ditto.
4922         (ADJUST_INSN_LENGTH): New macro.
4923         (FIXED_REGISTERS): Add CC registers.
4924         (CALL_USED_REGISTERS): Ditto.
4925         (reg_class): Ditto.
4926         (REG_CLASS_NAMES): Ditto.
4927         (REG_CLASS_CONTENTS): Ditto.
4928         (SELECT_CC_MODE): Use new function.
4929         (TARGET_FLAGS_REGNUM): New macro.
4930         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4931         (cc0_reg_rtx): Remove.
4932         (CC_STATUS_MDEP): Remove.
4933         (CC_STATUS_MDEFP_INIT): Remove.
4934         (CC_IN_FPU): Remove.
4935         (NOTICE_UPDATE_CC): Remove.
4936         (REGISTER_NAMES): Add CC registers.
4937         (BRANCH_COST): Change to constant 1.
4938         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4939         handling.
4940         * config/pdp11/pdp11.opt (mbcopy): Remove.
4941         (mbcopy-builtin): Remove.
4942         (mbranch-cheap): Remove.
4943         (mbranch-expensive): Remove.
4944         * config/pdp11/predicates.md (expand_shift_operand): Update to
4945         match shift code generation.
4946         (ccnz_operator): New predicate.
4947         * doc/invoke.texi (PDP-11 Options): Remove deleted options
4948         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4949         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
4950         exclusive options.
4951         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
4952         description of O constraint.
4954 2018-06-27  Jeff Law  <law@redhat.com>
4955             Austin Law  <austinklaw@gmail.com>
4957         * config/v850/v850.md (addsi3_set_flags): New pattern.
4958         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4959         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4960         (zero_extendhisi2_v850_set_flags): Likewise.
4961         (zero_extendqisi2_v850_set_flags): Likewise.
4962         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4963         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4964         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4966         * config/v850/v850-protos.h (notice_update_cc): Remove.
4967         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4968         (v850_print_operand): Handle 'D' and "d".
4969         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4970         Add handling of arithmetic/logical operations compared against zero.
4971         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4972         Do not look at v850_compare_op, instead get mode from last argument.
4973         (v850_gen_compare): Remove
4974         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4975         after reload for prologue insns.
4976         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4977         patterns.
4978         (construct_save_jarl): Likewise.
4979         (TARGET_FLAGS_REGNUM): Define.
4980         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4981         (NOTICE_UPDATE_CC): Remove.
4982         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4983         than cc0.  Conditionalize on reload_completed.
4984         (cmpsi_insn, setfcc_insn): Likewise.
4985         (tst1 splitter): Turn into define_and_split which sets the flags
4986         after reload.
4987         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4988         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4989         (cstoresf4, cstoredf4): Clobber the flags.
4990         (cmpsi, cmpsf, cmpdf): Remove expanders.
4991         (setf_insn): Remove pattern.
4992         (addsi3): Turn into define_and_split which clobbers the flags after
4993         reload and a suitable pattern (addsi3_clobber_flags) for use after
4994         reload.
4995         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4996         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4997         (ashrsi3, ashrsi3_v850e2): Likewise.
4998         (bins): Clobber the flags.
4999         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5000         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5001         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5002         (call_value_internal_short, call_value_internal_long): Likewise.
5003         (callt_save_interrupt, callt_return_interrupt): Likewise.
5004         (save_interrupt, return_interrupt): Likewise.
5005         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5006         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5007         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5008         (All FP comparisons): Only allow after reload has completed.
5009         (trfsr): Likewise.
5010         (divh, divhu): Tweak output template.
5011         (branch_z_normal, branch_z_invert): Remove
5012         (branch_nz_normal, branch_nz_invert): Likewise.
5013         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5015         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5016         * config/v850/v850.c (notice_update_cc): Remove.
5017         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5018         (CC_NO_CARRY): Likewise.
5019         (NOTICE_UPDATE_CC): Define to nothing.
5020         * config/v850/v850.md: Remove block comment on cc0 handling
5021         Remove "cc" attribute from all patterns.  Remove cc_status handling
5022         from all patterns.  Minor formatting fixes.
5024 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5026         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5027         (cortex-a76.cortex-a55): Likewise.
5028         * config/aarch64/aarch64-tune.md: Regenerate.
5029         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5030         cortex-a76.cortex-a55.
5032 2018-06-27  Jeff Law  <law@redhat.com>
5034         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5035         (MULTILIB_DIRNAMES): Similarly.
5037 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5039         * gimple.h (gimple_return_retbnd): Delete.
5040         (gimple_return_set_retbnd): Likewise.
5041         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5042         gimple_return_set_retbnd.
5043         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5044         gimple_return_retbnd and adjust.
5045         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5046         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5047         Explicitly return NULL in a couple more cases.  Move assertion
5048         on debug statements and remove unreachable code.
5049         (reset_debug_binding): Do not test id->retbnd.
5050         (expand_call_inline): Do not set it.
5052 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5054         * configure.ac: Add --disable-gcov option.
5055         * configure: Regenerate.
5056         * Makefile.in: Honour @enable_gcov@.
5057         * doc/install.texi: Document --disable-gcov.
5059 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5061         * config/arm/arm-cpus.in (cortex-a76): New entry.
5062         (cortex-a76.cortex-a55): Likewise.
5063         * config/arm/arm-tables.opt: Regenerate.
5064         * config/arm/arm-tune.md: Likewise.
5065         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5066         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5067         cortex-a76.cortex-a55.
5069 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
5071         PR target/85769
5072         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5074 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5076         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5077         comment.
5078         (EPILOGUE_USES): Likewise.
5080 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5082         * tree-inline.c (remap_location): New function extracted from...
5083         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5084         (copy_phis_for_bb): ...here.  Call remap_location.
5085         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5087 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5089         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5090         unaligned vsx for 16B memset.
5092 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5094         PR target/86285
5095         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5096         ieee128_float_type_node to long_double_type_node unless
5097         TARGET_LONG_DOUBLE_128 is set.
5099 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5101         * cfgloop.c (get_loop_location): Convert return type from
5102         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5103         by implicit construction from rtx_insn *, and using
5104         dump_user_location_t::from_function_decl for the fallback case.
5105         * cfgloop.h (get_loop_location): Convert return type from
5106         location_t to dump_user_location_t.
5107         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5108         dump_printf_loc to pass in a dump_location_t rather than a
5109         location_t, via the gimple stmt.
5110         * coverage.c (get_coverage_counts): Update calls to
5111         dump_printf_loc to pass in dump_location_t rather than a
5112         location_t.
5113         * doc/optinfo.texi (Dump types): Convert example of
5114         dump_printf_loc from taking "locus" to taking "insn".  Update
5115         description of the "_loc" calls to cover dump_location_t.
5116         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5117         "selftest.h".
5118         (dump_user_location_t::dump_user_location_t): New constructors,
5119         from gimple *stmt and rtx_insn *.
5120         (dump_user_location_t::from_function_decl): New function.
5121         (dump_loc): Make static.
5122         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5123         const dump_location_t &.
5124         (dump_generic_expr_loc): Delete.
5125         (dump_printf_loc): Convert param "loc" from location_t to
5126         const dump_location_t &.
5127         (selftest::test_impl_location): New function.
5128         (selftest::dumpfile_c_tests): New function.
5129         * dumpfile.h: Include "profile-count.h".
5130         (class dump_user_location_t): New class.
5131         (struct dump_impl_location_t): New struct.
5132         (class dump_location_t): New class.
5133         (dump_printf_loc): Convert 2nd param from source_location to
5134         const dump_location_t &.
5135         (dump_generic_expr_loc): Delete.
5136         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5137         const dump_location_t &.
5138         * gimple-fold.c (fold_gimple_assign): Update call to
5139         dump_printf_loc to pass in a dump_location_t rather than a
5140         location_t, via the gimple stmt.
5141         (gimple_fold_call): Likewise.
5142         * gimple-loop-interchange.cc
5143         (loop_cand::analyze_iloop_reduction_var): Update for change to
5144         check_reduction_path.
5145         (tree_loop_interchange::interchange): Update for change to
5146         find_loop_location.
5147         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5148         change in return-type of find_loop_location.
5149         (graphite_regenerate_ast_isl): Likewise.
5150         * graphite-optimize-isl.c (optimize_isl): Likewise.
5151         * graphite.c (graphite_transform_loops): Likewise.
5152         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5153         pass in a dump_location_t rather than a location_t, via the
5154         gimple stmt.
5155         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5156         * ipa.c (walk_polymorphic_call_targets): Likewise.
5157         * loop-unroll.c (report_unroll): Convert "locus" param from
5158         location_t to dump_location_t.
5159         (decide_unrolling): Update for change to get_loop_location's
5160         return type.
5161         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5162         location_t to dump_user_location_t.
5163         (grid_find_single_omp_among_assignments_1): Updates calls to
5164         dump_printf_loc to pass in a dump_location_t rather than a
5165         location_t, via the gimple stmt.
5166         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5167         location_t to dump_location_t.  Updates calls to dump_printf_loc
5168         to pass in a dump_location_t rather than a location_t, via the
5169         gimple stmt.
5170         (grid_inner_loop_gridifiable_p): Likewise.
5171         (grid_dist_follows_simple_pattern): Likewise.
5172         (grid_gfor_follows_tiling_pattern): Likewise.
5173         (grid_target_follows_gridifiable_pattern): Likewise.
5174         (grid_attempt_target_gridification): Convert initialization
5175         of local "grid" from memset to zero-initialization; FIXME: does
5176         this require C++11?  Update call to dump_printf_loc to pass in a
5177         optinfo_location rather than a location_t, via the gimple stmt.
5178         * profile.c (read_profile_edge_counts): Updates call to
5179         dump_printf_loc to pass in a dump_location_t rather than a
5180         location_t
5181         (compute_branch_probabilities): Likewise.
5182         * selftest-run-tests.c (selftest::run_tests): Call
5183         dumpfile_c_tests.
5184         * selftest.h (dumpfile_c_tests): New decl.
5185         * tree-loop-distribution.c (pass_loop_distribution::execute):
5186         Update for change in return type of find_loop_location.
5187         * tree-parloops.c (parallelize_loops): Likewise.
5188         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5189         "locus" from location_t to dump_user_location_t.
5190         (canonicalize_loop_induction_variables): Likewise.
5191         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5192         for change in return type of find_loop_location.
5193         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5194         to dump_printf_loc to pass in a dump_location_t rather than a
5195         location_t, via the stmt.
5196         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5197         Likewise.
5198         * tree-vect-loop-manip.c (find_loop_location): Convert return
5199         type from source_location to dump_user_location_t.
5200         (vect_do_peeling): Update for above change.
5201         (vect_loop_versioning): Update for change in type of
5202         vect_location.
5203         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5204         from location_t to dump_user_location_t.
5205         (vect_estimate_min_profitable_iters): Update for change in type
5206         of vect_location.
5207         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5208         location_t to dump_location_t.
5209         (vect_slp_bb): Update for change in type of vect_location.
5210         * tree-vectorizer.c (vect_location): Convert from source_location
5211         to dump_user_location_t.
5212         (try_vectorize_loop_1): Update for change in vect_location's type.
5213         (vectorize_loops): Likewise.
5214         (increase_alignment): Likewise.
5215         * tree-vectorizer.h (vect_location): Convert from source_location
5216         to dump_user_location_t.
5217         (find_loop_location): Convert return type from source_location to
5218         dump_user_location_t.
5219         (check_reduction_path): Convert 1st param from location_t to
5220         dump_user_location_t.
5221         * value-prof.c (check_counter): Update call to dump_printf_loc to
5222         pass in a dump_user_location_t rather than a location_t; update
5223         call to error_at for change in type of "locus".
5224         (check_ic_target): Update call to dump_printf_loc to
5225         pass in a dump_user_location_t rather than a location_t, via the
5226         call_stmt.
5228 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5230         * config/s390/s390.h (enum processor_flags): Do not use
5231         default tune parameter when -march was specified.
5233 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5235         PR target/86314
5236         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5237         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5238         operands.
5240 2018-06-26  Richard Biener  <rguenther@suse.de>
5242         PR tree-optimization/86287
5243         PR bootstrap/86316
5244         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5245         (vect_analyze_loop): Initialize n_stmts.
5247 2018-06-26  Richard Biener  <rguenther@suse.de>
5249         PR middle-end/86271
5250         * fold-const.c (fold_convertible_p): Pointer extension
5251         isn't valid.
5253 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5255         PR debug/86064
5256         * dwarf2out.c (loc_list_has_views): Adjust comments.
5257         (dw_loc_list): Split single cross-partition range with
5258         nonzero locview.
5260 2018-06-25  Jeff Law  <law@redhat.com>
5262         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5263         on -mbig-switch by default.
5265         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5266         test.
5267         (const_float_0_operand): Remove unused predicate.
5268         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5269         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5270         (recipsf2): New expander.  Original pattern now called
5271         (recipsf2_insn).
5272         (recipdf2, recipdf2_insn): Similarly.
5273         (rsqrtsf2, rsqrtsf2_insn): Similarly
5274         (rsqrtdf2, rsqrtdf2_insn): Similarly
5276 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5278         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5279         Simplify logic for FreeBSD (twice).
5281 2018-06-25  Martin Sebor  <msebor@redhat.com>
5283         PR tree-optimization/86204
5284         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5285         a strnlen result if it's less than the length of the string.
5287 2018-06-25  Martin Sebor  <msebor@redhat.com>
5289         PR tree-optimization/85700
5290         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5291         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5292         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5294 2018-06-25  Martin Sebor  <msebor@redhat.com>
5296         * doc/extend.texi (Zero-length arrays): Update and clarify.
5298 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5300         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5301         added IEEE/IBM long double multilib support on PowerPC little
5302         endian Linux systems.
5303         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5304         (MULTILIB_DEFAULTS): Likewise.
5305         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5306         Likewise.
5307         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5308         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5309         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5311 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5313         PR middle-end/86311
5314         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5315         (REORDER_45): Likewise.
5317 2018-06-25  Jeff Law  <law@redhat.com>
5319         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5320         dividend to 32 bits.  Adjust length.
5321         (udivmodhi4): Cleanup output template.  Fix length.
5323 2018-06-25  Carl Love  <cel@us.ibm.com>
5325         * config/rs6000/vsx.md: Change word selector to prefered location.
5327 2018-06-25  Richard Biener  <rguenther@suse.de>
5329         PR tree-optimization/86304
5330         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5331         epilogue-if-converted loops as well.
5333 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5335         * lto-section-out.c (lto_begin_section): Do not print section
5336         name for noaddr and unnumbered dumps.
5338 2018-06-25  Richard Biener  <rguenther@suse.de>
5340         * tree-vectorizer.h (struct vec_info_shared): New structure
5341         with parts split out from struct vec_info and loop_nest from
5342         struct _loop_vec_info.
5343         (struct vec_info): Adjust accordingly.
5344         (struct _loop_vec_info): Likewise.
5345         (LOOP_VINFO_LOOP_NEST): Adjust.
5346         (LOOP_VINFO_DATAREFS): Likewise.
5347         (LOOP_VINFO_DDRS): Likewise.
5348         (struct _bb_vec_info): Likewise.
5349         (BB_VINFO_DATAREFS): Likewise.
5350         (BB_VINFO_DDRS): Likewise.
5351         (struct _stmt_vec_info): Add dr_aux member.
5352         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5353         (DR_MISALIGNMENT_UNINITIALIZED): New.
5354         (set_dr_misalignment): Adjust.
5355         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5356         (vect_analyze_loop): Adjust prototype.
5357         (vect_analyze_loop_form): Likewise.
5358         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5359         Compute dependences lazily.
5360         (vect_record_base_alignments): Use shared datarefs/ddrs.
5361         (vect_verify_datarefs_alignment): Likewise.
5362         (vect_analyze_data_refs_alignment): Likewise.
5363         (vect_analyze_data_ref_accesses): Likewise.
5364         (vect_analyze_data_refs): Likewise.
5365         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5366         constructor parameter for shared part.
5367         (vect_analyze_loop_form): Pass in shared part and adjust.
5368         (vect_analyze_loop_2): Pass in storage for the number of
5369         stmts.  Move loop nest finding to the caller.  Compute
5370         datarefs lazily.
5371         (vect_analyze_loop): Pass in shared part.
5372         (vect_transform_loop): Verify shared datarefs are unchanged.
5373         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5374         constructor parameter for shared part.
5375         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5376         (vect_slp_bb): Verify shared datarefs are unchanged before
5377         transform.
5378         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5379         change.
5380         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5381         DR_MISALIGNMENT_UNINITIALIZED.
5382         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5383         parameter for shared part.
5384         (vec_info::~vec_info): Adjust.
5385         (vec_info_shared::vec_info_shared): New.
5386         (vec_info_shared::~vec_info_shared): Likewise.
5387         (vec_info_shared::save_datarefs): Likewise.
5388         (vec_info_shared::check_datarefs): Likewise.
5389         (try_vectorize_loop_1): Construct shared part live for analyses
5390         of a single loop for multiple vector sizes.
5391         * tree-parloops.c (gather_scalar_reductions): Adjust.
5393 2018-06-25  Richard Biener  <rguenther@suse.de>
5395         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5396         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5397         (vect_analyze_data_refs): Remove similar code from here and
5398         simplify accordingly.
5400 2018-06-25  Richard Biener  <rguenther@suse.de>
5402         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5403         for reverse storage order accesses rather than asserting
5404         they cannot happen here.
5406 2018-06-25  Tom de Vries  <tdevries@suse.de>
5408         PR debug/86257
5409         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5410         Use data16 instead of .byte for insn prefix.
5412 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5414         PR C++/86082
5415         * parser.c (make_char_string_pack): Pass this literal chars
5416         through cpp_interpret_string.
5417         (cp_parser_userdef_numeric_literal): Check the result of
5418         make_char_string_pack.
5420 2018-06-24  Maya Rashish  <coypu@sdf.org>
5422         * ginclude/stddef.h: Simplify conditions around avoiding
5423         re-definition of __size_t.
5425 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5427         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5428         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5430 2018-06-22  Maya Rashish  <coypu@sdf.org>
5432         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5433         made to OpenBSD and NetBSD through the years.
5435 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5437         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5438         behavior of vec_pack (vector double, vector double) to match
5439         behavior of vec_float2 (vector double, vector double).
5441 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5443         * gimplify.c (gimplify_function_tree): Prevent creation
5444         of a trampoline for the address of the current function
5445         passed to entry/exit instrumentation hooks.
5447 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5449         PR target/86222
5450         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5451         correctly.
5453 2018-06-22  Martin Liska  <mliska@suse.cz>
5455         PR tree-optimization/86263
5456         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5457         Bail out if is_enabled is false.
5458         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5459         New declaration.
5460         (jump_table_cluster::is_enabled): New function.
5462 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5464         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5465         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5466         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5467         (lto_input_ts_binfo_tree_pointers): Likewise.
5468         * tree-streamer-out.c (streamer_write_tree_bitfields,
5469         write_ts_binfo_tree_pointers): Likewise.
5470         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5472 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5474         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5476 2018-06-22  Martin Liska  <mliska@suse.cz>
5478         * symbol-summary.h (get): Make it pure and inline move
5479         functionality from ::get function.
5480         (get): Remove and inline into ::get and ::get_create.
5481         (get_create): Move code from ::get function.
5483 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5485         PR target/85994
5486         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5487         -x assembler-with-cpp.
5489 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5491         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5492         _FILE_OFFSET_BITS=64 for C++.
5494 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5496         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5497         conversion insn that shows up when pr85657-3.c is compiled using
5498         IEEE 128-bit long double.
5499         (neg<mode>2_internal): Use the correct mode to check whether the
5500         mode is IBM extended.
5501         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5502         multiply and divide external functions from being created more
5503         than once.
5505 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5507         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5508         functions.
5509         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5510         the edge can be forwarded.
5511         (cfg_layout_merge_blocks): Likewise.
5513 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5515         * except.c (finish_eh_generation): Commit edge insertions only after
5516         the EH edges have been redirected from post-landing to landing pads.
5518 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5520         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5521         create_tmp_var_for to create the FRAME decl.
5522         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5524 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5526         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5527         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5528         debug statement when resetting its value.
5529         (expand_call_inline): Copy the locus of the call onto the assignment
5530         of the return value, if any.  Use local variable in more cases.
5532 2018-06-21  Martin Liska  <mliska@suse.cz>
5534         * ipa-pure-const.c (propagate_nothrow): Use
5535         funct_state_summaries->get.
5536         (dump_malloc_lattice): Likewise.
5537         (propagate_malloc): Likewise.
5539 2018-06-21  Richard Biener  <rguenther@suse.de>
5541         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5542         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5543         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5544         comment.
5545         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5546         BLOCK_ABSTRACT_ORIGIN unconditionally.
5548 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5550         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5551         deleting it.
5552         * ipa-reference.c (ipa_reference_c_finalize): Delete
5553         ipa_ref_opt_sum_summaries and set it to NULL.
5555 2018-06-21  Tom de Vries  <tdevries@suse.de>
5557         PR tree-optimization/85859
5558         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5559         test with comment from bb_no_side_effects_p.
5561 2018-06-21  Richard Biener  <rguenther@suse.de>
5563         PR tree-optimization/86232
5564         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5565         max for constant niter.
5567 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5569         * config/aarch64/aarch64-simd.md
5570         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5572 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5574         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5575         Make opernads of the unspec commutative.
5577 2018-06-21  Richard Biener  <rguenther@suse.de>
5579         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5580         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5581         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5582         (vect_analyze_data_ref_dependence): Re-order checks to deal with
5583         NULL DR_STEP.
5584         (vect_record_base_alignments): Do not record base alignment
5585         for gathers or scatters.
5586         (vect_compute_data_ref_alignment): Drop return value that is always
5587         true.  Bail out early for gathers or scatters.
5588         (vect_enhance_data_refs_alignment): Bail out early for gathers
5589         or scatters.
5590         (vect_find_same_alignment_drs): Likewise.
5591         (vect_analyze_data_refs_alignment): Remove dead code.
5592         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5593         (vect_analyze_data_refs): For possible gathers or scatters do
5594         not create an alternate DR, just check their possible validity
5595         and mark them.  Adjust DECL_NONALIASED handling to not rely
5596         on DR_BASE_ADDRESS.
5597         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5598         update inits of gathers or scatters.
5599         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5600         Also copy gather/scatter flag to pattern vinfo.
5602 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5604         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5605         behavior of vec_packsu (vector unsigned long long, vector unsigned
5606         long long) to match behavior of vec_packs with same signature.
5608 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5609             Thomas Schwinge <thomas@codesourcery.com>
5610             Cesar Philippidis  <cesar@codesourcery.com>
5612         * gimplify.c (gimplify_scan_omp_clauses): Add support for
5613         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5614         (gimplify_adjust_omp_clauses): Likewise.
5615         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5616         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5617         (gimplify_omp_target_update): Update handling of acc update and
5618         enter/exit data.
5619         * omp-low.c (install_var_field): Remove unused parameter
5620         base_pointers_restrict.
5621         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5622         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5623         FINALIZE}
5624         (omp_target_base_pointers_restrict_p): Delete.
5625         (scan_omp_target): Update call to scan_sharing_clauses.
5626         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5627         FINALIZE}.
5628         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5629         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5630         (convert_local_omp_clauses): Likewise.
5631         * tree-pretty-print.c (dump_omp_clause): Likewise.
5632         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
5633         FINALIZE}.
5634         (omp_clause_code_name): Likewise.
5636 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5638         PR debug/86194
5639         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5640         be narrowed.
5642         PR tree-optimization/86231
5643         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5644         anti-range don't overwrite *vr0min before using it to compute *vr0max.
5646 2018-06-20  Tom de Vries  <tdevries@suse.de>
5648         PR tree-optimization/86097
5649         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5650         iv type if signedness of iv type is not the same as that of *nit.
5652 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5654         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
5655         EDGE_EH edges, verify they are all EDGE_EH.
5657 2018-06-20  Maya Rashish  <coypu@sdf.org>
5659         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5661 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5663         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5664         * config/aarch64/aarch64.c (xgene1_tunings): Add
5665         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5666         (aarch64_mode_valid_for_sched_fusion_p):
5667         Allow 16-byte modes.
5668         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5669         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5670         128-bit modes.
5671         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5672         New pattern.
5673         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5674         * config/aarch64/iterators.md (VQ2): New mode iterator.
5676 2018-06-20  Martin Liska  <mliska@suse.cz>
5678         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5679         Change default ratio from 10 to 8.
5681 2018-06-20  Martin Liska  <mliska@suse.cz>
5683         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5684         New.
5685         (bit_test_cluster::find_bit_tests): Likewise.
5686         (switch_decision_tree::analyze_switch_statement): Find clusters.
5687         * tree-switch-conversion.h (struct jump_table_cluster): Document
5688         hierarchy.
5690 2018-06-20  Martin Liska  <mliska@suse.cz>
5692         * tree-switch-conversion.c (switch_conversion::collect):
5693         Record m_uniq property.
5694         (switch_conversion::expand): Bail out for special conditions.
5695         (group_cluster::~group_cluster): New.
5696         (group_cluster::group_cluster): Likewise.
5697         (group_cluster::dump): Likewise.
5698         (jump_table_cluster::emit): New.
5699         (switch_decision_tree::fix_phi_operands_for_edges): New.
5700         (struct case_node): Remove struct.
5701         (jump_table_cluster::can_be_handled): New.
5702         (case_values_threshold): Moved to header.
5703         (reset_out_edges_aux): Likewise.
5704         (jump_table_cluster::is_beneficial): New.
5705         (bit_test_cluster::can_be_handled): Likewise.
5706         (add_case_node): Remove.
5707         (bit_test_cluster::is_beneficial): New.
5708         (case_bit_test::cmp): New.
5709         (bit_test_cluster::emit): New.
5710         (expand_switch_as_decision_tree_p): Remove.
5711         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5712         (fix_phi_operands_for_edge): Likewise.
5713         (switch_decision_tree::analyze_switch_statement): New.
5714         (compute_cases_per_edge): Move ...
5715         (switch_decision_tree::compute_cases_per_edge): ... here.
5716         (try_switch_expansion): Likewise.
5717         (switch_decision_tree::try_switch_expansion): Likewise.
5718         (record_phi_operand_mapping): Likewise.
5719         (switch_decision_tree::record_phi_operand_mapping): Likewise.
5720         (emit_case_decision_tree): Likewise.
5721         (switch_decision_tree::emit): Likewise.
5722         (balance_case_nodes): Likewise.
5723         (switch_decision_tree::balance_case_nodes): Likewise.
5724         (dump_case_nodes): Likewise.
5725         (switch_decision_tree::dump_case_nodes): Likewise.
5726         (emit_jump): Likewise.
5727         (switch_decision_tree::emit_jump): Likewise.
5728         (emit_cmp_and_jump_insns): Likewise.
5729         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5730         (emit_case_nodes): Likewise.
5731         (switch_decision_tree::emit_case_nodes): Likewise.
5732         (conditional_probability): Remove.
5733         * tree-switch-conversion.h (enum cluster_type): New.
5734         (PRINT_CASE): New.
5735         (struct cluster): Likewise.
5736         (cluster::cluster): Likewise.
5737         (struct simple_cluster): Likewise.
5738         (simple_cluster::simple_cluster): Likewise.
5739         (struct group_cluster): Likewise.
5740         (struct jump_table_cluster): Likewise.
5741         (struct bit_test_cluster): Likewise.
5742         (struct min_cluster_item): Likewise.
5743         (struct case_tree_node): Likewise.
5744         (case_tree_node::case_tree_node): Likewise.
5745         (jump_table_cluster::case_values_threshold): Likewise.
5746         (struct case_bit_test): Likewise.
5747         (struct switch_decision_tree): Likewise.
5748         (struct switch_conversion): Likewise.
5749         (switch_decision_tree::reset_out_edges_aux): Likewise.
5751 2018-06-20  Martin Liska  <mliska@suse.cz>
5753         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5754         (hoist_edge_and_branch_if_true): Likewise.
5755         (expand_switch_using_bit_tests_p): Likewise.
5756         (struct case_bit_test): Likewise.
5757         (case_bit_test_cmp): Likewise.
5758         (emit_case_bit_tests): Likewise.
5759         (switch_conversion::switch_conversion): New class.
5760         (struct switch_conv_info): Remove old struct.
5761         (collect_switch_conv_info): More to ...
5762         (switch_conversion::collect): ... this.
5763         (check_range): Likewise.
5764         (switch_conversion::check_range): Likewise.
5765         (check_all_empty_except_final): Likewise.
5766         (switch_conversion::check_all_empty_except_final): Likewise.
5767         (check_final_bb): Likewise.
5768         (switch_conversion::check_final_bb): Likewise.
5769         (create_temp_arrays): Likewise.
5770         (switch_conversion::create_temp_arrays): Likewise.
5771         (free_temp_arrays): Likewise.
5772         (gather_default_values): Likewise.
5773         (switch_conversion::gather_default_values): Likewise.
5774         (build_constructors): Likewise.
5775         (switch_conversion::build_constructors): Likewise.
5776         (constructor_contains_same_values_p): Likewise.
5777         (switch_conversion::contains_same_values_p): Likewise.
5778         (array_value_type): Likewise.
5779         (switch_conversion::array_value_type): Likewise.
5780         (build_one_array): Likewise.
5781         (switch_conversion::build_one_array): Likewise.
5782         (build_arrays): Likewise.
5783         (switch_conversion::build_arrays): Likewise.
5784         (gen_def_assigns): Likewise.
5785         (switch_conversion::gen_def_assigns): Likewise.
5786         (prune_bbs): Likewise.
5787         (switch_conversion::prune_bbs): Likewise.
5788         (fix_phi_nodes): Likewise.
5789         (switch_conversion::fix_phi_nodes): Likewise.
5790         (gen_inbound_check): Likewise.
5791         (switch_conversion::gen_inbound_check): Likewise.
5792         (process_switch): Use the newly created class.
5793         (switch_conversion::expand): New.
5794         (switch_conversion::~switch_conversion): New.
5795         * tree-switch-conversion.h: New file.
5797 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5799         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5800         tree-vect-patterns.c.
5801         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5802         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
5803         (vect_recog_sad_pattern): Likewise.
5804         (vect_recog_widen_sum_pattern): Likewise.
5805         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
5806         (vect_recog_widen_shift_pattern): Remove the type_in argument.
5807         (vect_recog_rotate_pattern): Likewise.
5808         (vect_recog_mult_pattern): Likewise.
5809         (vect_recog_vector_vector_shift_pattern): Likewise.
5810         (vect_recog_divmod_pattern): Likewise.
5811         (vect_recog_mixed_size_cond_pattern): Likewise.
5812         (vect_recog_bool_pattern): Likewise.
5813         (vect_recog_mask_conversion_pattern): Likewise.
5814         (vect_try_gather_scatter_pattern): Likewise.
5815         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
5816         (vect_recog_over_widening_pattern): Likewise.
5817         (vect_recog_gather_scatter_pattern): Likewise.
5818         (vect_recog_func_ptr): Move from tree-vectorizer.h
5819         (vect_vect_recog_func_ptrs): Move further down the file.
5820         (vect_recog_func): Likewise.  Remove the third argument.
5821         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5822         (vect_pattern_recog_1): Expect the pattern function to do any
5823         necessary target tests.  Also expect it to provide a vector type.
5824         Remove the type_in handling.
5826 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5828         * tree-vect-patterns.c (vect_pattern_detected): New function.
5829         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5830         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5831         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5832         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5833         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5834         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5835         (vect_recog_mask_conversion_pattern)
5836         (vect_try_gather_scatter_pattern): Likewise.
5838 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5840         * tree-vect-patterns.c (vect_get_internal_def): New function.
5841         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5842         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5843         (search_type_for_mask_1): Use it.
5845 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5847         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5848         redundant WIDEN_SUM_EXPR handling.
5849         (vect_recog_sad_pattern): Likewise.
5851 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5853         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5854         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5855         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5856         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5857         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5859 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5861         * tree-vect-stmts.c (vectorizable_call): Make sure that we
5862         use the stmt_vec_info of the original bb statement for the
5863         new zero assignment, even if the call is part of a pattern.
5865 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5867         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5868         that the sequence is attached to the original statement rather
5869         than the pattern statement.
5870         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5871         PATTERN_DEF_SEQ from the original statement rather than
5872         the main pattern statement.
5873         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5874         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5875         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5877 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5879         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5880         definition statements before the early exit for statements that aren't
5881         live or relevant.
5882         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5883         split out from...
5884         (vect_transform_loop): ...here.  Process pattern definition
5885         statements without first checking whether the main pattern
5886         statement is live or relevant.
5888 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5890         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5891         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5893 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
5895         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5896         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5897         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5898         (expand_block_compare): Change select_block_compare_mode call.
5899         (expand_strncmp_align_check): Use new functions, fix comment.
5900         (emit_final_str_compare_gpr): New function.
5901         (expand_strn_compare): Refactor and clean up code.
5902         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5904 2018-06-19  Tony Reix  <tony.reix@atos.com>
5905             Damien Bergamini  <damien.bergamini@atos.com>
5906             David Edelsohn  <dje.gcc@gmail.com>
5908         * collect2.c (static_obj): New variable.
5909         (static_libs): New variable.
5910         (is_in_list): Uncomment declaration.
5911         (main): Track AIX libraries linked statically.
5912         (is_in_list): Uncomment definition.
5913         (scan_prog_file): Don't add AIX shared libraries initializer
5914         to constructor list if linking statically.
5916 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
5918         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5919         constant.
5920         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5922 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
5924         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5925         blocks.
5927 2018-06-19  Martin Liska  <mliska@suse.cz>
5929         * config/i386/i386.c (ix86_can_inline_p): Do not use
5930         ipa_fn_summaries::get_create.
5931         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5932         get.
5933         (devirtualization_time_bonus): Likewise.
5934         (ipcp_propagate_stage): Likewise.
5935         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5936         (edge_set_predicate): Likewise.
5937         (evaluate_conditions_for_known_args): Likewise.
5938         (evaluate_properties_for_edge): Likewise.
5939         (ipa_call_summary::reset): Tranform to ...
5940         (ipa_call_summary::~ipa_call_summary): ... this.
5941         (ipa_fn_summary::reset): Transform to ...
5942         (ipa_fn_summary::~ipa_fn_summary): ... this.
5943         (ipa_fn_summary_t::remove): Rename to ...
5944         (ipa_fn_summary_t::remove_callees): ... this.
5945         (ipa_fn_summary_t::duplicate): Use placement new
5946         instead of memory copy.
5947         (ipa_call_summary_t::duplicate): Likewise.
5948         (ipa_call_summary_t::remove): Remove.
5949         (dump_ipa_call_summary): Change get_create to get.
5950         (ipa_dump_fn_summary): Dump only when summary exists.
5951         (analyze_function_body): Use symbol_summary::get instead
5952         of get_create.
5953         (compute_fn_summary): Likewise.
5954         (estimate_edge_devirt_benefit): Likewise.
5955         (estimate_edge_size_and_time): Likewise.
5956         (inline_update_callee_summaries): Likewise.
5957         (remap_edge_change_prob): Likewise.
5958         (remap_edge_summaries): Likewise.
5959         (ipa_merge_fn_summary_after_inlining): Likewise.
5960         (write_ipa_call_summary): Likewise.
5961         (ipa_fn_summary_write): Likewise.
5962         (ipa_free_fn_summary): Likewise.
5963         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5964         (struct ipa_call_summary): Likewise.
5965         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5966         of get_create.
5967         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5968         (estimate_size_after_inlining): Likewise.
5969         (estimate_growth): Likewise.
5970         (growth_likely_positive): Likewise.
5971         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5972         (inline_call): Likewise.
5973         * ipa-inline.c (caller_growth_limits): Likewise.
5974         (can_inline_edge_p): Likewise.
5975         (can_inline_edge_by_limits_p): Likewise.
5976         (compute_uninlined_call_time): Likewise.
5977         (compute_inlined_call_time): Likewise.
5978         (want_inline_small_function_p): Likewise.
5979         (edge_badness): Likewise.
5980         (update_caller_keys): Likewise.
5981         (update_callee_keys): Likewise.
5982         (inline_small_functions): Likewise.
5983         (inline_to_all_callers_1): Likewise.
5984         (dump_overall_stats): Likewise.
5985         (early_inline_small_functions): Likewise.
5986         (early_inliner): Likewise.
5987         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5988         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5989         * ipa-pure-const.c (malloc_candidate_p): Likewise.
5990         * ipa-split.c (execute_split_functions): Likewise.
5991         * symbol-summary.h: Likewise.
5992         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5994 2018-06-19  Richard Biener  <rguenther@suse.de>
5996         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5997         (vectorize_loops): ... here.  Fix dbgcnt handling.
5998         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6000 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6002         PR target/86197
6003         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6004         ieee128 argument takes up only one (vector) register, not two (floating
6005         point) registers.
6007 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6009         * gimplify.c (gimplify_init_constructor): Really never clear for an
6010         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6012 2018-06-19  Richard Biener  <rguenther@suse.de>
6014         PR tree-optimization/86179
6015         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6016         after failed recognition.
6018 2018-06-18  Martin Sebor  <msebor@redhat.com>
6020         PR middle-end/85602
6021         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6022         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6023         Handle integer subtraction.
6024         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6025         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6027 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6029         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6030         param from rtx to rtx_insn *.
6031         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6032         param.
6033         (frv_ifcvt_modify_insn): Likwise.
6034         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6035         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6036         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6037         as_a <rtx_insn *> cast to local "unprotected_region" once
6038         it's been established that it's not NULL or pc_rtx.
6039         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6040         param "sethi" from rtx to rtx_insn *.
6041         (nds32_group_float_insns): Likewise for param "insn".
6042         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6043         param.
6044         (vax_output_int_subtract): Likewise.
6045         * config/vax/vax.c (vax_output_int_add): Likewise for param
6046         "insn".
6047         (vax_output_int_subtract): Likewise.
6048         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6049         (emit_pattern_after): Likewise for param "after".
6050         (emit_insn_after): Likewise.
6051         (emit_jump_insn_after): Likewise.
6052         (emit_call_insn_after): Likewise.
6053         (emit_debug_insn_after): Likewise.
6054         (emit_pattern_before): Likewise for param "before".
6055         (emit_insn_before): Likewise.
6056         (emit_jump_insn_before): Likewise.
6057         * final.c (get_insn_template): Likewise for param "insn", removing
6058         a cast.
6059         * output.h (get_insn_template): Likewise for 2nd param.
6060         * rtl.h (emit_insn_before): Likewise.
6061         (emit_jump_insn_before): Likewise.
6062         (emit_debug_insn_before_noloc): Likewise.
6063         (emit_insn_after): Likewise.
6064         (emit_jump_insn_after): Likewise.
6065         (emit_call_insn_after): Likewise.
6066         (emit_debug_insn_after): Likewise.
6067         (set_insn_deleted): Likewise for param.
6069 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6071         PR target/85358
6072         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6073         floating point modes, so that IFmode is numerically greater than
6074         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6075         to declare the ordering.  This prevents IFmode from being
6076         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6077         machine.  Include rs6000-modes.h to share the fractional values
6078         between genmodes* and the rest of the compiler.
6079         (IFmode): Likewise.
6080         (KFmode): Likewise.
6081         (TFmode): Likewise.
6082         * config/rs6000/rs6000-modes.h: New file.
6083         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6084         meaning of rs6000_long_double_size so that 126..128 selects an
6085         appropriate 128-bit floating point type.
6086         (rs6000_option_override_internal): Likewise.
6087         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6088         (TARGET_LONG_DOUBLE_128): Change the meaning of
6089         rs6000_long_double_size so that 126..128 selects an appropriate
6090         128-bit floating point type.
6091         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6092         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6093         source and destination to match the standard usage.
6094         (truncifkf2): Likewise.
6095         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6096         ISA 2.07 to use an explicit clobber, instead of passing in a
6097         temporary.
6098         (copysign<mode>3_soft): Likewise.
6100 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6102         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6103         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6104         (vect_slp_analyze_instance_dependence): Likewise.
6105         (vect_enhance_data_refs_alignment): Likewise.
6106         (vect_analyze_data_refs_alignment): Likewise.
6107         (vect_slp_analyze_and_verify_instance_alignment
6108         (vect_analyze_data_ref_accesses): Likewise.
6109         (vect_prune_runtime_alias_test_list): Likewise.
6110         (vect_analyze_data_refs): Likewise.
6111         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6112         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6113         (vect_analyze_scalar_cycles_1): Likewise.
6114         (vect_get_loop_niters): Likewise.
6115         (vect_analyze_loop_form_1): Likewise.
6116         (vect_update_vf_for_slp): Likewise.
6117         (vect_analyze_loop_operations): Likewise.
6118         (vect_analyze_loop): Likewise.
6119         (vectorizable_induction): Likewise.
6120         (vect_transform_loop): Likewise.
6121         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6122         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6123         (vect_make_slp_decision): Likewise.
6124         (vect_detect_hybrid_slp): Likewise.
6125         (vect_slp_analyze_operations): Likewise.
6126         (vect_slp_bb): Likewise.
6127         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6128         (vectorizable_bswap): Likewise.
6129         (vectorizable_call): Likewise.
6130         (vectorizable_simd_clone_call): Likewise.
6131         (vectorizable_conversion): Likewise.
6132         (vectorizable_assignment): Likewise.
6133         (vectorizable_shift): Likewise.
6134         (vectorizable_operation): Likewise.
6135         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6137 2018-06-18  Martin Sebor  <msebor@redhat.com>
6139         PR tree-optimization/81384
6140         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6141         * builtins.c (expand_builtin_strnlen): New function.
6142         (expand_builtin): Call it.
6143         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6144         * builtins.def (BUILT_IN_STRNLEN): New.
6145         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6146         Warn for bounds in excess of maximum object size.
6147         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6148         single-value ranges.  Handle strnlen.
6149         (handle_builtin_strlen): Handle strnlen.
6150         (strlen_check_and_optimize_stmt): Same.
6151         * doc/extend.texi (Other Builtins): Document strnlen.
6153 2018-06-18  Maya Rashish  <coypu@sdf.org>
6155         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6156         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6157         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6159         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6160         here to ...
6161         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6163 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6165         * tree.c (escaped_string::escape): Replace cast to char * by
6166         const_cast<char *> (unescaped).
6168 2018-06-18  Nick Clifton  <nickc@redhat.com>
6170         PR 84195
6171         * tree.c (escaped_string): New class.  Converts an unescaped
6172         string into its escaped equivalent.
6173         (warn_deprecated_use): Use the new class to convert the
6174         deprecation message, if present.
6175         (test_escaped_strings): New self test.
6176         (test_c_tests): Add test_escaped_strings.
6177         * doc/extend.texi (deprecated): Add a note that the
6178         deprecation message is affected by the -fmessage-length
6179         option, and that control characters will be escaped.
6180         (#pragma GCC error): Document this pragma.
6181         (#pragma GCC warning): Likewise.
6182         * doc/invoke.texi (-fmessage-length): Document this option's
6183         effect on the #warning and #error preprocessor directives and
6184         the deprecated attribute.
6186 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6188         * tree.c (decl_value_expr_lookup): Revert latest change.
6189         (decl_value_expr_insert): Likewise.
6191 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6193         * gimplify.c (nonlocal_vlas): Delete.
6194         (nonlocal_vla_vars): Likewise.
6195         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6196         referenced VLAs.
6197         (gimplify_body): Do not create and destroy nonlocal_vlas.
6198         * tree-nested.c: Include diagnostic.h.
6199         (use_pointer_in_frame): Tweak.
6200         (lookup_field_for_decl): Add assertion and declare the transformation.
6201         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6202         internal error when the reference is in a wrong context.  Do not
6203         create a debug decl by default.
6204         (note_nonlocal_block_vlas): Delete.
6205         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6206         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6207         create a debug decl by default.
6208         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6209         call is in a wrong context.
6210         (fixup_vla_decls): New function.
6211         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6212         debug variables were created.
6213         * tree.c (decl_value_expr_lookup): Add checking assertion.
6214         (decl_value_expr_insert): Likewise.
6216 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6218         PR middle-end/82479
6219         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6220         * tree-scalar-evolution.c (interpret_expr): Likewise.
6221         (expression_expensive_p): Likewise.
6222         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6223         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6224         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6225         (ssa_defined_by_minus_one_stmt_p): New.
6227 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6229         PR middle-end/64946
6230         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6231         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6232         * dojump.c (do_jump): Likewise.
6233         * expr.c (expand_expr_real_2): Check operand type's sign.
6234         * fold-const.c (const_unop): Handle ABSU_EXPR.
6235         (fold_abs_const): Likewise.
6236         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6237         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6238         (strip_sign_op_1): Likesise.
6239         * match.pd: Add new pattern to generate ABSU_EXPR.
6240         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6241         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6242         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6243         * tree-inline.c (estimate_operator_cost): Likewise.
6244         * tree-pretty-print.c (dump_generic_node): Likewise.
6245         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6246         * tree.def (ABSU_EXPR): New.
6248 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6250         PR middle-end/86095
6251         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6252         documented as preserved for backward compatibility only.
6253         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6255         PR rtl-optimization/86108
6256         * bb-reorder.c (create_forwarder_block): Renamed to ...
6257         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6258         jump from new landing pad to the second part.
6259         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6260         Adjust callers.
6262 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6264         PR middle-end/85878
6265         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6266         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6267         Only call store_expr for halves if the mode is the same.
6269         PR middle-end/86123
6270         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6271         Fix up comment formatting.
6273 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6275         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6276         (typed_splay_tree::closure,
6277         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6278         (typed_splay_tree::typed_splay_tree,
6279         typed_splay_tree::operator =): Declared private.
6280         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6281         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6282         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6283         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6284         typed_splay_tree::splay_tree_splay,
6285         typed_splay_tree::splay_tree_foreach_helper,
6286         typed_splay_tree::splay_tree_insert,
6287         typed_splay_tree::splay_tree_remove,
6288         typed_splay_tree::splay_tree_lookup,
6289         typed_splay_tree::splay_tree_predecessor,
6290         typed_splay_tree::splay_tree_successor,
6291         typed_splay_tree::splay_tree_min,
6292         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6293         (typed_splay_tree::root, typed_splay_tree::comp,
6294         typed_splay_tree::delete_key,
6295         typed_splay_tree::delete_value): New data members.
6296         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6297         typed_splay_tree::remove.
6299 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6301         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6302         -mginv and -mno-ginv to the assembler.
6303         * config/mips/mips.opt (-mcrc): New option.
6304         (-mginv): Likewise.
6305         * doc/invoke.text (-mcrc): Document.
6306         (-mginv): Likewise.
6308 2018-06-15  Nick Clifton  <nickc@redhat.com>
6310         PR 84195
6311         * tree.c (escaped_string): New class.  Converts an unescaped
6312         string into its escaped equivalent.
6313         (warn_deprecated_use): Use the new class to convert the
6314         deprecation message, if present.
6315         (test_escaped_strings): New self test.
6316         (test_c_tests): Add test_escaped_strings.
6317         * doc/extend.texi (deprecated): Add a note that the
6318         deprecation message is affected by the -fmessage-length
6319         option, and that control characters will be escaped.
6320         (#pragma GCC error): Document this pragma.
6321         (#pragma GCC warning): Likewise.
6322         * doc/invoke.texi (-fmessage-length): Document this option's
6323         effect on the #warning and #error preprocessor directives and
6324         the deprecated attribute.
6326 2018-06-15  Richard Biener  <rguenther@suse.de>
6328         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6329         here, also noting vector size used.
6330         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6331         size used in MSG_OPTIMIZED_LOCATIONS dump.
6332         (pass_slp_vectorize::execute): Adjust.
6334 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6336         PR target/85968
6337         * config/arc/arc.c (arc_return_address_register): Fix
6338         if-condition.
6340 2018-06-15  Richard Biener  <rguenther@suse.de>
6342         PR middle-end/86159
6343         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6344         leave useless conversion stripping to force_gimple_operand_gsi.
6345         (gimplify_build2): Likewise.
6346         (gimplify_build1): Likewise.
6348 2018-06-15  Richard Biener  <rguenther@suse.de>
6350         PR middle-end/86076
6351         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6352         before adjusting their block.
6354 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6356         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6357         multilibs for *-*-rtems*.
6358         * config/riscv/t-rtems: New file.
6360 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6362         PR middle-end/86122
6363         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6364         unsigned_type_for returns NULL.
6366         PR target/85945
6367         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6368         subregs of multi-word pseudos unless the float mode has word size.
6370 2018-06-14  Richard Biener  <rguenther@suse.de>
6372         PR middle-end/86139
6373         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6374         duplicate and harmful type_hash_canon.
6375         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6377 2018-06-14  Richard Biener  <rguenther@suse.de>
6379         PR ipa/86124
6380         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6381         NULL cgraph_node.
6383 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6385         * config/rtems.h (STDINT_LONG32): Define.
6387 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6388             Prachi Godbole  <prachi.godbole@imgtec.com>
6390         * config/mips/mips-cpus.def: Define P6600.
6391         * config/mips/mips-tables.opt: Regenerate.
6392         * config/mips/mips.c (mips_ucbranch_type): New enum.
6393         (mips_rtx_cost_data): Add support for P6600.
6394         (mips_issue_rate): Likewise.
6395         (mips_multipass_dfa_lookahead): Likewise.
6396         (mips_avoid_hazard): Likewise.
6397         (mips_reorg_process_insns): Likewise.
6398         (mips_classify_branch_p6600): New function.
6399         * config/mips/mips.h (TUNE_P6600): New define.
6400         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6401         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6402         * config/mips/mips.md: Include p6600.md.
6403         (processor): Add p6600.
6404         * config/mips/p6600.md: New file.
6405         * doc/invoke.texi: Add p6600 to supported architectures.
6407 2018-06-13  Martin Sebor  <msebor@redhat.com>
6409         PR tree-optimization/86114
6410         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6411         of integer types.
6412         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6414 2018-06-13  Richard Biener  <rguenther@suse.de>
6416         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6417         Properly set vector type of the intermediate stmt.
6418         * tree-vect-stmts.c (vectorizable_operation): The destination
6419         var always has vectype_out type.
6421 2018-06-13  Jeff Law  <law@redhat.com>
6423         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6424         integer 0 for argument to print_rtl_with_bb.
6425         (rl78_reorg): Likewise.
6427 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6429         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6430         from rtx to rtx_insn *.
6431         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6432         "label".
6433         (add_sched_insns_for_speculation): Likewise for local "target",
6434         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6435         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6436         from rtx_insn ** to rtx_code_label **.
6437         (reorg_emit_nops): Likewise.
6438         (c6x_reorg): Likewise for local "call_labels".
6439         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6440         rtx to rtx_insn *.
6441         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6442         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6443         the loops over LABEL_REFS.
6444         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6445         braf_label.
6446         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6447         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6448         (split_branches): Strengthen local "olabel" from rtx to
6449         rtx_insn *, adding a safe_as_a cast.
6450         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6451         to "rtx_insn *".
6452         (add_insn_after): Likewise for first two params.
6453         (add_insn_before): Likewise.
6454         (remove_insn): Likewise for param.
6455         (emit_pattern_before_noloc): Likewise for second and third params.
6456         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6457         (emit_call_insn_before_noloc): Likewise.
6458         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6459         to "rtx_insn *".
6460         (emit_barrier_before): Likewise.
6461         (emit_label_before): Strengthen "label" param from "rtx" to
6462         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6463         "rtx_insn *".
6464         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6465         "rtx_insn *".
6466         (emit_pattern_after_noloc): Likewise.
6467         (emit_insn_after_noloc): Likewise.
6468         (emit_jump_insn_after_noloc): Likewise.
6469         (emit_call_insn_after_noloc): Likewise.
6470         (emit_debug_insn_after_noloc): Likewise.
6471         (emit_barrier_after): Likewise.
6472         (emit_label_after): Likewise for both params.
6473         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6474         "loc" param from "int" to "location_t".
6475         (emit_insn_after_setloc): Likewise.
6476         (emit_jump_insn_after_setloc): Likewise.
6477         (emit_call_insn_after_setloc): Likewise.
6478         (emit_debug_insn_after_setloc): Likewise.
6479         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6480         "loc" param from "int" to "location_t".
6481         (emit_pattern_before): Convert NULL_RTX to NULL.
6482         (emit_insn_before_setloc): Convert "loc" param from "int" to
6483         "location_t".
6484         (emit_jump_insn_before_setloc): Likewise.
6485         (emit_call_insn_before_setloc): Likewise.
6486         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6487         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6488         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6489         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6490         Convert 3rd param from "int" to "location_t".
6491         (emit_barrier_before, emit_barrier_after, next_real_insn):
6492         Strengthen param from rtx to rtx_insn *.
6493         (emit_label_before): Strengthen 1st param from "rtx" to
6494         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6495         "rtx_insn *".
6496         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6497         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6498         Strengthen 2nd param from "rtx" to "rtx_insn *".
6499         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6500         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6501         Likewise. Convert 3rd param from "int" to "location_t".
6502         (emit_label_after): Strengthen 1st param from "rtx" to
6503         "rtx_code_label *".
6504         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6505         "rtx_insn *".
6506         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6507         from "rtx" to "rtx_insn *".
6509 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6511         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6512         bodies streamed in with -Q.
6513         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6514         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6515         * gimple-streamer-out.c: Include gimple-pretty-print.h
6516         (output_bb): Dump stmts streamed.
6517         * lto-section-out.c: Include print-tree.h
6518         (lto_begin_section): Dump sections created.
6519         (lto_output_decl_index): Dump decl encoded.
6520         * lto-streamer-out.c: Include print-tree.h
6521         (create_output_block): Dump output block created.
6522         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6523         (output_function): Dump function output.
6524         (output_constructor): Dump constructor streamed.
6525         (write_global_stream): Output indexes encoded.
6526         (produce_asm_for_decls): Dump streams encoded.
6527         * lto-streamer.c (streamer_dump_file): New global var.
6528         * lto-streamer.h (streamer_dump_file): Declare.
6529         * passes.c (ipa_write_summaries): Initialize streamer dump.
6530         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6531         in.
6533 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6535         PR target/86048
6536         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6537         offsets for register save directives.  Emit a second batch of save
6538         directives, if need be, when the function accesses prior frames.
6540 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6542         * config/arc/fpu.md (fmasf4): Force operand to register.
6543         (fnmasf4): Likewise.
6545 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6547         * config/arc/arc-protos.h (arc_pad_return): Remove.
6548         * config/arc/arc.c (machine_function): Remove force_short_suffix
6549         and size_reason.
6550         (arc_print_operand): Adjust printing of '&'.
6551         (arc_verify_short): Remove conditional printing of short suffix.
6552         (arc_final_prescan_insn): Remove reference to size_reason.
6553         (pad_return): New function.
6554         (arc_reorg): Call pad_return.
6555         (arc_pad_return): Remove.
6556         (arc_init_machine_status): Remove reference to force_short_suffix.
6557         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6558         (attr length): When attribute iscompact is true force to 2
6559         regardless; in the case of maybe check if we want to force the
6560         instruction to have 4 bytes length.
6561         (nopv): Change it to generate 4 byte long nop as well.
6562         (blockage): New pattern.
6563         (simple_return): Remove call to arc_pad_return.
6564         (p_return_i): Likewise.
6566 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6568         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6570 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6572         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6573         ARC cores.
6575 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6577         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6578         for ARC700 and ARCv2.
6580 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
6582         PR target/86076
6583         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6584         operands[2] instead of operands[1].
6587 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6589         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6590         case, check whether the outer register overlaps an unallocatable
6591         register, not just whether it fits the required class.
6593 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6595         * poly-int.h (can_div_trunc_p): Add new overload in which all values
6596         are poly_ints.
6597         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6598         (memrefs_conflict_p): Likewise.
6599         (init_alias_analysis): Likewise.
6600         * cfgexpand.c (expand_debug_expr): Likewise.
6601         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6602         * cse.c (fold_rtx): Likewise.
6603         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6604         * expr.c (emit_block_move_hints): Likewise.
6605         (clear_storage_hints, push_block, emit_push_insn): Likewise.
6606         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6607         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6608         (emit_group_store): Likewise.
6609         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
6610         to read the PRE/POST_MODIFY increment.
6611         * calls.c (store_one_arg): Use strip_offset.
6612         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6613         poly_int_rtx_p.
6614         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6615         by a VEC_SELECT.
6616         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6617         (simplify_binary_operation_1): Extend CONST_INT handling to
6618         poly_int_rtx_p.
6619         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6620         than a HOST_WIDE_INT.
6621         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6622         poly_int64.
6623         (adjust_mems, add_stores): Update accodingly.
6624         (vt_canonicalize_addr): Track polynomial offsets.
6625         (emit_note_insn_var_location): Likewise.
6626         (vt_add_function_parameter): Likewise.
6627         (vt_initialize): Likewise.
6629 2018-06-12  Jeff Law  <law@redhat.com>
6631         * config.gcc (alpha*-*-freebsd*): Remove.
6632         * config/alpha/freebsd.h: Remove.
6634 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
6636         PR other/69968
6637         * spellcheck-tree.c (levenshtein_distance): Rename to...
6638         (get_edit_distance): ...this, and update for underlying renaming.
6639         * spellcheck-tree.h (levenshtein_distance): Rename to...
6640         (get_edit_distance): ...this.
6641         * spellcheck.c (levenshtein_distance): Rename to...
6642         (get_edit_distance): ...this.  Convert from Levenshtein distance
6643         to Damerau-Levenshtein distance by supporting transpositions of
6644         adjacent characters.  Rename "v1" to "v_next" and "v0" to
6645         "v_one_ago".
6646         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6647         (selftest::test_edit_distance_unit_test_oneway): ...this, and
6648         update for underlying renaming.
6649         (selftest::levenshtein_distance_unit_test): Rename to...
6650         (selftest::test_get_edit_distance_unit): ...this, and update for
6651         underlying renaming.
6652         (selftest::test_find_closest_string): Add example from PR 69968
6653         where transposition helps
6654         (selftest::test_metric_conditions): Update for renaming.
6655         (selftest::test_metric_conditions): Likewise.
6656         (selftest::spellcheck_c_tests): Likewise.
6657         * spellcheck.h (levenshtein_distance): Rename both overloads to...
6658         (get_edit_distance): ...this.
6659         (best_match::consider): Update for renaming.
6661 2018-06-12  Martin Sebor  <msebor@redhat.com>
6663         PR tree-optimization/85259
6664         * builtins.c (compute_objsize): Handle constant offsets.
6665         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6666         true iff a warning has been issued.
6667         * gimple.h (gimple_nonartificial_location): New function.
6668         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6669         gimple_nonartificial_location and handle -Wno-system-headers.
6670         (handle_builtin_stxncpy): Same.
6672 2018-06-12  Martin Sebor  <msebor@redhat.com>
6674         PR c/85931
6675         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6677 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
6679         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6680         BUILTIN_VEC_XST entries for pointer to double and long long.
6682 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
6684         PR target/85990
6685         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6686         Update comments.
6687         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6688         Likewise.
6690 2018-06-12  Martin Liska  <mliska@suse.cz>
6692         * doc/options.texi: Document IntegerRange.
6694 2018-06-12  Martin Liska  <mliska@suse.cz>
6696         * config/i386/i386.opt: Make MPX-related options as Deprecated.
6697         * opt-functions.awk: Handle Deprecated flag.
6698         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6699         and report error.
6700         (read_cmdline_option): Report warning for a deprecated option.
6701         * opts.h (struct cl_option): Add new field cl_deprecated.
6702         (CL_ERR_DEPRECATED): New.
6704 2018-06-12  Martin Liska  <mliska@suse.cz>
6706         * doc/options.texi: Document Deprecated option flag.
6708 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6710         * config/arc/arc-arch.h (arc_extras): New enum.
6711         (arc_cpu_t):Add field extra.
6712         (arc_cpu_types): Consider the extras.
6713         * config/arc/arc-cpus.def: Add extras info.
6714         * config/arc/arc-opts.h (processor_type): Consider extra field.
6715         * config/arc/arc.c (arc_override_options): Handle extra field.
6717 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6719         * config/arc/arc-arch.h: Update ARC_OPTX macro.
6720         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6721         field.
6722         * config/arc/arc.c (arc_init): Update pic warning.
6723         (irq_range): Update irq range parsing warnings.
6724         (arc_override_options): Update various warning messages.
6725         (arc_handle_aux_attribute): Likewise.
6727 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
6729         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6731 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6733         * doc/sourcebuild.texi: Document usage of line number 0 in verify
6734         compiler messages directives.
6736 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
6738         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6739         * config/mips/mips-tables.opt: Regenerate.
6740         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6741         mips64r6.
6742         * doc/invoke.texi: Document -march=i6500.
6744 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
6746         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6747         (i6400_gpmul): Add cpu_unit.
6748         (i6400_gpdiv): Likewise.
6749         (i6400_msa_add_d): Update reservations.
6750         (i6400_msa_int_add) Likewise.
6751         (i6400_msa_short_logic3) Likewise.
6752         (i6400_msa_short_logic2) Likewise.
6753         (i6400_msa_short_logic) Likewise.
6754         (i6400_msa_move) Likewise.
6755         (i6400_msa_cmp) Likewise.
6756         (i6400_msa_short_float2) Likewise.
6757         (i6400_msa_div_d) Likewise.
6758         (i6400_msa_long_logic1) Likewise.
6759         (i6400_msa_long_logic2) Likewise.
6760         (i6400_msa_mult) Likewise.
6761         (i6400_msa_long_float2) Likewise.
6762         (i6400_msa_long_float4) Likewise.
6763         (i6400_msa_long_float5) Likewise.
6764         (i6400_msa_long_float8) Likewise.
6765         (i6400_fpu_fadd): Include frint type.
6766         (i6400_fpu_store): New define_insn_reservation.
6767         (i6400_fpu_load): Likewise.
6768         (i6400_fpu_move): Likewise.
6769         (i6400_fpu_fcmp): Likewise.
6770         (i6400_fpu_fmadd): Likewise.
6771         (i6400_int_mult): Include imul3nc type and update reservation.
6772         (i6400_int_div): Include idiv3 type and update reservation.
6773         (i6400_int_load): Update to check type not move_type.
6774         (i6400_int_store): Likewise.
6775         (i6400_int_prefetch): Set zero latency.
6777 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
6779         * gcc.c: Document new %@{...} sequence.
6780         (LINK_COMMAND_SPEC): Use it for the -L switches.
6781         (cpp_unique_options): Use it for the -I switches.
6782         (at_file_argbuf): New global variable.
6783         (in_at_file): Likewise.
6784         (alloc_args): Create at_file_argbuf.
6785         (clear_args): Truncate at_file_argbuf.
6786         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6787         (open_at_file): New function.
6788         (close_at_file): Likewise.
6789         (create_at_file): Delete.
6790         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6791         <'o'>: Likewise.
6792         <'@'>: New case.
6793         (validate_switches_from_spec): Deal with %@{...} sequence.
6794         (validate_switches): Likewise.
6795         (driver::finalize): Call clear_args.
6797 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
6799         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6801 2018-06-11  Martin Sebor  <msebor@redhat.com>
6803         * doc/invoke.texi (-Wall): List -Wc++17-compat.
6804         (Wno-class-memaccess): Add @opindex.
6805         (Wno-templates, Wno-multiple-inheritance): Same.
6806         (Wno-virtual-inheritance, Wno-namespaces): Same.
6807         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6808         (Wno-format-overflow, Wno-format-truncation): Same.
6809         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6810         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6811         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6812         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6813         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6814         (Wno-misspelled-isr): Same.
6816 2018-06-11  Martin Sebor  <msebor@redhat.com>
6818         * PR tree-optimization/86083
6819         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6821 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6823         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6825 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
6827         PR target/85755
6828         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6829         on the correct operand.
6830         (*movdi_internal64): Ditto.
6832 2018-06-11  Martin Liska  <mliska@suse.cz>
6834         PR tree-optimization/86089
6835         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6837 2018-06-11  Julia Koval  <julia.koval@intel.com>
6839         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6840         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6841         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6843 2018-06-11  Olivier Hainque  <hainque@adacore.com>
6845         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6846         for Ada with strict dwarf2.
6848 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
6850         PR target/85755
6851         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6852         addresses.
6854 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
6856         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6858 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
6860         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6861         TARGET_ELF.
6863 2018-06-08  Martin Liska  <mliska@suse.cz>
6865         * tree-cfg.h (debug_function): Fix argument type to match
6866         implementation.
6868 2018-06-08  Martin Liska  <mliska@suse.cz>
6870         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6871         Remove usage of MPX-related (and removed) fields.
6872         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6874 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
6876         * cfg.c (debug): Use TDF_NONE rather than 0.
6877         * cfghooks.c (debug): Likewise.
6878         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6879         (struct dump_option_value_info): Convert to...
6880         (struct kv_pair): ...this template type.
6881         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6882         rather than 0.
6883         (optinfo_verbosity_options): Likewise.
6884         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6885         OPTGROUP_NONE.
6886         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6887         than int for "optgroup_flags" param.
6888         (dump_generic_expr_loc): Use dump_flags_t rather than int for
6889         "dump_kind" param.
6890         (dump_dec): Likewise.
6891         (dump_finish): Use TDF_NONE rather than 0.
6892         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6893         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
6894         than 0.  Update for change to option_ptr.
6895         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6896         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
6897         0.  Update for changes to optinfo_verbosity_options and
6898         optgroup_options.
6899         (opt_info_switch_p): Convert optgroup_flags from int to
6900         optgroup_flags_t.
6901         (dump_basic_block): Use dump_flags_t rather than int
6902         for "dump_kind" param.
6903         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6904         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6905         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6906         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6907         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6908         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6909         TDF_NONE): Convert from macros to...
6910         (enum dump_flag): ...this new enum.
6911         (dump_flags_t): Update to use enum.
6912         (operator|, operator&, operator~, operator|=, operator&=):
6913         Implement for dump_flags_t.
6914         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6915         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6916         Convert from macros to...
6917         (enum optgroup_flag): ...this new enum.
6918         (optgroup_flags_t): New typedef.
6919         (operator|, operator|=): Implement for optgroup_flags_t.
6920         (struct dump_file_info): Convert field "alt_flags" to
6921         dump_flags_t.  Convert field "optgroup_flags" to
6922         optgroup_flags_t.
6923         (dump_basic_block): Use dump_flags_t rather than int for param.
6924         (dump_generic_expr_loc): Likewise.
6925         (dump_dec): Likewise.
6926         (dump_register): Convert param "optgroup_flags" to
6927         optgroup_flags_t.
6928         (opt_info_enable_passes): Likewise.
6929         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6930         than 0.
6931         * gimple-pretty-print.c (debug): Likewise.
6932         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6933         (merged_store_group::apply_stores): Likewise.
6934         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6935         * gimple.c (verify_gimple_pp): Likewise.
6936         * graphite-poly.c (print_pbb_body): Likewise.
6937         * passes.c (pass_manager::register_one_dump_file): Convert
6938         local "optgroup_flags" to optgroup_flags_t.
6939         * print-tree.c (print_node): Use TDF_NONE rather than 0.
6940         (debug): Likewise.
6941         (debug_body): Likewise.
6942         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6943         to optgroup_flags_t.
6944         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6945         than 0.
6946         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6947         (convert_mult_to_fma): Likewise.
6948         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6949         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6950         * tree-vect-data-refs.c (dump_lower_bound): Convert param
6951         "dump_kind" to dump_flags_t.
6953 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6955         * config/rs6000/rs6000.c (min, max): Delete.
6957 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6959         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6960         -mabi=spe and -mabi=no-spe.
6962 2018-06-08  Martin Liska  <mliska@suse.cz>
6964         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6965         where we expect an existing summary.
6967 2018-06-08  Martin Liska  <mliska@suse.cz>
6969         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6970         * ipa-inline.h (estimate_edge_growth): Likewise.
6972 2018-06-08  Martin Liska  <mliska@suse.cz>
6974         * cgraph.c (function_version_hasher::hash): Use
6975         cgraph_node::get_uid ().
6976         (function_version_hasher::equal):
6977         * cgraph.h (cgraph_node::get_uid): New method.
6978         * ipa-inline.c (update_caller_keys): Use
6979         cgraph_node::get_uid ().
6980         (update_callee_keys): Likewise.
6981         * ipa-utils.c (searchc): Likewise.
6982         (ipa_reduced_postorder): Likewise.
6983         * lto-cgraph.c (input_node): Likewise.
6984         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6985         * symbol-summary.h (symtab_insertion): Likewise.
6986         (symtab_removal): Likewise.
6987         (symtab_duplication): Likewise.
6988         * tree-pretty-print.c (dump_function_header): Likewise.
6989         * tree-sra.c (convert_callers_for_node): Likewise.
6991 2018-06-08  Martin Liska  <mliska@suse.cz>
6993         * cgraph.c (symbol_table::create_edge): Always assign a new
6994         unique number.
6995         (symbol_table::free_edge): Do not recycle numbers.
6996         * cgraph.h (cgraph_edge::get): New method.
6997         * symbol-summary.h (symtab_removal): Use it.
6998         (symtab_duplication): Likewise.
6999         (call_summary::hashable_uid): Remove.
7001 2018-06-08  Martin Liska  <mliska@suse.cz>
7003         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7004         (initialize_growth_caches): Remove.
7005         (free_growth_caches): Likewise.
7006         (do_estimate_edge_time): Use edge_growth_cache.
7007         (do_estimate_edge_size): Likewise.
7008         (do_estimate_edge_hints): Likewise.
7009         * ipa-inline.c (reset_edge_caches): Likewise.
7010         (recursive_inlining): Likewise.
7011         (inline_small_functions): Likewise.
7012         * ipa-inline.h (initialize_growth_caches): Remove.
7013         (estimate_edge_size): Likewise.
7014         (estimate_edge_time): Likewise.
7015         (estimate_edge_hints): Likewise.
7016         (reset_edge_growth_cache): Likewise.
7017         * symbol-summary.h (call_summary::remove): New method.
7019 2018-06-08  Martin Liska  <mliska@suse.cz>
7021         * ipa-cp.c (class edge_clone_summary): New summary.
7022         (grow_edge_clone_vectors): Remove.
7023         (ipcp_edge_duplication_hook): Remove.
7024         (class edge_clone_summary_t): New call_summary class.
7025         (ipcp_edge_removal_hook): Remove.
7026         (edge_clone_summary_t::duplicate): New function.
7027         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7028         (create_specialized_node): Likewise.
7029         (ipcp_driver): Initialize edge_clone_summaries and do not
7030         register hooks.
7032 2018-06-08  Martin Liska  <mliska@suse.cz>
7034         * symbol-summary.h (get): New function.
7035         (call_summary::m_initialize_when_cloning): New class member.
7037 2018-06-08  Martin Liska  <mliska@suse.cz>
7039         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7040         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7041         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7042         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7043         (remove_cgraph_node_from_order): Use the removed_nodes set.
7044         (do_per_function_toporder): Likwise.
7045         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7046         instead of summary_uid.
7047         (symtab_removal): Likewise.
7048         (symtab_duplication): Likewise.
7050 2018-06-08  Martin Liska  <mliska@suse.cz>
7052         * ipa-cp.c (ipcp_store_bits_results): Use
7053         ipcp_transformation_sum.
7054         (ipcp_store_vr_results): Likewise.
7055         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7056         to ...
7057         (ipcp_transformation_initialize): ... this.
7058         (ipa_set_node_agg_value_chain):
7059         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7060         (write_ipcp_transformation_info): Likewise.
7061         (read_ipcp_transformation_info): Likewise.
7062         (ipcp_update_bits): Likewise.
7063         (ipcp_update_vr): Likewise.
7064         (ipcp_transform_function): Likewise.
7065         * ipa-prop.h: Rename ipcp_transformation_summary to
7066         ipcp_transformation.
7067         (class ipcp_transformation_t): New function summary.
7068         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7069         (ipa_get_agg_replacements_for_node): Likewise.
7071 2018-06-08  Martin Liska  <mliska@suse.cz>
7073         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7074         of struct.
7075         (class funct_state_summary_t): New function_summary class.
7076         (has_function_state): Remove.
7077         (get_function_state): Likewise.
7078         (set_function_state): Likewise.
7079         (add_new_function): Likewise.
7080         (funct_state_summary_t::insert): New function.
7081         (duplicate_node_data): Remove.
7082         (remove_node_data): Remove.
7083         (funct_state_summary_t::duplicate): New function.
7084         (register_hooks): Create new funct_state_summaries.
7085         (pure_const_generate_summary): Use it.
7086         (pure_const_write_summary): Likewise.
7087         (pure_const_read_summary): Likewise.
7088         (propagate_pure_const): Likewise.
7089         (propagate_nothrow): Likewise.
7090         (dump_malloc_lattice): Likewise.
7091         (propagate_malloc): Likewise.
7092         (execute): Do not register hooks, just remove summary
7093         instead.
7094         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7095         constructor.
7097 2018-06-08  Martin Liska  <mliska@suse.cz>
7099         * ipa-reference.c (remove_node_data): Remove.
7100         (duplicate_node_data): Likewise.
7101         (class ipa_ref_var_info_summary_t): New class.
7102         (class ipa_ref_opt_summary_t): Likewise.
7103         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7104         (get_reference_optimization_summary): Use
7105         ipa_ref_opt_sum_summaries.
7106         (set_reference_vars_info): Remove.
7107         (set_reference_optimization_summary): Likewise.
7108         (ipa_init): Create summaries.
7109         (init_function_info): Use function summary.
7110         (ipa_ref_opt_summary_t::duplicate): New function.
7111         (ipa_ref_opt_summary_t::remove): New function.
7112         (get_read_write_all_from_node): Fix GNU coding style.
7113         (propagate): Use function summary.
7114         (write_node_summary_p): Fix GNU coding style.
7115         (stream_out_bitmap): Likewise.
7116         (ipa_reference_read_optimization_summary): Use function summary.
7117         (ipa_reference_c_finalize): Do not release hooks.
7119 2018-06-08  Martin Liska  <mliska@suse.cz>
7121         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7122         (analyze_function_body): Extract multiple calls of get_create.
7123         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7124         * ipa-inline.c (recursive_inlining): Use ::get method.
7125         * ipa-inline.h (estimate_edge_growth): Likewise.
7127 2018-06-08  Martin Liska  <mliska@suse.cz>
7129         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7130         HSA_INVALID.
7131         (hsa_function_summary::hsa_function_summary): Use the new enum
7132         value.
7133         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7134         * hsa-gen.c (hsa_get_host_function): Likewise.
7135         (get_brig_function_name): Likewise.
7136         * ipa-hsa.c (process_hsa_functions): Likewise.
7137         (ipa_hsa_write_summary): Likewise.
7138         * symbol-summary.h (symtab_duplication): Use ::get function/
7139         (get): New function.
7141 2018-06-08  Martin Liska  <mliska@suse.cz>
7143         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7144         of get.
7145         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7146         (hsa_register_kernel): Likewise.
7147         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7148         * hsa-gen.c (hsa_get_host_function): Likewise.
7149         (get_brig_function_name): Likewise.
7150         (generate_hsa): Likewise.
7151         (pass_gen_hsail::execute): Likewise.
7152         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7153         (devirtualization_time_bonus): Likewise.
7154         (ipcp_propagate_stage): Likewise.
7155         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7156         (edge_set_predicate): Likewise.
7157         (evaluate_conditions_for_known_args): Likewise.
7158         (evaluate_properties_for_edge): Likewise.
7159         (ipa_fn_summary::reset): Likewise.
7160         (ipa_fn_summary_t::duplicate): Likewise.
7161         (dump_ipa_call_summary): Likewise.
7162         (ipa_dump_fn_summary): Likewise.
7163         (analyze_function_body): Likewise.
7164         (compute_fn_summary): Likewise.
7165         (estimate_edge_devirt_benefit): Likewise.
7166         (estimate_edge_size_and_time): Likewise.
7167         (estimate_calls_size_and_time): Likewise.
7168         (estimate_node_size_and_time): Likewise.
7169         (inline_update_callee_summaries): Likewise.
7170         (remap_edge_change_prob): Likewise.
7171         (remap_edge_summaries): Likewise.
7172         (ipa_merge_fn_summary_after_inlining): Likewise.
7173         (ipa_update_overall_fn_summary): Likewise.
7174         (read_ipa_call_summary): Likewise.
7175         (inline_read_section): Likewise.
7176         (write_ipa_call_summary): Likewise.
7177         (ipa_fn_summary_write): Likewise.
7178         (ipa_free_fn_summary): Likewise.
7179         * ipa-hsa.c (process_hsa_functions): Likewise.
7180         (ipa_hsa_write_summary): Likewise.
7181         (ipa_hsa_read_section): Likewise.
7182         * ipa-icf.c (sem_function::merge): Likewise.
7183         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7184         (do_estimate_edge_time): Likewise.
7185         (estimate_size_after_inlining): Likewise.
7186         (estimate_growth): Likewise.
7187         (growth_likely_positive): Likewise.
7188         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7189         (inline_call): Likewise.
7190         * ipa-inline.c (caller_growth_limits): Likewise.
7191         (can_inline_edge_p): Likewise.
7192         (can_inline_edge_by_limits_p): Likewise.
7193         (compute_uninlined_call_time): Likewise.
7194         (compute_inlined_call_time): Likewise.
7195         (want_inline_small_function_p): Likewise.
7196         (edge_badness): Likewise.
7197         (update_caller_keys): Likewise.
7198         (update_callee_keys): Likewise.
7199         (recursive_inlining): Likewise.
7200         (inline_small_functions): Likewise.
7201         (inline_to_all_callers_1): Likewise.
7202         (dump_overall_stats): Likewise.
7203         (early_inline_small_functions): Likewise.
7204         (early_inliner): Likewise.
7205         * ipa-inline.h (estimate_edge_growth): Likewise.
7206         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7207         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7208         * ipa-prop.h (IPA_NODE_REF): Likewise.
7209         (IPA_EDGE_REF): Likewise.
7210         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7211         (propagate_malloc): Likewise.
7212         * ipa-split.c (execute_split_functions): Likewise.
7213         * symbol-summary.h: Rename get to get_create.
7214         (get): Likewise.
7215         (get_create): Likewise.
7216         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7218 2018-06-08  Martin Liska  <mliska@suse.cz>
7220         * symbol-summary.h (release): Move definition out of class
7221         declaration.
7222         (symtab_removal): Likewise.
7223         (symtab_duplication): Likewise.
7225 2018-06-08  Martin Liska  <mliska@suse.cz>
7227         * symbol-summary.h (function_summary): Move constructor
7228         implementation out of class declaration.
7229         (release): Likewise.
7230         (symtab_insertion): Likewise.
7231         (symtab_removal): Likewise.
7232         (symtab_duplication): Likewise.
7233         (get): Likewise.
7235 2018-06-08  Martin Liska  <mliska@suse.cz>
7237         * Makefile.in: Remove support for MPX (macros, related functions,
7238         fields in cgraph_node, ...).
7239         * builtin-types.def (BT_BND): Likewise.
7240         (BT_FN_BND_CONST_PTR): Likewise.
7241         (BT_FN_CONST_PTR_BND): Likewise.
7242         (BT_FN_VOID_PTR_BND): Likewise.
7243         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7244         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7245         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7246         (expand_builtin_mempcpy_with_bounds): Likewise.
7247         (expand_builtin_memset_with_bounds): Likewise.
7248         (expand_builtin_memset_args): Likewise.
7249         (std_expand_builtin_va_start): Likewise.
7250         (expand_builtin): Likewise.
7251         (expand_builtin_with_bounds): Likewise.
7252         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7253         (DEF_LIB_BUILTIN_CHKP): Likewise.
7254         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7255         (DEF_CHKP_BUILTIN): Likewise.
7256         (BUILT_IN_MEMCPY): Likewise.
7257         (BUILT_IN_MEMMOVE): Likewise.
7258         (BUILT_IN_MEMPCPY): Likewise.
7259         (BUILT_IN_MEMSET): Likewise.
7260         (BUILT_IN_STPCPY): Likewise.
7261         (BUILT_IN_STRCAT): Likewise.
7262         (BUILT_IN_STRCHR): Likewise.
7263         (BUILT_IN_STRCPY): Likewise.
7264         (BUILT_IN_STRLEN): Likewise.
7265         (BUILT_IN_MEMCPY_CHK): Likewise.
7266         (BUILT_IN_MEMMOVE_CHK): Likewise.
7267         (BUILT_IN_MEMPCPY_CHK): Likewise.
7268         (BUILT_IN_MEMSET_CHK): Likewise.
7269         (BUILT_IN_STPCPY_CHK): Likewise.
7270         (BUILT_IN_STRCAT_CHK): Likewise.
7271         (BUILT_IN_STRCPY_CHK): Likewise.
7272         * calls.c (store_bounds): Likewise.
7273         (emit_call_1): Likewise.
7274         (special_function_p): Likewise.
7275         (maybe_warn_nonstring_arg): Likewise.
7276         (initialize_argument_information): Likewise.
7277         (finalize_must_preallocate): Likewise.
7278         (compute_argument_addresses): Likewise.
7279         (expand_call): Likewise.
7280         * cfgexpand.c (expand_call_stmt): Likewise.
7281         (expand_return): Likewise.
7282         (expand_gimple_stmt_1): Likewise.
7283         (pass_expand::execute): Likewise.
7284         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7285         (cgraph_node::remove): Likewise.
7286         (cgraph_node::dump): Likewise.
7287         (cgraph_node::verify_node): Likewise.
7288         * cgraph.h (chkp_function_instrumented_p): Likewise.
7289         (symtab_node::get_alias_target): Likewise.
7290         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7291         (cgraph_local_p): Likewise.
7292         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7293         (cgraph_edge::rebuild_references): Likewise.
7294         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7295         (walk_polymorphic_call_targets): Likewise.
7296         (cgraph_node::expand_thunk): Likewise.
7297         (symbol_table::output_weakrefs): Likewise.
7298         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7299         (ix86_handle_option): Likewise.
7300         * config/i386/constraints.md: Likewise.
7301         * config/i386/i386-builtin-types.def (BND): Likewise.
7302         (VOID): Likewise.
7303         (PVOID): Likewise.
7304         (ULONG): Likewise.
7305         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7306         (BDESC_FIRST): Likewise.
7307         (BDESC): Likewise.
7308         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7309         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7310         * config/i386/i386.c (enum reg_class): Likewise.
7311         (ix86_target_string): Likewise.
7312         (ix86_option_override_internal): Likewise.
7313         (ix86_conditional_register_usage): Likewise.
7314         (ix86_valid_target_attribute_inner_p): Likewise.
7315         (ix86_set_indirect_branch_type): Likewise.
7316         (ix86_set_current_function): Likewise.
7317         (ix86_function_arg_regno_p): Likewise.
7318         (init_cumulative_args): Likewise.
7319         (ix86_function_arg_advance): Likewise.
7320         (ix86_function_arg): Likewise.
7321         (ix86_pass_by_reference): Likewise.
7322         (ix86_function_value_regno_p): Likewise.
7323         (ix86_function_value_1): Likewise.
7324         (ix86_function_value_bounds): Likewise.
7325         (ix86_return_in_memory): Likewise.
7326         (ix86_setup_incoming_vararg_bounds): Likewise.
7327         (ix86_va_start): Likewise.
7328         (indirect_thunk_need_prefix): Likewise.
7329         (print_reg): Likewise.
7330         (ix86_print_operand): Likewise.
7331         (ix86_expand_call): Likewise.
7332         (ix86_output_function_return): Likewise.
7333         (reg_encoded_number): Likewise.
7334         (BDESC_VERIFYS): Likewise.
7335         (ix86_init_mpx_builtins): Likewise.
7336         (ix86_init_builtins): Likewise.
7337         (ix86_emit_cmove): Likewise.
7338         (ix86_emit_move_max): Likewise.
7339         (ix86_expand_builtin): Likewise.
7340         (ix86_builtin_mpx_function): Likewise.
7341         (ix86_get_arg_address_for_bt): Likewise.
7342         (ix86_load_bounds): Likewise.
7343         (ix86_store_bounds): Likewise.
7344         (ix86_load_returned_bounds): Likewise.
7345         (ix86_store_returned_bounds): Likewise.
7346         (ix86_class_likely_spilled_p): Likewise.
7347         (ix86_hard_regno_mode_ok): Likewise.
7348         (x86_order_regs_for_local_alloc): Likewise.
7349         (ix86_mitigate_rop): Likewise.
7350         (ix86_bnd_prefixed_insn_p): Likewise.
7351         (ix86_mpx_bound_mode): Likewise.
7352         (ix86_make_bounds_constant): Likewise.
7353         (ix86_initialize_bounds): Likewise.
7354         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7355         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7356         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7357         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7358         (TARGET_CHKP_BOUND_MODE): Likewise.
7359         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7360         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7361         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7362         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7363         * config/i386/i386.h (TARGET_MPX): Likewise.
7364         (TARGET_MPX_P): Likewise.
7365         (VALID_BND_REG_MODE): Likewise.
7366         (FIRST_BND_REG): Likewise.
7367         (LAST_BND_REG): Likewise.
7368         (enum reg_class): Likewise.
7369         (BND_REG_P): Likewise.
7370         (BND_REGNO_P): Likewise.
7371         (BNDmode): Likewise.
7372         (ADJUST_INSN_LENGTH): Likewise.
7373         * config/i386/i386.md: Likewise.
7374         * config/i386/i386.opt: Likewise.
7375         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7376         (defined): Likewise.
7377         (LINK_MPX): Likewise.
7378         (MPX_SPEC): Likewise.
7379         (LIBMPX_SPEC): Likewise.
7380         (LIBMPXWRAPPERS_SPEC): Likewise.
7381         (CHKP_SPEC): Likewise.
7382         * config/i386/predicates.md: Likewise.
7383         * dbxout.c (dbxout_type): Likewise.
7384         * doc/extend.texi: Likewise.
7385         * doc/invoke.texi: Likewise.
7386         * doc/md.texi: Likewise.
7387         * doc/tm.texi: Likewise.
7388         * doc/tm.texi.in: Likewise.
7389         * dwarf2out.c (is_base_type): Likewise.
7390         (gen_formal_types_die): Likewise.
7391         (gen_subprogram_die): Likewise.
7392         (gen_type_die_with_usage): Likewise.
7393         (gen_decl_die): Likewise.
7394         (dwarf2out_late_global_decl): Likewise.
7395         * expr.c (expand_assignment): Likewise.
7396         (emit_storent_insn): Likewise.
7397         (store_expr_with_bounds): Likewise.
7398         (store_expr): Likewise.
7399         (expand_expr_real_1): Likewise.
7400         * expr.h (store_expr_with_bounds): Likewise.
7401         * function.c (use_register_for_decl): Likewise.
7402         (struct bounds_parm_data): Likewise.
7403         (assign_parms_augmented_arg_list): Likewise.
7404         (assign_parm_find_entry_rtl): Likewise.
7405         (assign_parm_is_stack_parm): Likewise.
7406         (assign_parm_load_bounds): Likewise.
7407         (assign_bounds): Likewise.
7408         (assign_parms): Likewise.
7409         (expand_function_start): Likewise.
7410         * gcc.c (CHKP_SPEC): Likewise.
7411         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7412         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7413         (wrestrict_dom_walker::check_call): Likewise.
7414         * gimple.c (gimple_build_call_from_tree): Likewise.
7415         * gimple.h (enum gf_mask): Likewise.
7416         (gimple_call_with_bounds_p): Likewise.
7417         (gimple_call_set_with_bounds): Likewise.
7418         * gimplify.c (gimplify_init_constructor): Likewise.
7419         * ipa-cp.c (initialize_node_lattices): Likewise.
7420         (propagate_constants_across_call): Likewise.
7421         (find_more_scalar_values_for_callers_subset): Likewise.
7422         * ipa-hsa.c (process_hsa_functions): Likewise.
7423         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7424         * ipa-icf.c (sem_function::merge): Likewise.
7425         * ipa-inline.c (early_inliner): Likewise.
7426         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7427         (warn_function_cold): Likewise.
7428         (propagate_pure_const): Likewise.
7429         * ipa-ref.h (enum GTY): Likewise.
7430         * ipa-split.c (find_retbnd): Likewise.
7431         (consider_split): Likewise.
7432         (split_function): Likewise.
7433         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7434         * ipa.c (walk_polymorphic_call_targets): Likewise.
7435         (symbol_table::remove_unreachable_nodes): Likewise.
7436         (process_references): Likewise.
7437         (cgraph_build_static_cdtor_1): Likewise.
7438         * lto-cgraph.c (lto_output_node): Likewise.
7439         (output_refs): Likewise.
7440         (compute_ltrans_boundary): Likewise.
7441         (input_overwrite_node): Likewise.
7442         (input_node): Likewise.
7443         (input_cgraph_1): Likewise.
7444         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7445         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7446         (class pass_chkp_instrumentation_passes): Likewise.
7447         (make_pass_chkp_instrumentation_passes): Likewise.
7448         * passes.def: Likewise.
7449         * rtl.h (struct GTY): Likewise.
7450         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7451         * stor-layout.c (layout_type): Likewise.
7452         * symtab.c: Likewise.
7453         * target.def: Likewise.
7454         * targhooks.c (default_chkp_bound_type): Likewise.
7455         (default_chkp_bound_mode): Likewise.
7456         (default_builtin_chkp_function): Likewise.
7457         (default_chkp_function_value_bounds): Likewise.
7458         (default_chkp_make_bounds_constant): Likewise.
7459         (default_chkp_initialize_bounds): Likewise.
7460         * targhooks.h (default_chkp_bound_type): Likewise.
7461         (default_chkp_bound_mode): Likewise.
7462         (default_builtin_chkp_function): Likewise.
7463         (default_chkp_function_value_bounds): Likewise.
7464         (default_chkp_make_bounds_constant): Likewise.
7465         (default_chkp_initialize_bounds): Likewise.
7466         * toplev.c (compile_file): Likewise.
7467         (process_options): Likewise.
7468         * tree-core.h (DEF_BUILTIN): Likewise.
7469         (DEF_BUILTIN_CHKP): Likewise.
7470         * tree-inline.c (declare_return_variable): Likewise.
7471         (remap_gimple_stmt): Likewise.
7472         (copy_bb): Likewise.
7473         (initialize_inlined_parameters): Likewise.
7474         (expand_call_inline): Likewise.
7475         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7476         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7477         (make_pass_ipa_chkp_produce_thunks): Likewise.
7478         (make_pass_chkp): Likewise.
7479         (make_pass_chkp_opt): Likewise.
7480         (make_pass_chkp_instrumentation_passes): Likewise.
7481         * tree-pretty-print.c (dump_generic_node): Likewise.
7482         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7483         * tree-ssa-dce.c (propagate_necessity): Likewise.
7484         (eliminate_unnecessary_stmts): Likewise.
7485         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7486         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7487         * tree-ssa-sccvn.h: Likewise.
7488         * tree-ssa-strlen.c (get_string_length): Likewise.
7489         (valid_builtin_call): Likewise.
7490         (adjust_last_stmt): Likewise.
7491         (handle_builtin_strchr): Likewise.
7492         (handle_builtin_strcpy): Likewise.
7493         (handle_builtin_stxncpy): Likewise.
7494         (handle_builtin_memcpy): Likewise.
7495         (handle_builtin_strcat): Likewise.
7496         (strlen_check_and_optimize_stmt): Likewise.
7497         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7498         * tree-streamer-in.c: Likewise.
7499         * tree-streamer.c (record_common_node): Likewise.
7500         * tree.c (tree_code_size): Likewise.
7501         (wide_int_to_tree_1): Likewise.
7502         (type_contains_placeholder_1): Likewise.
7503         (build_common_tree_nodes): Likewise.
7504         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7505         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7506         (POINTER_BOUNDS_P): Likewise.
7507         (BOUNDED_TYPE_P): Likewise.
7508         (BOUNDED_P): Likewise.
7509         (CALL_WITH_BOUNDS_P): Likewise.
7510         (pointer_bounds_type_node): Likewise.
7511         * value-prof.c (gimple_ic): Likewise.
7512         * var-tracking.c (vt_add_function_parameters): Likewise.
7513         * varasm.c (make_decl_rtl): Likewise.
7514         (assemble_start_function): Likewise.
7515         (output_constant): Likewise.
7516         (maybe_assemble_visibility): Likewise.
7517         * varpool.c (ctor_for_folding): Likewise.
7518         * chkp-builtins.def: Remove.
7519         * ipa-chkp.c: Remove.
7520         * ipa-chkp.h: Remove.
7521         * rtl-chkp.c: Remove.
7522         * rtl-chkp.h: Remove.
7523         * tree-chkp-opt.c: Remove.
7524         * tree-chkp.c: Remove.
7525         * tree-chkp.h: Remove.
7527 2018-06-07  Carl Love  <cel@us.ibm.com>
7529         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7530         vextract_fp_from_shortl): Add BE support.
7532 2018-06-07  Paul Koning  <ni1d@arrl.net>
7534         * compare-elim.c (try_merge_compare): Don't merge compare if
7535         address contains a side effect.
7536         (try_eliminate_compare): Likewise.
7538 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7540         * config.gcc: Support "tremont".
7541         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7542         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7543         PROCESSOR_TREMONT.
7544         * config/i386/i386.c (m_TREMONT): Define.
7545         (processor_target_table): Add "tremont".
7546         (PTA_TREMONT): Define.
7547         (ix86_lea_outperforms): Add TARGET_TREMONT.
7548         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7549         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7550         and M_INTEL_GOLDMONT_PLUS.
7551         (fold_builtin_cpu): Add "tremont".
7552         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7553         (ix86_option_override_internal): Add "tremont".
7554         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7555         (processor_type): Add PROCESSOR_TREMONT.
7556         * config/i386/x86-tune.def: Add m_TREMONT.
7557         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7559 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7561         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7562         symbol defined for msp430i* devices to be lower case.
7564 2018-06-07  Richard Biener  <rguenther@suse.de>
7566         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7567         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
7568         Properly wrap signed arithmetic if overflow wraps.
7570 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
7572         PR tree-optimization/69615
7573         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7574         of a cast from a same precision integral SSA_NAME in a bb dominated
7575         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
7576         cast to utype if rhs2 has already a compatible type.
7578 2018-06-07  Richard Biener  <rguenther@suse.de>
7580         PR tree-optimization/85935
7581         * graphite-scop-detection.c (find_params_in_bb): Analyze
7582         condition operands with respect to the correct loop.  Assert
7583         the analysis doesn't fail.
7585 2018-06-04  Carl Love  <cel@us.ibm.com>
7587         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7588         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
7589         as it is slightly cheaper.
7590         (first_match_or_eos_index_<mode>):
7591         Calculate index using natural element order.
7592         (first_match_index_<mode>):
7593         Calculate index using natural element order.
7594         (first_match_or_eos_index_<mode>):
7595         Calculate index using natural order.
7596         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7597         for BE and LE modes.
7598         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7599         P9V_BUILTIN_VCLZLSBB_V16QI.
7600         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7601         specific.
7603 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7605         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7606         indentation and line wrap for many prototypes.  Add missing
7607         @smallexample directives around block of prototypes for vec_xl and
7608         vec_xst.
7610 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
7612         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7613         track if we pass or return IEEE 128-bit floating point.
7614         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7615         C++ mangling that is compatible with GCC 8.1.
7616         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7617         (init_cumulative_args): Note if we pass or return IEEE 128-bit
7618         floating point types.
7619         (rs6000_function_arg_advance_1): Likewise.
7620         (rs6000_mangle_type): Optionally generate mangled names that match
7621         what GCC 8.1 generated for IEEE 128-bit floating point types.
7622         (rs6000_globalize_decl_name): If we have an external function that
7623         passes or returns IEEE 128-bit types, generate a weak reference
7624         from the mangled name used in GCC 8.1 to the current mangled
7625         name.
7626         (rs6000_init_builtins): Make __ibm128 use the long double type if
7627         long double is IBM extended double.  Make __float128 use the long
7628         double type if long double is IEEE 128-bit.
7630         PR target/85657
7631         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7632         macro for __ibm128 built-in functions.
7633         (PACK_IF): Add __ibm128 pack/unpack functions.
7634         (UNPACK_IF): Likewise.
7635         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7636         enable long double built-in functions if long double is IEEE
7637         128-bit floating point.
7638         (rs6000_invalid_builtin): Update long double built-in function
7639         error message.
7640         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7641         functions, adjust the built-in function to use the long double
7642         built-in function if __ibm128 and long double are the same type.
7643         * doc/extend.texi (PowerPC builtins): Update documention for
7644         __builtin_{,un}pack_longdouble.  Add documentation for
7645         __builtin_{,un}pack_ibm128.
7647 2018-06-06  Jim Wilson  <jimw@sifive.com>
7649         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7650         (struct machine_function): New field interrupt_mode.
7651         (riscv_handle_type_attribute): New function.  Add forward declaration.
7652         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7653         (riscv_expand_epilogue): Check interrupt_mode field.
7654         (riscv_set_current_function): Check interrupt attribute args and
7655         set interrupt_mode field.
7656         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7657         (riscv_sret, riscv_uret): New.
7658         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7659         new arguments to interrupt attribute.
7661 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
7663         PR target/63177
7664         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7665         Don't handle -mcpu=power8 if -mpower9-vector is also used.
7667 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7669         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7670         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7671         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7672         several redundant entries.
7674 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
7676         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7677         type from "rtx" to "rtx_insn *".
7678         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7679         for local "call_insn", removing cast.
7680         (ix86_expand_call): Likewise, introducing a "call_insn" local.
7682 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7684         PR tree-optimization/86066
7685         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7686         for BIT_INSERT_EXPR stores.
7688 2018-06-06  Richard Biener  <rguenther@suse.de>
7690         PR tree-optimization/86062
7691         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7692         component refs ontop
7693         of to be offsetted base.
7695 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7697         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7698         to be static and remove check on interrupt attribute name.
7700 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7702         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7703         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7705 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
7707         PR target/79924
7708         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7709         second argument.
7710         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7711         Remove second argument, change how error is called.
7712         (aarch64_layout_arg): Remove second argument from
7713         aarch64_err_no_fpadvsimd call.
7714         (aarch64_init_cumulative_args): Ditto.
7715         (aarch64_gimplify_va_arg_expr): Ditto.
7716         * config/aarch64/aarch64.md (mov<mode>): Ditto.
7718 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
7720         * config/i386/i386.md (simple_return_indirect_internal): New expander.
7721         (*simple_return_indirect_internal<mode>): Rename from
7722         simple_return_indirect_internal.  Use W mode iterator.
7723         (rstorssp): New expander.
7724         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
7725         (clrssbsy): New expander.
7726         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
7728 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7730         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7731         __typeof__.
7732         (cmse_check_pointed_object): Likewise.
7734 2018-06-05  Martin Liska  <mliska@suse.cz>
7736         PR gcov-profile/47618
7737         * doc/invoke.texi: Document how -fprofile-dir format
7738         is extended.
7740 2018-06-05  Richard Biener  <rguenther@suse.de>
7742         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7743         removal pretend DOM info isn't available so we do not update
7744         it and only remove edges, not dominated blocks.  Actually free
7745         DOM info in case we removed something.  Remove unreachable blocks.
7746         (mfb_keep_latches): Work with either DOM info or marked backedges.
7747         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7748         first.  Mark backedges if DOM info isn't available.
7749         (Re-)compute DOM info after cleanup_control_flow_pre.
7751 2018-06-05  Richard Biener  <rguenther@suse.de>
7753         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7754         (locus_discrim_hasher::hash): Adjust.
7755         (locus_discrim_hasher::equal): Likewise.
7756         (next_discriminator_for_locus): Work on line directly.
7757         (same_line_p): Pass in expanded locus1 as well.
7758         (assign_discriminators): Avoid redundant location expansions.
7760 2018-06-05  Richard Biener  <rguenther@suse.de>
7762         PR tree-optimization/86046
7763         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7764         if required after clearing TREE_ADDRESSABLE.
7766 2018-06-05  Richard Biener  <rguenther@suse.de>
7768         PR tree-optimization/86047
7769         * tree-ssa-loop.c (for_each_index): Glob handling of all
7770         decls and constants and really handle all of them.
7772 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7774         PR target/81497
7775         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7776         qualifier_void_pointer and qualifier_const_void_pointer.
7777         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7778         (arm_init_builtins): Handle the above.
7779         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7780         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7781         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7782         void intrinsics.
7784 2018-06-05  Martin Liska  <mliska@suse.cz>
7786         * auto-profile.c (read_autofdo_file): Do not use
7787         gcov_ctr_summary struct.
7788         (afdo_callsite_hot_enough_for_early_inline): Likewise.
7789         * coverage.c (struct counts_entry): Likewise.
7790         (read_counts_file): Read just single summary entry.
7791         (get_coverage_counts): Use gcov_summary struct.
7792         * coverage.h (get_coverage_counts): Likewise.
7793         * gcov-dump.c (dump_working_sets): Likewise.
7794         (tag_summary): Dump just single summary.
7795         * gcov-io.c (gcov_write_summary): Write just histogram
7796         summary.
7797         (gcov_read_summary): Read just single summary.
7798         (compute_working_sets): Use gcov_summary struct.
7799         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7800         of GCOV_COUNTERS_SUMMABLE.
7801         (GCOV_COUNTERS_SUMMABLE): Remove.
7802         (GCOV_FIRST_VALUE_COUNTER): Replace with
7803         GCOV_COUNTER_V_INTERVAL.
7804         (struct gcov_ctr_summary): Remove.
7805         (struct gcov_summary): Directly use fields of former
7806         gcov_ctr_summary.
7807         (compute_working_sets): Use gcov_summary struct.
7808         * gcov.c (read_count_file): Do not use ctrs fields.
7809         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7810         struct.
7811         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7812         struct.
7813         * profile.c: Likewise.
7814         * profile.h: Likewise.
7816 2018-06-05  Martin Liska  <mliska@suse.cz>
7818         PR gcov-profile/84846
7819         * gcov.c (output_lines): Print working directory only
7820         in intermediate format.
7822 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
7824         * config/s390/s390-builtin-types.def: Add void function type.
7825         * config/s390/s390-builtins.def: Use the function type for the
7826         tbeginc builtin.
7828 2018-06-04  Jim Wilson  <jimw@sifive.com>
7830         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7831         to int.
7832         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7833         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
7834         handle EH_RETURN_DATA_REGNO registers properly.
7835         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7836         (riscv_expand_epilogue): Update comment.  Change argument name and
7837         type.  Update code to use new name and type.  Pass new args to
7838         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
7839         EXCEPTION_RETURN.
7840         * config/riscv/riscv.md (NORMAL_RETURN): New.
7841         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7842         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7843         (eh_return): Call gen_eh_return_internal and emit barrier.
7844         (eh_return_internal): Call riscv_expand_epilogue.
7846 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
7848         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7849         bit_insertion field and declare can_be_merged_into method.
7850         (merged_store_group::can_be_merged_into): New method.
7851         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7852         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
7853         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7855 2018-06-04  Richard Biener  <rguenther@suse.de>
7857         PR tree-optimization/85955
7858         * builtins.c (fold_builtin_sincos): Convert pointers to
7859         destination to appropriate type before dereferencing.
7861 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
7863         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7865 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
7867         * expr.c (expand_expr_real_1): Force the operand into memory if
7868         its TYPE_MODE is BLKmode and if there is no integer mode for
7869         the number of bits being extracted.
7871 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7873         PR target/85832
7874         PR target/86036
7875         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7876         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7878 2018-06-04  Richard Biener  <rguenther@suse.de>
7880         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7881         (cleanup_tree_cfg_noloop): ... single caller.  Do
7882         start_recording_case_labels later.
7884 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
7886         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7887         to _IMMINTRIN_H_INCLUDED.
7888         * config/i386/pconfigintrin.h: Ditto.
7889         * config/i386/waitpkgintrin.h: Ditto.
7890         * config/i386/immintrin.h: Add includes for sgxintrin.h,
7891         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7892         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7893         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7894         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7895         waitpkgintrin.h and cldemoteintrin.h.
7897 2018-06-04  Richard Biener  <rguenther@suse.de>
7899         PR tree-optimization/86038
7900         * tracer.c (find_best_successor): Check probability for
7901         being initialized, bail out if not.
7903 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
7905         PR target/86003
7906         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7907         of bits to ignore when comparing architectures.
7909 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7911         PR tree-optimization/69615
7912         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7913         maximum or minimum of the type, try to merge it also as if
7914         range1 is + [-, x - 1] or + [x + 1, -].
7916         PR c++/86025
7917         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7919 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
7921         PR tree-optimization/86034
7922         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7923         the unsigned bitfield type in a bit insertion sequence if it does not
7924         have a larger precision than the bitfield size.
7925         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7927 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
7929         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7931 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
7933         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7934         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7935         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7936         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7938 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
7940         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7941         Disable -fdelete-null-pointer-checks for ELF toolchain.
7943 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7944             Kito Cheng  <kito.cheng@gmail.com>
7946         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7947         (nds32le-*-*, nds32be-*-*): Integrate checking process.
7948         (nds32*-*-*): Add glibc and uclibc conditions.
7949         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7950         (TARGET_EXCEPT_UNWIND_INFO): Define.
7951         * config/nds32/elf.h: New file.
7952         * config/nds32/linux.h: New file.
7953         * config/nds32/nds32-elf.opt: New file.
7954         * config/nds32/nds32-linux.opt: New file.
7955         * config/nds32/nds32-fp-as-gp.c
7956         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7957         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7958         TARGET_LINUX_ABI.
7959         (nds32_asm_file_end): Ditto.
7960         (nds32_print_operand): Ditto.
7961         (nds32_insert_attributes): Ditto.
7962         (nds32_init_libfuncs): New function.
7963         (TARGET_HAVE_TLS): Define.
7964         (TARGET_INIT_LIBFUNCS): Define.
7965         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7966         spec content.
7967         (TARGET_ELF): Apply different mcmodel setting.
7968         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7969         been migrated into elf.h and linux.h files.
7970         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7971         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7972         (mcmodel): The content has been migrated into nds32-elf.opt and
7973         nds32-linux.opt files.
7974         * config/nds32/t-elf: New file.
7975         * config/nds32/t-linux: New file.
7977 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7978             Shiva Chen  <shiva0217@gmail.com>
7980         * config/nds32/constants.md (unspec_volatile_element): Add
7981         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7982         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7983         optimization.
7984         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7985         (make_pass_nds32_fp_as_gp): Declare.
7986         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7987         optmization pass.
7988         (nds32_asm_function_end_prologue): Remove unused asm output.
7989         (nds32_asm_function_begin_epilogue): Remove unused asm output.
7990         (nds32_asm_file_start): Output necessary fp_as_gp information.
7991         (nds32_option_override): Adjust register usage.
7992         (nds32_expand_prologue): Consider fp_as_gp situation.
7993         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7994         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7995         (epilogue): Ditto.
7996         (return): Ditto.
7997         (simple_return): Ditto.
7998         (omit_fp_begin): Output special directive for fp_as_gp.
7999         (omit_fp_end): Output special directive for fp_as_gp.
8000         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8001         mforbid-fp-as-gp): New options.
8003 2018-06-01  Mark Wielaard  <mark@klomp.org>
8005         * dwarf2out.c (dwarf2out_finish): Remove generation of
8006         DW_AT_loclists_base.
8008 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8010         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8011         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8012         (struct merged_store_group): Add bit_insertion field.
8013         (dump_char_array): Use standard hexadecimal format.
8014         (merged_store_group::merged_store_group): Set bit_insertion to false.
8015         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8016         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8017         also print the mask in the dump file.
8018         (pass_store_merging::gate): Minor tweak.
8019         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8020         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8021         stores with INTEGER_CST stores.
8022         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8023         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8024         and use it throughout.  Generate bit insertion sequences if need be.
8025         (pass_store_merging::process_store): Remove redundant condition.
8026         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8028 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8030         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8031         the 128-bit floating point types.  Fix function comment.
8033 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8035         * config/aarch64/aarch64-simd.md
8036         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8037         mnemonics.
8038         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8039         mnemonics.
8041 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8043         PR tree-optimization/85989
8044         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8045         variable.
8046         (backprop::intersect_uses): Check it when deciding whether this
8047         is a backedge reference.
8048         (backprop::process_block): Add each phi to m_visited_phis
8049         after visiting it, then clear it at the end.
8051 2018-06-01  Richard Biener  <rguenther@suse.de>
8053         * tree-vectorizer.h (vect_dr_stmt): New function.
8054         (vect_get_load_cost): Adjust.
8055         (vect_get_store_cost): Likewise.
8056         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8057         Use vect_dr_stmt instead of DR_SMTT.
8058         (vect_record_base_alignments): Likewise.
8059         (vect_calculate_target_alignment): Likewise.
8060         (vect_compute_data_ref_alignment): Likewise and make static.
8061         (vect_update_misalignment_for_peel): Likewise.
8062         (vect_verify_datarefs_alignment): Likewise.
8063         (vector_alignment_reachable_p): Likewise.
8064         (vect_get_data_access_cost): Likewise.  Pass down
8065         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8066         (vect_get_peeling_costs_all_drs): Likewise.
8067         (vect_peeling_hash_get_lowest_cost): Likewise.
8068         (vect_enhance_data_refs_alignment): Likewise.
8069         (vect_find_same_alignment_drs): Likewise.
8070         (vect_analyze_data_refs_alignment): Likewise.
8071         (vect_analyze_group_access_1): Likewise.
8072         (vect_analyze_group_access): Likewise.
8073         (vect_analyze_data_ref_access): Likewise.
8074         (vect_analyze_data_ref_accesses): Likewise.
8075         (vect_vfa_segment_size): Likewise.
8076         (vect_small_gap_p): Likewise.
8077         (vectorizable_with_step_bound_p): Likewise.
8078         (vect_prune_runtime_alias_test_list): Likewise.
8079         (vect_analyze_data_refs): Likewise.
8080         (vect_supportable_dr_alignment): Likewise.
8081         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8082         (vect_gen_prolog_loop_niters): Likewise.
8083         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8084         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8085         modify DR_STMT.
8086         (vect_recog_mask_conversion_pattern): Likewise.
8087         (vect_try_gather_scatter_pattern): Likewise.
8088         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8089         to vect_get_store_cost.
8090         (vect_get_store_cost): Get stmt_info instead of DR.
8091         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8092         (vect_get_load_cost): Get stmt_info instead of DR.
8094 2018-06-01  Richard Biener  <rguenther@suse.de>
8096         PR middle-end/86017
8097         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8098         vars wrapped in MEM_REFs.
8100 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8102         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8103         Fix subreg tests so that we only return a choice between
8104         GENERAL_REGS and FP_REGS if the original classes included both.
8106 2018-06-01  Richard Biener  <rguenther@suse.de>
8108         PR ipa/85960
8109         * tree-ssa-structalias.c (get_function_part_constraint):
8110         Handle NULL fi->decl.
8111         (find_func_aliases_for_call): Properly handle indirect
8112         fi from direct call.
8113         (find_func_clobbers): Likewise.
8114         (ipa_pta_execute): Likewise.
8115         (create_variable_info_for): For functions that are ifunc_resolver
8116         resolve to a varinfo that contains the result of the resolver call.
8117         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8118         aliases.
8120 2018-05-31  Michael Collison  <michael.collison@arm.com>
8122         * config/aarch64/aarch64.md:
8123         (*fix_to_zero_extenddfdi2): New pattern.
8124         * gcc.target/aarch64/fix_extend1.c: New testcase.
8126 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8128         PR middle-end/78809
8129         PR middle-end/83026
8130         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8131         and BUILT_IN_STRNCMP_EQ.
8132         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8133         BUILT_IN_STRNCMP_EQ.
8134         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8135         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8136         (gimple_fold_builtin): Likewise.
8137         * tree-ssa-strlen.c (compute_string_length): New function.
8138         (determine_min_obsize): New function.
8139         (handle_builtin_string_cmp): New function to handle calls to
8140         string compare functions.
8141         (strlen_optimize_stmt): Add handling to builtin string compare
8142         calls.
8143         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8144         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8145         * tree.c (build_common_builtin_nodes): Add new defines of
8146         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8148 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8150         PR target/85984
8151         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8152         functions with naked attribute.
8154 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8156         * config/i386/sse.md (avx_vec_concat<mode>):
8157         Substitute concat_tg_mode mode attribute with xtg_mode.
8158         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8159         (concat_tg_mode): Remove mode attribute.
8161 2018-05-31  Martin Sebor  <msebor@redhat.com>
8163         PR c/82063
8164         * calls.c (alloc_max_size): Correct a logic error/typo.
8165         Treat excessive arguments as infinite.  Warn for invalid arguments.
8166         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8168 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8170         PR target/85829
8171         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8172         and movx for Haswell.
8174 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8175             Cesar Philippidis  <cesar@codesourcery.com>
8177         PR middle-end/85879
8178         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8179         when emitting error on private/firstprivate reductions.
8180         * omp-low.c (lower_omp_target): Avoid reference-type processing
8181         on pointers for firstprivate clause.
8183 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8185         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8186         (st1x2): Likewise.
8187         (st1x3): Likewise.
8188         * config/aarch64/aarch64-simd.md
8189         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8190         (aarch64_ld1_x3_<mode>): Likewise
8191         (aarch64_st1x2<VALLDIF:mode>): Likewise
8192         (aarch64_st1_x2_<mode>): Likewise
8193         (aarch64_st1x3<VALLDIF:mode>): Likewise
8194         (aarch64_st1_x3_<mode>): Likewise
8195         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8196         (vld1_s8_x3): Likewise.
8197         (vld1_u16_x3): Likewise.
8198         (vld1_s16_x3): Likewise.
8199         (vld1_u32_x3): Likewise.
8200         (vld1_s32_x3): Likewise.
8201         (vld1_u64_x3): Likewise.
8202         (vld1_s64_x3): Likewise.
8203         (vld1_f16_x3): Likewise.
8204         (vld1_f32_x3): Likewise.
8205         (vld1_f64_x3): Likewise.
8206         (vld1_p8_x3): Likewise.
8207         (vld1_p16_x3): Likewise.
8208         (vld1_p64_x3): Likewise.
8209         (vld1q_u8_x3): Likewise.
8210         (vld1q_s8_x3): Likewise.
8211         (vld1q_u16_x3): Likewise.
8212         (vld1q_s16_x3): Likewise.
8213         (vld1q_u32_x3): Likewise.
8214         (vld1q_s32_x3): Likewise.
8215         (vld1q_u64_x3): Likewise.
8216         (vld1q_s64_x3): Likewise.
8217         (vld1q_f16_x3): Likewise.
8218         (vld1q_f32_x3): Likewise.
8219         (vld1q_f64_x3): Likewise.
8220         (vld1q_p8_x3): Likewise.
8221         (vld1q_p16_x3): Likewise.
8222         (vld1q_p64_x3): Likewise.
8223         (vst1_s64_x2): Likewise.
8224         (vst1_u64_x2): Likewise.
8225         (vst1_f64_x2): Likewise.
8226         (vst1_s8_x2): Likewise.
8227         (vst1_p8_x2): Likewise.
8228         (vst1_s16_x2): Likewise.
8229         (vst1_p16_x2): Likewise.
8230         (vst1_s32_x2): Likewise.
8231         (vst1_u8_x2): Likewise.
8232         (vst1_u16_x2): Likewise.
8233         (vst1_u32_x2): Likewise.
8234         (vst1_f16_x2): Likewise.
8235         (vst1_f32_x2): Likewise.
8236         (vst1_p64_x2): Likewise.
8237         (vst1q_s8_x2): Likewise.
8238         (vst1q_p8_x2): Likewise.
8239         (vst1q_s16_x2): Likewise.
8240         (vst1q_p16_x2): Likewise.
8241         (vst1q_s32_x2): Likewise.
8242         (vst1q_s64_x2): Likewise.
8243         (vst1q_u8_x2): Likewise.
8244         (vst1q_u16_x2): Likewise.
8245         (vst1q_u32_x2): Likewise.
8246         (vst1q_u64_x2): Likewise.
8247         (vst1q_f16_x2): Likewise.
8248         (vst1q_f32_x2): Likewise.
8249         (vst1q_f64_x2): Likewise.
8250         (vst1q_p64_x2): Likewise.
8251         (vst1_s64_x3): Likewise.
8252         (vst1_u64_x3): Likewise.
8253         (vst1_f64_x3): Likewise.
8254         (vst1_s8_x3): Likewise.
8255         (vst1_p8_x3): Likewise.
8256         (vst1_s16_x3): Likewise.
8257         (vst1_p16_x3): Likewise.
8258         (vst1_s32_x3): Likewise.
8259         (vst1_u8_x3): Likewise.
8260         (vst1_u16_x3): Likewise.
8261         (vst1_u32_x3): Likewise.
8262         (vst1_f16_x3): Likewise.
8263         (vst1_f32_x3): Likewise.
8264         (vst1_p64_x3): Likewise.
8265         (vst1q_s8_x3): Likewise.
8266         (vst1q_p8_x3): Likewise.
8267         (vst1q_s16_x3): Likewise.
8268         (vst1q_p16_x3): Likewise.
8269         (vst1q_s32_x3): Likewise.
8270         (vst1q_s64_x3): Likewise.
8271         (vst1q_u8_x3): Likewise.
8272         (vst1q_u16_x3): Likewise.
8273         (vst1q_u32_x3): Likewise.
8274         (vst1q_u64_x3): Likewise.
8275         (vst1q_f16_x3): Likewise.
8276         (vst1q_f32_x3): Likewise.
8277         (vst1q_f64_x3): Likewise.
8278         (vst1q_p64_x3): Likewise.
8280 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8282         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8283         user_label_prefix to name.
8285         * tree-core.h: Update comment about the format of NAME string
8286         passed to handler in attribute_spec.
8288         * config/msp430/msp430.md: Remove erroneous subreg expression from
8289         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8290         zero_extend{q,h}isi2.
8292 2018-05-30  Borislav Petkov  <bp@suse.de>
8294         * doc/extend.texi: Document some architecture specific
8295         constraints and sort entries.
8297 2018-05-30  Martin Sebor  <msebor@redhat.com>
8299         PR middle-end/85369
8300         * builtins.c (expand_builtin_stpcpy_1): New function.
8301         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8302         only if the former succeeds.
8304 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
8306         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8307         in saphira.
8309 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8311         * doc/invoke.texi (-flinker-output): Document
8313 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8315         * passes.c (ipa_write_summaries): Only modify statements if body
8316         is in memory.
8317         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8318         incrementally linking.
8319         (ipa_passes): Likewise.
8320         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8321         pass down resolution info.
8322         * common.opt (flag_incremental_link): Update info.
8323         * gcc.c (plugin specs): Turn flinker-output=* to
8324         -plugin-opt=-linker-output-known
8325         * toplev.c (compile_file): Also cut compilation when doing incremental
8326         link.
8327         * flag-types. (enum lto_partition_model): Add
8328         LTO_LINKER_OUTPUT_NOLTOREL.
8329         (invoke.texi): Add -flinker-output docs.
8330         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8331         link same way as WPA; do not stream in dead initializers.
8333         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8334         darf2out_register_external_decl): Support incremental link.
8336 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8338         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8340 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8342         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8343         it down to simple_object_copy_lto_debug_sections.
8344         (run_gcc): Determine incremental LTO link time and configure
8345         lto1 into non-wpa mode, disable renaming of debug sections.
8347 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8349         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8350         descriptions of various incorrectly documented functions.
8352 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8354         Revert:
8355         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8356         address check not strict.
8358 2018-05-30  Richard Biener  <rguenther@suse.de>
8360         PR tree-optimization/85964
8361         * tracer.c (better_p): Drop initialized count check, we only
8362         call the function with initialized counts now.
8363         (find_best_successor): Do find a best edge if one
8364         has uninitialized count.
8365         (find_best_predecessor): Likewise.  Do BB frequency check only
8366         if count is initialized.
8368 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8370         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8371         (aarch64_ldrstr_offset_compare): New.
8372         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8373         load/store orderings.
8374         (aarch64_gen_adjusted_ldpstp): Likewise.
8376 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8378         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8379         Check for subset of GENERAL_REGS and FP_REGS.
8380         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8381         r=w alternative.
8383 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8385         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8386         and wi::to_poly_offset.  Add the current offset and then check
8387         whether the sum fits, rather than using an unchecked addition of
8388         a checked term.  Check for a shwi rather than a uhwi.
8389         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8390         (store_constructor): Use poly_int_tree_p.
8391         (expand_expr_real_1): Likewise.
8392         * function.c (assign_temp): Likewise.
8393         * fold-const.c (const_binop): Use poly_int_tree_p and
8394         wi::to_poly_offset.
8395         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8396         division.
8397         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8398         to_poly_offset for MEM offsets.
8399         * ipa-icf.c (sem_variable::equals): Likewise.
8400         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8401         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8402         wi::to_poly_offset for BIT_FIELD_REF offsets.
8403         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8404         wi::to_poly_offset.
8405         * var-tracking.c (emit_note_insn_var_location): Use
8406         tree_to_poly_uint64.
8408 2018-05-29  Jim Wilson  <jimw@sifive.com>
8410         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8412 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8414         PR target/85950
8415         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8416         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8417         sequence.
8418         (sse4_1_round<mode>2): Use nonimmediate_operand
8419         for operand 1 predicate.
8421 2018-05-29  Martin Sebor  <msebor@redhat.com>
8422             Richard Biener  <rguenther@suse.de>
8424         PR testsuite/85888
8425         * calls.c (get_size_range): Call determine_value_range instead
8426         of get_value_range..
8427         * tree-vrp.h (determine_value_range): Declared new function.
8428         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8430 2018-05-29  Richard Biener  <rguenther@suse.de>
8432         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8433         sure to use non-pattern stmts for get_earlier_stmt arguments.
8434         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8435         called on pattern stmts.
8436         (get_later_stmt): Likewise.
8438 2018-05-29  Martin Liska  <mliska@suse.cz>
8440         PR gcov-profile/85759
8441         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8442         env variables.
8444 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8446         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8447         VEC_UNPACK_*_EXPR.
8448         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8449         VEC_PACK_*_EXPR.
8451         PR target/85918
8452         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8453         VEC_PACK_FLOAT_EXPR): New tree codes.
8454         * tree-pretty-print.c (op_code_prio): Handle
8455         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8456         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8457         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8458         * tree-inline.c (estimate_operator_cost): Likewise.
8459         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8460         * fold-const.c (const_binop): Likewise.
8461         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8462         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8463         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8464         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8465         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8466         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8467         * expr.c (expand_expr_real_2): Likewise.
8468         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8469         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8470         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8471         optabs.
8472         * optabs.c (expand_widen_pattern_expr): For
8473         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8474         sign from result type rather than operand's type.
8475         (expand_binop_directly): For vec_packu_float_optab and
8476         vec_packs_float_optab allow result type to be different from operand's
8477         type.
8478         * optabs-tree.c (optab_for_tree_code): Handle
8479         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8480         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8481         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8482         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8483         VEC_PACK_FLOAT_EXPR.
8484         * tree-vect-stmts.c (supportable_widening_operation): Handle
8485         FIX_TRUNC_EXPR.
8486         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8487         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8488         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8489         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8490         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8491         mode attributes.
8492         (vec_pack<floatprefix>_float_<mode>): New expander.
8493         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8494         attributes.
8495         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8496         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8497         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8498         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8499         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8500         Document.
8501         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8502         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8503         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8504         VEC_PACK_FLOAT_EXPR): Document.
8506 2018-05-29  Richard Biener  <rguenther@suse.de>
8508         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8509         member.
8510         (stmt_vec_info_vec): Make pointer.
8511         (init_stmt_vec_info_vec): Remove.
8512         (free_stmt_vec_info_vec): Likewise.
8513         (set_stmt_vec_info_vec): New function.
8514         (free_stmt_vec_infos): Likewise.
8515         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8516         (set_vinfo_for_stmt): Likewise.
8517         (get_earlier_stmt): Likewise.
8518         (get_later_stmt): Likewise.
8519         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8520         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8521         (vec_info::~vec_info): Free stmt_vec_infos.
8522         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8523         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8524         (pass_slp_vectorize::execute): Likewise.
8525         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8526         (free_stmt_vec_info_vec): Likewise.
8527         (set_stmt_vec_info_vec): New function.
8528         (free_stmt_vec_infos): Likewise.
8529         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8530         the global stmt_vec_info_vec.
8531         * tree-parloops.c (gather_scalar_reductions): Use
8532         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8533         vector.
8535 2018-05-29  Richard Biener  <rguenther@suse.de>
8537         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8539 2018-05-29  Martin Liska  <mliska@suse.cz>
8540             David Malcolm  <dmalcolm@redhat.com>
8542         * vec.c (test_reverse): New.
8543         (vec_c_tests): Add new test.
8544         * vec.h (vl_ptr>::reverse): New function.
8546 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8548         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8550         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8551         and later.
8553 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8555         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8557 2018-05-28  Richard Biener  <rguenther@suse.de>
8559         PR tree-optimization/85933
8560         * tree-vect-data-refs.c (vect_record_base_alignments): Only
8561         look at stmts marked as vectorizable.
8563 2018-05-28  Richard Biener  <rguenther@suse.de>
8565         PR tree-optimization/85934
8566         * tree-vect-generic.c (expand_vector_operations_1): Hoist
8567         vector boolean check before scalar optimization.
8569 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
8571         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8572         for armv5te.
8574 2018-05-28  Mark Wielaard  <mark@klomp.org>
8576         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8577         if it is an expression containing a minus sign.
8579 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
8581         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8583 2018-05-27  Paul Koning  <ni1d@arrl.net>
8585         * config/pdp11/pdp11.md (truncsihi2): Remove.
8587 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
8588             Chung-Ju Wu  <jasonwucj@gmail.com>
8590         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8591         implementation.
8592         (unaligned_store_dw): Ditto.
8593         * config/nds32/nds32-memory-manipulation.c
8594         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8595         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8596         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8597         (emit_setmem_word_loop): Rename to ...
8598         (emit_setmem_doubleword_loop): ... this.
8599         (nds32_gen_dup_4_byte_to_word_value): New function.
8600         (nds32_gen_dup_8_byte_to_double_word_value): New function.
8601         (nds32_expand_setmem_loop): Refine implementation.
8602         (nds32_expand_setmem_loop_v3m): Ditto.
8603         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8604         pattern.
8606 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8608         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8610 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8612         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8613         (nds32_init_machine_status): Initialize machine->attr_naked_p and
8614         machine->attr_no_prologue_p.
8615         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8616         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8617         (nds32_expand_epilogue): Consider attr_naked_p.
8618         (nds32_expand_epilogue_v3pop): Likewise.
8619         (nds32_can_use_return_insn): Likewise.
8620         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8621         attr_no_prologue_p fields.
8622         * config/nds32/nds32.opt (mret-in-naked-func): New option.
8624 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
8626         PR target/85918
8627         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8628         attributes.
8629         * config/i386/sse.md
8630         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8631         Rename to ...
8632         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8633         ... this.
8634         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8635         Rename to ...
8636         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8637         ... this.
8638         (*<floatsuffix>floatv2div2sf2): Rename to ...
8639         (*float<floatunssuffix>v2div2sf2): ... this.
8640         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8641         (float<floatunssuffix>v2div2sf2_mask): ... this.
8642         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8643         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8644         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8645         to ...
8646         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8647         ... this.
8648         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8649         Rename to ...
8650         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8651         ... this.
8652         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8653         Rename to ...
8654         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8655         ... this.
8656         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8657         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8658         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8659         gen_ufix_truncv8dfv8si2.
8660         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8661         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8662         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8663         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8664         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8665         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8666         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8667         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8669 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8671         PR target/85900
8672         PR target/85345
8673         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8675 2018-05-25  Jim Wilson  <jimw@sifive.com>
8677         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8678         * config/riscv/riscv.c (struct machine_function): Add
8679         interrupt_handler_p and attribute_checked_p fields.
8680         (riscv_attribute_table): Add interrupt.
8681         (riscv_interrupt_type_p): New.
8682         (riscv_save_reg_p): Save extra regs for interrupt handler.
8683         (riscv_use_save_libcall): Return false  for interrupt handler.
8684         (riscv_first_stack_step): Add forward declaration.
8685         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
8686         for interrupt handler with large frame.  Use it for saved reg list.
8687         (riscv_expand_prologue): Move flag_stack_usage_info support to
8688         eliminate duplication.
8689         (riscv_expand_epilogue): Generate mret for interrupt handler.
8690         (riscv_epilogue_uses): New.
8691         (riscv_can_use_return_insn): Return false for interrupt handler.
8692         (riscv_function_ok_for_sibcall): Likewise.
8693         (riscv_set_current_function): Add interrupt handler support.
8694         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8695         * config/riscv/riscv.md (UNSPECV_MRET): New.
8696         (GP_REGNUM): New.
8697         (riscv_frflags, riscv_fsflags): Use tab after opcode.
8698         (riscv_mret): New.
8699         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8701 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
8703         PR tree-optimization/85712
8704         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8705         this candidate has already been replaced in-situ by a copy.
8707 2018-05-25  Jason Merrill  <jason@redhat.com>
8709         PR c++/80485 - inline function non-zero address.
8710         * symtab.c (nonzero_address): Check DECL_COMDAT.
8712 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
8714         PR target/83628
8715         * config/alpha/alpha.md (ashlsi3): New insn pattern.
8716         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
8717         extension of SImode operation.  Use const123_operand predicate.
8718         (*saddsi_1): Remove.
8719         (*saddl_se_1): Ditto.
8720         (*ssubsi_1): Ditto.
8721         (*ssubl_se_1): Ditto.
8722         * config/alpha/predicates.md (const123_operand): New predicate.
8723         * config/alpha/constraints.md (P): Use IN_RANGE.
8725 2018-05-25  Richard Biener  <rguenther@suse.de>
8727         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8728         defaulted to true.
8729         (ref_maybe_used_by_stmt_p): Likewise.
8730         (stmt_may_clobber_ref_p): Likewise.
8731         (stmt_may_clobber_ref_p_1): Likewise.
8732         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8733         and pass it along.
8734         (ref_maybe_used_by_stmt_p): Likewise.
8735         (stmt_may_clobber_ref_p): Likewise.
8736         (stmt_may_clobber_ref_p_1): Likewise.
8737         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8738         the alias oracle to disambiguate DRs with stmts DR analysis
8739         couldn't handle.
8740         (vect_analyze_data_refs): Do not give up on not analyzable
8741         DRs for BB vectorization.  Remove code truncating the dataref
8742         vector.
8744 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
8746         PR target/85832
8747         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8748         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
8749         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8751 2018-05-25  Richard Biener  <rguenther@suse.de>
8753         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8754         function, combining stmt data ref gathering and fatal analysis
8755         parts.
8756         (vect_analyze_data_refs): Remove now redudnant code and simplify.
8757         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8758         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8759         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8760         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8762 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8764         PR tree-optimization/85720
8765         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8766         SCC if all partitions are builtins.
8767         (version_loop_by_alias_check): New parameter.  Generate cancelable
8768         runtime alias check if all partitions are builtins.
8769         (distribute_loop): Update call to above function.
8771 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8773         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8774         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8775         (parm_default_def_partition_arg): Ditto.
8776         (set_parm_default_def_partition): Ditto.
8777         (get_parm_default_def_partitions): Ditto and make it static.
8778         (get_undefined_value_partitions): Ditto and make it static.
8779         (remove_ssa_form): Refactor call to init_var_map here.
8780         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8781         computation for loop region.
8782         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8783         (register_default_def): Delete.
8784         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8785         (parm_default_def_partition_arg): Ditto.
8786         (set_parm_default_def_partition): Ditto.
8787         (get_parm_default_def_partitions): Ditto and make it static.
8788         (get_undefined_value_partitions): Ditto and make it static.
8789         (coalesce_with_default, coalesce_with_default): Update comment.
8790         (create_coalesce_list_for_region): New func factored out from
8791         create_outofssa_var_map.
8792         (populate_coalesce_list_for_outofssa): New func factored out from
8793         create_outofssa_var_map and coalesce_ssa_name.
8794         (create_outofssa_var_map): Delete.
8795         (coalesce_ssa_name): Refactor to support live range computation.
8796         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8797         (get_parm_default_def_partitions): Delete.
8798         (get_undefined_value_partitions): Ditto.
8799         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8800         computation for loop region.
8801         (new_tree_live_info, loe_visit_block): Ditto.
8802         (live_worklist, set_var_live_on_entry): Ditto.
8803         (calculate_live_on_exit, verify_live_on_entry): Ditto.
8804         * tree-ssa-live.h (struct _var_map): New fields.
8805         (init_var_map): Change decl.
8806         (region_contains_p): New.
8808 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8810         * tree-ssa-live.h (live_merge_and_clear): Delete.
8812 2018-05-25  Richard Biener  <rguenther@suse.de>
8814         PR c++/85912
8815         * tree-dump.c (dequeue_and_dump): Remove access to removed
8816         operand 2 of a SWITCH_EXPR.
8818 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8820         * doc/sourcebuild.texi (vect_double_cond_arith): Include
8821         multiplication and division.
8822         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8823         (cond_udiv@var{m}, cond_umod@var{m}): Document.
8824         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8825         (cond_udiv_optab, cond_umod_optab): New optabs.
8826         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8827         (IFN_COND_RDIV): New internal functions.
8828         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8829         TRUNC_MOD_EXPR and RDIV_EXPR.
8830         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8831         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8832         New unspecs.
8833         (SVE_INT_BINARY): Include mult.
8834         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8835         (optab, sve_int_op): Handle mult.
8836         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8837         UNSPEC_COND_DIV.
8838         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8839         for SVE_INT_BINARY_SD.
8841 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8843         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8844         (optab, sve_int_op): Handle div and udiv.
8845         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8846         for SVE_INT_BINARY_SD.
8847         (*<optab><mode>3): New insn for the same.
8849 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8851         * tree-vect-patterns.c: Include predict.h.
8852         (vect_recog_divmod_pattern): Restrict check for division support
8853         to when optimizing for size.
8855 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8857         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8858         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8859         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8860         (gimple_match_op::set_op): Likewise.
8861         (gimple_resimplify4): Declare.
8862         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8863         (expr::gen_transform): Likewise.
8864         (decision_tree::gen): Generate a simplification routine for 4 operands.
8865         * gimple-match-head.c (gimple_simplify): Add an overload for
8866         4 operands.  In the top-level function, handle up to 4 call
8867         arguments and call gimple_resimplify4.
8868         (gimple_resimplify4): New function.
8869         (build_call_internal): Pass a fourth operand.
8870         (maybe_push_to_seq): Likewise.
8871         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8872         Fold VEC_COND_EXPRs of an operation and a default value into
8873         an IFN_COND_* function if possible.
8874         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8875         New unspecs.
8876         (SVE_COND_FP_BINARY): Include them.
8877         (optab, sve_fp_op): Handle them.
8878         (SVE_INT_BINARY_REV): New code iterator.
8879         (SVE_COND_FP_BINARY_REV): New int iterator.
8880         (commutative): New int attribute.
8881         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8882         Declare.
8883         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8884         function.
8885         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8886         (*cond_<optab><mode>): New patterns for reversed operands.
8888 2018-05-25  Richard Biener  <rguenther@suse.de>
8890         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8891         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8892         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8893         (STMT_VINFO_GROUPED_ACCESS): Adjust.
8894         * tree-vect-data-refs.c (everywhere): Adjust users.
8895         * tree-vect-loop.c (everywhere): Likewise.
8896         * tree-vect-slp.c (everywhere): Likewise.
8897         * tree-vect-stmts.c (everywhere): Likewise.
8898         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8900 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8902         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8903         Rename to...
8904         (gcc_cv_as_section_exclude): ... this.
8905         Try Solaris as #exclude syntax.
8906         * configure: Regenerate.
8907         * config.in: Regenerate.
8908         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8909         SECTION_EXCLUDE.
8910         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8911         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8913         * varasm.c (default_elf_asm_named_section): Don't check if
8914         HAVE_GAS_SECTION_EXCLUDE is defined.
8916 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8918         * doc/md.texi: Update the documentation of the cond_* optabs
8919         to mention the new final operand.  Fix GET_MODE_NUNITS call.
8920         Describe the scalar case too.
8921         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8922         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8923         instead of 2.
8924         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8925         (get_conditional_internal_fn): Update comment.
8926         * tree-vect-loop.c (vectorizable_reduction): Pass the original
8927         accumulator value as a final argument to conditional functions.
8928         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8929         a define_expand and add an "else" operand.  Assert for now that
8930         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
8931         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8932         (*cond_<optab><mode>): New patterns.
8933         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8934         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8935         (UNSPEC_COND_EOR): Delete.
8936         (optab): Remove associated mappings.
8937         (SVE_INT_BINARY): New code iterator.
8938         (sve_int_op): Remove int attribute and add "minus" to the code
8939         attribute.
8940         (SVE_COND_INT_OP): Delete.
8941         (SVE_COND_FP_OP): Rename to...
8942         (SVE_COND_FP_BINARY): ...this.
8944 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8946         * optabs.c (can_reuse_operands_p): New function.
8947         (maybe_legitimize_operands): Try to reuse the results for
8948         earlier operands.
8950 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8952         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8953         Add {q} suffix to insn mnemonic.
8955 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8957         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8958         (msp430_warn_func_return): New.
8960 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
8962         * fold-const.c (tree_nonzero_bits): New function.
8963         * fold-const.h (tree_nonzero_bits): Likewise.
8964         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8965         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8967 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8969         PR target/85900
8970         PR target/85345
8971         * varasm.c (assemble_alias): Check ifunc_resolver only on
8972         FUNCTION_DECL.
8974 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8976         PR target/85903
8977         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8978         when memory input operand is handled.
8980 2018-05-24  Luis Machado  <luis.machado@linaro.org>
8982         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8983         global.
8984         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8986 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
8988         * match.pd: Delay FMA folds until after vectorization.
8990 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8992         PR target/83009
8993         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8994         address check not strict.
8996 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
8998         * gimple-match.h (gimple_match_op): New class.
8999         (mprts_hook): Replace parameters with a gimple_match_op *.
9000         (maybe_build_generic_op): Likewise.
9001         (gimple_simplified_result_is_gimple_val): Replace parameters with
9002         a const gimple_match_op *.
9003         (gimple_simplify): Replace code_helper * and tree * parameters with
9004         a gimple_match_op * parameter.
9005         (gimple_resimplify1): Replace code_helper *, tree and tree *
9006         parameters with a gimple_match_op * parameter.
9007         (gimple_resimplify2): Likewise.
9008         (gimple_resimplify3): Likewise.
9009         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9010         parameters with a gimple_match_op * parameter.
9011         * gimple-match-head.c (gimple_simplify): Change prototypes of
9012         auto-generated functions to take a gimple_match_op * instead of
9013         separate code_helper * and tree * parameters.  Make the same
9014         change in the top-level overload and update calls to the
9015         gimple_resimplify routines.  Update calls to the auto-generated
9016         functions and to maybe_push_res_to_seq in the publicly-facing
9017         operation-specific gimple_simplify overloads.
9018         (gimple_match_op::MAX_NUM_OPS): Define.
9019         (gimple_resimplify1): Replace rcode and ops with a single res_op
9020         parameter.  Update call to gimple_simplify.
9021         (gimple_resimplify2): Likewise.
9022         (gimple_resimplify3): Likewise.
9023         (mprts_hook): Replace parameters with a gimple_match_op *.
9024         (maybe_build_generic_op): Likewise.
9025         (build_call_internal): Replace type, nargs and ops with
9026         a gimple_match_op *.
9027         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9028         with a single gimple_match_op *.  Update calls to mprts_hook,
9029         build_call_internal and gimple_simplified_result_is_gimple_val.
9030         Factor out code that is common to the tree_code and combined_fn cases.
9031         * genmatch.c (expr::gen_transform): Replace tem_code and
9032         tem_ops with a gimple_match_op called tem_op.  Update calls
9033         to the gimple_resimplify functions and maybe_push_res_to_seq.
9034         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9035         res_ops.  Update call to the gimple_resimplify functions.
9036         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9037         (decision_tree::gen): Make the functions take a gimple_match_op *
9038         called res_op instead of separate res_code and res_ops parameters.
9039         Update call accordingly.
9040         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9041         and ops with a single res_op parameter.  Update calls to
9042         maybe_build_generic_op and maybe_push_res_to_seq.
9043         (fold_stmt_1): Update calls to gimple_simplify and
9044         replace_stmt_with_simplification.
9045         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9046         and gimple_simplified_result_is_gimple_val.
9047         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9048         gimple_simplify.
9049         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9050         with a gimple_match_op *.
9051         (vn_nary_build_or_lookup): Likewise.  Update call to
9052         vn_nary_build_or_lookup_1.
9053         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9054         gimple_match_op *.  Update calls to the gimple_resimplify routines
9055         and to gimple_simplified_result_is_gimple_val.
9056         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9057         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9058         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9059         (visit_nary_op): Likewise.
9060         (visit_reference_op_load): Likewise.
9062 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9064         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9065         modifier for printing the step amount.
9067 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9069         PR target/78849
9070         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9071         types.
9073 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9075         * doc/sourcebuild.texi (Endianness): New subsubsection.
9077 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9079         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9080         <prefetch_dynamic_strides>: New const bool field.
9081         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9082         prefetch_dynamic_strides.
9083         (exynosm1_prefetch_tune): Likewise.
9084         (thunderxt88_prefetch_tune): Likewise.
9085         (thunderx_prefetch_tune): Likewise.
9086         (thunderx2t99_prefetch_tune): Likewise.
9087         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9088         false.
9089         (aarch64_override_options_internal): Update to set
9090         PARAM_PREFETCH_DYNAMIC_STRIDES.
9091         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9092         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9093         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9094         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9095         prefetch-dynamic-strides setting.
9097 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9099         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9100         <minimum_stride>: New const int field.
9101         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9102         minimum_stride field defaulting to -1.
9103         (exynosm1_prefetch_tune): Likewise.
9104         (thunderxt88_prefetch_tune): Likewise.
9105         (thunderx_prefetch_tune): Likewise.
9106         (thunderx2t99_prefetch_tune): Likewise.
9107         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9108         <default_opt_level>: Set to 3.
9109         (aarch64_override_options_internal): Update to set
9110         PARAM_PREFETCH_MINIMUM_STRIDE.
9111         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9112         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9113         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9114         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9115         stride is constant and is below the minimum stride threshold.
9117 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9119         * config/arm/arm-cpus.in (mode26): Delete.
9120         (armv4): Delete mode26 reference.
9121         * config/arm/arm.c (arm_configure_build_target): Delete use of
9122         isa_bit_mode26.
9124 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9126         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9127         New insn pattern.
9128         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9129         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9130         for non-SSE modes.
9131         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9132         (floatunsdidf2): Ditto.
9134 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9136         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9137         (fixuns_trunc<mode>si2_avx512f): Ditto.
9138         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9139         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9140         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9142 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9144         PR rtl-optimization/79985
9145         * df-scan.c (df_insn_refs_collect): Remove special case for
9146         global registers and asm statements.
9148 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9150         * extend.texi (Global Register Variables): Rewrite the bullet list.
9151         Note that the register is available for allocation. Note that access
9152         via inline asm must use constraints. Add note about async-signal
9153         handlers. Remove paragraph about automagic register selection.
9155 2018-05-23  Richard Biener  <rguenther@suse.de>
9157         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9158         of fixed offset from memset VN.
9160 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9162         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9163         first_interp field.
9164         (alloc_cand_and_find_basis): Initialize first_interp field.
9165         (slsr_process_mul): Modify first_interp field.
9166         (slsr_process_add): Likewise.
9167         (slsr_process_cast): Modify first_interp field for each new
9168         interpretation.
9169         (slsr_process_copy): Likewise.
9170         (dump_candidate): Dump first_interp field.
9171         (replace_mult_candidate): Process all interpretations, not just
9172         subsequent ones.
9173         (replace_rhs_if_not_dup): Likewise.
9174         (replace_one_candidate): Likewise.
9176 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9178         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9179         Add new boolean.
9180         (aarch64_needs_frame_chain): New function.
9181         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9183 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9185         PR target/84882
9186         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9187         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9188         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9189         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9190         as true for strict-align.
9191         (aarch64_can_inline_p): Perform checks even when callee has no
9192         attributes to check for strict alignment.
9193         * doc/extend.texi (AArch64 Function Attributes): Document
9194         no-strict-align.
9195         * doc/invoke.texi: (AArch64 Options): Likewise.
9197 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9199         PR tree-optimization/85853
9200         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9201         the handling of the root of the node to...
9202         (vect_slp_analyze_node_operations_1): ...this new function,
9203         and run the whole thing with the child nodes' def types
9204         set according to their SLP node's def type.
9206 2018-05-23  Richard Biener  <rguenther@suse.de>
9208         PR middle-end/85874
9209         * tree-data-ref.c (create_runtime_alias_checks): Defer
9210         and ignore overflow warnings.
9212 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9214         PR tree-optimization/85822
9215         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9216         constants.
9218 2018-05-23  Richard Biener  <rguenther@suse.de>
9220         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9221         memset constants via native_interpret_expr.
9223 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9225         PR target/85345
9226         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9227         attribute.
9228         (cgraph_node::create_alias): Likewise.
9229         (cgraph_node::get_availability): Check ifunc_resolver instead
9230         of looking up ifunc attribute.
9231         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9232         * varasm.c (do_assemble_alias): Likewise.
9233         (assemble_alias): Likewise.
9234         (default_binds_local_p_3): Likewise.
9235         * cgraph.h (cgraph_node): Add ifunc_resolver.
9236         (cgraph_node::only_called_directly_or_aliased_p): Return false
9237         for IFUNC resolver.
9238         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9239         attribute.
9240         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9241         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9242         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9243         instead of looking up ifunc attribute.
9245 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9247         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9249 2018-05-22  Martin Sebor  <msebor@redhat.com>
9251         PR middle-end/85359
9252         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9253         only when expasion succeeds.
9254         (expand_builtin_strcmp): Same.
9255         (expand_builtin_strncmp): Same.
9257 2018-05-22  Martin Sebor  <msebor@redhat.com>
9259         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9261 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9262             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9264         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9265         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9266         code.
9267         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9268         Add check for legitimate_address.
9269         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9270         (aarch64_swap_ldrstr_operands): New.
9271         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9272         Define prototype.
9274 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9275             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9277         * config/aarch64/aarch64.md: New patterns to generate stp
9278         and ldp.
9279         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9280         single words and double words.
9281         (load_pair_sw, load_pair_dw): Likewise.
9282         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9283         Delete.
9284         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9285         Delete.
9286         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9287         for different mode ldpstp and add peephole for merged zero stores.
9288         Likewise for loads.
9289         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9290         Add size check.
9291         (aarch64_gen_store_pair): Rename calls to match new patterns.
9292         (aarch64_gen_load_pair): Rename calls to match new patterns.
9293         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9294         (load_pair<DREG:mode><DREG2:mode>): ... This.
9295         (store_pair<mode>): Rename to...
9296         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9297         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9298         New mode iterators.
9299         (V_INT_EQUIV): Handle SImode.
9300         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9301         New predicate.
9303 2018-05-22  Martin Sebor  <msebor@redhat.com>
9305         PR c/85623
9306         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9307         or ajust the presumed bound on an operation to avoid unnecessary
9308         warnings.
9310 2018-05-22  Martin Sebor  <msebor@redhat.com>
9312         PR tree-optimization/85826
9313         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9314         assuming that a DECL necesarily has a constant size.
9316 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9318         PR middle-end/85862
9319         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9321 2018-05-22  Richard Biener  <rguenther@suse.de>
9323         PR tree-optimization/85834
9324         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9325         non-constant and non-zero memset arguments.
9327 2018-05-22  Martin Liska  <mliska@suse.cz>
9329         PR ipa/85607
9330         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9332 2018-05-22  Richard Biener  <rguenther@suse.de>
9334         PR tree-optimization/85863
9335         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9336         comparisons when vectype is specified.
9337         (vectorizable_condition): Do not specify vectype for
9338         vect_is_simple_cond when SLP vectorizing.
9340 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9342         PR target/85657
9343         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9344         define __ibm128 as long double.
9345         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9346         as a distinct type when IEEE 128-bit support is enabled.
9347         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9348         128-bit types to use the correct functions.
9349         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9350         convert between 128-bit floating point types that have different
9351         modes but the same representation, instead of using gen_lowpart to
9352         makean alias.
9353         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9354         KFmode.
9355         (IFKF_reg): New attributes to give the register constraints for
9356         IFmode and KFmode.
9357         (extend<mode>tf2_internal): New insns to mark an explicit
9358         conversion between 128-bit floating point types that have a
9359         different mode but share the same representation.
9361 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9363         PR tree-optimization/85814
9364         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9365         a null return from get_strinfo when unsharing the next
9366         strinfo in the chain.
9368 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9370         PR gcc/84923
9371         * varasm.c (weak_finish): Clean up weak_decls.
9373 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9375         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9376         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9377         UNSPEC_UADALP values.
9378         * config/aarch64/iterators.md (ABAL): New int iterator.
9379         (ABDL2): Likewise.
9380         (ADALP): Likewise.
9381         (sur): Add mappings for the above.
9382         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9383         New define_insn.
9384         (aarch64_<sur>abal<mode>_4): Likewise.
9385         (aarch64_<sur>adalp<mode>_3): Likewise.
9386         (<sur>sadv16qi): New define_expand.
9388 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9390         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9391         (*movdf_internal): Ditto.
9392         (*rcpsf2_sse): Ditto.
9393         (*rsqrtsf2_sse): Ditto.
9394         (*sqrt<mode>2_sse): Ditto.
9396 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9398         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9399         eor3q<mode>4.
9400         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9401         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9402         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9403         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9404         vbcaxq_s64): New.
9405         * config/aarch64/arm_neon.h: Likewise.
9406         * config/aarch64/iterators.md (VQ_I): New.
9408 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9410         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9411         arc*-*-linux*.
9412         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9413         MULTILIB_DIRNAMES
9415 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9417         * config/nds32/constraints.md (S): New constraint.
9418         * config/nds32/nds32.md (call_internal): Use constraint S.
9419         (call_value_internal): Likewise.
9420         (sibcall_internal): Likewise.
9421         (sibcall_value_internal): Likewise.
9423 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9424             Chung-Ju Wu  <jasonwucj@gmail.com>
9426         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9427         into consideration.
9429 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9430             Chung-Ju Wu  <jasonwucj@gmail.com>
9432         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9433         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9434         (nds32_rtx_costs_impl): Simplify.
9435         (nds32_address_cost_impl): Simplify.
9436         (nds32_init_rtx_costs): New function.
9437         (nds32_rtx_costs_speed_prefer): Likewise.
9438         (nds32_rtx_costs_size_prefer): Likewise.
9439         (nds32_address_cost_speed_prefer): Likewise.
9440         (nds32_address_cost_speed_fwprop): Likewise.
9441         (nds32_address_cost_size_prefer): Likewise.
9442         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9443         * config/nds32/nds32.c (nds32_option_override): Use
9444         nds32_init_rtx_costs function.
9446 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9448         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9449         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9450         (TARGET_PIPELINE_N8): Likewise.
9451         (TARGET_PIPELINE_N10): Likewise.
9452         (TARGET_PIPELINE_N13): Likewise.
9453         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9455 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9457         * config/nds32/nds32-fpu.md: Update copyright year.
9459 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9461         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9463 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9465         * config/nds32/nds32.c
9466         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9467         * config/nds32/nds32.opt (minline-asm-r15): New option.
9469 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9471         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9472         MASK_HW_ABS.
9473         * config/nds32/nds32.md (abssi2): New pattern.
9475 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9477         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9478         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9479         Merge insn pattern from sse_cvtsi2ss<round_name> and
9480         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9481         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9482         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9483         using SWI48 mode iterator.
9484         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9485         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9486         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9487         pattern from sse_cvttss2si<round_saeonly_name>
9488         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9489         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9490         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9491         using SWI48 mode iterator.
9492         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9493         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9494         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9495         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9496         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9497         using SWI48 mode iterator.
9498         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9499         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9500         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9501         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9502         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9503         SWI48 mode iterator.
9504         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9505         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9506         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9507         pattern from sse_cvttsd2si<round_saeonly_name>
9508         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9510 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9512         * config/nds32/nds32-md-auxiliary.c
9513         (nds32_valid_smw_lwm_base_p): Refine.
9514         (nds32_output_smw_single_word): Refine.
9515         (nds32_output_smw_double_word): New.
9516         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9518 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9520         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9521         (nds32_output_stack_pop): Refine.
9522         (nds32_expand_unaligned_load): Refine.
9523         (nds32_expand_unaligned_store): Refine.
9525 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9526             Chung-Ju Wu  <jasonwucj@gmail.com>
9528         * config/nds32/constants.md: Add TP_REGNUM constant.
9529         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9530         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9531         UNSPEC_ADD32.
9532         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9533         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9534         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9535         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9536         and PIC code generation.
9537         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9538         code generation.
9539         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9540         optimization.
9541         * config/nds32/nds32.md: Support TLS and PIC.
9542         * config/nds32/nds32.c: Support TLS and PIC.
9543         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9544         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9545         predicate.
9547 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9549         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9550         mode with E_ prefix.
9552 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9553             Chung-Ju Wu  <jasonwucj@gmail.com>
9555         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9556         * config/nds32/nds32-md-auxiliary.c
9557         (symbolic_reference_mentioned_p): New.
9558         (nds32_legitimize_ict_address): New.
9559         (nds32_expand_ict_move): New.
9560         (nds32_indirect_call_referenced_p): New.
9561         (nds32_symbol_binds_local_p): Delete.
9562         (nds32_long_call_p): Modify.
9563         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9564         * config/nds32/nds32-protos.h
9565         (symbolic_reference_mentioned_p): Declare.
9566         (nds32_legitimize_ict_address): Declare.
9567         (nds32_expand_ict_move): Declare.
9568         (nds32_indirect_call_referenced_p): Declare.
9569         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9570         (nds32_relax_group): Use nds32_ict_const_p as condition.
9571         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9572         (nds32_asm_file_start): Output ict_model directive in asm code.
9573         (nds32_legitimate_address_p): Consider indirect call.
9574         (nds32_print_operand): Consider indirect call.
9575         (nds32_print_operand_address): Consider indirect call.
9576         (nds32_insert_attributes): Handle "indirect_call" attribute.
9577         (TARGET_LEGITIMATE_ADDRESS_P): Define.
9578         (TARGET_LEGITIMATE_CONSTANT_P): Define.
9579         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9580         (TARGET_DELEGITIMIZE_ADDRESS): Define.
9581         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9582         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9583         (TARGET_ICT_MODEL_SMALL): Define.
9584         (TARGET_ICT_MODEL_LARGE): Define.
9585         * config/nds32/nds32.md (movsi): Consider ict model.
9586         (call, call_value): Consider ict model.
9587         (sibcall, sibcall_value): Consider ict model.
9588         * config/nds32/nds32.opt (mict-model): New option.
9589         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9590         model.
9592 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
9593             Monk Chiang  <sh.chiang04@gmail.com>
9594             Jim Wilson <jimw@sifive.com>
9596         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9597         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
9598         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9599         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9600         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
9601         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9602         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9603         compute save_libcall_adjustment properly.
9604         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9605         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9606         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9607         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9608         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9609         (ABI_SPEC): Handle mabi=ilp32e.
9610         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9611         (RVE): Add RVE mask.
9612         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9613         <-march>: Add rv32e as an example.
9615 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
9617         PR c++/82899
9618         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9619         (intra_create_variable_infos): Handle C++ constructors.
9621 2018-05-18  Martin Liska  <mliska@suse.cz>
9623         * passes.def: Remove a redundant pass.
9625 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9627         PR bootstrap/85838
9628         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9630 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9632         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9633         (ARMv4): Update.
9634         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9635         (ARMv6m): Update.
9636         (armv2, armv2a, armv3, armv3m): Delete architectures.
9637         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9638         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9639         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9640         Delete cpus.
9641         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9642         (*mulsidi3adddi): Likewise.
9643         (mulsidi3): Likewise.
9644         (*mulsidi3_nov6): Likewise.
9645         (umulsidi3): Likewise.
9646         (umulsidi3_nov6): Likewise.
9647         (umaddsidi4): Likewise.
9648         (*umulsidi3adddi): Likewise.
9649         (smulsi3_highpart): Likewise.
9650         (*smulsi3_highpart_nov6): Likewise.
9651         (umulsi3_highpart): Likewise.
9652         (*umulsi3_highpart_nov6): Likewise.
9653         * config/arm/arm.h (arm_arch3m): Delete.
9654         * config/arm/arm.c (arm_arch3m): Delete.
9655         (arm_option_override_internal): Update armv3-related comment.
9656         (arm_configure_build_target): Delete use of isa_bit_mode32.
9657         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9658         (arm_rtx_costs_internal): Delete check of arm_arch3m.
9659         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9660         (mulsa3): Likewise.
9661         (mulusa3): Likewise.
9662         * config/arm/arm-protos.h (arm_arch3m): Delete.
9663         * config/arm/arm-tables.opt: Regenerate.
9664         * config/arm/arm-tune.md: Likewise.
9665         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9666         deleted architectures.
9668 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9670         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9671         (armv5t, armv5te): New features.
9672         (ARMv5, ARMv5e): Delete fgroups.
9673         (ARMv5t, ARMv5te): Adjust for above changes.
9674         (ARMv6m): Likewise.
9675         (armv5, armv5e): Delete arches.
9676         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9677         arm_arch5.
9678         (*call_reg_arm): Likewise.
9679         (*call_value_reg_armv5): Likewise.
9680         (*call_value_reg_arm): Likewise.
9681         (*call_symbol): Likewise.
9682         (*call_value_symbol): Likewise.
9683         (*sibcall_insn): Likewise.
9684         (*sibcall_value_insn): Likewise.
9685         (clzsi2): Likewise.
9686         (prefetch): Likewise.
9687         (define_split and define_peephole2 dependent on arm_arch5):
9688         Likewise.
9689         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9690         arm_arch5e.
9691         (TARGET_ARM_QBIT): Likewise.
9692         (TARGET_DSP_MULTIPLY): Likewise.
9693         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9694         (arm_arch5, arm_arch5e): Delete.
9695         (arm_arch5t, arm_arch5te): Declare.
9696         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9697         (arm_arch5t): Declare.
9698         (arm_option_reconfigure_globals): Update for the above.
9699         (arm_options_perform_arch_sanity_checks): Update comment, replace
9700         use of arm_arch5 with arm_arch5t.
9701         (use_return_insn): Likewise.
9702         (arm_emit_call_insn): Likewise.
9703         (output_return_instruction): Likewise.
9704         (arm_final_prescan_insn): Likewise.
9705         (arm_coproc_builtin_available): Likewise.
9706         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9707         arm_arch5e with arm_arch5t and arm_arch5te.
9708         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9709         (arm_arch5t, arm_arch5te): Declare.
9710         * config/arm/arm-tables.opt: Regenerate.
9711         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9712         * config/arm/t-multilib: Likewise.
9713         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9714         instead of arm_arch5.
9715         (*call_reg_thumb1): Likewise.
9716         (*call_value_reg_thumb1_v5): Likewise.
9717         (*call_value_reg_thumb1): Likewise.
9718         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9719         unreachable path.
9720         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9722 2018-05-18  Martin Liska  <mliska@suse.cz>
9724         PR gcov-profile/84846
9725         * doc/gcov.texi: Document -t option of gcov tool.
9727 2018-05-18  Martin Liska  <mliska@suse.cz>
9729         PR gcov-profile/84846
9730         * gcov.c (print_usage): Add new -t option.
9731         (process_args): Handle the option.
9732         (generate_results): Use stdout as output when requested by
9733         the option.
9735 2018-05-18  Martin Liska  <mliska@suse.cz>
9737         PR gcov-profile/84846
9738         * coverage.c (coverage_init): Write PWD to .gcno file.
9739         * doc/gcov.texi: Document how working directory is printed.
9740         * gcov-dump.c (dump_gcov_file): Print PWD.
9741         * gcov.c (output_intermediate_file): Likewise.
9742         (read_graph_file): Read PWD string.
9743         (output_lines): Print PWD.
9745 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9747         PR middle-end/85817
9748         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9749         for retval and return false if all args to phi are zero.
9751 2018-05-18  Richard Biener  <rguenther@suse.de>
9753         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9754         method.
9755         (evrp_dom_walker::before_dom_children): Call it.
9757 2018-05-18  Richard Biener  <rguenther@suse.de>
9759         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9760         results when processing array refs with variable index.
9762 2018-05-18  Toon Moene  <toon@moene.org>
9764         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9765         directly after that of -floop-interchange. Indicate that both
9766         options are enabled by default when specifying -O3.
9768 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9770         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9771         iterator.  Delete separate integer-mode vec_set<mode> expander.
9772         (aarch64_simd_vec_setv2di): Delete.
9773         (vec_setv2di): Delete.
9774         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9775         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
9776         the "w, r" alternative.
9778 2018-05-18  Martin Liska  <mliska@suse.cz>
9780         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9781         * tree-pass.h (make_pass_lower_switch_O0): New function.
9782         * tree-switch-conversion.c (node_has_low_bound): Remove.
9783         (node_has_high_bound): Likewise.
9784         (node_is_bounded): Likewise.
9785         (class pass_lower_switch): Make it a template type and create
9786         two instances.
9787         (pass_lower_switch::execute): Add template argument.
9788         (make_pass_lower_switch): New function.
9789         (make_pass_lower_switch_O0): New function.
9790         (do_jump_if_equal): Remove.
9791         (emit_case_nodes): Simplify to just handle all 3 cases and leave
9792         all the hard work to tree optimization passes.
9794 2018-05-18  Martin Liska  <mliska@suse.cz>
9796         * dbgcnt.c (limit_low): Renamed from limit.
9797         (limit_high): New variable.
9798         (dbg_cnt_is_enabled): Check for upper limit.
9799         (dbg_cnt): Adjust dumping.
9800         (dbg_cnt_set_limit_by_index): Add new argument for high
9801         value.
9802         (dbg_cnt_set_limit_by_name): Likewise.
9803         (dbg_cnt_process_single_pair): Parse new format.
9804         (dbg_cnt_process_opt): Use strtok.
9805         (dbg_cnt_list_all_counters): Remove 'value' and add
9806         'limit_high'.
9807         * doc/invoke.texi: Document changes.
9809 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
9811         * doc/sourcebuild.texi (scalar_all_fma): Document.
9812         * tree.def (FMA_EXPR): Delete.
9813         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9814         * internal-fn.c (ternary_direct): New macro.
9815         (expand_ternary_optab_fn): Likewise.
9816         (direct_ternary_optab_supported_p): Likewise.
9817         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9818         * builtins.c (fold_builtin_fma): Delete.
9819         (fold_builtin_3): Don't call it.
9820         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9821         * expr.c (expand_expr_real_2): Likewise.
9822         * fold-const.c (operand_equal_p): Likewise.
9823         (fold_ternary_loc): Likewise.
9824         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9825         * gimple.c (DEFTREECODE): Likewise.
9826         * gimplify.c (gimplify_expr): Likewise.
9827         * optabs-tree.c (optab_for_tree_code): Likewise.
9828         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9829         * tree-eh.c (operation_could_trap_p): Likewise.
9830         (stmt_could_throw_1_p): Likewise.
9831         * tree-inline.c (estimate_operator_cost): Likewise.
9832         * tree-pretty-print.c (dump_generic_node): Likewise.
9833         (op_code_prio): Likewise.
9834         * tree-ssa-loop-im.c (stmt_cost): Likewise.
9835         * tree-ssa-operands.c (get_expr_operands): Likewise.
9836         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9837         * fold-const-call.h (fold_fma): Delete.
9838         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9839         CFN_FNMA and CFN_FNMS.
9840         (fold_fma): Delete.
9841         * genmatch.c (combined_fn): New enum.
9842         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9843         (commutative_op): New function.
9844         (commutate): Use it.  Handle more than 2 operands.
9845         (dt_operand::gen_gimple_expr): Use commutative_op.
9846         (parser::parse_expr): Allow :c to be used with non-binary
9847         operators if the commutative operand is known.
9848         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9849         CFN_FMS, CFN_FNMA and CFN_FNMS.
9850         (backprop::process_assign_use): Remove FMA_EXPR handling.
9851         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9852         (gen_hsa_fma): New function.
9853         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9854         IFN_FNMA and IFN_FNMS.
9855         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9856         * gimple-fold.h (follow_all_ssa_edges): Declare.
9857         * gimple-fold.c (follow_all_ssa_edges): New function.
9858         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9859         gimple_build interface and use follow_all_ssa_edges to fold the result.
9860         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9861         instead of checking for optabs directly.
9862         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9863         rather than FMA_EXPRs.
9864         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9865         call to IFN_FMA instead of an FMA_EXPR.
9867 2018-05-17  Jim Wilson  <jimw@sifive.com>
9869         * expr.c (do_tablejump): When converting index to Pmode, if we have a
9870         sign extended promoted subreg, and the range does not have the sign bit
9871         set, then do a sign extend.
9873         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9874         test, check for sign extended subreg and/or constant operands, and
9875         do a sign extend in that case.
9877 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
9879         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9880         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9881         Add untyped.
9882         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9883         Change logics_shift_reg to logics_shift_imm.
9884         (thunderx2t99_fp_loadpair_basic): Delete.
9885         (thunderx2t99_fp_storepair_basic): Delete.
9886         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9887         (thunderx2t99_asimd_polynomial): Delete.
9888         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9889         and neon_fp_mul_d_scalar_q.
9890         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9891         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9892         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9893         (thunderx2t99_asimd_lut): Add missing tbl types.
9894         (thunderx2t99_asimd_ext): Delete.
9895         (thunderx2t99_asimd_load1_1_mult): Delete.
9896         (thunderx2t99_asimd_load1_2_mult): Delete.
9897         (thunderx2t99_asimd_load1_ldp): New.
9898         (thunderx2t99_asimd_load1): New.
9899         (thunderx2t99_asimd_load2): Add missing *load2* types.
9900         (thunderx2t99_asimd_load3): New.
9901         (thunderx2t99_asimd_load4): New.
9902         (thunderx2t99_asimd_store1_1_mult): Delete.
9903         (thunderx2t99_asimd_store1_2_mult): Delete.
9904         (thunderx2t99_asimd_store2_mult): Delete.
9905         (thunderx2t99_asimd_store2_onelane): Delete.
9906         (thunderx2t99_asimd_store_stp): New.
9907         (thunderx2t99_asimd_store1): New.
9908         (thunderx2t99_asimd_store2): New.
9909         (thunderx2t99_asimd_store3): New.
9910         (thunderx2t99_asimd_store4): New.
9912 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
9914         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9915         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
9917 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
9918             Segher Boessenkool  <segher@kernel.crashing.org>
9920         PR target/85698
9921         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9922         operand.
9924 2018-05-17  Richard Biener  <rguenther@suse.de>
9926         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9927         for pruning loop and prune defs feeding only already visited PHIs.
9929 2018-05-17  Richard Biener  <rguenther@suse.de>
9931         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9933 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
9934             Richard Biener  <rguenther@suse.de>
9936         PR tree-optimization/85793
9937         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9938         for VMAT_ELEMENTWISE.
9940 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9942         * internal-fn.h (lookup_internal_fn): Declare
9943         * internal-fn.c (lookup_internal_fn): New function.
9944         * gimple.c (gimple_build_call_from_tree): Handle calls to
9945         internal functions.
9946         * gimple-pretty-print.c (dump_gimple_call): Print "." before
9947         internal function names.
9948         * tree-pretty-print.c (dump_generic_node): Likewise.
9949         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9951 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9953         * gimple-fold.h (gimple_build): Make the function forms take
9954         combined_fn rather than built_in_function.
9955         (gimple_simplify): Likewise.
9956         * gimple-match-head.c (gimple_simplify): Likewise.
9957         * gimple-fold.c (gimple_build): Likewise.
9958         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9959         rather than gimple_build_call_internal.
9960         (get_initial_defs_for_reduction): Likewise.
9961         (vect_create_epilog_for_reduction): Likewise.
9962         (vectorizable_live_operation): Likewise.
9964 2018-05-17  Martin Liska  <mliska@suse.cz>
9966         * gimple-ssa-sprintf.c (format_directive): Do not use
9967         space in between 'G_' and '('.
9969 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
9971         PR target/85323
9972         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9973         even if the mask is not all ones.
9975         PR target/85323
9976         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9977         vector.
9978         (ix86_gimple_fold_builtin): Likewise.
9980         PR target/85323
9981         * config/i386/i386.c: Include tree-vector-builder.h.
9982         (ix86_vector_shift_count): New function.
9983         (ix86_fold_builtin): Fold shift builtins by scalar count.
9984         (ix86_gimple_fold_builtin): Likewise.
9986         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9987         _mm512_setzero): New intrinsics.
9989 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
9990             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9992         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9993         code generation for cases where splatting a value is not useful.
9994         * simplify-rtx.c (simplify_ternary_operation): Simplify
9995         vec_merge across a vec_duplicate and a paradoxical subreg forming
9996         a vector mode to a vec_concat.
9998 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10000         * config.gcc: Support "goldmont-plus".
10001         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10002         "goldmont-plus".
10003         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10004         PROCESSOR_GOLDMONT_PLUS.
10005         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10006         (processor_target_table): Add "goldmont-plus".
10007         (PTA_GOLDMONT_PLUS): Define.
10008         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10009         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10010         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10011         (fold_builtin_cpu): Add "goldmont-plus".
10012         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10013         (ix86_option_override_internal): Add "goldmont-plus".
10014         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10015         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10016         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10017         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10019 2018-05-17  Richard Biener  <rguenther@suse.de>
10021         PR tree-optimization/85757
10022         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10023         remove defs that only feed that PHI from further processing.
10025 2018-05-16  Jim Wilson  <jimw@sifive.com>
10027         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10028         asterisk to name.
10029         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10031 2018-05-16  Mark Wielaard  <mark@klomp.org>
10033         * dwarf2out.c (count_index_strings): New function.
10034         (output_indirect_strings): Call count_index_strings and generate
10035         header for dwarf_version >= 5.
10037 2018-05-16  Mark Wielaard  <mark@klomp.org>
10039         * dwarf2out.c (dwarf_FORM): New function.
10040         (set_indirect_string): Use dwarf_FORM.
10041         (reset_indirect_string): Likewise.
10042         (size_of_die): Likewise.
10043         (value_format): Likewise.
10044         (output_die): Likewise.
10045         (add_skeleton_AT_string): Likewise.
10046         (output_macinfo_op): Likewise.
10047         (index_string): Likewise.
10048         (output_index_string_offset): Likewise.
10049         (output_index_string): Likewise.
10050         (count_index_strings): Likewise.
10052 2018-05-16  Carl Love  <cel@us.ibm.com>
10054         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10055         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10057 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10059         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10060         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10062 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10064         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10065         (fnma<mode>4): Likewise.
10066         (fms<mode>4): Likewise.
10067         (fnms<mode>4): Likewise.
10068         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10069         (aarch64_fnma<mode>4): Likewise.
10070         (aarch64_fms<mode>4): Likewise.
10071         (aarch64_fnms<mode>4): Likewise.
10072         (aarch64_fnmadd<mode>4): Likewise.
10074 2018-05-16  Jason Merrill  <jason@redhat.com>
10076         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10078 2018-05-16  Richard Biener  <rguenther@suse.de>
10080         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10081         (dump_stmt_cost): Declare.
10082         (add_stmt_cost): Dump cost we add.
10083         (add_stmt_costs): New function.
10084         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10085         No longer exported.
10086         (vect_analyze_stmt): Adjust prototype.
10087         (vectorizable_condition): Likewise.
10088         (vectorizable_live_operation): Likewise.
10089         (vectorizable_reduction): Likewise.
10090         (vectorizable_induction): Likewise.
10091         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10092         cost vector to pass to vectorizable_ and record afterwards.
10093         (vect_model_reduction_cost): Take cost vector argument and adjust.
10094         (vect_model_induction_cost): Likewise.
10095         (vectorizable_reduction): Likewise.
10096         (vectorizable_induction): Likewise.
10097         (vectorizable_live_operation): Likewise.
10098         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10099         SLP_TREE_NUMBER_OF_VEC_STMTS.
10100         (vect_analyze_slp_cost_1): Remove.
10101         (vect_analyze_slp_cost): Likewise.
10102         (vect_slp_analyze_node_operations): Take visited args and
10103         a target cost vector.  Avoid processing already visited stmt sets.
10104         (vect_slp_analyze_operations): Use a local cost vector to gather
10105         costs and register those of non-discarded instances.
10106         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10107         (vect_schedule_slp_instance): Remove copying of
10108         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10109         zero.
10110         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10111         adding cost.  Record cost entry location.
10112         (vect_prologue_cost_for_slp_op): Function to compute cost of
10113         a constant or invariant generated for SLP vect in the prologue,
10114         split out from vect_analyze_slp_cost_1.
10115         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10116         (vect_model_promotion_demotion_cost): Likewise.
10117         (vect_model_store_cost): Likewise, make static.
10118         (vect_model_load_cost): Likewise.
10119         (vectorizable_bswap): Add cost vector arg and adjust.
10120         (vectorizable_call): Likewise.
10121         (vectorizable_simd_clone_call): Likewise.
10122         (vectorizable_conversion): Likewise.
10123         (vectorizable_assignment): Likewise.
10124         (vectorizable_shift): Likewise.
10125         (vectorizable_operation): Likewise.
10126         (vectorizable_store): Likewise.
10127         (vectorizable_load): Likewise.
10128         (vectorizable_condition): Likewise.
10129         (vectorizable_comparison): Likewise.
10130         (can_vectorize_live_stmts): Likewise.
10131         (vect_analyze_stmt): Likewise.
10132         (vect_transform_stmt): Adjust calls to vectorizable_*.
10133         * tree-vectorizer.c: Include gimple-pretty-print.h.
10134         (dump_stmt_cost): New function.
10136 2018-05-16  Richard Biener  <rguenther@suse.de>
10138         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10139         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10140         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10141         (check_name): New callback.
10142         (dse_classify_store): Track cycles via a visited bitmap of PHI
10143         defs and simplify handling of in-loop and across loop dead stores
10144         and properly fail for loop-variant refs.  Handle byte-tracking with
10145         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10146         limiting the walk.
10148 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10150         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10151         (vect_get_mask_type_for_stmt): Likewise.
10152         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10153         split out from...
10154         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10155         to determine the statement's vector type and the vector type that
10156         should be used for calculating nunits.  Deal with cases in which
10157         the type has to be deferred.
10158         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10159         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10160         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10161         (vect_determine_vf_for_stmt): New functions, split out from...
10162         (vect_determine_vectorization_factor): ...here.
10163         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10164         (vect_get_mask_type_for_stmt): New functions, split out from
10165         vect_determine_vectorization_factor.
10167 2018-05-16  Richard Biener  <rguenther@suse.de>
10169         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10170         verify the [VEC_]COND_EXPR embedded comparison.
10172 2018-05-15  Martin Sebor  <msebor@redhat.com>
10174         PR tree-optimization/85753
10175         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10176         RECORD_TYPE in addition to ARRAY_TYPE.
10178 2018-05-15  Martin Sebor  <msebor@redhat.com>
10180         PR middle-end/85643
10181         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10183 2018-05-15  Richard Biener  <rguenther@suse.de>
10185         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10186         add by_clobber_p one.  Change algorithm to collect all defs
10187         representing uses we need to walk and try reducing them to
10188         a single one before failing.
10189         (dse_dom_walker::dse_optimize_stmt): Adjust.
10191 2018-05-13  Mark Wielaard  <mark@klomp.org>
10193         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10194         (size_of_loc_descr): Likewise.
10195         (output_loc_operands): Likewise.
10196         (output_loc_operands_raw): Likewise.
10197         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10198         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10199         (hash_loc_operands): Likewise.
10200         (compare_loc_operands): Likewise.
10202 2018-05-14  Mark Wielaard  <mark@klomp.org>
10204         * dwarf2out.c (count_index_addrs): New function.
10205         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10207 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10209         PR tree-optimization/83648
10210         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10211         return value as malloc candidate.
10213 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10215         PR ipa/85734
10216         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10217         param as true in call to suggest_attribute.
10219 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10221         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10222         -mreadonly-in-sdata.
10224 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10226         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10227         New pattern.
10228         (aarch64_crypto_aesd_fused): Likewise.
10230 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10232         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10233         (movsi_aarch64): Likewise.
10234         (load_pairsi): Likewise.
10235         (load_pairdi): Likewise.
10236         (store_pairsi): Likewise.
10237         (store_pairdi): Likewise.
10238         (load_pairsf): Likewise.
10239         (load_pairdf): Likewise.
10240         (store_pairsf): Likewise.
10241         (store_pairdf): Likewise.
10242         (zero_extend): Likewise.
10243         (trunc): Swap alternatives.
10244         (fcvt_target): Add '?' to prefer w over r.
10246 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10248         PR target/85756
10249         * config/i386/i386.md: Disallow non-commutative arithmetics in
10250         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10251         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10252         in the peephole2 before it.
10254 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10256         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10257         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10258         (ix86_handle_option): Handle -mcldemote.
10259         * config.gcc: New header.
10260         * config/i386/cldemoteintrin.h: New file.
10261         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10262         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10263         -mcldemote.
10264         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10265         OPTION_MASK_ISA_CLDEMOTE.
10266         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10267         (ix86_valid_target_attribute_inner_p): Ditto.
10268         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10269         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10270         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10271         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10272         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10273         (cldemote): New.
10274         * config/i386/i386.opt: Add -mcldemote.
10275         * config/i386/x86intrin.h: New header.
10276         * doc/invoke.texi: Add -mcldemote.
10278 2018-05-14  Richard Biener  <rguenther@suse.de>
10280         * doc/match-and-simplify.texi: Adjust :s documentation.
10282 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10284         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10285         intended memcpy size.
10286         (REORDER_45): Likewise.
10288 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10290         * sort.cc: New file.
10291         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10292         * vec.c (qsort_chk): Use gcc_qsort.
10293         * Makefile.in (OBJS-libcommon): Add sort.o.
10294         (build/sort.o): New target.  Use it...
10295         (BUILD_RTL): ... here, and...
10296         (build/gencfn-macros): ... here, and...
10297         (build/genmatch): ... here.
10299 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10300             Chung-Ju Wu  <jasonwucj@gmail.com>
10302         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10303         * config/nds32/nds32-graywolf.md: New file.
10304         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10305         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10306         pipeline.
10307         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10308         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10309         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10310         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10311         * config/nds32/pipelines.md: Include n15 settings.
10313 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10314             Chung-Ju Wu  <jasonwucj@gmail.com>
10316         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10317         * config/nds32/nds32-n13.md: New file.
10318         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10319         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10320         pipeline.
10321         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10322         * config/nds32/nds32.md (pipeline_model): Add n13.
10323         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10324         * config/nds32/pipelines.md: Include n13 settings.
10326 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10327             Chung-Ju Wu  <jasonwucj@gmail.com>
10329         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10330         * config/nds32/nds32-n10.md: New file.
10331         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10332         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10333         pipeline.
10334         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10335         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10336         * config/nds32/nds32.md (pipeline_model): Add n10.
10337         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10338         * config/nds32/pipelines.md: Include n10 settings.
10340 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10341             Kito Cheng  <kito.cheng@gmail.com>
10342             Chung-Ju Wu  <jasonwucj@gmail.com>
10344         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10345         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10346         Add enum values for DSP extension instructions.
10347         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10348         New constraints.
10349         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10350         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10351         New code iterators.
10352         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10353         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10354         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10355         * config/nds32/nds32-intrinsic.md: Likewise.
10356         * config/nds32/nds32_intrinsic.h: Likewise.
10357         * config/nds32/nds32-md-auxiliary.c: Likewise.
10358         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10359         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10360         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10361         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10362         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10363         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10364         TYPE_DMAC in switch statement.
10365         * config/nds32/nds32.c: New checking and implementation for DSP
10366         extension instructions.
10367         * config/nds32/nds32.h: Likewise.
10368         * config/nds32/nds32.md: Likewise.
10369         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10370         * config/nds32/predicates.md: Implement new predicates for DSP
10371         extension.
10373 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10375         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10376         Reformat alternatives and attributes so it is easier to identify
10377         which constraints/attributes go with which instruction.
10378         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10379         (mov<mode>_softfloat32, FMOVE64): Likewise.
10380         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10381         (mov<mode>_softfloat64, FMOVE64): Likewise.
10383 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10385         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10386         subsection.
10387         (Basic PowerPC Built-in Functions): The new name of the
10388         subsection previously known as "PowerPC Built-in Functions".
10389         (Basic PowerPC Built-in Functions Available on all Configurations):
10390         New subsubsection.
10391         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10392         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10393         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10394         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10396 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10398         PR ipa/85655
10399         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10400         single const.
10402 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10404         PR target/85733
10405         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10407 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10409         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10410         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10411         (ix86_handle_option): Handle -mwaitpkg.
10412         * config.gcc: New header.
10413         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10414         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10415         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10416         function type.
10417         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10418         OPTION_MASK_ISA_WAITPKG.
10419         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10420         (ix86_option_override_internal): Add PTA_WAITPKG.
10421         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10422         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10423         IX86_BUILTIN_TPAUSE.
10424         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10425         __builtin_ia32_umwait and __builtin_ia32_tpause.
10426         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10427         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10428         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10429         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10430         UNSPECV_TPAUSE): New.
10431         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10432         * config/i386/i386.opt: Add -mwaitpkg.
10433         * config/i386/waitpkgintrin.h: New file.
10434         * config/i386/x86intrin.h: New header.
10435         * doc/invoke.texi: Add -mwaitpkg.
10437 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10439         PR target/85606
10440         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10441         equivalent.
10442         (cortex-m0): Use armv6s-m isa.
10443         (cortex-m0plus): Likewise.
10444         (cortex-m1): Likewise.
10445         (cortex-m0.small-multiply): Likewise.
10446         (cortex-m0plus.small-multiply): Likewise.
10447         (cortex-m1.small-multiply): Likewise.
10449 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10450             Jakub Jelinek  <jakub@redhat.com>
10452         PR tree-optimization/85692
10453         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10454         source permute as well.
10456 2018-05-11  Martin Liska  <mliska@suse.cz>
10458         PR sanitizer/85556
10459         * doc/extend.texi: Document LLVM style format for no_sanitize
10460         attribute.
10462 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10464         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10465         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10466         (mode_supports_vsx_dform_quad): Likewise.
10467         (mode_supports_vmx_dform): Move these functions to be next to the
10468         other mode_supports functions.
10469         (mode_supports_dq_form): Likewise.
10470         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10471         mode_supports_dq_form.
10472         (reg_offset_addressing_ok_p): Likewise.
10473         (offsettable_ok_by_alignment): Likewise.
10474         (rs6000_legitimate_offset_address_p): Likewise.
10475         (legitimate_lo_sum_address_p): Likewise.
10476         (rs6000_legitimize_address): Likewise.
10477         (rs6000_legitimize_reload_address): Likewise.
10478         (rs6000_secondary_reload_inner): Likewise.
10479         (rs6000_preferred_reload_class): Likewise.
10480         (rs6000_output_move_128bit): Likewise.
10482 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10484         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10485         Generate SImode target register for null target.
10486         <case IX86_BUILTIN_XGETBV>: Ditto.
10487         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10488         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10490 2018-05-10  Carl Love  <cel@us.ibm.com>
10492         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10493         dcbtt and dcbtstt if operands[2] is 0.
10495 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10497         PR target/85693
10498         * config/i386/sse.md (usadv64qi): New expander.
10500 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10502         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10503         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10504         -maltivec=be support.
10505         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10506         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10507         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10508         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10509         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10510         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10511         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10512         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10513         altivec_vsumsws): Adjust.
10514         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10515         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10516         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10517         support.
10518         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10519         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10520         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10521         (altivec_lve<VI_char>x): Delete expand.
10522         (*altivec_lve<VI_char>x_internal): Rename to...
10523         (altivec_lve<VI_char>x): ... this.
10524         (altivec_lvxl_<mode>): Delete expand.
10525         (*altivec_lvxl_<mode>_internal): Rename to ...
10526         (altivec_lvxl_<mode>): ... this.
10527         (altivec_stvxl_<mode>): Delete expand.
10528         (*altivec_stvxl_<mode>_internal): Rename to ...
10529         (altivec_stvxl_<mode>): ... this.
10530         (altivec_stve<VI_char>x): Delete expand.
10531         (*altivec_stve<VI_char>x_internal): Rename to ...
10532         (altivec_stve<VI_char>x): ... this.
10533         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10534         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10535         reduc_plus_scal_<mode>): Adjust.
10536         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10537         comment.
10538         (rs6000_cpu_cpp_builtins): Adjust.
10539         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10540         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10541         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10542         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10543         -maltivec=be support.
10544         (rs6000_split_vec_extract_var): Adjust.
10545         (rs6000_split_v4si_init): Adjust.
10546         (swap_selector_for_mode): Delete.
10547         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10548         altivec_expand_stvex_be): Delete.
10549         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10550         -maltivec=be support.
10551         (rs6000_gimple_fold_builtin): Ditto.
10552         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10553         Adjust.
10554         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10555         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10556         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10557         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10558         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10559         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10560         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10561         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10562         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10563         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10564         anonymous split): Adjust.
10565         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10566         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10568 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
10570         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10571         when --with-gxx-include-dir is also specified.
10572         * configure: Regenerate.
10574 2018-05-09  Jim Wilson  <jimw@sifive.com>
10576         PR target/84797
10577         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10578         * config/riscv/t-withmultilib: New.
10579         * config/riscv/withmultilib.h: New.
10580         * doc/install.texi: Document RISC-V --with-multilib-list support.
10582 2018-05-09  Richard Biener  <rguenther@suse.de>
10584         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10585         vector.
10586         (vect_bb_vectorization_profitable_p): Adjust.  Compute
10587         actual scalar cost using the cost vector and the add_stmt_cost
10588         machinery.
10590 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10592         PR rtl-optimization/85645
10593         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10594         in the REG_CFA_REGISTER note for LR, don't leave it empty.
10596 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10598         PR rtl-optimization/85645
10599         * shrink-wrap.c (spread_components): Return a boolean saying if
10600         anything was changed.
10601         (try_shrink_wrapping_separate): Iterate spread_components until
10602         nothing changes anymore.
10604 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10606         PR rtl-optimization/85645
10607         * regrename.c (build_def_use): Also kill the chains that include the
10608         destination of a REG_CFA_REGISTER note.
10610 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10612         PR rtl-optimization/85645
10613         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10614         insn that has a REG_CFA_REGISTER note.
10616 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
10618         * cfgexpand.c (expand_clobber): New function.
10619         (expand_gimple_stmt_1): Use it.
10620         * tree-vect-stmts.c (vect_clobber_variable): New function,
10621         split out from...
10622         (vectorizable_simd_clone_call): ...here.
10623         (vectorizable_store): Emit a clobber either side of an
10624         IFN_STORE_LANES sequence.
10625         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10627 2018-05-09  Tom de Vries  <tom@codesourcery.com>
10629         PR target/85626
10630         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10631         (define_insn "trap_if_false"): Add exit after trap.
10633 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
10635         PR rtl-optimization/85638
10636         * bb-reorder.c: Include common/common-target.h.
10637         (create_forwarder_block): New function extracted from...
10638         (fix_up_crossing_landing_pad): ...here.  Rename into...
10639         (dw2_fix_up_crossing_landing_pad): ...this.
10640         (sjlj_fix_up_crossing_landing_pad): New function.
10641         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10642         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10643         from both partitions and exit the loop after one iteration.
10645 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10647         Revert:
10648         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10649         subsection.
10650         (Basic PowerPC Built-in Functions): The new name of the
10651         subsection previously known as "PowerPC Built-in Functions".
10652         (Basic PowerPC Built-in Functions Available on all Configurations):
10653         New subsubsection.
10654         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10655         subsubsection.
10656         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10657         subsubsection.
10658         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10659         subsubsection.
10660         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10661         subsubsection.
10663 2018-05-08  Jim Wilson  <jimw@sifive.com>
10665         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10666         (LD_EMUL_SUFFIX): New.
10667         (LINK_SPEC): Use it.
10669 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10671         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10672         subsection.
10673         (Basic PowerPC Built-in Functions): The new name of the
10674         subsection previously known as "PowerPC Built-in Functions".
10675         (Basic PowerPC Built-in Functions Available on all Configurations):
10676         New subsubsection.
10677         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10678         subsubsection.
10679         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10680         subsubsection.
10681         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10682         subsubsection.
10683         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10684         subsubsection.
10686 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10688         PR target/85683
10689         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10690         after cmpelim optimization.
10692 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
10694         * config.gcc: Support "goldmont".
10695         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10696         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10697         PROCESSOR_GOLDMONT.
10698         * config/i386/i386.c (m_GOLDMONT): Define.
10699         (processor_target_table): Add "goldmont".
10700         (PTA_GOLDMONT): Define.
10701         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10702         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10703         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10704         (fold_builtin_cpu): Add "goldmont".
10705         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10706         (ix86_option_override_internal): Add "goldmont".
10707         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10708         (processor_type): Add PROCESSOR_GOLDMONT.
10709         * config/i386/i386.md: Add CPU "glm".
10710         * config/i386/glm.md: New file.
10711         * config/i386/x86-tune.def: Add m_GOLDMONT.
10712         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10714 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10716         PR target/85572
10717         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10718         E_V4DImode.
10719         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10720         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
10721         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
10723         PR target/85317
10724         * config/i386/i386.c (ix86_fold_builtin): Handle
10725         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10727         PR target/85480
10728         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10729         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10731 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
10733         PR target/85658
10734         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10735         (check_arch): Likewise.
10736         (check_fpu): Return the result rather than printing it.
10737         (end arch): Fix operator precedence.
10738         (end cpu): Likewise.
10739         (END): Print the result from check_fpu.
10741 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10742             Alan Hayward  <alan.hayward@arm.com>
10743             David Sherwood  <david.sherwood@arm.com>
10745         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10746         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10747         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10748         (*fcmuo<mode>_and): New patterns.
10750 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10752         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10753         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10754         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10755         (cmp_op, sve_imm_con): New code attributes.
10756         (SVE_COND_INT_CMP, imm_con): Delete.
10757         (cmp_op): Remove above unspecs from int attribute.
10758         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10759         to...
10760         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
10761         comparison-specific unspecs.
10762         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10763         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10764         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10765         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10766         (*vec_fcm<cmp_op><mode>): Rename to...
10767         (*fcm<cmp_op><mode>): ...this and adjust likewise.
10768         (*vec_fcmuo<mode>): Rename to...
10769         (*fcmuo<mode>): ...this and adjust likewise.
10770         (*pred_fcm<cmp_op><mode>): New pattern.
10771         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10772         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10773         functions.
10774         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10775         and UNORDERED.
10776         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10777         (aarch64_emit_sve_predicated_cond): New function.
10778         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10779         (aarch64_emit_unspec_cond_or): Replace with...
10780         (aarch64_emit_sve_or_conds): ...this new function.  Use
10781         aarch64_emit_sve_ptrue_op for the individual comparisons and
10782         aarch64_emit_binop to OR them together.
10783         (aarch64_emit_inverted_unspec_cond): Replace with...
10784         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
10785         aarch64_emit_sve_ptrue_op for the comparison and
10786         aarch64_emit_unop to invert the result.
10787         (aarch64_expand_sve_vec_cmp_float): Update after the above
10788         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
10790 2018-05-07  Nathan Sidwell  <nathan@acm.org>
10792         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10793         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10794         (Backwards Compatibility): Likewise.
10796 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10798         PR bootstrap/85681
10799         Revert:
10800         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10802         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10803         <prefetch_dynamic_strides>: New const bool field.
10804         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10805         prefetch_dynamic_strides.
10806         (exynosm1_prefetch_tune): Likewise.
10807         (thunderxt88_prefetch_tune): Likewise.
10808         (thunderx_prefetch_tune): Likewise.
10809         (thunderx2t99_prefetch_tune): Likewise.
10810         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10811         to false.
10812         (aarch64_override_options_internal): Update to set
10813         PARAM_PREFETCH_DYNAMIC_STRIDES.
10814         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10815         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10816         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10817         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10818         prefetch-dynamic-strides setting.
10820         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10822         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10823         <minimum_stride>: New const int field.
10824         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10825         minimum_stride field.
10826         (exynosm1_prefetch_tune): Likewise.
10827         (thunderxt88_prefetch_tune): Likewise.
10828         (thunderx_prefetch_tune): Likewise.
10829         (thunderx2t99_prefetch_tune): Likewise.
10830         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10831         (aarch64_override_options_internal): Update to set
10832         PARAM_PREFETCH_MINIMUM_STRIDE.
10833         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10834         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10835         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10836         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10837         stride is constant and is below the minimum stride threshold.
10839 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10841         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10842         to 512.
10844 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10846         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10847         <prefetch_dynamic_strides>: New const bool field.
10848         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10849         prefetch_dynamic_strides.
10850         (exynosm1_prefetch_tune): Likewise.
10851         (thunderxt88_prefetch_tune): Likewise.
10852         (thunderx_prefetch_tune): Likewise.
10853         (thunderx2t99_prefetch_tune): Likewise.
10854         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10855         to false.
10856         (aarch64_override_options_internal): Update to set
10857         PARAM_PREFETCH_DYNAMIC_STRIDES.
10858         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10859         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10860         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10861         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10862         prefetch-dynamic-strides setting.
10864 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10866         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10867         <minimum_stride>: New const int field.
10868         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10869         minimum_stride field.
10870         (exynosm1_prefetch_tune): Likewise.
10871         (thunderxt88_prefetch_tune): Likewise.
10872         (thunderx_prefetch_tune): Likewise.
10873         (thunderx2t99_prefetch_tune): Likewise.
10874         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10875         (aarch64_override_options_internal): Update to set
10876         PARAM_PREFETCH_MINIMUM_STRIDE.
10877         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10878         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10879         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10880         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10881         stride is constant and is below the minimum stride threshold.
10883 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
10885         PR c++/85659
10886         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10887         the type is addressable.  Don't force op into register if it has
10888         BLKmode.
10890 2018-05-05  Roland McGrath  <mcgrathr@google.com>
10892         PR other/77609
10893         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10894         any section for which we don't know a specific type it should have,
10895         regardless of name.  Previously this was done only for the exact
10896         names ".init_array", ".fini_array", and ".preinit_array".
10897         (default_elf_asm_named_section): Add comment about
10898         relationship with default_section_type_flags and SECTION_NOTYPE.
10899         (get_section): Don't consider it a type conflict if one side has
10900         SECTION_NOTYPE and the other doesn't, as long as neither has the
10901         SECTION_BSS et al used in the default_section_type_flags logic.
10903 2018-05-05  Tom de Vries  <tom@codesourcery.com>
10905         PR target/85653
10906         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10907         (workaround_barsyncs): New function.
10908         (nvptx_reorg): Use workaround_barsyncs.
10909         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10910         (define_expand "nvptx_membar_cta"): New define_expand.
10911         (define_insn "*nvptx_membar_cta"): New insn.
10913 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
10915         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10916         To improve optimization opportunities.
10917         * builtin-types.def: The new needed builtin types for the above.
10919 2018-05-04  Richard Biener  <rguenther@suse.de>
10921         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10922         * gimple-ssa-store-merging.c
10923         (imm_store_chain_info::output_merged_store): Remove redundant create,
10924         release split_store vector contents on failure.
10925         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10926         scalar stmt vector on cache hit.
10928 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
10930         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10931         Xilinx FP support.
10932         * config.gcc (powerpc-xilinx-eabi*): Remove.
10933         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10934         support.
10935         (fusion_addis_mem_combo_load): Ditto.
10936         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10937         FP support.
10938         (rs6000_cpu_cpp_builtins): Ditto.
10939         * config/rs6000/rs6000-linux.c
10940         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10941         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10942         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10943         support.
10944         (rs6000_setup_reg_addr_masks): Ditto.
10945         (rs6000_init_hard_regno_mode_ok): Ditto.
10946         (rs6000_option_override_internal): Ditto.
10947         (legitimate_lo_sum_address_p): Ditto.
10948         (rs6000_legitimize_address): Ditto.
10949         (rs6000_legitimize_reload_address): Ditto.
10950         (rs6000_legitimate_address_p): Ditto.
10951         (abi_v4_pass_in_fpr): Ditto.
10952         (setup_incoming_varargs): Ditto.
10953         (rs6000_gimplify_va_arg): Ditto.
10954         (rs6000_split_multireg_move): Ditto.
10955         (rs6000_savres_strategy): Ditto.
10956         (rs6000_emit_prologue_components): Ditto.
10957         (rs6000_emit_epilogue_components): Ditto.
10958         (rs6000_emit_prologue): Ditto.
10959         (rs6000_emit_epilogue): Ditto.
10960         (rs6000_elf_file_end): Ditto.
10961         (rs6000_function_value): Ditto.
10962         (rs6000_libcall_value): Ditto.
10963         * config/rs6000/rs6000.h: Ditto.
10964         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10965         (TARGET_MINMAX): ... this.  New.
10966         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10967         * config/rs6000/rs6000.md: Remove Xilinx FP support.
10968         (*movsi_internal1_single): Delete.
10969         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10970         mfpu=, mxilinx-fpu): Delete.
10971         * config/rs6000/singlefp.h: Delete.
10972         * config/rs6000/sysv4.h: Remove Xilinx FP support.
10973         * config/rs6000/t-rs6000: Ditto.
10974         * config/rs6000/t-xilinx: Delete.
10975         * config/rs6000/titan.md: Adjust for fp_type removal.
10976         * config/rs6000/vsx.md: Remove Xilinx FP support.
10977         (VStype_simple): Delete.
10978         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10979         * config/rs6000/xfpu.h: Delete.
10980         * config/rs6000/xfpu.md: Delete.
10981         * config/rs6000/xilinx.h: Delete.
10982         * config/rs6000/xilinx.opt: Delete.
10983         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10984         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10986 2018-05-04  Tom de Vries  <tom@codesourcery.com>
10988         PR libgomp/85639
10989         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10990         if ignore == 0.
10992 2018-05-04  Richard Biener  <rguenther@suse.de>
10994         PR middle-end/85627
10995         * tree-complex.c (update_complex_assignment): We are always in SSA form.
10996         (expand_complex_div_wide): Likewise.
10997         (expand_complex_operations_1): Likewise.
10998         (expand_complex_libcall): Preserve EH info of the original stmt.
10999         (tree_lower_complex): Handle removed blocks.
11000         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11001         on complex multiplication and division libcall builtins.
11003 2018-05-04  Richard Biener  <rguenther@suse.de>
11005         PR middle-end/85574
11006         * fold-const.c (negate_expr_p): Restrict negation of operand
11007         zero of a division to when we know that can happen without
11008         overflow.
11009         (fold_negate_expr_1): Likewise.
11011 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11013         PR libstdc++/85466
11014         * real.h (real_nextafter): Declare.
11015         * real.c (real_nextafter): New function.
11016         * fold-const-call.c (fold_const_nextafter): New function.
11017         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11018         CASE_CFN_NEXTTOWARD.
11019         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11020         even when arg1_mode is different from arg0_mode.
11022 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11024         * doc/extend.texi (Deprecated Features): Remove
11025         -ffriend-injection.
11026         (Backwards Compatibility): Likewise.
11027         * doc/invoke.texi (C++ Language Options): Likewise.
11028         (C++ Dialect Options): Likewise.
11030 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11032         PR target/85530
11033         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11034         _mm512_mask_mullox_epi64): New intrinsics.
11036 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11038         PR testsuite/85106
11039         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11040         dump files): Add offload-tree.
11042 2018-05-03  Richard Biener  <rguenther@suse.de>
11044         PR tree-optimization/85615
11045         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11046         to loops not nested in BBs loop father to avoid creating multi-entry
11047         loops.
11049 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11051         PR tree-optimization/70291
11052         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11053         arguments.  Change return type to tree.  Emit libcall as a new
11054         statement rather than replacing existing one when inplace_p is true.
11055         (expand_complex_multiplication_components): New function.
11056         (expand_complex_multiplication): Expand floating-point complex
11057         multiplication using the above.
11058         (expand_complex_division): Rename inner_type parameter to type.
11059         Update expand_complex_libcall call-site.
11060         (expand_complex_operations_1): Update expand_complex_multiplication
11061         and expand_complex_division call-sites.
11063 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11065         PR target/85582
11066         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11067         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11068         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11069         the highest significant bit of the shift count mask is clear.  In
11070         check whether and[sq]i3 is needed verify that all significant bits
11071         of the shift count other than the highest are set.
11073 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11075         PR libgomp/82428
11076         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11077         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11078         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11079         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11080         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11081         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11082         __builtin_goacc_parlevel_size.
11084 2018-05-02  Richard Biener  <rguenther@suse.de>
11086         PR tree-optimization/85597
11087         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11088         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11089         directly.
11091 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11093         PR testsuite/85106
11094         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11095         dump files): Add ltrans-tree.
11097 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11099         PR testsuite/85106
11100         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11101         dump files): Add wpa-ipa.
11103 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11105         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11106         powerpc*-*-linux*paired* target.
11107         * config/rs6000/750cl.h: Delete.
11108         * config/rs6000/paired.h: Delete.
11109         * config/rs6000/paired.md: Delete.
11110         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11111         float support.
11112         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11113         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11114         comment.  Remove paired float support.
11115         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11116         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11117         VECTOR_PAIRED.
11118         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11119         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11120         declarations.
11121         * config/rs6000/rs6000.c: Remove paired float support.
11122         (paired_expand_vector_init, paired_expand_vector_move,
11123         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11124         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11125         paired_expand_builtin, paired_expand_predicate_builtin,
11126         paired_init_builtins): Delete.
11127         * config/rs6000/rs6000.h: Remove paired float support.
11128         * config/rs6000/rs6000.md: Remove paired float support.
11129         (move_from_CR_ov_bit): Delete.
11130         * config/rs6000/rs6000.opt (mpaired): Delete.
11131         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11132         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11134 2018-05-02  Richard Biener  <rguenther@suse.de>
11136         PR middle-end/85567
11137         * gimplify.c (gimplify_save_expr): When in SSA form allow
11138         SAVE_EXPRs to compute to SSA vars.
11140 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11142         PR target/85582
11143         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11144         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11145         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11146         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11148 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11150         PR tree-optimization/85586
11151         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11152         exit early for statements in the same group if the accesses are
11153         not strided.
11155 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11157         PR lto/85451
11158         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11159         error message.
11161 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11163         PR tree-optimization/85143
11164         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11166 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11168         PR lto/85451
11169         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11170         not found" error message.
11172 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11174         PR other/83786
11175         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11176         * vec.c (test_ordered_remove_if): New function.
11177         (vec_c_tests): Call test_ordered_remove_if.
11178         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11179         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11180         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11181         VEC_ORDERED_REMOVE_IF.
11183 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11185         PR tree-optimization/82665
11186         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11187         pointer subtraction where arguments come from a memchr call.
11189 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11191         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11192         --push-state --as-needed and --pop-state instead of --as-needed and
11193         --no-as-needed if ld supports it.
11194         * configure: Regenerated.
11196         PR web/85578
11197         * doc/install.texi2html: Replace _002d with - and _002a with * in
11198         generated html files using sed.
11200 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11202         PR c++/85523
11203         * gcc-rich-location.c (blank_line_before_p): New function.
11204         (use_new_line): New function.
11205         (gcc_rich_location::add_fixit_insert_formatted): New function.
11206         * gcc-rich-location.h
11207         (gcc_rich_location::add_fixit_insert_formatted): New function.
11209 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11211         * selftest.c (assert_streq): Rename "expected" and "actual" to
11212         "val1" and "val2".  Extend NULL-handling to cover both inputs
11213         symmetrically, while still requiring both to be non-NULL for a pass.
11214         * selftest.h (assert_streq): Rename "expected" and "actual" to
11215         "val1" and "val2".
11216         (ASSERT_EQ): Likewise.
11217         (ASSERT_EQ_AT): Likewise.
11218         (ASSERT_KNOWN_EQ): Likewise.
11219         (ASSERT_KNOWN_EQ_AT): Likewise.
11220         (ASSERT_NE): Likewise.
11221         (ASSERT_MAYBE_NE): Likewise.
11222         (ASSERT_MAYBE_NE_AT): Likewise.
11223         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11224         the assertion to pass.
11225         (ASSERT_STREQ_AT): Likewise.
11227 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11229         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11230         interaction with -pie.
11232 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11234         * selftest.h: Fix alphabetization of per-source-file selftest
11235         declarations.
11237 2018-04-30  Jason Merrill  <jason@redhat.com>
11239         PR c++/61982 - dead stores to destroyed objects.
11240         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11241         of clobber.
11243 2018-04-30  Jason Merrill  <jason@redhat.com>
11245         * tree.c (build_clobber): New.
11246         * tree.h: Declare it.
11247         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11249 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11251         * diagnostic-show-locus.c (layout::layout): Update for
11252         location_get_source_line returning a char_span.
11253         (struct char_span): Move to input.h.
11254         (struct correction): Update for fields in char_span becoming
11255         private.
11256         (struct source_line): Update for location_get_source_line
11257         returning a char_span.
11258         (layout::print_line): Likewise.
11259         * edit-context.c (edited_file::print_content): Likewise.
11260         (edited_file::print_diff_hunk): Likewise.
11261         (edited_file::print_run_of_changed_lines): Likewise.
11262         (edited_file::get_num_lines): Likewise.
11263         (edited_line::edited_line): Likewise.
11264         * final.c (asm_show_source): Likewise.
11265         * input.c (location_get_source_line): Convert return type
11266         from const char * to char_span, losing the final "line_len"
11267         param.
11268         (dump_location_info): Update for the above.
11269         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11270         when handling the literal within the line.
11271         (test_reading_source_line): Update for location_get_source_line
11272         returning a char_span.
11273         * input.h (class char_span): Move here from
11274         diagnostic-show-locus.c, converting from a struct to a class.
11275         Make data members private.
11276         (char_span::operator bool): New.
11277         (char_span::length): New.
11278         (char_span::get_buffer): New.
11279         (char_span::operator[]): New.
11280         (char_span::subspan): Make const.
11281         (char_span::xstrdup): New.
11282         (location_get_source_line): Convert return type from const char *
11283         to char_span, losing the final "line_size" param.
11285 2018-04-30  Jan Hubicka  <jh@suse.cz>
11287         * lto-wrapper.c (ltrans_priorities): New static var.
11288         (cmp_priority): New.
11289         (run_gcc): Read priorities and if doing parallel build order
11290         the Makefile by them.
11292 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11294         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11296 2018-04-30  Richard Biener  <rguenther@suse.de>
11298         * tree-cfg.c (verify_address): Remove base argument, add
11299         flag whether to check TREE_ADDRESSABLE and do that.
11300         (verify_expr): Remove.
11301         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11302         (verify_gimple_assign_single): Likewise.
11303         (verify_gimple_switch): Likewise.
11304         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11305         piece from verify_expr.
11306         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11308 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11310         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11312 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11314         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11315         (small_data_pattern): Likewise.
11316         (arc_rewrite_small_data): Likewise.
11317         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11318         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11319         (get_symbol_alignment): New function.
11320         (legitimate_small_data_address_p): Likewise.
11321         (legitimate_scaled_address): Update, call
11322         legitimate_small_data_address_p.
11323         (output_sdata): New static variable.
11324         (arc_print_operand): Update how we handle small data operands.
11325         (arc_print_operand_address): Likewise.
11326         (arc_legitimate_address_p): Update, use
11327         legitimate_small_data_address_p.
11328         (arc_rewrite_small_data_p): Remove.
11329         (arc_rewrite_small_data_1): Likewise.
11330         (arc_rewrite_small_data): Likewise.
11331         (small_data_pattern): Likewise.
11332         (compact_sda_memory_operand): Update to use
11333         legitimate_small_data_address_p and get_symbol_alignment.
11334         (prepare_move_operands): Don't rewite sdata pattern.
11335         (prepare_extend_operands): Remove.
11336         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11337         pattern.
11338         (zero_extendqisi2): Likewise.
11339         (zero_extendhisi2): Likewise.
11340         (extendqihi2): Likewise.
11341         (extendqisi2): Likewise.
11342         (extendhisi2): Likewise.
11343         (addsi3): Likewise.
11344         (subsi3): Likewise.
11345         (andsi3): Likewise.
11346         * config/arc/constraints.md (Usd): Change it to memory constraint.
11348 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11350         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11351         as source of std instructions.
11352         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11353         allow 6-bit constants as source for store instructions.
11354         (movdi_insn): Update instruction pattern to allow 6-bit constants
11355         as source for store instructions.
11357 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11359         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11361 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11362             Sandra Loosemore <sandra@codesourcery.com>
11364         * dumpfile.c (dump_open): Allow '-' for stdout.
11365         * doc/invoke.texi (Developer Options): Document dump filename
11366         determination early.  Document stdin/stdout selection.
11368 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
11370         Microblaze Target: PIC data text relative
11372         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11373         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11374         Add declaration.
11375         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11376         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11377         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11378         New addressing mode for data-text relative position indepenedent code.
11379         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11380         'ADDRESS_SYMBOLIC_TXT_REL'.
11381         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11382         (microblaze_legitimate_pic_operand): Exclude function calls from
11383         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11384         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11385         addresses cases.
11386         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11387         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11388         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11389         for 'address + offset'.
11390         (microblaze_expand_prologue): Add new function prologue call for
11391         'r20' assignation.
11392         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11393         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11394         table in case of TARGET_PIC_DATA_TEXT_REL.
11395         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11396         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11397         Add new macros 'UNSPEC_TEXT',
11398         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11399         + exclude function calls from 'UNSPEC_PLT' in case of data text
11400         relative mode.
11401         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11402         new target hook for generating address diff vector tables in case of
11403         flag_pic.
11404         * doc/tm.texi : Regenerate.
11405         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11406         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11407         of addr diff vector generation.
11408         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11409         target hook definition.
11410         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11411         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11412         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11413         option for data text relative.
11415 2018-04-30  Richard Biener  <rguenther@suse.de>
11417         * tree-chrec.h (evolution_function_is_constant_p): Remove
11418         redundant check.
11419         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11421 2018-04-30  Richard Biener  <rguenther@suse.de>
11423         PR bootstrap/85571
11424         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11426 2018-04-30  Richard Biener  <rguenther@suse.de>
11428         PR tree-optimization/28364
11429         PR tree-optimization/85275
11430         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11431         copying first exit test.
11433 2018-04-28  Mark Wielaard  <mark@klomp.org>
11435         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11436         dwarf_version >= 5.
11437         (dwarf_AT): Handle DW_AT_addr_base.
11438         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11440 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11442         PR target/84431
11443         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11444         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11445         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11446         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11448 2018-04-28  Richard Biener  <rguenther@suse.de>
11450         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11451         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11452         to reflect use.  Only add interesting stmts.
11454 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11456         PR ipa/85549
11457         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11458         the jump function allows for passing through aggregate values.
11460 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11462         * input.h (in_system_header_at): Convert from macro to inline
11463         function.
11464         (from_macro_expansion_at): Likewise.
11465         (from_macro_definition_at): Likewise.
11467 2018-04-27  Jeff Law  <law@redhat.com>
11469         * config.gcc: Mark tile* targets as deprecated/obsolete.
11471 2018-04-27  Richard Biener  <rguenther@suse.de>
11473         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11474         fix for ILP32.
11476 2018-04-27  Richard Biener  <rguenther@suse.de>
11478         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11480 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11482         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11483         with Yd constraint. Set "preferred_for_speed" attribute from
11484         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11485         with Yd constraint.
11486         (*movdi_internal): Ditto.
11487         (movti_interunit splitters): Remove
11488         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11489         (movdi_interunit splitters): Ditto.
11490         * config/i386/constraints.md (Ye): Remove.
11491         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11493 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11495         PR target/85512
11496         * config/aarch64/constraints.md (Usg): Limit to 31.
11497         (Usj): Limit to 63.
11499 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11501         PR tree-optimization/85529
11502         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11503         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11504         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11505         zero extension or masking of the MSB bit.
11506         (optimize_range_tests): Add FIRST_BB argument, pass it through
11507         to optimize_range_tests_var_bound.
11508         (maybe_optimize_range_tests, reassociate_bb): Adjust
11509         optimize_range_tests callers.
11511 2018-04-26  Richard Biener  <rguenther@suse.de>
11512             Jakub Jelinek  <jakub@redhat.com>
11514         * cgraph.h (symbol_table): Just declare debug method here.
11515         * symtab.c (symbol_table::debug): Define.
11517 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11519         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11521 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11523         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11524         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11525         (*movdi_internal): Substitute Yi and Yj constraint with x
11526         and Ym and Yn constraint with y constraint.  Update "isa"
11527         attribute and set "preferred_for_speed" attribute from
11528         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11529         (*movsi_internal): Ditto.
11530         (*movdf_internal): Ditto.
11531         (*movsf_internal): Ditto.
11532         (*zero_extendsidi2): Ditto.
11533         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11534         (sse2_loadld): Ditto.
11535         (*vec_extract<ssevecmodelower>_0): Ditto.
11536         (*vec_extractv4si_0_zext_sse4): Ditto.
11537         (vec_concatv2di): Ditto.
11538         (*vec_dup<mode>): Ditto.
11539         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11540         * config/i386/constraints.md (Yi): Remove.
11541         (Yj): Remove.
11542         (Ym): Remove.
11543         (Yn): Remove.
11545 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11547         * dumpfile.c (dump_open): New.
11548         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11549         (dump_finish): Detect stdio/stderr by value not name.
11551 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11553         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11555 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11557         PR target/84952
11558         * config/nvptx/nvptx.c (verify_neutering_jumps)
11559         (verify_neutering_labels): New function
11560         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11562 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11564         PR target/84025
11565         * config/nvptx/nvptx.c (needs_neutering_p): New function.
11566         (nvptx_single): Use needs_neutering_p to skip over insns that do not
11567         need neutering.
11569 2018-04-26  Richard Biener <rguenther@suse.de>
11570             Tom de Vries  <tom@codesourcery.com>
11572         PR lto/85422
11573         * lto-streamer-out.c (output_function): Fixup loops if required to match
11574         discovery done in the reader.
11576 2018-04-26  Richard Biener  <rguenther@suse.de>
11578         PR tree-optimization/85116
11579         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11580         have a loop exit from the single latch predecessor.  Remove
11581         case of header with just condition.
11582         (ch_base::copy_headers): Exclude infinite loops from any
11583         processing.
11584         (pass_ch::execute): Record exits.
11586 2018-04-26  Richard Biener  <rguenther@suse.de>
11588         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11589         prologue cost vector and pass it to vect_get_load_cost.
11590         (vect_get_peeling_costs_all_drs): Likewise.
11591         (vect_peeling_hash_get_lowest_cost): Likewise.
11592         (vect_enhance_data_refs_alignment): Likewise.
11594 2018-04-26  Richard Biener  <rguenther@suse.de>
11596         PR middle-end/85450
11597         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11598         checking of integer<->pointer conversions.
11599         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11600         sign-/zero-extending pointer types.
11601         (expand_omp_for_static_chunk): Likewise.
11603 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
11604             Jean Lee  <xiaoyur347@gmail.com>
11606         * config/mips/mips.c (mips_asan_shadow_offset): New function.
11607         (TARGET_ASAN_SHADOW_OFFSET): Define.
11608         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11609         true for -fsanitize=address.
11611 2018-04-25  Mark Wielaard  <mark@klomp.org>
11613         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11614         shorter ones.
11616 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11618         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11619         than "alu", remove explicit "memory" and "imm_disp" attributes.
11620         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11622         PR middle-end/85414
11623         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11624         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11625         gen_lowpart_no_emit.
11627 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
11629         PR target/85473
11630         * config/i386/i386.c (ix86_expand_builtin): Change memory
11631         operand to XI, extend p0 to Pmode.
11632         * config/i386/i386.md: Change unspec volatile and operand
11633         1 mode to XI, change operand 0 mode to P.
11635 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11637         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11638         GET_MODE_MASK before any checking.
11639         (nds32_can_use_bset_p): Likewise.
11640         (nds32_can_use_btgl_p): Likewise.
11642 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11644         * config/nds32/nds32-doubleword.md: New define_split pattern for
11645         illegal register number.
11647 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11649         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11651 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11653         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11655 2018-04-25  Richard Biener  <rguenther@suse.de>
11657         * lto-streamer.h (LTO_major_version): Bump to 8.
11659 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11661         * BASE-VER: Set to 9.0.0.
11663 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
11665         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11666         in __abskf2 and __powikf2.
11668 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11670         PR target/85512
11671         * config/aarch64/constraints.md (Usg, Usj): New constraints.
11672         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11673         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11674         Use the above on operand 2.  Reindent.
11675         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11677 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11679         PR target/85485
11680         * common/config/i386/i386-common.c (ix86_handle_option): Don't
11681         handle OPT_mcet.
11682         * config/i386/i386.opt (mcet): Removed.
11683         * doc/install.texi: Remove -mcet documentation.
11684         * doc/invoke.texi: Likewise.
11686 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
11688         PR target/85485
11689         * doc/install.texi: Remove -mcet from bootstrap-cet.
11691 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11693         PR target/85511
11694         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11695         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11696         if TARGET_64BIT.
11698         PR target/85503
11699         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11700         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11701         containing a CONST_VECTOR.
11703 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
11705         * doc/install.texi: Update newlib dependency for nvptx.
11707 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11709         PR target/85508
11710         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11711         instead of INTVAL when shifting x left.
11713 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
11715         PR tree-optimization/85478
11716         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11717         vect_grouped_store_supported for single element vectors.
11719 2018-04-24  Richard Biener  <rguenther@suse.de>
11721         PR target/85491
11722         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11723         load cost increase to the case of non-constant step.
11725 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11727         PR target/84828
11728         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11729         destination if any_malformed_asm.
11731 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
11733         PR middle-end/85496
11734         * expr.c (store_field): In the bitfield case, if the value comes from
11735         a function call and is returned in registers by means of a PARALLEL,
11736         do not change the mode of the temporary unless BLKmode and VOIDmode.
11738 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
11740         PR rtl-optimization/85423
11741         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11742         dependencies to debug insns when the previous insn is non-debug.
11744 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11746         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11747         enums into a single definition.
11748         (fls): Fix predicates and printing.
11749         (seti): Likewise.
11751 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11753         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11754         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11755         and short u6 immediate.
11756         (check_if_valid_sleep_operand): Remove.
11757         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11759 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11761         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11762         flag_always_save_lp condition.
11763         * config/nds32/nds32.opt (malways-save-lp): New option.
11765 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11767         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11768         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11769         * config/nds32/nds32.h
11770         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11771         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11773 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11775         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11776         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11778 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11779             Chung-Ju Wu  <jasonwucj@gmail.com>
11781         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11782         Declare.
11783         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11784         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11786 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11788         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11790 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11792         * config/nds32/nds32-protos.h (nds32_data_alignment,
11793         nds32_local_alignment): Declare.
11794         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11795         nds32_local_alignment): New functions.
11796         (TARGET_CONSTANT_ALIGNMENT): Define.
11797         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11799 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11801         * config/nds32/nds32.c
11802         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11803         (TARGET_MODES_TIEABLE_P): Likewise.
11805 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11807         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11808         level Ofast and Og.
11810 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
11811             Chung-Ju Wu  <jasonwucj@gmail.com>
11813         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11814         for unaligned access.
11815         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11816         unaligned access.
11817         * config/nds32/nds32-intrinsic.md: Likewise.
11818         * config/nds32/nds32_intrinsic.h: Likewise.
11819         * config/nds32/nds32.h (nds32_builtins): Likewise.
11820         * config/nds32/nds32.opt (munaligned-access): New option.
11821         * config/nds32/nds32.c (nds32_asm_file_start): Display
11822         flag_unaligned_access status.
11824 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11826         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11827         -mno-relax is present.
11828         * config/riscv/linux.h (LINK_SPEC): Ditto.
11830 2018-04-20  Martin Sebor  <msebor@redhat.com>
11832         PR c/85365
11833         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11834         for null pointers.
11835         (gimple_fold_builtin_stxcpy_chk): Same.
11836         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11838 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
11840         PR target/85456
11841         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11842         __powikf2 when long double is IEEE 128-bit.
11844 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11846         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11847         step to make sure stack always aligned.
11849 2018-04-20  Carl Love  <cel@us.ibm.com>
11851         PR target/83402
11852         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11853         size check for arg0.
11855 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11856             Tom de Vries  <tom@codesourcery.com>
11858         PR target/85445
11859         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11860         Emit insns for calls too.
11861         (nvptx_find_par): Always look for worker-level predecessor insn.
11862         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
11863         calls.
11864         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11865         (nvptx_process_pars): Propagate frames for calls.
11867 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
11869         PR target/85469
11870         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11871         Removed.
11872         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11873         (ix86_handle_option): Don't handle OPT_mibt.
11874         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11875         __SHSTK__.
11876         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11877         has_ibt and ibt.
11878         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11879         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11880         (ix86_target_macros): Define __CET__ with flag_cf_protection
11881         for -fcf-protection.
11882         * config/i386/i386.c (isa2_opts): Remove -mibt.
11883         * config/i386/i386.h (TARGET_IBT): Removed.
11884         (TARGET_IBT_P): Likewise.
11885         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11886         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11887         * config/i386/i386.opt (mcet): Update help message.
11888         (mshstk): Likewise.
11889         (mibt): Removed.
11890         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
11891         -mcet as an alias for -mshstk.
11893 2018-04-20  Richard Biener <rguenther@suse.de>
11895         PR middle-end/85475
11896         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11897         complexity by forcing a single use of the multiply operand.
11899 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11901         ipa/85449
11902         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11903         recursion dependency to only apply to non-clones.
11905 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11907         ipa/85447
11908         * ipa-cp.c (create_specialized_node): Check that clones of
11909         self-recursive edges exist during IPA-CP.
11911 2018-04-19  Toon Moene  <toon@moene.org>
11913         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11914         by -O3.
11916 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
11918         PR tree-optimization/85467
11919         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11920         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
11921         VECTOR_CST element to type.
11923 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11925         PR target/85397
11926         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11927         * config/i386/i386.md (builtin_setjmp_setup): Removed.
11928         (builtin_longjmp): Likewise.
11929         (save_stack_nonlocal): New pattern.
11930         (restore_stack_nonlocal): Likewise.
11932 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11934         PR target/85404
11935         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11936         Replace ASM_OUTPUT_LABEL with fprintf.
11938 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11940         PR target/85417
11941         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11942         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11943         * config/i386/i386-c.c (ix86_target_macros_internal): Also
11944         define __IBT__ and __SHSTK__ for -fcf-protection.
11945         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11946         TARGET_IBT.
11947         (ix86_trampoline_init): Likewise.
11948         (x86_output_mi_thunk): Likewise.
11949         (ix86_notrack_prefixed_insn_p): Likewise.
11950         (ix86_option_override_internal): Don't disallow -fcf-protection.
11951         * config/i386/i386.md (rdssp<mode>): Also enable for
11952         -fcf-protection.
11953         (incssp<mode>): Likewise.
11954         (nop_endbr): Likewise.
11955         * config/i386/i386.opt (mcet): Change help message to built-in
11956         functions only.
11957         (mibt): Likewise.
11958         (mshstk): Likewise.
11959         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11960         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
11961         enable CET built-in functions.
11963 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
11965         * common/config/i386/i386-common.c
11966         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11967         OPTION_MASK_ISA_MOVDIRI_UNSET,
11968         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11969         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11970         * config.gcc (movdirintrin.h): New header.
11971         * config/i386/cpuid.h (bit_MOVDIRI,
11972         bit_MOVDIR64B): New bits.
11973         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11974         and -mmvodir64b.
11975         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11976         (VOID, PVOID, PCVOID)): New function types.
11977         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11978         __builtin_ia32_directstoreu_u64,
11979         __builtin_ia32_movdir64b): New builtins.
11980         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11981         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11982         and -mmovdiri.
11983         (ix86_valid_target_attribute_inner_p): Ditto.
11984         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11985         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11986         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11987         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11988         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11989         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11990         (movdiri<mode>, movdir64b_<mode>): New.
11991         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11992         * config/i386/immintrin.h: Include movdirintrin.h.
11993         * config/i386/movdirintrin.h: New file.
11994         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11996 2018-04-19  Richard Biener  <rguenther@suse.de>
11998         PR middle-end/85455
11999         * cfg.c (clear_bb_flags): When loop state says we have
12000         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12002 2018-04-19  Richard Biener  <rguenther@suse.de>
12004         PR tree-optimization/84737
12005         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12006         copying restrict info.
12007         (vect_setup_realignment): Use it.
12008         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12009         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12010         the first DR to all generated stores.
12011         (vectorizable_load): Likewise for loads.
12013 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12015         PR tree-optimization/85446
12016         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12017         the integral and pointer types to have the same precision.
12019         * doc/install.texi: Document --disable-cet being the default and
12020         --enable-cet=auto.
12022 2018-04-18  Martin Liska  <mliska@suse.cz>
12024         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12025         style.
12027 2018-04-18  Martin Liska  <mliska@suse.cz>
12029         Revert
12030         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12032         PR ipa/83983
12033         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12034         arguments if they are comparable.
12036 2018-04-18  Martin Liska  <mliska@suse.cz>
12038         Revert
12039         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12041         PR lto/84805
12042         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12043         incomplete types.
12045 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12047         PR target/85388
12048         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12049         ENDBR after calling __morestack.
12051 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12053         PR jit/85384
12054         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12055         by using gcc_base_ver to generate a gcc_driver_version, and use
12056         it when generating GCC_DRIVER_NAME.
12057         * configure: Regenerate.
12059 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12061         PR target/81084
12062         * config.gcc: Obsolete powerpc*-*-*spe*.
12064 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12066         PR debug/84637
12067         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12068         (stabstr_D): Change type of unum from unsigned int to
12069         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12070         type.
12072 2018-04-17  Jim Wilson  <jimw@sifive.com>
12074         PR 84856
12075         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12076         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12077         Set arg_pointer_offset after using pretend_args_size.
12079 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12081         PR rtl-optimization/85431
12082         * dse.c (record_store): Ignore zero width stores.
12084         PR sanitizer/85230
12085         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12086         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12087         __builtin_stack_restore rather than after it.
12088         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12089         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12090         argument instead of virtual_dynamic_stack_rtx.
12092 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12094         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12095         New prototype.
12096         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12097         Add note to error message to explain internal mapping of overloaded
12098         built-in function name to non-overloaded built-in function name.
12099         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12100         function.
12102 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12104         PR target/85424
12105         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12106         where the inputs overlap with the output.
12108 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12110         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12111         (=v, v) alternative and explicit "memory" attribute.
12112         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12113         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12114         attributes.
12115         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12116         "sselog1" type instead of "sselog".
12117         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12118         "sselog".  Remove explicit "memory" attribute.
12119         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12120         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12121         attributes.
12122         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12123         "sselog1" type instead of "sselog".  Remove explicit "memory"
12124         attribute.
12125         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12126         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12127         attribute.
12128         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12129         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12130         attributes.
12131         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12132         "sselog1" type instead of "sselog".  Remove explicit "memory"
12133         attribute.
12134         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12135         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12136         attribute.
12138         PR target/85430
12139         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12141         PR middle-end/85414
12142         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12143         on a SUBREG.
12145 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12147         PR ipa/85421
12148         * ipa-cp.c (create_specialized_node): Call
12149         expand_all_artificial_thunks if necessary.
12151 2018-04-17  Martin Liska  <mliska@suse.cz>
12153         PR lto/85405
12154         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12155         in message, remote space in between '_G' and '('.
12157 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12159         PR target/85281
12160         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12161         avx512f_vmcmp<mode>3<round_saeonly_name>,
12162         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12163         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12164         avx512f_rndscale<mode><round_saeonly_name>,
12165         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12166         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12167         Use %<iptr>2 instead of %2 for -masm=intel.
12168         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12169         avx512f_vcvttss2usi<round_saeonly_name>,
12170         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12171         -masm=intel.
12172         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12173         avx512f_vcvttsd2usi<round_saeonly_name>,
12174         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12175         Use %q1 instead of %1 for -masm=intel.
12176         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12177         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12178         of %3 for -masm=intel.
12179         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12180         -masm=intel.
12181         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12182         -masm=intel.
12183         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12184         -masm=intel.
12185         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12186         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12187         %g1.
12188         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12189         -masm=intel.
12190         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12191         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12192         %g1 and one with %0 and %1.
12193         (avx512er_vmrcp28<mode><round_saeonly_name>,
12194         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12195         %1 for -masm=intel.
12196         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12197         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12198         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12199         of %0 and %{%4%} for -masm=intel.
12200         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12201         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12202         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12203         order of %0 and %{%5%}%{z%} for -masm=intel.
12205 2018-04-17  Jan Hubicka  <jh@suse.cz>
12207         PR lto/85405
12208         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12210 2018-04-17  Martin Liska  <mliska@suse.cz>
12212         PR ipa/85329
12213         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12214         for target_clone error message.  Make default implementation
12215         clone to be a local declaration.
12216         (separate_attrs): Add new argument and check for an empty
12217         string.
12218         (expand_target_clones): Handle it.
12219         (ipa_target_clone): Make redirection just for target_clones
12220         functions.
12222 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12223             Tom de Vries  <tom@codesourcery.com>
12225         PR middle-end/84955
12226         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12227         tiled basic blocks without omp continue statements.
12229 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12231         PR target/83660
12232         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12233         vec_extract expression as having side effects to make sure it gets
12234         a cleanup point.
12236 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12238         PR target/85403
12239         * config/i386/i386.c (get_builtin_code_for_version): Check
12240         error_mark_node.
12242 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12244         PR target/84331
12245         * config.gcc: Support "skylake".
12246         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12247         PROCESSOR_SKYLAKE.
12248         * config/i386/i386.c (m_SKYLAKE): Define.
12249         (processor_target_table): Add "skylake".
12250         (ix86_option_override_internal): Add "skylake".
12251         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12252         PROCESSOR_CANNONLAKE.
12253         (get_builtin_code_for_version): Fix priority for
12254         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12255         PROCESSOR_SKYLAKE-AVX512.
12256         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12257         (processor_type): Add PROCESSOR_SKYLAKE.
12259 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12260             Jason Merrill  <jason@redhat.com>
12262         PR c++/85112
12263         * convert.c (convert_to_integer_1): Use direct recursion for
12264         enumeral types and types with a precision less than the number
12265         of bits in their mode.
12267 2018-04-16  Julia Koval  <julia.koval@intel.com>
12269         PR target/84413
12270         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12271         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12273 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12275         PR target/85293
12276         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12277         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12278         and -mno-direct-move.
12280 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12282         PR target/83402
12283         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12284         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12285         Ensure negative shifts result in {0}.
12287 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12289         PR rtl-optimization/79916
12290         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12291         regs (if any) to define how to gnerate SD moves when LRA is in
12292         progress.
12294 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12296         PR rtl-optimization/85393
12297         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12298         * except.c (expand_dw2_landing_pad_for_region): Make static.
12299         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12300         a label and unconditional jump to old_bb, rather than
12301         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12302         basic block.
12304         PR rtl-optimization/85376
12305         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12306         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12307         instead of a specific value.
12309 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12310             Bin Cheng  <bin.cheng@arm.com>
12312         PR tree-optimization/82965
12313         PR tree-optimization/83991
12314         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12315         by_profile_only parameter.
12316         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12317         information if the loop was predicted to iterate too many times.
12318         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12320 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12322         PR lto/71991
12323         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12324         always inline.
12326 2018-04-13  Martin Liska  <mliska@suse.cz>
12327             Jakub Jelinek  <jakub@redhat.com>
12329         PR middle-end/81657
12330         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12331         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12332         * builtins.c (expand_builtin_memory_copy_args): Use
12333         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12334         handle dest_addr == pc_rtx.
12336 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12338         PR target/85291
12339         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12340         asked to not generate direct moves.
12341         (fix_trunc<mode>si2_stfiwx): Similar.
12342         (fix_trunc<mode>si2_internal): Similar.
12344 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12346         PR debug/83157
12347         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12348         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12349         lookup if dest in some wider mode is known to be const0_rtx and
12350         if so, record permanent equivalence for it to be ZERO_EXTEND of
12351         the narrower mode destination.
12353 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12355         * lto-streamer-out.c (output_function): Revert 259346.
12356         * omp-expand.c (expand_oacc_for): Likewise.
12358 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12360         PR rtl-optimization/85354
12361         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12362         * sel-sched.c (sel_global_init): ... here.
12364 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12366         PR target/85238
12367         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12368         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12369         mode for PE-COFF targets.
12370         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12371         (i386_pe_asm_lto_end): Likewise.
12372         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12373         (TARGET_ASM_LTO_END): Likewise.
12374         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12375         (i386_pe_asm_lto_start): New function.
12376         (i386_pe_asm_lto_end): Likewise.
12378 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12379             Richard Biener  <rguenther@suse.de>
12381         PR middle-end/84955
12382         * lto-streamer-out.c (output_function): Fix CFG loop state before
12383         streaming out.
12384         * omp-expand.c (expand_oacc_for): Handle calls to internal
12385         functions like regular functions.
12387 2018-04-12  Richard Biener  <rguenther@suse.de>
12389         PR lto/85371
12390         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12391         for the early LTO debug to properly generate references to it
12392         during DIE emission.  Do not re-use that for the skeleton for
12393         split-dwarf.
12394         (dwarf2out_early_finish): Likewise.
12396 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12398         PR target/85328
12399         * config/i386/sse.md
12400         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12401         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12402         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12403         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12404         and output is a reg, avoid creating invalid lowpart subreg, but
12405         instead split into a 512-bit move.  Don't split if not AVX512VL,
12406         input is xmm16+ reg and output is a mem.
12407         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12408         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12409         xmm16+ reg and output is a mem.
12411 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12413         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12414         also for flag_dwarf2_cfi_asm.
12416 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12418         PR rtl-optimization/85342
12419         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12420         a bool scalar var inside of the loop instead.  Don't try to update
12421         recog_data.operand after failed apply_change_group.
12423 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12425         PR target/85296
12426         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12427         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12428         array with flexible array member as array without given dimension.
12429         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12430         argument for undefined param to true.
12432 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12434         PR target/85321
12435         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12436         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12437         from PowerPC section.
12438         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12439         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12440         help text that is too long.
12441         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12442         help text that is too long.
12443         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12444         help text that is too long.
12446 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12448         * config/alpha/alpha.md (stack_probe_internal): Rename
12449         from "probe_stack".  Update all callers.
12451 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12453         PR rtl-optimization/84566
12454         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12455         sched_macro_fuse_insns.
12457 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12459         PR target/84301
12460         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12461         (compute_block_dependences): ... from here.
12463 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12465         PR tree-optimization/85331
12466         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12467         from int to HOST_WIDE_INT.
12469 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12471         PR ipa/84149
12472         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12473         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12474         not the same as the source val.
12475         (cgraph_edge_brings_value_p): New parameter.
12476         (gather_edges_for_value): Pass destination value to
12477         cgraph_edge_brings_value_p.
12478         (perhaps_add_new_callers): Likewise.
12479         (get_info_about_necessary_edges): Likewise and exclude values brought
12480         only by self-recursive edges.
12481         (create_specialized_node): Redirect only clones of self-calling edges.
12482         (+self_recursive_pass_through_p): New function.
12483         (find_more_scalar_values_for_callers_subset): Use it.
12484         (find_aggregate_values_for_callers_subset): Likewise.
12485         (known_aggs_to_agg_replacement_list): Removed.
12486         (decide_whether_version_node): Re-calculate known constants for all
12487         remaining context clones.
12489 2018-04-11  Richard Biener  <rguenther@suse.de>
12491         PR lto/85339
12492         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12493         from early DWARF output.
12494         (dwarf2out_early_finish): Output line info unconditionally into
12495         early DWARF and add reference to it.
12497 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12499         PR target/85281
12500         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12501         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12502         other than V2DFmode using iptr mode attribute.
12503         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12505 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12507         PR rtl-optimization/84659
12508         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12510 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12512         PR debug/85302
12513         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12514         SIZEP is NULL.
12515         (output_loc_list): Pass address of a dummy size variable even in the
12516         locview handling loop.
12517         (index_location_lists): Add comment on why skip_loc_list_entry can't
12518         call size_of_locs.
12520 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12522         PR target/85261
12523         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12524         into register.
12526 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12528         PR target/85321
12529         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12530         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12531         and -mstring-compare-inline-limit.
12533 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12535         PR target/85287
12536         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12537         for stack clash protection in a register whenever we need it to be in
12538         a register.
12540 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12542         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12543         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12545 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12547         PR target/85321
12548         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12549         the help text.
12550         (mlong-double-): Ditto.
12551         * config/rs6000/sysv4.opt (msdata=): Ditto.
12552         (mtls-size=): Ditto.
12554 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12556         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12557         erroneous entries for
12558         "vector int vec_ldl (int, long int *)", and
12559         "vector unsigned int vec_ldl (int, unsigned long int *)".
12560         Add comments and entries for
12561         "vector bool char vec_ldl (int, bool char *)",
12562         "vector bool short vec_ldl (int, bool short *)",
12563         "vector bool int vec_ldl (int, bool int *)",
12564         "vector bool long long vec_ldl (int, bool long long *)",
12565         "vector pixel vec_ldl (int, pixel *)",
12566         "vector long long vec_ldl (int, long long *)",
12567         "vector unsigned long long vec_ldl (int, unsigned long long *)".
12568         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12569         type tree bool_long_long_type_node and correct definition of
12570         bool_V2DI_type_node to make reference to this new type tree.
12571         (rs6000_mangle_type): Replace erroneous reference to
12572         bool_long_type_node with bool_long_long_type_node.
12573         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12574         comments to emphasize sign distinctions for char and int types and
12575         replace RS6000_BTI_bool_long constant with
12576         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
12577         use of RS6000_BTI_pixel.
12578         (bool_long_type_node): Remove this macro definition.
12579         (bool_long_long_type_node): New macro definition
12581 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12583         PR rtl-optimization/85300
12584         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12585         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12586         simplify_unary_operation fails.
12588 2018-04-10  Martin Liska  <mliska@suse.cz>
12590         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12591         cgraph_edge and ipa_ref.
12593 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12595         PR target/85177
12596         PR target/85255
12597         * config/i386/sse.md
12598         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12599         computation of the VEC_MERGE selector from mask.
12600         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12601         Fix decoding of the VEC_MERGE selector into mask.
12603 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12605         PR tree-optimization/85286
12606         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12608 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12610         * final.c (final_1): Set insn_last_address as well as
12611         insn_current_address.
12613 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12615         PR target/85173
12616         * explow.c (emit_stack_probe): Call validize_mem on memory location
12617         before passing it to gen_probe_stack.  Create address operand and
12618         legitimize it for the probe_stack_address case.
12620 2018-04-09  Jan Hubicka  <jh@suse.cz>
12622         PR lto/85078
12623         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12624         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12625         * tree.c (free_lang_data_in_type): Fix handling of binfos;
12626         walk basetypes.
12627         (free_lang_data): Rebuild type inheritance graph.
12629 2018-04-09  Martin Sebor  <msebor@redhat.com>
12631         * invoke.texi (-finline-small-functions): Mention other optimization
12632         options.
12633         (-findirect-inlining, -fpartial-inlining): Same.
12634         (-finline-functions-called-once): Same.
12635         (-freorder-blocks-and-partition): Same.
12637 2018-04-09  Jan Hubicka  <jh@suse.cz>
12639         PR rtl/84058
12640         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12641         jumps; choose last target that matches the criteria (i.e.
12642         no partition changes for non-crossing jumps).
12643         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12644         support for redirecting crossing jumps to non-crossing.
12646 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
12648         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12649         also for naked functions.
12651 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
12653         * config/arc/arc.md (add_shift): New pattern.
12654         (add_shift2): Likewise.
12655         (sub_shift): Likewise.
12656         (sub_shift_cmp0_noout): Likewise.
12657         (compare_si_ashiftsi): Likewise.
12658         (xbfu_cmp0_noout): New combine pattern.
12659         (xbfu_cmp0"): Likewise.
12660         (movsi_set_cc_insn): Place the predicable variant first.
12661         (commutative_binary_cmp0_noout): Remove clobber.
12662         (commutative_binary_cmp0): New pattern.
12663         (noncommutative_binary_cmp0): Likewise.
12664         (noncommutative_binary_cmp0_noout): Likewise.
12665         (noncommutative_binary_comparison_result_used): Removed.
12666         (rsub_cmp0): New pattern.
12667         (rsub_cmp0_noout): Likewise.
12668         (extzvsi): Changed, keep only meaningful variants.
12669         (SQH, SEZ): New iterators.
12670         (SQH_postfix): New mode attribute.
12671         (SEZ_prefix): New code attribute.
12672         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12673         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12674         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12675         of numerical value.
12676         (noncommutative_operator): Check the availability of barrel
12677         shifter option.
12679 2018-04-09  Richard Biener  <rguenther@suse.de>
12681         PR tree-optimization/85284
12682         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12683         Only use the niter constraining form of simple_iv when the exit
12684         is always executed.
12686 2018-04-09  Tom de Vries  <tom@codesourcery.com>
12688         PR target/84041
12689         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12690         (define_expand "*memory_barrier"): New define_expand.
12691         (define_insn "memory_barrier"): New insn.
12693 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12695         PR rtl-optimization/80463
12696         PR rtl-optimization/83972
12697         PR rtl-optimization/83480
12699         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12700         correct producer for the insn.
12701         (tidy_control_flow): Fixup seqnos in case of debug insns.
12703 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12705         PR rtl-optimization/83913
12707         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12708         different sched-times when merging exprs.
12710 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12712         PR rtl-optimization/83962
12714         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12715         tidy_fallthru_edge and tidy_control_flow.
12717 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12719         PR rtl-optimization/83530
12721         * sel-sched.c (force_next_insn): New global variable.
12722         (remove_insn_for_debug): When force_next_insn is true, also leave only
12723         next insn in the ready list.
12724         (sel_sched_region): When the region wasn't scheduled, make another pass
12725         over it with force_next_insn set to 1.
12727 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12729         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12730         into tm_file.
12731         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12732         for interrupt control.
12733         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12734         functions for interrupt control.
12735         * config/nds32/nds32-intrinsic.md: Likewise.
12736         * config/nds32/nds32_intrinsic.h: Likewise.
12737         * config/nds32/nds32.h (nds32_builtins): Likewise.
12739 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12741         * config/nds32/nds32.c (nds32_init_machine_status,
12742         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12743         strict_aligned_p field.
12744         (nds32_expand_to_rtl_hook): New function.
12745         (TARGET_EXPAND_TO_RTL_HOOK): Define.
12746         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12748 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12749             Chung-Ju Wu  <jasonwucj@gmail.com>
12751         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12752         * config/nds32/nds32-n7.md: New file.
12753         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12754         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12755         pipeline.
12756         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12757         * config/nds32/nds32.md (pipeline_model): Add n7.
12758         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12759         * config/nds32/pipelines.md: Include n7 settings.
12761 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12762             Chung-Ju Wu  <jasonwucj@gmail.com>
12764         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12765         * config/nds32/nds32-e8.md: New file.
12766         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12767         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12768         pipeline.
12769         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12770         * config/nds32/nds32.md (pipeline_model): Add e8.
12771         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12772         * config/nds32/pipelines.md: Include e8 settings.
12774 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12775             Chung-Ju Wu  <jasonwucj@gmail.com>
12777         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12778         * config/nds32/nds32-n8.md: New file.
12779         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12780         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12781         pipeline.
12782         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12783         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12784         * config/nds32/nds32.md (pipeline_model): Add n8.
12785         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12786         * config/nds32/pipelines.md: Include n8 settings.
12788 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12789             Chung-Ju Wu  <jasonwucj@gmail.com>
12791         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12792         * config/nds32/nds32-n9-2r1w.md: New file.
12793         * config/nds32/nds32-n9-3r2w.md: New file.
12794         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12795         nds32_register_ports): New or modify for cpu n9.
12796         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12797         pipeline.
12798         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12799         * config/nds32/nds32-utils.c: New file.
12800         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12801         TARGET_MUL_SLOW): Define.
12802         * config/nds32/nds32.md (pipeline_model): New attribute.
12803         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12804         New options that support cpu n9.
12805         * config/nds32/pipelines.md: Include n9 settings.
12806         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12808 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12810         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12811         information if necessary.
12812         (output_cond_branch_compare_zero): Likewise.
12813         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12814         (nds32_target_alignment): Refine for alignment.
12815         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12816         (FUNCTION_BOUNDARY): Modify.
12817         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12818         align case.
12819         * config/nds32/nds32.opt (malways-align, malign-functions): New.
12821 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12823         * config/nds32/constants.md (unspec_volatile_element): Add values for
12824         TLB operation and data prefetch.
12825         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12826         functions for TLB operation and data prefetch.
12827         * config/nds32/nds32-intrinsic.md: Likewise.
12828         * config/nds32/nds32_intrinsic.h: Likewise.
12829         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12830         (nds32_print_operand): Likewise.
12831         * config/nds32/nds32.h (nds32_builtins): Likewise.
12833 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
12834         Andrew Pinski <pinsika@gcc.gnu.org>
12836         PR middle-end/82976
12837         * match.pd: Use constant_boolean_node of correct type instead of
12838         boolean_true_node or boolean_false_node for simplifying
12839         pointer comparisons to zero.
12841 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12843         PR tree-optimization/80021
12844         * tree.c (verify_type_variant): Make error call in verify_variant_match
12845         translatable and remove final full stop.
12847 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12849         * config/nds32/constants.md (unspec_volatile_element): Add
12850         UNSPEC_VOLATILE_EH_RETURN.
12851         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12852         nds32_output_stack_pop): Support dwarf exception handling process.
12853         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12854         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12855         exception handling process.
12856         (nds32_compute_stack_frame): Likewise.
12857         (nds32_return_addr_rtx): Likewise.
12858         (nds32_initial_elimination_offset): Likewise.
12859         (nds32_expand_prologue): Likewise.
12860         (nds32_expand_epilogue): Likewise.
12861         (nds32_dynamic_chain_address): New function.
12862         * config/nds32/nds32.h (machine_function): Add fields for dwarf
12863         exception handling.
12864         (DYNAMIC_CHAIN_ADDRESS): Define.
12865         (EH_RETURN_DATA_REGNO): Define.
12866         (EH_RETURN_STACKADJ_RTX): Define.
12867         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12868         patterns for dwarf exception handling.
12870 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12872         * config/nds32/nds32.h: Clean up obsolete macros.
12874 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12876         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12877         Add enum values for particular instructions.
12878         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12879         particular intrinsic functions.
12880         * config/nds32/nds32-intrinsic.md: Likewise.
12881         * config/nds32/nds32_intrinsic.h: Likewise.
12882         * config/nds32/nds32.h (nds32_builtins): Likewise.
12883         * config/nds32/nds32.md (type): Add pbsad and pbsada.
12884         (btst, ave): New patterns for particular instructions.
12886 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12888         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12889         Add enum values for atomic load/store and memory sync.
12890         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12891         and memory sync.
12892         * config/nds32/nds32-intrinsic.md: Likewise.
12893         * config/nds32/nds32_intrinsic.h: Likewise.
12894         * config/nds32/nds32.h (nds32_builtins): Likewise.
12896 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12898         PR tree-optimization/85257
12899         * fold-const.c (native_encode_vector): If not all elts could fit
12900         and off is -1, return 0 rather than offset.
12901         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12902         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12903         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
12904         adjust buffer in native_interpret_expr call.
12906 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12908         * config/nds32/constants.md (unspec_volatile_element): Add cache
12909         control enum values.
12910         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12911         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12912         * config/nds32/nds32.c (nds32_cctl_names): New.
12913         (nds32_print_operand): Handle cache control register names.
12914         * config/nds32/nds32.h (nds32_builtins): New enum values.
12915         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12916         macros.
12917         * config/nds32/nds32.md (type): Add mmu.
12918         * config/nds32/pipelines.md (simple_insn): Add mmu.
12920 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12922         * config/nds32/nds32.md (type): Remove call.
12923         * config/nds32/pipelines.md (simple_insn): Likewise.
12925 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12927         * config/nds32/constants.md (unspec_volatile_element): Add
12928         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12929         UNSPEC_VOLATILE_FMFCFG.
12930         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12931         description for fmfcfg and fmfcsr.
12932         (bdesc_1arg): Add fmtcsr.
12933         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12934         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12935         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12936         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12937         unspec_fmfcfg): New patterns.
12938         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12939         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12940         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12941         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12942         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12943         __nds32__fmfcfg): Define.
12945 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12947         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12948         intrinsic register names.
12949         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12950         intrinsic register enum values and macros.
12952 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12954         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12955         for load/store addressing form.
12956         (nds32_print_operand_address): Likewise.
12958 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
12960         PR target/85196
12961         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12962         based on LABEL_REF.  Remove useless assertion.
12963         (pic_address_needs_scratch): Fix formatting.
12964         (sparc_legitimize_pic_address): Minor tweaks.
12965         (sparc_delegitimize_address): Adjust assertion accordingly.
12966         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12967         into symbolic_operand.
12968         (movsi_high_pic_label_ref): Likewise.
12969         (movsi_lo_sum_pic_label_ref): Likewise.
12970         (movdi_pic_label_ref): Likewise.
12971         (movdi_high_pic_label_ref): Likewise.
12972         (movdi_lo_sum_pic_label_ref): Likewise.
12974 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
12976         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12977         custom LIB_SPEC setup.
12979 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
12980             Kito Cheng  <kito.cheng@gmail.com>
12982         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12983         * config/riscv/freebsd.h: New.
12985 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12987         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12988         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12989         file.
12991 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12992             Kito Cheng  <kito.cheng@gmail.com>
12994         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12995         nds32_output_call, nds32_symbol_binds_local_p): New functions.
12996         * config/nds32/nds32-protos.h (nds32_output_call,
12997         nds32_output_return): Declare.
12998         * config/nds32/nds32.md: Refine all the call and return patterns.
13000 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13002         PR debug/85252
13003         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13004         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13006         PR rtl-optimization/84872
13007         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13008         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13009         EDGE_CROSSING edge.
13011 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13013         * expr.c (copy_blkmode_to_reg): Revert 254862.
13014         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13016 2018-04-06  Richard Biener  <rguenther@suse.de>
13018         PR middle-end/85244
13019         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13020         after seeing a component reference with an adjacent field.  Treat
13021         refs to arrays at struct end of external decls similar to
13022         refs to unconstrained commons.
13024 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13026         PR sanitizer/85213
13027         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13028         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13029         recursive calls.
13030         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13031         save_p here.
13033 2018-04-06  Richard Biener  <rguenther@suse.de>
13035         PR middle-end/85180
13036         * alias.c (find_base_term): New wrapper around find_base_term
13037         unwinding CSELIB_VAL_PTR changes.
13038         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13039         recursion.
13041 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13043         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13044         instructions.
13045         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13046         constant definitions.
13047         ("nop"): lr 0,0 -> nopr r0
13048         ("nop_lr0", "nop_lr1"): New insn definitions.
13050 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13052         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13053         NDS32_V3PUSH_AVAILABLE_P macro.
13055 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13056             Chung-Ju Wu  <jasonwucj@gmail.com>
13058         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13059         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13060         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13061         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13062         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13063         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13064         * config/nds32/constraints.md: New constraints and checking for hard
13065         float configuration.
13066         * config/nds32/iterators.md: New mode iterator and attribute for hard
13067         float configuration.
13068         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13069         patterns.
13070         * config/nds32/nds32-fpu.md: New file.
13071         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13072         deal with hard float code generation.
13073         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13074         ARCH_V3S.
13075         (abi_type, float_reg_number): New enum type.
13076         * config/nds32/nds32-predicates.c: New predicates for hard float.
13077         * config/nds32/nds32-protos.h: Declare functions for hard float.
13078         * config/nds32/nds32.c: Implementation for hard float configuration.
13079         * config/nds32/nds32.h: Definitions for hard float configuration.
13080         * config/nds32/nds32.md: Include hard float machine description and
13081         modify patterns for hard float configuration.
13082         * config/nds32/nds32.opt: New options for hard float configuration.
13083         * config/nds32/predicates.md: New predicates for hard float
13084         configuration.
13086 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13088         * common/config/nds32/nds32-common.c
13089         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13091 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13093         PR middle-end/85195
13094         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13095         CONSTRUCTOR_ELT (ctor, ...)->value.
13097 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13099         PR target/85193
13100         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13102 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13104         PR target/85204
13105         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13106         cond jump.
13108 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13109             Kito Cheng  <kito.cheng@gmail.com>
13111         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13112         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13113         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13114         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13116 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13117             Kito Cheng  <kito.cheng@gmail.com>
13119         * config/nds32/constraints.md (Ufe): New memory constraint.
13120         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13121         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13122         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13123         operands.
13124         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13125         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13127 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13129         * config/nds32/nds32.md: Use optimize_size in the condition for
13130         alu-shift instructions.
13132 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13134         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13136 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13138         * config/nds32/nds32.md (negsi2): Refine pattern.
13140 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13141             Chung-Ju Wu  <jasonwucj@gmail.com>
13143         * config/nds32/iterators.md (shift_rotate): New code iterator.
13144         (shift): New code attribute.
13145         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13146         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13147         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13148         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13149         bit-wise operations.
13150         (andsi3, *andsi3): Ditto.
13151         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13152         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13153         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13154         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13155         nds32_ior_operand, nds32_xor_operand): New predicates.
13157 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13159         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13160         (addsi3, subsi3): ... this.
13162 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13164         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13166 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13168         * config/nds32/nds32.md: Adjust indention.
13170 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13172         * config/nds32/nds32.md (feature): New attribute.
13174 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13176         * config/nds32/nds32.md (subtype): New attribute.
13178 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13180         PR target/85203
13181         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13182         expansion to perform a bitwise AND of the argument followed by a
13183         boolean negation of the result.
13185 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13187         PR rtl-optimization/84878
13188         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13189         the basic block.  Assert the use reference is not artificial and that
13190         it has an associated insn.
13192 2018-04-04  Michael Matz  <matz@suse.de>
13194         * builtins.c (compute_objsize): Pass correct operand
13195         to array_at_struct_end_p.
13197 2018-04-04  Richard Biener  <rguenther@suse.de>
13199         PR lto/85176
13200         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13201         from contexts for DINFO_LEVEL_TERSE and below.
13203 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13205         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13206         resiter_operand condition.
13207         * config/nds32/nds32.md (*move<mode>): Ditto.
13209 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13210             Monk Chiang  <sh.chiang04@gmail.com>
13212         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13214 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13216         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13218 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13219             Kito Cheng  <kito.cheng@gmail.com>
13221         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13222         nds32_cond_code_str, output_cond_branch,
13223         output_cond_branch_compare_zero, nds32_expand_cbranch,
13224         nds32_expand_cstore, nds32_expand_movcc,
13225         nds32_output_cbranchsi4_equality_zero,
13226         nds32_output_cbranchsi4_equality_reg,
13227         nds32_output_cbranchsi4_equality_reg_or_const_int,
13228         nds32_output_cbranchsi4_greater_less_zero: New functions.
13229         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13230         nds32_expand_cstore, nds32_expand_movcc,
13231         nds32_output_cbranchsi4_equality_zero,
13232         nds32_output_cbranchsi4_equality_reg,
13233         nds32_output_cbranchsi4_equality_reg_or_const_int,
13234         nds32_output_cbranchsi4_greater_less_zero): Declare.
13235         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13236         nds32_rimm11s_operand): New predicates.
13237         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13238         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13239         patterns.
13241 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13243         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13244         * config/nds32/nds32.md: Ditto.
13245         * config/nds32/pipelines.md: Ditto.
13247 2018-04-04  Richard Biener  <rguenther@suse.de>
13249         PR tree-optimization/85168
13250         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13251         propagating abnormals.
13253 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13255         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13257 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13258             Kito Cheng  <kito.cheng@gmail.com>
13260         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13261         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13262         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13263         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13264         * config/nds32/nds32.md (sibcall_internal): New.
13265         (sibcall_register): Remove.
13266         (sibcall_immediate): Remove.
13267         (sibcall_value_internal): New.
13268         (sibcall_value_register): Remove.
13269         (sibcall_value_immediate): Remove.
13270         * config/nds32/predicates.md (nds32_general_register_operand): New.
13271         (nds32_call_address_operand): New.
13273 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13275         PR rtl-optimization/85167
13276         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13277         bb_defs if *split_p, instead preinitialize it to NULL.
13279         PR tree-optimization/85156
13280         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13281         evaluating the argument multiple times.
13283 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13285         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13286         than vector.
13287         (_mm_cvtpd_ps): Likewise.
13288         (_mm_cvttpd_epi32): Likewise.
13289         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13290         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13291         vector, pixel, and bool following altivec.h include.
13293 2018-04-03  Martin Sebor  <msebor@redhat.com>
13295         * doc/extend.texi (Common Function Attributes): Clarify.
13296         (const attribute): Likewise.
13297         (pure attribute): Likewise.
13299 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13301         PR target/85169
13302         * config/i386/i386.c (ix86_expand_vector_set): Use
13303         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13305 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13307         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13308         instructions when changing rounding bits to preserve precision bits
13309         in the x87 control word.
13311 2018-04-03  Martin Liska  <mliska@suse.cz>
13313         PR tree-optimization/82491
13314         * rtl.h (strip_offset_and_add): Replace += suboffset with
13315         poly_uint64 () + suboffset.
13317 2018-03-29  Martin Liska  <mliska@suse.cz>
13318             Martin Jambor  <mjambor@suse.cz>
13320         PR ipa/84947
13321         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13322         param_type is not an integral or pointer type.
13324 2018-04-03  Richard Biener  <rguenther@suse.de>
13326         * sese.h (recompute_all_dominators): Remove.
13328 2018-04-02  Martin Sebor  <msebor@redhat.com>
13330         * doc/invoke.texi (-Wrestrict): Fix typos.
13332 2018-04-02  Jim Wilson  <jimw@sifive.com>
13334         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13335         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13336         (<optab>di3, <optab>si3_extend): Likewise.
13337         (<optab>si3_mask, <optab>si3_mask_1): New.
13338         (<optab>di3_mask, <optab>di3_mask_1): New.
13339         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13340         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13341         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13343 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13345         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13346         example.
13348 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13350         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13351         (nds32_canonicalize_comparison): New function.
13353 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13354             Kito Cheng  <kito.cheng@gmail.com>
13355             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13357         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13358         * config/nds32/constants.md (unspec_volatile_element): Add
13359         UNSPEC_VOLATILE_RELAX_GROUP.
13360         * config/nds32/nds32-relax-opt.c: New file.
13361         * config/nds32/nds32-predicates.c
13362         (nds32_symbol_load_store_p): New function.
13363         * config/nds32/nds32-protos.h
13364         (nds32_symbol_load_store_p): Declare function.
13365         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13366         * config/nds32/nds32.c
13367         (nds32_register_pass): New function to register pass.
13368         (nds32_register_passes): New function to register passes.
13369         * config/nds32/nds32.md (relax_group): New pattern.
13370         * config/nds32/nds32.opt (mrelax-hint): New option.
13371         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13373 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13375         * config/nds32/t-nds32: Modify files dependency.
13377 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13379         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13380         (PROFILE_HOOK): Define its implementation.
13382 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13384         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13385         type and 32-bit size.
13387 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13389         PR middle-end/85090
13390         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13391         (V_128_256): New mode iterator.
13392         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13393         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13394         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13395         of V.
13396         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13397         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13399 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13401         PR target/83315
13402         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13403         NaN inputs correctly.
13405 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13407         PR target/80546
13408         * config/rs6000/vsx.md (??r): New mode attribute.
13409         (*vsx_mov<mode>_64bit): Use it.
13410         (*vsx_mov<mode>_32bit): Likewise.
13412 2018-03-30  Martin Sebor  <msebor@redhat.com>
13414         PR tree-optimization/84818
13415         * builtins.c (check_access): Use warning_n.
13417 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13419         PR target/83822
13420         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13421         condition.
13422         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13423         condition.
13425 2018-03-30  Julia Koval  <julia.koval@intel.com>
13427         PR target/84413
13428         * x86-tune.def (movx, partial_reg_dependency): Enable for
13429         m_SKYLAKE_AVX512.
13431 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13433         PR inline-asm/84985
13434         * lra-constraints.c (process_alt_operands): Move setting
13435         this_alternative_matches below.
13437 2018-03-29  Martin Liska  <mliska@suse.cz>
13439         PR lto/84995.
13440         * doc/invoke.texi: Document how LTO works with debug info.
13441         Describe auto-load support of binutils.  Mention 'x86-64'
13442         as valid option value of -march option.
13444 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13446         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13448         PR c/85094
13449         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13450         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13451         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13452         checking.
13454 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13456         PR target/84912
13457         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13458         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13459         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13460         for RS6000_BTM_POWERPC64.
13461         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13462         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13463         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13464         definition.
13465         (DIVDE): Use it.
13466         (DIVDEU): Likewise.
13468 2018-03-28 Carl Love  <cel@us.ibm.com>
13470         Revert
13471         2017-09-27  Carl Love  <cel@us.ibm.com>
13473         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13474         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13475         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13476         fctiw instruction.
13478 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13480         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13481         instead of __vector bool.
13482         (_mm_max_pu8): Likewise.
13483         (_mm_min_pi16): Likewise.
13485 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13487         PR target/84912
13488         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13489         (DIVWEUO): Likewise.
13490         (DIVDEO): Likewise.
13491         (DIVDEUO): Likewise.
13492         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13493         DIVWEUO and DIVDEUO.
13494         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13495         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13496         (div_extend): Likewise.
13497         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13498         builtin function.
13499         (__builtin_divweuo): Likewise.
13500         (__builtin_divdeo): Likewise.
13501         (__builtin_divdeuo): Likewise.
13503 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13505         PR target/85095
13506         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13507         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13509         PR tree-optimization/82004
13510         * gimple-match-head.c (optimize_pow_to_exp): New function.
13511         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13512         Don't fold to exp if optimize_pow_to_exp is false.
13514 2018-03-28  Martin Liska  <mliska@suse.cz>
13516         PR other/84819
13517         * calls.c (initialize_argument_information): Fix trailing space.
13518         * common.opt: Fix typo and provide better explanation for
13519         -fsanitize-coverage option.
13520         * config/i386/i386.opt: Fix typo.
13522 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13523             Martin Liska  <mliska@suse.cz>
13525         PR sanitizer/85081
13526         * gimplify.c (asan_poison_variable): Don't do the check for
13527         gimplify_omp_ctxp here.
13528         (gimplify_decl_expr): Do it here.
13529         (gimplify_target_expr): Likewise.
13531 2018-03-28  Martin Liska  <mliska@suse.cz>
13533         PR target/84988
13534         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13535         chkp_type_bounds_count if MPX is not enabled.
13537 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13539         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13541 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13543         PR target/84914
13544         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13545         function to create the function decl for complex long double
13546         multiply and divide for -mabi=ieeelongdouble.
13547         (init_float128_ieee): Call it.
13549 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13551         PR target/85044
13552         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13553         -fcf-protection=branch -mibt.
13554         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13556 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13558         PR target/81863
13559         * config/arm/arm.c (arm_valid_symbolic_address): Handle
13560         arm_word_relocations.
13562 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
13564         PR target/85056
13565         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13566         extern array declarations.
13568 2018-03-27  Richard Biener  <rguenther@suse.de>
13570         PR middle-end/84067
13571         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13572         explicit single_use checks.
13574 2018-03-27  Richard Biener  <rguenther@suse.de>
13576         PR tree-optimization/85082
13577         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13578         Valueize the VUSE.
13580 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13582         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13583         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13584         Turn on fasynchronous-unwind-tables and funwind-tables.
13586 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
13588         PR target/85073
13589         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13590         (*bmi_blsr_<mode>_ccz): Ditto.
13592 2018-03-26  Tom de Vries  <tom@codesourcery.com>
13594         PR tree-optimization/85063
13595         * omp-general.c (offloading_function_p): New function.  Factor out
13596         of ...
13597         * omp-offload.c (pass_omp_target_link::gate): ... here.
13598         * omp-general.h (offloading_function_p): Declare.
13599         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13600         with attribute omp declare target for offloading functions.
13602 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
13604         PR tree-optimization/84005
13605         * tree-data-ref.h (get_base_for_alignment): Declare.
13606         * tree-data-ref.c (get_base_for_alignment_1): New function.
13607         (get_base_for_alignment): Likewise.
13608         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13609         get_base_for_alignment to find a suitable base object, instead
13610         of always using drb->base_address.
13612 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13614         PR inline-asm/85022
13615         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13616         known size by default.
13618 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
13620         PR inline-asm/85030
13621         * lra-constraints.c (process_alt_operands): Don't match BLKmode
13622         and non BLKmode operands.
13624 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13626         PR target/85026
13627         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13628         Clean up attributes.
13630 2018-03-23  Richard Biener  <rguenther@suse.de>
13632         PR debug/85020
13633         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13634         we are going to emit early debug for LTO.
13636 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13638         PR inline-asm/85034
13639         * function.c (match_asm_constraints_1): Don't optimize if input
13640         doesn't satisfy general_operand predicate for output's mode.
13642         PR inline-asm/85022
13643         * alias.c (write_dependence_p): Don't require for x_canonicalized
13644         non-VOIDmode if x has VOIDmode.
13646         PR sanitizer/85029
13647         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13648         just don't try to optimize it rather than assert it never happens.
13650 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13652         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13653         macro expansions for definition of ST_INTERNAL_<mode> and
13654         LD_INTERNAL_<mode> builtins.
13655         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13656         Remove prototype.
13657         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13658         function.
13659         (altivec_expand_st_builtin): Likewise.
13660         (altivec_expand_builtin): Remove calls to deleted functions.
13661         (rs6000_address_for_altivec): Delete this function.
13662         * config/rs6000/vector.md: Remove expands for
13663         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13665 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
13667         PR target/84826
13668         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13669         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13670         re-computing once computed.
13671         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13672         (arm_init_machine_status): Initialize
13673         machine->static_chain_stack_bytes.
13675 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13677         PR target/84760
13678         * doc/extend.texi: Add four new prototypes for vec_ld.
13679         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13680         definitions for more logical presentation.
13681         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13682         entries for V1TI variants of __builtin_altivec_ld builtin.
13683         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13684         handling of V1TI variant of LVX icode pattern.
13685         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13686         (rs6000_gimple_fold_builtin): Likewise.
13687         (altivec_init_builtins): Add code to define
13688         __builtin_altivec_lvx_v1ti function.
13690 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13692         PR inline-asm/84941
13693         * function.c (match_asm_constraints_1): Don't do the optimization
13694         if input isn't a REG, SUBREG, MEM or constant.
13696 2018-03-22  Tom de Vries  <tom@codesourcery.com>
13698         PR tree-optimization/84956
13699         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13700         bb_has_abnormal_pred.
13702 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13704         PR sanitizer/85018
13705         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13706         DECL_INITIAL (decl) to decl at the end.
13707         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13708         adjust the comment.
13710 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
13712         * doc/extend.texi (__builtin_tgmath): Document when complex
13713         integer types are treated as _Complex _Float64.
13715 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13717         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13719 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13721         PR tree-optimization/84960
13722         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13723         if it is ENTRY block, move them into single succ of ENTRY in that case.
13725 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
13727         PR tree-optimization/84811
13728         * poly-int.h (poly_span_traits): Remove the T3 parameter and
13729         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13730         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13731         (known_subrange_p): Update accordingly.  Cast each value involved
13732         in the size comparison, rather than casting the result of the
13733         subtraction.
13735 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13737         PR tree-optimization/84982
13738         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13739         by flipping the least significant bit rather than all bits from
13740         bitpos to bitpos + bitsize - 1.
13742 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13744         * doc/extend.texi (Deprecated Features): Remove mention of
13745         long-deleted deprecations.
13747 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13749         PR jit/84288
13750         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13751         * configure: Regenerate.
13753 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13755         PR tree-optimization/83126
13756         * tree-parloops.c (num_phis): New function.
13757         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13759 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13761         * doc/extend.texi (Deprecated Features): Update deprecated flags,
13762         mention anon-struct/union members and trailing attributes.
13764 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
13766         PR tree-optimization/84969
13767         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13768         builtin memset partitions if they set different rhs values.
13770 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13772         PR rtl-optimization/84989
13773         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13774         VEC_DUPLICATE with scalar result mode.
13776 2018-03-21  Martin Liska  <mliska@suse.cz>
13778         PR ipa/84963
13779         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13780         not intended return statement.
13782 2018-03-21  Martin Liska  <mliska@suse.cz>
13784         PR target/84988
13785         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13786         (chkp_find_bound_slots_1): Limit number of iterations.
13788 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
13790         PR target/84838
13791         * Minor grammar fixes for x86 options.
13793 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13795         PR debug/84875
13796         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13797         holding REG_CFA_RESTORE notes, instead turn them into a USE.
13799 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
13801         PR target/83789
13802         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13803         (altivec_lvx_<mode>_1op): Likewise.
13804         (altivec_stvx_<mode>_2op): Likewise.
13805         (altivec_stvx_<mode>_1op): Likewise.
13806         (altivec_lvx_<VM2:mode>): New define_expand.
13807         (altivec_stvx_<VM2:mode>): Likewise.
13808         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13809         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13810         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13811         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13812         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13813         (rs6000_gen_lvx): Likewise.
13814         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13815         (altivec_expand_stv_builtin): Likewise.
13816         (altivec_expand_builtin): Likewise.
13817         * config/rs6000/vector.md: Likewise.
13819 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13821         PR target/82518
13822         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13823         BYTES_BIG_ENDIAN.
13825 2018-03-20  Richard Biener  <rguenther@suse.de>
13827         PR target/84986
13828         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13829         sign-conversions as zero, fall back to standard scalar_stmt
13830         cost for the rest.
13832 2018-03-20  Martin Liska  <mliska@suse.cz>
13834         PR ipa/84825
13835         * predict.c (rebuild_frequencies): Handle case when we have
13836         PROFILE_ABSENT, but flag_guess_branch_prob is false.
13838 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13840         PR target/84990
13841         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13842         flag_section_anchors.
13843         * varasm.c (use_blocks_for_decl_p): Remove hack for
13844         dw2_force_const_mem.
13846         PR target/84845
13847         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13848         to ...
13849         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
13850         be created, use lowpart_subreg of operands[0] rather than operands[0]
13851         itself.
13852         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13853         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13854         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13855         and n constraint instead of aarch64_shift_imm_di and Usd.
13856         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13857         (*aarch64_<optab>_reg_minus<mode>3): ... this.
13859 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
13861         PR target/82989
13862         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13863         to favor GPR over NEON registers.
13864         (<shift>di3_neon): Likewise.
13866 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13868         PR target/84952
13869         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13870         (nvptx_process_pars): Emit bar.sync asap and alap.
13872 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13874         PR target/84954
13875         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13876         seen_label if seen_label is already set.
13878 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13880         PR target/84945
13881         * config/i386/i386.c (fold_builtin_cpu): For features above 31
13882         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13883         Use 1U instead of 1.  Formatting fixes.
13885         PR c/84953
13886         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13887         instead of TREE_TYPE (s1) for the return value.
13889 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
13891         PR tree-optimization/84946
13892         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13893         bitsize + bitsize in poly_uint64 rather than poly_int64.
13895         PR sanitizer/78651
13896         * dwarf2asm.c: Include fold-const.c.
13897         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13898         of decl rather than decl itself.
13900         PR rtl-optimization/84643
13901         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13903 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
13905         PR sanitizer/78651
13906         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13907         calling assemble_variable.
13909 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
13911         PR target/81647
13912         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13913         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13915 2018-03-19  Jim Wilson  <jimw@sifive.com>
13917         PR bootstrap/84856
13918         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13919         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13920         (riscv_first_stack_step): Likewise.
13921         (riscv_option_override): Use STACK_BOUNDARY instead of
13922         MIN_STACK_BOUNDARY.
13923         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13924         MIN_STACK_BOUNDARY.
13925         (BIGGEST_ALIGNMENT): Set to 128.
13926         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13927         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13928         STACK_BOUNDARY.
13930 2018-03-19  Richard Biener  <rguenther@suse.de>
13932         PR tree-optimization/84933
13933         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13934         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13936 2018-03-19  Richard Biener  <rguenther@suse.de>
13938         PR tree-optimization/84859
13939         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13940         (cond_if_else_store_replacement): Perform sinking operation on
13941         single-store BBs regardless of MAX_STORES_TO_SINK setting.
13942         Generalize what a BB with a single eligible store is.
13944 2018-03-19  Richard Biener  <rguenther@suse.de>
13946         PR tree-optimization/84929
13947         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13948         chrec_is_positive against non-chrec arg.
13950 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
13952         PR target/84711
13953         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13955 2018-03-18  Martin Liska  <mliska@suse.cz>
13957         PR rtl-optimization/84635
13958         * regrename.c (build_def_use): Use matches_mode only when
13959         matches >= 0.
13961 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
13963         PR tree-optimization/84913
13964         * tree-vect-loop.c (vectorizable_reduction): Don't try to
13965         vectorize chains of COND_EXPRs.
13967 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13969         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13971 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13973         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13975 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13977         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13979 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13980             Kito Cheng  <kito.cheng@gmail.com>
13982         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13983         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13984         (nds32_adjust_reg_alloc_order): New function.
13985         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13987 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
13989         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13990         nds32_print_operand, nds32_print_operand_address): Use
13991         HOST_WIDE_INT_PRINT_DEC instead.
13993 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13995         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13997 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
13999         PR target/84902
14000         * config/i386/i386.c (initial_ix86_tune_features,
14001         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14002         unsigned long long.
14003         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14004         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14005         rather than 1u << ix86_tune.  Formatting fix.
14006         (ix86_option_override_internal): Change ix86_arch_mask from
14007         unsigned int to unsigned HOST_WIDE_INT, initialize to
14008         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14009         (ix86_function_specific_restore): Likewise.
14011 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14013         PR target/84899
14014         * postreload.c (reload_combine_recognize_pattern): Perform
14015         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14016         truncate_int_for_mode the result for the destination's mode.
14018         PR c/84909
14019         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14020         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14021         Likewise.
14022         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14023         Likewise.
14025 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14027         PR target/84876
14028         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14029         regno_allocno_class_array and sorted_pseudos.
14030         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14031         insns where regno is used.
14033 2018-03-16  Martin Liska  <mliska@suse.cz>
14035         PR ipa/84833
14036         * multiple_target.c (create_dispatcher_calls): Redirect
14037         reference in the symbol table.
14039 2018-03-16  Martin Liska  <mliska@suse.cz>
14041         PR ipa/84722
14042         * multiple_target.c (create_dispatcher_calls): Redirect also
14043         an alias.
14045 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14047         PR c++/79937
14048         PR c++/82410
14049         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14050         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14051         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14053 2018-03-16  Julia Koval  <julia.koval@intel.com>
14055         * doc/invoke.texi (Skylake Server): Add CLWB.
14056         Cannonlake): Remove CLWB.
14058 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14060         PR tree-optimization/84841
14061         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14062         1 << 3.
14063         (FLOAT_ONE_CONST_TYPE): Define.
14064         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14065         (sort_by_operand_rank): Put entries with higher constant_type last
14066         rather than first to match comments.
14068 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14070         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14071         split predicate.
14073 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14075         PR c++/79085
14076         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14077         check and use address of target always.
14079 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14081         PR target/84574
14082         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14083         (indirect_thunk_bnd_needed): Likewise.
14084         (indirect_thunks_used): Likewise.
14085         (indirect_thunks_bnd_used): Likewise.
14086         (indirect_return_needed): New.
14087         (indirect_return_bnd_needed): Likewise.
14088         (output_indirect_thunk_function): Add a bool argument for
14089         function return.
14090         (output_indirect_thunk_function): Don't generate alias for
14091         function return thunk.
14092         (ix86_code_end): Call output_indirect_thunk_function to generate
14093         function return thunks.
14094         (ix86_output_function_return): Set indirect_return_bnd_needed
14095         and indirect_return_needed instead of indirect_thunk_bnd_needed
14096         and indirect_thunk_needed.
14098 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14100         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14101         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14102         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14104 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14105             Paul Hua <paul.hua.gm@gmail.com>
14107         PR c/84852
14108         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14110 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14112         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14113         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14114         resp. SFmode cases.
14116 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14118         PR target/84711
14119         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14120         instead of GET_MODE_SIZE when comparing Units.
14122 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14124         PR target/68256
14125         * varasm.c (hash_section): Return an unchangeble hash value
14126         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14127         Return !aarch64_can_use_per_function_literal_pools_p ().
14129 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14131         PR target/84860
14132         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14133         rather than address of cmode as last argument to prepare_cmp_insn.
14135 2018-03-15  Julia Koval  <julia.koval@intel.com>
14137         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14138         F_AVX512VNNI, F_AVX512BITALG): New.
14140 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14142         PR target/83451
14143         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14144         insn for floating-point loads and stores.
14146 2018-03-14  Carl Love  <cel@us.ibm.com>
14148         * config/rs6000/rs6000-c.c: Add macro definitions for
14149         ALTIVEC_BUILTIN_VEC_PERMXOR.
14150         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14151         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14152         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14153         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14154         UNSPEC_VPERMXOR.
14155         * config/doc/extend.texi: Add prototypes for vec_permxor.
14157 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14159         PR c/84852
14160         * diagnostic-show-locus.c (class layout_point): Convert m_line
14161         from int to linenum_type.
14162         (line_span::comparator): Use linenum "compare" function when
14163         comparing line numbers.
14164         (test_line_span): New function.
14165         (layout_range::contains_point): Convert param "row" from int to
14166         linenum_type.
14167         (layout_range::intersects_line_p): Likewise.
14168         (layout::will_show_line_p): Likewise.
14169         (layout::print_source_line): Likewise.
14170         (layout::should_print_annotation_line_p): Likewise.
14171         (layout::print_annotation_line): Likewise.
14172         (layout::print_leading_fixits): Likewise.
14173         (layout::annotation_line_showed_range_p): Likewise.
14174         (struct line_corrections): Likewise for field m_row.
14175         (line_corrections::line_corrections): Likewise for param "row".
14176         (layout::print_trailing_fixits): Likewise.
14177         (layout::get_state_at_point): Likewise.
14178         (layout::get_x_bound_for_row): Likewise.
14179         (layout::print_line): Likewise.
14180         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14181         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14182         * input.c (selftest::test_linenum_comparisons): New function.
14183         (selftest::input_c_tests): Call it.
14184         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14185         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14186         * selftest.h (ASSERT_GT): New macro.
14187         (ASSERT_GT_AT): New macro.
14188         (ASSERT_LT): New macro.
14189         (ASSERT_LT_AT): New macro.
14191 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14193         PR rtl-optimization/84780
14194         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14196 2018-03-14  Martin Liska  <mliska@suse.cz>
14198         * tree.c (record_node_allocation_statistics): Use
14199         get_stats_node_kind.
14200         (get_stats_node_kind): New function extracted from
14201         record_node_allocation_statistics.
14202         (free_node): Use get_stats_node_kind.
14204 2018-03-14  Richard Biener  <rguenther@suse.de>
14206         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14207         that the value-set of ANTIC_IN doesn't grow.
14209         Revert
14210         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14211         member.
14212         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14213         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14215 2018-03-14  Julia Koval  <julia.koval@intel.com>
14217         * config.gcc (icelake-client, icelake-server): New.
14218         (icelake): Remove.
14219         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14220         (initial_ix86_arch_features): Ditto.
14221         (PTA_SKYLAKE): Add SGX.
14222         (PTA_ICELAKE): Remove.
14223         (PTA_ICELAKE_CLIENT): New.
14224         (PTA_ICELAKE_SERVER): New.
14225         (ix86_option_override_internal): Split up icelake on icelake client and
14226         icelake server.
14227         (get_builtin_code_for_version): Ditto.
14228         (fold_builtin_cpu): Ditto.
14229         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14230         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14231         * config/i386/i386.h (processor_type): Ditto.
14232         * doc/invoke.texi: Ditto.
14234 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14236         PR sanitizer/83392
14237         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14238         INTEGER_CST offset, add it together with bitpos / 8 and
14239         sign extend based on POINTER_SIZE.
14241         PR target/84844
14242         Revert
14243         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14245         PR target/78090
14246         * config/i386/constraints.md (Yc): New register constraint.
14247         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14248         Use Yc constraint for alternative 2 of operand 0.  Remove
14249         preferred_for_speed attribute.
14251 2018-03-14  Richard Biener  <rguenther@suse.de>
14253         PR tree-optimization/84830
14254         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14255         with the old one to avoid oscillations.
14257 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14259         PR target/83712
14260         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14261         pseudos.
14262         (assign_by_spills): Return a flag of reload assignment failure.
14263         Do not process the reload assignment failures.  Do not spill other
14264         reload pseudos if they has the same reg class.  Update n if
14265         necessary.
14266         (lra_assign): Add a return arg.  Set up from the result of
14267         assign_by_spills call.
14268         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14269         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14270         usage_insns if it is not NULL.
14271         (spill_hard_reg_in_range): New function.
14272         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14273         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14274         function prototypes.
14275         (lra_assign): Change prototype.
14276         * lra.c (lra): Add code to deal with fails by splitting hard reg
14277         live ranges.
14279 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14281         * config/riscv/riscv.opt (mrelax): New option.
14282         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14283         "norelax" when riscv_mrelax is disabled.
14284         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14286 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14288         PR target/84743
14289         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14290         reassociation for int modes.
14292 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14294         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14295         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14296         for big-endian.
14297         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14298         * config/aarch64/aarch64-sve.md
14299         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14300         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14301         (*extend<mode><Vwide>2): Rename to...
14302         (aarch64_sve_extend<mode><Vwide>2): ...this.
14303         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14304         renaming the old pattern to...
14305         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14306         unsigned packs.
14307         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14308         define_expand, renaming the old pattern to...
14309         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14310         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14311         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14312         account when deciding which SVE instruction the optab should use.
14313         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14315 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14317         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14318         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14319         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14320         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14321         (tlsdesc_small_<mode>): Turn a define_expand and use
14322         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14323         (tlsdesc_small_advsimd_<mode>): ...this.
14324         (tlsdesc_small_sve_<mode>): New pattern.
14326 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14328         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14329         (UNSPEC_UMUL_HIGHPART): New constants.
14330         (MUL_HIGHPART): New int iteraor.
14331         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14332         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14333         define_expand.
14334         (*<su>mul<mode>3_highpart): New define_insn.
14336 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14338         PR lto/84805
14339         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14340         incomplete types.
14342 2018-03-13  Martin Liska  <mliska@suse.cz>
14344         PR ipa/84658.
14345         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14346         vector.
14347         (sem_item_optimizer::~sem_item_optimizer): Release it.
14348         (sem_item_optimizer::merge_classes): Register variable aliases.
14349         (sem_item_optimizer::fixup_pt_set): New function.
14350         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14351         * ipa-icf.h: Declare new variables and functions.
14353 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14355         PR middle-end/84834
14356         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14357         integer_pow2p@2 and test integer_pow2p in condition.
14358         (A < 0 ? C : 0): Similarly for @1.
14360         PR middle-end/84831
14361         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14362         characters starting at p contain '\0' character, don't look beyond
14363         that.
14365         PR target/84827
14366         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14367         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14369         PR target/84828
14370         * reg-stack.c (change_stack): Change update_end var from int to
14371         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14372         also call set_block_for_insn on the newly added insns and rescan.
14374         PR target/84786
14375         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14376         on the last operand.
14378         PR c++/84704
14379         * tree.c (stabilize_reference_1): Return save_expr (e) for
14380         STATEMENT_LIST even if it doesn't have side-effects.
14382 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14384         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14386 2018-03-12  Renlin Li  <renlin.li@arm.com>
14388         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14389         aarch64_output_scalar_simd_mov_immediate.
14391 2018-03-12  Martin Sebor  <msebor@redhat.com>
14393         PR tree-optimization/83456
14394         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14395         for perfectly overlapping calls to memcpy.
14396         (gimple_fold_builtin_memory_chk): Same.
14397         (gimple_fold_builtin_strcpy): Handle no-warning.
14398         (gimple_fold_builtin_stxcpy_chk): Same.
14399         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14401 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14403         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14404         parameter.  Use it for SFmode.
14405         (rs6000_function_arg_advance_1): Adjust.
14406         (rs6000_function_arg): Adjust.
14407         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14409 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14411         PR rtl-optimization/84169
14412         PR rtl-optimization/84780
14413         * combine.c (can_combine_p): Check for a 2-insn combination whether
14414         the destination register is used between the two insns, too.
14416 2018-03-12  Richard Biener  <rguenther@suse.de>
14418         PR tree-optimization/84803
14419         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14420         for refs DR analysis didn't process.
14422 2018-03-12  Richard Biener  <rguenther@suse.de>
14424         PR tree-optimization/84777
14425         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14426         force-vectorize loops ignore whether we are optimizing for size.
14428 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14430         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14431         (TARGET_MD_ASM_ADJUST): Define.
14433 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14434             Kito Cheng  <kito.cheng@gmail.com>
14435             Chung-Ju Wu  <jasonwucj@gmail.com>
14437         * config/nds32/nds32.c (nds32_compute_stack_frame,
14438         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14439         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14440         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14441         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14442         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14443         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14444         * config/nds32/nds32.md (prologue, epilogue): Use macro
14445         NDS32_V3PUSH_AVAILABLE_P to do checking.
14447 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14449         PR debug/58150
14450         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14451         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14452         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14453         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14454         addition of most attributes on !orig_type_die or the attribute not
14455         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14457 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14458             Chung-Ju Wu  <jasonwucj@gmail.com>
14460         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14461         __NDS32_VH__ macro.
14462         * config/nds32/nds32.opt (mvh): New option.
14464 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14465             Chung-Ju Wu  <jasonwucj@gmail.com>
14467         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14468         function.
14469         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14470         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14471         definition.
14473 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14474             Chung-Ju Wu  <jasonwucj@gmail.com>
14476         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14477         function.
14478         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14479         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14481 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14482             Kito Cheng  <kito.cheng@gmail.com>
14483             Chung-Ju Wu  <jasonwucj@gmail.com>
14485         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14486         UNSPEC_FFMISM and UNSPEC_FLMISM.
14487         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14488         for ffb, ffmism and flmism.
14489         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14490         (unspec_ffmism): Ditto.
14491         (unspec_flmism): Ditto.
14492         (nds32_expand_builtin_impl): Check if string extension is available.
14493         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14494         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14496 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14498         Reverting patch:
14499         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14501         PR target/83712
14502         * lra-assigns.c (assign_by_spills): Return a flag of reload
14503         assignment failure.  Do not process the reload assignment
14504         failures.  Do not spill other reload pseudos if they has the same
14505         reg class.
14506         (lra_assign): Add a return arg.  Set up from the result of
14507         assign_by_spills call.
14508         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14509         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14510         usage_insns if it is not NULL.
14511         (spill_hard_reg_in_range): New function.
14512         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14513         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14514         function prototypes.
14515         (lra_assign): Change prototype.
14516         * lra.c (lra): Add code to deal with fails by splitting hard reg
14517         live ranges.
14519 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14521         PR target/84807
14522         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14524 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14526         PR debug/84620
14527         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14528         (dw_val_node): Add val_symbolic_view.
14529         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14530         (symview_upper_bound): New.
14531         (new_line_info_table): Initialize symviews_since_reset.
14532         (dwarf2out_source_line): Count symviews_since_reset and set
14533         symview_upper_bound.
14534         (dw_val_equal_p): Handle symview.
14535         (add_AT_symview): New.
14536         (print_dw_val): Handle symview.
14537         (attr_checksum, attr_checksum_ordered): Likewise.
14538         (same_dw_val_p, size_of_die): Likewise.
14539         (value_format, output_die): Likewise.
14540         (add_high_low_attributes): Use add_AT_symview for entry_view.
14541         (dwarf2out_finish): Reset symview_upper_bound, clear
14542         zero_view_p.
14544 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14546         PR target/83969
14547         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14548         Add strict argument and use it.
14549         (rs6000_split_multireg_move): Update for new strict argument.
14550         (mem_operand_gpr): Disallow all non-offsettable addresses.
14551         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14553 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14555         PR target/84772
14556         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14557         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14558         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14560         PR c++/84767
14561         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14562         decl, use remap_type if we want to use the type.
14564 2018-03-09  Martin Sebor  <msebor@redhat.com>
14566         PR tree-optimization/84526
14567         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14568         Remove dead code.
14569         (builtin_access::generic_overlap): Be prepared to handle non-array
14570         base objects.
14572 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
14574         PR rtl-optimization/84682
14575         * lra-constraints.c (process_address_1): Check is_address flag
14576         for address constraints.
14577         (process_alt_operands): Likewise.
14578         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14579         preprocess_constraints.
14580         * recog.h (preprocess_constraints): Add oploc parameter.
14581         Adjust callers.
14582         * recog.c (preprocess_constraints): Test address_operand for
14583         CT_ADDRESS constraints.
14585 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14587         PR target/83712
14588         * lra-assigns.c (assign_by_spills): Return a flag of reload
14589         assignment failure.  Do not process the reload assignment
14590         failures.  Do not spill other reload pseudos if they has the same
14591         reg class.
14592         (lra_assign): Add a return arg.  Set up from the result of
14593         assign_by_spills call.
14594         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14595         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14596         usage_insns if it is not NULL.
14597         (spill_hard_reg_in_range): New function.
14598         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14599         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14600         function prototypes.
14601         (lra_assign): Change prototype.
14602         * lra.c (lra): Add code to deal with fails by splitting hard reg
14603         live ranges.
14605 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14607         PR target/83193
14608         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14609         Accept complain bool parameter.  Only emit errors if it is true.
14610         (arm_parse_cpu_option_name): Likewise.
14611         (arm_target_thumb_only): Adjust callers of the above.
14612         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14613         prototype to take a default true bool parameter.
14614         (arm_parse_arch_option_name): Likewise.
14616 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
14617             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14619         PR jit/64089
14620         PR jit/84288
14621         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14622         * configure: Regenerate.
14623         * configure.ac ("linker --version-script option"): New.
14624         ("linker soname option"): New.
14626 2018-03-09  Richard Biener  <rguenther@suse.de>
14628         PR tree-optimization/84775
14629         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14630         immediate uses of predicate stmts and mark them modified.
14632         Revert
14633         PR tree-optimization/84178
14634         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14635         to caller.
14636         (version_loop_for_if_conversion): Delay update_ssa call.
14637         (tree_if_conversion): Delay update_ssa until after predicate
14638         insertion.
14640 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
14642         PR target/84763
14643         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14644         when the function accesses prior frames.
14646 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14648         PR debug/84456
14649         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14650         gen_llsym, otherwise call maybe_gen_llsym.
14652         PR inline-asm/84742
14653         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14654         has ',' character inside of it.
14656 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14658         PR target/84748
14659         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14660         as clobbering CC_REGNUM.
14662 2018-03-08  Richard Biener  <rguenther@suse.de>
14664         PR middle-end/84552
14665         * tree-scalar-evolution.c: Include tree-into-ssa.h.
14666         (follow_copies_to_constant): Do not follow SSA names registered
14667         for update.
14669 2018-03-08  Richard Biener  <rguenther@suse.de>
14671         PR tree-optimization/84178
14672         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14673         to caller.
14674         (version_loop_for_if_conversion): Delay update_ssa call.
14675         (tree_if_conversion): Delay update_ssa until after predicate
14676         insertion.
14678 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
14680         PR tree-optimization/84178
14681         * tree-if-conv.c (release_bb_predicate): Remove the
14682         the assertion that the stmts have NULL use_ops.
14683         Discard the statements, asserting that they haven't
14684         yet been added to a BB.
14686 2018-03-08  Richard Biener  <rguenther@suse.de>
14688         PR tree-optimization/84746
14689         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14690         (phi_translate): Pass in destination ANTIC_OUT set.
14691         (phi_translate_1): Likewise.  For a simplified result lookup
14692         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14693         (phi_translate_set): Adjust.
14694         (do_pre_regular_insertion): Likewise.
14695         (do_pre_partial_partial_insertion): Likewise.
14697 2018-03-08  Martin Liska  <mliska@suse.cz>
14699         PR gcov-profile/84735
14700         * doc/gcov.texi: Document usage of profile files.
14701         * gcov-io.h: Document changes in the format.
14703 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
14705         PR debug/84404
14706         PR debug/84408
14707         * dwarf2out.c (struct dw_line_info_table): Update comments for
14708         view == -1.
14709         (FORCE_RESET_NEXT_VIEW): New.
14710         (FORCE_RESETTING_VIEW_P): New.
14711         (RESETTING_VIEW_P): Check for -1 too.
14712         (ZERO_VIEW_P): Likewise.
14713         (new_line_info_table): Force-reset next view.
14714         (dwarf2out_begin_function): Likewise.
14715         (dwarf2out_source_line): Simplify zero_view_p initialization.
14716         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14717         view directly.  Omit view when omitting .loc at line 0.
14719 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14721         PR tree-optimization/84740
14722         * tree-switch-conversion.c (process_switch): Call build_constructors
14723         only if info.phi_count is non-zero.
14725         PR tree-optimization/84739
14726         * tree-tailcall.c (find_tail_calls): Check call arguments against
14727         DECL_ARGUMENTS (current_function_decl) rather than
14728         DECL_ARGUMENTS (func) when checking for tail recursion.
14730 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14732         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14733         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14734         Volker Reichelt's entry and add entries for people that perform
14735         GCC fuzzy testing and report numerous bugs.
14737 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
14739         PR target/82411
14740         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14741         readonly data in sdata, if that is disabled.
14742         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14743         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14744         -mreadonly-in-sdata option.
14746 2018-03-07  Martin Sebor  <msebor@redhat.com>
14748         PR tree-optimization/84468
14749         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14750         basic block when looking for nul assignment.
14752 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
14754         PR target/84277
14755         * except.h (output_function_exception_table): Adjust prototype.
14756         * except.c (output_function_exception_table): Remove FNNAME parameter
14757         and add SECTION parameter.  Ouput one part of the table at a time.
14758         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14759         the first part of the exception table and emit unwind directives.
14760         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14761         (i386_pe_seh_cold_init): Likewise.
14762         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14763         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14764         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14765         (ix86_output_call_insn): Emit a nop in one more case for SEH.
14766         * config/i386/winnt.c: Include except.h.
14767         (struct seh_frame_state): Add reg_offset, after_prologue and
14768         in_cold_section fields.
14769         (i386_pe_seh_end_prologue): Set seh->after_prologue.
14770         (i386_pe_seh_cold_init): New function.
14771         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14772         to seh->in_cold_section.
14773         (seh_emit_push): Record the offset of the push.
14774         (seh_emit_save): Record the offet of the save.
14775         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14776         Test seh->after_prologue to disregard the epilogue.
14777         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14778         (i386_pe_end_cold_function): New function.
14780 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14782         PR fortran/84565
14783         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14784         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14786         PR c++/84704
14787         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14788         on tmp_var.
14789         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14790         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14792         PR middle-end/84723
14793         * multiple_target.c: Include tree-inline.h and intl.h.
14794         (expand_target_clones): Diagnose and fail if node->definition and
14795         !tree_versionable_function_p (node->decl).
14797 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
14799         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14800         sprint_ul.
14801         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14802         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14803         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14805 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14807         PR target/84710
14808         * combine.c (try_combine): Use reg_or_subregno instead of handling
14809         just paradoxical SUBREGs and REGs.
14811 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
14813         * config/arc/arc.c (arc_finalize_pic): Remove function.
14814         (arc_must_save_register): We use single base PIC register, remove
14815         checks to save/restore the PIC register.
14816         (arc_expand_prologue): Likewise.
14817         * config/arc/arc-protos.h (arc_set_default_type_attributes):
14818         Remove.
14819         (arc_verify_short): Likewise.
14820         (arc_attr_type): Likewise.
14821         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14822         (walk_stores): Likewise.
14823         (arc_address_cost): Make it static.
14824         (arc_verify_short): Likewise.
14825         (branch_dest): Likewise.
14826         (arc_attr_type): Likewise.
14827         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14828         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14829         (arc_final_prescan_insn): Remove inserting the nops due to
14830         hardware hazards.  It is done in reorg step.
14831         (insn_length_variant_t): Remove.
14832         (insn_length_parameters_t): Likewise.
14833         (arc_insn_length_parameters): Likewise.
14834         (arc_get_insn_variants): Likewise.
14835         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14837 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14839         PR inline-asm/84683
14840         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14841         assertion failure.
14843         PR tree-optimization/84687
14844         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14845         on new_node->decl.
14846         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14848 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14850         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14851         Rename to ppc_speculation_barrier.
14852         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14853         __builtin_ppc_speculation_barrier.
14855 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14857         PR target/84700
14858         * combine.c (combine_simplify_rtx): Don't try to simplify if
14859         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14860         are equal to x.
14862 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
14864         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14865         to 32 bytes when compiling for POWER9.
14867 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14869         PR target/84564
14870         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14871         regparm >= 3 with no arg reg available also for calls with
14872         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
14874         PR target/84524
14875         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14876         orig,vex.
14877         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
14879 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
14881         PR target/84264
14882         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14884 2018-03-05  Richard Biener  <rguenther@suse.de>
14886         PR tree-optimization/84486
14887         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14888         When inserting a __builtin_assume_aligned call set the LHS
14889         SSA name alignment info accordingly.
14891 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
14893         PR tree-optimization/84114
14894         * config/aarch64/aarch64.c (aarch64_reassociation_width)
14895         Avoid reassociation of FLOAT_MODE addition.
14897 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
14899         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14900         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14901         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14902         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14903         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14904         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14905         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14906         and -mwbnoinvd.
14907         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14908         __builtin_ia32_wbinvd): New builtins.
14909         (SPECIAL_ARGS2): New.
14910         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14911         (SPECIAL_ARGS2): New.
14912         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14913         (ix86_valid_target_attribute_inner_p): Ditto.
14914         (ix86_init_mmx_sse_builtins): Add special_args2.
14915         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14916         TARGET_WBNOINVD_P): New.
14917         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14918         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14919         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14920         * config/i386/immintrin.h (_wbinvd): New intrinsic.
14921         * config/i386/pconfigintrin.h: New file.
14922         * config/i386/wbnoinvdintrin.h: Ditto.
14923         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14924         wbnoinvdintrin.h.
14925         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14927 2018-03-05  Richard Biener  <rguenther@suse.de>
14929         PR tree-optimization/84670
14930         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14931         member.
14932         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14933         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14934         (compute_antic_aux): Only assert the number of values in ANTIC_IN
14935         doesn't grow if all successors (recursively) were visited at least
14936         once.
14938 2018-03-05  Richard Biener  <rguenther@suse.de>
14940         PR tree-optimization/84650
14941         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14942         if executed in the loop pipeline.
14944 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
14946         * doc/configfiles.texi (Configuration Files): Move info about
14947         conditionalizing $target-protos.h to...
14948         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
14949         differs from $target-protos.h.
14951 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
14952             Chung-Ju Wu  <jasonwucj@gmail.com>
14954         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14955         * config/nds32/nds32-multiple.md (setmemsi): Define.
14956         * config/nds32/nds32-memory-manipulation.c
14957         (nds32_gen_dup_4_byte_to_word_value): New.
14958         (emit_setmem_word_loop): New.
14959         (emit_setmem_byte_loop): New.
14960         (nds32_expand_setmem_loop): New.
14961         (nds32_expand_setmem_loop_v3m): New.
14962         (nds32_expand_setmem_unroll): New.
14963         (nds32_expand_setmem): New.
14965 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14966             Chung-Ju Wu  <jasonwucj@gmail.com>
14968         * config/nds32/nds32-memory-manipulation.c
14969         (nds32_emit_load_store): New.
14970         (nds32_emit_post_inc_load_store): New.
14971         (nds32_emit_mem_move): New.
14972         (nds32_emit_mem_move_block): New.
14973         (nds32_expand_movmemsi_loop_unknown_size): New.
14974         (nds32_expand_movmemsi_loop_known_size): New.
14975         (nds32_expand_movmemsi_loop): New.
14976         (nds32_expand_movmemsi_unroll): New.
14977         (nds32_expand_movmemqi): Rename ...
14978         (nds32_expand_movmemsi): ... to this.
14979         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14980         (movmemsi): ... to this.
14981         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14982         (nds32_expand_movmemsi): ... to this.
14984 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14985             Monk Chiang  <sh.chiang04@gmail.com>
14986             Chung-Ju Wu  <jasonwucj@gmail.com>
14988         * config/nds32/nds32-protos.h
14989         (nds32_expand_load_multiple): New arguments.
14990         (nds32_expand_store_multiple): Ditto.
14991         (nds32_valid_multiple_load_store): Rename ...
14992         (nds32_valid_multiple_load_store_p): ... to this.
14993         * config/nds32/nds32-memory-manipulation.c
14994         (nds32_expand_load_multiple): Refine implementation.
14995         (nds32_expand_store_multiple): Ditto.
14996         * config/nds32/nds32-multiple.md
14997         (load_multiple): Update nds32_expand_load_multiple interface.
14998         (store_multiple): Update nds32_expand_store_multiple interface.
14999         * config/nds32/nds32-predicates.c
15000         (nds32_valid_multiple_load_store): Rename ...
15001         (nds32_valid_multiple_load_store_p): ... to this and refine
15002         implementation.
15003         * config/nds32/predicates.md
15004         (nds32_load_multiple_and_update_address_operation): New predicate.
15005         (nds32_store_multiple_and_update_address_operation): New predicate.
15007 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15008             Chung-Ju Wu  <jasonwucj@gmail.com>
15010         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15011         (combo): New attribute.
15012         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15014 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15016         * config/nds32/nds32.opt: Change -mcmodel= default value.
15018 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15019             Monk Chiang  <sh.chiang04@gmail.com>
15020             Chung-Ju Wu  <jasonwucj@gmail.com>
15022         * config/nds32/constants.md (unspec_element): New enum.
15023         * config/nds32/constraints.md (Umw): New constraint.
15024         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15025         * config/nds32/nds32-intrinsic.md: Likewise.
15026         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15027         (nds32_valid_smw_lwm_base_p): New.
15028         (nds32_output_smw_single_word): New.
15029         (nds32_output_lmw_single_word): New.
15030         (nds32_expand_unaligned_load): New.
15031         (nds32_expand_unaligned_store): New.
15032         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15033         (nds32_output_smw_single_word): Declare.
15034         (nds32_output_lmw_single_word): Declare.
15035         (nds32_expand_unaligned_load): Declare.
15036         (nds32_expand_unaligned_store): Declare.
15037         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15038         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15039         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15040         NDS32_BUILTIN_UASTORE_DW.
15041         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15042         predicate.
15044 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15045             Kito Cheng  <kito.cheng@gmail.com>
15046             Chung-Ju Wu  <jasonwucj@gmail.com>
15048         * config/nds32/nds32-intrinsic.c
15049         (nds32_expand_builtin_null_ftype_reg): Delete.
15050         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15051         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15052         (nds32_read_argument): New.
15053         (nds32_legitimize_target): Ditto.
15054         (nds32_legitimize_argument): Ditto.
15055         (nds32_check_constant_argument): Ditto.
15056         (nds32_expand_unop_builtin): Ditto.
15057         (nds32_expand_unopimm_builtin): Ditto.
15058         (nds32_expand_binop_builtin): Ditto.
15059         (nds32_builtin_decl_impl): Ditto.
15060         (builtin_description): Ditto.
15061         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15062         (nds32_init_builtins_impl): Ditto.
15063         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15064         (nds32_builtin_decl): New.
15065         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15066         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15068 2018-03-02  Jeff Law  <law@redhat.com>
15070         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15071         (redundant_insn, fill_simple_delay_slots): Likewise.
15072         (fill_slots_from_thread): Likewise.
15073         * resource.c (mark_referenced_resources): Likewise.
15074         (mark_set_resources, find_dead_or_set_registers): Likewise.
15076 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15078         * substring-locations.h (format_warning_va): Formatting fix for
15079         ATTRIBUTE_GCC_DIAG.
15080         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15081         argument.
15082         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15083         * substring-locations.c: Include intl.h.
15084         (format_warning_va): Turned into small wrapper around
15085         format_warning_n_va, renamed to ...
15086         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15087         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15088         use ngettext.
15089         (format_warning_at_substring_n): New function.
15090         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15091         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15092         format_warning_at_substring with just a shorter name instead of
15093         const function pointer.
15094         (fmtwarn_n): New function.
15095         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15096         appropriate, get rid of all the fmtstr temporaries, move conditionals
15097         with G_() wrapped string literals directly into fmtwarn arguments,
15098         cast dir.len to (int), formatting fixes.
15100 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15102         * doc/invoke.texi: Remove "Cilk Plus" references.
15104 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15105             Richard Biener  <rguenther@suse.de>
15107         PR ipa/84628
15108         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15109         for error or warning attributes if CALL_FROM_THUNK_P is set.
15110         Formatting fixes.
15112 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15114         PR target/56540
15115         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15116         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15118         PR target/56540
15119         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15120         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15122         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15123         instead of -1U in last predictors element's probability member.
15125 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15127         PR ipa/83983
15128         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15129         arguments if they are comparable.
15131 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15133         PR tree-optimization/84634
15134         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15135         masks and masked_loop_p with a single loop_masks, making sure it's
15136         null for bb vectorization.
15138 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15140         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15141         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15142         loop->force_vectorize to check whether there is no alias.
15144 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15146         PR target/84614
15147         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15148         prototypes.
15149         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15150         comments.
15151         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15152         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15153         instead of a loop around prev_real_insn.
15154         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15155         prev_real_insn.
15157         PR inline-asm/84625
15158         * config/i386/i386.c (ix86_print_operand): Use conditional
15159         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15160         zero vector.
15162 2018-03-02  Richard Biener  <rguenther@suse.de>
15164         PR tree-optimization/84427
15165         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15166         (bitmap_set_subtract_values): Rewrite to handle multiple
15167         exprs per value.
15168         (clean): Likewise.
15169         (prune_clobbered_mems): Likewise.
15170         (phi_translate): Take edge instead of pred/phiblock.
15171         (phi_translate_1): Likewise.
15172         (phi_translate_set): Likewise.  Insert all translated
15173         exprs for a value into the set, keeping possibly multiple
15174         expressions per value.
15175         (compute_antic_aux): Adjust for phi_translate changes.
15176         When intersecting union the expressions and prune those
15177         not in the final value set, keeping possibly multiple
15178         expressions per value.  Do not use value-insertion
15179         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15180         all expressions.  Add verification that the value-sets
15181         only shrink during iteration.
15182         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15183         (do_pre_regular_insertion): Likewise.
15184         (do_pre_partial_partial_insertion): Likewise.
15186 2018-03-02  Richard Biener  <rguenther@suse.de>
15188         PR target/82005
15189         * config/darwin.c (saved_debug_info_level): New static global.
15190         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15191         (darwin_asm_lto_end): Restore debug info generation settings.
15193 2018-03-01  Martin Liska  <mliska@suse.cz>
15195         PR sanitizer/82484
15196         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15197         volatile arguments.
15199 2018-03-01  Richard Biener  <rguenther@suse.de>
15201         PR debug/84645
15202         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15203         type annotation with LTO when debug was disabled at compile-time.
15205 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15207         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15208         XINT with INTVAL.
15209         (mips_final_postscan_insn): Likewise.
15211 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15213         PR rtl-optimization/84528
15214         * alias.c (init_alias_target): Add commentary.
15215         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15216         a unique base value if the frame pointer is not eliminated
15217         to the stack pointer.
15219 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15221         PR rtl-optimization/83327
15222         * lra-int.h (hard_regs_spilled_into): Declare.
15223         * lra.c (hard_regs_spilled_into): Define.
15224         (init_reg_info): Init hard_regs_spilled_into.
15225         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15226         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15227         (process_bb_lives): Handle hard_regs_spilled_into.
15228         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15229         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15231 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15233         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15234         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15235         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15236         * config/rs6000/aix72.h: New file.
15238 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15240         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15241         instead of warning_at with conditional singular and plural messages
15242         where possible.
15244         PR target/52991
15245         * stor-layout.c (update_alignment_for_field): For
15246         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15247         && !DECL_PACKED (field), do the alignment update, just use
15248         only desired_align instead of MAX (type_align, desired_align)
15249         as the alignment.
15250         (place_field): Don't do known_align < desired_align handling
15251         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15252         is non-NULL, instead do it after rli->prev_field handling and
15253         only if not within a bitfield word.  For DECL_PACKED (field)
15254         use type_align of BITS_PER_UNIT.
15256 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15258         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15259         superfluous parentheses and trailing spaces.
15261 2018-02-28  Richard Biener  <rguenther@suse.de>
15263         PR tree-optimization/84584
15264         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15265         SCoPs with fake exit edge.
15267 2018-02-28  Martin Liska  <mliska@suse.cz>
15269         PR testsuite/84597
15270         * timevar.c (timer::print): Fix format to properly print 100%
15271         values.
15273 2018-02-28  Richard Biener  <rguenther@suse.de>
15275         PR middle-end/84607
15276         * genmatch.c (capture_info::walk_match): Do not mark
15277         captured expressions without operands as expr_p given
15278         they act more like predicates and should be subject to
15279         "lost tail" side-effect preserving.
15281 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15283         PR rtl-optimization/81611
15284         * auto-inc-dec.c (attempt_change): Move dead note from
15285         mem_insn if it's the next use of regno
15286         (find_address): Take address use of reg holding
15287         non-incremented value.  Add parm to limit search to the named
15288         reg only.
15289         (merge_in_block): Attempt to use a mem insn that is the next
15290         use of the original regno.
15292 2018-02-27  Martin Sebor  <msebor@redhat.com>
15294         PR c++/83871
15295         * doc/invoke.texi (-Wmissing-attributes): New option.
15296         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15298 2018-02-27  Martin Sebor  <msebor@redhat.com>
15300         PR translation/84207
15301         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15302         n argument to unsigned HOST_WIDE_INT.
15303         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15304         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15305         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15306         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15308 2018-02-27  Richard Biener  <rguenther@suse.de>
15310         PR tree-optimization/84512
15311         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15312         Do not use the estimate returned from record_stmt_cost for
15313         the scalar iteration cost but sum properly using add_stmt_cost.
15315 2018-02-27  Richard Biener  <rguenther@suse.de>
15317         PR tree-optimization/84466
15318         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15319         Adjust last change to less strictly validate use operands.
15321 2018-02-27  Martin Liska  <mliska@suse.cz>
15323         PR gcov-profile/84548
15324         * gcov.c (process_file): Allow partial overlap and consider it
15325         also as group functions.
15326         (output_lines): Properly calculate range of lines for a group.
15328 2018-02-27  Martin Liska  <mliska@suse.cz>
15330         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15331         'ggc' suffixes.  Change first column width.
15332         (timer::print): Fix formatting of the column.
15334 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15336         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15337         preserve inline entry blocks for the sake of debug inline
15338         entry point markers alone.
15339         (remove_unused_locals): Suggest in comments a better place to
15340         force the preservation of inline entry blocks that are
15341         otherwise unused, but do not preserve them.
15343 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15345         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15347 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15349         PR target/84039
15350         * config/i386/constraints.md (Bs): Replace
15351         ix86_indirect_branch_register with
15352         TARGET_INDIRECT_BRANCH_REGISTER.
15353         (Bw): Likewise.
15354         * config/i386/i386.md (indirect_jump): Likewise.
15355         (tablejump): Likewise.
15356         (*sibcall_memory): Likewise.
15357         (*sibcall_value_memory): Likewise.
15358         Peepholes of indirect call and jump via memory: Likewise.
15359         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15360         (*sibcall_value_GOT_32): Likewise.
15361         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15362         (GOT_memory_operand): Likewise.
15363         (call_insn_operand): Likewise.
15364         (sibcall_insn_operand): Likewise.
15365         (GOT32_symbol_operand): Likewise.
15366         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15368 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15370         PR rtl-optimization/83496
15371         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15372         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15373         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15374         redundant insn, if any.
15375         (relax_delay_slots): Likewise.
15376         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15378 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15380         PR tree-optimization/83965
15381         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15382         that grouped statements are part of a reduction chain.  Return
15383         true if the statement is not marked as a reduction itself but
15384         is part of a group.
15385         (vect_recog_dot_prod_pattern): Don't check whether the statement
15386         is part of a group here.
15387         (vect_recog_sad_pattern): Likewise.
15388         (vect_recog_widen_sum_pattern): Likewise.
15390 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15392         PR debug/84545
15393         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15395 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15397         PR target/84530
15398         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15399         the bool argument.
15400         (ix86_output_indirect_function_return): New prototype.
15401         (ix86_split_simple_return_pop_internal): Likewise.
15402         * config/i386/i386.c (indirect_return_via_cx): New.
15403         (indirect_return_via_cx_bnd): Likewise.
15404         (indirect_thunk_name): Handle return va CX_REG.
15405         (output_indirect_thunk_function): Create alias for
15406         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15407         (ix86_output_indirect_jmp): Remove the bool argument.
15408         (ix86_output_indirect_function_return): New function.
15409         (ix86_split_simple_return_pop_internal): Likewise.
15410         * config/i386/i386.md (*indirect_jump): Don't pass false
15411         to ix86_output_indirect_jmp.
15412         (*tablejump_1): Likewise.
15413         (simple_return_pop_internal): Change it to define_insn_and_split.
15414         Call ix86_split_simple_return_pop_internal to split it for
15415         -mfunction-return=.
15416         (simple_return_indirect_internal): Call
15417         ix86_output_indirect_function_return instead of
15418         ix86_output_indirect_jmp.
15420 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15422         PR bootstrap/84405
15423         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15424         memset and value initialization afterwards.
15426 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15428         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15430 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15432         PR target/84521
15433         * common/config/aarch64/aarch64-common.c
15434         (aarch_option_optimization_table[]): Switch
15435         off fomit-frame-pointer
15437 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15438             Chung-Ju Wu  <jasonwucj@gmail.com>
15440         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15441         volatile memory.
15442         (store_multiple): Ditto.
15444 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15446         * config.gcc: Add --with-cpu support for nds32 target.
15447         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15448         * config/nds32/nds32.opt: Add -mcpu= option.
15450 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15452         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15453         isel=yes): Warn for these deprecated options.
15455 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15457         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15458         ISA_2_5_MASKS_EMBEDDED.
15460 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15462         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15463         p->max as pointers rather than using iterative_hash_expr.
15465 2018-02-23  Carl Love  <cel@us.ibm.com>
15467         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15468         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15469         BU_P8V_OVERLOAD_2.
15470         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15471         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15472         P8V_BUILTIN_VEC_VUNSIGNED2.
15474 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15476         PR target/81572
15477         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15478         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15479         LRA_UNKNOWN_ALT.
15480         * lra-constraints.c (curr_insn_transform): Set up
15481         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15482         LRA_UNKNOWN_ALT.
15483         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15484         * lra-eliminations.c (spill_pseudos): Ditto.
15485         (process_insn_for_elimination): Ditto.
15486         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15487         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15488         LRA_NON_CLOBBERED_ALT.
15490 2018-02-22  Martin Sebor  <msebor@redhat.com>
15492         PR tree-optimization/84480
15493         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15494         to maybe_diag_stxncpy_trunc.  Call it.
15495         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15496         from gimple_fold_builtin_strcpy.  Print inlining stack.
15497         (handle_builtin_stxncpy): Print inlining stack.
15498         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15500 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15502         PR target/84176
15503         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15504         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15505         and -fcheck-pointer-bounds are used together.
15506         (indirect_thunk_prefix): New enum.
15507         (indirect_thunk_need_prefix): New function.
15508         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15509         "_nt" instead of "_bnd" for NOTRACK prefix.
15510         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15511         (output_indirect_thunk_function): Likewise.
15512         (): Likewise.
15513         (ix86_code_end): Update output_indirect_thunk_function calls.
15514         (ix86_output_indirect_branch_via_reg): Replace
15515         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15516         (ix86_output_indirect_branch_via_push): Likewise.
15517         (ix86_output_function_return): Likewise.
15518         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15519         incompatible with -fcf-protection=branch and
15520         -fcheck-pointer-bounds.
15522 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15524         PR target/83335
15525         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15526         Change gcc_assert call to output_operand_lossage.
15528 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15530         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15532 2018-02-22  DJ Delorie  <dj@redhat.com>
15533             Sebastian Perta  <sebastian.perta@renesas.com>
15534             Oleg Endo  <olegendo@gcc.gnu.org>
15536         * config/rx/rx.c (rx_rtx_costs): New function.
15537         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15539 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15541         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15543 2018-02-22  Martin Liska  <mliska@suse.cz>
15545         PR driver/83193
15546         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15547         Add "native" as a possible value.
15549 2018-02-22  Martin Liska  <mliska@suse.cz>
15551         PR driver/83193
15552         * config/i386/i386.c (ix86_option_override_internal):
15553         Add "native" as a possible value for -march and -mtune.
15555 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15557         PR target/84502
15558         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15559         to all type variants.
15561         PR tree-optimization/84503
15562         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15563         width as info->bitpos + info->bitsize - start.
15564         (merged_store_group::merge_overlapping): Simplify width computation.
15565         (check_no_overlap): New function.
15566         (imm_store_chain_info::try_coalesce_bswap): Compute expected
15567         start + width and last_order of the group, fail if check_no_overlap
15568         fails.
15569         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15570         to group if check_no_overlap fails.
15572 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15574         * config/rs6000/altivec.md: Delete contraint arguments to
15575         define_expand, define_split, and define_peephole2, and in
15576         define_insn_and_split if always unused.
15577         * config/rs6000/darwin.md: Ditto.
15578         * config/rs6000/dfp.md: Ditto.
15579         * config/rs6000/rs6000.md: Ditto.
15580         * config/rs6000/sync.md: Ditto.
15581         * config/rs6000/vector.md: Ditto.
15582         * config/rs6000/vsx.md: Ditto.
15584 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15586         * config/rs6000/altivec.md: Write output control strings as braced
15587         blocks instead of double-quoted strings.
15588         * config/rs6000/darwin.md: Ditto.
15589         * config/rs6000/rs6000.md: Ditto.
15590         * config/rs6000/vector.md: Ditto.
15591         * config/rs6000/vsx.md: Ditto.
15593 2018-02-21  Jason Merrill  <jason@redhat.com>
15595         PR c++/84314 - ICE with templates and fastcall attribute.
15596         * attribs.c (build_type_attribute_qual_variant): Remove assert.
15598 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15600         * ipa-cp.c (determine_versionability): Fix comment typos.
15602 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15604         PR c/84229
15605         * ipa-cp.c (determine_versionability): Do not version functions caling
15606         va_arg_pack.
15608 2018-02-21  Martin Liska  <mliska@suse.cz>
15610         PR driver/83193
15611         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15612         Add "native" as a possible value.
15613         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
15614         the macro when native cpu detection is available.
15616 2018-02-21  Martin Liska  <mliska@suse.cz>
15618         PR driver/83193
15619         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15620         Add "native" as a possible value.
15621         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15622         when native cpu detection is available.
15624 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
15625             Martin Sebor  <msebor@redhat.com>
15627         PR tree-optimization/84478
15628         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15629         false.
15630         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15631         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15632         support which is conservatively correct, for 2 only stay conservative
15633         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
15634         argument to the 2 argument get_range_strlen, adjust 6 arg
15635         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15636         false.
15637         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15638         (gimple_fold_builtin_strlen): Pass true as last argument to
15639         get_range_strlen.
15641 2018-02-20  Martin Sebor  <msebor@redhat.com>
15643         PR middle-end/84095
15644         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15645         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
15646         (builtin_memref::builtin_memref): Factor out parts into
15647         set_base_and_offset and call it.
15649 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15651         PR middle-end/84406
15652         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15653         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15654         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
15655         search at the associated MODE_INT.
15657 2018-02-20  Jeff Law  <law@redhat.com>
15659         PR middle-end/82123
15660         PR tree-optimization/81592
15661         PR middle-end/79257
15662         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15663         for range data rather than using global data.
15664         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15665         range data rather than using global data.
15666         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15667         pass it to children as needed.
15668         (struct directive::fmtresult): Similarly.
15669         (struct directive::set_width): Similarly.
15670         (struct directive::set_precision): Similarly.
15671         (format_integer, format_directive, parse_directive): Similarly.
15672         (format_none): Accept unnamed vr_values parameter.
15673         (format_percent, format_floating, format_character): Similarly.
15674         (format_string, format_plain): Similarly.
15675         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15676         the EVRP range analyzer for range data rather than using global data.
15677         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15678         gimple-ssa-evrp-analyze.h
15679         (class sprintf_dom_walker): Add after_dom_children member function.
15680         Add evrp_range_analyzer member.
15681         (sprintf_dom_walker::before_dom_children): Call into the EVRP
15682         range analyzer as needed.
15683         (sprintf_dom_walker::after_dom_children): New member function.
15684         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15685         if not optimizing.
15686         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15687         (evrp_range_analyzer::pop_to_marker): Likewise.
15689 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15691         PR tree-optimization/84419
15692         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15693         with the required type if its current type is compatible but
15694         different.
15696 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
15698         PR middle-end/82004
15699         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15700         after vectorization.
15702 2018-02-20  Martin Liska  <mliska@suse.cz>
15704         PR driver/83193
15705         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15706         possible values if we don't have a hint.
15708 2018-02-20  Martin Liska  <mliska@suse.cz>
15710         PR c/84310
15711         PR target/79747
15712         * final.c (shorten_branches): Build align_tab array with one
15713         more element.
15714         * opts.c (finish_options): Add alignment option limit check.
15715         (MAX_CODE_ALIGN): Likewise.
15716         (MAX_CODE_ALIGN_VALUE): Likewise.
15717         * doc/invoke.texi: Document maximum allowed option value for
15718         all -falign-* options.
15720 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
15722         PR target/84146
15723         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15724         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15725         * var-tracking.c (emit_note_insn_var_location): Remove all references
15726         to NOTE_INSN_CALL_ARG_LOCATION.
15727         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15728         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15729         Use copy_rtx_if_shared.
15730         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15731         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15732         (dwarf2out_var_location): Remove handling of
15733         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15734         on call_insn.
15735         * final.c (final_scan_insn): Remove all references to
15736         NOTE_INSN_CALL_ARG_LOCATION.
15737         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
15738         before dumping final insns.
15739         * except.c (emit_note_eh_region_end): Remove all references to
15740         NOTE_INSN_CALL_ARG_LOCATION.
15741         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15742         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15743         * config/arc/arc.c (hwloop_optimize): Likewise.
15744         * config/arm/arm.c (create_fix_barrier): Likewise.
15745         * config/s390/s390.c (s390_chunkify_start): Likewise.
15746         * config/sh/sh.c (find_barrier): Likewise.
15747         * config/i386/i386.c (rest_of_insert_endbranch,
15748         ix86_seh_fixup_eh_fallthru): Likewise.
15749         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15750         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15751         * config/frv/frv.c (frv_function_prologue): Likewise.
15752         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
15753         reg note.
15754         (note_outside_basic_block_p): Remove all references to
15755         NOTE_INSN_CALL_ARG_LOCATION.
15756         * gengtype.c (adjust_field_rtx_def): Likewise.
15757         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15758         Likewise.
15759         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15760         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15762         PR c++/84444
15763         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15764         is ADDR_EXPR.
15766         PR tree-optimization/84452
15767         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15768         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15769         is NULL.
15771 2018-02-19  Martin Liska  <mliska@suse.cz>
15773         PR sanitizer/82183
15774         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15776 2018-02-19  Martin Liska  <mliska@suse.cz>
15777             Richard Sandiford  <richard.sandiford@linaro.org>
15779         PR tree-optimization/82491
15780         * gimple-fold.c (get_base_constructor): Make earlier bail out
15781         to prevent ubsan.
15783 2018-02-19  Carl Love  <cel@us.ibm.com>
15785         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15786         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15787         BU_P8V_OVERLOAD_1.
15788         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15789         P8V_BUILTIN_VEC_NEG.
15791 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
15793         * config/rl78/rl78.md (movdf): New define expand.
15795 2018-02-19  Martin Liska  <mliska@suse.cz>
15797         PR other/80589
15798         * doc/invoke.texi: Fix typo.
15799         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15801 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
15803         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15804         handle rs6000_single_float and rs6000_double_float specially for
15805         e500 family CPUs.
15807 2018-02-16  Jeff Law  <law@redhat.com>
15809         * config/rx/rx.c (add_pop_cfi_notes): New function.;
15810         (pop_regs): Use it.
15812 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15814         PR ipa/84425
15815         * ipa-inline.c (inline_small_functions): Fix a typo.
15817 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15819         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15821 2018-02-16  Carl Love  <cel@us.ibm.com>
15823         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15824         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15825         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15826         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15827         expansion to P8V_BUILTIN_VEC_FLOAT2.
15829 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
15831         PR rtl-optimization/70023
15832         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15833         src_regno into account.
15835 2018-02-16  Carl Love  <cel@us.ibm.com>
15837         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15838         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15839         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15840         * config/rs6000/rs6000.c: Remove case statements for
15841         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15842         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15843         and P9V_BUILTIN_VEC_VINSERT4B.
15844         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15845         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15846         * config/rs6000/vsx.md:
15847         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15848         vec_insert4b.
15850 2018-02-16  Carl Love  <cel@us.ibm.com>
15852         * config/rs6000/altivec.h: Add builtin names vec_extract4b
15853         vec_insert4b.
15854         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15855         definitions.
15856         * config/rs6000/rs6000-c.c: Add the definitions for
15857         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15858         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15859         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15860         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
15861         definition for insert4b and define insn *insert3b_internal.
15862         * doc/extend.texi: Add documentation for vec_extract4b.
15864 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15866         * doc/extend.texi (Backwards Compatibility): Mention friend
15867         injection.  Note for-scope is deprecated.
15868         * doc/invoke.texi (-ffriend-injection): Deprecate.
15870 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
15872         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15873         that moved to I2, also allow destinations that are a paradoxical
15874         subreg (instead of a normal reg).
15876 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
15878         PR target/83831
15879         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15880         to QImode.
15882 2018-02-16  Richard Biener  <rguenther@suse.de>
15884         PR tree-optimization/84037
15885         PR tree-optimization/84016
15886         PR target/82862
15887         * config/i386/i386.c (ix86_builtin_vectorization_cost):
15888         Adjust vec_construct for the fact we need additional higher latency
15889         128bit inserts for AVX256 and AVX512 vector builds.
15890         (ix86_add_stmt_cost): Scale vector construction cost for
15891         elementwise loads.
15893 2018-02-16  Richard Biener  <rguenther@suse.de>
15895         PR tree-optimization/84417
15896         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15897         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15898         (non_rewritable_lvalue_p): Likewise, use poly-ints.
15900 2018-02-16  Martin Liska  <mliska@suse.cz>
15902         PR sanitizer/84307
15903         * internal-fn.def (ASAN_CHECK): Set proper flags.
15904         (ASAN_MARK): Likewise.
15906 2018-02-16  Julia Koval  <julia.koval@intel.com>
15908         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15909         from PTA_CANNONLAKE.
15911 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15913         PR target/84272
15914         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15915         Use ++iter rather than iter++ for std::list iterators.
15916         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
15917         defer deleting them until all nodes in the forest are processed.  Do
15918         free even leaf nodes.  Change to_process into auto_vec.
15920         PR bootstrap/84405
15921         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15922         * vec.h (vec_default_construct): Use memset instead of placement new
15923         if BROKEN_VALUE_INITIALIZATION is defined.
15924         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15925         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15926         is defined.
15928         PR rtl-optimization/83723
15929         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15930         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
15931         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
15932         recursive calls.
15933         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15934         callers.
15935         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15937 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
15939         PR rtl-optimization/81443
15940         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15941         from inner REGs to paradoxical SUBREGs.
15943 2018-02-16  Richard Biener  <rguenther@suse.de>
15945         PR tree-optimization/84399
15946         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15947         For operands we can analyze at their definition make sure we can
15948         analyze them at each use as well.
15950 2018-02-16  Richard Biener  <rguenther@suse.de>
15952         PR tree-optimization/84190
15953         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15954         volatile accesses if the decl isn't volatile.
15956 2018-02-15  Jason Merrill  <jason@redhat.com>
15958         PR c++/84314 - ICE with templates and fastcall attribute.
15959         * attribs.c (build_type_attribute_qual_variant): Don't clobber
15960         TYPE_CANONICAL on an existing type.
15962 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
15964         PR tree-optimization/84383
15965         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15966         dstoff nor call operand_equal_p if dstbase is NULL.
15968         PR tree-optimization/84334
15969         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15970         also a CONSTANT_CLASS_P, punt.
15972 2018-02-14  Jim Wilson  <jimw@sifive.com>
15974         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15975         first SMALL_OPERAND check.  New local min_second_step.  Move assert
15976         to where locals are set.  Add TARGET_RVC support.
15977         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15979 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
15981         * doc/invoke.texi: Correct -Wformat-overflow code sample.
15983 2018-02-14  Martin Sebor  <msebor@redhat.com>
15985         PR tree-optimization/83698
15986         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15987         arrays constrain the offset range to their bounds.
15988         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15989         (builtin_access::overlap): Avoid setting the size of overlap if it's
15990         already been set.
15991         (maybe_diag_overlap): Also consider arrays when deciding what values
15992         of offsets to include in diagnostics.
15994 2018-02-14  Martin Sebor  <msebor@redhat.com>
15996         PR c/84108
15997         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15998         that correspond to the kind of a declaration.
16000 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16002         PR target/83984
16003         * config/pa/pa.md: Load address of PIC label using the linkage table
16004         if the label is nonlocal.
16006 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16008         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16009         warning message if user requests -maltivec=be.
16010         * doc/invoke.texi: Document deprecation of -maltivec=be.
16012 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16014         PR target/84220
16015         * config/rs6000/rs6000-c.c: Update definitions for
16016         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16017         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16019 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16021         PR target/84239
16022         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16023         add _get_ssp intrinsics. Remove argument from
16024         __builtin_ia32_rdssp[d|q].
16025         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16026         * config/i386/i386-builtin.def: Remove argument from
16027         __builtin_ia32_rdssp[d|q].
16028         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16029         ix86_expand_special_args_builtin for _rdssp[d|q].
16030         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16031         Clear register before usage.
16032         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16033         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16035 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16037         PR tree-optimization/84357
16038         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16039         operand 1 of an ARRAY_REF too.
16041 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16043         PR target/83831
16044         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16045         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16046         declarations.
16047         (set_of_reg): New struct.
16048         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16049         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16050         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16051         functions.
16052         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16053         Split into bitclr, bitset, bitinvert patterns if appropriate.
16054         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16055         use rx_fuse_in_memory_bitop.
16056         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16057         to named insn, correct maximum insn length.
16059 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16061         PR target/79242
16062         * machmode.def: Define a complex mode for PARTIAL_INT.
16063         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16064         MODE_PARTIAL_INT.
16065         * doc/rtl.texi: Document CSPImode.
16066         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16067         handling.
16068         (msp430_hard_regno_nregs_with_padding): Likewise.
16070 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16072         PR target/84279
16073         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16075 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16077         PR rtl-optimization/84169
16078         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16079         we generated a parallel as new i3 and we split that to new i2 and i3
16080         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16081         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16082         those to i2, not i1.  Partially rewrite this scan code.
16084 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16086         PR c/82210
16087         * stor-layout.c (place_field): For variable length fields, adjust
16088         offset_align afterwards not just based on the field's alignment,
16089         but also on the size.
16091         PR middle-end/84309
16092         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16093         of exps and logs in the use_exp2 case.
16095 2018-02-13  Jeff Law  <law@redhat.com>
16097         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16098         entry for "vector".
16100         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16101         ARGS as unused.
16103 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16105         PR debug/84342
16106         PR debug/84319
16107         * common.opt (gas-loc-support, gas-locview-support): New.
16108         (ginline-points, ginternal-reset-location-views): New.
16109         * doc/invoke.texi: Document them.  Use @itemx where intended.
16110         (gvariable-location-views): Adjust.
16111         * target.def (reset_location_view): New.
16112         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16113         (TARGET_RESET_LOCATION_VIEW): New.
16114         * doc/tm.texi: Rebuilt.
16115         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16116         (dwarf2out_default_as_locview_support): New.
16117         (output_asm_line_debug_info): Use option variables.
16118         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16119         (output_loc_list): Likewise.
16120         (add_high_low_attributes): Check option variables.
16121         Don't output entry view attribute in strict mode.
16122         (gen_inlined_subroutine_die): Check option variables.
16123         (dwarf2out_inline_entry): Likewise.
16124         (init_sections_and_labels): Likewise.
16125         (dwarf2out_early_finish): Likewise.
16126         (maybe_reset_location_view): New, from...
16127         (dwarf2out_var_location): ... here.  Call it.
16128         * debug.h (dwarf2out_default_as_loc_support): Declare.
16129         (dwarf2out_default_as_locview_support): Declare.
16130         * hooks.c (hook_int_rtx_insn_0): New.
16131         * hooks.h (hook_int_rtx_insn_0): Declare.
16132         * toplev.c (process_options): Take -gas-loc-support and
16133         -gas-locview-support from dwarf2out.  Enable
16134         -gvariable-location-views by default only with locview
16135         assembler support.  Enable -ginternal-reset-location-views by
16136         default only if the target defines the corresponding hook.
16137         Enable -ginline-points by default if location views are
16138         enabled; force it disabled if statement frontiers are
16139         disabled.
16140         * tree-inline.c (expand_call_inline): Check option variables.
16141         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16143 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16145         PR tree-optimization/84321
16146         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16147         handling.  Also check whether the anti-range contains any values
16148         that satisfy the mask; switch to a VR_RANGE if not.
16150 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16152         PR sanitizer/84340
16153         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16155 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16157         PR c++/83990
16158         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16159         of call statements, also set location of a load to a temporary.
16161 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16163         * config/rl78/rl78.c (add_vector_labels): New function.
16164         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16165         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16166         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16167         which checks that no arguments are passed.
16168         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16169         * doc/extend.texi: Documentation for the new attribute.
16171 2018-02-13  Andreas Schwab  <schwab@suse.de>
16173         * config/riscv/linux.h (CPP_SPEC): Define.
16175 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16177         PR target/84335
16178         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16179         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16180         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16181         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16182         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16183         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16184         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16185         temporarily for AES and PCLMUL builtins.
16187         PR tree-optimization/84339
16188         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16189         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16190         Formatting fixes.
16192         PR middle-end/84309
16193         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16194         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16195         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16196         inline function.
16197         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16198         inline function.
16199         * omp-simd-clone.h: New file.
16200         * omp-simd-clone.c: Include omp-simd-clone.h.
16201         (expand_simd_clones): No longer static.
16202         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16203         cgraph.h and omp-simd-clone.h.
16204         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16205         (vect_recog_widen_shift_pattern): Formatting fix.
16206         (vect_pattern_recog_1): Don't check optab for calls.
16208         PR target/84336
16209         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16210         operands[2] into a REG before using gen_lowpart on it.
16212 2018-02-12  Jeff Law  <law@redhat.com>
16214         PR target/83760
16215         * config/sh/sh.c (find_barrier): Consider a sibling call
16216         a barrier as well.
16218         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16219         successfully back substituting a reg.
16221 2018-02-12  Richard Biener  <rguenther@suse.de>
16223         PR tree-optimization/84037
16224         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16225         parameter, move visited init to caller.
16226         (vect_slp_analyze_operations): Separate cost from validity
16227         check, initialize visited once for all instances.
16228         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16229         for all instances.
16230         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16231         out an assert.
16232         (vect_model_promotion_demotion_cost): Likewise.
16233         (vectorizable_bswap): Guard cost modeling with !slp_node
16234         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16235         SLP stmts.
16236         (vectorizable_call): Likewise.
16237         (vectorizable_conversion): Likewise.
16238         (vectorizable_assignment): Likewise.
16239         (vectorizable_shift): Likewise.
16240         (vectorizable_operation): Likewise.
16241         (vectorizable_store): Likewise.
16242         (vectorizable_load): Likewise.
16243         (vectorizable_condition): Likewise.
16244         (vectorizable_comparison): Likewise.
16246 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16248         PR sanitizer/84307
16249         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16250         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16251         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16253 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16255         PR middle-end/83665
16256         * params.def (inline-min-speedup): Increase from 8 to 15.
16257         (max-inline-insns-auto): Decrease from 40 to 30.
16258         * ipa-split.c (consider_split): Add some buffer for function to
16259         be considered inlining candidate.
16260         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16261         default values.
16263 2018-02-12  Richard Biener  <rguenther@suse.de>
16265         PR tree-optimization/84037
16266         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16267         matched stmts if we cannot swap the non-matched ones.
16269 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16271         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16272         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16273         _mm_maskz_scalef_round_ss): New intrinsics.
16274         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16275         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16276         __builtin_ia32_scalefss_round): Remove.
16277         (__builtin_ia32_scalefsd_mask_round,
16278         __builtin_ia32_scalefss_mask_round): New intrinsics.
16279         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16280         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16281         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16282         "<round_constraint>")): Changed to ...
16283         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16284         "<round_scalar_constraint>")): ... this.
16285         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16286         %0, %1, %2<round_op3>}"): Changed to ...
16287         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16288         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16289         %2<round_scalar_mask_op3>}"): ... this.
16290         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16292 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16294         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16295         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16296         (_mm_maskz_sqrt_round_ss): New intrinsics.
16297         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16298         (__builtin_ia32_sqrtsd_mask_round)
16299         (__builtin_ia32_sqrtss_mask_round): New builtins.
16300         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16301         (__builtin_ia32_sqrtss_round): Remove.
16302         (__builtin_ia32_sqrtsd_mask_round)
16303         (__builtin_ia32_sqrtss_mask_round): New builtins.
16304         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16305         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16306         ((match_operand:VF_128 1 "vector_operand"
16307         "xBm,<round_constraint>")): Changed to ...
16308         ((match_operand:VF_128 1 "vector_operand"
16309         "xBm,<round_scalar_constraint>")): ... this.
16310         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16311         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16312         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16313         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16314         %<iptr>1<round_scalar_mask_op3>}): ... this.
16315         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16316         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16318 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16320         PR target/84266
16321         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16322         Cast vec_cmpeq result to correct type.
16323         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16324         Cast vec_cmpgt result to correct type.
16326 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16328         * final.c (final_scan_insn_1): Renamed from...
16329         (final_scan_insn): ... this.  New wrapper, to recover
16330         seen from the outermost call in recursive ones.
16331         * config/sparc/sparc.c (output_return): Drop seen from call.
16332         (output_sibcall): Likewise.
16333         * config/visium/visium.c (output_branch): Likewise.
16335 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16337         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16338         function label.
16340 2018-02-10  Alan Modra  <amodra@gmail.com>
16342         PR target/84300
16343         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16344         Specify LR as an input.
16346 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16348         PR sanitizer/83987
16349         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16350         remove_member_access_dummy_vars): New functions.
16351         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16352         lower_omp_1, execute_lower_omp): Use them.
16354         PR rtl-optimization/84308
16355         * shrink-wrap.c (spread_components): Release todo vector.
16357 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16359         PR rtl-optimization/57193
16360         * ira-color.c (struct allocno_color_data): Add member
16361         conflict_allocno_hard_prefs.
16362         (update_conflict_allocno_hard_prefs): New.
16363         (bucket_allocno_compare_func): Add a preference based on
16364         conflict_allocno_hard_prefs.
16365         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16366         (color_allocnos): Remove a dead code.  Initiate
16367         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16369 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16371         PR target/84226
16372         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16373         constraint from =wa to wa.  Avoid a subreg on the output operand,
16374         instead use a pseudo and subreg it in a move.
16375         (p9_xxbrd_<mode>): Changed to ...
16376         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16377         (p9_xxbrd_v2df): New expander.
16378         (p9_xxbrw_<mode>): Changed to ...
16379         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16380         (p9_xxbrw_v4sf): New expander.
16382 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16384         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16386 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16388         PR target/83926
16389         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16390         multiply in 32-bit mode.
16391         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16392         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16393         mode.
16395 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16397         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16398         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16399         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16400         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16402 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16404         PR lto/84213
16405         * dwarf2out.c (is_trivial_indirect_ref): New function.
16406         (dwarf2out_late_global_decl): Do not generate a location
16407         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16408         and that are not defined in the current unit.
16410 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16412         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16413         instead of a libcall for UNORDERED.
16415 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16417         PR target/82641
16418         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16419         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16421 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16423         PR target/PR84295
16424         * config/s390/s390.c (s390_set_current_function): Invoke
16425         s390_indirect_branch_settings also if fndecl didn't change.
16427 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16429         * config/rs6000/rs6000.md (blockage): Set length to zero.
16431 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16433         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16435 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16437         PR sanitizer/84285
16438         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16439         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16440         -static-lib*san.
16442         PR debug/84252
16443         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16444         PARALLEL incoming that failed vt_get_decl_and_offset check.
16446         PR middle-end/84237
16447         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16448         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16449         TREE_READONLY bit.
16450         (get_variable_section): For decls in named .bss* sections pass true as
16451         second argument to bss_initializer_p.
16453 2018-02-09  Marek Polacek  <polacek@redhat.com>
16454             Jakub Jelinek  <jakub@redhat.com>
16456         PR c++/83659
16457         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16458         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16459         Sync some changes from cxx_fold_indirect_ref.
16461 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16463         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16464         markers.
16465         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16466         (BLOCK_INLINE_ENTRY_LABEL): New.
16467         (dwarf2out_var_location): Disregard inline entry markers.
16468         (inline_entry_data): New struct.
16469         (inline_entry_data_hasher): New hashtable type.
16470         (inline_entry_data_hasher::hash): New.
16471         (inline_entry_data_hasher::equal): New.
16472         (inline_entry_data_table): New variable.
16473         (add_high_low_attributes): Add DW_AT_entry_pc and
16474         DW_AT_GNU_entry_view attributes if a pending entry is found
16475         in inline_entry_data_table.  Add old entry_pc attribute only
16476         if debug nonbinding markers are disabled.
16477         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16478         markers are enabled.
16479         (block_within_block_p, dwarf2out_inline_entry): New.
16480         (dwarf2out_finish): Check that no entries remained in
16481         inline_entry_data_table.
16482         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16483         (final_scan_insn, notice_source_line): Likewise.
16484         (rest_of_clean_state): Skip inline entry markers.
16485         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16486         markers.
16487         * gimple.c (gimple_build_debug_inline_entry): New.
16488         * gimple.h (enum gimple_debug_subcode): Add
16489         GIMPLE_DEBUG_INLINE_ENTRY.
16490         (gimple_build_debug_inline_entry): Declare.
16491         (gimple_debug_inline_entry_p): New.
16492         (gimple_debug_nonbind_marker_p): Adjust.
16493         * insn-notes.def (INLINE_ENTRY): New.
16494         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16495         inline entry marker notes.
16496         (print_insn): Likewise.
16497         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16498         (INSN_DEBUG_MARKER_KIND): Likewise.
16499         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16500         * tree-inline.c (expand_call_inline): Build and insert
16501         debug_inline_entry stmt.
16502         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16503         inline entry blocks early, if nonbind markers are enabled.
16504         (dump_scope_block): Dump fragment info.
16505         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16506         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16507         (gimple_build_debug_inline_entry): New.
16508         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16509         Enable/disable inline entry points too.
16510         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16511         (DEBUG_INSN): Describe inline entry markers.
16513         * common.opt (gvariable-location-views): New.
16514         (gvariable-location-views=incompat5): New.
16515         * config.in: Rebuilt.
16516         * configure: Rebuilt.
16517         * configure.ac: Test assembler for view support.
16518         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16519         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16520         * dwarf2out.c (var_loc_view): New typedef.
16521         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16522         (dwarf2out_locviews_in_attribute): New.
16523         (dwarf2out_locviews_in_loclist): New.
16524         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16525         (enum dw_line_info_opcode): Add LI_adv_address.
16526         (struct dw_line_info_table): Add view.
16527         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16528         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16529         (zero_view_p): New variable.
16530         (ZERO_VIEW_P): New macro.
16531         (output_asm_line_debug_info): New.
16532         (struct var_loc_node): Add view.
16533         (add_AT_view_list, AT_loc_list): New.
16534         (add_var_loc_to_decl): Add view param.  Test it against last.
16535         (new_loc_list): Add view params.  Record them.
16536         (AT_loc_list_ptr): Handle loc and view lists.
16537         (view_list_to_loc_list_val_node): New.
16538         (print_dw_val): Handle dw_val_class_view_list.
16539         (size_of_die): Likewise.
16540         (value_format): Likewise.
16541         (loc_list_has_views): New.
16542         (gen_llsym): Set vl_symbol too.
16543         (maybe_gen_llsym, skip_loc_list_entry): New.
16544         (dwarf2out_maybe_output_loclist_view_pair): New.
16545         (output_loc_list): Output view list or entries too.
16546         (output_view_list_offset): New.
16547         (output_die): Handle dw_val_class_view_list.
16548         (output_dwarf_version): New.
16549         (output_compilation_unit_header): Use it.
16550         (output_skeleton_debug_sections): Likewise.
16551         (output_rnglists, output_line_info): Likewise.
16552         (output_pubnames, output_aranges): Update version comments.
16553         (output_one_line_info_table): Output view numbers in asm comments.
16554         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16555         Call maybe_gen_llsym.
16556         (loc_list_from_tree_1): Adjust.
16557         (add_AT_location_description): Create view list attribute if
16558         needed, check it's absent otherwise.
16559         (convert_cfa_to_fb_loc_list): Adjust.
16560         (maybe_emit_file): Call output_asm_line_debug_info for test.
16561         (dwarf2out_var_location): Reset views as needed.  Precompute
16562         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
16563         attribute.  Set view.
16564         (new_line_info_table): Reset next view.
16565         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16566         (dwarf2out_source_line): Likewise.  Output view resets and labels to
16567         the assembler, or select appropriate line info opcodes.
16568         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16569         (optimize_string_length): Catch it.  Adjust.
16570         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
16571         dw_val_class_view_list, and remove it if no longer needed.
16572         (hash_loc_list): Hash view numbers.
16573         (loc_list_hasher::equal): Compare them.
16574         (optimize_location_lists): Check whether a view list symbol is
16575         needed, and whether the locview attribute is present, and
16576         whether they match.  Remove the locview attribute if no longer
16577         needed.
16578         (index_location_lists): Call skip_loc_list_entry for test.
16579         (dwarf2out_finish): Call output_asm_line_debug_info for test.
16580         Use output_dwarf_version.
16581         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16582         (struct dw_val_node): Add val_view_list.
16583         * final.c (SEEN_NEXT_VIEW): New.
16584         (set_next_view_needed): New.
16585         (clear_next_view_needed): New.
16586         (maybe_output_next_view): New.
16587         (final_start_function): Rename to...
16588         (final_start_function_1): ... this.  Take pointer to FIRST,
16589         add SEEN parameter.  Emit param bindings in the initial view.
16590         (final_start_function): Reintroduce SEEN-less interface.
16591         (final): Rename to...
16592         (final_1): ... this.  Take SEEN parameter.  Output final pending
16593         next view at the end.
16594         (final): Reintroduce seen-less interface.
16595         (final_scan_insn): Output pending next view before switching
16596         sections or ending a block.  Mark the next view as needed when
16597         outputting variable locations.  Notify debug backend of section
16598         changes, and of location view changes.
16599         (rest_of_handle_final): Adjust.
16600         * toplev.c (process_options): Autodetect value for debug variable
16601         location views option.  Warn on incompat5 without -gdwarf-5.
16602         * doc/invoke.texi (gvariable-location-views): New.
16603         (gvariable-location-views=incompat5): New.
16604         (gno-variable-location-views): New.
16606 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
16608         PR tree-optimization/84136
16609         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16610         that the result of find_edge is non-NULL.
16612 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16614         PR target/83008
16615         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16616         storing integer register in SImode.  Fix cost of 256 and 512
16617         byte aligned SSE register store.
16619 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16621         * config/i386/i386.c (ix86_multiplication_cost): Fix
16622         multiplication cost for TARGET_AVX512DQ.
16624 2018-02-08  Marek Polacek  <polacek@redhat.com>
16626         PR tree-optimization/84238
16627         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16628         get_range_strlen.
16630 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16632         PR tree-optimization/84265
16633         * tree-vect-stmts.c (vectorizable_store): Don't treat
16634         VMAT_CONTIGUOUS accesses as grouped.
16635         (vectorizable_load): Likewise.
16637 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16639         PR tree-optimization/81635
16640         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16641         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16642         (test_round_for_mask): New functions.
16643         (wide_int_cc_tests): Call test_round_for_mask.
16644         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16645         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16646         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16647         range returned by get_range_info.
16649 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16651         PR ipa/81360
16652         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16653         * symtab.c: Include builtins.h
16654         (symtab_node::output_to_lto_symbol_table_p): Move here
16655         from lto-streamer-out.c:output_symbol_p.
16656         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16657         (output_symbol_p): Move all logic to symtab.c
16658         (produce_symtab): Update.
16660 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16662         * config/s390/s390-opts.h (enum indirect_branch): Define.
16663         * config/s390/s390-protos.h (s390_return_addr_from_memory)
16664         (s390_indirect_branch_via_thunk)
16665         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16666         (enum s390_indirect_branch_type): Define.
16667         * config/s390/s390.c (struct s390_frame_layout, struct
16668         machine_function): Remove.
16669         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16670         (indirect_branch_table_label_no, indirect_branch_table_name):
16671         Define variables.
16672         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16673         (enum s390_indirect_branch_option): Define.
16674         (s390_return_addr_from_memory): New function.
16675         (s390_handle_string_attribute): New function.
16676         (s390_attribute_table): Add new attribute handler.
16677         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16678         (s390_indirect_branch_via_thunk): New function.
16679         (s390_indirect_branch_via_inline_thunk): New function.
16680         (s390_function_ok_for_sibcall): When jumping via thunk disallow
16681         sibling call optimization for non z10 compiles.
16682         (s390_emit_call): Force indirect branch target to be a single
16683         register.  Add r1 clobber for non-z10 compiles.
16684         (s390_emit_epilogue): Emit return jump via return_use expander.
16685         (s390_reorg): Handle JUMP_INSNs as execute targets.
16686         (s390_option_override_internal): Perform validity checks for the
16687         new command line options.
16688         (s390_indirect_branch_attrvalue): New function.
16689         (s390_indirect_branch_settings): New function.
16690         (s390_set_current_function): Invoke s390_indirect_branch_settings.
16691         (s390_output_indirect_thunk_function):  New function.
16692         (s390_code_end): Implement target hook.
16693         (s390_case_values_threshold): Implement target hook.
16694         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16695         macros.
16696         * config/s390/s390.h (struct s390_frame_layout)
16697         (struct machine_function): Move here from s390.c.
16698         (TARGET_INDIRECT_BRANCH_NOBP_RET)
16699         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16700         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16701         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16702         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16703         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16704         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16705         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16706         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16707         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16708         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16709         (mnemonic attribute): Add values which aren't recognized
16710         automatically.
16711         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16712         pattern for branch conversion.  Fix mnemonic attribute.
16713         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16714         indirect branch via thunk if requested.
16715         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16716         ("*indirect_jump"): Disable for branch conversion using out of
16717         line thunks.
16718         ("indirect_jump_via_thunk<mode>_z10")
16719         ("indirect_jump_via_thunk<mode>")
16720         ("indirect_jump_via_inlinethunk<mode>_z10")
16721         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16722         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16723         ("casesi_jump_via_inlinethunk<mode>_z10")
16724         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16725         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16726         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16727         ("*indirect2_jump"): Disable for branch conversion.
16728         ("casesi_jump"): Turn into expander and expand patterns for branch
16729         conversion.
16730         ("return_use"): New expander.
16731         ("*return"): Emit return via thunk and rename it to ...
16732         ("*return<mode>"): ... this one.
16733         * config/s390/s390.opt: Add new options and and enum for the
16734         option values.
16736 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16738         * lra-constraints.c (match_reload): Unconditionally use
16739         gen_lowpart_SUBREG, rather than selecting between that
16740         and equivalent gen_rtx_SUBREG code.
16742 2018-02-08  Richard Biener  <rguenther@suse.de>
16744         PR tree-optimization/84233
16745         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16746         changed flag instead of boguously re-using phi_inserted.
16748 2018-02-08  Martin Jambor  <mjambor@suse.cz>
16750         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16751         static local variables.
16753 2018-02-08  Richard Biener  <rguenther@suse.de>
16755         PR tree-optimization/84278
16756         * tree-vect-stmts.c (vectorizable_store): When looking for
16757         smaller vector types to perform grouped strided loads/stores
16758         make sure the mode is supported by the target.
16759         (vectorizable_load): Likewise.
16761 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16763         * config/aarch64/aarch64.c (aarch64_components_for_bb):
16764         Increase LDP/STP opportunities by adding adjacent callee-saves.
16766 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16768         PR rtl-optimization/84068
16769         PR rtl-optimization/83459
16770         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16772 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
16774         PR tree-optimization/84224
16775         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16776         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16777         non-zero arguments.
16779 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
16781         PR target/84113
16782         * config/rs6000/altivec.md (*restore_world): Remove LR use.
16783         * config/rs6000/predicates.md (restore_world_operation): Adjust op
16784         count, remove one USE.
16786 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
16788         * doc/install.texi (Configuration): Document the
16789         --with-long-double-format={ibm,ieee} PowerPC configuration
16790         options.
16792         PR target/84154
16793         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16794         Convert from define_expand to be define_insn_and_split.  Rework
16795         float/double/_Float128 conversions to QI/HI/SImode to work with
16796         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
16797         conversions to QI/HImode types did a store and then a load to
16798         truncate the value.  For conversions to VSX registers, don't split
16799         the insn, instead emit the code directly.  Use the code iterator
16800         any_fix to combine signed and unsigned conversions.
16801         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16802         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16803         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16804         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16805         (fix_<mode>di2_hw): Likewise.
16806         (fixuns_<mode>di2_hw): Likewise.
16807         (fix_<mode>si2_hw): Likewise.
16808         (fixuns_<mode>si2_hw): Likewise.
16809         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16810         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16811         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16812         fix<uns>_trunc<SFDF:mode>si2_p8.
16813         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16814         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16815         (fix<uns>_<mode>_mem): Likewise.
16816         (fctiw<u>z_<mode>_mem): Likewise.
16817         (fix<uns>_<mode>_mem): Likewise.
16818         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16819         the register allocator from doing a direct move to the GPRs to do
16820         a store, and instead use the ISA 3.0 store byte/half-word from
16821         vector register instruction.  For IEEE 128-bit floating point,
16822         also optimize stores of 32-bit ints.
16823         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16825 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
16827         * genextract.c (push_pathstr_operand): New function to support
16828         [a-zA-Z].
16829         (walk_rtx): Call push_pathstr_operand.
16830         (print_path): Support [a-zA-Z].
16832 2018-02-07  Richard Biener  <rguenther@suse.de>
16834         PR tree-optimization/84037
16835         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16836         (cse_and_gimplify_to_preheader): Declare.
16837         (vect_get_place_in_interleaving_chain): Likewise.
16838         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16839         ivexpr_map.
16840         (_loop_vec_info::~_loop_vec_info): Delete it.
16841         (cse_and_gimplify_to_preheader): New function.
16842         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16843         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16844         (vectorizable_load): Likewise.  For grouped stores always base
16845         the IV on the first element.
16846         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16847         condition before gimplifying.
16849 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16851         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16852         *DIV_EXPR and *MOD_EXPR.
16854 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
16856         PR target/84248
16857         * config/i386/i386.c (ix86_option_override_internal): Mask out
16858         the CF_SET bit when checking -fcf-protection.
16860 2018-02-07  Tom de Vries  <tom@codesourcery.com>
16862         PR libgomp/84217
16863         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16864         enough.
16866 2018-02-07  Richard Biener  <rguenther@suse.de>
16868         PR tree-optimization/84204
16869         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16870         this place.
16872         PR tree-optimization/84205
16873         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16874         special-case isl_ast_op_zdiv_r.
16876         PR tree-optimization/84223
16877         * graphite-scop-detection.c (gather_bbs::before_dom_children):
16878         Only add conditions from within the region.
16879         (gather_bbs::after_dom_children): Adjust.
16881 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
16883         PR target/84209
16884         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16885         * config/avr/avr.md: Only post-reload split REG-REG moves if
16886         either register is GENERAL_REG_P.
16888 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16890         PR tree-optimization/84235
16891         * tree-ssa-scopedtables.c
16892         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16893         if the subtraction is performed in floating point type where NaNs are
16894         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16895         build 1.  Formatting fix.
16897 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
16899         PR target/84146
16900         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16901         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16902         and skip it regardless of bb boundaries.  Use CALL_P macro,
16903         don't test INSN_P (insn) together with CALL_P or JUMP_P check
16904         unnecessarily, formatting fix.
16906 2018-02-06  Michael Collison  <michael.collison@arm.com>
16908         * config/arm/thumb2.md:
16909         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16910         (*thumb_mov_notscc): Ditto.
16912 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
16914         PR target/84154
16915         * config/rs6000/rs6000.md (su code attribute): Use "u" for
16916         unsigned_fix, not "s".
16918 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16920         * configure.ac (gcc_fn_eh_frame_ro): New function.
16921         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16922         correct .eh_frame permissions.
16923         * configure: Regenerate.
16925 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
16927         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16928         irrelevant options.
16930 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16932         * config/rs6000/rs6000.c (rs6000_option_override_internal):
16933         Display warning message for -mno-speculate-indirect-jumps.
16935 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
16937         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16938         Undocumented.
16939         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16941 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
16943         PR tree-optimization/84225
16944         * tree-eh.c (find_trapping_overflow): Only call
16945         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16947 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16949         PR target/84145
16950         * config/i386/i386.c: Reimplement the check of possible options
16951         -mibt/-mshstk conbination. Change error messages.
16952         * doc/invoke.texi: Fix a typo: remove extra '='.
16954 2018-02-06  Marek Polacek  <polacek@redhat.com>
16956         PR tree-optimization/84228
16957         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16959 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
16961         PR target/82641
16962         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16963         emitted arch directives.
16964         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16965         __ARM_FEATURE_COPROC before changing architectures.
16967 2018-02-06  Richard Biener  <rguenther@suse.de>
16969         * config/i386/i386.c (print_reg): Fix typo.
16970         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16972 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
16974         * configure: Regenerate.
16976 2018-02-05  Martin Sebor  <msebor@redhat.com>
16978         PR tree-optimization/83369
16979         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16980         inlining context.
16982 2018-02-05  Martin Liska  <mliska@suse.cz>
16984         * doc/invoke.texi: Cherry-pick upstream r323995.
16986 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
16988         * ira.c (ira_init_register_move_cost): Adjust comment.
16990 2018-02-05  Martin Liska  <mliska@suse.cz>
16992         PR gcov-profile/84137
16993         * doc/gcov.texi: Fix typo in documentation.
16995 2018-02-05  Martin Liska  <mliska@suse.cz>
16997         PR gcov-profile/83879
16998         * doc/gcov.texi: Document necessity of --dynamic-list-data when
16999         using dlopen functionality.
17001 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17003         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17004         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17005         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17006         _mm_maskz_range_round_ss): New intrinsics.
17007         (__builtin_ia32_rangesd128_round)
17008         (__builtin_ia32_rangess128_round): Remove.
17009         (__builtin_ia32_rangesd128_mask_round,
17010         __builtin_ia32_rangess128_mask_round): New builtins.
17011         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17012         __builtin_ia32_rangess128_round): Remove.
17013         (__builtin_ia32_rangesd128_mask_round,
17014         __builtin_ia32_rangess128_mask_round): New builtins.
17015         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17016         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17017         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17018         "<round_saeonly_constraint>")): Changed to ...
17019         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17020         "<round_saeonly_scalar_constraint>")): ... this.
17021         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17022         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17023         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17024         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17025         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17027 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17029         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17030         options.
17031         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17032         Remove all values except native, 8540 and 8548.
17034 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17036         * config/i386/i386.c (ix86_output_function_return): Pass
17037         INVALID_REGNUM, instead of -1, as invalid register number to
17038         indirect_thunk_name and output_indirect_thunk.
17040 2018-02-02  Julia Koval  <julia.koval@intel.com>
17042         * config.gcc: Add -march=icelake.
17043         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17044         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17045         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17046         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17047         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17048         (processor_target_table): Add icelake.
17049         (ix86_option_override_internal): Handle new PTAs.
17050         (get_builtin_code_for_version): Handle icelake.
17051         (M_INTEL_COREI7_ICELAKE): New.
17052         (fold_builtin_cpu): Handle icelake.
17053         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17054         * doc/invoke.texi: Add -march=icelake.
17056 2018-02-02  Julia Koval  <julia.koval@intel.com>
17058         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17059         to wide_int_bitmask.
17060         * wide-int-bitmask.h: New.
17062 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17064         PR target/84066
17065         * config/i386/i386.md: Replace Pmode with word_mode in
17066         builtin_setjmp_setup and builtin_longjmp to support x32.
17068 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17070         PR target/56010
17071         PR target/83743
17072         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17073         #include "opts.h".
17074         (rs6000_supported_cpu_names): New static variable.
17075         (linux_cpu_translation_table): Likewise.
17076         (elf_platform) <cpu>: Define new static variable and use it.
17077         Translate kernel AT_PLATFORM name to canonical name if needed.
17078         Error if platform name is unknown.
17080 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17082         PR target/84089
17083         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17085 2018-02-01  Jeff Law  <law@redhat.com>
17087         PR target/84128
17088         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17089         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17090         the scratch if RELEASE_VIA_POP is false.
17091         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17092         If we have to save a temporary register, decrement SIZE appropriately.
17093         Pass new arguments to release_scratch_register_on_entry.
17094         (ix86_adjust_stack_and_probe): Likewise.
17095         (ix86_emit_probe_stack_range): Pass new arguments to
17096         release_scratch_register_on_entry.
17098 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17100         PR rtl-optimization/84157
17101         * combine.c (change_zero_ext): Use REG_P predicate in
17102         front of HARD_REGISTER_P predicate.
17104 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17106         * config/avr/avr.c (avr_option_override): Move disabling of
17107         -fdelete-null-pointer-checks to...
17108         * common/config/avr/avr-common.c (avr_option_optimization_table):
17109         ...here.
17111 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17113         PR tree-optimization/81635
17114         * tree-data-ref.c (split_constant_offset_1): For types that
17115         wrap on overflow, try to use range info to prove that wrapping
17116         cannot occur.
17118 2018-02-01  Renlin Li  <renlin.li@arm.com>
17120         PR target/83370
17121         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17122         TAILCALL_ADDR_REGS.
17123         (aarch64_register_move_cost): Likewise.
17124         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17125         TAILCALL_ADDR_REGS.
17126         (REG_CLASS_NAMES): Likewise.
17127         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17128         TAILCALL_ADDR_REGS. Remove IP registers.
17129         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17131 2018-02-01  Richard Biener  <rguenther@suse.de>
17133         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17134         for specifying RPO order and allow NULL for that.
17135         * domwalk.c (dom_walker::dom_walker): Likewise.
17136         (dom_walker::walk): Handle NULL RPO order.
17137         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17138         in RPO order.
17139         (rewrite_update_dom_walker): Likewise.
17140         (mark_def_dom_walker): Likewise.
17142 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17144         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17145         (aarch64_maybe_expand_sve_subreg_move): Declare.
17146         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17147         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17148         predicate.
17149         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17150         that are semantically a reverse operation.
17151         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17152         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17153         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17154         functions.
17155         (aarch64_can_change_mode_class): For big-endian, forbid changes
17156         between two SVE modes if they have different element sizes.
17158 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17160         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17161         the TImode handling for big-endian targets.
17163 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17165         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17166         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17167         not just bytes.
17168         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17169         Remove BSWAP handing for big-endian targets and use the form of
17170         LD1RQ appropariate for the mode.
17172 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17174         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17175         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17176         duplicated element.
17178 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17180         PR tearget/83845
17181         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17182         check for operands that need to go through aarch64_sve_reload_be.
17184 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17186         PR tree-optimization/81661
17187         PR tree-optimization/84117
17188         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17189         * tree-eh.c: Include gimplify.h.
17190         (find_trapping_overflow, replace_trapping_overflow,
17191         rewrite_to_non_trapping_overflow): New functions.
17192         * tree-vect-loop.c: Include tree-eh.h.
17193         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17194         * tree-data-ref.c: Include tree-eh.h.
17195         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17197 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17199         PR rtl-optimization/84123
17200         * combine.c (change_zero_ext): Check if hard register satisfies
17201         can_change_dest_mode before calling gen_lowpart_SUBREG.
17203 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17205         PR target/82444
17206         * ira.c (ira_init_register_move_cost): Remove assert.
17208 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17210         PR rtl-optimization/84071
17211         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17212         * doc/tm.texi: Regenerate.
17214 2018-01-31  Richard Biener  <rguenther@suse.de>
17216         PR tree-optimization/84132
17217         * tree-data-ref.c (analyze_miv_subscript): Properly
17218         check whether evolution_function_is_affine_multivariate_p
17219         before calling gcd_of_steps_may_divide_p.
17221 2018-01-31  Julia Koval  <julia.koval@intel.com>
17223         PR target/83618
17224         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17225         * config/i386/i386.md (rdpid_rex64) New.
17226         (rdpid): Make 32bit only.
17228 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17230         PR lto/84105
17231         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17232         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17234 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17236         Revert
17237         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17239         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17241 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17243         PR rtl-optimization/84071
17244         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17245         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17247 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17249         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17250         (arc_attribute_table): Add 'aux' attribute.
17251         (arc_in_small_data_p): Consider aux like variables.
17252         (arc_is_aux_reg_p): New function.
17253         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17254         (arc_get_aux_arg): New function.
17255         (prepare_move_operands): Handle aux-register access.
17256         (arc_handle_aux_attribute): New function.
17257         * doc/extend.texi (ARC Variable attributes): Add subsection.
17259 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17261         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17262         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17263         (arc_attribute_table): Add 'uncached' attribute.
17264         (arc_print_operand): Print '.di' flag for uncached memory
17265         accesses.
17266         (arc_in_small_data_p): Do not consider for small data the uncached
17267         types.
17268         (arc_is_uncached_mem_p): New function.
17269         * config/arc/predicates.md (compact_store_memory_operand): Check
17270         for uncached memory accesses.
17271         (nonvol_nonimm_operand): Likewise.
17272         * doc/extend.texi (ARC Type Attribute): New subsection.
17274 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17276         PR c/84100
17277         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17278         falign-loops=): Add Optimization flag.
17280 2018-01-30  Jeff Law  <law@redhat.com>
17282         PR target/84064
17283         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17284         INT_REGISTERS_SAVED.  Check it prior to calling
17285         get_scratch_register_on_entry.
17286         (ix86_adjust_stack_and_probe): Similarly.
17287         (ix86_emit_probe_stack_range): Similarly.
17288         (ix86_expand_prologue): Corresponding changes.
17290 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17292         PR target/40411
17293         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17294         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17296 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17298         PR target/84112
17299         * lra-constraints.c (curr_insn_transform): Process AND in the
17300         address.
17302 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17304         PR rtl-optimization/83986
17305         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17306         dependence against last_pending_memory_flush in addition to
17307         pending_jump_insns.
17309 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17311         PR tree-optimization/81611
17312         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17313         copies.
17315 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17317         PR target/83758
17318         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17319         a reg rtx.
17321 2018-01-30  Richard Biener  <rguenther@suse.de>
17322             Jakub Jelinek  <jakub@redhat.com>
17324         PR tree-optimization/84111
17325         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17326         inner loops added during recursion, as they don't have up-to-date
17327         SSA form.
17329 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17331         PR ipa/81360
17332         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17333         (can_inline_edge_by_limits_p): ... here.
17334         (can_early_inline_edge_p, check_callers,
17335         update_caller_keys, update_callee_keys, recursive_inlining,
17336         add_new_edges_to_heap, speculation_useful_p,
17337         inline_small_functions,
17338         inline_small_functions, flatten_function,
17339         inline_to_all_callers_1): Update.
17341 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17343         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17344         zeros correctly.
17346 2018-01-30  Richard Biener  <rguenther@suse.de>
17348         PR tree-optimization/83008
17349         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17350         invariant and constant vector uses in stmts when they need
17351         more than one stmt.
17353 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17355         PR bootstrap/84017
17356         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17357         * configure: Regenerate.
17359 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17361         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17362         pattern.
17363         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17364         Use gen_rtx_REG rather than gen_lowpart.
17366 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17368         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17369         rather than 0 when creating partial subregs.
17371 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17373         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17374         of usage.
17376 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17378         PR target/81550
17379         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17380         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17381         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17382         flags.  This restores the settings used before the 2017-07-24.
17383         Turning off pre increment/decrement/modify allows IVOPTS to
17384         optimize DF/SF loops where the index is an int.
17386 2018-01-29  Richard Biener  <rguenther@suse.de>
17387             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17389         PR bootstrap/80867
17390         * tree-vect-stmts.c (vectorizable_call): Don't call
17391         targetm.vectorize_builtin_md_vectorized_function if callee is
17392         NULL.
17394 2018-01-22  Carl Love  <cel@us.ibm.com>
17396         * doc/extend.tex: Fix typo in second arg in
17397         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17399 2018-01-29  Richard Biener  <rguenther@suse.de>
17401         PR tree-optimization/84086
17402         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17403         (flush_ssaname_freelist): When SSA names were released reset
17404         the SCEV hash table.
17406 2018-01-29  Richard Biener  <rguenther@suse.de>
17408         PR tree-optimization/84057
17409         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17410         removed paths when removing edges.
17412 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17414         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17415         -mfunction-return=@var{choice}.
17417 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17419         PR diagnostic/84034
17420         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17421         Handle CR like TAB.
17422         (layout::print_source_line): Likewise.
17423         (test_get_line_width_without_trailing_whitespace): Add test cases.
17425 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17427         PR middle-end/84040
17428         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17429         debug insns.
17431 2018-01-26  Jim Wilson  <jimw@sifive.com>
17433         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17435         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17436         specified.
17438 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17440         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17441         and CMP + SUB-immediate -> SUBS.
17443 2018-01-26  Martin Sebor  <msebor@redhat.com>
17445         PR tree-optimization/83896
17446         * tree-ssa-strlen.c (get_string_len): Rename...
17447         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17448         Avoid assuming length is constant.
17449         (handle_char_store): Use HOST_WIDE_INT for string length.
17451 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17453         PR target/81763
17454         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17455         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17457 2018-01-26  Richard Biener  <rguenther@suse.de>
17459         PR rtl-optimization/84003
17460         * dse.c (record_store): Only record redundant stores when
17461         the earlier store aliases at least all accesses the later one does.
17463 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17465         PR rtl-optimization/83985
17466         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17467         REG_CFA_RESTORE insns.
17468         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17469         REG_CFA_RESTORE insns here.
17471         PR c/83989
17472         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17473         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17475 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17477         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17478         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17479         (arc_init): Likewise.
17480         (arc_override_options): Likewise.
17481         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17482         value.
17483         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17484         support.
17485         * config/arc/arc.h (TARGET_DBNZ): Define.
17486         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17487         properly set the tune attribute.
17488         (dbnz): Use TARGET_DBNZ guard.
17489         * config/arc/arc.opt (mtune): Add core3 option.
17491 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17493         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17494         recognize new pic like addresses.
17495         (arc_delegitimize_address): Clean up.
17497 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17499         * config/arc/arc-arches.def: Option mrf16 valid for all
17500         architectures.
17501         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17502         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17503         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17504         * config/arc/arc-tables.opt: Regenerate.
17505         * config/arc/arc.c (arc_conditional_register_usage): Handle
17506         reduced register file case.
17507         (arc_file_start): Set must have build attributes.
17508         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17509         mrf16 option value.
17510         * config/arc/arc.opt (mrf16): Add new option.
17511         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17512         * config/arc/genmultilib.awk: Handle new mrf16 option.
17513         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17514         * config/arc/t-multilib: Regenerate.
17515         * doc/invoke.texi (ARC Options): Document mrf16 option.
17517 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17519         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17520         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17521         (arc_attribute_table): Add 'secure_call' attribute.
17522         (arc_print_operand): Print secure call operand.
17523         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17524         secure.
17525         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17526         (call_i): Add support for sjli instruction.
17527         (call_value_i): Likewise.
17528         * config/arc/constraints.md (Csc): New constraint.
17530 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17531             John Eric Martin  <John.Martin@emmicro-us.com>
17533         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17534         * config/arc/arc.c (_arc_jli_section): New struct.
17535         (arc_jli_section): New type.
17536         (rc_jli_sections): New static variable.
17537         (arc_handle_jli_attribute): New function.
17538         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17539         (arc_file_end): New function.
17540         (TARGET_ASM_FILE_END): Define.
17541         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17542         (arc_add_jli_section): New function.
17543         (jli_call_scan): Likewise.
17544         (arc_reorg): Call jli_call_scan.
17545         (arc_output_addsi): Remove 'S' from printing asm operand.
17546         (arc_is_jli_call_p): New function.
17547         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17548         operand.
17549         (movhi_insn): Likewise.
17550         (movsi_insn): Likewise.
17551         (movsi_set_cc_insn): Likewise.
17552         (loadqi_update): Likewise.
17553         (load_zeroextendqisi_update): Likewise.
17554         (load_signextendqisi_update): Likewise.
17555         (loadhi_update): Likewise.
17556         (load_zeroextendhisi_update): Likewise.
17557         (load_signextendhisi_update): Likewise.
17558         (loadsi_update): Likewise.
17559         (loadsf_update): Likewise.
17560         (movsicc_insn): Likewise.
17561         (bset_insn): Likewise.
17562         (bxor_insn): Likewise.
17563         (bclr_insn): Likewise.
17564         (bmsk_insn): Likewise.
17565         (bicsi3_insn): Likewise.
17566         (cmpsi_cc_c_insn): Likewise.
17567         (movsi_ne): Likewise.
17568         (movsi_cond_exec): Likewise.
17569         (clrsbsi2): Likewise.
17570         (norm_f): Likewise.
17571         (normw): Likewise.
17572         (swap): Likewise.
17573         (divaw): Likewise.
17574         (flag): Likewise.
17575         (sr): Likewise.
17576         (kflag): Likewise.
17577         (ffs): Likewise.
17578         (ffs_f): Likewise.
17579         (fls): Likewise.
17580         (call_i): Remove 'S' asm letter, add jli instruction.
17581         (call_value_i): Likewise.
17582         * config/arc/arc.op (mjli-always): New option.
17583         * config/arc/constraints.md (Cji): New constraint.
17584         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17585         operand.
17586         (subsf3_fpx): Likewise.
17587         (mulsf3_fpx): Likewise.
17588         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17589         asm operand.
17590         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17591         function attrbutes.
17592         * doc/invoke.texi (ARC): Document mjli-always option.
17594 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
17596         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17597         avoid addition with 0 and use incw and decw where possible.
17599 2018-01-26  Richard Biener  <rguenther@suse.de>
17601         PR tree-optimization/81082
17602         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17603         association if it requires casting to unsigned.
17604         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17605         from fold_plusminus_mult_expr to catch important cases late when
17606         range info is available.
17608 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17610         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17611         * configure.ac (hidden_linkonce): New test.
17612         * configure: Regenerate.
17613         * config.in: Regenerate.
17615 2018-01-26  Julia Koval  <julia.koval@intel.com>
17617         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17618         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17619         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17620         _mm_mask_bitshuffle_epi64_mask): Fix type.
17621         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17622         USI_FTYPE_V4DI_V4DI_USI): Remove.
17623         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17624         __builtin_ia32_vpshufbitqmb256_mask,
17625         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17626         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17627         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17629 2018-01-26  Alan Modra  <amodra@gmail.com>
17631         PR target/84033
17632         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17633         UNSPEC_VBPERMQ.  Sort other unspecs.
17635 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
17637         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17639 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
17641         PR middle-end/83055
17642         * predict.c (drop_profile): Do not push/pop cfun; update also
17643         node->count.
17644         (handle_missing_profiles): Fix logic looking for zero profiles.
17646 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
17648         PR middle-end/83977
17649         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17650         on functions with #pragma omp declare simd or functions with simd
17651         attribute.
17652         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17653         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17654         Remove trailing \n from warning_at calls.
17656 2018-01-25  Tom de Vries  <tom@codesourcery.com>
17658         PR target/84028
17659         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17660         for neutered workers.
17662 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
17664         PR target/68467
17665         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17666         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17668 2018-01-24  Jeff Law  <law@redhat.com>
17670         PR target/83994
17671         * i386.c (get_probe_interval): Move to earlier point.
17672         (ix86_compute_frame_layout): If -fstack-clash-protection and
17673         the frame is larger than the probe interval, then use pushes
17674         to save registers rather than reg->mem moves.
17675         (ix86_expand_prologue): Remove conditional for int_registers_saved
17676         assertion.
17678 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
17680         PR target/84014
17681         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17682         min/max for never referenced object.
17684 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
17686         PR middle-end/83977
17687         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17688         here.
17689         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17690         attributes from DECL_ATTRIBUTES (decl) without affecting
17691         DECL_ATTRIBUTES (current_function_decl).
17692         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17693         functions with non-NULL DECL_ABSTRACT_ORIGIN.
17695 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
17697         PR tree-optimization/83979
17698         * fold-const.c (fold_comparison): Use constant_boolean_node
17699         instead of boolean_{true,false}_node.
17701 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
17703         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17704         with zero counts.
17706 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17708         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17709         Simplify the clause that sets the length attribute.
17710         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17711         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17712         clause that sets the length attribute.
17713         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17715 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17717         PR target/83589
17718         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17719         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17720         Add strict parameter.
17721         (prevent_branch_around_nothing): Insert dummy insn between branch to
17722         label and label with no ptx insn inbetween.
17723         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17725 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17727         PR target/81352
17728         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17729         for neutered threads in warp.
17730         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17732 2018-01-24  Richard Biener  <rguenther@suse.de>
17734         PR tree-optimization/83176
17735         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17736         operands.
17738 2018-01-24  Richard Biener  <rguenther@suse.de>
17740         PR tree-optimization/82819
17741         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17742         code generating pluses that are no-ops in the target precision.
17744 2018-01-24  Richard Biener  <rguenther@suse.de>
17746         PR middle-end/84000
17747         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17749 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17751         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17752         to merge probabilities.
17753         * predict.c (probably_never_executed): Also mark as cold functions
17754         with global 0 profile and guessed local profile.
17755         * profile-count.c (profile_probability::combine_with_count): New
17756         member function.
17757         * profile-count.h (profile_probability::operator*,
17758         profile_probability::operator*=, profile_probability::operator/,
17759         profile_probability::operator/=): Reduce precision to adjusted
17760         and set value to guessed on contradictory divisions.
17761         (profile_probability::combine_with_freq): Remove.
17762         (profile_probability::combine_wiht_count): Declare.
17763         (profile_count::force_nonzero):: Set to adjusted.
17764         (profile_count::probability_in):: Set quality to adjusted.
17765         * tree-ssa-tail-merge.c (replace_block_by): Use
17766         combine_with_count.
17768 2018-01-23  Andrew Waterman  <andrew@sifive.com>
17769             Jim Wilson  <jimw@sifive.com>
17771         * config/riscv/riscv.c (riscv_stack_boundary): New.
17772         (riscv_option_override): Set riscv_stack_boundary.  Handle
17773         riscv_preferred_stack_boundary_arg.
17774         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17775         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17776         (STACK_BOUNDARY): Set to riscv_stack_boundary.
17777         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17778         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17779         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17781 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
17783         PR target/83905
17784         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17785         of struct ix86_frame.
17786         (ix86_expand_epilogue): Likewise.  Add a local variable for
17787         the reg_save_offset field in struct ix86_frame.
17789 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
17791         PR tree-optimization/82604
17792         * tree-loop-distribution.c (enum partition_kind): New enum item
17793         PKIND_PARTIAL_MEMSET.
17794         (partition_builtin_p): Support above new enum item.
17795         (generate_code_for_partition): Ditto.
17796         (compute_access_range): Differentiate cases that equality can be
17797         proven at all loops, the innermost loops or no loops.
17798         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17799         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
17800         (finalize_partitions, distribute_loop): Don't fuse partition of
17801         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17802         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17803         parloop is enabled.
17805 2018-01-23  Martin Liska  <mliska@suse.cz>
17807         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17808         order to ignore the predictor.
17809         (PRED_POLYMORPHIC_CALL): Likewise.
17810         (PRED_RECURSIVE_CALL): Likewise.
17812 2018-01-23  Martin Liska  <mliska@suse.cz>
17814         * tree-profile.c (tree_profiling): Print function header to
17815         aware reader which function we are working on.
17816         * value-prof.c (gimple_find_values_to_profile): Do not print
17817         not interesting value histograms.
17819 2018-01-23  Martin Liska  <mliska@suse.cz>
17821         * profile-count.h (enum profile_quality): Add
17822         profile_uninitialized as the first value. Do not number values
17823         as they are zero based.
17824         (profile_count::verify): Update sanity check.
17825         (profile_probability::verify): Likewise.
17827 2018-01-23  Nathan Sidwell  <nathan@acm.org>
17829         * doc/invoke.texi (ffor-scope): Deprecate.
17831 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17833         PR tree-optimization/83510
17834         * domwalk.c (set_all_edges_as_executable): New function.
17835         (dom_walker::dom_walker): Convert bool param
17836         "skip_unreachable_blocks" to enum reachability.  Move setup of
17837         edge flags to set_all_edges_as_executable and only do it when
17838         reachability is REACHABLE_BLOCKS.
17839         * domwalk.h (enum dom_walker::reachability): New enum.
17840         (dom_walker::dom_walker): Convert bool param
17841         "skip_unreachable_blocks" to enum reachability.
17842         (set_all_edges_as_executable): New decl.
17843         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
17844         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17845         "reachability".
17846         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17847         but converting true to REACHABLE_BLOCKS.
17848         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17849         * tree-vrp.c
17850         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17851         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17852         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17853         REACHABLE_BLOCKS.
17854         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17855         if check_all_array_refs will be called.
17857 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17859         * tree.c (selftest::test_location_wrappers): Add more test
17860         coverage.
17862 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17864         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17865         (selftest::test_bit_in_range): Likewise.
17867 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17869         PR testsuite/83888
17870         * doc/sourcebuild.texi (vect_float): Say that the selector
17871         only describes the situation when -funsafe-math-optimizations is on.
17872         (vect_float_strict): Document.
17874 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17876         PR tree-optimization/83965
17877         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17878         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17879         instead of checking only for a reduction.
17880         (vect_recog_widen_sum_pattern): Likewise.
17882 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17884         * predict.c (probably_never_executed): Only use precise profile info.
17885         (compute_function_frequency): Skip after inlining hack since we now
17886         have quality checking.
17888 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17890         * profile-count.h (profile_probability::very_unlikely,
17891         profile_probability::unlikely, profile_probability::even): Set
17892         precision to guessed.
17894 2018-01-23  Richard Biener  <rguenther@suse.de>
17896         PR tree-optimization/83963
17897         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17898         Properly terminate dominator walk when crossing the exit edge not
17899         when visiting its source block.
17901 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
17903         PR c++/83918
17904         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17905         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17907 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
17909         PR tree-optimization/83957
17910         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
17911         semicolon after for body surrounded by braces.
17913         PR tree-optimization/83081
17914         * profile-count.h (profile_probability::split): New method.
17915         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17916         Use profile_probability::split.
17917         (do_compare_rtx_and_jump): Fix adjustment of probabilities
17918         when splitting a single conditional jump into 2.
17920 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
17922         PR tree-optimization/69452
17923         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17924         decl.
17926 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17928         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17929         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17930         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17932 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17934         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17935         declaration.
17936         * config/rl78/rl78.md (movdi): New define_expand.
17937         * config/rl78/rl78.c (rl78_split_movdi): New function.
17939 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
17941         PR target/83862
17942         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17943         no longer used.
17944         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17945         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17946         128-bit to produce an UNSPEC move to get the double word with the
17947         signbit and then a shift directly to do signbit.
17948         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17949         implementation with a new version that just does either a direct
17950         move or a regular move.  Move memory interface to separate insns.
17951         Move insns so they are next to the expander.
17952         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17953         with signbit move.  Split big and little endian case.
17954         (signbit<mode>2_dm_mem_le): Likewise.
17955         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17956         (signbit<mode>2_dm2): Likewise.
17958 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17960         * config/rl78/rl78.md (anddi3): New define_expand.
17962 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17964         * config/rl78/rl78.md (umindi3): New define_expand.
17966 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17968         * config/rl78/rl78.md (smindi3): New define_expand.
17970 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17972         * config/rl78/rl78.md (smaxdi3): New define_expand.
17974 2018-01-22  Carl Love  <cel@us.ibm.com>
17976         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17977         LVX_V1TI): Add macro expansion.
17978         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17979         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17980         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17981         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17982         Change check to determine if the instruction is a byte reversing
17983         entry.  Fix typo in comment.
17984         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17985         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17986         Add def_builtin calls for new builtins.
17987         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17988         Add define_insn expansion.
17990 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17992         * config/rl78/rl78.md (umaxdi3): New define_expand.
17994 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17996         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17997         for non-QImode registers.
17999 2018-01-22  Richard Biener  <rguenther@suse.de>
18001         PR tree-optimization/83963
18002         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18003         including the loop exit block.
18004         (scop_detection::merge_sese): Likewise.
18005         (scop_detection::add_scop): Do it here instead.
18007 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18009         * doc/sourcebuild.texi (arm_softfloat): Document.
18011 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18013         PR gcc/77734
18014         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18015         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18016         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18018 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18019             David Edelsohn  <dje.gcc@gmail.com>
18021         PR target/83946
18022         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18023         Change "crset eq" to "crset 2".
18024         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18025         (*call_indirect_aix<mode>_nospec): Likewise.
18026         (*call_value_indirect_aix<mode>_nospec): Likewise.
18027         (*call_indirect_elfv2<mode>_nospec): Likewise.
18028         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18029         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18030         change assembly output from . to $.
18031         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18032         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18033         (*tablejump<mode>_internal1_nospec): Likewise.
18035 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18037         PR target/80870
18038         * config/sh/sh_optimize_sett_clrt.cc:
18039         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18041 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18043         PR tree-optimization/83940
18044         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18045         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18046         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18047         use it to pass back the definition type.
18048         (vect_check_store_rhs): Likewise rhs_dt_out.
18049         (vect_build_gather_load_calls): Add a mask_dt argument and use
18050         it instead of a call to vect_is_simple_use.
18051         (vectorizable_store): Update calls to vect_check_load_store_mask
18052         and vect_check_store_rhs.  Use the dt returned by the latter instead
18053         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18054         instead of calls to vect_is_simple_use.  Pass the scalar rather
18055         than the vector operand to vect_is_simple_use when handling
18056         second and subsequent copies of an rhs value.
18057         (vectorizable_load): Update calls to vect_check_load_store_mask
18058         and vect_build_gather_load_calls.  Use the cached mask_dt and
18059         gs_info.offset_dt instead of calls to vect_is_simple_use.
18061 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18063         PR middle-end/83945
18064         * tree-emutls.c: Include gimplify.h.
18065         (lower_emutls_2): New function.
18066         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18067         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18068         it before further processing.
18070         PR target/83930
18071         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18072         UINTVAL (trueop1) instead of INTVAL (op1).
18074 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18076         PR debug/81570
18077         PR debug/83728
18078         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18079         INCOMING_FRAME_SP_OFFSET if not defined.
18080         (scan_trace): Add ENTRY argument.  If true and
18081         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18082         emit a note to adjust the CFA offset.
18083         (create_cfi_notes): Adjust scan_trace callers.
18084         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18085         INCOMING_FRAME_SP_OFFSET in the CIE.
18086         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18087         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18088         Likewise.
18089         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18090         * doc/tm.texi: Regenerated.
18092 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18094         PR rtl-optimization/83147
18095         * lra-constraints.c (remove_inheritance_pseudos): Use
18096         lra_substitute_pseudo_within_insn.
18098 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18099             Cesar Philippidis  <cesar@codesourcery.com>
18101         PR target/83920
18102         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18104 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18106         PR target/83790
18107         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18108         spaces for function labels.
18110 2018-01-19  Martin Liska  <mliska@suse.cz>
18112         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18113         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18114         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18115         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18116         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18117         (PRED_CONST_RETURN): Change from 69 to 65.
18118         (PRED_NULL_RETURN): Change from 91 to 71.
18119         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18120         (PRED_LOOP_GUARD): Change from 66 to 73.
18122 2018-01-19  Martin Liska  <mliska@suse.cz>
18124         * predict.c (predict_insn_def): Add new assert.
18125         (struct branch_predictor): Change type to signed integer.
18126         (test_prediction_value_range): Amend test to cover
18127         PROB_UNINITIALIZED.
18128         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18129         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18130         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18131         (PRED_LOOP_IV_COMPARE): Likewise.
18132         * predict.h (PROB_UNINITIALIZED): Define new constant.
18134 2018-01-19  Martin Liska  <mliska@suse.cz>
18136         * predict.c (dump_prediction): Add new format for
18137         analyze_brprob.py script which is enabled with -details
18138         suboption.
18139         * profile-count.h (precise_p): New function.
18141 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18143         PR tree-optimization/83922
18144         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18145         there are no statements that need masking.
18146         (vect_active_double_reduction_p): New function.
18147         (vect_analyze_loop_operations): Use it when handling phis that
18148         are not in the loop header.
18150 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18152         PR tree-optimization/83914
18153         * tree-vect-loop.c (vectorizable_induction): Don't convert
18154         init_expr or apply the peeling adjustment for inductions
18155         that are nested within the vectorized loop.
18157 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18159         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18160         instead of NEG.
18162 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18164         PR sanitizer/81715
18165         PR testsuite/83882
18166         * function.h (gimplify_parameters): Add gimple_seq * argument.
18167         * function.c: Include gimple.h and options.h.
18168         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18169         for the added local temporaries if needed.
18170         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18171         if there are any parameter cleanups, wrap whole body into a
18172         try/finally with the cleanups.
18174 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18176         PR target/82964
18177         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18178         Use GET_MODE_CLASS for scalar floating point.
18180 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18182         PR ipa/82256
18183         patch by PaX Team
18184         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18185         Fix call of call_cgraph_insertion_hooks.
18187 2018-01-18  Martin Sebor  <msebor@redhat.com>
18189         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18191 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18193         PR ipa/83619
18194         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18195         frequencies.
18197 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18199         PR other/70268
18200         * common.opt: (-ffile-prefix-map): New option.
18201         * opts.c (common_handle_option): Defer it.
18202         * opts-global.c (handle_common_deferred_options): Handle it.
18203         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18204         * file-prefix-map.h: New file.
18205         (remap_debug_filename, add_debug_prefix_map): ...here.
18206         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18207         * final.c (debug_prefix_map, add_debug_prefix_map
18208         remap_debug_filename): Move to...
18209         * file-prefix-map.c: New file.
18210         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18211         generalize, get rid of alloca(), use strrchr() instead of strchr().
18212         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18213         Implement in terms of add_prefix_map().
18214         (remap_macro_filename, remap_debug_filename): Implement in term of
18215         remap_filename().
18216         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18217         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18218         * dbxout.c: Include file-prefix-map.h.
18219         * varasm.c: Likewise.
18220         * vmsdbgout.c: Likewise.
18221         * xcoffout.c: Likewise.
18222         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18223         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18224         * doc/invoke.texi (-ffile-prefix-map): Document.
18225         (-fdebug-prefix-map): Update description.
18227 2018-01-18  Martin Liska  <mliska@suse.cz>
18229         * config/i386/i386.c (indirect_thunk_name): Document that also
18230         lfence is emitted.
18231         (output_indirect_thunk): Document why both instructions
18232         (pause and lfence) are generated.
18234 2018-01-18  Richard Biener  <rguenther@suse.de>
18236         PR tree-optimization/83887
18237         * graphite-scop-detection.c
18238         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18239         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18240         (scop_detection::merge_sese): Re-implement with a flood-fill
18241         algorithm that properly finds a SESE region if it exists.
18243 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18245         PR c/61240
18246         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18247         pointer_diff optimizations use view_convert instead of convert.
18249 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18251         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18252         Generate different code for -mno-speculate-indirect-jumps.
18253         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18254         (*call_indirect_aix<mode>): Disable for
18255         -mno-speculate-indirect-jumps.
18256         (*call_indirect_aix<mode>_nospec): New define_insn.
18257         (*call_value_indirect_aix<mode>): Disable for
18258         -mno-speculate-indirect-jumps.
18259         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18260         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18261         -mno-speculate-indirect-jumps.
18262         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18264 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18266         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18267         long double type, set the flags for noting the default long double
18268         type, even if we don't pass or return a long double type.
18270 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18272         PR ipa/83051
18273         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18274         failure.
18276 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18278         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18279         support for merge[hl].
18280         (fold_mergehl_helper): New helper function.
18281         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18282         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18283         (altivec_vmrglw_direct): Add xxmrglw insn.
18285 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18287         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18288         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18290 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18292         PR lto/83121
18293         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18294         call the lto_location_cache before reading the
18295         DECL_SOURCE_LOCATION of the types.
18297 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18298             Richard Sandiford  <richard.sandiford@linaro.org>
18300         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18301         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18302         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18303         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18304         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18305         Add declaration.
18306         * config/aarch64/constraints.md (aarch64_movti_operand):
18307         Limit immediates.
18308         * config/aarch64/predicates.md (Uti): Add new constraint.
18310 2018-01-17 Carl Love  <cel@us.ibm.com>
18312         * config/rs6000/vsx.md (define_expand xl_len_r,
18313         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18314         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18315         lxvll.
18316         (define_expand, define_insn): Move the shift left from  the
18317         define_insn to the define_expand for lxvl and stxvl instructions.
18318         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18319         and XL_LEN_R definitions to PURE.
18321 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18323         * config/i386/i386.c (indirect_thunk_name): Declare regno
18324         as unsigned int.  Compare regno with INVALID_REGNUM.
18325         (output_indirect_thunk): Ditto.
18326         (output_indirect_thunk_function): Ditto.
18327         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18328         in the call to output_indirect_thunk_function.
18330 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18332         PR middle-end/83884
18333         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18334         rather than the size of inner_type to determine the stack slot size
18335         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18337 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18339         PR target/83546
18340         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18341         to PTA_SILVERMONT.
18343 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18345         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18346         endian Linux systems to optionally enable multilibs for selecting
18347         the long double type if the user configured an explicit type.
18348         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18349         have no long double multilibs if not defined.
18350         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18351         warn if the user used -mabi={ieee,ibm}longdouble and we built
18352         multilibs for long double.
18353         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18354         appropriate multilib option.
18355         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18356         multilib options.
18357         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18358         for building long double multilibs.
18359         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18361 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18363         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18364         copies.
18366         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18367         64 bits.
18368         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18369         128 bits.
18371         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18372         variables.
18374         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18375         return value.
18377 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18379         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18380         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18382 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18384         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18385         different rtl trees depending on TARGET_64BIT.
18386         (rs6000_gen_lvx): Likewise.
18388 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18390         * config/visium/visium.md (nop): Tweak comment.
18391         (hazard_nop): Likewise.
18393 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18395         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18396         -mspeculate-indirect-jumps.
18397         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18398         for -mno-speculate-indirect-jumps.
18399         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18400         (*call_value_indirect_elfv2<mode>): Disable for
18401         -mno-speculate-indirect-jumps.
18402         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18403         (indirect_jump): Emit different RTL for
18404         -mno-speculate-indirect-jumps.
18405         (*indirect_jump<mode>): Disable for
18406         -mno-speculate-indirect-jumps.
18407         (*indirect_jump<mode>_nospec): New define_insn.
18408         (tablejump): Emit different RTL for
18409         -mno-speculate-indirect-jumps.
18410         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18411         (tablejumpsi_nospec): New define_expand.
18412         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18413         (tablejumpdi_nospec): New define_expand.
18414         (*tablejump<mode>_internal1): Disable for
18415         -mno-speculate-indirect-jumps.
18416         (*tablejump<mode>_internal1_nospec): New define_insn.
18417         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18418         option.
18420 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18422         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18423         callers updated.
18425 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18426             Richard Biener  <rguenth@suse.de>
18428         PR libgomp/83590
18429         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18430         return early, inline manually is_gimple_sizepos.  Make sure if we
18431         call gimplify_expr we don't end up with a gimple constant.
18432         * tree.c (variably_modified_type_p): Don't return true for
18433         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18434         * gimplify.h (is_gimple_sizepos): Remove.
18436 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18438         PR tree-optimization/83857
18439         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18440         vectorizable_live_operation for pure SLP statements.
18441         (vectorizable_live_operation): Handle PHIs.
18443 2018-01-16  Richard Biener  <rguenther@suse.de>
18445         PR tree-optimization/83867
18446         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18447         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18449 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18451         PR c/83844
18452         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18453         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18454         If off is not INTEGER_CST, issue a may not be aligned warning
18455         rather than isn't aligned.  Use isn%'t rather than isn't.
18456         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18457         into MULT_EXPR.
18458         <case MULT_EXPR>: Improve the case when bottom and one of the
18459         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18460         operand, in that case check if the other operand is multiple of
18461         bottom divided by the INTEGER_CST operand.
18463 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18465         PR target/83858
18466         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18467         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18468         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18469         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18470         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18471         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18472         (pa_function_arg_size): New function.
18474 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18476         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18477         in a separate statement.
18479 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18481         PR tree-optimization/83847
18482         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18483         group gathers and scatters.
18485 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18487         PR rtl-optimization/86620
18488         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18490         PR rtl-optimization/83213
18491         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18492         to last if both are JUMP_INSNs.
18494         PR tree-optimization/83843
18495         * gimple-ssa-store-merging.c
18496         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18497         store_immediate_info for bswap/nop orig_stores.
18499 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18501         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18502         !TARGET_MUL.
18503         <UDIV>: Increase cost if !TARGET_DIV.
18505 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18507         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18508         (define_attr "cr_logical_3op"): New.
18509         (cceq_ior_compare): Adjust.
18510         (cceq_ior_compare_complement): Adjust.
18511         (*cceq_rev_compare): Adjust.
18512         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18513         (is_cracked_insn): Adjust.
18514         (insn_must_be_first_in_group): Adjust.
18515         * config/rs6000/40x.md: Adjust.
18516         * config/rs6000/440.md: Adjust.
18517         * config/rs6000/476.md: Adjust.
18518         * config/rs6000/601.md: Adjust.
18519         * config/rs6000/603.md: Adjust.
18520         * config/rs6000/6xx.md: Adjust.
18521         * config/rs6000/7450.md: Adjust.
18522         * config/rs6000/7xx.md: Adjust.
18523         * config/rs6000/8540.md: Adjust.
18524         * config/rs6000/cell.md: Adjust.
18525         * config/rs6000/e300c2c3.md: Adjust.
18526         * config/rs6000/e500mc.md: Adjust.
18527         * config/rs6000/e500mc64.md: Adjust.
18528         * config/rs6000/e5500.md: Adjust.
18529         * config/rs6000/e6500.md: Adjust.
18530         * config/rs6000/mpc.md: Adjust.
18531         * config/rs6000/power4.md: Adjust.
18532         * config/rs6000/power5.md: Adjust.
18533         * config/rs6000/power6.md: Adjust.
18534         * config/rs6000/power7.md: Adjust.
18535         * config/rs6000/power8.md: Adjust.
18536         * config/rs6000/power9.md: Adjust.
18537         * config/rs6000/rs64.md: Adjust.
18538         * config/rs6000/titan.md: Adjust.
18540 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18542         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18543         ix86_indirect_branch_register logic.
18545 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18547         * config/i386/constraints.md (Bs): Update
18548         ix86_indirect_branch_register check.  Don't check
18549         ix86_indirect_branch_register with GOT_memory_operand.
18550         (Bw): Likewise.
18551         * config/i386/predicates.md (GOT_memory_operand): Don't check
18552         ix86_indirect_branch_register here.
18553         (GOT32_symbol_operand): Likewise.
18555 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18557         * config/i386/predicates.md (constant_call_address_operand):
18558         Rewrite ix86_indirect_branch_register logic.
18559         (sibcall_insn_operand): Likewise.
18561 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18563         * config/i386/constraints.md (Bs): Replace
18564         ix86_indirect_branch_thunk_register with
18565         ix86_indirect_branch_register.
18566         (Bw): Likewise.
18567         * config/i386/i386.md (indirect_jump): Likewise.
18568         (tablejump): Likewise.
18569         (*sibcall_memory): Likewise.
18570         (*sibcall_value_memory): Likewise.
18571         Peepholes of indirect call and jump via memory: Likewise.
18572         * config/i386/i386.opt: Likewise.
18573         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18574         (GOT_memory_operand): Likewise.
18575         (call_insn_operand): Likewise.
18576         (sibcall_insn_operand): Likewise.
18577         (GOT32_symbol_operand): Likewise.
18579 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18581         PR middle-end/83837
18582         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18583         type rather than type addr's type points to.
18584         (expand_omp_atomic_mutex): Likewise.
18585         (expand_omp_atomic): Likewise.
18587 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18589         PR target/83839
18590         * config/i386/i386.c (output_indirect_thunk_function): Use
18591         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18592         for  __x86_return_thunk.
18594 2018-01-15  Richard Biener  <rguenther@suse.de>
18596         PR middle-end/83850
18597         * expmed.c (extract_bit_field_1): Fix typo.
18599 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18601         PR target/83687
18602         * config/arm/iterators.md (VF): New mode iterator.
18603         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18604         Remove integer-related logic from pattern.
18605         (neon_vabd<mode>_3): Likewise.
18607 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18609         PR middle-end/82694
18610         * common.opt (fstrict-overflow): No longer an alias.
18611         (fwrapv-pointer): New option.
18612         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18613         also for pointer types based on flag_wrapv_pointer.
18614         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18615         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18616         opts->x_flag_wrapv got set.
18617         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18618         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18619         POINTER_TYPE_OVERFLOW_UNDEFINED.
18620         * match.pd: Likewise in address comparison pattern.
18621         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18623 2018-01-15  Richard Biener  <rguenther@suse.de>
18625         PR lto/83804
18626         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18627         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
18628         Reset type names to their identifier if their TYPE_DECL doesn't
18629         have linkage (and thus is used for ODR and devirt).
18630         (save_debug_info_for_decl): Remove.
18631         (save_debug_info_for_type): Likewise.
18632         (add_tree_to_fld_list): Adjust.
18633         * tree-pretty-print.c (dump_generic_node): Make dumping of
18634         type names more robust.
18636 2018-01-15  Richard Biener  <rguenther@suse.de>
18638         * BASE-VER: Bump to 8.0.1.
18640 2018-01-14  Martin Sebor  <msebor@redhat.com>
18642         PR other/83508
18643         * builtins.c (check_access): Avoid warning when the no-warning bit
18644         is set.
18646 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
18648         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18649         * ira-color (allocno_hard_regs_compare): Likewise.
18651 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
18653         PR target/83013
18654         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18655         Use .pushsection/.popsection.
18657 2018-01-14  Martin Sebor  <msebor@redhat.com>
18659         PR c++/81327
18660         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18662 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
18664         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18665         entry from extra_headers.
18666         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18667         extra_headers, make the list bitwise identical to the i?86-*-* one.
18669 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18671         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18672         -mcmodel=large with -mindirect-branch=thunk,
18673         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18674         -mfunction-return=thunk-extern.
18675         * doc/invoke.texi: Document -mcmodel=large is incompatible with
18676         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18677         -mfunction-return=thunk and -mfunction-return=thunk-extern.
18679 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18681         * config/i386/i386.c (print_reg): Print the name of the full
18682         integer register without '%'.
18683         (ix86_print_operand): Handle 'V'.
18684         * doc/extend.texi: Document 'V' modifier.
18686 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18688         * config/i386/constraints.md (Bs): Disallow memory operand for
18689         -mindirect-branch-register.
18690         (Bw): Likewise.
18691         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18692         (GOT_memory_operand): Likewise.
18693         (call_insn_operand): Likewise.
18694         (sibcall_insn_operand): Likewise.
18695         (GOT32_symbol_operand): Likewise.
18696         * config/i386/i386.md (indirect_jump): Call convert_memory_address
18697         for -mindirect-branch-register.
18698         (tablejump): Likewise.
18699         (*sibcall_memory): Likewise.
18700         (*sibcall_value_memory): Likewise.
18701         Disallow peepholes of indirect call and jump via memory for
18702         -mindirect-branch-register.
18703         (*call_pop): Replace m with Bw.
18704         (*call_value_pop): Likewise.
18705         (*sibcall_pop_memory): Replace m with Bs.
18706         * config/i386/i386.opt (mindirect-branch-register): New option.
18707         * doc/invoke.texi: Document -mindirect-branch-register option.
18709 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18711         * config/i386/i386-protos.h (ix86_output_function_return): New.
18712         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18713         set function_return_type.
18714         (indirect_thunk_name): Add ret_p to indicate thunk for function
18715         return.
18716         (output_indirect_thunk_function): Pass false to
18717         indirect_thunk_name.
18718         (ix86_output_indirect_branch_via_reg): Likewise.
18719         (ix86_output_indirect_branch_via_push): Likewise.
18720         (output_indirect_thunk_function): Create alias for function
18721         return thunk if regno < 0.
18722         (ix86_output_function_return): New function.
18723         (ix86_handle_fndecl_attribute): Handle function_return.
18724         (ix86_attribute_table): Add function_return.
18725         * config/i386/i386.h (machine_function): Add
18726         function_return_type.
18727         * config/i386/i386.md (simple_return_internal): Use
18728         ix86_output_function_return.
18729         (simple_return_internal_long): Likewise.
18730         * config/i386/i386.opt (mfunction-return=): New option.
18731         (indirect_branch): Mention -mfunction-return=.
18732         * doc/extend.texi: Document function_return function attribute.
18733         * doc/invoke.texi: Document -mfunction-return= option.
18735 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18737         * config/i386/i386-opts.h (indirect_branch): New.
18738         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18739         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18740         with local indirect jump when converting indirect call and jump.
18741         (ix86_set_indirect_branch_type): New.
18742         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18743         (indirectlabelno): New.
18744         (indirect_thunk_needed): Likewise.
18745         (indirect_thunk_bnd_needed): Likewise.
18746         (indirect_thunks_used): Likewise.
18747         (indirect_thunks_bnd_used): Likewise.
18748         (INDIRECT_LABEL): Likewise.
18749         (indirect_thunk_name): Likewise.
18750         (output_indirect_thunk): Likewise.
18751         (output_indirect_thunk_function): Likewise.
18752         (ix86_output_indirect_branch_via_reg): Likewise.
18753         (ix86_output_indirect_branch_via_push): Likewise.
18754         (ix86_output_indirect_branch): Likewise.
18755         (ix86_output_indirect_jmp): Likewise.
18756         (ix86_code_end): Call output_indirect_thunk_function if needed.
18757         (ix86_output_call_insn): Call ix86_output_indirect_branch if
18758         needed.
18759         (ix86_handle_fndecl_attribute): Handle indirect_branch.
18760         (ix86_attribute_table): Add indirect_branch.
18761         * config/i386/i386.h (machine_function): Add indirect_branch_type
18762         and has_local_indirect_jump.
18763         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18764         to true.
18765         (tablejump): Likewise.
18766         (*indirect_jump): Use ix86_output_indirect_jmp.
18767         (*tablejump_1): Likewise.
18768         (simple_return_indirect_internal): Likewise.
18769         * config/i386/i386.opt (mindirect-branch=): New option.
18770         (indirect_branch): New.
18771         (keep): Likewise.
18772         (thunk): Likewise.
18773         (thunk-inline): Likewise.
18774         (thunk-extern): Likewise.
18775         * doc/extend.texi: Document indirect_branch function attribute.
18776         * doc/invoke.texi: Document -mindirect-branch= option.
18778 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
18780         PR ipa/83051
18781         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18783 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
18785         * ipa-inline.c (want_inline_small_function_p): Return false if
18786         inlining has already failed with CIF_FINAL_ERROR.
18787         (update_caller_keys): Call want_inline_small_function_p before
18788         can_inline_edge_p.
18789         (update_callee_keys): Likewise.
18791 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18793         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18794         New function.
18795         (rs6000_quadword_masked_address_p): Likewise.
18796         (quad_aligned_load_p): Likewise.
18797         (quad_aligned_store_p): Likewise.
18798         (const_load_sequence_p): Add comment to describe the outer-most loop.
18799         (mimic_memory_attributes_and_flags): New function.
18800         (rs6000_gen_stvx): Likewise.
18801         (replace_swapped_aligned_store): Likewise.
18802         (rs6000_gen_lvx): Likewise.
18803         (replace_swapped_aligned_load): Likewise.
18804         (replace_swapped_load_constant): Capitalize argument name in
18805         comment describing this function.
18806         (rs6000_analyze_swaps): Add a third pass to search for vector loads
18807         and stores that access quad-word aligned addresses and replace
18808         with stvx or lvx instructions when appropriate.
18809         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18810         New function prototype.
18811         (rs6000_quadword_masked_address_p): Likewise.
18812         (rs6000_gen_lvx): Likewise.
18813         (rs6000_gen_stvx): Likewise.
18814         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18815         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18816         when memory address is aligned.
18817         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18818         this split to select lvx instruction when memory address is aligned.
18819         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18820         instruction when memory address is aligned.
18821         (*vsx_le_perm_load_v16qi): Likewise.
18822         (four unnamed splitters): Modify to select the stvx instruction
18823         when memory is aligned.
18825 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
18827         * predict.c (determine_unlikely_bbs): Handle correctly BBs
18828         which appears in the queue multiple times.
18830 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18831             Alan Hayward  <alan.hayward@arm.com>
18832             David Sherwood  <david.sherwood@arm.com>
18834         * tree-vectorizer.h (vec_lower_bound): New structure.
18835         (_loop_vec_info): Add check_nonzero and lower_bounds.
18836         (LOOP_VINFO_CHECK_NONZERO): New macro.
18837         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18838         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18839         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18840         fields.  Make seg_len the distance travelled, not including the
18841         access size.
18842         (dr_direction_indicator): Declare.
18843         (dr_zero_step_indicator): Likewise.
18844         (dr_known_forward_stride_p): Likewise.
18845         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18846         tree-ssanames.h.
18847         (runtime_alias_check_p): Allow runtime alias checks with
18848         variable strides.
18849         (operator ==): Compare access_size and align.
18850         (prune_runtime_alias_test_list): Rework for new distinction between
18851         the access_size and seg_len.
18852         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
18853         segment lengths.
18854         (get_segment_min_max): New function.
18855         (create_intersect_range_checks): Use it.
18856         (dr_step_indicator): New function.
18857         (dr_direction_indicator): Likewise.
18858         (dr_zero_step_indicator): Likewise.
18859         (dr_known_forward_stride_p): Likewise.
18860         * tree-loop-distribution.c (data_ref_segment_size): Return
18861         DR_STEP * (niters - 1).
18862         (compute_alias_check_pairs): Update call to the dr_with_seg_len
18863         constructor.
18864         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18865         (vect_preserves_scalar_order_p): New function, split out from...
18866         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
18867         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18868         (vect_vfa_access_size): New function.
18869         (vect_vfa_align): Likewise.
18870         (vect_compile_time_alias): Take access_size_a and access_b arguments.
18871         (dump_lower_bound): New function.
18872         (vect_check_lower_bound): Likewise.
18873         (vect_small_gap_p): Likewise.
18874         (vectorizable_with_step_bound_p): Likewise.
18875         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18876         depencies if the vectorization factor is 1.  Convert the checks
18877         for nonzero steps into checks on the bounds of DR_STEP.  Try using
18878         a bunds check for variable steps if the minimum required step is
18879         relatively small. Update calls to the dr_with_seg_len
18880         constructor and to vect_compile_time_alias.
18881         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18882         function.
18883         (vect_loop_versioning): Call it.
18884         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18885         when retrying.
18886         (vect_estimate_min_profitable_iters): Account for any bounds checks.
18888 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18889             Alan Hayward  <alan.hayward@arm.com>
18890             David Sherwood  <david.sherwood@arm.com>
18892         * doc/sourcebuild.texi (vect_scatter_store): Document.
18893         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18894         optabs.
18895         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18896         Document.
18897         * genopinit.c (main): Add supports_vec_scatter_store and
18898         supports_vec_scatter_store_cached to target_optabs.
18899         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18900         IFN_MASK_SCATTER_STORE.
18901         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18902         functions.
18903         * internal-fn.h (internal_store_fn_p): Declare.
18904         (internal_fn_stored_value_index): Likewise.
18905         * internal-fn.c (scatter_store_direct): New macro.
18906         (expand_scatter_store_optab_fn): New function.
18907         (direct_scatter_store_optab_supported_p): New macro.
18908         (internal_store_fn_p): New function.
18909         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18910         IFN_MASK_SCATTER_STORE.
18911         (internal_fn_mask_index): Likewise.
18912         (internal_fn_stored_value_index): New function.
18913         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18914         for scatter stores.
18915         * optabs-query.h (supports_vec_scatter_store_p): Declare.
18916         * optabs-query.c (supports_vec_scatter_store_p): New function.
18917         * tree-vectorizer.h (vect_get_store_rhs): Declare.
18918         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18919         true for scatter stores.
18920         (vect_gather_scatter_fn_p): Handle scatter stores too.
18921         (vect_check_gather_scatter): Consider using scatter stores if
18922         supports_vec_scatter_store_p.
18923         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18924         scatter stores too.
18925         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18926         internal_fn_stored_value_index.
18927         (check_load_store_masking): Handle scatter stores too.
18928         (vect_get_store_rhs): Make public.
18929         (vectorizable_call): Use internal_store_fn_p.
18930         (vectorizable_store): Handle scatter store internal functions.
18931         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18932         when deciding whether the end of the group has been reached.
18933         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18934         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18935         (mask_scatter_store<mode>): New insns.
18937 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18938             Alan Hayward  <alan.hayward@arm.com>
18939             David Sherwood  <david.sherwood@arm.com>
18941         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18942         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18943         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18944         function.
18945         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18946         Use vect_truncate_gather_scatter_offset if we can't treat the
18947         operation as a normal gather load or scatter store.
18948         (get_group_load_store_type): Take the gather_scatter_info
18949         as argument.  Try using a gather load or scatter store for
18950         single-element groups.
18951         (get_load_store_type): Update calls to get_group_load_store_type
18952         and vect_use_strided_gather_scatters_p.
18954 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18955             Alan Hayward  <alan.hayward@arm.com>
18956             David Sherwood  <david.sherwood@arm.com>
18958         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18959         optional tree argument.
18960         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18961         null target hooks.
18962         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18963         but continue to use the current value as a fallback.
18964         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18965         to compare the updates.
18966         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18967         (get_load_store_type): Use it when handling a strided access.
18968         (vect_get_strided_load_store_ops): New function.
18969         (vect_get_data_ptr_increment): Likewise.
18970         (vectorizable_load): Handle strided gather loads.  Always pass
18971         a step to vect_create_data_ref_ptr and bump_vector_ptr.
18973 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18974             Alan Hayward  <alan.hayward@arm.com>
18975             David Sherwood  <david.sherwood@arm.com>
18977         * doc/md.texi (gather_load@var{m}): Document.
18978         (mask_gather_load@var{m}): Likewise.
18979         * genopinit.c (main): Add supports_vec_gather_load and
18980         supports_vec_gather_load_cached to target_optabs.
18981         * optabs-tree.c (init_tree_optimization_optabs): Use
18982         ggc_cleared_alloc to allocate target_optabs.
18983         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18984         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18985         functions.
18986         * internal-fn.h (internal_load_fn_p): Declare.
18987         (internal_gather_scatter_fn_p): Likewise.
18988         (internal_fn_mask_index): Likewise.
18989         (internal_gather_scatter_fn_supported_p): Likewise.
18990         * internal-fn.c (gather_load_direct): New macro.
18991         (expand_gather_load_optab_fn): New function.
18992         (direct_gather_load_optab_supported_p): New macro.
18993         (direct_internal_fn_optab): New function.
18994         (internal_load_fn_p): Likewise.
18995         (internal_gather_scatter_fn_p): Likewise.
18996         (internal_fn_mask_index): Likewise.
18997         (internal_gather_scatter_fn_supported_p): Likewise.
18998         * optabs-query.c (supports_at_least_one_mode_p): New function.
18999         (supports_vec_gather_load_p): Likewise.
19000         * optabs-query.h (supports_vec_gather_load_p): Declare.
19001         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19002         and memory_type field.
19003         (NUM_PATTERNS): Bump to 15.
19004         * tree-vect-data-refs.c: Include internal-fn.h.
19005         (vect_gather_scatter_fn_p): New function.
19006         (vect_describe_gather_scatter_call): Likewise.
19007         (vect_check_gather_scatter): Try using internal functions for
19008         gather loads.  Recognize existing calls to a gather load function.
19009         (vect_analyze_data_refs): Consider using gather loads if
19010         supports_vec_gather_load_p.
19011         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19012         (vect_get_gather_scatter_offset_type): Likewise.
19013         (vect_convert_mask_for_vectype): Likewise.
19014         (vect_add_conversion_to_patterm): Likewise.
19015         (vect_try_gather_scatter_pattern): Likewise.
19016         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19017         (vect_vect_recog_func_ptrs): Add it.
19018         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19019         internal_fn_mask_index and internal_gather_scatter_fn_p.
19020         (check_load_store_masking): Take the gather_scatter_info as an
19021         argument and handle gather loads.
19022         (vect_get_gather_scatter_ops): New function.
19023         (vectorizable_call): Check internal_load_fn_p.
19024         (vectorizable_load): Likewise.  Handle gather load internal
19025         functions.
19026         (vectorizable_store): Update call to check_load_store_masking.
19027         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19028         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19029         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19030         (aarch64_gather_scale_operand_d): New predicates.
19031         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19032         (mask_gather_load<mode>): New insns.
19034 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19035             Alan Hayward  <alan.hayward@arm.com>
19036             David Sherwood  <david.sherwood@arm.com>
19038         * optabs.def (fold_left_plus_optab): New optab.
19039         * doc/md.texi (fold_left_plus_@var{m}): Document.
19040         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19041         * internal-fn.c (fold_left_direct): Define.
19042         (expand_fold_left_optab_fn): Likewise.
19043         (direct_fold_left_optab_supported_p): Likewise.
19044         * fold-const-call.c (fold_const_fold_left): New function.
19045         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19046         * tree-parloops.c (valid_reduction_p): New function.
19047         (gather_scalar_reductions): Use it.
19048         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19049         (vect_finish_replace_stmt): Declare.
19050         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19051         (needs_fold_left_reduction_p): New function, split out from...
19052         (vect_is_simple_reduction): ...here.  Accept reductions that
19053         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19054         (vect_force_simple_reduction): Also store the reduction type in
19055         the assignment's STMT_VINFO_REDUC_TYPE.
19056         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19057         (merge_with_identity): New function.
19058         (vect_expand_fold_left): Likewise.
19059         (vectorize_fold_left_reduction): Likewise.
19060         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19061         scalar phi in place for it.  Check for target support and reject
19062         cases that would reassociate the operation.  Defer the transform
19063         phase to vectorize_fold_left_reduction.
19064         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19065         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19066         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19068 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19070         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19071         call to ifc_temp_var.
19073 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19074             Alan Hayward  <alan.hayward@arm.com>
19075             David Sherwood  <david.sherwood@arm.com>
19077         * target.def (legitimize_address_displacement): Take the original
19078         offset as a poly_int.
19079         * targhooks.h (default_legitimize_address_displacement): Update
19080         accordingly.
19081         * targhooks.c (default_legitimize_address_displacement): Likewise.
19082         * doc/tm.texi: Regenerate.
19083         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19084         as an argument, moving assert of ad->disp == ad->disp_term to...
19085         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19086         Try calling targetm.legitimize_address_displacement before expanding
19087         the address rather than afterwards, and adjust for the new interface.
19088         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19089         Match the new hook interface.  Handle SVE addresses.
19090         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19091         new hook interface.
19093 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19095         * Makefile.in (OBJS): Add early-remat.o.
19096         * target.def (select_early_remat_modes): New hook.
19097         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19098         * doc/tm.texi: Regenerate.
19099         * targhooks.h (default_select_early_remat_modes): Declare.
19100         * targhooks.c (default_select_early_remat_modes): New function.
19101         * timevar.def (TV_EARLY_REMAT): New timevar.
19102         * passes.def (pass_early_remat): New pass.
19103         * tree-pass.h (make_pass_early_remat): Declare.
19104         * early-remat.c: New file.
19105         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19106         function.
19107         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19109 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19110             Alan Hayward  <alan.hayward@arm.com>
19111             David Sherwood  <david.sherwood@arm.com>
19113         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19114         vfm1 with a bound_epilog parameter.
19115         (vect_do_peeling): Update calls accordingly, and move the prologue
19116         call earlier in the function.  Treat the base bound_epilog as 0 for
19117         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19118         this base when peeling for gaps.
19119         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19120         with fully-masked loops.
19121         (vect_estimate_min_profitable_iters): Handle the single peeled
19122         iteration in that case.
19124 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19125             Alan Hayward  <alan.hayward@arm.com>
19126             David Sherwood  <david.sherwood@arm.com>
19128         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19129         single-element interleaving even if the size is not a power of 2.
19130         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19131         accesses for single-element interleaving if the group size is
19132         not a power of 2.
19134 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19135             Alan Hayward  <alan.hayward@arm.com>
19136             David Sherwood  <david.sherwood@arm.com>
19138         * doc/md.texi (fold_extract_last_@var{m}): Document.
19139         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19140         * optabs.def (fold_extract_last_optab): New optab.
19141         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19142         * internal-fn.c (fold_extract_direct): New macro.
19143         (expand_fold_extract_optab_fn): Likewise.
19144         (direct_fold_extract_optab_supported_p): Likewise.
19145         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19146         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19147         EXTRACT_LAST_REDUCTION.
19148         (get_initial_def_for_reduction): Do not create an initial vector
19149         for EXTRACT_LAST_REDUCTION reductions.
19150         (vectorizable_reduction): Leave the scalar phi in place for
19151         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19152         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19153         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19154         transform phase to vectorizable_condition.
19155         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19156         split out from...
19157         (vect_finish_stmt_generation): ...here.
19158         (vect_finish_replace_stmt): New function.
19159         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19160         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19161         pattern.
19162         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19164 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19165             Alan Hayward  <alan.hayward@arm.com>
19166             David Sherwood  <david.sherwood@arm.com>
19168         * doc/md.texi (extract_last_@var{m}): Document.
19169         * optabs.def (extract_last_optab): New optab.
19170         * internal-fn.def (EXTRACT_LAST): New internal function.
19171         * internal-fn.c (cond_unary_direct): New macro.
19172         (expand_cond_unary_optab_fn): Likewise.
19173         (direct_cond_unary_optab_supported_p): Likewise.
19174         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19175         loops using EXTRACT_LAST.
19176         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19177         (extract_last_<mode>): ...this optab.
19178         (vec_extract<mode><Vel>): Update accordingly.
19180 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19181             Alan Hayward  <alan.hayward@arm.com>
19182             David Sherwood  <david.sherwood@arm.com>
19184         * target.def (empty_mask_is_expensive): New hook.
19185         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19186         * doc/tm.texi: Regenerate.
19187         * targhooks.h (default_empty_mask_is_expensive): Declare.
19188         * targhooks.c (default_empty_mask_is_expensive): New function.
19189         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19190         if the target says that empty masks are expensive.
19191         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19192         New function.
19193         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19195 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19196             Alan Hayward  <alan.hayward@arm.com>
19197             David Sherwood  <david.sherwood@arm.com>
19199         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19200         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19201         (vect_use_loop_mask_for_alignment_p): New function.
19202         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19203         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19204         niters_skip argument.  Make sure that the first niters_skip elements
19205         of the first iteration are inactive.
19206         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19207         Update call to vect_set_loop_masks_directly.
19208         (get_misalign_in_elems): New function, split out from...
19209         (vect_gen_prolog_loop_niters): ...here.
19210         (vect_update_init_of_dr): Take a code argument that specifies whether
19211         the adjustment should be added or subtracted.
19212         (vect_update_init_of_drs): Likewise.
19213         (vect_prepare_for_masked_peels): New function.
19214         (vect_do_peeling): Skip prologue peeling if we're using a mask
19215         instead.  Update call to vect_update_inits_of_drs.
19216         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19217         mask_skip_niters.
19218         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19219         alignment.  Do not include the number of peeled iterations in
19220         the minimum threshold in that case.
19221         (vectorizable_induction): Adjust the start value down by
19222         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19223         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19224         Take the number of skipped iterations into account when calculating
19225         the loop bounds.
19226         * tree-vect-stmts.c (vect_gen_while_not): New function.
19228 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19229             Alan Hayward  <alan.hayward@arm.com>
19230             David Sherwood  <david.sherwood@arm.com>
19232         * doc/sourcebuild.texi (vect_fully_masked): Document.
19233         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19234         default value to 0.
19235         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19236         split out from...
19237         (vect_analyze_loop_2): ...here. Don't check the vectorization
19238         factor against the number of loop iterations if the loop is
19239         fully-masked.
19241 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19242             Alan Hayward  <alan.hayward@arm.com>
19243             David Sherwood  <david.sherwood@arm.com>
19245         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19246         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19247         (dump_groups): Update accordingly.
19248         (iv_use::mem_type): New member variable.
19249         (address_p): New function.
19250         (record_use): Add a mem_type argument and initialize the new
19251         mem_type field.
19252         (record_group_use): Add a mem_type argument.  Use address_p.
19253         Remove obsolete null checks of base_object.  Update call to record_use.
19254         (find_interesting_uses_op): Update call to record_group_use.
19255         (find_interesting_uses_cond): Likewise.
19256         (find_interesting_uses_address): Likewise.
19257         (get_mem_type_for_internal_fn): New function.
19258         (find_address_like_use): Likewise.
19259         (find_interesting_uses_stmt): Try find_address_like_use before
19260         calling find_interesting_uses_op.
19261         (addr_offset_valid_p): Use the iv mem_type field as the type
19262         of the addressed memory.
19263         (add_autoinc_candidates): Likewise.
19264         (get_address_cost): Likewise.
19265         (split_small_address_groups_p): Use address_p.
19266         (split_address_groups): Likewise.
19267         (add_iv_candidate_for_use): Likewise.
19268         (autoinc_possible_for_pair): Likewise.
19269         (rewrite_groups): Likewise.
19270         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19271         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19272         (get_alias_ptr_type_for_ptr_address): New function.
19273         (rewrite_use_address): Rewrite address uses in calls that were
19274         identified by find_address_like_use.
19276 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19277             Alan Hayward  <alan.hayward@arm.com>
19278             David Sherwood  <david.sherwood@arm.com>
19280         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19281         TARGET_MEM_REFs.
19282         * gimple-expr.h (is_gimple_addressable: Likewise.
19283         * gimple-expr.c (is_gimple_address): Likewise.
19284         * internal-fn.c (expand_call_mem_ref): New function.
19285         (expand_mask_load_optab_fn): Use it.
19286         (expand_mask_store_optab_fn): Likewise.
19288 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19289             Alan Hayward  <alan.hayward@arm.com>
19290             David Sherwood  <david.sherwood@arm.com>
19292         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19293         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19294         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19295         (cond_umax@var{mode}): Document.
19296         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19297         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19298         (cond_umin_optab, cond_umax_optab): New optabs.
19299         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19300         (COND_IOR, COND_XOR): New internal functions.
19301         * internal-fn.h (get_conditional_internal_fn): Declare.
19302         * internal-fn.c (cond_binary_direct): New macro.
19303         (expand_cond_binary_optab_fn): Likewise.
19304         (direct_cond_binary_optab_supported_p): Likewise.
19305         (get_conditional_internal_fn): New function.
19306         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19307         Cope with reduction statements that are vectorized as calls rather
19308         than assignments.
19309         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19310         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19311         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19312         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19313         (UNSPEC_COND_EOR): New unspecs.
19314         (optab): Add mappings for them.
19315         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19316         (sve_int_op, sve_fp_op): New int attributes.
19318 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19319             Alan Hayward  <alan.hayward@arm.com>
19320             David Sherwood  <david.sherwood@arm.com>
19322         * optabs.def (while_ult_optab): New optab.
19323         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19324         * internal-fn.def (WHILE_ULT): New internal function.
19325         * internal-fn.h (direct_internal_fn_supported_p): New override
19326         that takes two types as argument.
19327         * internal-fn.c (while_direct): New macro.
19328         (expand_while_optab_fn): New function.
19329         (convert_optab_supported_p): Likewise.
19330         (direct_while_optab_supported_p): New macro.
19331         * wide-int.h (wi::udiv_ceil): New function.
19332         * tree-vectorizer.h (rgroup_masks): New structure.
19333         (vec_loop_masks): New typedef.
19334         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19335         and fully_masked_p.
19336         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19337         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19338         (vect_max_vf): New function.
19339         (slpeel_make_loop_iterate_ntimes): Delete.
19340         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19341         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19342         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19343         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19344         internal-fn.h, stor-layout.h and optabs-query.h.
19345         (vect_set_loop_mask): New function.
19346         (add_preheader_seq): Likewise.
19347         (add_header_seq): Likewise.
19348         (interleave_supported_p): Likewise.
19349         (vect_maybe_permute_loop_masks): Likewise.
19350         (vect_set_loop_masks_directly): Likewise.
19351         (vect_set_loop_condition_masked): Likewise.
19352         (vect_set_loop_condition_unmasked): New function, split out from
19353         slpeel_make_loop_iterate_ntimes.
19354         (slpeel_make_loop_iterate_ntimes): Rename to..
19355         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19356         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19357         (vect_do_peeling): Update call accordingly.
19358         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19359         loops.
19360         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19361         mask_compare_type, can_fully_mask_p and fully_masked_p.
19362         (release_vec_loop_masks): New function.
19363         (_loop_vec_info): Use it to free the loop masks.
19364         (can_produce_all_loop_masks_p): New function.
19365         (vect_get_max_nscalars_per_iter): Likewise.
19366         (vect_verify_full_masking): Likewise.
19367         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19368         retries, and free the mask rgroups before retrying.  Check loop-wide
19369         reasons for disallowing fully-masked loops.  Make the final decision
19370         about whether use a fully-masked loop or not.
19371         (vect_estimate_min_profitable_iters): Do not assume that peeling
19372         for the number of iterations will be needed for fully-masked loops.
19373         (vectorizable_reduction): Disable fully-masked loops.
19374         (vectorizable_live_operation): Likewise.
19375         (vect_halve_mask_nunits): New function.
19376         (vect_double_mask_nunits): Likewise.
19377         (vect_record_loop_mask): Likewise.
19378         (vect_get_loop_mask): Likewise.
19379         (vect_transform_loop): Handle the case in which the final loop
19380         iteration might handle a partial vector.  Call vect_set_loop_condition
19381         instead of slpeel_make_loop_iterate_ntimes.
19382         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19383         (check_load_store_masking): New function.
19384         (prepare_load_store_mask): Likewise.
19385         (vectorizable_store): Handle fully-masked loops.
19386         (vectorizable_load): Likewise.
19387         (supportable_widening_operation): Use vect_halve_mask_nunits for
19388         booleans.
19389         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19390         (vect_gen_while): New function.
19391         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19392         (aarch64_uqdec<mode>): New insn.
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         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19399         (reduc_xor_scal_optab): New optabs.
19400         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19401         (reduc_xor_scal_@var{m}): Document.
19402         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19403         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19404         internal functions.
19405         * fold-const-call.c (fold_const_call): Handle them.
19406         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19407         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19408         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19409         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19410         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19411         (UNSPEC_XORV): New unspecs.
19412         (optab): Add entries for them.
19413         (BITWISEV): New int iterator.
19414         (bit_reduc_op): New int attributes.
19416 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19417             Alan Hayward  <alan.hayward@arm.com>
19418             David Sherwood  <david.sherwood@arm.com>
19420         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19421         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19422         * optabs.def (vec_shl_insert_optab): New optab.
19423         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19424         (duplicate_and_interleave): Likewise.
19425         * tree-vect-loop.c: Include internal-fn.h.
19426         (neutral_op_for_slp_reduction): New function, split out from
19427         get_initial_defs_for_reduction.
19428         (get_initial_def_for_reduction): Handle option 2 for variable-length
19429         vectors by loading the neutral value into a vector and then shifting
19430         the initial value into element 0.
19431         (get_initial_defs_for_reduction): Replace the code argument with
19432         the neutral value calculated by neutral_op_for_slp_reduction.
19433         Use gimple_build_vector for constant-length vectors.
19434         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19435         but the first group_size elements have a neutral value.
19436         Use duplicate_and_interleave otherwise.
19437         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19438         Update call to get_initial_defs_for_reduction.  Handle SLP
19439         reductions for variable-length vectors by creating one vector
19440         result for each scalar result, with the elements associated
19441         with other scalar results stubbed out with the neutral value.
19442         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19443         Require IFN_VEC_SHL_INSERT for double reductions on
19444         variable-length vectors, or SLP reductions that have
19445         a neutral value.  Require can_duplicate_and_interleave_p
19446         support for variable-length unchained SLP reductions if there
19447         is no neutral value, such as for MIN/MAX reductions.  Also require
19448         the number of vector elements to be a multiple of the number of
19449         SLP statements when doing variable-length unchained SLP reductions.
19450         Update call to vect_create_epilog_for_reduction.
19451         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19452         and remove initial values.
19453         (duplicate_and_interleave): Make public.
19454         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19455         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19457 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19458             Alan Hayward  <alan.hayward@arm.com>
19459             David Sherwood  <david.sherwood@arm.com>
19461         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19462         (can_duplicate_and_interleave_p): New function.
19463         (vect_get_and_check_slp_defs): Take the vector of statements
19464         rather than just the current one.  Remove excess parentheses.
19465         Restriction rejectinon of vect_constant_def and vect_external_def
19466         for variable-length vectors to boolean types, or types for which
19467         can_duplicate_and_interleave_p is false.
19468         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19469         (duplicate_and_interleave): New function.
19470         (vect_get_constant_vectors): Use gimple_build_vector for
19471         constant-length vectors and suitable variable-length constant
19472         vectors.  Use duplicate_and_interleave for other variable-length
19473         vectors.  Don't defer the update when inserting new statements.
19475 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19476             Alan Hayward  <alan.hayward@arm.com>
19477             David Sherwood  <david.sherwood@arm.com>
19479         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19480         min_profitable_iters doesn't go negative.
19482 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19483             Alan Hayward  <alan.hayward@arm.com>
19484             David Sherwood  <david.sherwood@arm.com>
19486         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19487         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19488         * optabs.def (vec_mask_load_lanes_optab): New optab.
19489         (vec_mask_store_lanes_optab): Likewise.
19490         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19491         (MASK_STORE_LANES): Likewise.
19492         * internal-fn.c (mask_load_lanes_direct): New macro.
19493         (mask_store_lanes_direct): Likewise.
19494         (expand_mask_load_optab_fn): Handle masked operations.
19495         (expand_mask_load_lanes_optab_fn): New macro.
19496         (expand_mask_store_optab_fn): Handle masked operations.
19497         (expand_mask_store_lanes_optab_fn): New macro.
19498         (direct_mask_load_lanes_optab_supported_p): Likewise.
19499         (direct_mask_store_lanes_optab_supported_p): Likewise.
19500         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19501         parameter.
19502         (vect_load_lanes_supported): Likewise.
19503         * tree-vect-data-refs.c (strip_conversion): New function.
19504         (can_group_stmts_p): Likewise.
19505         (vect_analyze_data_ref_accesses): Use it instead of checking
19506         for a pair of assignments.
19507         (vect_store_lanes_supported): Take a masked_p parameter.
19508         (vect_load_lanes_supported): Likewise.
19509         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19510         vect_store_lanes_supported and vect_load_lanes_supported.
19511         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19512         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19513         parameter.  Don't allow gaps for masked accesses.
19514         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19515         and vect_load_lanes_supported.
19516         (get_load_store_type): Take a masked_p parameter and update
19517         call to get_group_load_store_type.
19518         (vectorizable_store): Update call to get_load_store_type.
19519         Handle IFN_MASK_STORE_LANES.
19520         (vectorizable_load): Update call to get_load_store_type.
19521         Handle IFN_MASK_LOAD_LANES.
19523 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19524             Alan Hayward  <alan.hayward@arm.com>
19525             David Sherwood  <david.sherwood@arm.com>
19527         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19528         modes for SVE.
19529         * config/aarch64/aarch64-protos.h
19530         (aarch64_sve_struct_memory_operand_p): Declare.
19531         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19532         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19533         (VPRED, vpred): Handle SVE structure modes.
19534         * config/aarch64/constraints.md (Utx): New constraint.
19535         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19536         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19537         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19538         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19539         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19540         structure modes.  Split into pieces after RA.
19541         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19542         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19543         New patterns.
19544         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19545         SVE structure modes.
19546         (aarch64_classify_address): Likewise.
19547         (sizetochar): Move earlier in file.
19548         (aarch64_print_operand): Handle SVE register lists.
19549         (aarch64_array_mode): New function.
19550         (aarch64_sve_struct_memory_operand_p): Likewise.
19551         (TARGET_ARRAY_MODE): Redefine.
19553 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19554             Alan Hayward  <alan.hayward@arm.com>
19555             David Sherwood  <david.sherwood@arm.com>
19557         * target.def (array_mode): New target hook.
19558         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19559         * doc/tm.texi: Regenerate.
19560         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19561         * hooks.c (hook_optmode_mode_uhwi_none): New function.
19562         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19563         targetm.array_mode.
19564         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
19565         type sizes.
19567 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19568             Alan Hayward  <alan.hayward@arm.com>
19569             David Sherwood  <david.sherwood@arm.com>
19571         * fold-const.c (fold_binary_loc): Check the argument types
19572         rather than the result type when testing for a vector operation.
19574 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19576         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19577         * doc/tm.texi: Regenerate.
19579 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19580             Alan Hayward  <alan.hayward@arm.com>
19581             David Sherwood  <david.sherwood@arm.com>
19583         * doc/invoke.texi (-msve-vector-bits=): Document new option.
19584         (sve): Document new AArch64 extension.
19585         * doc/md.texi (w): Extend the description of the AArch64
19586         constraint to include SVE vectors.
19587         (Upl, Upa): Document new AArch64 predicate constraints.
19588         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19589         enum.
19590         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19591         (msve-vector-bits=): New option.
19592         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19593         SVE when these are disabled.
19594         (sve): New extension.
19595         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19596         modes.  Adjust their number of units based on aarch64_sve_vg.
19597         (MAX_BITSIZE_MODE_ANY_MODE): Define.
19598         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19599         aarch64_addr_query_type.
19600         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19601         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19602         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19603         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19604         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19605         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19606         (aarch64_simd_imm_zero_p): Delete.
19607         (aarch64_check_zero_based_sve_index_immediate): Declare.
19608         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19609         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19610         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19611         (aarch64_sve_float_mul_immediate_p): Likewise.
19612         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19613         rather than an rtx.
19614         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19615         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19616         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19617         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19618         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19619         (aarch64_regmode_natural_size): Likewise.
19620         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19621         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19622         left one place.
19623         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19624         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19625         for VG and the SVE predicate registers.
19626         (V_ALIASES): Add a "z"-prefixed alias.
19627         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19628         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19629         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19630         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19631         (REG_CLASS_NAMES): Add entries for them.
19632         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
19633         and the predicate registers.
19634         (aarch64_sve_vg): Declare.
19635         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19636         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19637         (REGMODE_NATURAL_SIZE): Define.
19638         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19639         SVE macros.
19640         * config/aarch64/aarch64.c: Include cfgrtl.h.
19641         (simd_immediate_info): Add a constructor for series vectors,
19642         and an associated step field.
19643         (aarch64_sve_vg): New variable.
19644         (aarch64_dbx_register_number): Handle VG and the predicate registers.
19645         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19646         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19647         (VEC_ANY_DATA, VEC_STRUCT): New constants.
19648         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19649         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19650         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19651         (aarch64_get_mask_mode): New functions.
19652         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19653         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19654         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
19655         predicate modes and predicate registers.  Explicitly restrict
19656         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
19657         to store a vector mode if it is recognized by
19658         aarch64_classify_vector_mode.
19659         (aarch64_regmode_natural_size): New function.
19660         (aarch64_hard_regno_caller_save_mode): Return the original mode
19661         for predicates.
19662         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19663         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19664         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19665         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19666         functions.
19667         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
19668         does not overlap dest if the function is frame-related.  Handle
19669         SVE constants.
19670         (aarch64_split_add_offset): New function.
19671         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19672         them aarch64_add_offset.
19673         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19674         and update call to aarch64_sub_sp.
19675         (aarch64_add_cfa_expression): New function.
19676         (aarch64_expand_prologue): Pass extra temporary registers to the
19677         functions above.  Handle the case in which we need to emit new
19678         DW_CFA_expressions for registers that were originally saved
19679         relative to the stack pointer, but now have to be expressed
19680         relative to the frame pointer.
19681         (aarch64_output_mi_thunk): Pass extra temporary registers to the
19682         functions above.
19683         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
19684         IP0 and IP1 values for SVE frames.
19685         (aarch64_expand_vec_series): New function.
19686         (aarch64_expand_sve_widened_duplicate): Likewise.
19687         (aarch64_expand_sve_const_vector): Likewise.
19688         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19689         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
19690         into the register, rather than emitting a SET directly.
19691         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19692         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19693         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19694         (offset_9bit_signed_scaled_p): New functions.
19695         (aarch64_replicate_bitmask_imm): New function.
19696         (aarch64_bitmask_imm): Use it.
19697         (aarch64_cannot_force_const_mem): Reject expressions involving
19698         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
19699         (aarch64_classify_index): Handle SVE indices, by requiring
19700         a plain register index with a scale that matches the element size.
19701         (aarch64_classify_address): Handle SVE addresses.  Assert that
19702         the mode of the address is VOIDmode or an integer mode.
19703         Update call to aarch64_classify_symbol.
19704         (aarch64_classify_symbolic_expression): Update call to
19705         aarch64_classify_symbol.
19706         (aarch64_const_vec_all_in_range_p): New function.
19707         (aarch64_print_vector_float_operand): Likewise.
19708         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
19709         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
19710         and the FP immediates 1.0 and 0.5.
19711         (aarch64_print_address_internal): Handle SVE addresses.
19712         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19713         (aarch64_regno_regclass): Handle predicate registers.
19714         (aarch64_secondary_reload): Handle big-endian reloads of SVE
19715         data modes.
19716         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19717         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19718         (aarch64_convert_sve_vector_bits): New function.
19719         (aarch64_override_options): Use it to handle -msve-vector-bits=.
19720         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19721         rather than an rtx.
19722         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19723         Handle SVE vector and predicate modes.  Accept VL-based constants
19724         that need only one temporary register, and VL offsets that require
19725         no temporary registers.
19726         (aarch64_conditional_register_usage): Mark the predicate registers
19727         as fixed if SVE isn't available.
19728         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19729         Return true for SVE vector and predicate modes.
19730         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19731         rather than an unsigned int.  Handle SVE modes.
19732         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
19733         SVE modes.
19734         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19735         if SVE is enabled.
19736         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19737         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19738         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19739         (aarch64_sve_float_mul_immediate_p): New functions.
19740         (aarch64_sve_valid_immediate): New function.
19741         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19742         Explicitly reject structure modes.  Check for INDEX constants.
19743         Handle PTRUE and PFALSE constants.
19744         (aarch64_check_zero_based_sve_index_immediate): New function.
19745         (aarch64_simd_imm_zero_p): Delete.
19746         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19747         vector modes.  Accept constants in the range of CNT[BHWD].
19748         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19749         ask for an Advanced SIMD mode.
19750         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19751         (aarch64_simd_vector_alignment): Handle SVE predicates.
19752         (aarch64_vectorize_preferred_vector_alignment): New function.
19753         (aarch64_simd_vector_alignment_reachable): Use it instead of
19754         the vector size.
19755         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19756         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19757         functions.
19758         (MAX_VECT_LEN): Delete.
19759         (expand_vec_perm_d): Add a vec_flags field.
19760         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19761         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19762         (aarch64_evpc_ext): Don't apply a big-endian lane correction
19763         for SVE modes.
19764         (aarch64_evpc_rev): Rename to...
19765         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
19766         (aarch64_evpc_rev_global): New function.
19767         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19768         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19769         MAX_VECT_LEN.
19770         (aarch64_evpc_sve_tbl): New function.
19771         (aarch64_expand_vec_perm_const_1): Update after rename of
19772         aarch64_evpc_rev.  Handle SVE permutes too, trying
19773         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19774         than aarch64_evpc_tbl.
19775         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19776         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19777         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19778         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19779         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19780         (aarch64_expand_sve_vcond): New functions.
19781         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19782         of aarch64_vector_mode_p.
19783         (aarch64_dwarf_poly_indeterminate_value): New function.
19784         (aarch64_compute_pressure_classes): Likewise.
19785         (aarch64_can_change_mode_class): Likewise.
19786         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19787         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19788         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19789         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19790         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19791         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19792         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19793         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19794         constraints.
19795         (Dn, Dl, Dr): Accept const as well as const_vector.
19796         (Dz): Likewise.  Compare against CONST0_RTX.
19797         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19798         of "vector" where appropriate.
19799         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19800         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19801         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19802         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19803         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19804         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19805         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19806         (v_int_equiv): Extend to SVE modes.
19807         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19808         mode attributes.
19809         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19810         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19811         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19812         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19813         (SVE_COND_FP_CMP): New int iterators.
19814         (perm_hilo): Handle the new unpack unspecs.
19815         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19816         attributes.
19817         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19818         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19819         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19820         (aarch64_equality_operator, aarch64_constant_vector_operand)
19821         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19822         (aarch64_sve_nonimmediate_operand): Likewise.
19823         (aarch64_sve_general_operand): Likewise.
19824         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19825         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19826         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19827         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19828         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19829         (aarch64_sve_float_arith_immediate): Likewise.
19830         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19831         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19832         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19833         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19834         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19835         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19836         (aarch64_sve_float_arith_operand): Likewise.
19837         (aarch64_sve_float_arith_with_sub_operand): Likewise.
19838         (aarch64_sve_float_mul_operand): Likewise.
19839         (aarch64_sve_vec_perm_operand): Likewise.
19840         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19841         (aarch64_mov_operand): Accept const_poly_int and const_vector.
19842         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19843         as well as const_vector.
19844         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19845         in file.  Use CONST0_RTX and CONSTM1_RTX.
19846         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
19847         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19848         Use aarch64_simd_imm_zero.
19849         * config/aarch64/aarch64-sve.md: New file.
19850         * config/aarch64/aarch64.md: Include it.
19851         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19852         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19853         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19854         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19855         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19856         (sve): New attribute.
19857         (enabled): Disable instructions with the sve attribute unless
19858         TARGET_SVE.
19859         (movqi, movhi): Pass CONST_POLY_INT operaneds through
19860         aarch64_expand_mov_immediate.
19861         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19862         CNT[BHSD] immediates.
19863         (movti): Split CONST_POLY_INT moves into two halves.
19864         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19865         Split additions that need a temporary here if the destination
19866         is the stack pointer.
19867         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19868         (*add<mode>3_poly_1): New instruction.
19869         (set_clobber_cc): New expander.
19871 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19873         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19874         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
19875         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19876         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19877         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
19878         Change innermode from fixed_mode_size to machine_mode.
19879         (simplify_subreg): Update call accordingly.  Handle a constant-sized
19880         subreg of a variable-length CONST_VECTOR.
19882 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19883             Alan Hayward  <alan.hayward@arm.com>
19884             David Sherwood  <david.sherwood@arm.com>
19886         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19887         (add_offset_to_base): New function, split out from...
19888         (create_mem_ref): ...here.  When handling a scale other than 1,
19889         check first whether the address is valid without the offset.
19890         Add it into the base if so, leaving the index and scale as-is.
19892 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19894         PR c++/83778
19895         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19896         fold_for_warn before checking if arg2 is INTEGER_CST.
19898 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
19900         * config/rs6000/predicates.md (load_multiple_operation): Delete.
19901         (store_multiple_operation): Delete.
19902         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19903         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19904         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19905         guarded by TARGET_STRING.
19906         (rs6000_output_load_multiple): Delete.
19907         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19908         OPTION_MASK_STRING / TARGET_STRING handling.
19909         (print_operand) <'N', 'O'>: Add comment that these are unused now.
19910         (const rs6000_opt_masks) <"string">: Change mask to 0.
19911         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19912         (MASK_STRING): Delete.
19913         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19914         parts.  Simplify.
19915         (load_multiple): Delete.
19916         (*ldmsi8): Delete.
19917         (*ldmsi7): Delete.
19918         (*ldmsi6): Delete.
19919         (*ldmsi5): Delete.
19920         (*ldmsi4): Delete.
19921         (*ldmsi3): Delete.
19922         (store_multiple): Delete.
19923         (*stmsi8): Delete.
19924         (*stmsi7): Delete.
19925         (*stmsi6): Delete.
19926         (*stmsi5): Delete.
19927         (*stmsi4): Delete.
19928         (*stmsi3): Delete.
19929         (movmemsi_8reg): Delete.
19930         (corresponding unnamed define_insn): Delete.
19931         (movmemsi_6reg): Delete.
19932         (corresponding unnamed define_insn): Delete.
19933         (movmemsi_4reg): Delete.
19934         (corresponding unnamed define_insn): Delete.
19935         (movmemsi_2reg): Delete.
19936         (corresponding unnamed define_insn): Delete.
19937         (movmemsi_1reg): Delete.
19938         (corresponding unnamed define_insn): Delete.
19939         * config/rs6000/rs6000.opt (mno-string): New.
19940         (mstring): Replace by deprecation warning stub.
19941         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19943 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19945         * regrename.c (regrename_do_replace): If replacing the same
19946         reg multiple times, try to reuse last created gen_raw_REG.
19948         PR debug/81155
19949         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19950         main to workaround a bug in GDB.
19952 2018-01-12  Tom de Vries  <tom@codesourcery.com>
19954         PR target/83737
19955         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19957 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
19959         PR rtl-optimization/80481
19960         * ira-color.c (get_cap_member): New function.
19961         (allocnos_conflict_by_live_ranges_p): Use it.
19962         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19963         (setup_slot_coalesced_allocno_live_ranges): Ditto.
19965 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
19967         PR target/83628
19968         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19969         (*saddl_se_1): Ditto.
19970         (*ssubsi_1): Ditto.
19971         (*ssubl_se_1): Ditto.
19973 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19975         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19976         rather than wi::to_widest for DR_INITs.
19977         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19978         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19979         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19980         INTEGER_CSTs.
19981         (vect_analyze_group_access_1): Note that here.
19983 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19985         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19986         polynomial type sizes.
19988 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19990         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19991         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19992         (gimple_add_tmp_var): Likewise.
19994 2018-01-12  Martin Liska  <mliska@suse.cz>
19996         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19997         (gimple_alloc_sizes): Likewise.
19998         (dump_gimple_statistics): Use PRIu64 in printf format.
19999         * gimple.h: Change uint64_t to int.
20001 2018-01-12  Martin Liska  <mliska@suse.cz>
20003         * tree-core.h: Use uint64_t instead of int.
20004         * tree.c (tree_node_counts): Likewise.
20005         (tree_node_sizes): Likewise.
20006         (dump_tree_statistics): Use PRIu64 in printf format.
20008 2018-01-12  Martin Liska  <mliska@suse.cz>
20010         * Makefile.in: As qsort_chk is implemented in vec.c, add
20011         vec.o to linkage of gencfn-macros.
20012         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20013         passing the info to record_node_allocation_statistics.
20014         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20015         and pass the info.
20016         * ggc-common.c (struct ggc_usage): Add operator== and use
20017         it in operator< and compare function.
20018         * mem-stats.h (struct mem_usage): Likewise.
20019         * vec.c (struct vec_usage): Remove operator< and compare
20020         function. Can be simply inherited.
20022 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20024         PR target/81616
20025         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20026         * tree-ssa-math-opts.c: Include domwalk.h.
20027         (convert_mult_to_fma_1): New function.
20028         (fma_transformation_info): New type.
20029         (fma_deferring_state): Likewise.
20030         (cancel_fma_deferring): New function.
20031         (result_of_phi): Likewise.
20032         (last_fma_candidate_feeds_initial_phi): Likewise.
20033         (convert_mult_to_fma): Added deferring logic, split actual
20034         transformation to convert_mult_to_fma_1.
20035         (math_opts_dom_walker): New type.
20036         (math_opts_dom_walker::after_dom_children): New method, body moved
20037         here from pass_optimize_widening_mul::execute, added deferring logic
20038         bits.
20039         (pass_optimize_widening_mul::execute): Moved most of code to
20040         math_opts_dom_walker::after_dom_children.
20041         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20042         * config/i386/i386.c (ix86_option_override_internal): Added
20043         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20045 2018-01-12  Richard Biener  <rguenther@suse.de>
20047         PR debug/83157
20048         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20049         inline instance vars.
20051 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20053         PR target/81819
20054         * config/rx/rx.c (rx_is_restricted_memory_address):
20055         Handle SUBREG case.
20057 2018-01-12  Richard Biener  <rguenther@suse.de>
20059         PR tree-optimization/80846
20060         * target.def (split_reduction): New target hook.
20061         * targhooks.c (default_split_reduction): New function.
20062         * targhooks.h (default_split_reduction): Declare.
20063         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20064         target requests first reduce vectors by combining low and high
20065         parts.
20066         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20067         (get_vectype_for_scalar_type_and_size): Export.
20068         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20069         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20070         * doc/tm.texi: Regenerate.
20071         * config/i386/i386.c (ix86_split_reduction): Implement
20072         TARGET_VECTORIZE_SPLIT_REDUCTION.
20074 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20076         PR target/83368
20077         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20078         in PIC mode except for TARGET_VXWORKS_RTP.
20079         * config/sparc/sparc.c: Include cfgrtl.h.
20080         (TARGET_INIT_PIC_REG): Define.
20081         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20082         (sparc_pic_register_p): New predicate.
20083         (sparc_legitimate_address_p): Use it.
20084         (sparc_legitimize_pic_address): Likewise.
20085         (sparc_delegitimize_address): Likewise.
20086         (sparc_mode_dependent_address_p): Likewise.
20087         (gen_load_pcrel_sym): Remove 4th parameter.
20088         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20089         (sparc_expand_prologue): Do not call load_got_register here.
20090         (sparc_flat_expand_prologue): Likewise.
20091         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20092         (sparc_use_pseudo_pic_reg): New function.
20093         (sparc_init_pic_reg): Likewise.
20094         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20095         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20097 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20099         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20100         Add item for branch_cost.
20102 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20104         PR rtl-optimization/83565
20105         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20106         not extend the result to a larger mode for rotate operations.
20107         (num_sign_bit_copies1): Likewise.
20109 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20111         PR target/40411
20112         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20113         -symbolic.
20114         Use values-Xc.o for -pedantic.
20115         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20117 2018-01-12  Martin Liska  <mliska@suse.cz>
20119         PR ipa/83054
20120         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20121         New function.
20122         (possible_polymorphic_call_targets): Use it.
20123         (ipa_devirt): Likewise.
20125 2018-01-12  Martin Liska  <mliska@suse.cz>
20127         * profile-count.h (enum profile_quality): Use 0 as invalid
20128         enum value of profile_quality.
20130 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20132         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20133         -mext-string options.
20135 2018-01-12  Richard Biener  <rguenther@suse.de>
20137         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20138         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20139         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20140         Likewise.
20141         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20143 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20145         * configure.ac (--with-long-double-format): Add support for the
20146         configuration option to change the default long double format on
20147         PowerPC systems.
20148         * config.gcc (powerpc*-linux*-*): Likewise.
20149         * configure: Regenerate.
20150         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20151         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20152         used without modification.
20154 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20156         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20157         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20158         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20159         MISC_BUILTIN_SPEC_BARRIER.
20160         (rs6000_init_builtins): Likewise.
20161         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20162         enum value.
20163         (speculation_barrier): New define_insn.
20164         * doc/extend.texi: Document __builtin_speculation_barrier.
20166 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20168         PR target/83203
20169         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20170         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20171         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20172         iterators.
20173         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20174         integral modes instead of "ss" and "sd".
20175         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20176         vectors with 32-bit and 64-bit elements.
20177         (vecdupssescalarmodesuffix): New mode attribute.
20178         (vec_dup<mode>): Use it.
20180 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20182         PR target/83330
20183         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20184         frame if argument is passed on stack.
20186 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20188         PR target/82682
20189         * ree.c (combine_reaching_defs): Optimize also
20190         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20191         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20193 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20195         PR middle-end/83189
20196         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20198 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20200         PR middle-end/83718
20201         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20202         after they are computed.
20204 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20206         PR tree-optimization/83695
20207         * gimple-loop-linterchange.cc
20208         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20209         reset cached scev information after interchange.
20210         (pass_linterchange::execute): Remove call to scev_reset_htab.
20212 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20214         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20215         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20216         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20217         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20218         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20219         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20220         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20221         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20222         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20223         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20224         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20225         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20226         (V_lane_reg): Likewise.
20227         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20228         New define_expand.
20229         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20230         (vfmal_lane_low<mode>_intrinsic,
20231         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20232         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20233         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20234         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20235         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20236         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20238 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20240         * config/arm/arm-cpus.in (fp16fml): New feature.
20241         (ALL_SIMD): Add fp16fml.
20242         (armv8.2-a): Add fp16fml as an option.
20243         (armv8.3-a): Likewise.
20244         (armv8.4-a): Add fp16fml as part of fp16.
20245         * config/arm/arm.h (TARGET_FP16FML): Define.
20246         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20247         when appropriate.
20248         * config/arm/arm-modes.def (V2HF): Define.
20249         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20250         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20251         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20252         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20253         vfmsl_low, vfmsl_high): New set of builtins.
20254         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20255         (vfml_op): New code attribute.
20256         (VFMLHALVES): New int iterator.
20257         (VFML, VFMLSEL): New mode attributes.
20258         (V_reg): Define mapping for V2HF.
20259         (V_hi, V_lo): New mode attributes.
20260         (VF_constraint): Likewise.
20261         (vfml_half, vfml_half_selector): New int attributes.
20262         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20263         define_expand.
20264         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20265         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20266         New define_insn.
20267         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20268         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20269         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20270         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20271         documentation.
20272         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20273         Document new effective target and option set.
20275 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20277         * config/arm/arm-cpus.in (armv8_4): New feature.
20278         (ARMv8_4a): New fgroup.
20279         (armv8.4-a): New arch.
20280         * config/arm/arm-tables.opt: Regenerate.
20281         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20282         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20283         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20284         Add matching rules for -march=armv8.4-a and extensions.
20285         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20287 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20289         PR target/81821
20290         * config/rx/rx.md (BW): New mode attribute.
20291         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20293 2018-01-11  Richard Biener  <rguenther@suse.de>
20295         PR tree-optimization/83435
20296         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20297         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20298         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20300 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20301             Alan Hayward  <alan.hayward@arm.com>
20302             David Sherwood  <david.sherwood@arm.com>
20304         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20305         field.
20306         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20307         (aarch64_print_address_internal): Use it to check for a zero offset.
20309 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20310             Alan Hayward  <alan.hayward@arm.com>
20311             David Sherwood  <david.sherwood@arm.com>
20313         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20314         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20315         Return a poly_int64 rather than a HOST_WIDE_INT.
20316         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20317         rather than a HOST_WIDE_INT.
20318         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20319         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20320         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20321         final_offset from HOST_WIDE_INT to poly_int64.
20322         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20323         to_constant when getting the number of units in an Advanced SIMD
20324         mode.
20325         (aarch64_builtin_vectorized_function): Check for a constant number
20326         of units.
20327         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20328         GET_MODE_SIZE.
20329         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20330         attribute instead of GET_MODE_NUNITS.
20331         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20332         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20333         GET_MODE_SIZE for fixed-size registers.
20334         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20335         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20336         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20337         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20338         (aarch64_print_operand, aarch64_print_address_internal)
20339         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20340         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20341         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20342         Handle polynomial GET_MODE_SIZE.
20343         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20344         wider than SImode without modification.
20345         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20346         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20347         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20348         passing and returning SVE modes.
20349         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20350         rather than GEN_INT.
20351         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20352         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20353         (aarch64_allocate_and_probe_stack_space): Likewise.
20354         (aarch64_layout_frame): Cope with polynomial offsets.
20355         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20356         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20357         polynomial offsets.
20358         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20359         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20360         poly_int64 rather than a HOST_WIDE_INT.
20361         (aarch64_get_separate_components, aarch64_process_components)
20362         (aarch64_expand_prologue, aarch64_expand_epilogue)
20363         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20364         (aarch64_anchor_offset): New function, split out from...
20365         (aarch64_legitimize_address): ...here.
20366         (aarch64_builtin_vectorization_cost): Handle polynomial
20367         TYPE_VECTOR_SUBPARTS.
20368         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20369         GET_MODE_NUNITS.
20370         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20371         number of elements from the PARALLEL rather than the mode.
20372         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20373         rather than GET_MODE_BITSIZE.
20374         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20375         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20376         (aarch64_expand_vec_perm_const_1): Handle polynomial
20377         d->perm.length () and d->perm elements.
20378         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20379         Apply to_constant to d->perm elements.
20380         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20381         polynomial CONST_VECTOR_NUNITS.
20382         (aarch64_move_pointer): Take amount as a poly_int64 rather
20383         than an int.
20384         (aarch64_progress_pointer): Avoid temporary variable.
20385         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20386         the mode attribute instead of GET_MODE.
20388 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20389             Alan Hayward  <alan.hayward@arm.com>
20390             David Sherwood  <david.sherwood@arm.com>
20392         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20393         x exists before using it.
20394         (aarch64_add_constant_internal): Rename to...
20395         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20396         src and dest rtxes.  Handle the case in which they're different,
20397         including when the offset is zero.  Replace scratchreg with an rtx.
20398         Use 2 additions if there is no spare register into which we can
20399         move a 16-bit constant.
20400         (aarch64_add_constant): Delete.
20401         (aarch64_add_offset): Replace reg with separate src and dest
20402         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20403         Use aarch64_add_offset_1.
20404         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20405         an rtx rather than an int.  Take the delta as a poly_int64
20406         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20407         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20408         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20409         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20410         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20411         and aarch64_add_sp.
20412         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20413         aarch64_add_constant.
20415 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20417         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20418         Use scalar_float_mode.
20420 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20422         * config/aarch64/aarch64-simd.md
20423         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20424         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20425         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20426         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20427         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20428         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20429         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20430         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20431         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20432         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20434 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20436         PR target/83514
20437         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20438         targ_options->x_arm_arch_string is non NULL.
20440 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20442         * config/aarch64/aarch64.h
20443         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20445 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20447         PR target/82096
20448         * expmed.c (emit_store_flag_force): Swap if const op0
20449         and change VOIDmode to mode of op0.
20451 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20453         PR rtl-optimization/83761
20454         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20455         than bytes to mode_for_size.
20457 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20459         PR middle-end/83189
20460         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20461         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20462         profile.
20464 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20466         PR middle-end/83575
20467         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20468         when in layout mode.
20469         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20470         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20471         partition fixup.
20473 2018-01-10  Michael Collison  <michael.collison@arm.com>
20475         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20476         * config/aarch64/aarch64-option-extension.def: Add
20477         AARCH64_OPT_EXTENSION of 'fp16fml'.
20478         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20479         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20480         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20481         * config/aarch64/constraints.md (Ui7): New constraint.
20482         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20483         (VFMLA_SEL_W): Ditto.
20484         (f16quad): Ditto.
20485         (f16mac1): Ditto.
20486         (VFMLA16_LOW): New int iterator.
20487         (VFMLA16_HIGH): Ditto.
20488         (UNSPEC_FMLAL): New unspec.
20489         (UNSPEC_FMLSL): Ditto.
20490         (UNSPEC_FMLAL2): Ditto.
20491         (UNSPEC_FMLSL2): Ditto.
20492         (f16mac): New code attribute.
20493         * config/aarch64/aarch64-simd-builtins.def
20494         (aarch64_fmlal_lowv2sf): Ditto.
20495         (aarch64_fmlsl_lowv2sf): Ditto.
20496         (aarch64_fmlalq_lowv4sf): Ditto.
20497         (aarch64_fmlslq_lowv4sf): Ditto.
20498         (aarch64_fmlal_highv2sf): Ditto.
20499         (aarch64_fmlsl_highv2sf): Ditto.
20500         (aarch64_fmlalq_highv4sf): Ditto.
20501         (aarch64_fmlslq_highv4sf): Ditto.
20502         (aarch64_fmlal_lane_lowv2sf): Ditto.
20503         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20504         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20505         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20506         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20507         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20508         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20509         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20510         (aarch64_fmlal_lane_highv2sf): Ditto.
20511         (aarch64_fmlsl_lane_highv2sf): Ditto.
20512         (aarch64_fmlal_laneq_highv2sf): Ditto.
20513         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20514         (aarch64_fmlalq_lane_highv4sf): Ditto.
20515         (aarch64_fmlsl_lane_highv4sf): Ditto.
20516         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20517         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20518         * config/aarch64/aarch64-simd.md:
20519         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20520         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20521         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20522         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20523         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20524         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20525         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20526         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20527         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20528         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20529         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20530         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20531         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20532         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20533         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20534         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20535         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20536         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20537         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20538         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20539         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20540         (vfmlsl_low_u32): Ditto.
20541         (vfmlalq_low_u32): Ditto.
20542         (vfmlslq_low_u32): Ditto.
20543         (vfmlal_high_u32): Ditto.
20544         (vfmlsl_high_u32): Ditto.
20545         (vfmlalq_high_u32): Ditto.
20546         (vfmlslq_high_u32): Ditto.
20547         (vfmlal_lane_low_u32): Ditto.
20548         (vfmlsl_lane_low_u32): Ditto.
20549         (vfmlal_laneq_low_u32): Ditto.
20550         (vfmlsl_laneq_low_u32): Ditto.
20551         (vfmlalq_lane_low_u32): Ditto.
20552         (vfmlslq_lane_low_u32): Ditto.
20553         (vfmlalq_laneq_low_u32): Ditto.
20554         (vfmlslq_laneq_low_u32): Ditto.
20555         (vfmlal_lane_high_u32): Ditto.
20556         (vfmlsl_lane_high_u32): Ditto.
20557         (vfmlal_laneq_high_u32): Ditto.
20558         (vfmlsl_laneq_high_u32): Ditto.
20559         (vfmlalq_lane_high_u32): Ditto.
20560         (vfmlslq_lane_high_u32): Ditto.
20561         (vfmlalq_laneq_high_u32): Ditto.
20562         (vfmlslq_laneq_high_u32): Ditto.
20563         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20564         (AARCH64_FL_FOR_ARCH8_4): New.
20565         (AARCH64_ISA_F16FML): New ISA flag.
20566         (TARGET_F16FML): New feature flag for fp16fml.
20567         (doc/invoke.texi): Document new fp16fml option.
20569 2018-01-10  Michael Collison  <michael.collison@arm.com>
20571         * config/aarch64/aarch64-builtins.c:
20572         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20573         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20574         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20575         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20576         (AARCH64_ISA_SHA3): New ISA flag.
20577         (TARGET_SHA3): New feature flag for sha3.
20578         * config/aarch64/iterators.md (sha512_op): New int attribute.
20579         (CRYPTO_SHA512): New int iterator.
20580         (UNSPEC_SHA512H): New unspec.
20581         (UNSPEC_SHA512H2): Ditto.
20582         (UNSPEC_SHA512SU0): Ditto.
20583         (UNSPEC_SHA512SU1): Ditto.
20584         * config/aarch64/aarch64-simd-builtins.def
20585         (aarch64_crypto_sha512hqv2di): New builtin.
20586         (aarch64_crypto_sha512h2qv2di): Ditto.
20587         (aarch64_crypto_sha512su0qv2di): Ditto.
20588         (aarch64_crypto_sha512su1qv2di): Ditto.
20589         (aarch64_eor3qv8hi): Ditto.
20590         (aarch64_rax1qv2di): Ditto.
20591         (aarch64_xarqv2di): Ditto.
20592         (aarch64_bcaxqv8hi): Ditto.
20593         * config/aarch64/aarch64-simd.md:
20594         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20595         (aarch64_crypto_sha512su0qv2di): Ditto.
20596         (aarch64_crypto_sha512su1qv2di): Ditto.
20597         (aarch64_eor3qv8hi): Ditto.
20598         (aarch64_rax1qv2di): Ditto.
20599         (aarch64_xarqv2di): Ditto.
20600         (aarch64_bcaxqv8hi): Ditto.
20601         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20602         (vsha512h2q_u64): Ditto.
20603         (vsha512su0q_u64): Ditto.
20604         (vsha512su1q_u64): Ditto.
20605         (veor3q_u16): Ditto.
20606         (vrax1q_u64): Ditto.
20607         (vxarq_u64): Ditto.
20608         (vbcaxq_u16): Ditto.
20609         * config/arm/types.md (crypto_sha512): New type attribute.
20610         (crypto_sha3): Ditto.
20611         (doc/invoke.texi): Document new sha3 option.
20613 2018-01-10  Michael Collison  <michael.collison@arm.com>
20615         * config/aarch64/aarch64-builtins.c:
20616         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20617         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20618         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20619         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20620         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20621         (AARCH64_ISA_SM4): New ISA flag.
20622         (TARGET_SM4): New feature flag for sm4.
20623         * config/aarch64/aarch64-simd-builtins.def
20624         (aarch64_sm3ss1qv4si): Ditto.
20625         (aarch64_sm3tt1aq4si): Ditto.
20626         (aarch64_sm3tt1bq4si): Ditto.
20627         (aarch64_sm3tt2aq4si): Ditto.
20628         (aarch64_sm3tt2bq4si): Ditto.
20629         (aarch64_sm3partw1qv4si): Ditto.
20630         (aarch64_sm3partw2qv4si): Ditto.
20631         (aarch64_sm4eqv4si): Ditto.
20632         (aarch64_sm4ekeyqv4si): Ditto.
20633         * config/aarch64/aarch64-simd.md:
20634         (aarch64_sm3ss1qv4si): Ditto.
20635         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20636         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20637         (aarch64_sm4eqv4si): Ditto.
20638         (aarch64_sm4ekeyqv4si): Ditto.
20639         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20640         (sm3part_op): Ditto.
20641         (CRYPTO_SM3TT): Ditto.
20642         (CRYPTO_SM3PART): Ditto.
20643         (UNSPEC_SM3SS1): New unspec.
20644         (UNSPEC_SM3TT1A): Ditto.
20645         (UNSPEC_SM3TT1B): Ditto.
20646         (UNSPEC_SM3TT2A): Ditto.
20647         (UNSPEC_SM3TT2B): Ditto.
20648         (UNSPEC_SM3PARTW1): Ditto.
20649         (UNSPEC_SM3PARTW2): Ditto.
20650         (UNSPEC_SM4E): Ditto.
20651         (UNSPEC_SM4EKEY): Ditto.
20652         * config/aarch64/constraints.md (Ui2): New constraint.
20653         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20654         * config/arm/types.md (crypto_sm3): New type attribute.
20655         (crypto_sm4): Ditto.
20656         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20657         (vsm3tt1aq_u32): Ditto.
20658         (vsm3tt1bq_u32): Ditto.
20659         (vsm3tt2aq_u32): Ditto.
20660         (vsm3tt2bq_u32): Ditto.
20661         (vsm3partw1q_u32): Ditto.
20662         (vsm3partw2q_u32): Ditto.
20663         (vsm4eq_u32): Ditto.
20664         (vsm4ekeyq_u32): Ditto.
20665         (doc/invoke.texi): Document new sm4 option.
20667 2018-01-10  Michael Collison  <michael.collison@arm.com>
20669         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20670         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20671         (AARCH64_FL_FOR_ARCH8_4): New.
20672         (AARCH64_FL_V8_4): New flag.
20673         (doc/invoke.texi): Document new armv8.4-a option.
20675 2018-01-10  Michael Collison  <michael.collison@arm.com>
20677         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20678         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20679         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20680         * config/aarch64/aarch64-option-extension.def: Add
20681         AARCH64_OPT_EXTENSION of 'sha2'.
20682         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20683         (crypto): Disable sha2 and aes if crypto disabled.
20684         (crypto): Enable aes and sha2 if enabled.
20685         (simd): Disable sha2 and aes if simd disabled.
20686         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20687         New flags.
20688         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20689         (TARGET_SHA2): New feature flag for sha2.
20690         (TARGET_AES): New feature flag for aes.
20691         * config/aarch64/aarch64-simd.md:
20692         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20693         conditional on TARGET_AES.
20694         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20695         (aarch64_crypto_sha1hsi): Make pattern conditional
20696         on TARGET_SHA2.
20697         (aarch64_crypto_sha1hv4si): Ditto.
20698         (aarch64_be_crypto_sha1hv4si): Ditto.
20699         (aarch64_crypto_sha1su1v4si): Ditto.
20700         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20701         (aarch64_crypto_sha1su0v4si): Ditto.
20702         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20703         (aarch64_crypto_sha256su0v4si): Ditto.
20704         (aarch64_crypto_sha256su1v4si): Ditto.
20705         (doc/invoke.texi): Document new aes and sha2 options.
20707 2018-01-10  Martin Sebor  <msebor@redhat.com>
20709         PR tree-optimization/83781
20710         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20711         as string arrays.
20713 2018-01-11  Martin Sebor  <msebor@gmail.com>
20714             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20716         PR tree-optimization/83501
20717         PR tree-optimization/81703
20719         * tree-ssa-strlen.c (get_string_cst): Rename...
20720         (get_string_len): ...to this.  Handle global constants.
20721         (handle_char_store): Adjust.
20723 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
20724             Jim Wilson  <jimw@sifive.com>
20726         * config/riscv/riscv-protos.h (riscv_output_return): New.
20727         * config/riscv/riscv.c (struct machine_function): New naked_p field.
20728         (riscv_attribute_table, riscv_output_return),
20729         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20730         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20731         (riscv_compute_frame_info): Only compute frame->mask if not a naked
20732         function.
20733         (riscv_expand_prologue): Add early return for naked function.
20734         (riscv_expand_epilogue): Likewise.
20735         (riscv_function_ok_for_sibcall): Return false for naked function.
20736         (riscv_set_current_function): New.
20737         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20738         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20739         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20740         * doc/extend.texi (RISC-V Function Attributes): New.
20742 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
20744         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20745         check for 128-bit long double before checking TCmode.
20746         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20747         128-bit long doubles before checking TFmode or TCmode.
20748         (FLOAT128_IBM_P): Likewise.
20750 2018-01-10  Martin Sebor  <msebor@redhat.com>
20752         PR tree-optimization/83671
20753         * builtins.c (c_strlen): Unconditionally return zero for the empty
20754         string.
20755         Use -Warray-bounds for warnings.
20756         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20757         for non-constant array indices with COMPONENT_REF, arrays of
20758         arrays, and pointers to arrays.
20759         (gimple_fold_builtin_strlen): Determine and set length range for
20760         non-constant character arrays.
20762 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
20764         PR middle-end/81897
20765         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20766         empty blocks.
20768 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
20770         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20772 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20774         PR target/83399
20775         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20776         VECTOR_MEM_ALTIVEC_OR_VSX_P.
20777         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20778         indexed_or_indirect_operand predicate.
20779         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20780         (*vsx_le_perm_load_v8hi): Likewise.
20781         (*vsx_le_perm_load_v16qi): Likewise.
20782         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20783         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20784         (*vsx_le_perm_store_v8hi): Likewise.
20785         (*vsx_le_perm_store_v16qi): Likewise.
20786         (eight unnamed splitters): Likewise.
20788 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20790         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20791         * config/rs6000/emmintrin.h: Likewise.
20792         * config/rs6000/mmintrin.h: Likewise.
20793         * config/rs6000/xmmintrin.h: Likewise.
20795 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
20797         PR c++/43486
20798         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20799         "public_flag".
20800         * tree.c (tree_nop_conversion): Return true for location wrapper
20801         nodes.
20802         (maybe_wrap_with_location): New function.
20803         (selftest::check_strip_nops): New function.
20804         (selftest::test_location_wrappers): New function.
20805         (selftest::tree_c_tests): Call it.
20806         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20807         (maybe_wrap_with_location): New decl.
20808         (EXPR_LOCATION_WRAPPER_P): New macro.
20809         (location_wrapper_p): New inline function.
20810         (tree_strip_any_location_wrapper): New inline function.
20812 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
20814         PR target/83735
20815         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20816         stack_realign_offset for the largest alignment of stack slot
20817         actually used.
20818         (ix86_find_max_used_stack_alignment): New function.
20819         (ix86_finalize_stack_frame_flags): Use it.  Set
20820         max_used_stack_alignment if we don't realign stack.
20821         * config/i386/i386.h (machine_function): Add
20822         max_used_stack_alignment.
20824 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
20826         * config/arm/arm.opt (-mbranch-cost): New option.
20827         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20828         account.
20830 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
20832         PR target/83629
20833         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20834         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20836 2018-01-10  Richard Biener  <rguenther@suse.de>
20838         PR debug/83765
20839         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20840         early out so it also covers the case where we have a non-NULL
20841         origin.
20843 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20845         PR tree-optimization/83753
20846         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20847         for non-strided grouped accesses if the number of elements is 1.
20849 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20851         PR target/81616
20852         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20853         * i386.h (TARGET_USE_GATHER): Define.
20854         * x86-tune.def (X86_TUNE_USE_GATHER): New.
20856 2018-01-10  Martin Liska  <mliska@suse.cz>
20858         PR bootstrap/82831
20859         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20860         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20861         partitioning.
20862         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20863         CLEANUP_NO_PARTITIONING is not set.
20865 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20867         * doc/rtl.texi: Remove documentation of (const ...) wrappers
20868         for vectors, as a partial revert of r254296.
20869         * rtl.h (const_vec_p): Delete.
20870         (const_vec_duplicate_p): Don't test for vector CONSTs.
20871         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20872         * expmed.c (make_tree): Likewise.
20874         Revert:
20875         * common.md (E, F): Use CONSTANT_P instead of checking for
20876         CONST_VECTOR.
20877         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20878         checking for CONST_VECTOR.
20880 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20882         PR middle-end/83575
20883         * predict.c (force_edge_cold): Handle in more sane way edges
20884         with no prediction.
20886 2018-01-09  Carl Love  <cel@us.ibm.com>
20888         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20889         V4SI, V4SF types.
20890         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20891         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20892         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20893         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
20894         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20895         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
20896         * config/rs6000/rs6000-protos.h: Add extern defition for
20897         rs6000_generate_float2_double_code.
20898         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20899         function.
20900         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20901         (float2_v2df): Add define_expand.
20903 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
20905         PR target/83628
20906         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20907         op_mode in the force_to_mode call.
20909 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20911         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20912         instead of checking each element individually.
20913         (aarch64_evpc_uzp): Likewise.
20914         (aarch64_evpc_zip): Likewise.
20915         (aarch64_evpc_ext): Likewise.
20916         (aarch64_evpc_rev): Likewise.
20917         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20918         instead of checking each element individually.  Return true without
20919         generating rtl if
20920         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20921         whether all selected elements come from the same input, instead of
20922         checking each element individually.  Remove calls to gen_rtx_REG,
20923         start_sequence and end_sequence and instead assert that no rtl is
20924         generated.
20926 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20928         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20929         order of HIGH and CONST checks.
20931 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20933         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20934         if the destination isn't an SSA_NAME.
20936 2018-01-09  Richard Biener  <rguenther@suse.de>
20938         PR tree-optimization/83668
20939         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20940         move prologue...
20941         (canonicalize_loop_form): ... here, renamed from ...
20942         (canonicalize_loop_closed_ssa_form): ... this and amended to
20943         swap successor edges for loop exit blocks to make us use
20944         the RPO order we need for initial schedule generation.
20946 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
20948         PR tree-optimization/64811
20949         * match.pd: When optimizing comparisons with Inf, avoid
20950         introducing or losing exceptions from comparisons with NaN.
20952 2018-01-09  Martin Liska  <mliska@suse.cz>
20954         PR sanitizer/82517
20955         * asan.c (shadow_mem_size): Add gcc_assert.
20957 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
20959         Don't save registers in main().
20961         PR target/83738
20962         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20963         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20964         * config/avr/avr.c (avr_set_current_function): Don't error if
20965         naked, OS_task or OS_main are specified at the same time.
20966         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20967         OS_main.
20968         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20969         attribute.
20970         * common/config/avr/avr-common.c (avr_option_optimization_table):
20971         Switch on -mmain-is-OS_task for optimizing compilations.
20973 2018-01-09  Richard Biener  <rguenther@suse.de>
20975         PR tree-optimization/83572
20976         * graphite.c: Include cfganal.h.
20977         (graphite_transform_loops): Connect infinite loops to exit
20978         and remove fake edges at the end.
20980 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20982         * ipa-inline.c (edge_badness): Revert accidental checkin.
20984 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20986         PR ipa/80763
20987         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20988         symbols; not inline clones.
20990 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
20992         PR target/83507
20993         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20994         hard registers.  Formatting fixes.
20996         PR preprocessor/83722
20997         * gcc.c (try_generate_repro): Pass
20998         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20999         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21000         do_report_bug.
21002 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21003             Kito Cheng  <kito.cheng@gmail.com>
21005         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21006         (riscv_leaf_function_p): Delete.
21007         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21009 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21011         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21012         function.
21013         (do_ifelse): New function.
21014         (do_isel): New function.
21015         (do_sub3): New function.
21016         (do_add3): New function.
21017         (do_load_mask_compare): New function.
21018         (do_overlap_load_compare): New function.
21019         (expand_compare_loop): New function.
21020         (expand_block_compare): Call expand_compare_loop() when appropriate.
21021         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21022         option description.
21023         (-mblock-compare-inline-loop-limit): New option.
21025 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21027         PR target/83677
21028         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21029         Reverse order of second and third operands in first alternative.
21030         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21031         of first and second elements in UNSPEC_VPERMR vector.
21032         (altivec_expand_vec_perm_le): Likewise.
21034 2018-01-08  Jeff Law  <law@redhat.com>
21036         PR rtl-optimizatin/81308
21037         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21038         (process_switch): If group_case_labels makes a change, then set
21039         cfg_altered.
21040         (pass_convert_switch::execute): If a switch is converted, then
21041         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21043         PR rtl-optimization/81308
21044         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21045         splitting insns.
21047 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21049         PR target/83663 - Revert r255946
21050         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21051         generation for cases where splatting a value is not useful.
21052         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21053         across a vec_duplicate and a paradoxical subreg forming a vector
21054         mode to a vec_concat.
21056 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21058         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21059         -march=armv8.3-a variants.
21060         * config/arm/t-multilib: Likewise.
21061         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21063 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21065         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21066         to generate rtl.
21067         (cceq_ior_compare_complement): Give it a name so I can use it, and
21068         change boolean_or_operator predicate to boolean_operator so it can
21069         be used to generate a crand.
21070         (eqne): New code iterator.
21071         (bd/bd_neg): New code_attrs.
21072         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21073         a single define_insn.
21074         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21075         decrement (bdnzt/bdnzf/bdzt/bdzf).
21076         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21077         with the new names of the branch decrement patterns, and added the
21078         names of the branch decrement conditional patterns.
21080 2018-01-08  Richard Biener  <rguenther@suse.de>
21082         PR tree-optimization/83563
21083         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21084         cache.
21086 2018-01-08  Richard Biener  <rguenther@suse.de>
21088         PR middle-end/83713
21089         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21091 2018-01-08  Richard Biener  <rguenther@suse.de>
21093         PR tree-optimization/83685
21094         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21095         references to abnormals.
21097 2018-01-08  Richard Biener  <rguenther@suse.de>
21099         PR lto/83719
21100         * dwarf2out.c (output_indirect_strings): Handle empty
21101         skeleton_debug_str_hash.
21102         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21104 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21106         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21107         (emit_store_direct): Likewise.
21108         (arc_trampoline_adjust_address): Likewise.
21109         (arc_asm_trampoline_template): New function.
21110         (arc_initialize_trampoline): Use asm_trampoline_template.
21111         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21112         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21113         * config/arc/arc.md (flush_icache): Delete pattern.
21115 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21117         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21118         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21119         munaligned-access.
21121 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21123         PR target/83681
21124         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21125         by not USED_FOR_TARGET.
21126         (make_pass_resolve_sw_modes): Likewise.
21128 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21130         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21131         USED_FOR_TARGET.
21133 2018-01-08  Richard Biener  <rguenther@suse.de>
21135         PR middle-end/83580
21136         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21138 2018-01-08  Richard Biener  <rguenther@suse.de>
21140         PR middle-end/83517
21141         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21143 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21145         PR middle-end/81897
21146         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21147         basic blocks with a small number of successors.
21148         (convert_control_dep_chain_into_preds): Improve handling of
21149         forwarder blocks.
21150         (dump_predicates): Split apart into...
21151         (dump_pred_chain): ...here...
21152         (dump_pred_info): ...and here.
21153         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21154         (can_chain_union_be_invalidated_p): Improve check for invalidation
21155         of paths.
21156         (uninit_uses_cannot_happen): Avoid unnecessary if
21157         convert_control_dep_chain_into_preds yielded nothing.
21159 2018-01-06  Martin Sebor  <msebor@redhat.com>
21161         PR tree-optimization/83640
21162         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21163         subtracting negative offset from size.
21164         (builtin_access::overlap): Adjust offset bounds of the access to fall
21165         within the size of the object if possible.
21167 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21169         PR rtl-optimization/83699
21170         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21171         extract_bit_field_as_subreg to cases in which the extracted
21172         value is also a vector.
21174         * lra-constraints.c (process_alt_operands): Test for the equivalence
21175         substitutions when detecting a possible reload cycle.
21177 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21179         PR debug/83480
21180         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21181         by default if flag_selective_schedling{,2}.  Formatting fixes.
21183         PR rtl-optimization/83682
21184         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21185         if it has non-VECTOR_MODE element mode.
21186         (vec_duplicate_p): Likewise.
21188         PR middle-end/83694
21189         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21190         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21192 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21194         PR target/83604
21195         * config/i386/i386-builtin.def
21196         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21197         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21198         Require also OPTION_MASK_ISA_AVX512F in addition to
21199         OPTION_MASK_ISA_GFNI.
21200         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21201         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21202         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21203         to OPTION_MASK_ISA_GFNI.
21204         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21205         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21206         OPTION_MASK_ISA_AVX512BW.
21207         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21208         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21209         addition to OPTION_MASK_ISA_GFNI.
21210         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21211         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21212         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21213         to OPTION_MASK_ISA_GFNI.
21214         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21215         a requirement for all ISAs rather than any of them with a few
21216         exceptions.
21217         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21218         processing.
21219         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21220         bitmasks to be enabled with 3 exceptions, instead of requiring any
21221         enabled ISA with lots of exceptions.
21222         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21223         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21224         Change avx512bw in isa attribute to avx512f.
21225         * config/i386/sgxintrin.h: Add license boilerplate.
21226         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21227         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21228         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21229         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21230         defined.
21231         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21232         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21233         temporarily sse2 rather than sse if not enabled already.
21235         PR target/83604
21236         * config/i386/sse.md (VI248_VLBW): Rename to ...
21237         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21238         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21239         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21240         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21241         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21242         mode iterator instead of VI248_VLBW.
21244 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21246         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21247         (record_modified): Skip clobbers; add debug output.
21248         (param_change_prob): Use sreal frequencies.
21250 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21252         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21253         punt for user-aligned variables.
21255 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21257         * tree-chrec.c (chrec_contains_symbols): Return true for
21258         POLY_INT_CST.
21260 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21262         PR target/82439
21263         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21264         of (x|y) == x for BICS pattern.
21266 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21268         PR tree-optimization/83605
21269         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21270         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21271         can throw.
21273 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21275         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21276         * config/epiphany/rtems.h: New file.
21278 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21279             Uros Bizjak  <ubizjak@gmail.com>
21281         PR target/83554
21282         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21283         QIreg_operand instead of register_operand predicate.
21284         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21285         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21286         comments instead of -fmitigate[-_]rop.
21288 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21290         PR bootstrap/81926
21291         * cgraphunit.c (symbol_table::compile): Switch to text_section
21292         before calling assembly_start debug hook.
21293         * run-rtl-passes.c (run_rtl_passes): Likewise.
21294         Include output.h.
21296 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21298         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21299         range_int_cst_p rather than !symbolic_range_p before calling
21300         extract_range_from_multiplicative_op_1.
21302 2018-01-04  Jeff Law  <law@redhat.com>
21304         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21305         redundant test in assertion.
21307 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21309         * doc/rtl.texi: Document machine_mode wrapper classes.
21311 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21313         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21314         using tree_to_uhwi.
21316 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21318         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21319         the VEC_PERM_EXPR fold to fail.
21321 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21323         PR debug/83585
21324         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21325         to switched_sections.
21327 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21329         PR target/83680
21330         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21331         test for d.testing.
21333 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21335         PR target/83387
21336         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21337         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21339 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21341         PR debug/83666
21342         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21343         is BLKmode and bitpos not zero or mode change is needed.
21345 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21347         PR target/83675
21348         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21349         TARGET_VIS2.
21351 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21353         PR target/83628
21354         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21355         instead of MULT rtx.  Update all corresponding splitters.
21356         (*saddl_se): Ditto.
21357         (*ssub<modesuffix>): Ditto.
21358         (*ssubl_se): Ditto.
21359         (*cmp_sadd_di): Update split patterns.
21360         (*cmp_sadd_si): Ditto.
21361         (*cmp_sadd_sidi): Ditto.
21362         (*cmp_ssub_di): Ditto.
21363         (*cmp_ssub_si): Ditto.
21364         (*cmp_ssub_sidi): Ditto.
21365         * config/alpha/predicates.md (const23_operand): New predicate.
21366         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21367         Look for ASHIFT, not MULT inner operand.
21368         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21370 2018-01-04  Martin Liska  <mliska@suse.cz>
21372         PR gcov-profile/83669
21373         * gcov.c (output_intermediate_file): Add version to intermediate
21374         gcov file.
21375         * doc/gcov.texi: Document new field 'version' in intermediate
21376         file format. Fix location of '-k' option of gcov command.
21378 2018-01-04  Martin Liska  <mliska@suse.cz>
21380         PR ipa/82352
21381         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21383 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21385         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21387 2018-01-03  Martin Sebor  <msebor@redhat.com>
21389         PR tree-optimization/83655
21390         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21391         checking calls with invalid arguments.
21393 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21395         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21396         (vectorizable_mask_load_store): Delete.
21397         (vectorizable_call): Return false for masked loads and stores.
21398         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21399         instead of gimple_assign_rhs1.
21400         (vectorizable_load): Handle IFN_MASK_LOAD.
21401         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21405         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21406         split out from..,
21407         (vectorizable_mask_load_store): ...here.
21408         (vectorizable_load): ...and here.
21410 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21412         * tree-vect-stmts.c (vect_build_all_ones_mask)
21413         (vect_build_zero_merge_argument): New functions, split out from...
21414         (vectorizable_load): ...here.
21416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21418         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21419         split out from...
21420         (vectorizable_mask_load_store): ...here.
21421         (vectorizable_store): ...and here.
21423 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21425         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21426         split out from...
21427         (vectorizable_mask_load_store): ...here.
21429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21431         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21432         (vect_model_store_cost): Take a vec_load_store_type instead of a
21433         vect_def_type.
21434         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21435         (vect_model_store_cost): Take a vec_load_store_type instead of a
21436         vect_def_type.
21437         (vectorizable_mask_load_store): Update accordingly.
21438         (vectorizable_store): Likewise.
21439         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21441 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21443         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21444         IFN_MASK_LOAD calls here rather than...
21445         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21447 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21448             Alan Hayward  <alan.hayward@arm.com>
21449             David Sherwood  <david.sherwood@arm.com>
21451         * expmed.c (extract_bit_field_1): For vector extracts,
21452         fall back to extract_bit_field_as_subreg if vec_extract
21453         isn't available.
21455 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21456             Alan Hayward  <alan.hayward@arm.com>
21457             David Sherwood  <david.sherwood@arm.com>
21459         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21460         they are variable or constant sized.
21461         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21462         slots for constant-sized data.
21464 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21465             Alan Hayward  <alan.hayward@arm.com>
21466             David Sherwood  <david.sherwood@arm.com>
21468         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21469         handling COND_EXPRs with boolean comparisons, try to find a better
21470         basis for the mask type than the boolean itself.
21472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21474         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21475         is calculated and how it can be overridden.
21476         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21477         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21478         if defined.
21479         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21480         if nonzero.
21482 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21483             Alan Hayward  <alan.hayward@arm.com>
21484             David Sherwood  <david.sherwood@arm.com>
21486         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21487         Remove the mode argument.
21488         (aarch64_simd_valid_immediate): Remove the mode and inverse
21489         arguments.
21490         * config/aarch64/iterators.md (bitsize): New iterator.
21491         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21492         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21493         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21494         aarch64_simd_valid_immediate.
21495         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21496         (aarch64_reg_or_bic_imm): Likewise.
21497         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21498         with an insn_type enum and msl with a modifier_type enum.
21499         Replace element_width with a scalar_mode.  Change the shift
21500         to unsigned int.  Add constructors for scalar_float_mode and
21501         scalar_int_mode elements.
21502         (aarch64_vect_float_const_representable_p): Delete.
21503         (aarch64_can_const_movi_rtx_p)
21504         (aarch64_simd_scalar_immediate_valid_for_move)
21505         (aarch64_simd_make_constant): Update call to
21506         aarch64_simd_valid_immediate.
21507         (aarch64_advsimd_valid_immediate_hs): New function.
21508         (aarch64_advsimd_valid_immediate): Likewise.
21509         (aarch64_simd_valid_immediate): Remove mode and inverse
21510         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21511         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21512         and aarch64_float_const_representable_p on the result.
21513         (aarch64_output_simd_mov_immediate): Remove mode argument.
21514         Update call to aarch64_simd_valid_immediate and use of
21515         simd_immediate_info.
21516         (aarch64_output_scalar_simd_mov_immediate): Update call
21517         accordingly.
21519 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21520             Alan Hayward  <alan.hayward@arm.com>
21521             David Sherwood  <david.sherwood@arm.com>
21523         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21524         (mode_nunits): Likewise CONST_MODE_NUNITS.
21525         * machmode.def (ADJUST_NUNITS): Document.
21526         * genmodes.c (mode_data::need_nunits_adj): New field.
21527         (blank_mode): Update accordingly.
21528         (adj_nunits): New variable.
21529         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21530         parameter.
21531         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21532         listed in adj_nunits.
21533         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21534         listed in adj_nunits.  Don't emit case statements for such modes.
21535         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21536         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21537         nothing if adj_nunits is nonnull.
21538         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21539         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21540         (emit_mode_fbit): Update use of print_maybe_const_decl.
21541         (emit_move_size): Likewise.  Treat the array as non-const
21542         if adj_nunits.
21543         (emit_mode_adjustments): Handle adj_nunits.
21545 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21547         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21548         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21549         (VECTOR_MODES): Use it.
21550         (make_vector_modes): Take the prefix as an argument.
21552 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21553             Alan Hayward  <alan.hayward@arm.com>
21554             David Sherwood  <david.sherwood@arm.com>
21556         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21557         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21558         for MODE_VECTOR_BOOL.
21559         * machmode.def (VECTOR_BOOL_MODE): Document.
21560         * genmodes.c (VECTOR_BOOL_MODE): New macro.
21561         (make_vector_bool_mode): New function.
21562         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21563         MODE_VECTOR_BOOL.
21564         * lto-streamer-in.c (lto_input_mode_table): Likewise.
21565         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21566         Likewise.
21567         * stor-layout.c (int_mode_for_mode): Likewise.
21568         * tree.c (build_vector_type_for_mode): Likewise.
21569         * varasm.c (output_constant_pool_2): Likewise.
21570         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21571         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
21572         for MODE_VECTOR_BOOL.
21573         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21574         of mode class checks.
21575         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21576         instead of a list of mode class checks.
21577         (expand_vector_scalar_condition): Likewise.
21578         (type_for_widest_vector_mode): Handle BImode as an inner mode.
21580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21581             Alan Hayward  <alan.hayward@arm.com>
21582             David Sherwood  <david.sherwood@arm.com>
21584         * machmode.h (mode_size): Change from unsigned short to
21585         poly_uint16_pod.
21586         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21587         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21588         or if measurement_type is not polynomial.
21589         (fixed_size_mode::includes_p): Check for constant-sized modes.
21590         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21591         return a poly_uint16 rather than an unsigned short.
21592         (emit_mode_size): Change the type of mode_size from unsigned short
21593         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
21594         (emit_mode_adjustments): Cope with polynomial vector sizes.
21595         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21596         for GET_MODE_SIZE.
21597         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21598         for GET_MODE_SIZE.
21599         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21600         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21601         * caller-save.c (setup_save_areas): Likewise.
21602         (replace_reg_with_saved_mem): Likewise.
21603         * calls.c (emit_library_call_value_1): Likewise.
21604         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21605         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21606         (gen_lowpart_for_combine): Likewise.
21607         * convert.c (convert_to_integer_1): Likewise.
21608         * cse.c (equiv_constant, cse_insn): Likewise.
21609         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21610         (cselib_subst_to_values): Likewise.
21611         * dce.c (word_dce_process_block): Likewise.
21612         * df-problems.c (df_word_lr_mark_ref): Likewise.
21613         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21614         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21615         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21616         (rtl_for_decl_location): Likewise.
21617         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21618         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21619         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21620         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21621         (expand_expr_real_1): Likewise.
21622         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21623         (pad_below): Likewise.
21624         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21625         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21626         * ira.c (get_subreg_tracking_sizes): Likewise.
21627         * ira-build.c (ira_create_allocno_objects): Likewise.
21628         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21629         (ira_sort_regnos_for_alter_reg): Likewise.
21630         * ira-costs.c (record_operand_costs): Likewise.
21631         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21632         (resolve_simple_move): Likewise.
21633         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21634         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21635         (lra_constraints): Likewise.
21636         (CONST_POOL_OK_P): Reject variable-sized modes.
21637         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21638         (add_pseudo_to_slot, lra_spill): Likewise.
21639         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21640         * optabs-query.c (get_best_extraction_insn): Likewise.
21641         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21642         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21643         (expand_mult_highpart, valid_multiword_target_p): Likewise.
21644         * recog.c (offsettable_address_addr_space_p): Likewise.
21645         * regcprop.c (maybe_mode_change): Likewise.
21646         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21647         * regrename.c (build_def_use): Likewise.
21648         * regstat.c (dump_reg_info): Likewise.
21649         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21650         (find_reloads, find_reloads_subreg_address): Likewise.
21651         * reload1.c (eliminate_regs_1): Likewise.
21652         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21653         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21654         (simplify_binary_operation_1, simplify_subreg): Likewise.
21655         * targhooks.c (default_function_arg_padding): Likewise.
21656         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21657         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21658         (verify_gimple_assign_ternary): Likewise.
21659         * tree-inline.c (estimate_move_cost): Likewise.
21660         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21661         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21662         (get_address_cost_ainc): Likewise.
21663         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21664         (vect_supportable_dr_alignment): Likewise.
21665         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21666         (vectorizable_reduction): Likewise.
21667         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21668         (vectorizable_operation, vectorizable_load): Likewise.
21669         * tree.c (build_same_sized_truth_vector_type): Likewise.
21670         * valtrack.c (cleanup_auto_inc_dec): Likewise.
21671         * var-tracking.c (emit_note_insn_var_location): Likewise.
21672         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21673         (ADDR_VEC_ALIGN): Likewise.
21675 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21676             Alan Hayward  <alan.hayward@arm.com>
21677             David Sherwood  <david.sherwood@arm.com>
21679         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21680         unsigned short.
21681         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21682         or if measurement_type is polynomial.
21683         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21684         * combine.c (make_extraction): Likewise.
21685         * dse.c (find_shift_sequence): Likewise.
21686         * dwarf2out.c (mem_loc_descriptor): Likewise.
21687         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21688         (extract_bit_field, extract_low_bits): Likewise.
21689         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21690         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21691         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21692         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21693         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21694         * reload.c (find_reloads): Likewise.
21695         * reload1.c (alter_reg): Likewise.
21696         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21697         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21698         * tree-if-conv.c (predicate_mem_writes): Likewise.
21699         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21700         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21701         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21702         * valtrack.c (dead_debug_insert_temp): Likewise.
21703         * varasm.c (mergeable_constant_section): Likewise.
21704         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21706 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21707             Alan Hayward  <alan.hayward@arm.com>
21708             David Sherwood  <david.sherwood@arm.com>
21710         * expr.c (expand_assignment): Cope with polynomial mode sizes
21711         when assigning to a CONCAT.
21713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21714             Alan Hayward  <alan.hayward@arm.com>
21715             David Sherwood  <david.sherwood@arm.com>
21717         * machmode.h (mode_precision): Change from unsigned short to
21718         poly_uint16_pod.
21719         (mode_to_precision): Return a poly_uint16 rather than an unsigned
21720         short.
21721         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21722         or if measurement_type is not polynomial.
21723         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
21724         in which the mode is already known to be a scalar_int_mode.
21725         * genmodes.c (emit_mode_precision): Change the type of mode_precision
21726         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
21727         initializer.
21728         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21729         for GET_MODE_PRECISION.
21730         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21731         for GET_MODE_PRECISION.
21732         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21733         as polynomial.
21734         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21735         (expand_field_assignment, make_extraction): Likewise.
21736         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21737         (get_last_value): Likewise.
21738         * convert.c (convert_to_integer_1): Likewise.
21739         * cse.c (cse_insn): Likewise.
21740         * expr.c (expand_expr_real_1): Likewise.
21741         * lra-constraints.c (simplify_operand_subreg): Likewise.
21742         * optabs-query.c (can_atomic_load_p): Likewise.
21743         * optabs.c (expand_atomic_load): Likewise.
21744         (expand_atomic_store): Likewise.
21745         * ree.c (combine_reaching_defs): Likewise.
21746         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21747         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21748         * tree.h (type_has_mode_precision_p): Likewise.
21749         * ubsan.c (instrument_si_overflow): Likewise.
21751 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21752             Alan Hayward  <alan.hayward@arm.com>
21753             David Sherwood  <david.sherwood@arm.com>
21755         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21756         polynomial numbers of units.
21757         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21758         (valid_vector_subparts_p): New function.
21759         (build_vector_type): Remove temporary shim and take the number
21760         of units as a poly_uint64 rather than an int.
21761         (build_opaque_vector_type): Take the number of units as a
21762         poly_uint64 rather than an int.
21763         * tree.c (build_vector_from_ctor): Handle polynomial
21764         TYPE_VECTOR_SUBPARTS.
21765         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21766         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21767         (build_vector_from_val): If the number of units is variable,
21768         use build_vec_duplicate_cst for constant operands and
21769         VEC_DUPLICATE_EXPR otherwise.
21770         (make_vector_type): Remove temporary is_constant ().
21771         (build_vector_type, build_opaque_vector_type): Take the number of
21772         units as a poly_uint64 rather than an int.
21773         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21774         VECTOR_CST_NELTS.
21775         * cfgexpand.c (expand_debug_expr): Likewise.
21776         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21777         (store_constructor, expand_expr_real_1): Likewise.
21778         (const_scalar_mask_from_tree): Likewise.
21779         * fold-const-call.c (fold_const_reduction): Likewise.
21780         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21781         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21782         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21783         (fold_relational_const): Likewise.
21784         (native_interpret_vector): Likewise.  Change the size from an
21785         int to an unsigned int.
21786         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21787         TYPE_VECTOR_SUBPARTS.
21788         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21789         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21790         duplicating a non-constant operand into a variable-length vector.
21791         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21792         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21793         * ipa-icf.c (sem_variable::equals): Likewise.
21794         * match.pd: Likewise.
21795         * omp-simd-clone.c (simd_clone_subparts): Likewise.
21796         * print-tree.c (print_node): Likewise.
21797         * stor-layout.c (layout_type): Likewise.
21798         * targhooks.c (default_builtin_vectorization_cost): Likewise.
21799         * tree-cfg.c (verify_gimple_comparison): Likewise.
21800         (verify_gimple_assign_binary): Likewise.
21801         (verify_gimple_assign_ternary): Likewise.
21802         (verify_gimple_assign_single): Likewise.
21803         * tree-pretty-print.c (dump_generic_node): Likewise.
21804         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21805         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21806         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21807         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21808         (vect_shift_permute_load_chain): Likewise.
21809         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21810         (expand_vector_condition, optimize_vector_constructor): Likewise.
21811         (lower_vec_perm, get_compute_type): Likewise.
21812         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21813         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21814         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21815         (vect_recog_mask_conversion_pattern): Likewise.
21816         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21817         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21818         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21819         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21820         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21821         (vectorizable_shift, vectorizable_operation, vectorizable_store)
21822         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21823         (supportable_widening_operation): Likewise.
21824         (supportable_narrowing_operation): Likewise.
21825         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21826         Likewise.
21827         * varasm.c (output_constant): Likewise.
21829 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21830             Alan Hayward  <alan.hayward@arm.com>
21831             David Sherwood  <david.sherwood@arm.com>
21833         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21834         so that both the length == 3 and length != 3 cases set up their
21835         own permute vectors.  Add comments explaining why we know the
21836         number of elements is constant.
21837         (vect_permute_load_chain): Likewise.
21839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21840             Alan Hayward  <alan.hayward@arm.com>
21841             David Sherwood  <david.sherwood@arm.com>
21843         * machmode.h (mode_nunits): Change from unsigned char to
21844         poly_uint16_pod.
21845         (ONLY_FIXED_SIZE_MODES): New macro.
21846         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21847         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21848         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21849         New typedefs.
21850         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21851         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21852         or if measurement_type is not polynomial.
21853         * genmodes.c (ZERO_COEFFS): New macro.
21854         (emit_mode_nunits_inline): Make mode_nunits_inline return a
21855         poly_uint16.
21856         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21857         Use ZERO_COEFFS when emitting initializers.
21858         * data-streamer.h (bp_pack_poly_value): New function.
21859         (bp_unpack_poly_value): Likewise.
21860         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21861         for GET_MODE_NUNITS.
21862         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21863         for GET_MODE_NUNITS.
21864         * tree.c (make_vector_type): Remove temporary shim and make
21865         the real function take the number of units as a poly_uint64
21866         rather than an int.
21867         (build_vector_type_for_mode): Handle polynomial nunits.
21868         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21869         * emit-rtl.c (const_vec_series_p_1): Likewise.
21870         (gen_rtx_CONST_VECTOR): Likewise.
21871         * fold-const.c (test_vec_duplicate_folding): Likewise.
21872         * genrecog.c (validate_pattern): Likewise.
21873         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21874         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21875         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21876         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21877         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21878         * rtlanal.c (subreg_get_info): Likewise.
21879         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21880         (vect_grouped_load_supported): Likewise.
21881         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21882         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21883         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21884         (simplify_const_unary_operation, simplify_binary_operation_1)
21885         (simplify_const_binary_operation, simplify_ternary_operation)
21886         (test_vector_ops_duplicate, test_vector_ops): Likewise.
21887         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21888         instead of CONST_VECTOR_NUNITS.
21889         * varasm.c (output_constant_pool_2): Likewise.
21890         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21891         explicit-encoded elements in the XVEC for variable-length vectors.
21893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21895         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21897 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21898             Alan Hayward  <alan.hayward@arm.com>
21899             David Sherwood  <david.sherwood@arm.com>
21901         * coretypes.h (fixed_size_mode): Declare.
21902         (fixed_size_mode_pod): New typedef.
21903         * builtins.h (target_builtins::x_apply_args_mode)
21904         (target_builtins::x_apply_result_mode): Change type to
21905         fixed_size_mode_pod.
21906         * builtins.c (apply_args_size, apply_result_size, result_vector)
21907         (expand_builtin_apply_args_1, expand_builtin_apply)
21908         (expand_builtin_return): Update accordingly.
21910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21912         * cse.c (hash_rtx_cb): Hash only the encoded elements.
21913         * cselib.c (cselib_hash_rtx): Likewise.
21914         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21915         CONST_VECTOR encoding.
21917 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21918             Jeff Law  <law@redhat.com>
21920         PR target/83641
21921         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21922         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21923         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21924         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21926         PR target/83641
21927         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21928         explicitly probe *sp in a noreturn function if there were any callee
21929         register saves or frame pointer is needed.
21931 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21933         PR debug/83621
21934         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21935         BLKmode for ternary, binary or unary expressions.
21937         PR debug/83645
21938         * var-tracking.c (delete_vta_debug_insn): New inline function.
21939         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21940         insns from get_insns () to NULL instead of each bb separately.
21941         Use delete_vta_debug_insn.  No longer static.
21942         (vt_debug_insns_local, variable_tracking_main_1): Adjust
21943         delete_vta_debug_insns callers.
21944         * rtl.h (delete_vta_debug_insns): Declare.
21945         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21946         instead of variable_tracking_main.
21948 2018-01-03  Martin Sebor  <msebor@redhat.com>
21950         PR tree-optimization/83603
21951         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21952         arguments past the endof the argument list in functions declared
21953         without a prototype.
21954         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21955         Avoid checking when arguments are null.
21957 2018-01-03  Martin Sebor  <msebor@redhat.com>
21959         PR c/83559
21960         * doc/extend.texi (attribute const): Fix a typo.
21961         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21962         issuing -Wsuggest-attribute for void functions.
21964 2018-01-03  Martin Sebor  <msebor@redhat.com>
21966         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21967         offset_int::from instead of wide_int::to_shwi.
21968         (maybe_diag_overlap): Remove assertion.
21969         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21970         * gimple-ssa-sprintf.c (format_directive): Same.
21971         (parse_directive): Same.
21972         (sprintf_dom_walker::compute_format_length): Same.
21973         (try_substitute_return_value): Same.
21975 2018-01-03  Jeff Law  <law@redhat.com>
21977         PR middle-end/83654
21978         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21979         non-constant residual for zero at runtime and avoid probing in
21980         that case.  Reorganize code for trailing problem to mirror handling
21981         of the residual.
21983 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21985         PR tree-optimization/83501
21986         * tree-ssa-strlen.c (get_string_cst): New.
21987         (handle_char_store): Call get_string_cst.
21989 2018-01-03  Martin Liska  <mliska@suse.cz>
21991         PR tree-optimization/83593
21992         * tree-ssa-strlen.c: Include tree-cfg.h.
21993         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21994         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21995         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21996         to false.
21997         (strlen_dom_walker::before_dom_children): Call
21998         gimple_purge_dead_eh_edges. Dump tranformation with details
21999         dump flags.
22000         (strlen_dom_walker::before_dom_children): Update call by adding
22001         new argument cleanup_eh.
22002         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22004 2018-01-03  Martin Liska  <mliska@suse.cz>
22006         PR ipa/83549
22007         * cif-code.def (VARIADIC_THUNK): New enum value.
22008         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22009         thunks.
22011 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22013         * sse.md (mov<mode>_internal): Tighten condition for when to use
22014         vmovdqu<ssescalarsize> for TI and OI modes.
22016 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22018         Update copyright years.
22020 2018-01-03  Martin Liska  <mliska@suse.cz>
22022         PR ipa/83594
22023         * ipa-visibility.c (function_and_variable_visibility): Skip
22024         functions with noipa attribure.
22026 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22028         * gcc.c (process_command): Update copyright notice dates.
22029         * gcov-dump.c (print_version): Ditto.
22030         * gcov.c (print_version): Ditto.
22031         * gcov-tool.c (print_version): Ditto.
22032         * gengtype.c (create_file): Ditto.
22033         * doc/cpp.texi: Bump @copying's copyright year.
22034         * doc/cppinternals.texi: Ditto.
22035         * doc/gcc.texi: Ditto.
22036         * doc/gccint.texi: Ditto.
22037         * doc/gcov.texi: Ditto.
22038         * doc/install.texi: Ditto.
22039         * doc/invoke.texi: Ditto.
22041 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22043         * vector-builder.h (vector_builder::m_full_nelts): Change from
22044         unsigned int to poly_uint64.
22045         (vector_builder::full_nelts): Update prototype accordingly.
22046         (vector_builder::new_vector): Likewise.
22047         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22048         (vector_builder::operator ==): Likewise.
22049         (vector_builder::finalize): Likewise.
22050         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22051         Take the number of elements as a poly_uint64 rather than an
22052         unsigned int.
22053         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22054         from unsigned int to poly_uint64.
22055         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22056         (vec_perm_indices::new_vector): Likewise.
22057         (vec_perm_indices::length): Likewise.
22058         (vec_perm_indices::nelts_per_input): Likewise.
22059         (vec_perm_indices::input_nelts): Likewise.
22060         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22061         number of elements per input as a poly_uint64 rather than an
22062         unsigned int.  Use the original encoding for variable-length
22063         vectors, rather than clamping each individual element.
22064         For the second and subsequent elements in each pattern,
22065         clamp the step and base before clamping their sum.
22066         (vec_perm_indices::series_p): Handle polynomial element counts.
22067         (vec_perm_indices::all_in_range_p): Likewise.
22068         (vec_perm_indices_to_tree): Likewise.
22069         (vec_perm_indices_to_rtx): Likewise.
22070         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22071         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22072         (tree_vector_builder::new_binary_operation): Handle polynomial
22073         element counts.  Return false if we need to know the number
22074         of elements at compile time.
22075         * fold-const.c (fold_vec_perm): Punt if the number of elements
22076         isn't known at compile time.
22078 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22080         * vec-perm-indices.h (vec_perm_builder): Change element type
22081         from HOST_WIDE_INT to poly_int64.
22082         (vec_perm_indices::element_type): Update accordingly.
22083         (vec_perm_indices::clamp): Handle polynomial element_types.
22084         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22085         (vec_perm_indices::all_in_range_p): Likewise.
22086         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22087         than shwi trees.
22088         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22089         polynomial vec_perm_indices element types.
22090         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22091         * fold-const.c (fold_vec_perm): Likewise.
22092         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22093         * tree-vect-generic.c (lower_vec_perm): Likewise.
22094         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22095         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22096         element type to HOST_WIDE_INT.
22098 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22099             Alan Hayward  <alan.hayward@arm.com>
22100             David Sherwood  <david.sherwood@arm.com>
22102         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22103         rather than an int.  Use plus_constant.
22104         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22105         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22107 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22108             Alan Hayward  <alan.hayward@arm.com>
22109             David Sherwood  <david.sherwood@arm.com>
22111         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22112         a HOST_WIDE_INT to a poly_int64.
22114 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22115             Alan Hayward  <alan.hayward@arm.com>
22116             David Sherwood  <david.sherwood@arm.com>
22118         * calls.c (load_register_parameters): Cope with polynomial
22119         mode sizes.  Require a constant size for BLKmode parameters
22120         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22121         forces a parameter to be padded at the lsb end in order to
22122         fill a complete number of words, require the parameter size
22123         to be ordered wrt UNITS_PER_WORD.
22125 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22126             Alan Hayward  <alan.hayward@arm.com>
22127             David Sherwood  <david.sherwood@arm.com>
22129         * reload1.c (spill_stack_slot_width): Change element type
22130         from unsigned int to poly_uint64_pod.
22131         (alter_reg): Treat mode sizes as polynomial.
22133 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22134             Alan Hayward  <alan.hayward@arm.com>
22135             David Sherwood  <david.sherwood@arm.com>
22137         * reload.c (complex_word_subreg_p): New function.
22138         (reload_inner_reg_of_subreg, push_reload): Use it.
22140 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22141             Alan Hayward  <alan.hayward@arm.com>
22142             David Sherwood  <david.sherwood@arm.com>
22144         * lra-constraints.c (process_alt_operands): Reject matched
22145         operands whose sizes aren't ordered.
22146         (match_reload): Refer to this check here.
22148 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22149             Alan Hayward  <alan.hayward@arm.com>
22150             David Sherwood  <david.sherwood@arm.com>
22152         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22153         that the mode size is in the set {1, 2, 4, 8, 16}.
22155 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22156             Alan Hayward  <alan.hayward@arm.com>
22157             David Sherwood  <david.sherwood@arm.com>
22159         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22160         Use plus_constant instead of gen_rtx_PLUS.
22162 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22163             Alan Hayward  <alan.hayward@arm.com>
22164             David Sherwood  <david.sherwood@arm.com>
22166         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22167         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22168         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22169         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22170         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22171         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22172         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22173         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22174         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22175         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22176         a poly_int64.
22177         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22178         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22179         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22180         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22181         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22182         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22183         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22184         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22185         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22186         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22187         function.
22188         * expr.c (emit_move_resolve_push): Treat the input and result
22189         of PUSH_ROUNDING as a poly_int64.
22190         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22191         (emit_push_insn): Likewise.
22192         * lra-eliminations.c (mark_not_eliminable): Likewise.
22193         * recog.c (push_operand): Likewise.
22194         * reload1.c (elimination_effects): Likewise.
22195         * rtlanal.c (nonzero_bits1): Likewise.
22196         * calls.c (store_one_arg): Likewise.  Require the padding to be
22197         known at compile time.
22199 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22200             Alan Hayward  <alan.hayward@arm.com>
22201             David Sherwood  <david.sherwood@arm.com>
22203         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22204         Use plus_constant instead of gen_rtx_PLUS.
22206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22207             Alan Hayward  <alan.hayward@arm.com>
22208             David Sherwood  <david.sherwood@arm.com>
22210         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22211         rather than an int.
22213 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22214             Alan Hayward  <alan.hayward@arm.com>
22215             David Sherwood  <david.sherwood@arm.com>
22217         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22218         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22219         via stack temporaries.  Treat the mode size as polynomial too.
22221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22222             Alan Hayward  <alan.hayward@arm.com>
22223             David Sherwood  <david.sherwood@arm.com>
22225         * expr.c (expand_expr_real_2): When handling conversions involving
22226         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22227         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22228         as a poly_uint64 too.
22230 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22231             Alan Hayward  <alan.hayward@arm.com>
22232             David Sherwood  <david.sherwood@arm.com>
22234         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22236 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22237             Alan Hayward  <alan.hayward@arm.com>
22238             David Sherwood  <david.sherwood@arm.com>
22240         * combine.c (can_change_dest_mode): Handle polynomial
22241         REGMODE_NATURAL_SIZE.
22242         * expmed.c (store_bit_field_1): Likewise.
22243         * expr.c (store_constructor): Likewise.
22244         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22245         and polynomial REGMODE_NATURAL_SIZE.
22246         (gen_lowpart_common): Likewise.
22247         * reginfo.c (record_subregs_of_mode): Likewise.
22248         * rtlanal.c (read_modify_subreg_p): Likewise.
22250 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22251             Alan Hayward  <alan.hayward@arm.com>
22252             David Sherwood  <david.sherwood@arm.com>
22254         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22255         numbers of elements.
22257 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22258             Alan Hayward  <alan.hayward@arm.com>
22259             David Sherwood  <david.sherwood@arm.com>
22261         * match.pd: Cope with polynomial numbers of vector elements.
22263 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22264             Alan Hayward  <alan.hayward@arm.com>
22265             David Sherwood  <david.sherwood@arm.com>
22267         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22268         in a POINTER_PLUS_EXPR.
22270 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22271             Alan Hayward  <alan.hayward@arm.com>
22272             David Sherwood  <david.sherwood@arm.com>
22274         * omp-simd-clone.c (simd_clone_subparts): New function.
22275         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22276         (ipa_simd_modify_function_body): Likewise.
22278 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22279             Alan Hayward  <alan.hayward@arm.com>
22280             David Sherwood  <david.sherwood@arm.com>
22282         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22283         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22284         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22285         (expand_vector_condition, vector_element): Likewise.
22286         (subparts_gt): New function.
22287         (get_compute_type): Use subparts_gt.
22288         (count_type_subparts): Delete.
22289         (expand_vector_operations_1): Use subparts_gt instead of
22290         count_type_subparts.
22292 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22293             Alan Hayward  <alan.hayward@arm.com>
22294             David Sherwood  <david.sherwood@arm.com>
22296         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22297         (vect_compile_time_alias): ...this new function.  Do the calculation
22298         on poly_ints rather than trees.
22299         (vect_prune_runtime_alias_test_list): Update call accordingly.
22301 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22302             Alan Hayward  <alan.hayward@arm.com>
22303             David Sherwood  <david.sherwood@arm.com>
22305         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22306         numbers of units.
22307         (vect_schedule_slp_instance): Likewise.
22309 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22310             Alan Hayward  <alan.hayward@arm.com>
22311             David Sherwood  <david.sherwood@arm.com>
22313         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22314         constant and extern definitions for variable-length vectors.
22315         (vect_get_constant_vectors): Note that the number of units
22316         is known to be constant.
22318 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22319             Alan Hayward  <alan.hayward@arm.com>
22320             David Sherwood  <david.sherwood@arm.com>
22322         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22323         of units as polynomial.  Choose between WIDE and NARROW based
22324         on multiple_p.
22326 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22327             Alan Hayward  <alan.hayward@arm.com>
22328             David Sherwood  <david.sherwood@arm.com>
22330         * tree-vect-stmts.c (simd_clone_subparts): New function.
22331         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22333 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22334             Alan Hayward  <alan.hayward@arm.com>
22335             David Sherwood  <david.sherwood@arm.com>
22337         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22338         vectors as polynomial.  Use build_index_vector for
22339         IFN_GOMP_SIMD_LANE.
22341 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22342             Alan Hayward  <alan.hayward@arm.com>
22343             David Sherwood  <david.sherwood@arm.com>
22345         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22346         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22347         for variable-length vectors.
22348         (vectorizable_mask_load_store): Treat the number of units as
22349         polynomial, asserting that it is constant if the condition has
22350         already been enforced.
22351         (vectorizable_store, vectorizable_load): Likewise.
22353 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22354             Alan Hayward  <alan.hayward@arm.com>
22355             David Sherwood  <david.sherwood@arm.com>
22357         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22358         of units as polynomial.  Punt if we can't tell at compile time
22359         which vector contains the final result.
22361 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22362             Alan Hayward  <alan.hayward@arm.com>
22363             David Sherwood  <david.sherwood@arm.com>
22365         * tree-vect-loop.c (vectorizable_induction): Treat the number
22366         of units as polynomial.  Punt on SLP inductions.  Use an integer
22367         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22368         cast of such a series for variable-length floating-point
22369         reductions.
22371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22372             Alan Hayward  <alan.hayward@arm.com>
22373             David Sherwood  <david.sherwood@arm.com>
22375         * tree.h (build_index_vector): Declare.
22376         * tree.c (build_index_vector): New function.
22377         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22378         of units as polynomial, forcibly converting it to a constant if
22379         vectorizable_reduction has already enforced the condition.
22380         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22381         to create a {1,2,3,...} vector.
22382         (vectorizable_reduction): Treat the number of units as polynomial.
22383         Choose vectype_in based on the largest scalar element size rather
22384         than the smallest number of units.  Enforce the restrictions
22385         relied on above.
22387 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22388             Alan Hayward  <alan.hayward@arm.com>
22389             David Sherwood  <david.sherwood@arm.com>
22391         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22392         number of units as polynomial.
22394 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22395             Alan Hayward  <alan.hayward@arm.com>
22396             David Sherwood  <david.sherwood@arm.com>
22398         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22399         * target.def (autovectorize_vector_sizes): Return the vector sizes
22400         by pointer, using vector_sizes rather than a bitmask.
22401         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22402         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22403         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22404         Likewise.
22405         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22406         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22407         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22408         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22409         * omp-general.c (omp_max_vf): Likewise.
22410         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22411         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22412         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22413         * tree-vect-slp.c (vect_slp_bb): Likewise.
22414         * doc/tm.texi: Regenerate.
22415         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22416         to a poly_uint64.
22417         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22418         the vector size as a poly_uint64 rather than an unsigned int.
22419         (current_vector_size): Change from an unsigned int to a poly_uint64.
22420         (get_vectype_for_scalar_type): Update accordingly.
22421         * tree.h (build_truth_vector_type): Take the size and number of
22422         units as a poly_uint64 rather than an unsigned int.
22423         (build_vector_type): Add a temporary overload that takes
22424         the number of units as a poly_uint64 rather than an unsigned int.
22425         * tree.c (make_vector_type): Likewise.
22426         (build_truth_vector_type): Take the number of units as a poly_uint64
22427         rather than an unsigned int.
22429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22430             Alan Hayward  <alan.hayward@arm.com>
22431             David Sherwood  <david.sherwood@arm.com>
22433         * target.def (get_mask_mode): Take the number of units and length
22434         as poly_uint64s rather than unsigned ints.
22435         * targhooks.h (default_get_mask_mode): Update accordingly.
22436         * targhooks.c (default_get_mask_mode): Likewise.
22437         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22438         * doc/tm.texi: Regenerate.
22440 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22441             Alan Hayward  <alan.hayward@arm.com>
22442             David Sherwood  <david.sherwood@arm.com>
22444         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22445         * omp-general.c (omp_max_vf): Likewise.
22446         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22447         (expand_omp_simd): Handle polynomial safelen.
22448         * omp-low.c (omplow_simd_context): Add a default constructor.
22449         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22450         (lower_rec_simd_input_clauses): Update accordingly.
22451         (lower_rec_input_clauses): Likewise.
22453 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22454             Alan Hayward  <alan.hayward@arm.com>
22455             David Sherwood  <david.sherwood@arm.com>
22457         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22458         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22459         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22460         (vect_analyze_slp_cost): Likewise.
22461         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22462         (vect_model_load_cost): 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         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22469         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22470         from an unsigned int * to a poly_uint64_pod *.
22471         (calculate_unrolling_factor): New function.
22472         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22474 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22475             Alan Hayward  <alan.hayward@arm.com>
22476             David Sherwood  <david.sherwood@arm.com>
22478         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22479         from an unsigned int to a poly_uint64.
22480         (_loop_vec_info::slp_unrolling_factor): Likewise.
22481         (_loop_vec_info::vectorization_factor): Change from an int
22482         to a poly_uint64.
22483         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22484         (vect_get_num_vectors): New function.
22485         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22486         (vect_get_num_copies): Use vect_get_num_vectors.
22487         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22488         to an unsigned int *.
22489         (vect_analyze_data_refs): Change min_vf from an int * to a
22490         poly_uint64 *.
22491         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22492         than an unsigned HOST_WIDE_INT.
22493         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22494         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22495         to an unsigned int *.
22496         (vect_analyze_data_ref_dependences): Likewise.
22497         (vect_compute_data_ref_alignment): Handle polynomial vf.
22498         (vect_enhance_data_refs_alignment): Likewise.
22499         (vect_prune_runtime_alias_test_list): Likewise.
22500         (vect_shift_permute_load_chain): Likewise.
22501         (vect_supportable_dr_alignment): Likewise.
22502         (dependence_distance_ge_vf): Take the vectorization factor as a
22503         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22504         (vect_analyze_data_refs): Change min_vf from an int * to a
22505         poly_uint64 *.
22506         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22507         vfm1 as a poly_uint64 rather than an int.  Make the same change
22508         for the returned bound_scalar.
22509         (vect_gen_vector_loop_niters): Handle polynomial vf.
22510         (vect_do_peeling): Likewise.  Update call to
22511         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22512         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22513         be constant.
22514         * tree-vect-loop.c (vect_determine_vectorization_factor)
22515         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22516         (vect_get_known_peeling_cost): Likewise.
22517         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22518         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22519         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22520         updating the upper bounds of the loop.
22521         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22522         rather than an int.
22523         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22524         polynomial unroll factors.
22525         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22526         (vect_make_slp_decision): Likewise.
22527         (vect_supported_load_permutation_p): Likewise, and polynomial
22528         vf too.
22529         (vect_analyze_slp_cost): Handle polynomial vf.
22530         (vect_slp_analyze_node_operations): Likewise.
22531         (vect_slp_analyze_bb_1): Likewise.
22532         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22533         than an unsigned HOST_WIDE_INT.
22534         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22535         (vectorizable_load): Handle polynomial vf.
22536         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22537         a poly_uint64.
22538         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
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         * match.pd: Handle bit operations involving three constants
22545         and try to fold one pair.
22547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22549         * tree-vect-loop-manip.c: Include gimple-fold.h.
22550         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22551         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22552         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22553         Add a path that uses a step of VF instead of 1, but disable it
22554         for now.
22555         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22556         and niters_no_overflow parameters.  Update calls to
22557         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22558         Create a new SSA name if the latter choses to use a ste other
22559         than zero, and return it via niters_vector_mult_vf_var.
22560         * tree-vect-loop.c (vect_transform_loop): Update calls to
22561         vect_do_peeling, vect_gen_vector_loop_niters and
22562         slpeel_make_loop_iterate_ntimes.
22563         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22564         (vect_gen_vector_loop_niters): Update declarations after above changes.
22566 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
22568         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22569         128-bit round to integer instructions.
22570         (ceil<mode>2): Likewise.
22571         (btrunc<mode>2): Likewise.
22572         (round<mode>2): Likewise.
22574 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22576         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22577         unaligned VSX load/store on P8/P9.
22578         (expand_block_clear): Allow the use of unaligned VSX
22579         load/store on P8/P9.
22581 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22583         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22584         New function.
22585         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22586         swap associated with both a load and a store.
22588 2018-01-02  Andrew Waterman  <andrew@sifive.com>
22590         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22591         * config/riscv/riscv.md (clear_cache): Use it.
22593 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
22595         * web.c: Remove out-of-date comment.
22597 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22599         * expr.c (fixup_args_size_notes): Check that any existing
22600         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22601         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22602         (emit_single_push_insn): ...here.
22604 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22606         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22607         (const_vector_encoded_nelts): New function.
22608         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22609         (const_vector_int_elt, const_vector_elt): Declare.
22610         * emit-rtl.c (const_vector_int_elt_1): New function.
22611         (const_vector_elt): Likewise.
22612         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22613         of CONST_VECTOR_ELT.
22615 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22617         * expr.c: Include rtx-vector-builder.h.
22618         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22619         directly on the tree encoding.
22620         (const_vector_from_tree): Likewise.
22621         * optabs.c: Include rtx-vector-builder.h.
22622         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22623         sequence of "u" values.
22624         * vec-perm-indices.c: Include rtx-vector-builder.h.
22625         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22626         directly on the vec_perm_indices encoding.
22628 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22630         * doc/rtl.texi (const_vector): Describe new encoding scheme.
22631         * Makefile.in (OBJS): Add rtx-vector-builder.o.
22632         * rtx-vector-builder.h: New file.
22633         * rtx-vector-builder.c: Likewise.
22634         * rtl.h (rtx_def::u2): Add a const_vector field.
22635         (CONST_VECTOR_NPATTERNS): New macro.
22636         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22637         (CONST_VECTOR_DUPLICATE_P): Likewise.
22638         (CONST_VECTOR_STEPPED_P): Likewise.
22639         (CONST_VECTOR_ENCODED_ELT): Likewise.
22640         (const_vec_duplicate_p): Check for a duplicated vector encoding.
22641         (unwrap_const_vec_duplicate): Likewise.
22642         (const_vec_series_p): Check for a non-duplicated vector encoding.
22643         Say that the function only returns true for integer vectors.
22644         * emit-rtl.c: Include rtx-vector-builder.h.
22645         (gen_const_vec_duplicate_1): Delete.
22646         (gen_const_vector): Call gen_const_vec_duplicate instead of
22647         gen_const_vec_duplicate_1.
22648         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22649         (gen_const_vec_duplicate): Use rtx_vector_builder.
22650         (gen_const_vec_series): Likewise.
22651         (gen_rtx_CONST_VECTOR): Likewise.
22652         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22653         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22654         Build a new vector rather than modifying a CONST_VECTOR in-place.
22655         (handle_special_swappables): Update call accordingly.
22656         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22657         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22658         Build a new vector rather than modifying a CONST_VECTOR in-place.
22659         (handle_special_swappables): Update call accordingly.
22661 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22663         * simplify-rtx.c (simplify_const_binary_operation): Use
22664         CONST_VECTOR_ELT instead of XVECEXP.
22666 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22668         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22669         the selector elements to be different from the data elements
22670         if the selector is a VECTOR_CST.
22671         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22672         ssizetype for the selector.
22674 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22676         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22677         before testing each element individually.
22678         * tree-vect-generic.c (lower_vec_perm): Likewise.
22680 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22682         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22683         * selftest-run-tests.c (selftest::run_tests): Call it.
22684         * vector-builder.h (vector_builder::operator ==): New function.
22685         (vector_builder::operator !=): Likewise.
22686         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22687         (vec_perm_indices::all_from_input_p): New function.
22688         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22689         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22690         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22691         instead of reading the VECTOR_CST directly.  Detect whether both
22692         vector inputs are the same before constructing the vec_perm_indices,
22693         and update the number of inputs argument accordingly.  Use the
22694         utility functions added above.  Only construct sel2 if we need to.
22696 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22698         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22699         the broadcast of the low byte.
22700         (expand_mult_highpart): Use an explicit encoding for the permutes.
22701         * optabs-query.c (can_mult_highpart_p): Likewise.
22702         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22703         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22704         (vectorizable_bswap): Likewise.
22705         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22706         explicit encoding for the power-of-2 permutes.
22707         (vect_permute_store_chain): Likewise.
22708         (vect_grouped_load_supported): Likewise.
22709         (vect_permute_load_chain): Likewise.
22711 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22713         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22714         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22715         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22716         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22717         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22718         (vect_gen_perm_mask_any): Likewise.
22720 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22722         * int-vector-builder.h: New file.
22723         * vec-perm-indices.h: Include int-vector-builder.h.
22724         (vec_perm_indices): Redefine as an int_vector_builder.
22725         (auto_vec_perm_indices): Delete.
22726         (vec_perm_builder): Redefine as a stand-alone class.
22727         (vec_perm_indices::vec_perm_indices): New function.
22728         (vec_perm_indices::clamp): Likewise.
22729         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22730         (vec_perm_indices::new_vector): New function.
22731         (vec_perm_indices::new_expanded_vector): Update for new
22732         vec_perm_indices class.
22733         (vec_perm_indices::rotate_inputs): New function.
22734         (vec_perm_indices::all_in_range_p): Operate directly on the
22735         encoded form, without computing elided elements.
22736         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22737         encoding.  Update for new vec_perm_indices class.
22738         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22739         the given vec_perm_builder.
22740         (expand_vec_perm_var): Update vec_perm_builder constructor.
22741         (expand_mult_highpart): Use vec_perm_builder instead of
22742         auto_vec_perm_indices.
22743         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22744         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
22745         or double series encoding as appropriate.
22746         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22747         vec_perm_indices instead of auto_vec_perm_indices.
22748         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22749         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22750         (vect_permute_store_chain): Likewise.
22751         (vect_grouped_load_supported): Likewise.
22752         (vect_permute_load_chain): Likewise.
22753         (vect_shift_permute_load_chain): Likewise.
22754         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22755         (vect_transform_slp_perm_load): Likewise.
22756         (vect_schedule_slp_instance): Likewise.
22757         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22758         (vectorizable_mask_load_store): Likewise.
22759         (vectorizable_bswap): Likewise.
22760         (vectorizable_store): Likewise.
22761         (vectorizable_load): Likewise.
22762         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22763         vec_perm_indices instead of auto_vec_perm_indices.  Use
22764         tree_to_vec_perm_builder to read the vector from a tree.
22765         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22766         vec_perm_builder instead of a vec_perm_indices.
22767         (have_whole_vector_shift): Use vec_perm_builder and
22768         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
22769         truncation to calc_vec_perm_mask_for_shift.
22770         (vect_create_epilog_for_reduction): Likewise.
22771         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22772         from auto_vec_perm_indices to vec_perm_indices.
22773         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22774         instead of changing individual elements.
22775         (aarch64_vectorize_vec_perm_const): Use new_vector to install
22776         the vector in d.perm.
22777         * config/arm/arm.c (expand_vec_perm_d::perm): Change
22778         from auto_vec_perm_indices to vec_perm_indices.
22779         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22780         instead of changing individual elements.
22781         (arm_vectorize_vec_perm_const): Use new_vector to install
22782         the vector in d.perm.
22783         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22784         Update vec_perm_builder constructor.
22785         (rs6000_expand_interleave): Likewise.
22786         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22787         (rs6000_expand_interleave): Likewise.
22789 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22791         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22792         to qimode could truncate the indices.
22793         * optabs.c (expand_vec_perm_var): Likewise.
22795 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22797         * Makefile.in (OBJS): Add vec-perm-indices.o.
22798         * vec-perm-indices.h: New file.
22799         * vec-perm-indices.c: Likewise.
22800         * target.h (vec_perm_indices): Replace with a forward class
22801         declaration.
22802         (auto_vec_perm_indices): Move to vec-perm-indices.h.
22803         * optabs.h: Include vec-perm-indices.h.
22804         (expand_vec_perm): Delete.
22805         (selector_fits_mode_p, expand_vec_perm_var): Declare.
22806         (expand_vec_perm_const): Declare.
22807         * target.def (vec_perm_const_ok): Replace with...
22808         (vec_perm_const): ...this new hook.
22809         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22810         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22811         * doc/tm.texi: Regenerate.
22812         * optabs.def (vec_perm_const): Delete.
22813         * doc/md.texi (vec_perm_const): Likewise.
22814         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22815         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22816         expand_vec_perm for constant permutation vectors.  Assert that
22817         the mode of variable permutation vectors is the integer equivalent
22818         of the mode that is being permuted.
22819         * optabs-query.h (selector_fits_mode_p): Declare.
22820         * optabs-query.c: Include vec-perm-indices.h.
22821         (selector_fits_mode_p): New function.
22822         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22823         is defined, instead of checking whether the vec_perm_const_optab
22824         exists.  Use targetm.vectorize.vec_perm_const instead of
22825         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
22826         fit in the vector mode before using a variable permute.
22827         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22828         vec_perm_indices instead of an rtx.
22829         (expand_vec_perm): Replace with...
22830         (expand_vec_perm_const): ...this new function.  Take the selector
22831         as a vec_perm_indices rather than an rtx.  Also take the mode of
22832         the selector.  Update call to shift_amt_for_vec_perm_mask.
22833         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22834         Use vec_perm_indices::new_expanded_vector to expand the original
22835         selector into bytes.  Check whether the indices fit in the vector
22836         mode before using a variable permute.
22837         (expand_vec_perm_var): Make global.
22838         (expand_mult_highpart): Use expand_vec_perm_const.
22839         * fold-const.c: Includes vec-perm-indices.h.
22840         * tree-ssa-forwprop.c: Likewise.
22841         * tree-vect-data-refs.c: Likewise.
22842         * tree-vect-generic.c: Likewise.
22843         * tree-vect-loop.c: Likewise.
22844         * tree-vect-slp.c: Likewise.
22845         * tree-vect-stmts.c: Likewise.
22846         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22847         Delete.
22848         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22849         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22850         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22851         (aarch64_vectorize_vec_perm_const): ...this new function.
22852         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22853         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22854         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22855         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22856         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22857         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22858         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22859         into...
22860         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
22861         check for NEON modes.
22862         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22863         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22864         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22865         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22866         into...
22867         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
22868         the old VEC_PERM_CONST conditions.
22869         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22870         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22871         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22872         (ia64_vectorize_vec_perm_const_ok): Merge into...
22873         (ia64_vectorize_vec_perm_const): ...this new function.
22874         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22875         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22876         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22877         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22878         * config/mips/mips.c (mips_expand_vec_perm_const)
22879         (mips_vectorize_vec_perm_const_ok): Merge into...
22880         (mips_vectorize_vec_perm_const): ...this new function.
22881         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22882         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22883         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22884         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22885         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22886         (rs6000_expand_vec_perm_const): Delete.
22887         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22888         Delete.
22889         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22890         (altivec_expand_vec_perm_const_le): Take each operand individually.
22891         Operate on constant selectors rather than rtxes.
22892         (altivec_expand_vec_perm_const): Likewise.  Update call to
22893         altivec_expand_vec_perm_const_le.
22894         (rs6000_expand_vec_perm_const): Delete.
22895         (rs6000_vectorize_vec_perm_const_ok): Delete.
22896         (rs6000_vectorize_vec_perm_const): New function.
22897         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22898         an element count and rtx array.
22899         (rs6000_expand_extract_even): Update call accordingly.
22900         (rs6000_expand_interleave): Likewise.
22901         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22902         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22903         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22904         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22905         (rs6000_expand_vec_perm_const): Delete.
22906         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22907         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22908         (altivec_expand_vec_perm_const_le): Take each operand individually.
22909         Operate on constant selectors rather than rtxes.
22910         (altivec_expand_vec_perm_const): Likewise.  Update call to
22911         altivec_expand_vec_perm_const_le.
22912         (rs6000_expand_vec_perm_const): Delete.
22913         (rs6000_vectorize_vec_perm_const_ok): Delete.
22914         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
22915         reference to the SPE evmerge intructions.
22916         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22917         an element count and rtx array.
22918         (rs6000_expand_extract_even): Update call accordingly.
22919         (rs6000_expand_interleave): Likewise.
22920         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22921         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22922         new function.
22923         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22925 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22927         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22928         vector mode and that that mode matches the mode of the data
22929         being permuted.
22930         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22931         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
22932         directly using expand_vec_perm_1 when forcing selectors into
22933         registers.
22934         (expand_vec_perm_var): New function, split out from expand_vec_perm.
22936 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22938         * optabs-query.h (can_vec_perm_p): Delete.
22939         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22940         * optabs-query.c (can_vec_perm_p): Split into...
22941         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22942         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22943         particular selector is valid.
22944         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22945         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22946         (vect_grouped_load_supported): Likewise.
22947         (vect_shift_permute_load_chain): Likewise.
22948         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22949         (vect_transform_slp_perm_load): Likewise.
22950         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22951         (vectorizable_bswap): Likewise.
22952         (vect_gen_perm_mask_checked): Likewise.
22953         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
22954         implementations of variable permutation vectors into account
22955         when deciding which selector to use.
22956         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22957         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22958         with a false third argument.
22959         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22960         to test whether the constant selector is valid and can_vec_perm_var_p
22961         to test whether a variable selector is valid.
22963 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22965         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22966         * optabs-query.c (can_vec_perm_p): Likewise.
22967         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22968         instead of vec_perm_indices.
22969         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22970         (vect_gen_perm_mask_checked): Likewise,
22971         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22972         (vect_gen_perm_mask_checked): Likewise,
22974 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22976         * optabs-query.h (qimode_for_vec_perm): Declare.
22977         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22978         (qimode_for_vec_perm): ...this new function.
22979         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22981 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22983         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22984         does not have a conditional at the top.
22986 2018-01-02  Richard Biener  <rguenther@suse.de>
22988         * ipa-inline.c (big_speedup_p): Fix expression.
22990 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
22992         PR target/81616
22993         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22994         for generic 4->6.
22996 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
22998         PR target/81616
22999         Generic tuning.
23000         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23001         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23002         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23003         cond_taken_branch_cost 3->4.
23005 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23007         PR tree-optimization/83581
23008         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23009         TODO_cleanup_cfg if any changes have been made.
23011         PR middle-end/83608
23012         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23013         convert_modes if target mode has the right side, but different mode
23014         class.
23016         PR middle-end/83609
23017         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23018         last argument when extracting from CONCAT.  If either from_real or
23019         from_imag is NULL, use expansion through memory.  If result is not
23020         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23021         the parts directly to inner mode, if even that fails, use expansion
23022         through memory.
23024         PR middle-end/83623
23025         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23026         check for bswap in mode rather than HImode and use that in expand_unop
23027         too.
23029 Copyright (C) 2018 Free Software Foundation, Inc.
23031 Copying and distribution of this file, with or without modification,
23032 are permitted in any medium without royalty provided the copyright
23033 notice and this notice are preserved.